Features
fix: upgrade import-fresh from v3 to v4 (#8786)
fix: upgrade import-fresh from v3 to v4 (#8786)
Summary
Upgrades import-fresh from v3 to v4.
API changes in v4
- v3: Synchronous default export —
importFresh(modulePath)returns the module directly - v4: Factory pattern —
createImportFresh(parentURL)returns an async function; v4 is ESM-only and uses Node.js module loader hooks instead of manipulating the require cache
Changes
packages/cspell-lib/package.json: bumpimport-freshto^4.0.0; removeclear-moduledependency (no longer needed since v4 uses module loader hooks instead of Node's require cache)packages/cspell-lib/src/lib/Settings/Controller/pnpLoader.ts:- Import
createImportFreshfactory; callcreateImportFresh(pnpFileUrl)at use time insideloadPnp(), bound to the pnp file's own URL so each load is correctly scoped to the file being loaded - Make
loadPnpandloadPnpIfNeededasync - Change
cachedPnpImportsSync→cachedPnpImports(now storesPromise<LoaderResult>) - Remove
clearModule.singleusage (v4 cache-busts via loader hooks; clearing the require cache is no longer applicable) - Pass a file URL (
toFileUrl(pnpFile).href) toimportFreshsince v4 usesimport()under the hood, which requires URLs or relative specifiers for absolute paths - Use optional chaining on the module's default export to handle edge cases
- Import
test-packages/cspell-lib/test-cspell-lib-rollup/package.json: bumpimport-freshto^4.0.0test-packages/cspell-lib/test-cspell-lib-webpack/package.json: bumpimport-freshto^4.0.0
Testing
All 91 test files (1584 tests) pass, including the 10 dedicated pnpLoader tests.
feat!: Drop support for Node 20 (#8779)
feat!: Drop support for Node 20 (#8779)
Pull request overview
This PR updates the monorepo to require Node.js 22.18+ (dropping Node 20 support), aligning package engine constraints, CI matrices, and documentation with the new baseline.
Changes:
- Bump
engines.nodeacross packages/test-packages to>=22.18.0and update root@types/nodeto^22.19.15. - Update CI workflows to test Node 22/24/25 and adjust integration update workflow to Node 22.
- Remove
eslint-plugin-n“unsupported node builtins” disables now that the minimum Node version includes those built-ins.
BREAKING
feat!: Drop support for Node 20 (#8779)
feat!: Drop support for Node 20 (#8779)
Pull request overview
This PR updates the monorepo to require Node.js 22.18+ (dropping Node 20 support), aligning package engine constraints, CI matrices, and documentation with the new baseline.
Changes:
- Bump
engines.nodeacross packages/test-packages to>=22.18.0and update root@types/nodeto^22.19.15. - Update CI workflows to test Node 22/24/25 and adjust integration update workflow to Node 22.
- Remove
eslint-plugin-n“unsupported node builtins” disables now that the minimum Node version includes those built-ins.
Documentation
feat!: Drop support for Node 20 (#8779)
feat!: Drop support for Node 20 (#8779)
Pull request overview
This PR updates the monorepo to require Node.js 22.18+ (dropping Node 20 support), aligning package engine constraints, CI matrices, and documentation with the new baseline.
Changes:
- Bump
engines.nodeacross packages/test-packages to>=22.18.0and update root@types/nodeto^22.19.15. - Update CI workflows to test Node 22/24/25 and adjust integration update workflow to Node 22.
- Remove
eslint-plugin-n“unsupported node builtins” disables now that the minimum Node version includes those built-ins.