solid-router
solid-router copied to clipboard
Update `moduleResolution`
moduleResolution: "node" is a legacy setting that will soon be deprecated. It's intended for Node < 10.
NodeNext targets Node 16 and onwards.
Implementation
- [x] Add
.jsextension to all relative imports - [x] Replace
moduleResolutiontoNodeNext - [x] Replace
moduletoNodeNext - [x] Adds
skipLibCheck: true - [x] adds
pnpm@10to packageManager version so there aren't lockfile conflicts between local and CI
Type Analysis
Latest on NPM
| Environment | @solidjs/router |
|---|---|
| node16 (from ESM) | 🥴 Internal resolution error |
| bundler | 🟢 |
| node10 | (ignored) 🟢 |
| node16 (from CJS) | (ignored) ⚠️ ESM (dynamic import only) (ignored) 🥴 Internal resolution error |
pnpx @arethetypeswrong/cli --profile esm-only --from-npm @solidjs/router -f table
This PR
@solidjs/router |
|
|---|---|
| node10 | 🟢 |
| node16 (from CJS) | ⚠️ ESM (dynamic import only) |
| node16 (from ESM) | 🟢 (ESM) |
| bundler | 🟢 |
pnpx @arethetypeswrong/cli --profile esm-only --pack .
Final note
Since type-checks and build passes, I don't expect any decrease in compatibility going forward. But adding the .js extension even when keeping modeResolution: node seems to have helped tsc, I expect this new setting to make types more reliable.
🦋 Changeset detected
Latest commit: 4a543bda0f4848ecc56303d84b4f10d261abd20c
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @solidjs/router | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR