Skip to content

Commit 5fbfb5c

Browse files
authored
chore: Update testpack to TS 5.0 (#1608)
* chore: stub 5.0 tests * chore: fix build * feat: tgypescript 5.0.4 * feat: update snapshots * feat: remove es3 test * chore: tremove node 14, add node 18 * fix: pnpm install * fix: build * fix: pnpm * fix: pnpm * fix: pnpm * fix: pnpm karma * fix: pnpm karma * fix: pnpm karma * fix: pnpm karma * fix: pnpm karma
1 parent 9533b2d commit 5fbfb5c

File tree

2,105 files changed

+21215
-21694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,105 files changed

+21215
-21694
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/microsoft/vscode-dev-containers/tree/v0.122.1/containers/typescript-node-14/.devcontainer/Dockerfile
44
#-------------------------------------------------------------------------------------------------------------
55

6-
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:16
6+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:18
77

88
# The javascript-node image includes a non-root node user with sudo access. Use
99
# the "remoteUser" property in devcontainer.json to use it. On Linux, the container

.github/workflows/push.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
name: Execution Tests Ubuntu
4949
strategy:
5050
matrix:
51-
node: [14, 16]
51+
node: [18, 16]
5252
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, 4.3.2, 4.4.2, 4.5.2, 4.6.2, 4.7.3, 4.8.2, 4.9.3, next]
5353
runs-on: ubuntu-latest
5454
steps:
@@ -75,7 +75,7 @@ jobs:
7575
name: Execution Tests Windows
7676
strategy:
7777
matrix:
78-
node: [14, 16]
78+
node: [18, 16]
7979
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, 4.3.2, 4.4.2, 4.5.2, 4.6.2, 4.7.3, 4.8.2, 4.9.3, next]
8080
runs-on: windows-latest
8181
steps:

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:14
1+
FROM node:18
22

33
# See https://crbug.com/795759
44
RUN apt-get update && apt-get install -yq libgconf-2-4

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"mocha": "^6.0.0",
9494
"prettier": "^2.0.5",
9595
"rimraf": "^2.6.2",
96-
"typescript": "^4.9.3",
96+
"typescript": "^5.0.4",
9797
"webpack": "^5.74.0",
9898
"webpack-cli": "^4.10.0"
9999
},

src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export function getConfigParseResult(
159159
return configParseResult;
160160
}
161161

162-
const extendedConfigCache = new Map() as typescript.Map<typescript.ExtendedConfigCacheEntry>;
162+
const extendedConfigCache = new Map();
163163
export function getParsedCommandLine(
164164
compiler: typeof typescript,
165165
loaderOptions: LoaderOptions,

src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function getFileLocations(
134134

135135
export function fsReadFile(
136136
fileName: string,
137-
encoding: BufferEncoding | undefined = 'utf8'
137+
encoding: typescript.BufferEncoding | undefined = 'utf8'
138138
) {
139139
fileName = path.normalize(fileName);
140140
try {

test/comparison-tests/aliasResolution/expectedOutput-4.9/bundle.js

-67
This file was deleted.

test/comparison-tests/aliasResolution/expectedOutput-4.9/output.txt

-17
This file was deleted.

test/comparison-tests/aliasResolution/expectedOutput-4.9/patch0/bundle.js

-67
This file was deleted.

test/comparison-tests/aliasResolution/expectedOutput-4.9/patch0/output.txt

-17
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
asset bundle.js 2.64 KiB [emitted] (name: main)
2+
./app.ts 156 bytes [built] [code generated] [2 errors]
3+
./common/components/myComponent.ts 46 bytes [built] [code generated]
4+
5+
ERROR in app.ts
6+
./app.ts 1:29-53
7+
[tsl] ERROR in app.ts(1,30)
8+
 TS2307: Cannot find module 'components/myComponent' or its corresponding type declarations.
9+
ts-loader-default_609318b4f68865d3
10+
11+
ERROR in app.ts
12+
./app.ts 2:30-55
13+
[tsl] ERROR in app.ts(2,31)
14+
 TS2307: Cannot find module 'components/myComponent2' or its corresponding type declarations.
15+
ts-loader-default_609318b4f68865d3
16+
17+
webpack compiled with 2 errors
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
asset bundle.js 2.64 KiB [emitted] (name: main)
2+
cached modules 156 bytes [cached] 1 module
3+
./common/components/myComponent.ts 45 bytes [built] [code generated]
4+
5+
ERROR in app.ts
6+
./app.ts 1:29-53
7+
[tsl] ERROR in app.ts(1,30)
8+
 TS2307: Cannot find module 'components/myComponent' or its corresponding type declarations.
9+
ts-loader-default_609318b4f68865d3
10+
11+
ERROR in app.ts
12+
./app.ts 2:30-55
13+
[tsl] ERROR in app.ts(2,31)
14+
 TS2307: Cannot find module 'components/myComponent2' or its corresponding type declarations.
15+
ts-loader-default_609318b4f68865d3
16+
17+
webpack compiled with 2 errors
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3+
* This devtool is neither made for production nor for readable output files.
4+
* It uses "eval()" calls to create a separate source file in the browser devtools.
5+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6+
* or disable the default devtool with "devtool: false".
7+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8+
*/
9+
/******/ (() => { // webpackBootstrap
10+
/******/ "use strict";
11+
/******/ var __webpack_modules__ = ({
12+
13+
/***/ "./app.ts":
14+
/*!****************!*\
15+
!*** ./app.ts ***!
16+
\****************/
17+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
18+
19+
eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar myComponent = __webpack_require__(/*! components/myComponent */ \"./common/components/myComponent.ts\");\nconsole.log(myComponent);\n\n\n//# sourceURL=webpack:///./app.ts?");
20+
21+
/***/ }),
22+
23+
/***/ "./common/components/myComponent.ts":
24+
/*!******************************************!*\
25+
!*** ./common/components/myComponent.ts ***!
26+
\******************************************/
27+
/***/ ((module) => {
28+
29+
eval("\nmodule.exports = 'changed it';\n\n\n//# sourceURL=webpack:///./common/components/myComponent.ts?");
30+
31+
/***/ })
32+
33+
/******/ });
34+
/************************************************************************/
35+
/******/ // The module cache
36+
/******/ var __webpack_module_cache__ = {};
37+
/******/
38+
/******/ // The require function
39+
/******/ function __webpack_require__(moduleId) {
40+
/******/ // Check if module is in cache
41+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
42+
/******/ if (cachedModule !== undefined) {
43+
/******/ return cachedModule.exports;
44+
/******/ }
45+
/******/ // Create a new module (and put it into the cache)
46+
/******/ var module = __webpack_module_cache__[moduleId] = {
47+
/******/ // no module.id needed
48+
/******/ // no module.loaded needed
49+
/******/ exports: {}
50+
/******/ };
51+
/******/
52+
/******/ // Execute the module function
53+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
54+
/******/
55+
/******/ // Return the exports of the module
56+
/******/ return module.exports;
57+
/******/ }
58+
/******/
59+
/************************************************************************/
60+
/******/
61+
/******/ // startup
62+
/******/ // Load entry module and return exports
63+
/******/ // This entry module can't be inlined because the eval devtool is used.
64+
/******/ var __webpack_exports__ = __webpack_require__("./app.ts");
65+
/******/
66+
/******/ })()
67+
;

0 commit comments

Comments
 (0)