From 2694579b745da9004c754a8012e3a9b1686d083d Mon Sep 17 00:00:00 2001 From: Ayoub Date: Thu, 10 Oct 2024 15:05:05 +0100 Subject: [PATCH 1/6] Update release pipeline and added changeset support --- .changeset/README.md | 8 + .changeset/config.json | 11 + .github/actions/nodejs-ci/action.yaml | 24 + .github/actions/setup-tools/action.yaml | 20 + .github/workflows/codecov.yaml | 20 +- .github/workflows/conventional-commits.yaml | 4 +- .github/workflows/lint.yaml | 16 +- .github/workflows/pre-release.yaml | 45 + .github/workflows/publish-bytecode.yaml | 61 - .github/workflows/publish-to-npm.yaml | 43 - .github/workflows/release-dry-run.yaml | 34 - .github/workflows/release-snapshot.yaml | 34 + .github/workflows/release.yaml | 188 +-- .github/workflows/slither.yaml | 10 +- .github/workflows/test.yaml | 12 +- package-lock.json | 1204 ++++++++++++++++++- package.json | 5 +- 17 files changed, 1450 insertions(+), 289 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json create mode 100644 .github/actions/nodejs-ci/action.yaml create mode 100644 .github/actions/setup-tools/action.yaml create mode 100644 .github/workflows/pre-release.yaml delete mode 100644 .github/workflows/publish-bytecode.yaml delete mode 100644 .github/workflows/publish-to-npm.yaml delete mode 100644 .github/workflows/release-dry-run.yaml create mode 100644 .github/workflows/release-snapshot.yaml diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..e5b6d8d6 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..edef2ebc --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/actions/nodejs-ci/action.yaml b/.github/actions/nodejs-ci/action.yaml new file mode 100644 index 00000000..06bad153 --- /dev/null +++ b/.github/actions/nodejs-ci/action.yaml @@ -0,0 +1,24 @@ +name: Install node.js dependencues +description: 'Setup node.js and install dependencies' + +inputs: + node-version: + description: 'The version of node.js CLI to install' + required: true + default: '18' + +runs: + using: 'composite' + + steps: + - name: Setup Node + # TODO: consider while migrating the `setup-node` action later the usage of `blacksmith` actions + uses: useblacksmith/setup-node@v5 + with: + node-version: '${{ inputs.node-version }}' + cache: 'npm' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + shell: bash + run: npm ci diff --git a/.github/actions/setup-tools/action.yaml b/.github/actions/setup-tools/action.yaml new file mode 100644 index 00000000..fbab2f4d --- /dev/null +++ b/.github/actions/setup-tools/action.yaml @@ -0,0 +1,20 @@ +name: Setup tools +description: 'Setup tools for repo workflows' + +inputs: + install-nodejs: + description: "Install nodejs and setup repo's npm package" + required: false + default: 'false' + +runs: + using: 'composite' + steps: + # This Action bundles other reusable actions in case needed. + + # Install Node.js and its dependencies + - name: Setup node.js and install dependencies + if: inputs.install-nodejs == 'true' + uses: ./.github/actions/nodejs-ci + with: + node-version: '18' # Version is hardcoded across all other steps to ensure stability of the code, although the `package.json` has `>=18` engine version diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml index e3c5651b..75cbd67d 100644 --- a/.github/workflows/codecov.yaml +++ b/.github/workflows/codecov.yaml @@ -1,11 +1,7 @@ -name: Coverage +name: Code Coverage on: pull_request: - push: - branches: - - main - - releases/** concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -16,17 +12,15 @@ jobs: runs-on: blacksmith-2vcpu-ubuntu-2204 steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Install Node.js - uses: useblacksmith/setup-node@v5 + - name: Setup tools + uses: ./.github/actions/setup-tools with: - node-version: 18.x - cache: 'npm' - - - name: Install Dependencies - run: npm ci + install-nodejs: 'true' + # Step to do builds and check for warnings - name: Build run: npm run build > build.log 2>&1 diff --git a/.github/workflows/conventional-commits.yaml b/.github/workflows/conventional-commits.yaml index c26f9950..c884644f 100644 --- a/.github/workflows/conventional-commits.yaml +++ b/.github/workflows/conventional-commits.yaml @@ -9,11 +9,11 @@ concurrency: jobs: ensure-CC: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2204 steps: - name: semantic-pull-request - uses: amannn/action-semantic-pull-request@v3.2.6 + uses: amannn/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index e7e521e3..0b0163e3 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,7 +1,7 @@ name: Linting on: - - pull_request + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -12,16 +12,14 @@ jobs: runs-on: blacksmith-2vcpu-ubuntu-2204 steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: Install Node.js - uses: useblacksmith/setup-node@v5 + # Install Node.js and its dependencies + - name: Setup tools + uses: ./.github/actions/setup-tools with: - node-version: 18.x - cache: 'npm' - - - name: Install Dependencies - run: npm ci + install-nodejs: 'true' - name: Lint run: npm run lint diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml new file mode 100644 index 00000000..77b48d42 --- /dev/null +++ b/.github/workflows/pre-release.yaml @@ -0,0 +1,45 @@ +# This workflow concerns the preparation of the `changeset` PR and keeping it updated by tracking the changes on `main` branch. +name: Pre-Release Preparation + +on: + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + pre-release: + name: Pre-Release Preparation + runs-on: blacksmith-2vcpu-ubuntu-2204 + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Check for changeset files and 'pre-release' label exist + id: check-conditions + run: | + if ls .changeset/*.md | grep '\.changeset\/[a-z-]\+\.md$'; then + echo "has_changeset=true" >> "$GITHUB_OUTPUT" + else + echo "has_changeset=false" >> "$GITHUB_OUTPUT" + fi + + # Install Node.js and its dependencies + # Needed for the changeset releases + - name: Setup tools + uses: ./.github/actions/setup-tools + with: + install-nodejs: 'true' + + # Keep the version of the PRs up-to-date + - name: Create Release Pull Request + id: release-pr + if: ${{ steps.check-conditions.outputs.has_changeset == 'true' }} + uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 #v1.4.7 + with: + branch: 'main' + title: 'chore(release): bump version and update changelog' + commit: 'chore(release): bump version and update changelog' + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/publish-bytecode.yaml b/.github/workflows/publish-bytecode.yaml deleted file mode 100644 index 68b17a28..00000000 --- a/.github/workflows/publish-bytecode.yaml +++ /dev/null @@ -1,61 +0,0 @@ -name: 'Publish Bytecode' - -on: - release: - types: [published] - workflow_dispatch: - inputs: - TAG: - description: 'Release Tag' - required: true - -jobs: - publish-bytecode: - strategy: - matrix: - node-version: - - 18.x - os: - - ubuntu-latest - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.TAG || github.ref }} - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install Dependencies - run: npm ci - - - name: Build - run: npm run build - - - name: Flatten contracts - run: npm run flatten - - - name: Clean artifacts - run: npm run clean:artifacts - - - name: Get release tag - run: | - TAG=${{ github.event.inputs.TAG || github.ref }} - echo "release_tag=${TAG#refs/tags/}" >> "$GITHUB_ENV" - - - name: Create zip file - working-directory: ./artifacts - run: | - zip -r Bytecode-${{ env.release_tag }}.zip * - - - name: Upload Bytecode to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./artifacts/Bytecode-${{ env.release_tag }}.zip - tag: ${{ env.release_tag }} - overwrite: true diff --git a/.github/workflows/publish-to-npm.yaml b/.github/workflows/publish-to-npm.yaml deleted file mode 100644 index d9fcd6d7..00000000 --- a/.github/workflows/publish-to-npm.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: 'Publish to npm' - -on: - release: - types: [published] - workflow_dispatch: - inputs: - TAG: - description: 'Release Tag' - required: true - -jobs: - publish-to-npm: - name: 'Publish to NPM' - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.TAG || github.ref }} - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - - - name: Install deps - run: npm ci - - - name: Build - run: npm run build - - - name: Codegen typed contract ABIs - run: npm run build:ts - - - name: Clean artifacts - run: npm run clean:artifacts - - - name: Publish - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-dry-run.yaml b/.github/workflows/release-dry-run.yaml deleted file mode 100644 index 8902670f..00000000 --- a/.github/workflows/release-dry-run.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release (Dry Run) - -on: - workflow_dispatch: - inputs: - bumpType: - description: Semver bump type to use ("major"/"minor"/"patch") - required: true - default: patch - -jobs: - release: - strategy: - matrix: - os: - - ubuntu-latest - runs-on: ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: '0' - submodules: recursive - - - id: release - uses: anothrNick/github-tag-action@1.39.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEFAULT_BUMP: ${{ github.event.inputs.bumpType }} - TAG_CONTEXT: branch - RELEASE_BRANCHES: main,releases.* - WITH_V: true - DRY_RUN: true - VERBOSE: true diff --git a/.github/workflows/release-snapshot.yaml b/.github/workflows/release-snapshot.yaml new file mode 100644 index 00000000..9e083b6a --- /dev/null +++ b/.github/workflows/release-snapshot.yaml @@ -0,0 +1,34 @@ +# This workflow publishes snapshot releases as an npm package. These releases aren't supposed to be reusable in `production` environments. +# It's triggered manually in case a snapshot release would be needed for testing purposes. +name: Release Snapshot + +on: + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release-snapshot: + name: Release Snapshot + runs-on: blacksmith-2vcpu-ubuntu-2204 + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Setup tools + uses: ./.github/actions/setup-tools + with: + install-nodejs: 'true' + + - name: Build the modules + run: npm run build && npm run build:ts && npm run flatten && npm run clean:artifacts + + - name: Set Snapshot Version + run: | + npm version 0.0.0-snapshot.$(git rev-parse --short HEAD) --git-tag-version=false + + - name: Publish Snapshot to NPM + run: | + npm publish --no-git-checks --tag snapshot --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d5657db5..4456683e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,83 +1,131 @@ +# This workflow creates a github release using changeset, and publishes it as an npm package. +# It's triggered once a release PR (created by the pre-release workflow) gets merged to the `main` branch. name: Release - on: - workflow_dispatch: - inputs: - bumpType: - description: Semver bump type to use ("major"/"minor"/"patch") - required: true - default: patch + # Once the PR gets merged to `main` + pull_request: + branches: + - main + types: [closed] + +concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: + # Enable release process either with workflow dispatch or the automated PR process release: - strategy: - matrix: - os: - - ubuntu-latest - runs-on: ${{ matrix.os }} + name: Release + if: | + ((github.event.pull_request.merged == true) && + startsWith(github.event.pull_request.title, 'chore(release)')) + runs-on: blacksmith-2vcpu-ubuntu-2204 steps: - - name: Checkout code + - name: Checkout Repo uses: actions/checkout@v4 with: - fetch-depth: '0' - submodules: recursive - - - id: release - uses: anothrNick/github-tag-action@1.39.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEFAULT_BUMP: ${{ github.event.inputs.bumpType }} - TAG_CONTEXT: branch - RELEASE_BRANCHES: main,releases.* - WITH_V: true - DRY_RUN: true - - - id: parsed-release - uses: booxmedialtd/ws-action-parse-semver@v1 + persist-credentials: false + - name: Setup tools + uses: ./.github/actions/setup-tools + with: + install-nodejs: 'true' + # Publishes a release in case the release isn't published + - name: Publish release + id: publish-release + uses: changesets/action@v1 with: - input_string: ${{ steps.release.outputs.tag }} + publish: npm run release + createGithubReleases: true + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + # Prepare the variables that will be used across the different next steps + - name: Prepare cross-steps variables + run: | + export PACKAGE_NAME=$(jq -r '.name' 'package.json'); + export PUBLISHED_PACKAGE_VERSION=v$(echo '${{ steps.publish-release.outputs.publishedPackages }}' | jq -r ".[] | select(.name == \"${PACKAGE_NAME}\") | .version") + export BASE_ARTIFACTS_SEARCH_DIR="./artifacts" + export ARTIFACT_VERSIONED_PACKAGE_NAME="interchain-token-service-assets-${PUBLISHED_PACKAGE_VERSION}" + export BASE_ARTIFACTS_VERSIONED_DIR="$(dirname ${BASE_ARTIFACTS_SEARCH_DIR})/${ARTIFACT_VERSIONED_PACKAGE_NAME}" # Regardless of the dir type, relative or absolute + + # ex: @axelarnetwork/interchain-token-service + echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_ENV + + # ex: v2.1.0 + echo "PUBLISHED_PACKAGE_VERSION=${PUBLISHED_PACKAGE_VERSION}" >> $GITHUB_ENV + + # ex: ./artifacts + echo "BASE_ARTIFACTS_SEARCH_DIR=${BASE_ARTIFACTS_SEARCH_DIR}" >> $GITHUB_ENV + + # ex: interchain-token-service-assets-v2.1.0 + echo "ARTIFACT_VERSIONED_PACKAGE_NAME=${ARTIFACT_VERSIONED_PACKAGE_NAME}" >> $GITHUB_ENV + + # ex: ./interchain-token-service-assets-v2.1.0 + echo "BASE_ARTIFACTS_VERSIONED_DIR=${BASE_ARTIFACTS_VERSIONED_DIR}" >> $GITHUB_ENV - - name: Generate release + # Create `zip` and `tar` archive files for contracts ABIs + - name: Create `zip` and `tar` archive files for contracts ABIs run: | - new_release_branch="" - - if [ "${{ github.ref }}" = "refs/heads/main" ]; then - if [ "${{ github.event.inputs.bumpType }}" = "major" ]; then - let new_major=${{ steps.parsed-release.outputs.major }}+1 - new_release_branch="releases/$new_major.0.x" - elif [ "${{ github.event.inputs.bumpType }}" = "minor" ]; then - let new_minor=${{ steps.parsed-release.outputs.minor }}+1 - new_release_branch="releases/${{ steps.parsed-release.outputs.major }}.$new_minor.x" - else - echo "cannot make patch release from main branch" - exit 1 - fi - elif [[ "${{ github.ref }}" = refs/heads/releases/* ]]; then - if [ "${{ github.event.inputs.bumpType }}" != "patch" ]; then - echo "cannot make major/minor release from release branch" - exit 1 - fi - else - echo "can only release from main or releases/* branches" - exit 1 - fi - - git config --global user.email "cicd@axelar.network" - git config --global user.name "axelar-cicd-bot" - - git commit --allow-empty -m "${{ steps.release.outputs.new_tag }}" - git push - - if [ -n "$new_release_branch" ]; then - git checkout -b $new_release_branch - git push -u origin $new_release_branch - fi - - - name: Bump version and push tag - uses: anothrNick/github-tag-action@1.39.0 + # Renaming to keep the dir structure in the archive matching the release version defined in `BASE_ARTIFACTS_VERSIONED_DIR` + mv ${{ env.BASE_ARTIFACTS_SEARCH_DIR }} ${{ env.BASE_ARTIFACTS_VERSIONED_DIR }} + + find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json" ! -name "*.dbg.json" -print | zip ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip -@ + find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json" ! -name "*.dbg.json" -print | tar -czvf ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz -T - + + # Generate SHA-256 Checksums + for file in ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip; do + sha256sum "$file" > "$file.sha256" + done + + # Publishing contracts ABIs to `R2` + - name: Configure CF credentials + run: | + cd $HOME; mkdir ~/.aws; touch ~/.aws/credentials; touch ~/.aws/config + echo "[default] + aws_access_key_id = ${{ secrets.CF_BUCKET_ACCESS_KEY_ID }} + aws_secret_access_key = ${{ secrets.CF_BUCKET_SECRET_ACCESS_KEY }}" > ~/.aws/credentials + echo "[default] + region=auto + output=json" > ~/.aws/config + + - name: Publish files to CF R2 + env: + S3_BUCKET_NAME: ${{ vars.CF_BUCKET_NAME }} + ENDPOINT_URL: ${{ secrets.CF_ENDPOINT_URL }} + CF_BUCKET_ROOT_KEY: ${{ vars.CF_BUCKET_ROOT_KEY }} + run: | + export CF_CONTRACTS_BUCKET_ROOT_KEY="${CF_BUCKET_ROOT_KEY}/${{ env.PUBLISHED_PACKAGE_VERSION }}" + export JSON_FILES=$(find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json" ! -name "*.dbg.json") + + for json_file in "${JSON_FILES}"; do + + echo "Uploading configs: ${json_file}" + + for file in ${json_file}; do + if [[ -f "$file" ]]; then + FILE_KEY=$(echo $file | sed "s|^${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/||") + echo "Uploading config: $CF_CONTRACTS_BUCKET_ROOT_KEY/$FILE_KEY" + aws s3api put-object --bucket $S3_BUCKET_NAME --key "$CF_CONTRACTS_BUCKET_ROOT_KEY/$FILE_KEY" --body "$file" --acl public-read --endpoint-url $ENDPOINT_URL + fi + done + done + + # Upload the created archives to R2 + export CF_ARCHIVES_BUCKET_ROOT_KEY="${CF_BUCKET_ROOT_KEY}/${{ env.PUBLISHED_PACKAGE_VERSION }}/archives" + for file in ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip; do + aws s3api put-object --bucket $S3_BUCKET_NAME --key "$CF_ARCHIVES_BUCKET_ROOT_KEY/$file" --body "$file" --acl public-read --endpoint-url $ENDPOINT_URL + aws s3api put-object --bucket $S3_BUCKET_NAME --key "$CF_ARCHIVES_BUCKET_ROOT_KEY/$file.sha256" --body "$file.sha256" --acl public-read --endpoint-url $ENDPOINT_URL + done + + # Update the existing release and upload the zip and tar archives to the specific tag + - name: Create and Upload Release + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 + with: + tag_name: ${{ env.PUBLISHED_PACKAGE_VERSION }} # This uses the tag from the push + files: | + ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz + ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz.sha256 + ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip + ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip.sha256 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEFAULT_BUMP: ${{ github.event.inputs.bumpType }} - TAG_CONTEXT: branch - RELEASE_BRANCHES: main,releases.* - WITH_V: true diff --git a/.github/workflows/slither.yaml b/.github/workflows/slither.yaml index e018c1d7..846dfde9 100644 --- a/.github/workflows/slither.yaml +++ b/.github/workflows/slither.yaml @@ -14,14 +14,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Node.js - uses: useblacksmith/setup-node@v5 + - name: Setup tools + uses: ./.github/actions/setup-tools with: - node-version: 18.x - cache: 'npm' - - - name: Install Dependencies - run: npm ci + install-nodejs: 'true' - name: Run Slither uses: crytic/slither-action@v0.3.1 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 276e0d04..ab626fa7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,7 +1,7 @@ name: Testing on: - - pull_request + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -14,14 +14,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Node.js - uses: useblacksmith/setup-node@v5 + - name: Setup tools + uses: ./.github/actions/setup-tools with: - node-version: 18.x - cache: 'npm' - - - name: Install Dependencies - run: npm ci + install-nodejs: 'true' - name: Build project and capture output run: npm run build > build.log 2>&1 diff --git a/package-lock.json b/package-lock.json index 4d175e75..291e19a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "devDependencies": { "@axelar-network/axelar-chains-config": "^1.2.0", "@axelarjs/evm": "^0.2.1", + "@changesets/cli": "^2.27.9", "@nomicfoundation/hardhat-toolbox": "^2.0.2", "@tsconfig/strictest": "^2.0.2", "chai": "^4.3.7", @@ -155,6 +156,624 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/runtime": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", + "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@changesets/apply-release-plan": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.5.tgz", + "integrity": "sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/config": "^3.0.3", + "@changesets/get-version-range-type": "^0.4.0", + "@changesets/git": "^3.0.1", + "@changesets/should-skip-package": "^0.1.1", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "detect-indent": "^6.0.0", + "fs-extra": "^7.0.1", + "lodash.startcase": "^4.4.0", + "outdent": "^0.5.0", + "prettier": "^2.7.1", + "resolve-from": "^5.0.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/apply-release-plan/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/apply-release-plan/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/apply-release-plan/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@changesets/apply-release-plan/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@changesets/apply-release-plan/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@changesets/assemble-release-plan": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-6.0.4.tgz", + "integrity": "sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/should-skip-package": "^0.1.1", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/assemble-release-plan/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@changesets/changelog-git": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/changelog-git/-/changelog-git-0.2.0.tgz", + "integrity": "sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0" + } + }, + "node_modules/@changesets/cli": { + "version": "2.27.9", + "resolved": "https://registry.npmjs.org/@changesets/cli/-/cli-2.27.9.tgz", + "integrity": "sha512-q42a/ZbDnxPpCb5Wkm6tMVIxgeI9C/bexntzTeCFBrQEdpisQqk8kCHllYZMDjYtEc1ZzumbMJAG8H0Z4rdvjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/apply-release-plan": "^7.0.5", + "@changesets/assemble-release-plan": "^6.0.4", + "@changesets/changelog-git": "^0.2.0", + "@changesets/config": "^3.0.3", + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/get-release-plan": "^4.0.4", + "@changesets/git": "^3.0.1", + "@changesets/logger": "^0.1.1", + "@changesets/pre": "^2.0.1", + "@changesets/read": "^0.6.1", + "@changesets/should-skip-package": "^0.1.1", + "@changesets/types": "^6.0.0", + "@changesets/write": "^0.3.2", + "@manypkg/get-packages": "^1.1.3", + "ansi-colors": "^4.1.3", + "ci-info": "^3.7.0", + "enquirer": "^2.3.0", + "external-editor": "^3.1.0", + "fs-extra": "^7.0.1", + "mri": "^1.2.0", + "p-limit": "^2.2.0", + "package-manager-detector": "^0.2.0", + "picocolors": "^1.1.0", + "resolve-from": "^5.0.0", + "semver": "^7.5.3", + "spawndamnit": "^2.0.0", + "term-size": "^2.1.0" + }, + "bin": { + "changeset": "bin.js" + } + }, + "node_modules/@changesets/cli/node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@changesets/cli/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/cli/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/cli/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@changesets/cli/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/@changesets/cli/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@changesets/cli/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@changesets/cli/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@changesets/config": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@changesets/config/-/config-3.0.3.tgz", + "integrity": "sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/get-dependents-graph": "^2.1.2", + "@changesets/logger": "^0.1.1", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1", + "micromatch": "^4.0.2" + } + }, + "node_modules/@changesets/config/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/config/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/config/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@changesets/errors": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@changesets/errors/-/errors-0.2.0.tgz", + "integrity": "sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==", + "dev": true, + "license": "MIT", + "dependencies": { + "extendable-error": "^0.1.5" + } + }, + "node_modules/@changesets/get-dependents-graph": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-2.1.2.tgz", + "integrity": "sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "picocolors": "^1.1.0", + "semver": "^7.5.3" + } + }, + "node_modules/@changesets/get-dependents-graph/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@changesets/get-release-plan": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-4.0.4.tgz", + "integrity": "sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/assemble-release-plan": "^6.0.4", + "@changesets/config": "^3.0.3", + "@changesets/pre": "^2.0.1", + "@changesets/read": "^0.6.1", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/get-version-range-type": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.4.0.tgz", + "integrity": "sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/git": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@changesets/git/-/git-3.0.1.tgz", + "integrity": "sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@manypkg/get-packages": "^1.1.3", + "is-subdir": "^1.1.1", + "micromatch": "^4.0.2", + "spawndamnit": "^2.0.0" + } + }, + "node_modules/@changesets/logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/logger/-/logger-0.1.1.tgz", + "integrity": "sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/parse": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@changesets/parse/-/parse-0.4.0.tgz", + "integrity": "sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0", + "js-yaml": "^3.13.1" + } + }, + "node_modules/@changesets/parse/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@changesets/parse/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@changesets/parse/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@changesets/pre": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.1.tgz", + "integrity": "sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/errors": "^0.2.0", + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3", + "fs-extra": "^7.0.1" + } + }, + "node_modules/@changesets/pre/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/pre/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/pre/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@changesets/read": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@changesets/read/-/read-0.6.1.tgz", + "integrity": "sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/git": "^3.0.1", + "@changesets/logger": "^0.1.1", + "@changesets/parse": "^0.4.0", + "@changesets/types": "^6.0.0", + "fs-extra": "^7.0.1", + "p-filter": "^2.1.0", + "picocolors": "^1.1.0" + } + }, + "node_modules/@changesets/read/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/read/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/read/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@changesets/should-skip-package": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@changesets/should-skip-package/-/should-skip-package-0.1.1.tgz", + "integrity": "sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0", + "@manypkg/get-packages": "^1.1.3" + } + }, + "node_modules/@changesets/types": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-6.0.0.tgz", + "integrity": "sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@changesets/write": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@changesets/write/-/write-0.3.2.tgz", + "integrity": "sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@changesets/types": "^6.0.0", + "fs-extra": "^7.0.1", + "human-id": "^1.0.2", + "prettier": "^2.7.1" + } + }, + "node_modules/@changesets/write/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@changesets/write/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@changesets/write/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -1360,54 +1979,253 @@ "minimatch": "^3.0.5" }, "engines": { - "node": ">=10.10.0" + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "dev": true + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "peer": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@manypkg/find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@types/node": "^12.7.1", + "find-up": "^4.1.0", + "fs-extra": "^8.1.0" + } + }, + "node_modules/@manypkg/find-root/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/find-root/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@manypkg/find-root/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@manypkg/find-root/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@manypkg/find-root/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/@manypkg/find-root/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@manypkg/get-packages": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.3.tgz", + "integrity": "sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.5.5", + "@changesets/types": "^4.0.1", + "@manypkg/find-root": "^1.1.0", + "fs-extra": "^8.1.0", + "globby": "^11.0.0", + "read-yaml-file": "^1.1.0" + } + }, + "node_modules/@manypkg/get-packages/node_modules/@changesets/types": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@changesets/types/-/types-4.1.0.tgz", + "integrity": "sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@manypkg/get-packages/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" } }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "node_modules/@manypkg/get-packages/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, "engines": { - "node": ">=12.22" + "node": ">=10" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", - "dev": true - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "node_modules/@manypkg/get-packages/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "peer": true, - "engines": { - "node": ">=6.0.0" + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "peer": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "node_modules/@manypkg/get-packages/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "license": "MIT", + "engines": { + "node": ">= 4.0.0" } }, "node_modules/@metamask/eth-sig-util": { @@ -2833,7 +3651,6 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -3044,6 +3861,19 @@ "dev": true, "peer": true }, + "node_modules/better-path-resolve": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz", + "integrity": "sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-windows": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -3373,6 +4203,13 @@ "node": ">=4" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, "node_modules/charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", @@ -3947,6 +4784,16 @@ "node": ">= 0.8" } }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-port": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.5.1.tgz", @@ -5165,6 +6012,28 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/extendable-error": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", + "integrity": "sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -6339,6 +7208,13 @@ "node": ">= 6" } }, + "node_modules/human-id": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", + "integrity": "sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==", + "dev": true, + "license": "MIT" + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -6701,6 +7577,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-subdir": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-subdir/-/is-subdir-1.2.0.tgz", + "integrity": "sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "better-path-resolve": "1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/is-symbol": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", @@ -6755,6 +7644,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", @@ -6976,6 +7875,13 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true, + "license": "MIT" + }, "node_modules/lodash.throttle": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", @@ -7101,6 +8007,17 @@ "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", "dev": true }, + "node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "license": "ISC", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -7372,6 +8289,16 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -7672,6 +8599,13 @@ "node": ">=0.10.0" } }, + "node_modules/outdent": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz", + "integrity": "sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==", + "dev": true, + "license": "MIT" + }, "node_modules/p-cancelable": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", @@ -7681,6 +8615,29 @@ "node": ">=12.20" } }, + "node_modules/p-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz", + "integrity": "sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-map": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-filter/node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -7786,6 +8743,13 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/package-manager-detector": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.2.tgz", + "integrity": "sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==", + "dev": true, + "license": "MIT" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -7899,6 +8863,13 @@ "node": ">=0.12" } }, + "node_modules/picocolors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "dev": true, + "license": "ISC" + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -7916,7 +8887,6 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, - "peer": true, "engines": { "node": ">=6" } @@ -8058,6 +9028,13 @@ "node": ">= 0.10" } }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "dev": true, + "license": "ISC" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -8169,6 +9146,60 @@ "node": ">=0.10.0" } }, + "node_modules/read-yaml-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", + "integrity": "sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.6.1", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/read-yaml-file/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/read-yaml-file/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-yaml-file/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -8231,6 +9262,13 @@ "node": ">=6" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", @@ -8809,12 +9847,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -9304,6 +10348,65 @@ "node": ">=0.10.0" } }, + "node_modules/spawndamnit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz", + "integrity": "sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/spawndamnit/node_modules/cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "node_modules/spawndamnit/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawndamnit/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawndamnit/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, "node_modules/split": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -9320,8 +10423,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "peer": true + "dev": true }, "node_modules/stacktrace-parser": { "version": "0.1.10", @@ -9606,6 +10708,19 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, + "node_modules/term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -10578,6 +11693,13 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true, + "license": "ISC" + }, "node_modules/yaml": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", diff --git a/package.json b/package.json index 2ff7cf24..ba736cc6 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,9 @@ "lint": "solhint 'contracts/**/*.sol' && eslint 'scripts/**/*.js' && eslint 'test/**/*.js'", "prettier": "prettier --write 'contracts/**/*.sol' 'scripts/**/*.js' 'test/**/*.js' '*.js' 'package.json' '.solhint.json' '.prettierrc' '.github/**/*.yaml'", "flatten": "sh scripts/flatten-contracts.sh", - "coverage": "cross-env COVERAGE=true hardhat coverage" + "coverage": "cross-env COVERAGE=true hardhat coverage", + "release": "npm run build && npm run build:ts && npm run flatten && npm run clean:artifacts && changeset publish", + "cs": "changeset" }, "keywords": [ "axelar", @@ -35,6 +37,7 @@ "devDependencies": { "@axelar-network/axelar-chains-config": "^1.2.0", "@axelarjs/evm": "^0.2.1", + "@changesets/cli": "^2.27.9", "@nomicfoundation/hardhat-toolbox": "^2.0.2", "@tsconfig/strictest": "^2.0.2", "chai": "^4.3.7", From 8841028f9f0ae1f5f5c8a931e54663f50b47d47c Mon Sep 17 00:00:00 2001 From: Ayoub Date: Thu, 10 Oct 2024 15:11:00 +0100 Subject: [PATCH 2/6] add release documentation --- README.md | 4 ++++ RELEASE.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 RELEASE.md diff --git a/README.md b/README.md index 08bd9720..8c8430a7 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,7 @@ Test coverage reports of the `main` branch can also be found on [Codecov](https: ## Deployment Guide To learn more about the deployment process, please refer to [this repo](https://github.com/axelarnetwork/axelar-contract-deployments). + +## Release Process + +Please check the [release process](./RELEASE.md) for more details. diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..1dc117f5 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,62 @@ +# How to Release a New Version + +## Release Official Versions + +To release a new version, follow these steps after creating a PR with your changes: + +### 1. Update the Changeset File + +In your branch, run the following command to create a new changeset file: + +```bash +npm run cs +``` + +You will be prompted to specify the type of changes you are making. Choose from the following options: + +- `patch`: bug fixes, documentation updates, etc. +- `minor`: new features, non-breaking changes, etc. +- `major`: breaking changes, etc. + +Next, you will be prompted to enter a summary of the changes you made. This will be used to generate the release notes in the `CHANGELOG.md` file. + +### 2. Commit the Changeset File + +```bash +git add . +git commit -m "chore: update changeset" +git push +``` + +### 3. Trigger the release workflow: + +#### Overview: + +These GitHub action workflows manage releases based on `changesets` we defined earlier, ensuring that every new release includes tracked changes and proper version updates. The process starts when the `pre-release` workflow is triggered. If the PR includes changesets, the workflow generates a new "PR version", which needs to be reviewed and eventually merged in order to trigger the `release` workflow that publishes the new packages. + +#### Pre-Release Workflow: + +- This `pre-release` workflow kicks in after it gets triggered manually by one of the authorized team members, It does the following: + + - Generates a new version based on the `changesets`. + - Updates the package version. + - Updates the `CHANGELOG.md` file with the changes made in the release. + - Creates a new release PR with the updated version changes. + +#### Release Workflow: + +- Once the `release` PR is reviewed, approved and merged, if the PR title contains certain criteria, the `release` workflow is triggered in order to publish the new release: + + - Installs any necessary dependencies needed for the package publishing (e.g. `node.js`). + - Publishes the release. + - Pushes release tags to the repository and all the related assets. + +#### Important Considerations: + +If no changesets are provided, the release will lack a changelog, and versioning won’t be updated. + +Best practice requires every release to include changes tracked by changesets to maintain proper version history and changelogs. + +## Release Snapshot Versions + +If you need to release a snapshot version for development or testing purposes, you can do so by triggering the snapshot release workflow [here](https://github.com/axelarnetwork/interchain-token-service/actions/workflows/release-snapshot.yaml) From 00df2f7e4902e2d502c75771f1a0fd9db1696188 Mon Sep 17 00:00:00 2001 From: Ayoub Date: Thu, 10 Oct 2024 17:52:59 +0100 Subject: [PATCH 3/6] address some comments for the release pipeline --- .github/workflows/lint.yaml | 1 - .github/workflows/pre-release.yaml | 2 -- .github/workflows/release.yaml | 41 +++++++++++++++--------------- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 0b0163e3..214aac7c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,7 +15,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - # Install Node.js and its dependencies - name: Setup tools uses: ./.github/actions/setup-tools with: diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 77b48d42..70385a02 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -25,8 +25,6 @@ jobs: echo "has_changeset=false" >> "$GITHUB_OUTPUT" fi - # Install Node.js and its dependencies - # Needed for the changeset releases - name: Setup tools uses: ./.github/actions/setup-tools with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4456683e..b27b2d4d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,6 +27,7 @@ jobs: uses: ./.github/actions/setup-tools with: install-nodejs: 'true' + # Publishes a release in case the release isn't published - name: Publish release id: publish-release @@ -43,22 +44,22 @@ jobs: - name: Prepare cross-steps variables run: | export PACKAGE_NAME=$(jq -r '.name' 'package.json'); - export PUBLISHED_PACKAGE_VERSION=v$(echo '${{ steps.publish-release.outputs.publishedPackages }}' | jq -r ".[] | select(.name == \"${PACKAGE_NAME}\") | .version") - export BASE_ARTIFACTS_SEARCH_DIR="./artifacts" - export ARTIFACT_VERSIONED_PACKAGE_NAME="interchain-token-service-assets-${PUBLISHED_PACKAGE_VERSION}" - export BASE_ARTIFACTS_VERSIONED_DIR="$(dirname ${BASE_ARTIFACTS_SEARCH_DIR})/${ARTIFACT_VERSIONED_PACKAGE_NAME}" # Regardless of the dir type, relative or absolute + export PACKAGE_VERSION=v$(echo '${{ steps.publish-release.outputs.publishedPackages }}' | jq -r ".[] | select(.name == \"${PACKAGE_NAME}\") | .version") + export BASE_ARTIFACTS_DIR="./artifacts" + export ARTIFACT_NAME="interchain-token-service-assets-${PACKAGE_VERSION}" + export BASE_ARTIFACTS_VERSIONED_DIR="$(dirname ${BASE_ARTIFACTS_DIR})/${ARTIFACT_NAME}" # Regardless of the dir type, relative or absolute # ex: @axelarnetwork/interchain-token-service echo "PACKAGE_NAME=${PACKAGE_NAME}" >> $GITHUB_ENV # ex: v2.1.0 - echo "PUBLISHED_PACKAGE_VERSION=${PUBLISHED_PACKAGE_VERSION}" >> $GITHUB_ENV + echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_ENV # ex: ./artifacts - echo "BASE_ARTIFACTS_SEARCH_DIR=${BASE_ARTIFACTS_SEARCH_DIR}" >> $GITHUB_ENV + echo "BASE_ARTIFACTS_DIR=${BASE_ARTIFACTS_DIR}" >> $GITHUB_ENV # ex: interchain-token-service-assets-v2.1.0 - echo "ARTIFACT_VERSIONED_PACKAGE_NAME=${ARTIFACT_VERSIONED_PACKAGE_NAME}" >> $GITHUB_ENV + echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV # ex: ./interchain-token-service-assets-v2.1.0 echo "BASE_ARTIFACTS_VERSIONED_DIR=${BASE_ARTIFACTS_VERSIONED_DIR}" >> $GITHUB_ENV @@ -67,13 +68,13 @@ jobs: - name: Create `zip` and `tar` archive files for contracts ABIs run: | # Renaming to keep the dir structure in the archive matching the release version defined in `BASE_ARTIFACTS_VERSIONED_DIR` - mv ${{ env.BASE_ARTIFACTS_SEARCH_DIR }} ${{ env.BASE_ARTIFACTS_VERSIONED_DIR }} + mv ${{ env.BASE_ARTIFACTS_DIR }} ${{ env.BASE_ARTIFACTS_VERSIONED_DIR }} - find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json" ! -name "*.dbg.json" -print | zip ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip -@ - find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json" ! -name "*.dbg.json" -print | tar -czvf ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz -T - + find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json" -print | zip ${{ env.ARTIFACT_NAME }}.zip -@ + find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json" -print | tar -czvf ${{ env.ARTIFACT_NAME }}.tar.gz -T - # Generate SHA-256 Checksums - for file in ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip; do + for file in ${{ env.ARTIFACT_NAME }}.tar.gz ${{ env.ARTIFACT_NAME }}.zip; do sha256sum "$file" > "$file.sha256" done @@ -94,8 +95,8 @@ jobs: ENDPOINT_URL: ${{ secrets.CF_ENDPOINT_URL }} CF_BUCKET_ROOT_KEY: ${{ vars.CF_BUCKET_ROOT_KEY }} run: | - export CF_CONTRACTS_BUCKET_ROOT_KEY="${CF_BUCKET_ROOT_KEY}/${{ env.PUBLISHED_PACKAGE_VERSION }}" - export JSON_FILES=$(find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json" ! -name "*.dbg.json") + export CF_CONTRACTS_BUCKET_ROOT_KEY="${CF_BUCKET_ROOT_KEY}/${{ env.PACKAGE_VERSION }}" + export JSON_FILES=$(find "${{ env.BASE_ARTIFACTS_VERSIONED_DIR }}/contracts" -type f -name "*.json") for json_file in "${JSON_FILES}"; do @@ -111,8 +112,8 @@ jobs: done # Upload the created archives to R2 - export CF_ARCHIVES_BUCKET_ROOT_KEY="${CF_BUCKET_ROOT_KEY}/${{ env.PUBLISHED_PACKAGE_VERSION }}/archives" - for file in ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip; do + export CF_ARCHIVES_BUCKET_ROOT_KEY="${CF_BUCKET_ROOT_KEY}/${{ env.PACKAGE_VERSION }}/archives" + for file in ${{ env.ARTIFACT_NAME }}.tar.gz ${{ env.ARTIFACT_NAME }}.zip; do aws s3api put-object --bucket $S3_BUCKET_NAME --key "$CF_ARCHIVES_BUCKET_ROOT_KEY/$file" --body "$file" --acl public-read --endpoint-url $ENDPOINT_URL aws s3api put-object --bucket $S3_BUCKET_NAME --key "$CF_ARCHIVES_BUCKET_ROOT_KEY/$file.sha256" --body "$file.sha256" --acl public-read --endpoint-url $ENDPOINT_URL done @@ -121,11 +122,11 @@ jobs: - name: Create and Upload Release uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 with: - tag_name: ${{ env.PUBLISHED_PACKAGE_VERSION }} # This uses the tag from the push + tag_name: ${{ env.PACKAGE_VERSION }} # This uses the tag from the push files: | - ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz - ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.tar.gz.sha256 - ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip - ${{ env.ARTIFACT_VERSIONED_PACKAGE_NAME }}.zip.sha256 + ${{ env.ARTIFACT_NAME }}.tar.gz + ${{ env.ARTIFACT_NAME }}.tar.gz.sha256 + ${{ env.ARTIFACT_NAME }}.zip + ${{ env.ARTIFACT_NAME }}.zip.sha256 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3317772cde801104561b0243019a7e93360da40d Mon Sep 17 00:00:00 2001 From: Ayoub Date: Thu, 10 Oct 2024 18:22:51 +0100 Subject: [PATCH 4/6] create a release-snapshot task to publish snapshot releases --- .github/workflows/release-snapshot.yaml | 11 ++--------- package.json | 1 + 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-snapshot.yaml b/.github/workflows/release-snapshot.yaml index 9e083b6a..4e8186da 100644 --- a/.github/workflows/release-snapshot.yaml +++ b/.github/workflows/release-snapshot.yaml @@ -20,15 +20,8 @@ jobs: with: install-nodejs: 'true' - - name: Build the modules - run: npm run build && npm run build:ts && npm run flatten && npm run clean:artifacts - - - name: Set Snapshot Version - run: | - npm version 0.0.0-snapshot.$(git rev-parse --short HEAD) --git-tag-version=false - - - name: Publish Snapshot to NPM + - name: Build and Publish a Snapshot to NPM run: | - npm publish --no-git-checks --tag snapshot --access public + npm run release-snapshot env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index ba736cc6..accb819a 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "flatten": "sh scripts/flatten-contracts.sh", "coverage": "cross-env COVERAGE=true hardhat coverage", "release": "npm run build && npm run build:ts && npm run flatten && npm run clean:artifacts && changeset publish", + "release-snapshot": "npm run build && npm run build:ts && npm run flatten && npm run clean:artifacts && npm version 0.0.0-snapshot.$(git rev-parse --short HEAD) --git-tag-version=false && npm publish --no-git-checks --tag snapshot --access public", "cs": "changeset" }, "keywords": [ From 17a8688e3a60f20e2016b7e2fc4b1be286d161c5 Mon Sep 17 00:00:00 2001 From: Ayoub Date: Mon, 14 Oct 2024 10:55:52 +0100 Subject: [PATCH 5/6] renamed pre-release to create-release-pr and added some checks for the whitelisted branches --- .github/workflows/create-release-pr.yaml | 67 ++++++++++++++++++++++++ .github/workflows/pre-release.yaml | 43 --------------- .github/workflows/release.yaml | 4 ++ 3 files changed, 71 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/create-release-pr.yaml delete mode 100644 .github/workflows/pre-release.yaml diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml new file mode 100644 index 00000000..c2b7e1cf --- /dev/null +++ b/.github/workflows/create-release-pr.yaml @@ -0,0 +1,67 @@ +# This workflow concerns the preparation of the `changeset` PR and keeping it updated by tracking the changes on `main` branch. +name: Create Release PR + +on: + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + create-release-pr: + name: Create Release PR + runs-on: blacksmith-2vcpu-ubuntu-2204 + steps: + - name: Check if a branch is whitelisted and maintained + id: branch-check + run: | + BRANCH_NAME="${GITHUB_REF#refs/heads/}" + WHITELISTED_BRANCHES=("main" "release/2.*.*") + + IS_WHITELISTED=false + # Check the branch against the whitelist using wildcard matching + for BRANCH in "${WHITELISTED_BRANCHES[@]}"; do + if [[ "$BRANCH_NAME" == $BRANCH ]]; then + IS_WHITELISTED=true; + break; + fi + done + + if [ "$IS_WHITELISTED" == true ]; then + echo "Branch is whitelisted: $BRANCH_NAME" + else + echo "Branch $BRANCH_NAME is not whitelisted." + exit 1 + fi + + echo "branch_name=${BRANCH_NAME}" >> "$GITHUB_OUTPUT" + + - name: Checkout Repo + uses: actions/checkout@v4 + with: + persist-credentials: false + ref: ${{ steps.branch-check.outputs.branch_name }} + + - name: Check for changeset files + run: | + if ! ls .changeset/*.md | grep -q '\.changeset\/[a-z-]\+\.md$'; then + echo "No changeset files found. Exiting workflow." + exit 1 + fi + + echo "Changeset files found. Continuing with the workflow." + + - name: Setup tools + uses: ./.github/actions/setup-tools + with: + install-nodejs: 'true' + + # Keep the version of the PRs up-to-date + - name: Create Release Pull Request + id: release-pr + uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7 + with: + branch: ${{ steps.branch-check.outputs.branch_name }} # This branch context is ignored in this step: `https://github.com/changesets/action/blob/50750fa876cc1e54c7cb972db5e2f7271fc53d99/src/run.ts#L328`, therefore the usage of `branch` + title: 'chore(release): bump version and update changelog from `${{ steps.branch-check.outputs.branch_name }}`' + commit: 'chore(release): bump version and update changelog from `${{ steps.branch-check.outputs.branch_name }}`' + env: + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml deleted file mode 100644 index 70385a02..00000000 --- a/.github/workflows/pre-release.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# This workflow concerns the preparation of the `changeset` PR and keeping it updated by tracking the changes on `main` branch. -name: Pre-Release Preparation - -on: - workflow_dispatch: - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - pre-release: - name: Pre-Release Preparation - runs-on: blacksmith-2vcpu-ubuntu-2204 - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Check for changeset files and 'pre-release' label exist - id: check-conditions - run: | - if ls .changeset/*.md | grep '\.changeset\/[a-z-]\+\.md$'; then - echo "has_changeset=true" >> "$GITHUB_OUTPUT" - else - echo "has_changeset=false" >> "$GITHUB_OUTPUT" - fi - - - name: Setup tools - uses: ./.github/actions/setup-tools - with: - install-nodejs: 'true' - - # Keep the version of the PRs up-to-date - - name: Create Release Pull Request - id: release-pr - if: ${{ steps.check-conditions.outputs.has_changeset == 'true' }} - uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 #v1.4.7 - with: - branch: 'main' - title: 'chore(release): bump version and update changelog' - commit: 'chore(release): bump version and update changelog' - env: - GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b27b2d4d..f02aa3f5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,6 +6,9 @@ on: pull_request: branches: - main + # It needs to be specific based on the maintenance policy that will be set: (e.g.: `release/1.0.*`) + # This ensures that the unmaintained old releases are no longer being updated. + - release/** types: [closed] concurrency: ${{ github.workflow }}-${{ github.ref }} @@ -23,6 +26,7 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + - name: Setup tools uses: ./.github/actions/setup-tools with: From f134b5429d3dd572fa0f5e168f36baba96a6e9d1 Mon Sep 17 00:00:00 2001 From: Milap Sheth Date: Wed, 16 Oct 2024 02:23:32 -0400 Subject: [PATCH 6/6] address comments --- .github/workflows/create-release-pr.yaml | 9 +++++---- .github/workflows/release.yaml | 4 +--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml index c2b7e1cf..c1fbd113 100644 --- a/.github/workflows/create-release-pr.yaml +++ b/.github/workflows/create-release-pr.yaml @@ -15,7 +15,7 @@ jobs: id: branch-check run: | BRANCH_NAME="${GITHUB_REF#refs/heads/}" - WHITELISTED_BRANCHES=("main" "release/2.*.*") + WHITELISTED_BRANCHES=("main" "releases/*") IS_WHITELISTED=false # Check the branch against the whitelist using wildcard matching @@ -60,8 +60,9 @@ jobs: id: release-pr uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7 with: - branch: ${{ steps.branch-check.outputs.branch_name }} # This branch context is ignored in this step: `https://github.com/changesets/action/blob/50750fa876cc1e54c7cb972db5e2f7271fc53d99/src/run.ts#L328`, therefore the usage of `branch` - title: 'chore(release): bump version and update changelog from `${{ steps.branch-check.outputs.branch_name }}`' - commit: 'chore(release): bump version and update changelog from `${{ steps.branch-check.outputs.branch_name }}`' + # This branch context is ignored in this step: https://github.com/changesets/action/blob/50750fa876cc1e54c7cb972db5e2f7271fc53d99/src/run.ts#L328, therefore the usage of `branch` + branch: ${{ steps.branch-check.outputs.branch_name }} + title: 'chore(release): bump version and update changelog' + commit: 'chore(release): bump version and update changelog' env: GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f02aa3f5..40b1ecd4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,9 +6,7 @@ on: pull_request: branches: - main - # It needs to be specific based on the maintenance policy that will be set: (e.g.: `release/1.0.*`) - # This ensures that the unmaintained old releases are no longer being updated. - - release/** + - 'releases/**' types: [closed] concurrency: ${{ github.workflow }}-${{ github.ref }}