-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
Allow resolving @types that name libraries in node_modules directories above cwd
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export declare class Hello { | ||
value: string; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"transpileErrors": 0, | ||
"optionsErrors": 0, | ||
"syntaxErrors": 0, | ||
"globalErrors": 0, | ||
"semanticErrors": 0, | ||
"declarationErrors": 0, | ||
"emitErrors": 0, | ||
"emitSkipped": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export declare class Hello { | ||
value: string; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"transpileErrors": 0, | ||
"optionsErrors": 0, | ||
"syntaxErrors": 0, | ||
"globalErrors": 0, | ||
"semanticErrors": 0, | ||
"declarationErrors": 0, | ||
"emitErrors": 0, | ||
"emitSkipped": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export declare class Hello { | ||
value: string; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"transpileErrors": 0, | ||
"optionsErrors": 0, | ||
"syntaxErrors": 0, | ||
"globalErrors": 0, | ||
"semanticErrors": 0, | ||
"declarationErrors": 0, | ||
"emitErrors": 0, | ||
"emitSkipped": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export declare class Hello { | ||
value: string; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"transpileErrors": 0, | ||
"optionsErrors": 0, | ||
"syntaxErrors": 0, | ||
"globalErrors": 0, | ||
"semanticErrors": 0, | ||
"declarationErrors": 0, | ||
"emitErrors": 0, | ||
"emitSkipped": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
blargh. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
var gulp = require('gulp'); | ||
var newTS = require('../../release-2/main'); | ||
var lib = require('../../typescript/dev'); | ||
|
||
// | ||
// This is a minimal gulpfile designed to cause the error reported in #563. It | ||
// does not produce output because we don't need the output. | ||
// | ||
// This gulpfile must be executed with a `gulp` process lauched with its `cwd` | ||
// set to the directory that contains this gulpfile. Launching it from the | ||
// `gulp-typescript` project root **WILL NOT** trigger the conditions that cause | ||
// the problem. | ||
// | ||
|
||
gulp.task('default', function () { | ||
var tsProject = newTS.createProject('./sub/tsconfig.json', { | ||
typescript: lib, | ||
}); | ||
|
||
return tsProject.src() | ||
.pipe(tsProject()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var gulp = require('gulp'); | ||
var sourcemaps = require('gulp-sourcemaps'); | ||
|
||
module.exports = function(newTS, lib, output, reporter) { | ||
var tsProject = newTS.createProject('test/typesResolution/sub/tsconfig.json', { | ||
typescript: lib, | ||
}); | ||
|
||
var tsResult = tsProject.src() | ||
.pipe(sourcemaps.init()) | ||
.pipe(tsProject(reporter)) | ||
.on('error', () => {}); | ||
|
||
tsResult.dts.pipe(gulp.dest(output + '/dts')); | ||
return tsResult.js | ||
.pipe(sourcemaps.write('.', { sourceRoot: '../../../../basic/' })) | ||
.pipe(gulp.dest(output + 'js')); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export class Hello { | ||
value: string; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../tsconfig", | ||
"compilerOptions": { | ||
"types": ["node"] | ||
}, | ||
"files": [ | ||
"other-3.ts" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import other = require('./other-3'); | ||
|
||
var a = new other.Hello(); | ||
console.log(a.value); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
"module": "amd", | ||
"types": [] | ||
}, | ||
"include": [ | ||
"test-3.ts" | ||
] | ||
} |