Skip to content

Commit

Permalink
chore: Update testpack to TS 5.0 (#1608)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
johnnyreilly authored Apr 10, 2023
1 parent 9533b2d commit 5fbfb5c
Show file tree
Hide file tree
Showing 2,105 changed files with 21,215 additions and 21,694 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://github.com/microsoft/vscode-dev-containers/tree/v0.122.1/containers/typescript-node-14/.devcontainer/Dockerfile
#-------------------------------------------------------------------------------------------------------------

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

# The javascript-node image includes a non-root node user with sudo access. Use
# the "remoteUser" property in devcontainer.json to use it. On Linux, the container
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
name: Execution Tests Ubuntu
strategy:
matrix:
node: [14, 16]
node: [18, 16]
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]
runs-on: ubuntu-latest
steps:
Expand All @@ -75,7 +75,7 @@ jobs:
name: Execution Tests Windows
strategy:
matrix:
node: [14, 16]
node: [18, 16]
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]
runs-on: windows-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14
FROM node:18

# See https://crbug.com/795759
RUN apt-get update && apt-get install -yq libgconf-2-4
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.9.3",
"typescript": "^5.0.4",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export function getConfigParseResult(
return configParseResult;
}

const extendedConfigCache = new Map() as typescript.Map<typescript.ExtendedConfigCacheEntry>;
const extendedConfigCache = new Map();
export function getParsedCommandLine(
compiler: typeof typescript,
loaderOptions: LoaderOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function getFileLocations(

export function fsReadFile(
fileName: string,
encoding: BufferEncoding | undefined = 'utf8'
encoding: typescript.BufferEncoding | undefined = 'utf8'
) {
fileName = path.normalize(fileName);
try {
Expand Down
67 changes: 0 additions & 67 deletions test/comparison-tests/aliasResolution/expectedOutput-4.9/bundle.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
asset bundle.js 2.64 KiB [emitted] (name: main)
./app.ts 156 bytes [built] [code generated] [2 errors]
./common/components/myComponent.ts 46 bytes [built] [code generated]

ERROR in app.ts
./app.ts 1:29-53
[tsl] ERROR in app.ts(1,30)
 TS2307: Cannot find module 'components/myComponent' or its corresponding type declarations.
ts-loader-default_609318b4f68865d3

ERROR in app.ts
./app.ts 2:30-55
[tsl] ERROR in app.ts(2,31)
 TS2307: Cannot find module 'components/myComponent2' or its corresponding type declarations.
ts-loader-default_609318b4f68865d3

webpack compiled with 2 errors
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
asset bundle.js 2.64 KiB [emitted] (name: main)
cached modules 156 bytes [cached] 1 module
./common/components/myComponent.ts 45 bytes [built] [code generated]

ERROR in app.ts
./app.ts 1:29-53
[tsl] ERROR in app.ts(1,30)
 TS2307: Cannot find module 'components/myComponent' or its corresponding type declarations.
ts-loader-default_609318b4f68865d3

ERROR in app.ts
./app.ts 2:30-55
[tsl] ERROR in app.ts(2,31)
 TS2307: Cannot find module 'components/myComponent2' or its corresponding type declarations.
ts-loader-default_609318b4f68865d3

webpack compiled with 2 errors
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({

/***/ "./app.ts":
/*!****************!*\
!*** ./app.ts ***!
\****************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

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?");

/***/ }),

/***/ "./common/components/myComponent.ts":
/*!******************************************!*\
!*** ./common/components/myComponent.ts ***!
\******************************************/
/***/ ((module) => {

eval("\nmodule.exports = 'changed it';\n\n\n//# sourceURL=webpack:///./common/components/myComponent.ts?");

/***/ })

/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = __webpack_require__("./app.ts");
/******/
/******/ })()
;
Loading

0 comments on commit 5fbfb5c

Please sign in to comment.