-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert symlink scenarios to virtual FS where its symlinks are correc…
…tly maintained Adds test for #36866
- Loading branch information
1 parent
9120497
commit eb34d7c
Showing
11 changed files
with
1,458 additions
and
204 deletions.
There are no files selected for viewing
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
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
48 changes: 0 additions & 48 deletions
48
...arationEmit/initial-build/when-pkg-references-sibling-package-through-indirect-symlink.js
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
...ial-build/when-same-version-is-referenced-through-source-and-another-symlinked-package.js
This file was deleted.
Oops, something went wrong.
125 changes: 125 additions & 0 deletions
125
...tionEmit/when-pkg-references-sibling-package-through-indirect-symlink-moduleCaseChange.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,125 @@ | ||
/a/lib/tsc.js -p pkg3 --listFiles | ||
//// [/user/username/projects/myProject/pkg1/dist/index.d.ts] | ||
export * from './types'; | ||
|
||
//// [/user/username/projects/myProject/pkg1/dist/types.d.ts] | ||
export declare type A = { | ||
id: string; | ||
}; | ||
export declare type B = { | ||
id: number; | ||
}; | ||
export declare type IdType = A | B; | ||
export declare class MetadataAccessor<T, D extends IdType = IdType> { | ||
readonly key: string; | ||
private constructor(); | ||
toString(): string; | ||
static create<T, D extends IdType = IdType>(key: string): MetadataAccessor<T, D>; | ||
} | ||
|
||
//// [/user/username/projects/myProject/pkg1/package.json] | ||
{"name":"@raymondfeng/pkg1","version":"1.0.0","main":"dist/index.js","typings":"dist/index.d.ts"} | ||
|
||
//// [/user/username/projects/myproject/pkg2/dist/index.d.ts] | ||
export * from './types'; | ||
|
||
//// [/user/username/projects/myproject/pkg2/dist/types.d.ts] | ||
export {MetadataAccessor} from '@raymondfeng/pkg1'; | ||
|
||
//// [/user/username/projects/myproject/pkg2/package.json] | ||
{"name":"@raymondfeng/pkg2","version":"1.0.0","main":"dist/index.js","typings":"dist/index.d.ts"} | ||
|
||
//// [/user/username/projects/myproject/pkg3/src/index.ts] | ||
export * from './keys'; | ||
|
||
//// [/user/username/projects/myproject/pkg3/src/keys.ts] | ||
import {MetadataAccessor} from "@raymondfeng/pkg2"; | ||
export const ADMIN = MetadataAccessor.create<boolean>('1'); | ||
|
||
//// [/user/username/projects/myproject/pkg3/tsconfig.json] | ||
{"compilerOptions":{"outDir":"dist","rootDir":"src","target":"es5","module":"commonjs","strict":true,"esModuleInterop":true,"declaration":true}} | ||
|
||
//// [/user/username/projects/myProject/pkg2/node_modules/@raymondfeng/pkg1] symlink(/user/username/projects/myProject/pkg1) | ||
//// [/user/username/projects/myproject/pkg3/node_modules/@raymondfeng/pkg2] symlink(/user/username/projects/myproject/pkg2) | ||
//// [/a/lib/lib.d.ts] | ||
/// <reference no-default-lib="true"/> | ||
interface Boolean {} | ||
interface Function {} | ||
interface CallableFunction {} | ||
interface NewableFunction {} | ||
interface IArguments {} | ||
interface Number { toExponential: any; } | ||
interface Object {} | ||
interface RegExp {} | ||
interface String { charAt: any; } | ||
interface Array<T> { length: number; [n: number]: T; } | ||
|
||
//// [/user/username/projects/myproject/pkg3/dist/keys.js] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ADMIN = void 0; | ||
var pkg2_1 = require("@raymondfeng/pkg2"); | ||
exports.ADMIN = pkg2_1.MetadataAccessor.create('1'); | ||
|
||
|
||
//// [/user/username/projects/myproject/pkg3/dist/keys.d.ts] | ||
import { MetadataAccessor } from "@raymondfeng/pkg2"; | ||
export declare const ADMIN: MetadataAccessor<boolean, import("../../pkg1/dist").IdType>; | ||
|
||
|
||
//// [/user/username/projects/myproject/pkg3/dist/index.js] | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./keys"), exports); | ||
|
||
|
||
//// [/user/username/projects/myproject/pkg3/dist/index.d.ts] | ||
export * from './keys'; | ||
|
||
|
||
|
||
Output:: | ||
/a/lib/lib.d.ts | ||
|
||
/user/username/projects/myProject/pkg1/dist/types.d.ts | ||
|
||
/user/username/projects/myProject/pkg1/dist/index.d.ts | ||
|
||
/user/username/projects/myproject/pkg2/dist/types.d.ts | ||
|
||
/user/username/projects/myproject/pkg2/dist/index.d.ts | ||
|
||
/user/username/projects/myproject/pkg3/src/keys.ts | ||
|
||
/user/username/projects/myproject/pkg3/src/index.ts | ||
|
||
|
||
|
||
Program root files: ["/user/username/projects/myproject/pkg3/src/index.ts","/user/username/projects/myproject/pkg3/src/keys.ts"] | ||
Program options: {"outDir":"/user/username/projects/myproject/pkg3/dist","rootDir":"/user/username/projects/myproject/pkg3/src","target":1,"module":1,"strict":true,"esModuleInterop":true,"declaration":true,"project":"/user/username/projects/myproject/pkg3","listFiles":true,"configFilePath":"/user/username/projects/myproject/pkg3/tsconfig.json"} | ||
Program files:: | ||
/a/lib/lib.d.ts | ||
/user/username/projects/myProject/pkg1/dist/types.d.ts | ||
/user/username/projects/myProject/pkg1/dist/index.d.ts | ||
/user/username/projects/myproject/pkg2/dist/types.d.ts | ||
/user/username/projects/myproject/pkg2/dist/index.d.ts | ||
/user/username/projects/myproject/pkg3/src/keys.ts | ||
/user/username/projects/myproject/pkg3/src/index.ts | ||
|
||
WatchedFiles:: | ||
|
||
FsWatches:: | ||
|
||
FsWatchesRecursive:: | ||
|
||
exitCode:: ExitStatus.Success |
125 changes: 125 additions & 0 deletions
125
...rence/tsc/declarationEmit/when-pkg-references-sibling-package-through-indirect-symlink.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,125 @@ | ||
/a/lib/tsc.js -p pkg3 --listFiles | ||
//// [/user/username/projects/myproject/pkg1/dist/index.d.ts] | ||
export * from './types'; | ||
|
||
//// [/user/username/projects/myproject/pkg1/dist/types.d.ts] | ||
export declare type A = { | ||
id: string; | ||
}; | ||
export declare type B = { | ||
id: number; | ||
}; | ||
export declare type IdType = A | B; | ||
export declare class MetadataAccessor<T, D extends IdType = IdType> { | ||
readonly key: string; | ||
private constructor(); | ||
toString(): string; | ||
static create<T, D extends IdType = IdType>(key: string): MetadataAccessor<T, D>; | ||
} | ||
|
||
//// [/user/username/projects/myproject/pkg1/package.json] | ||
{"name":"@raymondfeng/pkg1","version":"1.0.0","main":"dist/index.js","typings":"dist/index.d.ts"} | ||
|
||
//// [/user/username/projects/myproject/pkg2/dist/index.d.ts] | ||
export * from './types'; | ||
|
||
//// [/user/username/projects/myproject/pkg2/dist/types.d.ts] | ||
export {MetadataAccessor} from '@raymondfeng/pkg1'; | ||
|
||
//// [/user/username/projects/myproject/pkg2/package.json] | ||
{"name":"@raymondfeng/pkg2","version":"1.0.0","main":"dist/index.js","typings":"dist/index.d.ts"} | ||
|
||
//// [/user/username/projects/myproject/pkg3/src/index.ts] | ||
export * from './keys'; | ||
|
||
//// [/user/username/projects/myproject/pkg3/src/keys.ts] | ||
import {MetadataAccessor} from "@raymondfeng/pkg2"; | ||
export const ADMIN = MetadataAccessor.create<boolean>('1'); | ||
|
||
//// [/user/username/projects/myproject/pkg3/tsconfig.json] | ||
{"compilerOptions":{"outDir":"dist","rootDir":"src","target":"es5","module":"commonjs","strict":true,"esModuleInterop":true,"declaration":true}} | ||
|
||
//// [/user/username/projects/myproject/pkg2/node_modules/@raymondfeng/pkg1] symlink(/user/username/projects/myproject/pkg1) | ||
//// [/user/username/projects/myproject/pkg3/node_modules/@raymondfeng/pkg2] symlink(/user/username/projects/myproject/pkg2) | ||
//// [/a/lib/lib.d.ts] | ||
/// <reference no-default-lib="true"/> | ||
interface Boolean {} | ||
interface Function {} | ||
interface CallableFunction {} | ||
interface NewableFunction {} | ||
interface IArguments {} | ||
interface Number { toExponential: any; } | ||
interface Object {} | ||
interface RegExp {} | ||
interface String { charAt: any; } | ||
interface Array<T> { length: number; [n: number]: T; } | ||
|
||
//// [/user/username/projects/myproject/pkg3/dist/keys.js] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ADMIN = void 0; | ||
var pkg2_1 = require("@raymondfeng/pkg2"); | ||
exports.ADMIN = pkg2_1.MetadataAccessor.create('1'); | ||
|
||
|
||
//// [/user/username/projects/myproject/pkg3/dist/keys.d.ts] | ||
import { MetadataAccessor } from "@raymondfeng/pkg2"; | ||
export declare const ADMIN: MetadataAccessor<boolean, import("../../pkg1/dist").IdType>; | ||
|
||
|
||
//// [/user/username/projects/myproject/pkg3/dist/index.js] | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./keys"), exports); | ||
|
||
|
||
//// [/user/username/projects/myproject/pkg3/dist/index.d.ts] | ||
export * from './keys'; | ||
|
||
|
||
|
||
Output:: | ||
/a/lib/lib.d.ts | ||
|
||
/user/username/projects/myproject/pkg1/dist/types.d.ts | ||
|
||
/user/username/projects/myproject/pkg1/dist/index.d.ts | ||
|
||
/user/username/projects/myproject/pkg2/dist/types.d.ts | ||
|
||
/user/username/projects/myproject/pkg2/dist/index.d.ts | ||
|
||
/user/username/projects/myproject/pkg3/src/keys.ts | ||
|
||
/user/username/projects/myproject/pkg3/src/index.ts | ||
|
||
|
||
|
||
Program root files: ["/user/username/projects/myproject/pkg3/src/index.ts","/user/username/projects/myproject/pkg3/src/keys.ts"] | ||
Program options: {"outDir":"/user/username/projects/myproject/pkg3/dist","rootDir":"/user/username/projects/myproject/pkg3/src","target":1,"module":1,"strict":true,"esModuleInterop":true,"declaration":true,"project":"/user/username/projects/myproject/pkg3","listFiles":true,"configFilePath":"/user/username/projects/myproject/pkg3/tsconfig.json"} | ||
Program files:: | ||
/a/lib/lib.d.ts | ||
/user/username/projects/myproject/pkg1/dist/types.d.ts | ||
/user/username/projects/myproject/pkg1/dist/index.d.ts | ||
/user/username/projects/myproject/pkg2/dist/types.d.ts | ||
/user/username/projects/myproject/pkg2/dist/index.d.ts | ||
/user/username/projects/myproject/pkg3/src/keys.ts | ||
/user/username/projects/myproject/pkg3/src/index.ts | ||
|
||
WatchedFiles:: | ||
|
||
FsWatches:: | ||
|
||
FsWatchesRecursive:: | ||
|
||
exitCode:: ExitStatus.Success |
Oops, something went wrong.