diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index ec36d0a..5d6cf1b 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -12,6 +12,9 @@ jobs: publish: name: publish runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v6 @@ -28,5 +31,3 @@ jobs: - name: Publish to NPM run: | bash ./bin/publish-npm - env: - NPM_TOKEN: ${{ secrets.PARALLEL_NPM_TOKEN || secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index c38131b..fb5d3b9 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -17,5 +17,3 @@ jobs: - name: Check release environment run: | bash ./bin/check-release-environment - env: - NPM_TOKEN: ${{ secrets.PARALLEL_NPM_TOKEN || secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index c85fe68..9487e48 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,4 @@ dist-deno /*.tgz .idea/ .eslintcache - +oidc diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f1c1e58..bcd0522 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.5.0" + ".": "0.6.0" } diff --git a/.stats.yml b/.stats.yml index 9a8c935..b72ab98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 38 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web/parallel-sdk-b134f034fe11499d713c03d07778aba8a395d7e3cbbc3d8a4bd2891f0aa970ba.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web/parallel-sdk-51b579ce3bac65b907316a8f417ae2d247055e297644049a40ec5d419e5e4064.yml openapi_spec_hash: c4fc5b0cb3bc48076f736a0ad2b2e75e -config_hash: 27cd9354fb0ac3129cbf269737cece6c +config_hash: 80eeac996567402cd8f03f477c2f4133 diff --git a/CHANGELOG.md b/CHANGELOG.md index bc69885..9e71b8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.6.0 (2026-05-08) + +Full Changelog: [v0.5.0...v0.6.0](https://github.com/parallel-web/parallel-sdk-typescript/compare/v0.5.0...v0.6.0) + +### Features + +* update npm publish ([40d35bf](https://github.com/parallel-web/parallel-sdk-typescript/commit/40d35bf8b82fc8a0c671b7926c0b3caf92a17e2b)) + + +### Chores + +* redact api-key headers in debug logs ([d729c39](https://github.com/parallel-web/parallel-sdk-typescript/commit/d729c39f0ecdc26706a2fa3631b7ba210ec7c053)) + ## 0.5.0 (2026-05-06) Full Changelog: [v0.4.1...v0.5.0](https://github.com/parallel-web/parallel-sdk-typescript/compare/v0.4.1...v0.5.0) diff --git a/bin/check-release-environment b/bin/check-release-environment index e4b6d58..6b43775 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -2,10 +2,6 @@ errors=() -if [ -z "${NPM_TOKEN}" ]; then - errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets") -fi - lenErrors=${#errors[@]} if [[ lenErrors -gt 0 ]]; then diff --git a/bin/publish-npm b/bin/publish-npm index 45e8aa8..3d05c0b 100644 --- a/bin/publish-npm +++ b/bin/publish-npm @@ -2,7 +2,12 @@ set -eux -npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN" +if [[ ${NPM_TOKEN:-} ]]; then + npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN" +elif [[ ! ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-} ]]; then + echo "ERROR: NPM_TOKEN must be set if not running in a Github Action with id-token permission" + exit 1 +fi yarn build cd dist @@ -57,5 +62,9 @@ else TAG="latest" fi +# Install OIDC compatible npm version +npm install --prefix ../oidc/ npm@11.6.2 + # Publish with the appropriate tag -yarn publish --tag "$TAG" +export npm_config_registry='https://registry.npmjs.org' +../oidc/node_modules/.bin/npm publish --tag "$TAG" diff --git a/package.json b/package.json index 1df00af..53f4971 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "parallel-web", - "version": "0.5.0", + "version": "0.6.0", "description": "The official TypeScript library for the Parallel API", "author": "Parallel ", "types": "dist/index.d.ts", diff --git a/src/internal/utils/log.ts b/src/internal/utils/log.ts index a9b5d4f..59c0d06 100644 --- a/src/internal/utils/log.ts +++ b/src/internal/utils/log.ts @@ -106,8 +106,9 @@ export const formatRequestDetails = (details: { ([name, value]) => [ name, ( - name.toLowerCase() === 'x-api-key' || name.toLowerCase() === 'authorization' || + name.toLowerCase() === 'api-key' || + name.toLowerCase() === 'x-api-key' || name.toLowerCase() === 'cookie' || name.toLowerCase() === 'set-cookie' ) ? diff --git a/src/version.ts b/src/version.ts index 1f5d158..30c2817 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.5.0'; // x-release-please-version +export const VERSION = '0.6.0'; // x-release-please-version