Skip to content

Commit

Permalink
Merge branch 'askui:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesDienst-askui authored Mar 21, 2024
2 parents 821e5d5 + e1ea4b7 commit e02773e
Show file tree
Hide file tree
Showing 20 changed files with 10,871 additions and 15,622 deletions.
7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@ updates:
commit-message:
prefix: "chore"
include: "scope"
- package-ecosystem: "npm"
directory: "/examples/askui-nodejs-base-example"
schedule:
interval: "daily"
commit-message:
prefix: "chore"
include: "scope"
15 changes: 10 additions & 5 deletions .github/workflows/ci-cd-askui-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,29 @@ on:
# required: false
# type: string
env:
NODE_VERSION: 18
NODE_VERSION: 20
RELEASE_COMMAND: ${{ github.event.inputs.prerelease == 'true' && 'release:prerelease' || 'release' }} -- ${{ github.event.inputs.release-it-options }}
jobs:
build:
name: Build askui Node.js package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Install
run: npm ci
working-directory: packages/askui-nodejs
- name: Lint
run: npm run lint
working-directory: packages/askui-nodejs
- name: Test
run: npm run test
working-directory: packages/askui-nodejs
- name: Build
if: github.ref != 'refs/heads/main' && github.event_name != 'workflow_dispatch'
run: npm run build
Expand All @@ -47,20 +50,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Install
run: npm ci
working-directory: packages/askui-nodejs
- name: Configure Git User
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Release
run: npm run ${{ env.RELEASE_COMMAND }}
working-directory: packages/askui-nodejs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
5 changes: 2 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
project_root=$(pwd)

npx is-ci && exit 0
cd ${project_root}/packages/askui-nodejs
npm run lint:staged
npm test

cd examples/askui-nodejs-base-example || exit
npm run lint:staged
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![askui logo](./docs/static/img/askui-logo-white.svg.svg#gh-dark-mode-only)
![askui logo](./docs/static/img/askui-logo.svg#gh-light-mode-only)
![askui logo](./img/askui-logo-white.svg.svg#gh-dark-mode-only)
![askui logo](./img/askui-logo.svg#gh-light-mode-only)

*Reliable, automated end-to-end-testing that only depends on what is shown on your screen instead of the technology or platform you are running on*
*Reliable, automated end-to-end-automation that only depends on what is shown on your screen instead of the technology or platform you are running on*

<br/>

Expand All @@ -10,15 +10,30 @@

## Disclaimer

This repo is a [monorepo](https://en.wikipedia.org/wiki/Monorepo#:~:text=In%20version%20control%20systems%2C%20a,as%20a%20'shared%20codebase'.) consisting mainly of npm packages. We use [workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) to managing the different npm packages etc. This may change in the future as we plan to include also packages, libraries etc. written in other languages in this repo to make the power of AskUI available to non-typescript/-javascript developers as well.
This repo contains the AskUI SDK (ADK) written in TypeScript. Releases are done from the root repository. This may change in the future as we plan to include also packages, libraries etc. written in other languages in this repo to make the power of AskUI available to non-typescript/-javascript developers as well.

## Repository Structure

At root level we store the configuration for commit hooks, CI/CD and releasing a new version of the ADK.

Under `packages` you find the ADKs for different languages.

## Installation
Run an `npm install` inside the root directory.
Run an `npm install` inside the root directory to install the necessary dependencies for commit hooks and releasing a new version.

```sh
$ npm install
```

### TypeScript ADK
Run `npm install` inside `packages/askui-nodejs` to install the dependencies.

To build the TypeScript ADK run

```sh
npm run build
```

## Contributing

### Branching
Expand All @@ -29,10 +44,6 @@ Your branch name should conform to the format `<issue id>-<issue title lower-cas

Commit messages should conform to [Conventional Commits Message Standard](https://www.conventionalcommits.org/en/v1.0.0/). Exceptions to this rule may be merge commits.

### Adding Dependencies

The [one version rule](https://opensource.google/documentation/reference/thirdparty/oneversion#:~:text=There%20may%20only%20be%20one,several%20reasons%20for%20this%20restriction.) should be followed as much as possible. In practice, this mean checking if a dependency to be added is already used by another package or meant to be used by multiple packages. If not, install it inside the corresponding package's root directory, e.g., `./packages/askui-nodejs`. If it is shared, install it in the project's root directory and make sure that you only need to depend on this single version in all packages.

### Githooks

This monorepo uses [githooks](https://git-scm.com/docs/githooks) with [husky](https://github.com/typicode/husky) to lint and test the code, to help you stick to the commit message standard by opening up a cli for constructing the commit message on each commit, prepending the commit message with the issue number or linting the commit message etc. In some cases, e.g., when using a Git client such as [Git Tower](https://www.git-tower.com/) or [GitKraken](https://www.gitkraken.com/), cherry-picking, rebasing or in a ci pipeline, you may want to disable githooks, especially the interactive cli.
Expand Down
33 changes: 0 additions & 33 deletions examples/askui-nodejs-base-example/.eslintrc.cjs

This file was deleted.

4 changes: 0 additions & 4 deletions examples/askui-nodejs-base-example/.gitignore

This file was deleted.

61 changes: 0 additions & 61 deletions examples/askui-nodejs-base-example/Readme.md

This file was deleted.

23 changes: 0 additions & 23 deletions examples/askui-nodejs-base-example/package.json

This file was deleted.

23 changes: 0 additions & 23 deletions examples/askui-nodejs-base-example/test/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions examples/askui-nodejs-base-example/test/helper/jest.setup.ts

This file was deleted.

13 changes: 0 additions & 13 deletions examples/askui-nodejs-base-example/test/jest.config.ts

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions examples/askui-nodejs-base-example/tsconfig.json

This file was deleted.

8 changes: 8 additions & 0 deletions img/askui-logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions img/askui-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e02773e

Please sign in to comment.