Skip to content

Commit ba765e4

Browse files
Copilotandrewbranch
andcommitted
Update baselines for packageJsonImportsErrors tests
Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>
1 parent be25d24 commit ba765e4

4 files changed

+62
-70
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/index.ts(2,16): error TS2877: This import uses a '.ts' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.
2+
3+
4+
==== /package.json (0 errors) ====
5+
{
6+
"name": "pkg",
7+
"type": "module",
8+
"imports": {
9+
"#foo.ts": "./foo.ts",
10+
"#internal/*": "./internal/*"
11+
},
12+
"exports": {
13+
"./*.ts": {
14+
"source": "./*.ts",
15+
"default": "./*.js"
16+
}
17+
}
18+
}
19+
20+
==== /foo.ts (0 errors) ====
21+
export {};
22+
23+
==== /internal/foo.ts (0 errors) ====
24+
export {};
25+
26+
==== /index.ts (1 errors) ====
27+
import {} from "#foo.ts"; // Ok
28+
import {} from "#internal/foo.ts"; // Error
29+
~~~~~~~~~~~~~~~~~~
30+
!!! error TS2877: This import uses a '.ts' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.
31+
import {} from "pkg/foo.ts"; // Ok

testdata/baselines/reference/submodule/conformance/packageJsonImportsErrors(module=node18).errors.txt.diff

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/index.ts(2,16): error TS2877: This import uses a '.ts' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.
2+
3+
4+
==== /package.json (0 errors) ====
5+
{
6+
"name": "pkg",
7+
"type": "module",
8+
"imports": {
9+
"#foo.ts": "./foo.ts",
10+
"#internal/*": "./internal/*"
11+
},
12+
"exports": {
13+
"./*.ts": {
14+
"source": "./*.ts",
15+
"default": "./*.js"
16+
}
17+
}
18+
}
19+
20+
==== /foo.ts (0 errors) ====
21+
export {};
22+
23+
==== /internal/foo.ts (0 errors) ====
24+
export {};
25+
26+
==== /index.ts (1 errors) ====
27+
import {} from "#foo.ts"; // Ok
28+
import {} from "#internal/foo.ts"; // Error
29+
~~~~~~~~~~~~~~~~~~
30+
!!! error TS2877: This import uses a '.ts' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path.
31+
import {} from "pkg/foo.ts"; // Ok

testdata/baselines/reference/submodule/conformance/packageJsonImportsErrors(module=nodenext).errors.txt.diff

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)