diff --git a/.github/actions/cached-image-pull/action.yml b/.github/actions/cached-image-pull/action.yml index e2bb9d822..351bb3e6a 100644 --- a/.github/actions/cached-image-pull/action.yml +++ b/.github/actions/cached-image-pull/action.yml @@ -23,11 +23,11 @@ runs: env: CACHE_PATH: ${{ inputs.cache-directory }}${{ inputs.cache-file }}.tar run: | - echo "::set-output name=path::$CACHE_PATH" + echo "path=$CACHE_PATH" >> $GITHUB_OUTPUT - name: check image cache id: image-cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.image-file.outputs.path }} key: image-cache-${{ inputs.image }} diff --git a/.github/workflows/devpackpublish.yml b/.github/workflows/devpackpublish.yml index a84bf6c8e..a976dc9cc 100644 --- a/.github/workflows/devpackpublish.yml +++ b/.github/workflows/devpackpublish.yml @@ -16,21 +16,22 @@ jobs: runs-on: ubuntu-latest if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && github.repository == 'kiltprotocol/sdk-js'" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # fetch-depth 0 and token needed to push changes on the package.json files back. fetch-depth: 0 token: ${{ secrets.REPO_ACCESS_TOKEN }} - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - name: Install dependencies run: yarn install --immutable - name: Bump prerelease version of root package run: npm version --no-git-tag-version prerelease - name: Get current package version id: package_version - run: echo "::set-output name=package_version::$(node -pe "require('./package.json').version")" + run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT - name: Set all other packages to same version env: PACKAGE_VERSION: ${{ steps.package_version.outputs.package_version }} diff --git a/.github/workflows/docpublish.yml b/.github/workflows/docpublish.yml index 0e2d9f5e6..6d075f62a 100644 --- a/.github/workflows/docpublish.yml +++ b/.github/workflows/docpublish.yml @@ -10,9 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. - with: - persist-credentials: false + uses: actions/checkout@v3 - name: Install and Build run: | @@ -20,8 +18,7 @@ jobs: yarn build:docs - name: Deploy - uses: JamesIves/github-pages-deploy-action@releases/v3 + uses: JamesIves/github-pages-deploy-action@v4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages # The branch the action should deploy to. - FOLDER: docs/api # The folder the action should deploy to. + branch: gh-pages # The branch the action should deploy to. + folder: docs/api # The folder the action should deploy to. diff --git a/.github/workflows/npmpublish-rc.yml b/.github/workflows/npmpublish-rc.yml index ece3e6a33..c53519c74 100644 --- a/.github/workflows/npmpublish-rc.yml +++ b/.github/workflows/npmpublish-rc.yml @@ -6,10 +6,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - run: yarn install --immutable - run: yarn build - run: yarn test:ci @@ -18,10 +19,11 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - name: Install dependencies run: yarn install --immutable - name: Build packages @@ -30,7 +32,7 @@ jobs: run: yarn run bundle - name: Get current package version id: package_version - run: echo "::set-output name=package_version::$(node -pe "require('./package.json').version")" + run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT - name: Publish to NPM run: yarn run publish --tag rc env: diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml index 7957abf81..7f3123b81 100644 --- a/.github/workflows/npmpublish.yml +++ b/.github/workflows/npmpublish.yml @@ -6,10 +6,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - run: yarn install --immutable - run: yarn build - run: yarn test:ci @@ -18,10 +19,11 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 + cache: 'yarn' - name: Install dependencies run: yarn install --immutable - name: Build packages @@ -30,7 +32,7 @@ jobs: run: yarn run bundle - name: Get current package version id: package_version - run: echo "::set-output name=package_version::$(node -pe "require('./package.json').version")" + run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT - name: Publish to NPM run: yarn run publish --tag latest env: diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index 06d2d32d3..c4ba39bf9 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -11,6 +11,6 @@ jobs: validate: runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@v4 + - uses: amannn/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-node-candidate.yml b/.github/workflows/test-node-candidate.yml index 742e97a92..6276ffd4c 100644 --- a/.github/workflows/test-node-candidate.yml +++ b/.github/workflows/test-node-candidate.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 @@ -30,7 +30,7 @@ jobs: - name: zip build run: zip -r build.zip . - name: upload build - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build path: build.zip @@ -51,22 +51,20 @@ jobs: needs: cache_imgs steps: - - name: Log out node version - run: node --version - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - name: Log out node version run: node --version - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip run: unzip build.zip -d . - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -99,11 +97,11 @@ jobs: needs: build steps: - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip @@ -111,7 +109,7 @@ jobs: - name: yarn bundle run: yarn bundle - name: upload bundle artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: checked-nonmin-bundle path: packages/sdk-js/dist/sdk-js.umd.js @@ -122,21 +120,21 @@ jobs: needs: [cache_imgs, bundle_cache] steps: - - name: Use Node.js 14 - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: - node-version: 14 - - uses: actions/download-artifact@v2 + node-version: '16.x' + - uses: actions/download-artifact@v3 with: name: build - name: unzip run: unzip build.zip -d . - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: checked-nonmin-bundle path: packages/sdk-js/dist + - run: basename /packages/sdk-js/dist/ - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -145,10 +143,6 @@ jobs: - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - - uses: actions/setup-node@v2 - with: - node-version: '16.x' - - run: basename /packages/sdk-js/dist/ - name: pull node image env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} diff --git a/.github/workflows/tests-polkadot-deps.yml b/.github/workflows/tests-polkadot-deps.yml index fe4494ed0..b83dd2869 100644 --- a/.github/workflows/tests-polkadot-deps.yml +++ b/.github/workflows/tests-polkadot-deps.yml @@ -16,24 +16,14 @@ jobs: node-version: [14.x, 16.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: master - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn config get cacheFolder)" - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.node-version }}-updated-dependencies - restore-keys: | - ${{ runner.os }}-${{ matrix.node-version }}-updated-dependencies - ${{ runner.os }}-${{ matrix.node-version }}-yarn- + cache: 'yarn' - name: delete yarn.lock run: rm -f yarn.lock @@ -57,7 +47,7 @@ jobs: - name: zip build run: zip -r build.zip . - name: upload build - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build-${{ matrix.node-version }} path: build.zip @@ -77,7 +67,7 @@ jobs: continue-on-error: ${{ matrix.required == 'optional' }} steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build-${{ matrix.node-version }} - name: unzip @@ -101,14 +91,14 @@ jobs: continue-on-error: ${{ matrix.required == 'optional' }} steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build-14.x - name: unzip run: unzip build.zip -d . - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d0edfbeac..3b83fb704 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,8 @@ on: - 'Dockerfile' - 'docker-compose.yml' - 'dc.build.node.yml' - - '.github/workflows/*publish.yml' + - '.github/**' + - '!.github/workflows/tests.yml' pull_request: branches: - develop @@ -37,7 +38,7 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 @@ -49,7 +50,7 @@ jobs: - name: zip build run: zip -r build.zip . - name: upload build - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build path: build.zip @@ -59,11 +60,11 @@ jobs: needs: build steps: - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip @@ -92,7 +93,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip @@ -123,22 +124,20 @@ jobs: continue-on-error: ${{ matrix.required == 'optional' }} steps: - - name: Log out node version - run: node --version - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - name: Log out node version run: node --version - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip run: unzip build.zip -d . - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -171,11 +170,11 @@ jobs: needs: build steps: - - name: Use Node.js 14 + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: 14 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: build - name: unzip @@ -183,7 +182,7 @@ jobs: - name: yarn bundle run: yarn bundle - name: upload bundle artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: checked-nonmin-bundle path: packages/sdk-js/dist/sdk-js.umd.js @@ -202,21 +201,21 @@ jobs: continue-on-error: ${{ matrix.required == 'optional' }} steps: - - name: Use Node.js 14 - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: - node-version: 14 - - uses: actions/download-artifact@v2 + node-version: '16.x' + - uses: actions/download-artifact@v3 with: name: build - name: unzip run: unzip build.zip -d . - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: checked-nonmin-bundle path: packages/sdk-js/dist + - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -225,9 +224,6 @@ jobs: - name: Login to Amazon ECR id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - - uses: actions/setup-node@v2 - with: - node-version: '16.x' - run: basename /packages/sdk-js/dist/ - name: pull node image env: diff --git a/package.json b/package.json index 1db9c3186..5ea910099 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,6 @@ "typedoc": "^0.22.15", "typescript": "^4.8.3" }, - "version": "0.32.0", + "version": "0.32.1", "packageManager": "yarn@3.3.1" } diff --git a/packages/asset-did/package.json b/packages/asset-did/package.json index 63ae29571..5b0b01ee6 100644 --- a/packages/asset-did/package.json +++ b/packages/asset-did/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/asset-did", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/augment-api/package.json b/packages/augment-api/package.json index fb66c8c18..95737b1eb 100644 --- a/packages/augment-api/package.json +++ b/packages/augment-api/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/augment-api", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/chain-helpers/package.json b/packages/chain-helpers/package.json index 2e5687366..7d239771b 100644 --- a/packages/chain-helpers/package.json +++ b/packages/chain-helpers/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/chain-helpers", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/config/package.json b/packages/config/package.json index ee305bd16..0e2f8dbf3 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,14 +1,16 @@ { "name": "@kiltprotocol/config", - "version": "0.32.0", + "version": "0.32.1", "description": "", - "main": "./lib/cjs/index.js", - "module": "./lib/esm/index.js", - "types": "./lib/cjs/index.d.ts", + "type": "commonjs", + "main": "./lib/index.js", + "module": "./lib/index.mjs", + "types": "./lib/index.d.ts", "exports": { ".": { - "import": "./lib/esm/index.js", - "require": "./lib/cjs/index.js" + "import": "./lib/index.mjs", + "require": "./lib/index.js", + "types": "./lib/index.d.ts" } }, "files": [ @@ -18,8 +20,8 @@ "clean": "rimraf ./lib", "build": "yarn clean && yarn build:ts", "build:ts": "yarn build:cjs && yarn build:esm", - "build:cjs": "tsc --declaration -p tsconfig.build.json && echo '{\"type\":\"commonjs\"}' > ./lib/cjs/package.json", - "build:esm": "tsc --declaration -p tsconfig.esm.json && echo '{\"type\":\"module\"}' > ./lib/esm/package.json" + "build:cjs": "tsc --declaration -p tsconfig.build.json", + "build:esm": "tsc --declaration -p tsconfig.esm.json && yarn exec cp -f ./lib/esm/index.js ./lib/index.mjs && rimraf ./lib/esm" }, "repository": "github:kiltprotocol/sdk-js", "engines": { diff --git a/packages/config/tsconfig.build.json b/packages/config/tsconfig.build.json index 8af083c78..0eb1133ec 100644 --- a/packages/config/tsconfig.build.json +++ b/packages/config/tsconfig.build.json @@ -3,11 +3,11 @@ "compilerOptions": { "module": "CommonJS", - "outDir": "./lib/cjs" + "outDir": "./lib" }, "include": [ - "src/**/*.ts", "src/**/*.js" + "src/**/*.ts" ], "exclude": [ diff --git a/packages/core/package.json b/packages/core/package.json index 643892462..df6fc7af5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/core", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/did/package.json b/packages/did/package.json index c5a598fcb..cb96f731d 100644 --- a/packages/did/package.json +++ b/packages/did/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/did", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/messaging/package.json b/packages/messaging/package.json index 5a197ad49..2d448fa53 100644 --- a/packages/messaging/package.json +++ b/packages/messaging/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/messaging", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/sdk-js/package.json b/packages/sdk-js/package.json index 535fb3e58..fdd55cdc9 100644 --- a/packages/sdk-js/package.json +++ b/packages/sdk-js/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/sdk-js", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/testing/package.json b/packages/testing/package.json index f028b9498..f139f0c09 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,7 +1,7 @@ { "name": "@kiltprotocol/testing", "private": true, - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/type-definitions/package.json b/packages/type-definitions/package.json index f80235b3e..10a997515 100644 --- a/packages/type-definitions/package.json +++ b/packages/type-definitions/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/type-definitions", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/types/package.json b/packages/types/package.json index 55c5abfdc..14a555dfd 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/types", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/utils/package.json b/packages/utils/package.json index 40cdeae78..2bd4280f9 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/utils", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js", diff --git a/packages/vc-export/package.json b/packages/vc-export/package.json index 30b66ea53..4060727bc 100644 --- a/packages/vc-export/package.json +++ b/packages/vc-export/package.json @@ -1,6 +1,6 @@ { "name": "@kiltprotocol/vc-export", - "version": "0.32.0", + "version": "0.32.1", "description": "", "main": "./lib/cjs/index.js", "module": "./lib/esm/index.js",