diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3f8445ae..d1f0d085 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,3 @@ - version: 2 updates: - package-ecosystem: "npm" diff --git a/.github/workflows/assign-pr.yml b/.github/workflows/assign-pr.yml index 1df69f2b..37b228b4 100644 --- a/.github/workflows/assign-pr.yml +++ b/.github/workflows/assign-pr.yml @@ -7,9 +7,9 @@ on: jobs: assign_creator: if: ${{ github.actor != 'dependabot[bot]' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Assign PR to creator - uses: thomaseizinger/assign-pr-creator-action@v1.0.0 + uses: toshimaru/auto-author-assign@ebd30f10fb56e46eb0759a14951f36991426fed0 # v2.1.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml new file mode 100644 index 00000000..3beb648d --- /dev/null +++ b/.github/workflows/dev-release.yml @@ -0,0 +1,48 @@ +name: Release @dev tag to npm +on: + pull_request: + types: [labeled] + +jobs: + release: + if: ${{ github.event.label.name == 'release dev tag' }} + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup PNPM + uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 + with: + run_install: | + - args: [--frozen-lockfile] + - name: Check for changeset + run: pnpm exec changeset status --since origin/main + - name: Build package + run: pnpm build + - name: Create .npmrc + run: | + cat << EOF > "$HOME/.npmrc" + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Release on @dev tag in npm + run: pnpm publish:ci-dev + - name: Get new package version + run: | + VERSION=$(cat package.json | jq -r '.version') + echo "VERSION=$VERSION" >> "$GITHUB_ENV" + - name: Add installation instructions PR comment + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 + env: + VERSION: ${{ env.VERSION }} + with: + issue-number: ${{ github.event.pull_request.number }} + body: | + Released snapshot build with `@dev` tag in npm with version: `${{ env.VERSION }}`. + + Install it with: + ```shell + pnpm add @saleor/app-sdk@${{ env.VERSION }} + ``` diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b1d6bab..a48456d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,98 +2,52 @@ name: QA on: [pull_request] jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.4 + - uses: actions/checkout@v4 + - name: Setup PNPM + uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 with: - version: 8.2.0 - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: pnpm - - name: Install dependencies - run: pnpm install - - name: Check linters + run_install: | + - args: [--frozen-lockfile] + - name: Check linter run: pnpm lint + - name: Check types + run: pnpm check-types test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.4 - with: - version: 8.2.0 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - name: Setup PNPM + uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 with: - node-version: 18 - cache: "pnpm" - - name: Install dependencies - run: pnpm install - - name: Test + run_install: | + - args: [--frozen-lockfile] + - name: Run tests run: pnpm test:ci - name: Generate coverage report - uses: irongut/CodeCoverageSummary@v1.3.0 + uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0 if: ${{ github.actor != 'dependabot[bot]' }} with: filename: coverage/cobertura-coverage.xml format: markdown output: file - - name: Add Coverage PR Comment - uses: marocchino/sticky-pull-request-comment@v2 + uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0 if: ${{ github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' }} with: recreate: true path: code-coverage-results.md build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.4 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - name: Setup PNPM + uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 with: - node-version: 18 - cache: pnpm - - uses: actions/cache@v3 - with: - path: | - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.json') }}- - - name: Install dependencies - run: pnpm install - - name: Build project + run_install: | + - args: [--frozen-lockfile] + - name: Build package run: pnpm build - - name: Creating .npmrc - if: ${{ github.actor != 'dependabot[bot]' }} - run: | - cat << EOF > "$HOME/.npmrc" - //registry.npmjs.org/:_authToken=$NPM_TOKEN - EOF - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Release on @dev tag in npm - if: ${{ github.actor != 'dependabot[bot]' }} - run: npx changeset version --snapshot pr && pnpm publish --tag dev --no-git-checks - # Store package.json version in env - - run: echo "PACKAGE_JSON=$(jq -c . < package.json)" >> $GITHUB_ENV - if: ${{ github.actor != 'dependabot[bot]' }} - - run: echo '${{ fromJson(env.PACKAGE_JSON).version }}' - if: ${{ github.actor != 'dependabot[bot]' }} - # Post a comment with released snapshot - - name: Create with released tag - if: ${{ github.actor != 'dependabot[bot]' }} - uses: peter-evans/create-or-update-comment@v2 - with: - issue-number: ${{ github.event.pull_request.number }} - body: | - Released snapshot build with `@dev` tag in npm with version: `${{ fromJson(env.PACKAGE_JSON).version }}` - - Install it with - ```bash - pnpm add @saleor/app-sdk@${{ fromJson(env.PACKAGE_JSON).version }} - ``` diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 8866912d..c90c831e 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -7,30 +7,19 @@ on: concurrency: ${{ github.workflow }}-${{ github.ref }} -# -# TODO -# - Add tags for each app (e.g. search@3.0.1) for easier parsing -# - Print versions name to commit, for easier Vercel deployments -# jobs: release: name: Prepare release with Changesets - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.4 # Use version from package.json - - name: Setup Node.js 16 # It was default for Changesets action, check if it can be bumped to v18 - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - name: Setup PNPM + uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 with: - node-version: 16 - - uses: pnpm/action-setup@v2 - name: Install pnpm - - run: pnpm install - # TODO -> publish to npm as pre-release https://github.com/changesets/changesets/blob/8447c677a37d1d23858059e0ce2b5cd98f4c24ae/docs/snapshot-releases.md + run_install: | + - args: [--frozen-lockfile] - name: Create Release Pull Request - uses: changesets/action@v1 - id: changesets + uses: changesets/action@e2f8e964d080ae97c874b19e27b12e0a8620fb6c # v1.4.6 with: title: Release to npm commit: Release to npm diff --git a/.gitignore b/.gitignore index 9e8d0965..9dfb9565 100644 --- a/.gitignore +++ b/.gitignore @@ -116,4 +116,4 @@ dist .pnp.* .idea/ -.vscode/ \ No newline at end of file +.vscode/ diff --git a/.husky/pre-push b/.husky/pre-push index 45ac5307..31fc1f98 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -pnpm run test:ci +pnpm check-types && pnpm test:ci diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..3c032078 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/package.json b/package.json index c5a722a2..9b49670f 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,11 @@ "test": "vitest", "test:ci": "CI=true vitest --coverage --silent", "prepare": "husky install", - "lint": "tsc --noEmit && prettier --loglevel warn --write . && eslint --fix .", + "check-types": "tsc --noEmit", + "lint": "prettier --loglevel warn --write . && eslint --fix .", "copy-readme": "cp README.md dist/README.md", - "publish:ci": "pnpm publish && npx changeset tag && git push --follow-tags", + "publish:ci-prod": "pnpm publish --dry-run", + "publish:ci-dev": "pnpm publish --dry-run --tag dev", "lint-staged": "lint-staged" }, "keywords": [], @@ -35,7 +37,7 @@ "uuid": "9.0.0" }, "devDependencies": { - "@changesets/cli": "2.26.2", + "@changesets/cli": "2.27.1", "@testing-library/dom": "^8.17.1", "@testing-library/react": "^13.4.0", "@types/debug": "^4.1.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 53539fcc..412d3491 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - dependencies: '@opentelemetry/api': specifier: ^1.7.0 @@ -29,8 +25,8 @@ dependencies: devDependencies: '@changesets/cli': - specifier: 2.26.2 - version: 2.26.2 + specifier: 2.27.1 + version: 2.27.1 '@testing-library/dom': specifier: ^8.17.1 version: 8.17.1 @@ -411,14 +407,14 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@changesets/apply-release-plan@6.1.4: - resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} + /@changesets/apply-release-plan@7.0.0: + resolution: {integrity: sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ==} dependencies: '@babel/runtime': 7.20.13 - '@changesets/config': 2.3.1 - '@changesets/get-version-range-type': 0.3.2 - '@changesets/git': 2.0.0 - '@changesets/types': 5.2.1 + '@changesets/config': 3.0.0 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 fs-extra: 7.0.1 @@ -429,51 +425,50 @@ packages: semver: 7.5.4 dev: true - /@changesets/assemble-release-plan@5.2.4: - resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} + /@changesets/assemble-release-plan@6.0.0: + resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} dependencies: '@babel/runtime': 7.20.13 - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/types': 5.2.1 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.0.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 semver: 7.5.4 dev: true - /@changesets/changelog-git@0.1.14: - resolution: {integrity: sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==} + /@changesets/changelog-git@0.2.0: + resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} dependencies: - '@changesets/types': 5.2.1 + '@changesets/types': 6.0.0 dev: true - /@changesets/cli@2.26.2: - resolution: {integrity: sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==} + /@changesets/cli@2.27.1: + resolution: {integrity: sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ==} hasBin: true dependencies: '@babel/runtime': 7.20.13 - '@changesets/apply-release-plan': 6.1.4 - '@changesets/assemble-release-plan': 5.2.4 - '@changesets/changelog-git': 0.1.14 - '@changesets/config': 2.3.1 - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/get-release-plan': 3.0.17 - '@changesets/git': 2.0.0 - '@changesets/logger': 0.0.5 - '@changesets/pre': 1.0.14 - '@changesets/read': 0.5.9 - '@changesets/types': 5.2.1 - '@changesets/write': 0.2.3 + '@changesets/apply-release-plan': 7.0.0 + '@changesets/assemble-release-plan': 6.0.0 + '@changesets/changelog-git': 0.2.0 + '@changesets/config': 3.0.0 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.0.0 + '@changesets/get-release-plan': 4.0.0 + '@changesets/git': 3.0.0 + '@changesets/logger': 0.1.0 + '@changesets/pre': 2.0.0 + '@changesets/read': 0.6.0 + '@changesets/types': 6.0.0 + '@changesets/write': 0.3.0 '@manypkg/get-packages': 1.1.3 - '@types/is-ci': 3.0.0 '@types/semver': 7.5.0 ansi-colors: 4.1.3 chalk: 2.4.2 + ci-info: 3.9.0 enquirer: 2.3.6 external-editor: 3.1.0 fs-extra: 7.0.1 human-id: 1.0.2 - is-ci: 3.0.1 meow: 6.1.1 outdent: 0.5.0 p-limit: 2.3.0 @@ -485,93 +480,93 @@ packages: tty-table: 4.1.6 dev: true - /@changesets/config@2.3.1: - resolution: {integrity: sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==} + /@changesets/config@3.0.0: + resolution: {integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA==} dependencies: - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/logger': 0.0.5 - '@changesets/types': 5.2.1 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.0.0 + '@changesets/logger': 0.1.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 micromatch: 4.0.5 dev: true - /@changesets/errors@0.1.4: - resolution: {integrity: sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==} + /@changesets/errors@0.2.0: + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} dependencies: extendable-error: 0.1.7 dev: true - /@changesets/get-dependents-graph@1.3.6: - resolution: {integrity: sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==} + /@changesets/get-dependents-graph@2.0.0: + resolution: {integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA==} dependencies: - '@changesets/types': 5.2.1 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 chalk: 2.4.2 fs-extra: 7.0.1 semver: 7.5.4 dev: true - /@changesets/get-release-plan@3.0.17: - resolution: {integrity: sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==} + /@changesets/get-release-plan@4.0.0: + resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} dependencies: '@babel/runtime': 7.20.13 - '@changesets/assemble-release-plan': 5.2.4 - '@changesets/config': 2.3.1 - '@changesets/pre': 1.0.14 - '@changesets/read': 0.5.9 - '@changesets/types': 5.2.1 + '@changesets/assemble-release-plan': 6.0.0 + '@changesets/config': 3.0.0 + '@changesets/pre': 2.0.0 + '@changesets/read': 0.6.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 dev: true - /@changesets/get-version-range-type@0.3.2: - resolution: {integrity: sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==} + /@changesets/get-version-range-type@0.4.0: + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} dev: true - /@changesets/git@2.0.0: - resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} + /@changesets/git@3.0.0: + resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} dependencies: '@babel/runtime': 7.20.13 - '@changesets/errors': 0.1.4 - '@changesets/types': 5.2.1 + '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 is-subdir: 1.2.0 micromatch: 4.0.5 spawndamnit: 2.0.0 dev: true - /@changesets/logger@0.0.5: - resolution: {integrity: sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==} + /@changesets/logger@0.1.0: + resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} dependencies: chalk: 2.4.2 dev: true - /@changesets/parse@0.3.16: - resolution: {integrity: sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==} + /@changesets/parse@0.4.0: + resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} dependencies: - '@changesets/types': 5.2.1 + '@changesets/types': 6.0.0 js-yaml: 3.14.1 dev: true - /@changesets/pre@1.0.14: - resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} + /@changesets/pre@2.0.0: + resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} dependencies: '@babel/runtime': 7.20.13 - '@changesets/errors': 0.1.4 - '@changesets/types': 5.2.1 + '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 dev: true - /@changesets/read@0.5.9: - resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} + /@changesets/read@0.6.0: + resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} dependencies: '@babel/runtime': 7.20.13 - '@changesets/git': 2.0.0 - '@changesets/logger': 0.0.5 - '@changesets/parse': 0.3.16 - '@changesets/types': 5.2.1 + '@changesets/git': 3.0.0 + '@changesets/logger': 0.1.0 + '@changesets/parse': 0.4.0 + '@changesets/types': 6.0.0 chalk: 2.4.2 fs-extra: 7.0.1 p-filter: 2.1.0 @@ -581,15 +576,15 @@ packages: resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} dev: true - /@changesets/types@5.2.1: - resolution: {integrity: sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==} + /@changesets/types@6.0.0: + resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} dev: true - /@changesets/write@0.2.3: - resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} + /@changesets/write@0.3.0: + resolution: {integrity: sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw==} dependencies: '@babel/runtime': 7.20.13 - '@changesets/types': 5.2.1 + '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 prettier: 2.7.1 @@ -1138,12 +1133,6 @@ packages: '@types/ms': 0.7.31 dev: true - /@types/is-ci@3.0.0: - resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} - dependencies: - ci-info: 3.3.2 - dev: true - /@types/istanbul-lib-coverage@2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} dev: true @@ -1805,8 +1794,9 @@ packages: fsevents: 2.3.2 dev: true - /ci-info@3.3.2: - resolution: {integrity: sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==} + /ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} dev: true /clean-publish@4.0.1: @@ -3591,13 +3581,6 @@ packages: engines: {node: '>= 0.4'} dev: true - /is-ci@3.0.1: - resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} - hasBin: true - dependencies: - ci-info: 3.3.2 - dev: true - /is-core-module@2.10.0: resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} dependencies: @@ -6131,3 +6114,7 @@ packages: dev: false publishDirectory: dist + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/src/APL/upstash-apl.test.ts b/src/APL/upstash-apl.test.ts index 03268a41..0c475b69 100644 --- a/src/APL/upstash-apl.test.ts +++ b/src/APL/upstash-apl.test.ts @@ -34,10 +34,10 @@ describe("APL", () => { process.env[UpstashAPLVariables.UPSTASH_URL] = "environment"; const apl = await new UpstashAPL({ restToken: "option", restURL: "option" }); - // eslint-disable-next-line dot-notation - expect(apl["restToken"]).toBe("option"); - // eslint-disable-next-line dot-notation - expect(apl["restURL"]).toBe("option"); + // @ts-expect-error - testing private properties + expect(apl.restToken).toBe("option"); + // @ts-expect-error - testing private properties + expect(apl.restURL).toBe("option"); }); describe("set", () => { diff --git a/src/util/extract-app-permissions-from-jwt.test.ts b/src/util/extract-app-permissions-from-jwt.test.ts index e2567446..a88e9639 100644 --- a/src/util/extract-app-permissions-from-jwt.test.ts +++ b/src/util/extract-app-permissions-from-jwt.test.ts @@ -1,4 +1,4 @@ -import { describe, expect,it } from "vitest"; +import { describe, expect, it } from "vitest"; import { extractAppPermissionsFromJwt } from "./extract-app-permissions-from-jwt";