47ng / nuqs

Type-safe search params state manager for React frameworks - Like useState, but stored in the URL query string.
https://nuqs.47ng.com
MIT License
4.86k stars 104 forks source link

fix: Add stub CJS exports for old ESLint plugins #701

Closed franky47 closed 1 month ago

franky47 commented 1 month ago

The eslint-import-resolver-alias ESLint plugin chokes on nuqs adapters imports when running next lint:

 Error while loading rule 'import/no-cycle': Package subpath './adapters/next/app' is not defined by "exports" in /[...]/node_modules/nuqs/package.json

Adding a stub CJS file for all exports that throws with a link to the original issue seems to satisfy the module resolution graph (the contents of the file aren't actually interpreted, but there needs to be one, exports.*.require: null doesn't cut it).

Closes #691.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuqs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 10:43am
pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

pnpm add https://pkg.pr.new/nuqs@701

commit: fae1945

github-actions[bot] commented 1 month ago

:tada: This PR is included in version 2.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: