-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Share example code to repro microsoft/TypeScript#8113
To repro: 1. git clean -xdf 2. cd ext && npm install 3. cd ../A && npm install 4. cd ../B && npm install Note, TSC is set as npm prepublish, which runs it automatically after npm install.
- Loading branch information
0 parents
commit 7b778b8
Showing
13 changed files
with
135 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/**/node_modules/ | ||
/**/*.d.ts | ||
/**/*.js | ||
/**/npm-debug.log | ||
|
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 @@ | ||
# ship a minimal package, of runnable JS files | ||
# and d.ts type definitions | ||
|
||
# exclude the original .ts files | ||
/**/*.ts | ||
|
||
# re-include the d.ts files | ||
!/**/*.d.ts | ||
|
||
# exclude design-time metadata | ||
/.npmignore | ||
/tsconfig.json | ||
|
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,7 @@ | ||
import ext from 'ext'; | ||
|
||
// module augmentation block for 'ext' | ||
declare module 'ext' { | ||
} | ||
|
||
export default {}; |
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,16 @@ | ||
{ | ||
"name": "a", | ||
"version": "0.1.0", | ||
"private": true, | ||
"main": "A", | ||
"typings": "A", | ||
"devDependencies": { | ||
"typescript": "^1.8.10" | ||
}, | ||
"scripts": { | ||
"prepublish": "tsc" | ||
}, | ||
"dependencies": { | ||
"ext": "file:../ext" | ||
} | ||
} |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"target": "es5", | ||
"declaration": true | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
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 @@ | ||
# ship a minimal package, of runnable JS files | ||
# and d.ts type definitions | ||
|
||
# exclude the original .ts files | ||
/**/*.ts | ||
|
||
# re-include the d.ts files | ||
!/**/*.d.ts | ||
|
||
# exclude design-time metadata | ||
/.npmignore | ||
/tsconfig.json |
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,3 @@ | ||
// Uncomment the below line to demo the workaround | ||
// import ext from 'ext'; | ||
import modA from 'a'; |
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,17 @@ | ||
{ | ||
"name": "b", | ||
"version": "0.1.0", | ||
"private": true, | ||
"main": "B", | ||
"typings": "B", | ||
"devDependencies": { | ||
"typescript": "^1.8.10" | ||
}, | ||
"scripts": { | ||
"prepublish": "tsc" | ||
}, | ||
"dependencies": { | ||
"a": "file:../A", | ||
"ext": "file:../ext" | ||
} | ||
} |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"target": "es5", | ||
"declaration": true | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
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 @@ | ||
# ship a minimal package, of runnable JS files | ||
# and d.ts type definitions | ||
|
||
# exclude the original .ts files | ||
/**/*.ts | ||
|
||
# re-include the d.ts files | ||
!/**/*.d.ts | ||
|
||
# exclude design-time metadata | ||
/.npmignore | ||
/tsconfig.json |
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 @@ | ||
export default {}; |
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 @@ | ||
{ | ||
"name": "ext", | ||
"version": "0.1.0", | ||
"private": true, | ||
"main": "ext", | ||
"typings": "ext", | ||
"devDependencies": { | ||
"typescript": "^1.8.10" | ||
}, | ||
"scripts": { | ||
"prepublish": "tsc" | ||
} | ||
} |
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"target": "es5", | ||
"declaration": true | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |