Skip to content

Commit

Permalink
Feat/ts 4 4 (#1372)
Browse files Browse the repository at this point in the history
* upgrade to ts 4.4

* generate new output

* latest typescript ci

* update snapshot
  • Loading branch information
johnnyreilly committed Sep 7, 2021
1 parent 41bea14 commit 47e374b
Show file tree
Hide file tree
Showing 1,245 changed files with 27,467 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
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, 4.3.2, next]
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, 4.3.2, 4.4.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, 4.3.2, next]
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, 4.3.2, 4.4.2, next]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion src/instances.ts
Expand Up @@ -353,7 +353,9 @@ export function initializeInstance(
customerTransformers = require(customerTransformers);
} catch (err) {
throw new Error(
`Failed to load customTransformers from "${instance.loaderOptions.getCustomTransformers}": ${err.message}`
`Failed to load customTransformers from "${
instance.loaderOptions.getCustomTransformers
}": ${err instanceof Error ? err.message : 'unknown error'}`
);
}

Expand Down
67 changes: 67 additions & 0 deletions test/comparison-tests/aliasResolution/expectedOutput-4.4/bundle.js
@@ -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("\nexports.__esModule = 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 = 'myComponent';\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");
/******/
/******/ })()
;
@@ -0,0 +1,17 @@
asset bundle.js 2.6 KiB [emitted] (name: main)
./app.ts 120 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
@@ -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("\nexports.__esModule = 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");
/******/
/******/ })()
;
@@ -0,0 +1,17 @@
asset bundle.js 2.6 KiB [emitted] (name: main)
cached modules 120 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
@@ -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 = 'myComponent';\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");
/******/
/******/ })()
;
@@ -0,0 +1,4 @@
asset bundle.js 2.64 KiB [emitted] (name: main)
./app.ts 156 bytes [built] [code generated]
./common/components/myComponent.ts 46 bytes [built] [code generated]
webpack compiled successfully
@@ -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");
/******/
/******/ })()
;
@@ -0,0 +1,4 @@
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]
webpack compiled successfully
@@ -0,0 +1,32 @@
/*
* 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
/******/ var __webpack_modules__ = ({

/***/ "./src/index.js":
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
/***/ (() => {

eval("console.log('working');\n\n\n//# sourceURL=webpack:///./src/index.js?");

/***/ })

/******/ });
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval devtool is used.
/******/ var __webpack_exports__ = {};
/******/ __webpack_modules__["./src/index.js"]();
/******/
/******/ })()
;
@@ -0,0 +1,3 @@
asset bundle.js 1.2 KiB [emitted] (name: main)
./src/index.js 24 bytes [built] [code generated]
webpack compiled successfully

0 comments on commit 47e374b

Please sign in to comment.