From f84da0a027ca88c402769ada1760ab59c3d17f72 Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Sun, 29 Jan 2023 14:22:41 -0500 Subject: [PATCH 1/5] Use Conventional Commits for web-client-ui repo - Remove the label check GitHub action/script; we no longer require labels to be added - Remove `Create Release` action - the version bump/release creation process will be kicked off locally instead of by a GitHub action - Add GitHub action to enforce conventional commit PR titles - Update README and CONTRIBUTING guidelines to detail rules for creating a PR, and how to update release - Pin the version of ubuntu in all GitHub actions --- .github/scripts/label-check-one-of.sh | 22 - .github/workflows/cla.yml | 2 +- .github/workflows/conventional-pr-check.yml | 40 ++ .github/workflows/create-release.yml | 39 -- .github/workflows/label-check-ci.yml | 28 - .github/workflows/publish-alpha.yml | 2 +- .github/workflows/publish-nightly.yml | 4 +- .github/workflows/publish-packages.yml | 2 +- CONTRIBUTING.md | 21 +- README.md | 17 +- package-lock.json | 734 -------------------- package.json | 4 +- 12 files changed, 61 insertions(+), 854 deletions(-) delete mode 100755 .github/scripts/label-check-one-of.sh create mode 100644 .github/workflows/conventional-pr-check.yml delete mode 100644 .github/workflows/create-release.yml delete mode 100644 .github/workflows/label-check-ci.yml diff --git a/.github/scripts/label-check-one-of.sh b/.github/scripts/label-check-one-of.sh deleted file mode 100755 index a3577f9af8..0000000000 --- a/.github/scripts/label-check-one-of.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# Checks that exactly one of the provided arguments is true -# Iterates through all environment variables with the prefix LABEL_, expecting only one to be true - -set -o errexit -set -o pipefail -set -o nounset - -COUNT_TRUE=0 -ALL_LABELS="" - -for label in ${!LABEL_*}; do - ALL_LABELS+=", ${label#*_}" - if [ "${!label}" == "true" ] ; then - COUNT_TRUE=$((COUNT_TRUE + 1)) - fi -done - -if [ $COUNT_TRUE -ne 1 ] ; then - >&2 echo "Expected only one of the following labels, instead found ${COUNT_TRUE}: ${ALL_LABELS:2}" - exit 1 -fi \ No newline at end of file diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 25751bac6b..a3d92876a2 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -15,7 +15,7 @@ on: jobs: CLAssistant: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: ${{ github.repository_owner == 'deephaven' }} steps: - name: 'CLA Assistant' diff --git a/.github/workflows/conventional-pr-check.yml b/.github/workflows/conventional-pr-check.yml new file mode 100644 index 0000000000..3d255e899e --- /dev/null +++ b/.github/workflows/conventional-pr-check.yml @@ -0,0 +1,40 @@ +name: 'Conventional PR' + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-22.04 + steps: + - uses: amannn/action-semantic-pull-request@v5 + id: lint_pr_title + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: marocchino/sticky-pull-request-comment@v2 + # When the previous steps fails, the workflow would stop. By adding this + # condition you can continue the execution with the populated error message. + if: always() && (steps.lint_pr_title.outputs.error_message != null) + with: + header: pr-title-lint-error + message: | + Pull Request titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). + + Details: + + ``` + ${{ steps.lint_pr_title.outputs.error_message }} + ``` + + # Delete a previous comment when the issue has been resolved + - if: ${{ steps.lint_pr_title.outputs.error_message == null }} + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: pr-title-lint-error + delete: true diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml deleted file mode 100644 index bb163cb5d0..0000000000 --- a/.github/workflows/create-release.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Create Release -on: - workflow_dispatch: - inputs: - version: - description: 'Version number for this release (eg. v0.1.2)' - required: true -jobs: - create-release: - runs-on: ubuntu-latest - name: Create Release - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: '0' # This action defaults to only getting the latest commit. Setting to 0 makes it retrieve the full git commit history - - run: | - git config --global user.email "ci@deephaven.io" - git config --global user.name "GitHub CI" - - uses: actions/setup-node@v3 - with: - node-version: '18.x' - # Get the changelog and write it out to a file so it can be used by the create-release step later - - name: Get changelog - env: - GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }} - run: npx lerna-changelog --next-version=${{ github.event.inputs.version }} > /tmp/changelog.md - # lerna version will bump the version, tag it and push the branch - - name: Bump version - run: npx lerna version ${{ github.event.inputs.version }} --yes - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - # With a tag_name specified, it creates a release pointing to that commit - tag_name: ${{ github.event.inputs.version }} - release_name: ${{ github.event.inputs.version }} - body_path: /tmp/changelog.md diff --git a/.github/workflows/label-check-ci.yml b/.github/workflows/label-check-ci.yml deleted file mode 100644 index 27619cc835..0000000000 --- a/.github/workflows/label-check-ci.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Label Check CI - -on: - pull_request: - # The default pull_request trigger only happens on opened, synchronize, and reopened types. - # We are adding labeled and unlabeled here, so that changes to labels will cause this action to - # be re-run. - # - # Note: we need to rerun this action on new commits (synchronize events) even though it doesn't - # effect the labels because the merge requirements need checks to pass against the most recent - # commit. - types: [opened, synchronize, reopened, labeled, unlabeled] - branches: [main] - -jobs: - doc-labels: - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Check Documentation Labels - env: - LABEL_bug: ${{ contains(github.event.pull_request.labels.*.name, 'bug') }} - LABEL_enhancement: ${{ contains(github.event.pull_request.labels.*.name, 'enhancement') }} - LABEL_internal: ${{ contains(github.event.pull_request.labels.*.name, 'internal') }} - LABEL_documentation: ${{ contains(github.event.pull_request.labels.*.name, 'documentation') }} - run: .github/scripts/label-check-one-of.sh diff --git a/.github/workflows/publish-alpha.yml b/.github/workflows/publish-alpha.yml index f626173316..4255d7b5bd 100644 --- a/.github/workflows/publish-alpha.yml +++ b/.github/workflows/publish-alpha.yml @@ -12,7 +12,7 @@ on: default: '' jobs: publish-alpha: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: contents: read packages: write diff --git a/.github/workflows/publish-nightly.yml b/.github/workflows/publish-nightly.yml index 48b535446a..712f839bed 100644 --- a/.github/workflows/publish-nightly.yml +++ b/.github/workflows/publish-nightly.yml @@ -7,7 +7,7 @@ on: - cron: '0 6 * * *' jobs: check_date: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 name: Check latest commit outputs: should_run: ${{ steps.should_run.outputs.should_run }} @@ -24,7 +24,7 @@ jobs: publish-nightly: needs: check_date if: ${{ needs.check_date.outputs.should_run != 'false' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: contents: read packages: write diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 95731c7289..2d6208433d 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -5,7 +5,7 @@ on: types: [created] jobs: publish-packages: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 permissions: contents: read packages: write diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2b1f864fd..631dea9178 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,21 +37,22 @@ Over time, forks will get out of sync with the upstream repository. To stay up t ## Creating a Pull Request -1) Follow the GitHub instructions for [Creating a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). +1. Follow the GitHub instructions for [Creating a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request). - Use `deephaven/web-client-ui` as the base repository. - Use your own fork, `/web-client-ui` as the repository to push to. -2) Fill in the information in the Pull Request: +2. Fill in the information in the Pull Request: - If you know people who should be reviewers, add them as a reviewer - Add yourself as the Assignee - - Select one label depending on the change type: - - `bug`: Fixing a bug in an existing feature - - `enhancement`: Adding a new feature - - `internal`: Changes to the project config or build - - `documentation`: Documentation change only - - **Breaking Changes:** if your change breaks an existing API in such a way that users of the package affected will need to make some changes to migrate to the newer version, add the `breaking` label to the PR and include a section in the description saying `## Breaking Changes` and any migration instructions required. + - PR titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). + - The `type` provided must be one of [commitizen conventional commit types](https://github.com/commitizen/conventional-commit-types). + - The `scope` is not required. + - **BREAKING CHANGE:** if your change breaks an existing API in such a way that users of the package affected will need to make some changes to migrate to the newer version, add the `BREAKING CHANGE:` footer to the PR description, detailing the breakage and any migration instructions necessary, e.g.: + ``` + BREAKING CHANGE: The API now takes a new parameter that must be provided. + ``` + - **NOTE:** Do _not_ use the `!` notation for marking a breaking change - you must use the `BREAKING CHANGE:` footer and include details of the breakage/migration. - [Link the PR](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) with any associated issues -3) Submit the PR - +3. Submit the PR ## Deephaven Contributor License Agreement (CLA) diff --git a/README.md b/README.md index 06129a7b33..48e5208cad 100644 --- a/README.md +++ b/README.md @@ -75,19 +75,10 @@ If you encounter an issue specific to a browser, check that your browser is up t ## Releasing a New Version -When releasing a new version, you need to commit a version bump, then tag and create the release. By creating the release, the [publish-packages action](.github/workflows/publish-packages.yml) will be triggered, and will automatically publish the packages. Some of these steps below also make use of the [GitHub CLI](https://github.com/cli/cli) - -1. Bump the version: - - Run `npm run version-bump`. Select the type of version bump ([patch, minor, or major version](https://semver.org/)). Remember the version for the next steps, and fill it in instead of `` (should be in semver format with `v` prefix, e.g. `v0.7.1`). - - Commit your changes. `git commit --all --message="Version Bump "` - - Create a pull request. `gh pr create --fill --web` - - Approve the pull request and merge to `main`. -2. Generate the changelog: - - Generate a [GitHub Personal access token](https://github.com/settings/tokens) with the `public_repo` scope. Copy this token and replace `` with it below. - - Generate the changelog: `GITHUB_AUTH= npm run changelog --silent -- --next-version= > /tmp/changelog_.md` -3. Create the tag. Use the command line to create an annotated tag (lightweight tags will not work correctly with lerna-changelog): `git tag --annotate --file /tmp/changelog_.md` -4. Push the tag: `git push origin ` -5. Create the release: `gh release create --notes-file /tmp/changelog_.md --title ` +We use [lerna](https://github.com/lerna/lerna) and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) to automatically handle incrementing the version, generate the changelog, and create the release. + +1. Generate a [GitHub Personal access token](https://github.com/settings/tokens) with the `public_repo` scope. Copy this token and replace `` with it below. +2. Bump the version, update the changelog, and create a release: `GH_TOKEN= npm run version-bump` After the release is created, you can go to the [actions page](https://github.com/deephaven/web-client-ui/actions) to see the publish action being kicked off. diff --git a/package-lock.json b/package-lock.json index 826b146ec0..6444b49d5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -106,7 +106,6 @@ "karma-cli": "^2.0.0", "karma-jasmine": "~0.1.5", "lerna": "^5.1.0", - "lerna-changelog": "^2.2.0", "npm-run-all": "^4.1.5", "playwright": "^1.28.1", "prettier": "2.2.1", @@ -4800,29 +4799,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/@npmcli/fs": { - "version": "1.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" - } - }, - "node_modules/@npmcli/fs/node_modules/semver": { - "version": "7.3.5", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@npmcli/git": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.2.tgz", @@ -5144,29 +5120,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/@npmcli/move-file": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@npmcli/move-file/node_modules/mkdirp": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@npmcli/name-from-folder": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-1.0.1.tgz", @@ -5966,14 +5919,6 @@ "@testing-library/dom": ">=7.21.4" } }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, "node_modules/@trysound/sax": { "version": "0.2.0", "dev": true, @@ -7107,11 +7052,6 @@ "color-name": "1.1.3" } }, - "node_modules/any-promise": { - "version": "1.3.0", - "dev": true, - "license": "MIT" - }, "node_modules/anymatch": { "version": "3.1.2", "license": "ISC", @@ -8420,45 +8360,6 @@ "node": ">=10" } }, - "node_modules/cacache": { - "version": "15.3.0", - "dev": true, - "license": "ISC", - "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/cacache/node_modules/mkdirp": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/cached-path-relative": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", @@ -8820,79 +8721,6 @@ "node": ">=8" } }, - "node_modules/cli-highlight": { - "version": "2.1.11", - "dev": true, - "license": "ISC", - "dependencies": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "bin": { - "highlight": "bin/highlight" - }, - "engines": { - "node": ">=8.0.0", - "npm": ">=5.0.0" - } - }, - "node_modules/cli-highlight/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cli-highlight/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-highlight/node_modules/parse5": { - "version": "5.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-highlight/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/cli-spinners": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", @@ -13272,14 +13100,6 @@ "node": "*" } }, - "node_modules/highlight.js": { - "version": "10.7.3", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, "node_modules/history": { "version": "4.10.1", "license": "MIT", @@ -13390,19 +13210,6 @@ "node": ">=8.0.0" } }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", @@ -17186,119 +16993,6 @@ "node": "^14.15.0 || >=16.0.0" } }, - "node_modules/lerna-changelog": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.0.0", - "cli-highlight": "^2.1.11", - "execa": "^5.0.0", - "hosted-git-info": "^4.0.0", - "make-fetch-happen": "^9.0.0", - "p-map": "^3.0.0", - "progress": "^2.0.0", - "yargs": "^17.1.0" - }, - "bin": { - "lerna-changelog": "bin/cli.js" - }, - "engines": { - "node": "12.* || 14.* || >= 16" - } - }, - "node_modules/lerna-changelog/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/lerna-changelog/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/lerna-changelog/node_modules/has-flag": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/lerna-changelog/node_modules/p-map": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lerna-changelog/node_modules/supports-color": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lerna-changelog/node_modules/y18n": { - "version": "5.0.8", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/lerna-changelog/node_modules/yargs": { - "version": "17.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/lerna-changelog/node_modules/yargs-parser": { - "version": "21.0.1", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -17711,32 +17405,6 @@ "semver": "bin/semver" } }, - "node_modules/make-fetch-happen": { - "version": "9.1.0", - "dev": true, - "license": "ISC", - "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -18303,22 +17971,6 @@ "node": ">= 8" } }, - "node_modules/minipass-fetch": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "optionalDependencies": { - "encoding": "^0.1.12" - } - }, "node_modules/minipass-flush": { "version": "1.0.5", "dev": true, @@ -18571,16 +18223,6 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "node_modules/mz": { - "version": "2.7.0", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "node_modules/nanoid": { "version": "3.3.4", "license": "MIT", @@ -20833,19 +20475,6 @@ "parse-path": "^7.0.0" } }, - "node_modules/parse5": { - "version": "6.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, "node_modules/parseurl": { "version": "1.3.3", "dev": true, @@ -21359,14 +20988,6 @@ "version": "2.0.1", "license": "MIT" }, - "node_modules/progress": { - "version": "2.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/promise-all-reject-late": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", @@ -22971,19 +22592,6 @@ "npm": ">= 3.0.0" } }, - "node_modules/socks-proxy-agent": { - "version": "6.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/sort-keys": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-4.2.0.tgz", @@ -23233,17 +22841,6 @@ "version": "1.0.3", "license": "BSD-3-Clause" }, - "node_modules/ssri": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.1.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/stack-trace": { "version": "0.0.9", "engines": { @@ -24256,25 +23853,6 @@ "version": "0.2.0", "license": "MIT" }, - "node_modules/thenify": { - "version": "3.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/throat": { "version": "5.0.0", "dev": true, @@ -24767,22 +24345,6 @@ "node": ">=8" } }, - "node_modules/unique-filename": { - "version": "1.1.1", - "dev": true, - "license": "ISC", - "dependencies": { - "unique-slug": "^2.0.0" - } - }, - "node_modules/unique-slug": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4" - } - }, "node_modules/unist-builder": { "version": "2.0.3", "license": "MIT", @@ -30307,23 +29869,6 @@ } } }, - "@npmcli/fs": { - "version": "1.1.1", - "dev": true, - "requires": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, "@npmcli/git": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.2.tgz", @@ -30571,20 +30116,6 @@ } } }, - "@npmcli/move-file": { - "version": "1.1.2", - "dev": true, - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "dev": true - } - } - }, "@npmcli/name-from-folder": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-1.0.1.tgz", @@ -31120,10 +30651,6 @@ "dev": true, "requires": {} }, - "@tootallnate/once": { - "version": "1.1.2", - "dev": true - }, "@trysound/sax": { "version": "0.2.0", "dev": true @@ -31987,10 +31514,6 @@ } } }, - "any-promise": { - "version": "1.3.0", - "dev": true - }, "anymatch": { "version": "3.1.2", "requires": { @@ -33019,36 +32542,6 @@ "integrity": "sha512-crQdqyCwhokxwV1UyDzLZanhkugAgft7vt0qbbdt60C6Zf3CAiGmtUCylbtYwrU6loOUw3euGrNtW1J651ot1A==", "dev": true }, - "cacache": { - "version": "15.3.0", - "dev": true, - "requires": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "dev": true - } - } - }, "cached-path-relative": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", @@ -33282,50 +32775,6 @@ "restore-cursor": "^3.1.0" } }, - "cli-highlight": { - "version": "2.1.11", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "has-flag": { - "version": "4.0.0", - "dev": true - }, - "parse5": { - "version": "5.1.1", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "cli-spinners": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", @@ -36501,10 +35950,6 @@ "integrity": "sha512-zpImx2GoKXy42fVDSEad2BPKuSQdLcqsCYa48K3zHSzM/ugWuYjLDr8IXxpVuL7uCLHw56eaiLxCRthhOzf5ug==", "dev": true }, - "highlight.js": { - "version": "10.7.3", - "dev": true - }, "history": { "version": "4.10.1", "requires": { @@ -36589,15 +36034,6 @@ "requires-port": "^1.0.0" } }, - "http-proxy-agent": { - "version": "4.0.1", - "dev": true, - "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - } - }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", @@ -39149,76 +38585,6 @@ "typescript": "^3 || ^4" } }, - "lerna-changelog": { - "version": "2.2.0", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "cli-highlight": "^2.1.11", - "execa": "^5.0.0", - "hosted-git-info": "^4.0.0", - "make-fetch-happen": "^9.0.0", - "p-map": "^3.0.0", - "progress": "^2.0.0", - "yargs": "^17.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "has-flag": { - "version": "4.0.0", - "dev": true - }, - "p-map": { - "version": "3.0.0", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "dev": true - }, - "yargs": { - "version": "17.3.1", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - } - }, - "yargs-parser": { - "version": "21.0.1", - "dev": true - } - } - }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -39521,28 +38887,6 @@ } } }, - "make-fetch-happen": { - "version": "9.1.0", - "dev": true, - "requires": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - } - }, "makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -39915,16 +39259,6 @@ "minipass": "^3.0.0" } }, - "minipass-fetch": { - "version": "1.4.1", - "dev": true, - "requires": { - "encoding": "^0.1.12", - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - } - }, "minipass-flush": { "version": "1.0.5", "dev": true, @@ -40126,15 +39460,6 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "mz": { - "version": "2.7.0", - "dev": true, - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, "nanoid": { "version": "3.3.4" }, @@ -41783,17 +41108,6 @@ "parse-path": "^7.0.0" } }, - "parse5": { - "version": "6.0.1", - "dev": true - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "dev": true, - "requires": { - "parse5": "^6.0.1" - } - }, "parseurl": { "version": "1.3.3", "dev": true @@ -42159,10 +41473,6 @@ "process-nextick-args": { "version": "2.0.1" }, - "progress": { - "version": "2.0.3", - "dev": true - }, "promise-all-reject-late": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", @@ -43288,15 +42598,6 @@ "smart-buffer": "^4.2.0" } }, - "socks-proxy-agent": { - "version": "6.1.1", - "dev": true, - "requires": { - "agent-base": "^6.0.2", - "debug": "^4.3.1", - "socks": "^2.6.1" - } - }, "sort-keys": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-4.2.0.tgz", @@ -43471,13 +42772,6 @@ "sprintf-js": { "version": "1.0.3" }, - "ssri": { - "version": "8.0.1", - "dev": true, - "requires": { - "minipass": "^3.1.1" - } - }, "stack-trace": { "version": "0.0.9" }, @@ -44199,20 +43493,6 @@ "text-table": { "version": "0.2.0" }, - "thenify": { - "version": "3.3.1", - "dev": true, - "requires": { - "any-promise": "^1.0.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "dev": true, - "requires": { - "thenify": ">= 3.1.0 < 4" - } - }, "throat": { "version": "5.0.0", "dev": true @@ -44556,20 +43836,6 @@ } } }, - "unique-filename": { - "version": "1.1.1", - "dev": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4" - } - }, "unist-builder": { "version": "2.0.3" }, diff --git a/package.json b/package.json index a0b49c759b..958cbe94c8 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,7 @@ "e2e:codegen": "playwright codegen http://localhost:4000", "e2e:headed": "playwright test --project=chromium --headed --debug", "e2e:update-snapshots": "playwright test --update-snapshots", - "version-bump": "lerna version --no-git-tag-version --no-push && npm install --package-lock-only", - "changelog": "lerna-changelog" + "version-bump": "lerna version --conventional-commits --create-release github" }, "repository": "https://github.com/deephaven/web-client-ui", "devDependencies": { @@ -118,7 +117,6 @@ "karma-cli": "^2.0.0", "karma-jasmine": "~0.1.5", "lerna": "^5.1.0", - "lerna-changelog": "^2.2.0", "npm-run-all": "^4.1.5", "playwright": "^1.28.1", "prettier": "2.2.1", From bdc77d57b663000604697d752a88c5b6ce78b92b Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Sun, 29 Jan 2023 14:53:58 -0500 Subject: [PATCH 2/5] docs: Update the README for this kind of thing --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48e5208cad..17443fc00a 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,12 @@ If you encounter an issue specific to a browser, check that your browser is up t We use [lerna](https://github.com/lerna/lerna) and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) to automatically handle incrementing the version, generate the changelog, and create the release. -1. Generate a [GitHub Personal access token](https://github.com/settings/tokens) with the `public_repo` scope. Copy this token and replace `` with it below. +1. Generate a [GitHub Personal access token](https://github.com/settings/tokens): + +- Under `Repository Access`, select `Only select repositories` and add `deephaven/web-client-ui`. +- Under `Repository Permissions`, set `Access: Read and write` for `Contents`. This will be necessary to push your version bump and create the release. +- Copy the token created and replace `` with it in the next step. + 2. Bump the version, update the changelog, and create a release: `GH_TOKEN= npm run version-bump` After the release is created, you can go to the [actions page](https://github.com/deephaven/web-client-ui/actions) to see the publish action being kicked off. From 6f938c52735640e394c0c06e3efe3fce63a7fbde Mon Sep 17 00:00:00 2001 From: mikebender Date: Mon, 30 Jan 2023 16:04:35 -0500 Subject: [PATCH 3/5] Update name of GitHub action - Should match the old doc-labels name so we don't need to change infra --- .github/workflows/conventional-pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-pr-check.yml b/.github/workflows/conventional-pr-check.yml index 3d255e899e..67b2531e2d 100644 --- a/.github/workflows/conventional-pr-check.yml +++ b/.github/workflows/conventional-pr-check.yml @@ -8,7 +8,7 @@ on: - synchronize jobs: - main: + doc-labels: name: Validate PR title runs-on: ubuntu-22.04 steps: From 0782275bd384fad537432a869a1d34b98a7d9e56 Mon Sep 17 00:00:00 2001 From: mikebender Date: Tue, 31 Jan 2023 10:43:03 -0500 Subject: [PATCH 4/5] List types in CONTRIBUTING - Makes it easier to consume rather than having to read the provided link --- CONTRIBUTING.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 631dea9178..4f420c6589 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,18 @@ Over time, forks will get out of sync with the upstream repository. To stay up t - If you know people who should be reviewers, add them as a reviewer - Add yourself as the Assignee - PR titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). - - The `type` provided must be one of [commitizen conventional commit types](https://github.com/commitizen/conventional-commit-types). + - The `type` provided must be one of [commitizen conventional commit types](https://github.com/commitizen/conventional-commit-types): + - **feat**: A new feature + - **fix**: A bug fix + - **docs**: Documentation only changes + - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) + - **refactor**: A code change that neither fixes a bug nor adds a feature + - **perf**: A code change that improves performance + - **test**: Adding missing tests or correcting existing tests + - **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) + - **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) + - **chore**: Other changes that don't modify src or test files + - **revert**: Reverts a previous commit - The `scope` is not required. - **BREAKING CHANGE:** if your change breaks an existing API in such a way that users of the package affected will need to make some changes to migrate to the newer version, add the `BREAKING CHANGE:` footer to the PR description, detailing the breakage and any migration instructions necessary, e.g.: ``` From 893a246b58057850bad24e43802c6ea762d59767 Mon Sep 17 00:00:00 2001 From: mikebender Date: Tue, 31 Jan 2023 10:44:07 -0500 Subject: [PATCH 5/5] Rename action to `pr-check` - More accurate name - Will update required checks after merge --- .github/workflows/conventional-pr-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-pr-check.yml b/.github/workflows/conventional-pr-check.yml index 67b2531e2d..b6240531e5 100644 --- a/.github/workflows/conventional-pr-check.yml +++ b/.github/workflows/conventional-pr-check.yml @@ -8,7 +8,7 @@ on: - synchronize jobs: - doc-labels: + pr-check: name: Validate PR title runs-on: ubuntu-22.04 steps: