Skip to content

Commit 388f2a6

Browse files
authored
WIP Changes for webpack 4 (#710)
* initial migration - tests mostly failing * Fix parens / drop node 4 * comment out after-compile to illustrate lack of hanging * `after-compile` works; registering errors with webpack whilst doing so does not * Update .travis.yml - travis-ci/travis-ci#8836 (comment) * register errors again * include lock file * move to webpack 5 and typescript 2.7 * Get webpack running again * simplify error registration * Add mode: 'development' to all comparison tests * added mode: 'development' to execution tests * fixed many execution tests * First go at getting this running with webpack 4 * Skip babel execution tests for now * add package.json to execution tests * Change path method * fix babel-codeSplitting test * add mode to all karma.confs * Fix node resolution test hopefully * Fix minor bug * exclude happypack test * update version to 4 * update minimum node to 6.11.5 aligned with webpack 4 * move to use node typings from definitely typed * Fix comparison tests that start with "a" :-( * regenerate "b" test output * regenerate "c" output text * regenerate "d" output tests * regenerate "e" test output * "i" test output * "l" comparison tests regenerated * migrate fork-ts-checker example to use webpack 4 betas * migrate vanilla example to webpack 4 beta * more test generation * up to "s" test generation * Finish test generation * fix broken tests * Fix tests * fix tests * make comparison tests more patient * if a round number then that's fine * more patient still * cater for carriage returns * ignore stars * more * slightly less brittle * better regex * The regex tweaks continue * better regex * regex regex regex * regex is painful * cater for C:/ * Regenerate test output * fix npmLink * getting closer * striving for perfection * revert test output * different regex * cater for other path * upgrade to TypeScript 2.7.1 * drop support for TypeScript < 2.4.1 and removed depecated entryFileCannotBeJs option * update karma to 2.0 * change author to John Reilly with James Brantly's agreement * upgrade to webpack 4 beta 1 * regenerate test output for webpack 4 beta 1 * Ignore "Built at:" in test output * more tolerant Built at: regex * removed 3 of the examples * upgrade to webpack 4 beta 2
1 parent 4112d77 commit 388f2a6

File tree

481 files changed

+14874
-31349
lines changed

Some content is hidden

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

481 files changed

+14874
-31349
lines changed

.travis.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ install:
1111
- yarn build
1212
- yarn add $TYPESCRIPT
1313
env:
14-
14+
1515
- TYPESCRIPT=typescript@next
1616
1717
1818
19-
20-
21-
22-
19+

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v4.0.0
4+
5+
- Support webpack 4
6+
- Drop support for webpack 2/3 **BREAKING CHANGE**
7+
- Minimum TypeScript version: 2.4.1 **BREAKING CHANGE**
8+
- Deprecated option `entryFileCannotBeJs` removed' **BREAKING CHANGE**
39
## v3.5.0
410

511
- [Add trace for traceResolution](https://github.com/TypeStrong/ts-loader/pull/721) - thanks @onigoetz!

HISTORY.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# History
2+
3+
`ts-loader` was started by [James Brantly](http://www.jbrantly.com/) back in January 2015. He created the initial codebase, wrote the comparison testpack and merrily maintained it until it reached v0.8.2.
4+
5+
At that point [John Reilly](https://blog.johnnyreilly.com/) started maintaining ts-loader. [On October 16th 2016 to be exact](https://twitter.com/jbrantly/status/785931975064444928). The full story of how that came to be can be read here: https://blog.johnnyreilly.com/2016/11/but-you-cant-die-i-love-you-ts-loader.html
6+
7+
Since that time, John (who wrote this and finds it peculiar to refer to himself in the third person) has continued maintaining ts-loader. He appreciates any and all people that contribute. Who knows, maybe one day the mantle will be passed on again and someone else will step up and take ts-loader forwards. Who knows? It could be you ;-)

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ build system using the [Node.js API](http://webpack.github.io/docs/node.js-api.h
6464

6565
### Compatibility
6666

67-
#### TypeScript / Webpack
68-
69-
ts-loader supports the latest and greatest version of TypeScript right back to v2.0. ts-loader supports webpack 3. Our continuous integration test suites run against webpack 3; **not** webpack 2. That said, ts-loader worked fine with webpack 2 when we last checked.
67+
- TypeScript: 2.4.1+
68+
- webpack: 4.x+ (please use ts-loader 3.x if you need webpack 2 or 3 support)
69+
- node: 6.11.5 minimum (aligned with webpack 4)
7070

7171
A full test suite runs each night (and on each pull request). It runs both on [Linux](https://travis-ci.org/TypeStrong/ts-loader) and [Windows](https://ci.appveyor.com/project/JohnReilly/ts-loader), testing ts-loader against major releases of TypeScript. The test suite also runs against TypeScript@next (because we want to use it as much as you do).
7272

@@ -78,6 +78,7 @@ If you become aware of issues not caught by the test suite then please let us kn
7878

7979
```javascript
8080
module.exports = {
81+
mode: 'development',
8182
devtool: 'inline-source-map',
8283
entry: './app.ts',
8384
output: {
@@ -329,12 +330,6 @@ Advanced option to force files to go through different instances of the
329330
TypeScript compiler. Can be used to force segregation between different parts
330331
of your code.
331332

332-
#### entryFileCannotBeJs *(boolean) (default=false) DEPRECATED*
333-
334-
If the `allowJs` compiler option is `true` then it's possible for your entry files to be JS. There is a [known issue using ts-loader with TypeScript 2.3 and below](https://github.com/TypeStrong/ts-loader/issues/655). This option exists to work around that issue if you are using ts-loader with TypeScript 2.3 or below.
335-
336-
This option will be removed in a future version of ts-loader.
337-
338333
#### appendTsSuffixTo *(RegExp[]) (default=[])*
339334
#### appendTsxSuffixTo *(RegExp[]) (default=[])*
340335
A list of regular expressions to be matched against filename. If filename matches one of the regular expressions, a `.ts` or `.tsx` suffix will be appended to that filename.

UPGRADE.md

-56
This file was deleted.

appveyor.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ environment:
33
FORCE_COLOR: 1
44
nodejs_version: "8"
55
matrix:
6-
- TYPESCRIPT: [email protected].0-rc
6+
- TYPESCRIPT: [email protected].1
77
- TYPESCRIPT: typescript@next
88
- TYPESCRIPT: [email protected]
99
- TYPESCRIPT: [email protected]
1010
- TYPESCRIPT: [email protected]
11-
- TYPESCRIPT: [email protected]
12-
- TYPESCRIPT: [email protected]
13-
- TYPESCRIPT: [email protected]
14-
- TYPESCRIPT: [email protected]
1511
install:
1612
- ps: Install-Product node $env:nodejs_version
1713
- yarn install

examples/fork-ts-checker/package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
"main": "index.js",
44
"version": "1.0.0",
55
"scripts": {
6-
"start": "webpack --watch"
6+
"start": "webpack --watch --mode development"
77
},
88
"devDependencies": {
9-
"fork-ts-checker-webpack-plugin": "^0.2.0",
10-
"ts-loader": "^3.0.3",
11-
"typescript": "^2.2.2",
12-
"webpack": "^3.8.1"
9+
"fork-ts-checker-webpack-plugin": "johnnyreilly/fork-ts-checker-webpack-plugin#4.0.0-beta.0",
10+
"ts-loader": "^4.0.0-beta.0",
11+
"typescript": "^2.6.2",
12+
"webpack": "^4.0.0-beta.0",
13+
"webpack-cli": "^2.0.4"
1314
}
1415
}

0 commit comments

Comments
 (0)