v1.12.0
🚀 Features
- add
node_pathoption to disableNODE_PATHenv var behavior (#1031) (by @Boshen) - #202 - add DTS resolver matching TypeScript's bundler mode (#997) (by @Boshen) - #202
- support NODE_PATH module lookup (#1020) (by @Boshen) - #202
- allow access to inner data in error related types (#990) (by @sapphi-red) - #202
- allow subpath imports that start with #/ (#907) (by @Boshen) - #202
- [breaking] disallow manually passing a list of references to
TsconfigOptions::references(#902) (by @Boshen) - #202 - support tsconfig
rootDirs(#885) (by @Boshen) - #202 - (napi) expose resolve_file API as resolveFileSync and resolveFileAsync (#900) (by @Boshen)
- add
resolve_fileAPI for tsconfig auto discovery to work (#860) (by @Boshen) - #202 - port tsconfck (find tsconfig files) (#854) (by @Boshen) - #202
- add many.rs example for profiling resolver with many packages (#836) (by @Boshen) - #202
- improve error message for empty package.json files (#793) (by @Boshen) - #202
- improve PackagePathNotExported error message with condition names (by @Boshen) - #202
- add big-endian support for package.json parsing (#768) (by @Boshen) - #202
- add tsconfig discovery (#758) (by @Boshen) - #202
- add ESM file:// protocol support with comprehensive tests (#746) (by @Boshen) - #202
- only resolve file:// protocol on windows (#737) (by @Boshen) - #202
- add benchmark for package.json deserialization (#698) (by @Boshen) - #202
- (tsconfig) support
files/include/exclude(#659) (by @shulaoda) - feat(tsconfig) support
allowJsincompilerOptions(#658) (by @shulaoda) - #202 - (tsconfig) complete inheritance of
compilerOptionsfields (#657) (by @shulaoda) - support pass closure to restriction (#604) (by @JounQin) - #202
🐛 Bug Fixes
- avoid panic in resolve_file for parentless paths (#1053) (by @Boshen) - #202
- (dts) strip ./ prefix from package entry when matching typesVersions (#1051) (by @Boshen)
- (dts) expand Declaration to TypeScript|Declaration for package entry resolution (#1050) (by @Boshen)
- (dts) prefer declaration extensions over JS in exports-resolved paths (#1047) (by @Boshen)
- avoid wasm/wasi dead-code lint in NodePath (#1043) (by @Boshen) - #202
- resolve normalized path on Windows even for
symlinks: false(#1036) (by @sapphi-red) - #202 - skip unreadable tsconfig files during auto-discovery (#1033) (by @longlho) - #202
- remove invalid debug_assert for symlink + package.json (#1032) (by @Boshen) - #202
- resolve clippy unnecessary_unwrap warning (#980) (by @Boshen) - #202
- prevent tsconfig cache pollution with separate raw and built caches (#970) (by @Boshen) - #202
- use
/fixturespath for WASI target (by @Boshen) - #202 - only recreate the cache when
yarn_pnpis toggled (#943) (by @Boshen) - #202 - resolve absolute path to package with trailing slash (#942) (by @Boshen) - #202
- show yarn pnp errors as-is instead of NotFound error (#939) (by @sapphi-red) - #202
- resolve solution tsconfig for auto discovered tsconfig (#927) (by @Boshen) - #202
- fix
clone_with_options+yarn_pnp: truenot working (#916) (by @sapphi-red) - #202 - fix resolution when resolving non-relative specifier on tsconfig baseUrl (#903) (by @Boshen) - #202
- add fallback for statx NOSYS error on old kernels (#901) (by @Boshen) - #202
- correct grammatical errors in documentation and comments (#897) (by @Boshen) - #202
- resolve
node_modules/package/dir/foo.jsifnode_modules/package/dir/foo/exists (#896) (by @Boshen) - #202 - incorrect resolution when project reference extends a tsconfig without baseUrl (#882) (by @Boshen) - #202
- store PathBuf with weak pointers to handle cache clearing (#879) (by @Boshen) - #202
- apply
conditionNames: ['node', 'import']when resolving tsconfig extends (#869) (by @Boshen) - #202 - do not resolve to
node_modules/pacakge/index(#849) (by @Boshen) - #202 - use std::fs::canonicalize as a fallback when canonicalize fails (#835) (by @Boshen) - #202
- remove AT_STATX_DONT_SYNC from statx calls (#828) (by @Boshen) - #202
- (package_json) re-read file for serde_json fallback in simd implementation (#808) (by @Boshen)
- revert system file cache optimization on Linux (#810) (by @Brooooooklyn) - #202
- skip loading tsconfig.json from virtual module paths (#809) (by @sapphi-red) - #202
- don't drop canonicalized path by cache clear (#791) (by @sapphi-red) - #202
- derive Error for JSONError (#779) (by @Boshen) - #202
- tsconfig paths should not be applied to paths inside node_modules (#760) (by @Boshen) - #202
- ensure canonicalized paths remain accessible via strong references (#733) (by @Boshen) - #202
- use
Weakreferences forCachedPathto enable proper drop (#727) (by @Boshen) - #202 - (tsconfig) respect Yarn PnP when resolving
extendspaths (#656) (by @shulaoda) - allow resolving
package?query#fragmentfor packages with exports field (#655) (by @sapphi-red) - #202 - support for resolving empty tsconfig file (#602) (by @JounQin) - #202
🚜 Refactor
- remove clear_cache test that dynamically creates fixtures (by @Boshen) - #202
- move resolve and misc fixtures into fixtures/integration (by @Boshen) - #202
- replace ignored doctest with link to example (by @Boshen) - #202
- consolidate fixture directories for better test file mapping (by @Boshen) - #202
- replace
urlcrate withpercent-encoding(#1065) (by @Boshen) - #202 - clean up commented-out code in parse_package_specifier (#1035) (by @Boshen) - #202
- replace builtins.rs with nodejs-built-in-modules crate (#940) (by @Boshen) - #202
- s/self.cache.as_ref()/&self.cache (#910) (by @Boshen) - #202
- remove redundant PathBuf storage in CachedPath (#891) (by @Boshen) - #202
- remove the redundant
inner_resolverfromload_pnp(#862) (by @Boshen) - #202 - improve
DebugandDisplayforCachedPath(#861) (by @Boshen) - #202 - too_many_arguments = "allow" (#863) (by @Boshen) - #202
- change Tsconfig::parse to accept owned string; add replace_bom_with_whitespace (#859) (by @Boshen) - #202
- remove the useless getters and setters from
CompilerOptions(#858) (by @Boshen) - #202 - add
Tsconfig:references_resolved(#856) (by @Boshen) - #202 - move tsconfig resolution related code to its own file (#855) (by @Boshen) - #202
- use RwLock<Vec<Arc> for package.json storage (#838) (by @Boshen) - #202
- do not store is_symlink in CachedPathImpl (#850) (by @Boshen) - #202
- remove CachedPathImpl::canonicaling (#834) (by @Boshen) - #202
- (file_system) deduplicate read methods and use Vec (#816) (by @Boshen)
- use cfg_if and rustix in read_to_string_bypass_system_cache (#802) (by @Boshen) - #202
- remove normalize-path dependency, use internal PathUtil (#742) (by @Boshen) - #202
- remove a redundant path clone from PackageJson::parse (#725) (by @Boshen) - #202
- split src/cache.rs into logical modules (#714) (by @Boshen) - #202
📚 Documentation
- map npm package links to npmx.dev (#1028) (by @Boshen) - #202
- (README.md) update logo (#968) (by @sapphi-red)
⚡ Performance
- remove unnecessary String clone in PnP resolution (#1039) (by @Boshen) - #202
- use byte operations instead of char iteration in specifier parser (#1038) (by @Boshen) - #202
- (resolve) reuse dot-prefixed subpath in exports/imports (#1004) (by @Boshen)
- (cache) remove package.json index arena indirection (#1003) (by @Boshen)
- (tsconfig) precompile wildcard path alias matcher (#1001) (by @Boshen)
- precompile alias match metadata in resolver hot path (#999) (by @Boshen) - #202
- remove an allocation from
CachedPath::module_directory(#880) (by @Boshen) - #202 - skip searching for node_modules/@scope/package.json (#876) (by @Boshen) - #202
- remove the redundant
node_modules/package/indexcache value (#875) (by @Boshen) - #202 - cache all package.json resolutions for faster package.json lookup (#853) (by @Boshen) - #202
- do not canonicalize the entry path (#848) (by @Boshen) - #202
- remove Result from
CachedPathImpl::canonicalized(#847) (by @Boshen) - #202 - fast path for node_modules/package (#839) (by @Boshen) - #202
- cache canonicalization results at every recursion level (#843) (by @Boshen) - #202
- use IdentityHasher for visited set to avoid double hashing (#837) (by @Boshen) - #202
- optimize FileSystem metadata operations with rustix (#800) (by @Boshen) - #202
- use simd-json for package.json parsing (#761) (by @Boshen) - #202
- make url crate optional for wasm32 targets (by @Boshen) - #202
- mark error path functions as #[cold] for better optimization (#729) (by @Boshen) - #202
- bypass file system read cache if memory cache is available (#707) (by @Brooooooklyn) - #202
- use
memmapto speed up file reading (#696) (by @Boshen) - #202 - use
GetFileAttributesExWfor symlink metadata lookup on Windows (#691) (by @sapphi-red) - #202 - improve
pattern_key_compare(#639) (by @Boshen) - #202 - most specifiers don't have escaped characters (#636) (by @Boshen) - #202
🧪 Testing
- add 28 tests to improve coverage (92% → 93%) (#1082) (by @Boshen) - #202
- use CARGO_MANIFEST_DIR instead
env::current_dir(by @Boshen) - #202 - Add a test to ensure NODEJS_BUILTINS is alphabetized. (#926) (by @connorshea) - #202
- add test cases for package imports starting with
#or#/(#905) (by @Boshen) - #202 - change all fixture directory names to dashed case (#884) (by @Boshen) - #202
- add a tsconfig extend not found case (#763) (by @Boshen) - #202
- improve test coverage for edge cases (#740) (by @Boshen) - #202
- improve coverage for check_restrictions (#739) (by @Boshen) - #202
- add memory leak test (#726) (by @Boshen) - #202
- enable Windows global pnp case (#703) (by @JounQin) - #202
- (tsconfig) tweak jsx
extendstests (#666) (by @shulaoda) - make tests pass on Windows (#654) (by @sapphi-red) - #202
💼 Other
- Merge remote-tracking branch 'upstream/main' into chore/merge_upstream (by @JounQin) - #202
- add tsconfig paths alias scalability benchmark (#1002) (by @Boshen) - #202
- Revert "perf: use
memmapto speed up file reading" (#701) (by @Boshen) - #202 - Add comprehensive tests for tsconfig extends functionality (#660) (by @Copilot) - #202
- Expose the
ExtendsFieldenum of TsConfig (#607) (by @ostenbom) - #202