Skip to content

Commit

Permalink
compile with 4.3 (#1330)
Browse files Browse the repository at this point in the history
* compile with 4.3

* 4.2 -> 4.3

* run with 4.3.2

* fix test

* update snapshots
  • Loading branch information
johnnyreilly authored May 27, 2021
1 parent 8d722ab commit 8d81077
Show file tree
Hide file tree
Showing 1,408 changed files with 598 additions and 11,085 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
strategy:
matrix:
node: [12, 14]
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, next]
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, 4.3.2, next]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -76,7 +76,7 @@ jobs:
strategy:
matrix:
node: [12, 14]
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, next]
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, 4.3.2, next]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"mocha": "^6.0.0",
"prettier": "^2.0.5",
"rimraf": "^2.6.2",
"typescript": "^4.0.0",
"typescript": "^4.3.2",
"webpack": "^5.20.0",
"webpack-cli": "^4.5.0"
},
Expand Down
16 changes: 2 additions & 14 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,8 @@ export interface ModuleResolutionCache
moduleNameToDirectoryMap: CacheWithRedirects<PerModuleNameCache>;
clear(): void;
update(compilerOptions: typescript.CompilerOptions): void;
getPackageJsonInfoCache?(): any;
}
// Until the API has been released and ts-loader is built against a version of TypeScript that contains it - see https://github.com/microsoft/TypeScript/blob/74993a2a64bb2e423b40204bb54ff749cdd4ef54/src/compiler/moduleNameResolver.ts#L458
export interface TypeReferenceDirectiveResolutionCache {
getOrCreateCacheForDirectory(
directoryName: string,
redirectedReference?: typescript.ResolvedProjectReference
): Map<
string,
typescript.ResolvedTypeReferenceDirectiveWithFailedLookupLocations
>;
clear(): void;
update(compilerOptions: typescript.CompilerOptions): void;
}

export interface TSInstance {
compiler: typeof typescript;
compilerOptions: typescript.CompilerOptions;
Expand All @@ -187,7 +175,7 @@ export interface TSInstance {
loaderOptions: LoaderOptions;
rootFileNames: Set<string>;
moduleResolutionCache?: ModuleResolutionCache;
typeReferenceResolutionCache?: TypeReferenceDirectiveResolutionCache;
typeReferenceResolutionCache?: typescript.TypeReferenceDirectiveResolutionCache;
/**
* a cache of all the files
*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sub
\********************************/
/***/ (() => {

eval("const set = new Set([42]);\r\nfor (const value of set) {\r\n console.log(value);\r\n}\r\nconst string = 'Hello from es6 file';\r\nconsole.log(string);\r\n\n\n//# sourceURL=webpack:///./submodule-es6/index.ts?");
eval("const set = new Set([42]);\nfor (const value of set) {\n console.log(value);\n}\nconst string = 'Hello from es6 file';\nconsole.log(string);\n\n\n//# sourceURL=webpack:///./submodule-es6/index.ts?");

/***/ }),

Expand All @@ -36,7 +36,7 @@ eval("const set = new Set([42]);\r\nfor (const value of set) {\r\n console.lo
\********************************/
/***/ (() => {

eval("var string = 'Hello from es5 file';\r\nconsole.log(string);\r\n\n\n//# sourceURL=webpack:///./submodule-es5/index.ts?");
eval("var string = 'Hello from es5 file';\nconsole.log(string);\n\n\n//# sourceURL=webpack:///./submodule-es5/index.ts?");

/***/ })

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
asset bundle.js 5.08 KiB [emitted] (name: main)
runtime modules 937 bytes 4 modules
cacheable modules 248 bytes
./app.ts 52 bytes [built] [code generated]
./submodule-es5/index.ts 57 bytes [built] [code generated]
./submodule-es6/index.ts 139 bytes [built] [code generated]
webpack compiled successfully

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sub
\********************************/
/***/ (() => {

eval("const set = new Set([42]);\r\nfor (const value of set) {\r\n console.log(value);\r\n}\r\nconst string = 'Hello from es6 file';\r\nconsole.log(string);\r\n\n\n//# sourceURL=webpack:///./submodule-es6/index.ts?");
eval("const set = new Set([42]);\nfor (const value of set) {\n console.log(value);\n}\nconst string = 'Hello from es6 file';\nconsole.log(string);\n\n\n//# sourceURL=webpack:///./submodule-es6/index.ts?");

/***/ }),

Expand All @@ -36,7 +36,7 @@ eval("const set = new Set([42]);\r\nfor (const value of set) {\r\n console.lo
\********************************/
/***/ (() => {

eval("var string = 'Hello from es5 file';\r\nconsole.log(string);\r\n\n\n//# sourceURL=webpack:///./submodule-es5/index.ts?");
eval("var string = 'Hello from es5 file';\nconsole.log(string);\n\n\n//# sourceURL=webpack:///./submodule-es5/index.ts?");

/***/ })

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
asset bundle.js 5.08 KiB [emitted] (name: main)
runtime modules 937 bytes 4 modules
cacheable modules 248 bytes
./app.ts 52 bytes [built] [code generated]
./submodule-es5/index.ts 57 bytes [built] [code generated]
./submodule-es6/index.ts 139 bytes [built] [code generated]
webpack compiled successfully
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ eval("\nexports.__esModule = true;\nvar a = __webpack_require__(/*! a */ \"./nod
\*********************************/
/***/ (() => {

eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /nodeModulesMeaningfulErrorWhenImportingTs/node_modules/a/index.ts. By default, ts-loader will not compile .ts files in node_modules./nYou should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option./nSee: https://github.com/Microsoft/TypeScript/issues/12358/n at makeSourceMapAndFinish (/workspaces/ts-loader/dist/index.js:53:18)/n at successLoader (/workspaces/ts-loader/dist/index.js:40:5)/n at Object.loader (/workspaces/ts-loader/dist/index.js:23:5)\");\n\n//# sourceURL=webpack:///./node_modules/a/index.ts?");
eval("throw new Error(\"Module build failed (from ../../index.js):/nError: TypeScript emitted no output for /nodeModulesMeaningfulErrorWhenImportingTs/node_modules/a/index.ts. By default, ts-loader will not compile .ts files in node_modules./nYou should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option./nSee: https://github.com/Microsoft/TypeScript/issues/12358/n at makeSourceMapAndFinish (/workspaces/ts-loader/dist/index.js:52:18)/n at successLoader (/workspaces/ts-loader/dist/index.js:39:5)/n at Object.loader (/workspaces/ts-loader/dist/index.js:22:5)\");\n\n//# sourceURL=webpack:///./node_modules/a/index.ts?");

/***/ })

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Module build failed (from ../../index.js):
Error: TypeScript emitted no output for node_modules/a/index.ts. By default, ts-loader will not compile .ts files in node_modules.
You should not need to recompile .ts files there, but if you really want to, use the allowTsInNodeModules option.
See: https://github.com/Microsoft/TypeScript/issues/12358
at makeSourceMapAndFinish (dist/index.js:53:18)
at successLoader (dist/index.js:40:5)
at Object.loader (dist/index.js:23:5)
at makeSourceMapAndFinish (dist/index.js:52:18)
at successLoader (dist/index.js:39:5)
at Object.loader (dist/index.js:22:5)
@ ./app.ts 3:8-20

webpack compiled with 1 error

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.d.ts","../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","./index.ts"],"fileInfos":["2dc8c927c9c162a773c6bb3cdc4f3286c23f10eedc67414028f9cb5951610f60",{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},"28ead8445f54a115ea5f778da4f4f80579fbae42ac6ccc3493626084ed335839"],"options":{"composite":true,"newLine":1,"skipLibCheck":true,"sourceMap":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[6,1,3,2,5,4]},"version":"4.3.2"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
asset bundle.js 2.6 KiB [emitted] (name: main)
asset lib/tsconfig.tsbuildinfo 2.34 KiB [compared for emit]
asset lib/tsconfig.tsbuildinfo 1.05 KiB [compared for emit]
asset lib/index.js.map 188 bytes [compared for emit]
asset lib/index.js 152 bytes [compared for emit]
asset lib/index.d.ts 84 bytes [compared for emit]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.d.ts","../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","./index.ts"],"fileInfos":["2dc8c927c9c162a773c6bb3cdc4f3286c23f10eedc67414028f9cb5951610f60",{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},"28ead8445f54a115ea5f778da4f4f80579fbae42ac6ccc3493626084ed335839"],"options":{"composite":true,"newLine":1,"skipLibCheck":true,"sourceMap":true},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[6,1,3,2,5,4]},"version":"4.3.2"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
asset bundle.js 2.64 KiB [emitted] (name: main)
asset lib/tsconfig.tsbuildinfo 2.34 KiB [compared for emit]
asset lib/tsconfig.tsbuildinfo 1.05 KiB [compared for emit]
asset lib/index.js.map 188 bytes [compared for emit]
asset lib/index.js 152 bytes [compared for emit]
asset lib/index.d.ts 84 bytes [compared for emit]
Expand Down

This file was deleted.

Loading

0 comments on commit 8d81077

Please sign in to comment.