-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Don't emit any source files found under node_modules #9421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
5f8cf1a
5a45c44
d8047b6
573bfec
5e4f13f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| define(["require", "exports", "m1"], function (require, exports, m1) { | ||
| define(["require", "exports", "m1", "m4"], function (require, exports, m1, m4) { | ||
| "use strict"; | ||
| m1.f1("test"); | ||
| m1.f2.a = 10; | ||
| m1.f2.person.age = "10"; // Error: Should be number | ||
| m1.f2.person.age = "10"; // Should error if loaded the .js files correctly | ||
| var r1 = m4.test.charAt(2); // Should error if correctly not using the .js file but using @types info | ||
| var r2 = 3 + m4.foo; // Should be OK if correctly using the @types .d.ts file | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| maxDepthIncreased/root.ts(4,1): error TS2322: Type 'string' is not assignable to type 'number'. | ||
| maxDepthIncreased/root.ts(7,1): error TS2322: Type 'string' is not assignable to type 'number'. | ||
| maxDepthIncreased/root.ts(8,13): error TS2339: Property 'test' does not exist on type 'typeof "C:/src/TypeScript/tests/cases/projects/NodeModulesSearch/maxDepthIncreased/node_modules/@...'. | ||
|
|
||
|
|
||
| ==== index.js (0 errors) ==== | ||
|
|
@@ -28,11 +29,22 @@ maxDepthIncreased/root.ts(4,1): error TS2322: Type 'string' is not assignable to | |
|
|
||
| exports.f2 = m2; | ||
|
|
||
| ==== maxDepthIncreased/root.ts (1 errors) ==== | ||
| ==== entry.d.ts (0 errors) ==== | ||
| export declare var foo: number; | ||
|
|
||
| ==== maxDepthIncreased/root.ts (2 errors) ==== | ||
| import * as m1 from "m1"; | ||
| import * as m4 from "m4"; | ||
|
|
||
| m1.f1("test"); | ||
| m1.f2.a = 10; | ||
| m1.f2.person.age = "10"; // Error: Should be number | ||
|
|
||
| m1.f2.person.age = "10"; // Should error if loaded the .js files correctly | ||
| ~~~~~~~~~~~~~~~~ | ||
| !!! error TS2322: Type 'string' is not assignable to type 'number'. | ||
| let r1 = m4.test.charAt(2); // Should error if correctly not using the .js file but using @types info | ||
| ~~~~ | ||
| !!! error TS2339: Property 'test' does not exist on type 'typeof "C:/src/TypeScript/tests/cases/projects/NodeModulesSearch/maxDepthIncreased/node_modules/@...'. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @RyanCavanaugh I'm seeing this be the actual error (with full path) when a types package has an incorrect type. Is this expected? Doesn't seem very readable.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure how this happens. @vladima any ideas?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file names are always absolute in the VS case. modules do not have a name themselves. so we will use the full file name. this is something we have always done. so not a new thing. we can change that to get a user friendly name for modules to use in errors.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, but even the error message itself it kinda weird and not that helpful
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure. but again you need a user-friendly version of |
||
|
|
||
| let r2 = 3 + m4.foo; // Should be OK if correctly using the @types .d.ts file | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| "use strict"; | ||
| var m1 = require("m1"); | ||
| var m4 = require("m4"); | ||
| m1.f1("test"); | ||
| m1.f2.a = 10; | ||
| m1.f2.person.age = "10"; // Error: Should be number | ||
| m1.f2.person.age = "10"; // Should error if loaded the .js files correctly | ||
| var r1 = m4.test.charAt(2); // Should error if correctly not using the .js file but using @types info | ||
| var r2 = 3 + m4.foo; // Should be OK if correctly using the @types .d.ts file |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,10 @@ | ||
| import * as m1 from "m1"; | ||
| import * as m4 from "m4"; | ||
|
|
||
| m1.f1("test"); | ||
| m1.f2.a = 10; | ||
| m1.f2.person.age = "10"; // Error: Should be number | ||
|
|
||
| m1.f2.person.age = "10"; // Should error if loaded the .js files correctly | ||
| let r1 = m4.test.charAt(2); // Should error if correctly not using the .js file but using @types info | ||
|
|
||
| let r2 = 3 + m4.foo; // Should be OK if correctly using the @types .d.ts file |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is causing the issue in the GitHub build... need to figure out where the full path is creeping in to the error message.