Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/common/setup-node-and-npm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,15 @@ inputs:
default: 'npm'
cache-dependency-path:
description: 'Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.'
required: true
required: false

runs:
using: "composite"
steps:
- name: Set up Node.js
- name: Set up Node.js ${{ inputs.node-version }}
# Use whatever version of setup-node you actually want here
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
cache: ${{ inputs.cache }}
cache-dependency-path: ${{ inputs.cache-dependency-path }}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to change the npm version globally, because it causes compatibility issues with the lock files. We only need >= 11.x for the publishing step.

- name: Update npm to at least 11.5.1
shell: bash
run: |
npm install -g npm@11
echo "npm version: $(npm --version)"
12 changes: 7 additions & 5 deletions .github/workflows/deploy-npm-hash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Install dependencies
working-directory: libraries/js
run: npm i
run: npm ci

- name: build
working-directory: libraries/js
Expand All @@ -33,10 +33,12 @@ jobs:
shell: bash
run: npm version --new-version "v0.0.0-${FULL_SHA:0:6}" --no-git-tag-version

# Required for Granular Access Tokens
- name: NPM Access Config
run: npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_AUTH_TOKEN}}
# Until we upgrade to Node 24.x across the board, we need npm >= 11.5 to publish using GitHub OAuth
- name: Install npm 11.x
working-directory: libraries/js/dist
shell: bash
run: npm i -D npm@11.7

- name: Publish 0.0.0-<SHA:6> on NPM
working-directory: libraries/js/dist
run: npm publish --tag next --verbose --access public
run: npx npm@11.7 publish --tag next --verbose --access public
5 changes: 2 additions & 3 deletions .github/workflows/deploy-pages-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ jobs:
with:
token: ${{secrets.GITHUB_TOKEN}}

- name: Generator Tool - Install Node.js 22.x
- name: Generator Tool - Install Node.js
uses: ./.github/workflows/common/setup-node-and-npm
with:
cache: "npm" # Enabling npm caching
cache-dependency-path: |
libraries/js/package-lock.json
tools/signed-request-generator/package-lock.json
Expand Down Expand Up @@ -56,7 +55,7 @@ jobs:

- name: Build with mdBook
working-directory: docs
run: npm i && mdbook build && ls book
run: npm ci && mdbook build && ls book

- name: Structure v2 (Docs + Assets)
run: |
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/release-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ jobs:
- name: NPM Access Config
run: npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_AUTH_TOKEN}}

# Until we upgrade to Node 24.x across the board, we need npm >= 11.5 to publish using GitHub OAuth
- name: Install npm 11.x
working-directory: packages/siwf/dist
shell: bash
run: npm i -D npm@11.7

# This should NEVER publish to the "latest" tag as v1 is NEVER latest.
- name: Release on NPM
if: steps.is-full-release.outputs.is-full-release != 'true'
run: npm publish --tag v1 --access public
run: npx npm@11 publish --tag v1 --access public
working-directory: packages/siwf/dist
17 changes: 8 additions & 9 deletions .github/workflows/release-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
publish-npm:
name: Publish NPM Package
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
Comment on lines -27 to -30
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't make sense to use a matrix here; we only publish one version of the package. I left the matrix in other parts of the pipeline, because it's okay to validate our build on different versions of Node, but for publishing, just like Highlander, there can be only one.

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -37,9 +33,6 @@ jobs:
with:
cache-dependency-path: libraries/js/package-lock.json

- name: Install npm version that supports OIDC auth
run: npm install -g npm@11.5.1 # Use 'latest' or a specific version number

- name: Install dependencies
working-directory: libraries/js
run: npm ci
Expand All @@ -52,12 +45,18 @@ jobs:
working-directory: libraries/js/dist
run: npm version --new-version "${{env.NEW_RELEASE_TAG}}" --no-git-tag-version

# Until we upgrade to Node 24.x across the board, we need npm >= 11.5 to publish using GitHub OAuth
- name: Install npm 11.x
working-directory: libraries/js/dist
shell: bash
run: npm i -D npm@11.7

- name: Release on NPM @latest
if: env.NPM_LATEST == 'true'
working-directory: libraries/js/dist
run: npm publish --tag latest --access public
run: npx npm@11 publish --tag latest --access public

- name: Release on NPM without @latest
if: env.NPM_LATEST != 'true'
working-directory: libraries/js/dist
run: npm publish --tag next --access public
run: npx npm@11 publish --tag next --access public
12 changes: 9 additions & 3 deletions .github/workflows/release-web-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js ${{ matrix.node-version }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
Expand All @@ -53,12 +53,18 @@ jobs:
- name: NPM Access Config
run: npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_AUTH_TOKEN}}

# Until we upgrade to Node 24.x across the board, we need npm >= 11.5 to publish using GitHub OAuth
- name: Install npm 11.x
working-directory: libraries/sdk-web/dist
shell: bash
run: npm i -D npm@11.7

- name: Release on NPM @latest
if: env.NPM_LATEST == 'true'
working-directory: libraries/sdk-web/dist
run: npm publish --tag latest --access public
run: npx npm@11 publish --tag latest --access public

- name: Release on NPM without @latest
if: env.NPM_LATEST != 'true'
working-directory: libraries/sdk-web/dist
run: npm publish --tag next --access public
run: npx npm@11 publish --tag next --access public
4 changes: 2 additions & 2 deletions .github/workflows/verify-pr-v2-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
token: ${{secrets.GITHUB_TOKEN}}

- name: Generator Tool - Install Node.js 22.x
- name: Generator Tool - Install Node.js
uses: ./.github/workflows/common/setup-node-and-npm
with:
cache-dependency-path: |
Expand Down Expand Up @@ -50,4 +50,4 @@ jobs:

- name: Build mdBook 📚
working-directory: docs
run: npm i && mdbook build && ls book
run: npm ci && mdbook build && ls book
3 changes: 2 additions & 1 deletion .github/workflows/verify-pr-v2-lib-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build-lib-js:
strategy:
matrix:
node-version: [20.x, 22.x]
node-version: [22.x]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed validating against Node 20.x, since it's EOL. Adding support for Node 24.x can be a future task.

runs-on: ubuntu-latest

steps:
Expand All @@ -22,6 +22,7 @@ jobs:
- name: Setup Node and npm
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: ${{ matrix.node-version }}
cache-dependency-path: |
libraries/js/package-lock.json
tools/mock-siwf/package-lock.json
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/verify-pr-v2-tool-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Setup Node and npm
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: ${{ matrix.node-version }}
cache-dependency-path: |
libraries/js/package-lock.json
tools/signed-request-generator/package-lock.json
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/verify-pr-v2-web-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build-lib-sdk-web:
strategy:
matrix:
node-version: [20.x, 22.x]
node-version: [22.x]
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.53.1-noble
Expand All @@ -24,6 +24,7 @@ jobs:
- name: Setup Node and npm
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: ${{ matrix.node-version }}
cache-dependency-path: |
libraries/sdk-web/package-lock.json

Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Generated Docs
docs/src/Generator


.DS_Store


Expand Down Expand Up @@ -59,4 +58,4 @@ vite.config.ts.timestamp-*
.idea
*.iml
*.ipr
*.iws
*.iws
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 22.11.0
nodejs 22.18.0
pnpm 8.12.1
1 change: 0 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
book
package-lock.json
node_modules
css/tailwind.css
Loading