-
Notifications
You must be signed in to change notification settings - Fork 8
test: sync enhanced-resolve test cases #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stormslowly
wants to merge
8
commits into
main
Choose a base branch
from
chore/sync_enhanced_resolve
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fce0bed
test: ✅ sync enhanced resolve fixtures
stormslowly c41a17d
test: ✅ sync tests
stormslowly f4a5978
docs: 📝
stormslowly 4de4f69
test: ✅
stormslowly c5a9105
test: ✅ sync enhanced-resolve test cases; migrate to rstest
stormslowly 745d506
chore: ⬆️ update pnpm-lock
stormslowly b2ff4a9
test: add fixture files
stormslowly 8c52218
Update rstest.config.resolver.mjs
stormslowly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| fixtures/tsconfig/tsconfig_broken.json | ||
| fixtures/enhanced_resolve/test/fixtures/incorrect-package/pack1/package.json | ||
| fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/malformed-json/tsconfig.json | ||
| pnpm-lock.yaml | ||
| **/.pnp.cjs | ||
| **/.pnp.cjs |
This file contains hidden or 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
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/exports-field-invalid-package-target/a.js
This file contains hidden or 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 @@ | ||
| module.exports = 1; |
59 changes: 59 additions & 0 deletions
59
fixtures/enhanced_resolve/test/fixtures/exports-field-invalid-package-target/package.json
This file contains hidden or 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,59 @@ | ||
| { | ||
| "name": "@exports-field/bad-specifier", | ||
| "version": "1.0.0", | ||
| "exports": { | ||
| ".": [ | ||
| "", | ||
| "./a/../b/../../pack1/index.js", | ||
| "././-bad-specifier-", | ||
| "-bad-specifier-", | ||
| "file.js", | ||
| "./a.js?foo=../" | ||
| ], | ||
| "./foo/*": [ | ||
| "", | ||
| "./a/../b/../../pack1/index.js", | ||
| "././-bad-specifier-", | ||
| "-bad-specifier-", | ||
| "file.js", | ||
| "./a.js?foo=../#../" | ||
| ], | ||
| "./bar": "-bad-specifier-", | ||
| "./baz": ["-bad-specifier-"], | ||
| "./baz-multi": ["-bad-specifier-", "foo"], | ||
| "./pattern/*.js": { | ||
| "default": ["-bad-specifier-", "./*.js"] | ||
| }, | ||
| "./slash": ["/bar", "./a.js"], | ||
| "./no-slash": [".bar", "./a.js"], | ||
| "./utils/": { | ||
| "browser": "/a/", | ||
| "default": "/b/" | ||
| }, | ||
| "./utils1/": "/a/", | ||
| "./utils2/": { | ||
| "default": "../this/" | ||
| }, | ||
| "./utils3/*": { | ||
| "default": "../this/*" | ||
| }, | ||
| "./utils4/*": "../src/*", | ||
| "./utils5/": "../src/", | ||
| "./*": ".", | ||
| "./valid/*.js": { | ||
| "default": ["-bad-specifier-", "./*.js"] | ||
| }, | ||
| "./non-existent.js": ["-bad-specifier-", "./non-existent.js", "./a.js"], | ||
| "./bad-specifier.js": ["-bad-specifier-", "../../a.js", "./a.js"], | ||
| "./bad-specifier1.js": ["-bad-specifier-", "foo", "./a.js"], | ||
| "./dep/multi": ["../../test", "./a.js"], | ||
| "./dep/multi1": ["../../test", "../../test/foo"], | ||
| "./dep/multi2": ["../../test"], | ||
| "./dep/multi3": ["./a/../b/../../pack1/index.js", "./a.js"], | ||
| "./dep/multi4": [ | ||
| "./a/../b/../../pack1/index.js", | ||
| "./c/../b/../../pack1/index.js" | ||
| ], | ||
| "./dep/multi5": ["./a/../b/../../pack1/index.js"] | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
fixtures/enhanced_resolve/test/fixtures/imports-field-chain/package.json
This file contains hidden or 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 @@ | ||
| { | ||
| "name": "imports-field-chain", | ||
| "imports": { | ||
| "#a": "#b", | ||
| "#b": "./the.js" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/imports-field-chain/the.js
This file contains hidden or 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 @@ | ||
| module.exports = "the"; |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/imports-field-different/a.js
This file contains hidden or 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 @@ | ||
| module.exports = 1; |
42 changes: 42 additions & 0 deletions
42
fixtures/enhanced_resolve/test/fixtures/imports-field-different/package.json
This file contains hidden or 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,42 @@ | ||
| { | ||
| "name": "@exports-field/bad-specifier", | ||
| "version": "1.0.0", | ||
| "imports": { | ||
| "/utils/": "./a/", | ||
| "/utils1/": { | ||
| "browser": "./a/", | ||
| "default": "./b/" | ||
| }, | ||
| "a": "a.js", | ||
| "#": "a.js", | ||
| "#/dep": "a.js", | ||
| "#dep/": "a.js", | ||
| "#dep": [ | ||
| "./a/../b/../../pack1/index.js", | ||
| "././-bad-specifier-", | ||
| "./a.js?foo=../" | ||
| ], | ||
|
|
||
| "#dep/foo/*": [ | ||
| "./a/../b/../../pack1/index.js", | ||
| "././-bad-specifier-", | ||
| "./a.js?foo=../#../" | ||
| ], | ||
| "#dep/bar": "-bad-specifier-", | ||
| "#dep/baz": ["-bad-specifier-"], | ||
| "#dep/baz-multi": ["-bad-specifier-", "not-found"], | ||
| "#dep/pattern/*.js": { | ||
| "default": ["-bad-specifier-", "./*.js"] | ||
| }, | ||
| "#dep/array": ["./a.js", "-bad-specifier-"], | ||
| "#dep/array2": ["-bad-specifier-", "./a.js"], | ||
| "#dep/array3": ["./a.js"], | ||
| "#dep/empty": "", | ||
| "#dep/with-bad": ["../foo", "./a.js"], | ||
| "#dep/with-bad2": ["./a.js", "../foo"], | ||
| "#timezones/": "./data/timezones", | ||
| "#dep/multi": ["../../test", "./a.js"], | ||
| "#dep/multi1": ["../../test", "../../test/foo"], | ||
| "#dep/multi2": ["../../test"] | ||
| } | ||
| } |
6 changes: 6 additions & 0 deletions
6
fixtures/enhanced_resolve/test/fixtures/imports-slash-pattern/package.json
This file contains hidden or 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 @@ | ||
| { | ||
| "name": "imports-slash-pattern", | ||
| "imports": { | ||
| "#/*": "./src/*" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/imports-slash-pattern/src/nested/deep.js
This file contains hidden or 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 @@ | ||
| module.exports = "deep"; |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/imports-slash-pattern/src/utils.js
This file contains hidden or 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 @@ | ||
| module.exports = "utils"; |
3 changes: 3 additions & 0 deletions
3
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/components/button.ts
This file contains hidden or 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 @@ | ||
| export function button() { | ||
| return "button"; | ||
| } |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/components/new-file.ts
This file contains hidden or 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 @@ | ||
| export const newFile = "new-file"; |
23 changes: 23 additions & 0 deletions
23
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/index.ts
This file contains hidden or 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,23 @@ | ||
| import * as foo from "foo"; | ||
| import * as file1 from "foo/file1"; | ||
|
|
||
| import * as bar from "bar/file1"; | ||
| import * as myStar from "star-bar"; | ||
| import * as longest from "longest/bar"; | ||
| import * as packagedBrowser from "browser-field-package"; | ||
| import * as packagedMain from "main-field-package"; | ||
| import * as packagedIndex from "no-main-field-package"; | ||
| import * as newFile from "utils/old-file"; | ||
|
|
||
| console.log( | ||
| "HELLO WORLD!", | ||
| foo.message, | ||
| bar.message, | ||
| file1, | ||
| longest, | ||
| myStar.message, | ||
| packagedBrowser.message, | ||
| packagedMain.message, | ||
| packagedIndex.message, | ||
| newFile | ||
| ); |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/mapped/bar/file1.ts
This file contains hidden or 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 @@ | ||
| export const message = "bar"; |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/mapped/foo/index.ts
This file contains hidden or 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 @@ | ||
| export const message = "HELLO!"; |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/mapped/longest/one.ts
This file contains hidden or 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 @@ | ||
| export const a = 1; |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/mapped/longest/three.ts
This file contains hidden or 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 @@ | ||
| export const a = 1; |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/mapped/longest/two.ts
This file contains hidden or 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 @@ | ||
| export const a = 1; |
1 change: 1 addition & 0 deletions
1
...esolve/test/fixtures/tsconfig-paths/base/src/mapped/star/browser-field-package/browser.ts
This file contains hidden or 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 @@ | ||
| export const message = "browser"; |
1 change: 1 addition & 0 deletions
1
...d_resolve/test/fixtures/tsconfig-paths/base/src/mapped/star/browser-field-package/node.ts
This file contains hidden or 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 @@ | ||
| export const message = "node"; |
5 changes: 5 additions & 0 deletions
5
...olve/test/fixtures/tsconfig-paths/base/src/mapped/star/browser-field-package/package.json
This file contains hidden or 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,5 @@ | ||
| { | ||
| "name": "browser-field", | ||
| "main": "node.ts", | ||
| "browser": "browser.ts" | ||
| } |
1 change: 1 addition & 0 deletions
1
...nced_resolve/test/fixtures/tsconfig-paths/base/src/mapped/star/main-field-package/node.ts
This file contains hidden or 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 @@ | ||
| export const message = "node"; |
4 changes: 4 additions & 0 deletions
4
...resolve/test/fixtures/tsconfig-paths/base/src/mapped/star/main-field-package/package.json
This file contains hidden or 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,4 @@ | ||
| { | ||
| "name": "main-field", | ||
| "main": "node.ts" | ||
| } |
1 change: 1 addition & 0 deletions
1
..._resolve/test/fixtures/tsconfig-paths/base/src/mapped/star/no-main-field-package/index.ts
This file contains hidden or 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 @@ | ||
| export const message = "index"; |
3 changes: 3 additions & 0 deletions
3
...olve/test/fixtures/tsconfig-paths/base/src/mapped/star/no-main-field-package/package.json
This file contains hidden or 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 @@ | ||
| { | ||
| "name": "no-main-field" | ||
| } |
1 change: 1 addition & 0 deletions
1
...ures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/mapped/star/star-bar/index.ts
This file contains hidden or 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 @@ | ||
| export const message = "Hello Star!"; |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/refs/index.ts
This file contains hidden or 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 @@ | ||
| export const message = "HELLO WORLD!"; |
3 changes: 3 additions & 0 deletions
3
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/src/utils/date.ts
This file contains hidden or 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 @@ | ||
| export function date() { | ||
| return "date"; | ||
| } |
27 changes: 27 additions & 0 deletions
27
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/base/tsconfig.json
This file contains hidden or 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,27 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "module": "commonjs", | ||
| "target": "es5", | ||
| "outDir": "./js_out", | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@components/*": [ | ||
| "${configDir}/src/utils/*", | ||
| "${configDir}/src/components/*" | ||
| ], | ||
| "@utils/*": ["./src/utils/*"], | ||
| "foo": ["${configDir}/src/mapped/foo"], | ||
| "foo/*": ["${configDir}/src/mapped/bar/*"], | ||
| "bar/*": ["./src/mapped/bar/*"], | ||
| "refs/*": ["${configDir}/src/refs/*"], | ||
| "*/old-file": ["${configDir}/src/components/new-file"], | ||
| "longest/*": [ | ||
| "${configDir}/src/mapped/longest/four.ts", | ||
| "${configDir}/src/mapped/longest/two.ts" | ||
| ], | ||
| "longest/bar": ["${configDir}/src/mapped/longest/three.ts"], | ||
| "*": ["${configDir}/src/mapped/star/*"] | ||
| }, | ||
| "composite": true | ||
| } | ||
| } |
3 changes: 3 additions & 0 deletions
3
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-base/src/components/button.ts
This file contains hidden or 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 @@ | ||
| export function button() { | ||
| return "button"; | ||
| } |
4 changes: 4 additions & 0 deletions
4
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-base/src/index.ts
This file contains hidden or 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,4 @@ | ||
| import * as button from "@components/button"; | ||
| import * as date from "@utils/date"; | ||
|
|
||
| console.log("HELLO WORLD!", button, date); |
3 changes: 3 additions & 0 deletions
3
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-base/src/utils/date.ts
This file contains hidden or 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 @@ | ||
| export function date() { | ||
| return "date"; | ||
| } |
6 changes: 6 additions & 0 deletions
6
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-base/tsconfig.json
This file contains hidden or 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 @@ | ||
| { | ||
| "extends": "${configDir}/../base/tsconfig", | ||
| "compilerOptions": { | ||
| "baseUrl": "." | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-circular/a/src/lib/foo.ts
This file contains hidden or 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 @@ | ||
| export const foo = "foo"; |
9 changes: 9 additions & 0 deletions
9
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-circular/a/tsconfig.json
This file contains hidden or 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,9 @@ | ||
| { | ||
| "extends": "${configDir}/../b/tsconfig", | ||
| "compilerOptions": { | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@lib/*": ["${configDir}/src/lib/*"] | ||
| } | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-circular/b/src/util/bar.ts
This file contains hidden or 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 @@ | ||
| export const bar = "bar"; |
9 changes: 9 additions & 0 deletions
9
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-circular/b/tsconfig.json
This file contains hidden or 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,9 @@ | ||
| { | ||
| "extends": "${configDir}/../a/tsconfig", | ||
| "compilerOptions": { | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@util/*": ["${configDir}/src/util/*"] | ||
| } | ||
| } | ||
| } |
3 changes: 3 additions & 0 deletions
3
...nced_resolve/test/fixtures/tsconfig-paths/extends-deep-baseurl/packages/app/tsconfig.json
This file contains hidden or 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 @@ | ||
| { | ||
| "extends": "../lib/tsconfig" | ||
| } |
3 changes: 3 additions & 0 deletions
3
...nced_resolve/test/fixtures/tsconfig-paths/extends-deep-baseurl/packages/lib/tsconfig.json
This file contains hidden or 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 @@ | ||
| { | ||
| "extends": "../../tsconfig-base/tsconfig" | ||
| } |
1 change: 1 addition & 0 deletions
1
...solve/test/fixtures/tsconfig-paths/extends-deep-baseurl/tsconfig-base/src/utils/format.ts
This file contains hidden or 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 @@ | ||
| export const format = (s: string) => s; |
8 changes: 8 additions & 0 deletions
8
...ced_resolve/test/fixtures/tsconfig-paths/extends-deep-baseurl/tsconfig-base/tsconfig.json
This file contains hidden or 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,8 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@base/*": ["./src/*"] | ||
| } | ||
| } | ||
| } |
3 changes: 3 additions & 0 deletions
3
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-npm/src/components/button.ts
This file contains hidden or 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 @@ | ||
| export function button() { | ||
| return "button"; | ||
| } |
4 changes: 4 additions & 0 deletions
4
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-npm/src/index.ts
This file contains hidden or 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,4 @@ | ||
| import * as button from "@components/button"; | ||
| import * as date from "@utils/date"; | ||
|
|
||
| console.log("HELLO WORLD!", button, date); |
3 changes: 3 additions & 0 deletions
3
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-npm/src/utils/date.ts
This file contains hidden or 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 @@ | ||
| export function date() { | ||
| return "date"; | ||
| } |
6 changes: 6 additions & 0 deletions
6
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-npm/tsconfig.json
This file contains hidden or 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 @@ | ||
| { | ||
| "extends": ["react/tsconfig"], | ||
| "compilerOptions": { | ||
| "baseUrl": "." | ||
| } | ||
| } | ||
3 changes: 3 additions & 0 deletions
3
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/extends-pkg-entry/tsconfig.json
This file contains hidden or 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 @@ | ||
| { | ||
| "extends": "@my-tsconfig/base" | ||
stormslowly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
1 change: 1 addition & 0 deletions
1
...res/enhanced_resolve/test/fixtures/tsconfig-paths/jsonc-comments/src/components/button.ts
This file contains hidden or 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 @@ | ||
| export const Button = "button"; |
1 change: 1 addition & 0 deletions
1
...ures/enhanced_resolve/test/fixtures/tsconfig-paths/jsonc-comments/src/mapped/bar/index.ts
This file contains hidden or 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 @@ | ||
| export const bar = "bar"; |
1 change: 1 addition & 0 deletions
1
...ures/enhanced_resolve/test/fixtures/tsconfig-paths/jsonc-comments/src/mapped/foo/index.ts
This file contains hidden or 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 @@ | ||
| export const foo = "foo"; |
14 changes: 14 additions & 0 deletions
14
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/jsonc-comments/tsconfig.json
This file contains hidden or 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,14 @@ | ||
| { | ||
| // This is a line comment | ||
| "compilerOptions": { | ||
| /* This is a block comment */ | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| // Another line comment | ||
| "@components/*": ["${configDir}/src/components/*"], | ||
| "foo": ["${configDir}/src/mapped/foo"], | ||
| /* Block comment in paths */ | ||
| "bar/*": ["${configDir}/src/mapped/bar/*"] | ||
| } | ||
| } | ||
| } |
10 changes: 10 additions & 0 deletions
10
fixtures/enhanced_resolve/test/fixtures/tsconfig-paths/malformed-json/tsconfig.json
This file contains hidden or 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,10 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "baseUrl": "./src", | ||
| "paths": { | ||
| "@components/*": ["components/*"], | ||
| // This is a comment which makes JSON invalid | ||
| "@utils/*": ["utils/*" | ||
| } | ||
| } | ||
| } |
2 changes: 2 additions & 0 deletions
2
...lve/test/fixtures/tsconfig-paths/references-project/packages/app/src/components/Button.ts
This file contains hidden or 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,2 @@ | ||
| // Button component | ||
| export const Button = "Button"; |
3 changes: 3 additions & 0 deletions
3
...nhanced_resolve/test/fixtures/tsconfig-paths/references-project/packages/app/src/index.ts
This file contains hidden or 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 @@ | ||
| export function appMain() { | ||
| return "app main"; | ||
| } |
11 changes: 11 additions & 0 deletions
11
...hanced_resolve/test/fixtures/tsconfig-paths/references-project/packages/app/tsconfig.json
This file contains hidden or 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,11 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@app/*": ["${configDir}/src/*"] | ||
| }, | ||
| "composite": true, | ||
| "outDir": "./dist" | ||
| }, | ||
| "references": [{ "path": "${configDir}/../shared" }] | ||
| } |
2 changes: 2 additions & 0 deletions
2
...enhanced_resolve/test/fixtures/tsconfig-paths/references-project/packages/shared/index.ts
This file contains hidden or 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,2 @@ | ||
| import { helper } from "utils/helper"; | ||
| export { helper }; |
2 changes: 2 additions & 0 deletions
2
...e/test/fixtures/tsconfig-paths/references-project/packages/shared/src/components/Input.ts
This file contains hidden or 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,2 @@ | ||
| // Input component | ||
| export const Input = "Input"; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.