-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow export map entries to remap back to input files for a program
- Loading branch information
Showing
26 changed files
with
711 additions
and
8 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
22 changes: 22 additions & 0 deletions
22
tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.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,22 @@ | ||
//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDir.ts] //// | ||
|
||
//// [package.json] | ||
{ | ||
"name": "@this/package", | ||
"type": "module", | ||
"exports": { | ||
".": "./dist/index.js" | ||
} | ||
} | ||
//// [index.ts] | ||
import * as me from "@this/package"; | ||
|
||
me.thing(); | ||
|
||
export function thing(): void {} | ||
|
||
|
||
//// [index.js] | ||
import * as me from "@this/package"; | ||
me.thing(); | ||
export function thing() { } |
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.symbols
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,12 @@ | ||
=== tests/cases/compiler/index.ts === | ||
import * as me from "@this/package"; | ||
>me : Symbol(me, Decl(index.ts, 0, 6)) | ||
|
||
me.thing(); | ||
>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
>me : Symbol(me, Decl(index.ts, 0, 6)) | ||
>thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
|
||
export function thing(): void {} | ||
>thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/nodeNextPackageSelfNameWithOutDir.types
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,13 @@ | ||
=== tests/cases/compiler/index.ts === | ||
import * as me from "@this/package"; | ||
>me : typeof me | ||
|
||
me.thing(); | ||
>me.thing() : void | ||
>me.thing : () => void | ||
>me : typeof me | ||
>thing : () => void | ||
|
||
export function thing(): void {} | ||
>thing : () => void | ||
|
29 changes: 29 additions & 0 deletions
29
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.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,29 @@ | ||
//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDir.ts] //// | ||
|
||
//// [package.json] | ||
{ | ||
"name": "@this/package", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"default": "./dist/index.js", | ||
"types": "./types/index.d.ts" | ||
} | ||
} | ||
} | ||
//// [index.ts] | ||
import * as me from "@this/package"; | ||
|
||
me.thing(); | ||
|
||
export function thing(): void {} | ||
|
||
|
||
//// [index.js] | ||
import * as me from "@this/package"; | ||
me.thing(); | ||
export function thing() { } | ||
|
||
|
||
//// [index.d.ts] | ||
export declare function thing(): void; |
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.symbols
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,12 @@ | ||
=== tests/cases/compiler/index.ts === | ||
import * as me from "@this/package"; | ||
>me : Symbol(me, Decl(index.ts, 0, 6)) | ||
|
||
me.thing(); | ||
>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
>me : Symbol(me, Decl(index.ts, 0, 6)) | ||
>thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
|
||
export function thing(): void {} | ||
>thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDir.types
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,13 @@ | ||
=== tests/cases/compiler/index.ts === | ||
import * as me from "@this/package"; | ||
>me : typeof me | ||
|
||
me.thing(); | ||
>me.thing() : void | ||
>me.thing : () => void | ||
>me : typeof me | ||
>thing : () => void | ||
|
||
export function thing(): void {} | ||
>thing : () => void | ||
|
29 changes: 29 additions & 0 deletions
29
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.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,29 @@ | ||
//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirComposite.ts] //// | ||
|
||
//// [package.json] | ||
{ | ||
"name": "@this/package", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"default": "./dist/index.js", | ||
"types": "./types/index.d.ts" | ||
} | ||
} | ||
} | ||
//// [index.ts] | ||
import * as me from "@this/package"; | ||
|
||
me.thing(); | ||
|
||
export function thing(): void {} | ||
|
||
|
||
//// [index.js] | ||
import * as me from "@this/package"; | ||
me.thing(); | ||
export function thing() { } | ||
|
||
|
||
//// [index.d.ts] | ||
export declare function thing(): void; |
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.symbols
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,12 @@ | ||
=== tests/cases/compiler/index.ts === | ||
import * as me from "@this/package"; | ||
>me : Symbol(me, Decl(index.ts, 0, 6)) | ||
|
||
me.thing(); | ||
>me.thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
>me : Symbol(me, Decl(index.ts, 0, 6)) | ||
>thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
|
||
export function thing(): void {} | ||
>thing : Symbol(thing, Decl(index.ts, 2, 11)) | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirComposite.types
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,13 @@ | ||
=== tests/cases/compiler/index.ts === | ||
import * as me from "@this/package"; | ||
>me : typeof me | ||
|
||
me.thing(); | ||
>me.thing() : void | ||
>me.thing : () => void | ||
>me : typeof me | ||
>thing : () => void | ||
|
||
export function thing(): void {} | ||
>thing : () => void | ||
|
46 changes: 46 additions & 0 deletions
46
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.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,46 @@ | ||
//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.ts] //// | ||
|
||
//// [package.json] | ||
{ | ||
"name": "@this/package", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"default": "./dist/index.js", | ||
"types": "./types/index.d.ts" | ||
} | ||
} | ||
} | ||
//// [index.ts] | ||
export {srcthing as thing} from "./src/thing.js"; | ||
//// [thing.ts] | ||
// The following import should cause `index.ts` | ||
// to be included in the build, which will, | ||
// in turn, cause the common src directory to not be `src` | ||
// (the harness is wierd here in that noImplicitReferences makes only | ||
// this file get loaded as an entrypoint and emitted, while on the | ||
// real command-line we'll crawl the imports for that set - a limitation | ||
// of the harness, I suppose) | ||
import * as me from "@this/package"; | ||
|
||
me.thing(); | ||
|
||
export function srcthing(): void {} | ||
|
||
|
||
|
||
//// [thing.js] | ||
// The following import should cause `index.ts` | ||
// to be included in the build, which will, | ||
// in turn, cause the common src directory to not be `src` | ||
// (the harness is wierd here in that noImplicitReferences makes only | ||
// this file get loaded as an entrypoint and emitted, while on the | ||
// real command-line we'll crawl the imports for that set - a limitation | ||
// of the harness, I suppose) | ||
import * as me from "@this/package"; | ||
me.thing(); | ||
export function srcthing() { } | ||
|
||
|
||
//// [thing.d.ts] | ||
export declare function srcthing(): void; |
25 changes: 25 additions & 0 deletions
25
...s/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.symbols
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,25 @@ | ||
=== tests/cases/compiler/src/thing.ts === | ||
// The following import should cause `index.ts` | ||
// to be included in the build, which will, | ||
// in turn, cause the common src directory to not be `src` | ||
// (the harness is wierd here in that noImplicitReferences makes only | ||
// this file get loaded as an entrypoint and emitted, while on the | ||
// real command-line we'll crawl the imports for that set - a limitation | ||
// of the harness, I suppose) | ||
import * as me from "@this/package"; | ||
>me : Symbol(me, Decl(thing.ts, 7, 6)) | ||
|
||
me.thing(); | ||
>me.thing : Symbol(me.thing, Decl(index.ts, 0, 8)) | ||
>me : Symbol(me, Decl(thing.ts, 7, 6)) | ||
>thing : Symbol(me.thing, Decl(index.ts, 0, 8)) | ||
|
||
export function srcthing(): void {} | ||
>srcthing : Symbol(srcthing, Decl(thing.ts, 9, 11)) | ||
|
||
|
||
=== tests/cases/compiler/index.ts === | ||
export {srcthing as thing} from "./src/thing.js"; | ||
>srcthing : Symbol(srcthing, Decl(thing.ts, 9, 11)) | ||
>thing : Symbol(thing, Decl(index.ts, 0, 8)) | ||
|
26 changes: 26 additions & 0 deletions
26
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirCompositeNestedDirs.types
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,26 @@ | ||
=== tests/cases/compiler/src/thing.ts === | ||
// The following import should cause `index.ts` | ||
// to be included in the build, which will, | ||
// in turn, cause the common src directory to not be `src` | ||
// (the harness is wierd here in that noImplicitReferences makes only | ||
// this file get loaded as an entrypoint and emitted, while on the | ||
// real command-line we'll crawl the imports for that set - a limitation | ||
// of the harness, I suppose) | ||
import * as me from "@this/package"; | ||
>me : typeof me | ||
|
||
me.thing(); | ||
>me.thing() : void | ||
>me.thing : () => void | ||
>me : typeof me | ||
>thing : () => void | ||
|
||
export function srcthing(): void {} | ||
>srcthing : () => void | ||
|
||
|
||
=== tests/cases/compiler/index.ts === | ||
export {srcthing as thing} from "./src/thing.js"; | ||
>srcthing : () => void | ||
>thing : () => void | ||
|
46 changes: 46 additions & 0 deletions
46
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.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,46 @@ | ||
//// [tests/cases/compiler/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.ts] //// | ||
|
||
//// [package.json] | ||
{ | ||
"name": "@this/package", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"default": "./dist/index.js", | ||
"types": "./types/index.d.ts" | ||
} | ||
} | ||
} | ||
//// [index.ts] | ||
export {srcthing as thing} from "./src/thing.js"; | ||
//// [thing.ts] | ||
// The following import should cause `index.ts` | ||
// to be included in the build, which will, | ||
// in turn, cause the common src directory to not be `src` | ||
// (the harness is wierd here in that noImplicitReferences makes only | ||
// this file get loaded as an entrypoint and emitted, while on the | ||
// real command-line we'll crawl the imports for that set - a limitation | ||
// of the harness, I suppose) | ||
import * as me from "@this/package"; | ||
|
||
me.thing(); | ||
|
||
export function srcthing(): void {} | ||
|
||
|
||
|
||
//// [thing.js] | ||
// The following import should cause `index.ts` | ||
// to be included in the build, which will, | ||
// in turn, cause the common src directory to not be `src` | ||
// (the harness is wierd here in that noImplicitReferences makes only | ||
// this file get loaded as an entrypoint and emitted, while on the | ||
// real command-line we'll crawl the imports for that set - a limitation | ||
// of the harness, I suppose) | ||
import * as me from "@this/package"; | ||
me.thing(); | ||
export function srcthing() { } | ||
|
||
|
||
//// [thing.d.ts] | ||
export declare function srcthing(): void; |
25 changes: 25 additions & 0 deletions
25
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.symbols
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,25 @@ | ||
=== tests/cases/compiler/src/thing.ts === | ||
// The following import should cause `index.ts` | ||
// to be included in the build, which will, | ||
// in turn, cause the common src directory to not be `src` | ||
// (the harness is wierd here in that noImplicitReferences makes only | ||
// this file get loaded as an entrypoint and emitted, while on the | ||
// real command-line we'll crawl the imports for that set - a limitation | ||
// of the harness, I suppose) | ||
import * as me from "@this/package"; | ||
>me : Symbol(me, Decl(thing.ts, 7, 6)) | ||
|
||
me.thing(); | ||
>me.thing : Symbol(me.thing, Decl(index.ts, 0, 8)) | ||
>me : Symbol(me, Decl(thing.ts, 7, 6)) | ||
>thing : Symbol(me.thing, Decl(index.ts, 0, 8)) | ||
|
||
export function srcthing(): void {} | ||
>srcthing : Symbol(srcthing, Decl(thing.ts, 9, 11)) | ||
|
||
|
||
=== tests/cases/compiler/index.ts === | ||
export {srcthing as thing} from "./src/thing.js"; | ||
>srcthing : Symbol(srcthing, Decl(thing.ts, 9, 11)) | ||
>thing : Symbol(thing, Decl(index.ts, 0, 8)) | ||
|
26 changes: 26 additions & 0 deletions
26
tests/baselines/reference/nodeNextPackageSelfNameWithOutDirDeclDirNestedDirs.types
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,26 @@ | ||
=== tests/cases/compiler/src/thing.ts === | ||
// The following import should cause `index.ts` | ||
// to be included in the build, which will, | ||
// in turn, cause the common src directory to not be `src` | ||
// (the harness is wierd here in that noImplicitReferences makes only | ||
// this file get loaded as an entrypoint and emitted, while on the | ||
// real command-line we'll crawl the imports for that set - a limitation | ||
// of the harness, I suppose) | ||
import * as me from "@this/package"; | ||
>me : typeof me | ||
|
||
me.thing(); | ||
>me.thing() : void | ||
>me.thing : () => void | ||
>me : typeof me | ||
>thing : () => void | ||
|
||
export function srcthing(): void {} | ||
>srcthing : () => void | ||
|
||
|
||
=== tests/cases/compiler/index.ts === | ||
export {srcthing as thing} from "./src/thing.js"; | ||
>srcthing : () => void | ||
>thing : () => void | ||
|
Oops, something went wrong.