Skip to content

Commit d28ba6f

Browse files
authored
Feature/typescript 3.1 (#844)
* upgrade to typescript 3.1 * generate 3.1 test data based on 3.0 * run tests for current version driven by package.json * update test output * undo fancy changes * experiment with running builds on osx * upgrade husky * drop osx as flaky
1 parent c9ce397 commit d28ba6f

File tree

246 files changed

+11900
-40
lines changed

Some content is hidden

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

246 files changed

+11900
-40
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
dist: trusty
1+
os:
2+
- linux
23
addons:
34
chrome: stable
45
language: node_js
@@ -12,12 +13,13 @@ install:
1213
- yarn lint
1314
- yarn add $TYPESCRIPT
1415
env:
15-
- TYPESCRIPT=typescript@3.0.1
16+
- TYPESCRIPT=typescript@3.1.1
1617
- TYPESCRIPT=typescript@next
18+
- TYPESCRIPT=typescript@3.0.1
1719
- TYPESCRIPT=typescript@2.9.2
1820
- TYPESCRIPT=typescript@2.8.1
1921
- TYPESCRIPT=typescript@2.7.1
2022
- TYPESCRIPT=typescript@2.6.1
2123
- TYPESCRIPT=typescript@2.5.2
2224
- TYPESCRIPT=typescript@2.4.1
23-
25+

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# TypeScript loader for webpack
22

33
[![npm version](https://img.shields.io/npm/v/ts-loader.svg)](https://www.npmjs.com/package/ts-loader)
4-
[![build status](https://travis-ci.org/TypeStrong/ts-loader.svg?branch=master)](https://travis-ci.org/TypeStrong/ts-loader)
5-
[![build status](https://ci.appveyor.com/api/projects/status/bjh0r0d4ckspgkh9/branch/master?svg=true)](https://ci.appveyor.com/project/JohnReilly/ts-loader/branch/master)
4+
[![Linux Build Status](https://travis-ci.org/TypeStrong/ts-loader.svg?branch=master)](https://travis-ci.org/TypeStrong/ts-loader)
5+
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/bjh0r0d4ckspgkh9/branch/master?svg=true)](https://ci.appveyor.com/project/JohnReilly/ts-loader/branch/master)
66
[![Downloads](http://img.shields.io/npm/dm/ts-loader.svg)](https://npmjs.org/package/ts-loader)
77
[![node version](https://img.shields.io/node/v/ts-loader.svg)](https://www.npmjs.com/package/ts-loader)
88
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ environment:
33
FORCE_COLOR: 1
44
nodejs_version: "8"
55
matrix:
6-
- TYPESCRIPT: typescript@3.0.1
6+
- TYPESCRIPT: typescript@3.1.1
77
- TYPESCRIPT: typescript@next
8+
- TYPESCRIPT: typescript@3.0.1
89
- TYPESCRIPT: typescript@2.9.2
910
- TYPESCRIPT: typescript@2.8.1
1011
- TYPESCRIPT: typescript@2.7.1

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
"comparison-tests": "tsc --project \"./test/comparison-tests\" && npm link ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js",
1111
"comparison-tests-generate": "node test/comparison-tests/stub-new-version.js",
1212
"execution-tests": "npm i -g pnpm && node test/execution-tests/run-tests.js",
13-
"test": "node test/run-tests.js",
14-
"precommit": "lint-staged"
13+
"test": "node test/run-tests.js"
14+
},
15+
"husky": {
16+
"hooks": {
17+
"pre-commit": "lint-staged"
18+
}
1519
},
1620
"lint-staged": {
1721
"src/**/*.{ts,md}": [
@@ -66,7 +70,7 @@
6670
"fs-extra": "^7.0.0",
6771
"glob": "^7.1.1",
6872
"html-webpack-plugin": "^3.2.0",
69-
"husky": "^0.14.3",
73+
"husky": "^1.0.0",
7074
"jasmine-core": "^3.0.0",
7175
"karma": "^3.0.0",
7276
"karma-chrome-launcher": "^2.2.0",
@@ -81,7 +85,7 @@
8185
"rimraf": "^2.6.2",
8286
"tslint": "^5.11.0",
8387
"tslint-config-prettier": "^1.15.0",
84-
"typescript": "^3.0.1",
88+
"typescript": "^3.1.1",
8589
"webpack": "^4.5.0",
8690
"webpack-cli": "^3.1.1"
8791
},
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/******/ (function(modules) { // webpackBootstrap
2+
/******/ // The module cache
3+
/******/ var installedModules = {};
4+
/******/
5+
/******/ // The require function
6+
/******/ function __webpack_require__(moduleId) {
7+
/******/
8+
/******/ // Check if module is in cache
9+
/******/ if(installedModules[moduleId]) {
10+
/******/ return installedModules[moduleId].exports;
11+
/******/ }
12+
/******/ // Create a new module (and put it into the cache)
13+
/******/ var module = installedModules[moduleId] = {
14+
/******/ i: moduleId,
15+
/******/ l: false,
16+
/******/ exports: {}
17+
/******/ };
18+
/******/
19+
/******/ // Execute the module function
20+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21+
/******/
22+
/******/ // Flag the module as loaded
23+
/******/ module.l = true;
24+
/******/
25+
/******/ // Return the exports of the module
26+
/******/ return module.exports;
27+
/******/ }
28+
/******/
29+
/******/
30+
/******/ // expose the modules object (__webpack_modules__)
31+
/******/ __webpack_require__.m = modules;
32+
/******/
33+
/******/ // expose the module cache
34+
/******/ __webpack_require__.c = installedModules;
35+
/******/
36+
/******/ // define getter function for harmony exports
37+
/******/ __webpack_require__.d = function(exports, name, getter) {
38+
/******/ if(!__webpack_require__.o(exports, name)) {
39+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40+
/******/ }
41+
/******/ };
42+
/******/
43+
/******/ // define __esModule on exports
44+
/******/ __webpack_require__.r = function(exports) {
45+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47+
/******/ }
48+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
49+
/******/ };
50+
/******/
51+
/******/ // create a fake namespace object
52+
/******/ // mode & 1: value is a module id, require it
53+
/******/ // mode & 2: merge all properties of value into the ns
54+
/******/ // mode & 4: return value when already ns object
55+
/******/ // mode & 8|1: behave like require
56+
/******/ __webpack_require__.t = function(value, mode) {
57+
/******/ if(mode & 1) value = __webpack_require__(value);
58+
/******/ if(mode & 8) return value;
59+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60+
/******/ var ns = Object.create(null);
61+
/******/ __webpack_require__.r(ns);
62+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64+
/******/ return ns;
65+
/******/ };
66+
/******/
67+
/******/ // getDefaultExport function for compatibility with non-harmony modules
68+
/******/ __webpack_require__.n = function(module) {
69+
/******/ var getter = module && module.__esModule ?
70+
/******/ function getDefault() { return module['default']; } :
71+
/******/ function getModuleExports() { return module; };
72+
/******/ __webpack_require__.d(getter, 'a', getter);
73+
/******/ return getter;
74+
/******/ };
75+
/******/
76+
/******/ // Object.prototype.hasOwnProperty.call
77+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78+
/******/
79+
/******/ // __webpack_public_path__
80+
/******/ __webpack_require__.p = "";
81+
/******/
82+
/******/
83+
/******/ // Load entry module and return exports
84+
/******/ return __webpack_require__(__webpack_require__.s = "./app.ts");
85+
/******/ })
86+
/************************************************************************/
87+
/******/ ({
88+
89+
/***/ "./app.ts":
90+
/*!****************!*\
91+
!*** ./app.ts ***!
92+
\****************/
93+
/*! no static exports found */
94+
/***/ (function(module, exports, __webpack_require__) {
95+
96+
"use strict";
97+
eval("\nexports.__esModule = true;\nvar myComponent = __webpack_require__(/*! components/myComponent */ \"./common/components/myComponent.ts\");\nconsole.log(myComponent);\n\n\n//# sourceURL=webpack:///./app.ts?");
98+
99+
/***/ }),
100+
101+
/***/ "./common/components/myComponent.ts":
102+
/*!******************************************!*\
103+
!*** ./common/components/myComponent.ts ***!
104+
\******************************************/
105+
/*! no static exports found */
106+
/***/ (function(module, exports, __webpack_require__) {
107+
108+
"use strict";
109+
eval("\nmodule.exports = 'myComponent';\n\n\n//# sourceURL=webpack:///./common/components/myComponent.ts?");
110+
111+
/***/ })
112+
113+
/******/ });
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Asset Size Chunks Chunk Names
2+
bundle.js 4.33 KiB main [emitted] main
3+
Entrypoint main = bundle.js
4+
[./app.ts] 120 bytes {main} [built]
5+
[./common/components/myComponent.ts] 46 bytes {main} [built]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Asset Size Chunks Chunk Names
2+
bundle.js 4.33 KiB main [emitted] main
3+
Entrypoint main = bundle.js
4+
[./app.ts] 120 bytes {main} [built] [1 error]
5+
[./common/components/myComponent.ts] 46 bytes {main} [built]
6+
7+
ERROR in app.ts
8+
./app.ts
9+
[tsl] ERROR in app.ts(2,31)
10+
 TS2307: Cannot find module 'components/myComponent2'.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/******/ (function(modules) { // webpackBootstrap
2+
/******/ // The module cache
3+
/******/ var installedModules = {};
4+
/******/
5+
/******/ // The require function
6+
/******/ function __webpack_require__(moduleId) {
7+
/******/
8+
/******/ // Check if module is in cache
9+
/******/ if(installedModules[moduleId]) {
10+
/******/ return installedModules[moduleId].exports;
11+
/******/ }
12+
/******/ // Create a new module (and put it into the cache)
13+
/******/ var module = installedModules[moduleId] = {
14+
/******/ i: moduleId,
15+
/******/ l: false,
16+
/******/ exports: {}
17+
/******/ };
18+
/******/
19+
/******/ // Execute the module function
20+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21+
/******/
22+
/******/ // Flag the module as loaded
23+
/******/ module.l = true;
24+
/******/
25+
/******/ // Return the exports of the module
26+
/******/ return module.exports;
27+
/******/ }
28+
/******/
29+
/******/
30+
/******/ // expose the modules object (__webpack_modules__)
31+
/******/ __webpack_require__.m = modules;
32+
/******/
33+
/******/ // expose the module cache
34+
/******/ __webpack_require__.c = installedModules;
35+
/******/
36+
/******/ // define getter function for harmony exports
37+
/******/ __webpack_require__.d = function(exports, name, getter) {
38+
/******/ if(!__webpack_require__.o(exports, name)) {
39+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40+
/******/ }
41+
/******/ };
42+
/******/
43+
/******/ // define __esModule on exports
44+
/******/ __webpack_require__.r = function(exports) {
45+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47+
/******/ }
48+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
49+
/******/ };
50+
/******/
51+
/******/ // create a fake namespace object
52+
/******/ // mode & 1: value is a module id, require it
53+
/******/ // mode & 2: merge all properties of value into the ns
54+
/******/ // mode & 4: return value when already ns object
55+
/******/ // mode & 8|1: behave like require
56+
/******/ __webpack_require__.t = function(value, mode) {
57+
/******/ if(mode & 1) value = __webpack_require__(value);
58+
/******/ if(mode & 8) return value;
59+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60+
/******/ var ns = Object.create(null);
61+
/******/ __webpack_require__.r(ns);
62+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64+
/******/ return ns;
65+
/******/ };
66+
/******/
67+
/******/ // getDefaultExport function for compatibility with non-harmony modules
68+
/******/ __webpack_require__.n = function(module) {
69+
/******/ var getter = module && module.__esModule ?
70+
/******/ function getDefault() { return module['default']; } :
71+
/******/ function getModuleExports() { return module; };
72+
/******/ __webpack_require__.d(getter, 'a', getter);
73+
/******/ return getter;
74+
/******/ };
75+
/******/
76+
/******/ // Object.prototype.hasOwnProperty.call
77+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78+
/******/
79+
/******/ // __webpack_public_path__
80+
/******/ __webpack_require__.p = "";
81+
/******/
82+
/******/
83+
/******/ // Load entry module and return exports
84+
/******/ return __webpack_require__(__webpack_require__.s = "./app.ts");
85+
/******/ })
86+
/************************************************************************/
87+
/******/ ({
88+
89+
/***/ "./app.ts":
90+
/*!****************!*\
91+
!*** ./app.ts ***!
92+
\****************/
93+
/*! no static exports found */
94+
/***/ (function(module, exports, __webpack_require__) {
95+
96+
"use strict";
97+
eval("\nexports.__esModule = true;\nvar myComponent = __webpack_require__(/*! components/myComponent */ \"./common/components/myComponent.ts\");\nconsole.log(myComponent);\n\n\n//# sourceURL=webpack:///./app.ts?");
98+
99+
/***/ }),
100+
101+
/***/ "./common/components/myComponent.ts":
102+
/*!******************************************!*\
103+
!*** ./common/components/myComponent.ts ***!
104+
\******************************************/
105+
/*! no static exports found */
106+
/***/ (function(module, exports, __webpack_require__) {
107+
108+
"use strict";
109+
eval("\nmodule.exports = 'changed it';\n\n\n//# sourceURL=webpack:///./common/components/myComponent.ts?");
110+
111+
/***/ })
112+
113+
/******/ });
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Asset Size Chunks Chunk Names
2+
bundle.js 4.33 KiB main [emitted] main
3+
Entrypoint main = bundle.js
4+
[./app.ts] 120 bytes {main}
5+
[./common/components/myComponent.ts] 45 bytes {main} [built]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Asset Size Chunks Chunk Names
2+
bundle.js 4.33 KiB main [emitted] main
3+
Entrypoint main = bundle.js
4+
[./app.ts] 120 bytes {main} [built] [1 error]
5+
[./common/components/myComponent.ts] 45 bytes {main} [built]
6+
7+
ERROR in app.ts
8+
./app.ts
9+
[tsl] ERROR in app.ts(2,31)
10+
 TS2307: Cannot find module 'components/myComponent2'.

0 commit comments

Comments
 (0)