586b0d5011
* Initial support for module: node12 * Add allowJs and declaration emit enabled tests * Fix typos * cts, mts, cjs, mjs, etc extension support * Fix watch of files whose intepretation changes due to a package.json update * Minor PR feedback * Adjust error message * Initial import/export/self-name support * Accept new error codes * TypesVersions support in export/import map conditions * Fix import suggestion and autoimport default extensions under new resolution modes * Add tests for import maps non-relative name lookup feature * Fix isDeclarationFileName for .d.mts and .d.cts * Preserve new extensions when generating module specifiers * Fix spurious implict any suggestion caused by file ordering bug and optimize import name format detection by relying on parents being set * Fix a bunch of incremental bugs that dont repro under fourslash for some reason * Accept updated baseline * Always include extensions on completions for cjs/mjs style imports * String completion relative import suggestions respect the mode of the import when choosing if they provide extensions * Style feedback * Change diagnostic case
109 lines
4.5 KiB
Plaintext
109 lines
4.5 KiB
Plaintext
=== tests/cases/conformance/node/index.ts ===
|
|
// esm format file
|
|
No type information for this code.export {};
|
|
No type information for this code.=== tests/cases/conformance/node/index.mts ===
|
|
// esm format file
|
|
No type information for this code.export {};
|
|
No type information for this code.=== tests/cases/conformance/node/index.cts ===
|
|
// cjs format file
|
|
No type information for this code.export {};
|
|
No type information for this code.=== tests/cases/conformance/node/other.ts ===
|
|
// esm format file
|
|
export const a = await import("package/cjs");
|
|
>a : Symbol(a, Decl(other.ts, 1, 12))
|
|
>"package/cjs" : Symbol("tests/cases/conformance/node/index", Decl(index.cts, 0, 0))
|
|
|
|
export const b = await import("package/mjs");
|
|
>b : Symbol(b, Decl(other.ts, 2, 12))
|
|
>"package/mjs" : Symbol("tests/cases/conformance/node/index", Decl(index.mts, 0, 0))
|
|
|
|
export const c = await import("package");
|
|
>c : Symbol(c, Decl(other.ts, 3, 12))
|
|
>"package" : Symbol("tests/cases/conformance/node/index", Decl(index.ts, 0, 0))
|
|
|
|
export const f = await import("inner");
|
|
>f : Symbol(f, Decl(other.ts, 4, 12))
|
|
>"inner" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.ts, 0, 0))
|
|
|
|
=== tests/cases/conformance/node/other2.ts ===
|
|
// esm format file
|
|
export const d = await import("inner/cjs");
|
|
>d : Symbol(d, Decl(other2.ts, 1, 12))
|
|
>"inner/cjs" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.cts, 0, 0))
|
|
|
|
export const e = await import("inner/mjs");
|
|
>e : Symbol(e, Decl(other2.ts, 2, 12))
|
|
>"inner/mjs" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.mts, 0, 0))
|
|
|
|
=== tests/cases/conformance/node/other.mts ===
|
|
// esm format file
|
|
export const a = await import("package/cjs");
|
|
>a : Symbol(a, Decl(other.mts, 1, 12))
|
|
>"package/cjs" : Symbol("tests/cases/conformance/node/index", Decl(index.cts, 0, 0))
|
|
|
|
export const b = await import("package/mjs");
|
|
>b : Symbol(b, Decl(other.mts, 2, 12))
|
|
>"package/mjs" : Symbol("tests/cases/conformance/node/index", Decl(index.mts, 0, 0))
|
|
|
|
export const c = await import("package");
|
|
>c : Symbol(c, Decl(other.mts, 3, 12))
|
|
>"package" : Symbol("tests/cases/conformance/node/index", Decl(index.ts, 0, 0))
|
|
|
|
export const f = await import("inner");
|
|
>f : Symbol(f, Decl(other.mts, 4, 12))
|
|
>"inner" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.ts, 0, 0))
|
|
|
|
=== tests/cases/conformance/node/other2.mts ===
|
|
// esm format file
|
|
export const d = await import("inner/cjs");
|
|
>d : Symbol(d, Decl(other2.mts, 1, 12))
|
|
>"inner/cjs" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.cts, 0, 0))
|
|
|
|
export const e = await import("inner/mjs");
|
|
>e : Symbol(e, Decl(other2.mts, 2, 12))
|
|
>"inner/mjs" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.mts, 0, 0))
|
|
|
|
=== tests/cases/conformance/node/other.cts ===
|
|
// cjs format file, no TLA
|
|
export const a = import("package/cjs");
|
|
>a : Symbol(a, Decl(other.cts, 1, 12))
|
|
>"package/cjs" : Symbol("tests/cases/conformance/node/index", Decl(index.cts, 0, 0))
|
|
|
|
export const b = import("package/mjs");
|
|
>b : Symbol(b, Decl(other.cts, 2, 12))
|
|
>"package/mjs" : Symbol("tests/cases/conformance/node/index", Decl(index.mts, 0, 0))
|
|
|
|
export const c = import("package");
|
|
>c : Symbol(c, Decl(other.cts, 3, 12))
|
|
>"package" : Symbol("tests/cases/conformance/node/index", Decl(index.ts, 0, 0))
|
|
|
|
export const f = import("inner");
|
|
>f : Symbol(f, Decl(other.cts, 4, 12))
|
|
>"inner" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.ts, 0, 0))
|
|
|
|
=== tests/cases/conformance/node/other2.cts ===
|
|
// cjs format file, no TLA
|
|
export const d = import("inner/cjs");
|
|
>d : Symbol(d, Decl(other2.cts, 1, 12))
|
|
>"inner/cjs" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.cts, 0, 0))
|
|
|
|
export const e = import("inner/mjs");
|
|
>e : Symbol(e, Decl(other2.cts, 2, 12))
|
|
>"inner/mjs" : Symbol("tests/cases/conformance/node/node_modules/inner/index", Decl(index.d.mts, 0, 0))
|
|
|
|
=== tests/cases/conformance/node/node_modules/inner/index.d.ts ===
|
|
// cjs format file
|
|
export const cjsMain = true;
|
|
>cjsMain : Symbol(cjsMain, Decl(index.d.ts, 1, 12))
|
|
|
|
=== tests/cases/conformance/node/node_modules/inner/index.d.mts ===
|
|
// esm format file
|
|
export const esm = true;
|
|
>esm : Symbol(esm, Decl(index.d.mts, 1, 12))
|
|
|
|
=== tests/cases/conformance/node/node_modules/inner/index.d.cts ===
|
|
// cjs format file
|
|
export const cjsNonmain = true;
|
|
>cjsNonmain : Symbol(cjsNonmain, Decl(index.d.cts, 1, 12))
|
|
|