Skip to content

fix: forward processUrlSearchParams through the debounce queue (#1250) #2949

fix: forward processUrlSearchParams through the debounce queue (#1250)

fix: forward processUrlSearchParams through the debounce queue (#1250) #2949

Workflow file for this run

name: CI/CD
on:
push:
branches:
- master
- beta
- next
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
env:
FORCE_COLOR: 3 # Diplay chalk colors
jobs:
lint:
name: Linting
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile --workspace-root
- name: Check monorepo with Sherif
run: pnpm run lint:sherif
- name: Check source code formatting
run: |
set +e # Allow Prettier to fail, but capture the error code
output=$(./node_modules/.bin/prettier --list-different ./packages/nuqs 2>&1)
exit_code=$?
set -e
if [ $exit_code -ne 0 ]; then
echo "$output" | while IFS= read -r file; do
echo "::warning file=$file::Prettier detected formatting issues in $file"
done
exit $exit_code
else
echo "No formatting issues found"
fi
publint:
name: Package Linting
runs-on: ubuntu-24.04-arm
needs: [ci-core]
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile --filter nuqs...
- name: Build package
run: pnpm build --filter nuqs
- name: Run publint on package.json
run: pnpm publint packages/nuqs
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: failure()
with:
status: ${{ job.status }}
jobName: publint
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
ci-core:
name: CI (core)
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile --filter nuqs...
- name: Run tests
run: pnpm run test ${{ github.event_name == 'workflow_dispatch' && '--force' || '' }} --filter nuqs
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }}
docs:
name: Docs Typecheck & Build
runs-on: ubuntu-24.04-arm
needs: [ci-core]
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter docs...
- name: Type-check docs
run: pnpm run test --filter docs
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- name: Build docs
run: pnpm run build --filter docs
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: failure()
with:
status: ${{ job.status }}
jobName: docs
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
e2e-next:
# Watch out! When changing the job name,
# update the required checks in GitHub
# branch protection settings for `next`.
name: E2E (next@${{ matrix.next-version }}${{ matrix.base-path && ' ⚾' || ''}}${{ matrix.react-compiler && ' ⚛️' || ''}})
runs-on: ubuntu-24.04-arm
needs: [ci-core]
strategy:
fail-fast: false
matrix:
# Watch out! When changing the compat grid,
# update the required checks in GitHub
# branch protection settings for `next`.
base-path: [false]
react-compiler: [false]
next-version:
# Only keep versions where there were relevant changes in the app router core,
# and the previous one to use as a baseline.
- "14.2.0"
# - '14.2.3' # before vercel/next.js#66755
- "14.2.4" # after vercel/next.js#66755
# - '14.2.7' # before vercel/next.js#69509
- "14.2.8" # after vercel/next.js#69509
- "15.0.0"
- "15.1.0"
- "15.2.0"
- latest
include:
- next-version: "14.2.0"
base-path: "/base"
- next-version: "15.0.0"
base-path: "/base"
- next-version: "latest"
base-path: "/base"
- next-version: "latest"
react-compiler: true
- next-version: "latest"
base-path: "/base"
react-compiler: true
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile ${{ matrix.next-version != 'latest' && '--filter e2e-next...' || '' }}
- name: Install Next.js version ${{ matrix.next-version }}
if: ${{ matrix.next-version != 'local' }}
run: pnpm add --filter e2e-next next@${{ matrix.next-version }}
- name: Run integration tests
run: pnpm run test ${{ github.event_name == 'workflow_dispatch' && '--force' || '' }} --filter e2e-next
env:
BASE_PATH: ${{ matrix.base-path && matrix.base-path || '/' }}
REACT_COMPILER: ${{ matrix.react-compiler }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }}
- name: Save Cypress artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
if: failure()
with:
path: packages/e2e/next/cypress/screenshots
name: ci-${{ matrix.next-version }}${{ matrix.base-path && '-basePath' || ''}}${{ matrix.react-compiler && '-react-compiler' || ''}}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: failure()
with:
status: ${{ job.status }}
jobName: next@${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.react-compiler && ' react-compiler' || ''}}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
e2e-react:
name: E2E (react-fpn-${{ matrix.full-page-nav-on-shallow-false }})
runs-on: ubuntu-24.04-arm
needs: [ci-core]
strategy:
fail-fast: false
matrix:
full-page-nav-on-shallow-false: [false, true]
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter e2e-react...
- name: Run tests
run: pnpm run test ${{ github.event_name == 'workflow_dispatch' && '--force' || '' }} --filter e2e-react
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }}
FULL_PAGE_NAV_ON_SHALLOW_FALSE: ${{ matrix.full-page-nav-on-shallow-false }}
- name: Save Cypress artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
if: failure()
with:
path: packages/e2e/react/cypress/screenshots
name: ci-react-fpn-${{ matrix.full-page-nav-on-shallow-false }}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: failure()
with:
status: ${{ job.status }}
jobName: react-fpn-${{ matrix.full-page-nav-on-shallow-false }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
e2e-react-router:
name: E2E (react-router ${{ matrix.react-router-version }})
runs-on: ubuntu-24.04-arm
needs: [ci-core]
strategy:
fail-fast: false
matrix:
react-router-version:
- "v6"
- "v7"
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter e2e-react-router-${{ matrix.react-router-version }}...
- name: Run tests
run: pnpm run test ${{ github.event_name == 'workflow_dispatch' && '--force' || '' }} --filter e2e-react-router-${{ matrix.react-router-version }}
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }}
- name: Save Cypress artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
if: failure()
with:
path: packages/e2e/react-router/${{ matrix.react-router-version }}/cypress/screenshots
name: ci-react-router-${{ matrix.react-router-version }}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: failure()
with:
status: ${{ job.status }}
jobName: react-router-${{ matrix.react-router-version }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
e2e-remix:
name: E2E (remix)
runs-on: ubuntu-24.04-arm
needs: [ci-core]
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter e2e-remix...
- name: Run tests
run: pnpm run test ${{ github.event_name == 'workflow_dispatch' && '--force' || '' }} --filter e2e-remix
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }}
- name: Save Cypress artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
if: failure()
with:
path: packages/e2e/remix/cypress/screenshots
name: ci-remix
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: failure()
with:
status: ${{ job.status }}
jobName: remix
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
e2e-tanstack-router:
name: E2E (tanstack-router)
runs-on: ubuntu-22.04-arm
needs: [ci-core]
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --filter e2e-tanstack-router...
- name: Run tests
run: pnpm run test ${{ github.event_name == 'workflow_dispatch' && '--force' || '' }} --filter e2e-tanstack-router
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }}
- name: Save Cypress artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
if: failure()
with:
path: packages/e2e/tanstack-router/cypress/screenshots
name: ci-tanstack-router
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: failure()
with:
status: ${{ job.status }}
jobName: tanstack-router
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
ci-notify:
name: Notify on Slack
runs-on: ubuntu-24.04-arm
needs:
- docs
- lint
- publint
- ci-core
- e2e-next
- e2e-react
- e2e-react-router
- e2e-remix
- e2e-tanstack-router
steps:
- uses: 47ng/actions-slack-notify@main
with:
status: ${{ job.status }}
jobName: Continuous Integration
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
cd:
name: Deployment
runs-on: ubuntu-24.04-arm
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for NPM provenance / trusted publishing
needs:
- docs
- lint
- publint
- ci-core
- e2e-next
- e2e-react
- e2e-react-router
- e2e-remix
- e2e-tanstack-router
if: ${{ github.ref_name == 'master' || github.ref_name == 'beta' }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version-file: .node-version
cache: pnpm
# Note: we do not use an external Turbo cache for publishing
# to prevent against possible cache collision attacks.
- name: Update npm # Ensure npm 11.5.1 or later is installed for OIDC trusted publishing
run: npm install -g npm@latest
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile --filter nuqs...
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Build package
run: pnpm build --filter nuqs
- name: Semantic Release
run: ../../node_modules/.bin/semantic-release
working-directory: packages/nuqs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Read package version
id: package-version
run: |
VERSION=$(jq -r '.version' package.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Released version: $VERSION"
working-directory: packages/nuqs
- name: Invalidate contributors ISR cache in the docs
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
run: |
curl -s "https://nuqs.dev/api/isr?tag=contributors&token=${{ secrets.ISR_TOKEN }}"
- name: Install dependencies
if: ${{ github.event_name == 'push' && steps.package-version.outputs.version != '0.0.0-semantically-released' }}
run: pnpm install --ignore-scripts --frozen-lockfile --filter scripts
- name: Generate release notes
id: release-notes
if: ${{ github.event_name == 'push' && steps.package-version.outputs.version != '0.0.0-semantically-released' }}
run: |
NOTES=$(./release-notes-automation.ts)
echo "$NOTES" >> $GITHUB_STEP_SUMMARY
{
echo 'notes<<EOF'
echo "$NOTES"
echo 'EOF'
} >> $GITHUB_OUTPUT
working-directory: packages/scripts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update GitHub release notes
if: ${{ github.event_name == 'push' && steps.package-version.outputs.version != '0.0.0-semantically-released' }}
run: |
echo "${{ steps.release-notes.outputs.notes }}" | \
gh release edit "v${{ steps.package-version.outputs.version }}" \
--notes-file -
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}