zhangpeng
0fa24bcafc
feat(resovler): impl Into for IOError ( #1223 )
...
patch for rspack issue
[#4564 ](https://github.com/web-infra-dev/rspack/issues/4564 )
2023-11-11 23:21:51 +08:00
Boshen
63c242f765
feat(resolver): strip trailling commas from tsconfig.json ( #1198 )
...
closes #1195
2023-11-08 08:57:06 +00:00
IWANABETHATGUY
746f37a389
chore: 🤖 impl fileSystem for Arc<T> ( #1166 )
...
1. Impl `FileSystem` for `Arc<T>` when `T` satisfies `FileSystem`, it is
useful when the user wants to share the filesystem into multiple
threads.
2023-11-06 19:00:05 +08:00
IWANABETHATGUY
cedd2e904c
chore: 🤖 remove generic in FileSystem trait ( #1163 )
...
generic will make the Trait non-object safe, so use a specific type
instead a generic instead.
```rs
// Examples of non-object safe traits.
trait NotObjectSafe {
const CONST: i32 = 1; // ERROR: cannot have associated const
fn foo() {} // ERROR: associated function without Sized
fn returns(&self) -> Self; // ERROR: Self in return type
fn typed<T>(&self, x: T) {} // ERROR: has generic type parameters
fn nested(self: Rc<Box<Self>>) {} // ERROR: nested receiver not yet supported
}
struct S;
impl NotObjectSafe for S {
fn returns(&self) -> Self { S }
}
let obj: Box<dyn NotObjectSafe> = Box::new(S); // ERROR
```
2023-11-06 11:19:48 +08:00
IWANABETHATGUY
7c8342d6be
chore: 🤖 make FileSystem trait object safe ( #1157 )
2023-11-05 23:40:08 +08:00
Boshen
4886d408eb
chore(clippy): enable undocumented_unsafe_blocks
2023-10-16 15:18:14 +08:00
Boshen
db5417f9a9
refactor(clippy): allow clippy::too_many_lines
2023-10-16 15:18:11 +08:00
Boshen
eaeb63072f
refactor(clippy): allow struct_excessive_bools
2023-10-16 15:18:07 +08:00
Boshen
61bc142d95
fix(resolver): resolve tsconfig extend that are extensionless ( #971 )
2023-10-09 16:10:03 +08:00
Boshen
5dbccaa711
feat(resolver): configurable tsconfig project references ( #965 )
...
closes #942
2023-10-08 19:18:10 +08:00
Boshen
7e84369cad
refactor(resolver): move tests folder to fixtures ( #964 )
2023-10-08 13:29:02 +08:00
Boshen
384c3fc00f
fix(resolver): log error as debug so it does not print the error by default
2023-09-29 23:41:44 +13:00
Boshen
4faf3c7976
feat(resolver): add more tracing events to resolver ( #907 )
2023-09-14 15:34:51 +08:00
Boshen
b7a0b4f27f
feat(resolver): add TsconfigNotFound error ( #905 )
2023-09-13 16:36:59 +08:00
Boshen
814f71c15e
feat(resolver): add tracing-subscriber feature ( #904 )
2023-09-13 16:36:24 +08:00
Boshen
a077e877ba
fix(resolver): fix tsconfig lookup when a directory is provided ( #900 )
2023-09-13 14:20:04 +08:00
Boshen
95cae98e2b
perf(resolver): use system canonicalize to reduce total number of path hashes ( #902 )
2023-09-12 18:01:39 +08:00
Boshen
2e99af3f67
perf(resolver): used cached node_modules in package_resolve ( #901 )
2023-09-12 16:51:40 +08:00
Boshen
ad891c3af2
perf(resolver): do not search inside non-existent directories for scoped packages ( #899 )
2023-09-12 15:27:29 +08:00
Boshen
8ece5003a2
refactor(resolver): clean up load_alias ( #875 )
2023-09-09 15:32:32 +08:00
Boshen
6fdea7224a
perf(resolver): avoid double hashing by memoizing the hash ( #871 )
2023-09-09 10:56:43 +08:00
Boshen
d161de95b6
perf(resolver): optimize canonicalize ( #870 )
2023-09-08 23:03:39 +08:00
Boshen
86eb486a2f
perf(resolver): cache node_modules lookup ( #869 )
2023-09-08 20:23:01 +08:00
Boshen
5bbad73db5
feat(resolver): tsconfig project references ( #862 )
...
closes #751
2023-09-07 14:01:48 +08:00
Boshen
a47fb35c0e
fix(resolver): fix collision on hash entries ( #850 )
2023-09-04 14:04:39 +08:00
Yunfei He
5bf9dddaec
refactor(resolver): remove unnecessary RefCell ( #849 )
2023-09-04 13:27:22 +08:00
Boshen
aa7b665fe9
feat(resolver): add thiserror ( #847 )
2023-09-03 14:50:31 +08:00
Boshen
6ed57532cd
fix(resolver): fix a case where ignored package has a fallback ( #837 )
2023-09-02 17:22:35 +08:00
Boshen
7f504961ec
fix(resolver): fix a case where an alias is part of a dashed package name ( #836 )
2023-09-02 16:37:07 +08:00
Boshen
d74da2f3bf
fix(resolver): fix cases with conflicting node_modules path ( #835 )
2023-09-02 14:45:10 +08:00
Boshen
6ae6532245
fix(resolver): add test case for resolve_to_context ( #834 )
2023-09-02 12:03:07 +08:00
Boshen
47a076c226
feat(resolver): add an option to turn off builtin_modules ( #833 )
2023-09-02 11:38:03 +08:00
Boshen
129191fc44
perf(resolver): stop descending into node_modules when possible ( #821 )
2023-09-01 10:18:59 +08:00
Boshen
777cc003a5
fix(resolver): resolve exports field that are directories ( #820 )
2023-08-31 16:10:03 +08:00
Boshen
e52157976f
fix(resolver): fix resolving package_self with the correct subpath
2023-08-30 19:05:33 +08:00
Boshen
c68bafe776
fix(resolver): correct behavior for enforceExtension
2023-08-30 18:28:07 +08:00
Boshen
589a4d6cd8
fix(resolver): do not resolve browser field that are strings ( #816 )
2023-08-30 14:00:59 +08:00
Boshen
66e883ae8c
fix(resolver): make sure package name is valid when loading package self ( #810 )
2023-08-29 22:56:48 +08:00
Boshen
12798e075f
refactor: improve code coverage a little bit
2023-08-25 23:07:14 +08:00
Boshen
3d8ee2567f
feat(resolver): check for node.js core modules ( #794 )
2023-08-25 22:33:10 +08:00
Boshen
1bc1418ee6
feat(resolver): implement nested alias field ( #795 )
2023-08-25 22:32:57 +08:00
Boshen
2f0ff28f47
Rust 1.72.0 ( #784 )
2023-08-24 23:02:19 +08:00
Boshen
531e89a74a
Revert "fix(resolver): fix a case where package name and specifier is the wrong order"
...
This reverts commit caf1dfbfcd .
2023-08-24 22:03:30 +08:00
Boshen
6ab4ce0a6b
feat(resolver): implement tsconfig-paths ( #750 )
...
This PR includes 3 core functinalies of tsconfig-paths:
* matching tsconfig.compilerOptions.paths
* use tsconfig.compilerOptions.baseUrl
* extend tsconfig with tsconfig.extends
This PR does not include tsconfig.references
2023-08-17 16:24:46 +08:00
Boshen
4fa6aafa3e
feat(resolver): handle path alias with # ( #739 )
...
`#` can be:
* an actual path fragment `path#fragment`
* esm import module specifier `#import-path`
* part of a path `path/to/#/fragment`
* part of path alias `#` -> `./path/alias`
This is driving me crazy.
2023-08-14 15:04:09 +08:00
Boshen
7c3e29d421
feat(resolver): expose raw package_json value; improve print debug ( #738 )
2023-08-14 11:57:17 +08:00
Boshen
f6e3b654b1
feat(resolver): implement configurable exports_fields option ( #733 )
2023-08-14 10:18:57 +08:00
Boshen
37efbd7af3
feat(resolver): resolve # as path instead of a fragment ( #727 )
2023-08-12 23:51:37 +08:00
Boshen
9935eb1259
feat(resolver): pass on query string from alias fields
2023-08-11 19:46:57 +08:00
Boshen
17e525cc0f
feat(resolver): complete browser_field implementation
2023-08-11 19:46:57 +08:00