-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
141 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[options] | ||
module.system.node.resolve_dirname=node_modules | ||
module.system.node.resolve_alias=custom_resolve_dir |
53 changes: 53 additions & 0 deletions
53
tests/config_module_system_node_resolve_alias/config_module_system_node_resolve_dirname.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ subdir/sublevel.js:6:2 | ||
|
||
Cannot cast name to string literal custom_resolve_dir/testproj2 because string | ||
literal subdir/custom_resolve_dir/testproj2 [1] is incompatible with string literal | ||
custom_resolve_dir/testproj2 [2]. | ||
|
||
subdir/sublevel.js | ||
3│ import {name} from "testproj2"; | ||
4│ | ||
5│ (name: "subdir/custom_resolve_dir/testproj2"); | ||
[2] 6│ (name: "custom_resolve_dir/testproj2"); // Error: Resolve from sibling 'custom_resolve_dir' first! | ||
7│ (name: "node_modules/testproj2"); // Error: Resolve from sibling 'custom_resolve_dir' first! | ||
8│ | ||
|
||
subdir/custom_resolve_dir/testproj2/index.js | ||
[1] 3│ export var name: "subdir/custom_resolve_dir/testproj2" = "subdir/custom_resolve_dir/testproj2"; | ||
|
||
|
||
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ subdir/sublevel.js:7:2 | ||
|
||
Cannot cast name to string literal node_modules/testproj2 because string literal | ||
subdir/custom_resolve_dir/testproj2 [1] is incompatible with string literal | ||
node_modules/testproj2 [2]. | ||
|
||
subdir/sublevel.js | ||
4│ | ||
5│ (name: "subdir/custom_resolve_dir/testproj2"); | ||
6│ (name: "custom_resolve_dir/testproj2"); // Error: Resolve from sibling 'custom_resolve_dir' first! | ||
[2] 7│ (name: "node_modules/testproj2"); // Error: Resolve from sibling 'custom_resolve_dir' first! | ||
8│ | ||
|
||
subdir/custom_resolve_dir/testproj2/index.js | ||
[1] 3│ export var name: "subdir/custom_resolve_dir/testproj2" = "subdir/custom_resolve_dir/testproj2"; | ||
|
||
|
||
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ toplevel.js:6:2 | ||
|
||
Cannot cast name to string literal node_modules/testproj because string literal | ||
custom_resolve_dir/testproj [1] is incompatible with string literal | ||
node_modules/testproj [2]. | ||
|
||
toplevel.js | ||
3│ import {name} from "testproj"; | ||
4│ | ||
5│ (name: "custom_resolve_dir/testproj"); | ||
[2] 6│ (name: "node_modules/testproj"); // Error: Resolve from resolve_alias first! | ||
|
||
custom_resolve_dir/testproj/index.js | ||
[1] 3│ export var name: "custom_resolve_dir/testproj" = "custom_resolve_dir/testproj"; | ||
|
||
|
||
|
||
Found 3 errors |
3 changes: 3 additions & 0 deletions
3
tests/config_module_system_node_resolve_alias/custom_resolve_dir/testproj/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
|
||
export var name: "custom_resolve_dir/testproj" = "custom_resolve_dir/testproj"; |
3 changes: 3 additions & 0 deletions
3
tests/config_module_system_node_resolve_alias/custom_resolve_dir/testproj2/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
|
||
export var name: "custom_resolve_dir/testproj2" = "custom_resolve_dir/testproj2"; |
3 changes: 3 additions & 0 deletions
3
tests/config_module_system_node_resolve_alias/node_modules/testproj/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/config_module_system_node_resolve_alias/node_modules/testproj2/index.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/config_module_system_node_resolve_alias/subdir/custom_resolve_dir/testproj2/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
|
||
export var name: "subdir/custom_resolve_dir/testproj2" = "subdir/custom_resolve_dir/testproj2"; |
7 changes: 7 additions & 0 deletions
7
tests/config_module_system_node_resolve_alias/subdir/sublevel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @flow | ||
|
||
import {name} from "testproj2"; | ||
|
||
(name: "subdir/custom_resolve_dir/testproj2"); | ||
(name: "custom_resolve_dir/testproj2"); // Error: Resolve from sibling 'custom_resolve_dir' first! | ||
(name: "node_modules/testproj2"); // Error: Resolve from sibling 'custom_resolve_dir' first! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// @flow | ||
|
||
import {name} from "testproj"; | ||
|
||
(name: "custom_resolve_dir/testproj"); | ||
(name: "node_modules/testproj"); // Error: Resolve from resolve_alias first! |