Skip to content

Commit 6ee749f

Browse files
committed
Get rid of absolute paths
1 parent 751b0a6 commit 6ee749f

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.errors.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
tests/cases/compiler/index.ts(4,5): error TS2339: Property 'y' does not exist on type 'typeof "shortid"'.
1+
/index.ts(4,5): error TS2339: Property 'y' does not exist on type 'typeof "shortid"'.
22

33

4-
==== tests/cases/compiler/index.ts (1 errors) ====
5-
/// <reference path="typings/index.d.ts" />
4+
==== /index.ts (1 errors) ====
5+
/// <reference path="/typings/index.d.ts" />
66
import * as foo from "shortid";
77
foo.x // found in index.d.ts
88
foo.y // ignored from shortid/index.js
99
~
1010
!!! error TS2339: Property 'y' does not exist on type 'typeof "shortid"'.
1111

1212

13-
==== tests/cases/compiler/node_modules/shortid/node_modules/z/index.js (0 errors) ====
13+
==== /node_modules/shortid/node_modules/z/index.js (0 errors) ====
1414
// z will not be found because maxNodeModulesJsDepth: 0
1515
module.exports = { z: 'no' };
1616

17-
==== tests/cases/compiler/node_modules/shortid/index.js (0 errors) ====
17+
==== /node_modules/shortid/index.js (0 errors) ====
1818
var z = require('z');
1919
var y = { y: 'foo' };
2020
module.exports = y;
2121

22-
==== tests/cases/compiler/typings/index.d.ts (0 errors) ====
22+
==== /typings/index.d.ts (0 errors) ====
2323
declare module "shortid" {
2424
export var x: number;
2525
}
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
[
2-
"======== Resolving module 'shortid' from '/media/nathansa/src2/ts/tests/cases/compiler/index.ts'. ========",
2+
"======== Resolving module 'shortid' from '/index.ts'. ========",
33
"Explicitly specified module resolution kind: 'NodeJs'.",
44
"Loading module 'shortid' from 'node_modules' folder.",
5-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid.ts' does not exist.",
6-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid.tsx' does not exist.",
7-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid.d.ts' does not exist.",
8-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid.js' does not exist.",
9-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid.jsx' does not exist.",
10-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid/package.json' does not exist.",
11-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid/index.ts' does not exist.",
12-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid/index.tsx' does not exist.",
13-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid/index.d.ts' does not exist.",
14-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid/index.js' exist - use it as a name resolution result.",
15-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid.ts' does not exist.",
16-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid.tsx' does not exist.",
17-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid.d.ts' does not exist.",
18-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid.js' does not exist.",
19-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid.jsx' does not exist.",
20-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid/package.json' does not exist.",
21-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid/index.ts' does not exist.",
22-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid/index.tsx' does not exist.",
23-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid/index.d.ts' does not exist.",
24-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid/index.js' does not exist.",
25-
"File '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/@types/shortid/index.jsx' does not exist.",
26-
"Resolving real path for '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid/index.js', result '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid/index.js'",
27-
"======== Module name 'shortid' was successfully resolved to '/media/nathansa/src2/ts/tests/cases/compiler/node_modules/shortid/index.js'. ========"
5+
"File '/node_modules/shortid.ts' does not exist.",
6+
"File '/node_modules/shortid.tsx' does not exist.",
7+
"File '/node_modules/shortid.d.ts' does not exist.",
8+
"File '/node_modules/shortid.js' does not exist.",
9+
"File '/node_modules/shortid.jsx' does not exist.",
10+
"File '/node_modules/shortid/package.json' does not exist.",
11+
"File '/node_modules/shortid/index.ts' does not exist.",
12+
"File '/node_modules/shortid/index.tsx' does not exist.",
13+
"File '/node_modules/shortid/index.d.ts' does not exist.",
14+
"File '/node_modules/shortid/index.js' exist - use it as a name resolution result.",
15+
"File '/node_modules/@types/shortid.ts' does not exist.",
16+
"File '/node_modules/@types/shortid.tsx' does not exist.",
17+
"File '/node_modules/@types/shortid.d.ts' does not exist.",
18+
"File '/node_modules/@types/shortid.js' does not exist.",
19+
"File '/node_modules/@types/shortid.jsx' does not exist.",
20+
"File '/node_modules/@types/shortid/package.json' does not exist.",
21+
"File '/node_modules/@types/shortid/index.ts' does not exist.",
22+
"File '/node_modules/@types/shortid/index.tsx' does not exist.",
23+
"File '/node_modules/@types/shortid/index.d.ts' does not exist.",
24+
"File '/node_modules/@types/shortid/index.js' does not exist.",
25+
"File '/node_modules/@types/shortid/index.jsx' does not exist.",
26+
"Resolving real path for '/node_modules/shortid/index.js', result '/node_modules/shortid/index.js'",
27+
"======== Module name 'shortid' was successfully resolved to '/node_modules/shortid/index.js'. ========"
2828
]

tests/cases/compiler/maxNodeModuleJsDepthDefaultsToZero.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// @traceResolution: true
55
// @noEmit: true
66

7-
// @filename: tsconfig.json
7+
// @filename: /tsconfig.json
88
{
99
"compileOnSave": true,
1010
"compilerOptions": {
@@ -14,22 +14,22 @@
1414
},
1515
"exclude": [ "node_modules" ]
1616
}
17-
// @filename: node_modules/shortid/node_modules/z/index.js
17+
// @filename: /node_modules/shortid/node_modules/z/index.js
1818
// z will not be found because maxNodeModulesJsDepth: 0
1919
module.exports = { z: 'no' };
2020

21-
// @filename: node_modules/shortid/index.js
21+
// @filename: /node_modules/shortid/index.js
2222
var z = require('z');
2323
var y = { y: 'foo' };
2424
module.exports = y;
2525

26-
// @filename: typings/index.d.ts
26+
// @filename: /typings/index.d.ts
2727
declare module "shortid" {
2828
export var x: number;
2929
}
3030

31-
// @filename: index.ts
32-
/// <reference path="typings/index.d.ts" />
31+
// @filename: /index.ts
32+
/// <reference path="/typings/index.d.ts" />
3333
import * as foo from "shortid";
3434
foo.x // found in index.d.ts
3535
foo.y // ignored from shortid/index.js

0 commit comments

Comments
 (0)