File tree Expand file tree Collapse file tree 7 files changed +47
-9
lines changed Expand file tree Collapse file tree 7 files changed +47
-9
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## v6.1.2
4+ * [ don't emit declaration files for a declaration file] ( https://github.com/TypeStrong/ts-loader/pull/1015 ) (#1014 ) - thanks @gvinaccia !
5+ * [ Consume typescript apis from typescript nightly] ( https://github.com/TypeStrong/ts-loader/pull/1016 ) - thanks @sheetalkamat !
6+
37## v6.1.1
48* [ Fix SolutionBuilder watches] ( https://github.com/TypeStrong/ts-loader/pull/1003 ) and [ related fixes] ( https://github.com/TypeStrong/ts-loader/pull/1011 ) (#998 ) - thanks @sheetalkamat !
59* [ fix: no errors reported if flagged with @ts-check ] ( https://github.com/TypeStrong/ts-loader/pull/1008 ) (#1004 ) - thanks @reinholdk !
Original file line number Diff line number Diff line change 11{
22 "name" : " ts-loader" ,
3- "version" : " 6.1.1 " ,
3+ "version" : " 6.1.2 " ,
44 "description" : " TypeScript loader for webpack" ,
55 "main" : " index.js" ,
66 "types" : " dist/types/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -357,6 +357,15 @@ function provideDeclarationFilesToWebpack(
357357 }
358358}
359359
360+ function getOutputPathForBuildInfo (
361+ compiler : typeof ts ,
362+ options : ts . CompilerOptions
363+ ) {
364+ return ( compiler as any ) . getTsBuildInfoEmitOutputFilePath
365+ ? ( compiler as any ) . getTsBuildInfoEmitOutputFilePath ( options )
366+ : ( compiler as any ) . getOutputPathForBuildInfo ( options ) ;
367+ }
368+
360369/**
361370 * gather all .tsbuildinfo for the project
362371 */
@@ -375,8 +384,8 @@ function provideTsBuildInfoFilesToWebpack(
375384 instance . modifiedFiles ! . has ( path . resolve ( f ) )
376385 )
377386 ) {
378- // TODO:: update compiler to expose this
379- const buildInfoPath = ( instance . compiler as any ) . getOutputPathForBuildInfo (
387+ const buildInfoPath = getOutputPathForBuildInfo (
388+ instance . compiler ,
380389 resolvedRef . commandLine . options
381390 ) ;
382391 if ( buildInfoPath ) {
Original file line number Diff line number Diff line change @@ -490,8 +490,15 @@ function getOutputFileNames(
490490 configFile : typescript . ParsedCommandLine ,
491491 inputFileName : string
492492) : string [ ] {
493- const outputs : string [ ] = [ ] ;
494493 const ignoreCase = ! instance . compiler . sys . useCaseSensitiveFileNames ;
494+ if ( ( instance . compiler as any ) . getOutputFileNames ) {
495+ return ( instance . compiler as any ) . getOutputFileNames (
496+ configFile ,
497+ inputFileName ,
498+ ignoreCase
499+ ) ;
500+ }
501+ const outputs : string [ ] = [ ] ;
495502 const addOutput = ( fileName : string | undefined ) =>
496503 fileName && outputs . push ( fileName ) ;
497504 const js = getOutputJSFileName (
@@ -539,8 +546,6 @@ function getOutputFilesFromReference(
539546 ! options . out &&
540547 fileNames . some ( file => path . normalize ( file ) === filePath )
541548 ) {
542- // TODO api in typescript
543- // For now copying from typescript
544549 const outputFiles : typescript . OutputFile [ ] = [ ] ;
545550 getOutputFileNames (
546551 instance ,
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ const saveOutputMode = process.argv.indexOf('--save-output') !== -1;
1717const indexOfSingleTest = process . argv . indexOf ( '--single-test' ) ;
1818const singleTestToRun =
1919 indexOfSingleTest !== - 1 && process . argv [ indexOfSingleTest + 1 ] ;
20+ const indexOfTestCriteria = process . argv . indexOf ( '--match-test' ) ;
21+ const testCriteria =
22+ indexOfTestCriteria !== - 1 && new RegExp ( process . argv [ indexOfTestCriteria + 1 ] ) ;
2023
2124/** @type {string[] } */
2225let passingTests = [ ] ;
@@ -58,6 +61,12 @@ function runTests() {
5861 const testPath = path . join ( testDir , testName ) ;
5962 return fs . statSync ( testPath ) . isDirectory ( ) ;
6063 }
64+ )
65+ . filter (
66+ /**
67+ * @param {string } testName
68+ */ testName =>
69+ testCriteria ? ! ! testName . match ( testCriteria ) : true
6170 ) ;
6271
6372 // Allow multiple attempts to pass tests as they're flaky
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ process.env.NODE_ENV = 'test';
1414var indexOfSingleTest = process . argv . indexOf ( '--single-test' ) ;
1515var singleTestToRun = indexOfSingleTest !== - 1 && process . argv [ indexOfSingleTest + 1 ] ;
1616var watch = process . argv . indexOf ( '--watch' ) !== - 1 && ! ! singleTestToRun ;
17+ const indexOfTestCriteria = process . argv . indexOf ( '--match-test' ) ;
18+ const testCriteria =
19+ indexOfTestCriteria !== - 1 && new RegExp ( process . argv [ indexOfTestCriteria + 1 ] ) ;
1720
1821var passingTests = [ ] ;
1922var failingTests = [ ] ;
@@ -32,6 +35,12 @@ else {
3235 . filter ( isTestDirectory )
3336 . filter ( isHighEnoughTypeScriptVersion )
3437 . filter ( isNotHappyPackTest )
38+ . filter (
39+ /**
40+ * @param {string } testName
41+ */ testName =>
42+ testCriteria ? ! ! testName . match ( testCriteria ) : true
43+ )
3544 // .filter(isNotBabelTest)
3645 . forEach ( runTests ) ;
3746}
Original file line number Diff line number Diff line change @@ -4,8 +4,10 @@ var webpackVersion = require('webpack/package.json').version;
44var typescript = require ( 'typescript' ) ;
55var execSync = require ( 'child_process' ) . execSync ;
66
7- console . log ( 'Using webpack version ' + webpackVersion ) ;
7+ const testArgs = process . argv . length > 2 ? ` -- ${ process . argv . slice ( 2 ) . join ( " " ) } ` : "" ;
8+
9+ console . log ( 'Using webpack version --' + webpackVersion ) ;
810console . log ( 'Using typescript version ' + typescript . version ) ;
911
10- execSync ( ' yarn run comparison-tests' , { stdio : 'inherit' } ) ;
11- execSync ( ' yarn run execution-tests' , { stdio : 'inherit' } ) ;
12+ execSync ( ` yarn run comparison-tests${ testArgs } ` , { stdio : 'inherit' } ) ;
13+ execSync ( ` yarn run execution-tests${ testArgs } ` , { stdio : 'inherit' } ) ;
You can’t perform that action at this time.
0 commit comments