Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: nuqs@2.0.0 #459

Merged
merged 77 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
78d049f
chore: ESM only (drop CJS support)
franky47 Jan 15, 2024
763dec5
chore: Remove deprecated APIs
franky47 Jan 15, 2024
d257d50
chore: Drop mirrorring to next-usequerystate
franky47 Jan 15, 2024
846d3d2
chore: Rename `nuqs/parsers` to `nuqs/server`
franky47 Jan 15, 2024
378b2af
chore: Fix path to server entrypoint
franky47 Jan 15, 2024
73bfcb4
chore: Add peer dep on React (for `cache`)
franky47 Jan 15, 2024
34f4329
doc: Add v2 migration docs
franky47 Jan 16, 2024
398d472
doc: Formatting
franky47 Jan 16, 2024
4e6c370
doc: Fix ESM/CJS error
franky47 Jan 16, 2024
b9a69d0
chore: Drop unnecessary ESM specifier for dev
franky47 Jan 17, 2024
112aa5f
chore: Update list of supported versions
franky47 Jan 17, 2024
4e893a2
doc: Wording
franky47 Jan 17, 2024
b9d158a
chore: Next GA is 14.1.0
franky47 Jan 18, 2024
1a1c8c4
test: Remove support for unstable shallow routing
franky47 Feb 17, 2024
8ed78d5
chore: Peer dep on fixed version for #498
franky47 Mar 26, 2024
19b5ba2
chore: Update Next.js version range to test against
franky47 Mar 26, 2024
04fb8ce
test: Test v2 against the React Compiler
franky47 Jun 27, 2024
02fbaf2
chore: Don't define the compiler flag when false
franky47 Jun 28, 2024
c7b23b4
chore: Only support next@14.2.0 and above
franky47 Jul 26, 2024
c21d727
chore: Fix linter by sorting devDeps alphabetically
franky47 Sep 6, 2024
2b22bcc
chore: Test all supported next@^14 versions
franky47 Sep 6, 2024
93c17c2
chore: Replace history patching with uSP sync
franky47 Sep 6, 2024
068cdaa
chore: Remove notification types & exports
franky47 Sep 6, 2024
32d9eb9
chore: Remove exports
franky47 Sep 6, 2024
3704ac4
chore: No more side-effects
franky47 Sep 6, 2024
275c514
chore: Remove unused sync code
franky47 Sep 7, 2024
c24a8a7
ref: Pure internal state init function (#633)
franky47 Sep 9, 2024
3cdfcdc
chore: Remove debug checking of next-usequerystate
franky47 Sep 24, 2024
d6f2856
doc: Update Next.js supported versions
franky47 Sep 24, 2024
d7481ea
doc: Remove mentions of next-usequerystate
franky47 Sep 24, 2024
85acaf7
doc: Having a little fun with naming
franky47 Sep 24, 2024
c44d877
feat: Introducing adapters for other frameworks
franky47 Sep 20, 2024
5b1e2f4
feat: Add vanilla React adapter sandbox
franky47 Sep 20, 2024
ff54936
doc: Add nuqs adapter
franky47 Sep 20, 2024
48eab6f
feat: Provide specialised adapters for both Next.js routers
franky47 Sep 23, 2024
a98f65f
chore: Remove unused internals test
franky47 Sep 23, 2024
9f287f5
doc: Add adapters in v2 migration docs
franky47 Sep 24, 2024
20ee438
feat: Add Remix adapter
franky47 Sep 25, 2024
8baff7c
chore: Move adapter to Remix root (wrapping Outlet)
franky47 Sep 26, 2024
b3f1635
doc: Wording
franky47 Sep 26, 2024
aa62b1c
feat: Add React Router adapter
franky47 Sep 26, 2024
ddb4dd3
feat: Render pretty URLs in other adapters
franky47 Sep 27, 2024
7e3ad6d
chore: Use port 4001 for Remix
franky47 Sep 27, 2024
4287810
chore: Order keys
franky47 Sep 27, 2024
7422007
feat: Add adapter for One
franky47 Oct 5, 2024
f121521
chore: Reorder optionalDependency keys
franky47 Oct 5, 2024
75e474b
chore: Fix Sherif warnings & errors
franky47 Oct 9, 2024
696ceb7
chore: Move support for One (onestack.dev) to community-based
franky47 Oct 10, 2024
64a8848
chore: Fix sherif
franky47 Oct 10, 2024
fef7256
chore: Add pre-push hook to check linter
franky47 Oct 10, 2024
badd6d8
chore: Update minimum supported Next.js version
franky47 Oct 11, 2024
50760ba
chore: Reduce the test set for regular PRs
franky47 Oct 11, 2024
0e04778
chore: Don't specify basePath for intermediary versions
franky47 Oct 11, 2024
b445881
chore: Turns out if isn't supported in matrix.include
franky47 Oct 11, 2024
d4f14cc
feat: Add custom adapters API (unstable)
franky47 Oct 16, 2024
4bb4931
doc: Update README with adapters docs
franky47 Oct 16, 2024
7342ee4
doc: Fix React Router logo in README
franky47 Oct 16, 2024
cfd4832
doc: Light/dark mode doesn't seem to work in <img> tags
franky47 Oct 16, 2024
788a35c
doc: Update migration docs with adapters breaking changes
franky47 Oct 16, 2024
97fc10c
chore: Pretty print "use client" injection
franky47 Oct 16, 2024
ad933a7
chore: Update generated next .d.ts file
franky47 Oct 16, 2024
1250e14
doc: Wording & links
franky47 Oct 16, 2024
207503d
test: Showcase usage of the NuqsTestingAdapter
franky47 Oct 21, 2024
277e2ef
chore: Split tsconfig between type-checking & emitting at build
franky47 Oct 21, 2024
5e9ca50
chore: Move urlKeys into the UseQueryStatesOptions type
franky47 Oct 21, 2024
acc988a
doc: Update breaking changes in types
franky47 Oct 21, 2024
9f6df68
doc: Add adapters docs
franky47 Oct 21, 2024
8220127
doc: Add section on testing
franky47 Oct 21, 2024
c3549f1
doc: Add v2 migration page to docs
franky47 Oct 21, 2024
e324a1c
fix: parseAsJson now requires a runtime validation function
franky47 Oct 21, 2024
217994f
doc: Fix JSON demo
franky47 Oct 21, 2024
fa88706
doc: Fix leftover uses of parseAsJson
franky47 Oct 21, 2024
b5d7d9f
chore: Add Next.js 15 to the CI test list
franky47 Oct 21, 2024
746992c
chore: Add other frameworks in issue template
franky47 Oct 21, 2024
9af3846
doc: Update options & callouts
franky47 Oct 22, 2024
fa5536d
doc: v2 announcement blog post (#687)
franky47 Oct 22, 2024
7b09577
doc: s/Next.js/React/g
franky47 Oct 22, 2024
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
32 changes: 20 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,38 @@ labels: bug
assignees: ''
---

<!-- Please read and follow the issue template. Issues submitted without a reproduction and context will take longer to resolve. -->
<!--
Please read and follow the issue template.
Issues submitted without a reproduction and context
will take longer to resolve.
-->

## Context

What's your version of `nuqs`?

```
-> Paste result from `cat package.json | grep -e nuqs -e next-usequerystate` here
-> Paste result from `cat package.json | grep -e nuqs` here
```

Next.js information (obtained by running `next info`):
What framework are you using?

```
-> Paste result from `next info` here
```
<!-- Keep whichever is relevant (✅: used, ❌ not used) -->

Are you using:
- ✅/❌ Next.js (app router)
- ✅/❌ Next.js (pages router)
- ✅/❌ React SPA (no router)
- ✅/❌ Remix
- ✅/❌ React Router
- ✅/❌ Other (please specify)

<!-- Keep whichever is relevant (✅: used, ❌ not used) -->
Which version of your framework are you using?

- ✅/❌ The app router
- ✅/❌ The pages router
- ✅/❌ The `basePath` option in your Next.js config
- ✅/❌ The experimental `windowHistorySupport` flag in your Next.js config
<!-- Note: Next.js information can obtained by running `next info` -->

```
-> Paste the relevant framework versions from your package.json here
```

## Description

Expand Down
40 changes: 14 additions & 26 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# Watch out! When changing the job name,
# update the required checks in GitHub
# branch protection settings for `next`.
name: CI (${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.window-history-support && ' WHS' || ''}})
name: CI (${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -27,22 +27,17 @@ jobs:
# update the required checks in GitHub
# branch protection settings for `next`.
base-path: [false, '/base']
window-history-support: [false]
next-version:
- '13.4'
- '13.5'
- '14.0.1'
# 14.0.2 is not compatible due to a prefetch issue
# 14.0.3 requires the WHS flag (see below)
- '14.0.4'
- latest # Current latest is 14.1.0
- local # Use the local workspace version (don't override)
include:
- next-version: '14.0.3'
window-history-support: true
# 14.0.4 doesn't require the WHS flag, but supports it
- next-version: '14.0.4'
window-history-support: true
# 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'
- latest
- local

steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
Expand All @@ -60,7 +55,6 @@ jobs:
run: pnpm run test ${{ github.ref_name == 'ci' && '--force' || '' }}
env:
BASE_PATH: ${{ matrix.base-path && matrix.base-path || '/' }}
WINDOW_HISTORY_SUPPORT: ${{ matrix.window-history-support }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }}
Expand All @@ -69,13 +63,13 @@ jobs:
if: failure()
with:
path: packages/e2e/cypress/screenshots
name: ci-${{ matrix.next-version }}${{ matrix.base-path && '-basePath' || ''}}${{ matrix.window-history-support && '-whs' || ''}}
name: ci-${{ matrix.next-version }}${{ matrix.base-path && '-basePath' || ''}}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: always()
with:
status: ${{ job.status }}
jobName: next@${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.window-history-support && ' WHS' || ''}}
jobName: next@${{ matrix.next-version }}${{ matrix.base-path && ' basePath' || ''}}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Expand All @@ -92,7 +86,7 @@ jobs:
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- name: Check monorepo with Sherif
run: pnpm dlx sherif@1.0.0 --no-install
run: pnpm run lint:sherif
- name: Check source code formatting
run: |
set +e # Allow Prettier to fail, but capture the error code
Expand Down Expand Up @@ -132,11 +126,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Mirror to next-usequerystate
run: ./scripts/mirror.sh
working-directory: packages/nuqs
continue-on-error: true
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Invalidate ISR cache for NPM in the docs
run: curl -s "https://nuqs.47ng.com/api/isr?tag=npm&token=${{ secrets.ISR_TOKEN }}"
8 changes: 5 additions & 3 deletions .github/workflows/test-against-nextjs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ env:

jobs:
test_against_nextjs_release:
name: CI (${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}})
name: CI (${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.react-compiler && ' ⚛️⚡️' || ''}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
base-path: [false, '/base']
react-compiler: [true, false]
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
Expand All @@ -35,6 +36,7 @@ jobs:
run: pnpm run test
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 }}
Expand All @@ -43,13 +45,13 @@ jobs:
if: failure()
with:
path: packages/e2e/cypress/screenshots
name: ci-${{ inputs.version }}${{ matrix.base-path && '-basePath' || ''}}
name: ci-${{ inputs.version }}${{ matrix.base-path && '-basePath' || ''}}${{ matrix.react-compiler && '-react-compiler' || ''}}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: always()
with:
status: ${{ job.status }}
jobName: next@${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}}
jobName: next@${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.react-compiler && ' ⚛️⚡️' || ''}}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ package-lock.json
.next/
.turbo/
.vercel
.tsbuildinfo
Loading
Loading