Skip to content

Commit

Permalink
WIP Changes for webpack 4 (#710)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
johnnyreilly committed Feb 22, 2018
1 parent 4112d77 commit 388f2a6
Show file tree
Hide file tree
Showing 481 changed files with 14,874 additions and 31,349 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ install:
- yarn build
- yarn add $TYPESCRIPT
env:
- TYPESCRIPT=typescript@2.7.0-rc
- TYPESCRIPT=typescript@2.7.1
- TYPESCRIPT=typescript@next
- TYPESCRIPT=typescript@2.6.1
- TYPESCRIPT=typescript@2.5.2
- TYPESCRIPT=typescript@2.4.1
- TYPESCRIPT=typescript@2.3.1
- TYPESCRIPT=typescript@2.2.1
- TYPESCRIPT=typescript@2.1.5
- TYPESCRIPT=typescript@2.0.9

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v4.0.0

- Support webpack 4
- Drop support for webpack 2/3 **BREAKING CHANGE**
- Minimum TypeScript version: 2.4.1 **BREAKING CHANGE**
- Deprecated option `entryFileCannotBeJs` removed' **BREAKING CHANGE**
## v3.5.0

- [Add trace for traceResolution](https://github.com/TypeStrong/ts-loader/pull/721) - thanks @onigoetz!
Expand Down
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# History

`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.

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

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 ;-)
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ build system using the [Node.js API](http://webpack.github.io/docs/node.js-api.h

### Compatibility

#### TypeScript / Webpack

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.
- TypeScript: 2.4.1+
- webpack: 4.x+ (please use ts-loader 3.x if you need webpack 2 or 3 support)
- node: 6.11.5 minimum (aligned with webpack 4)

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).

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

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

#### entryFileCannotBeJs *(boolean) (default=false) DEPRECATED*

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.
This option will be removed in a future version of ts-loader.
#### appendTsSuffixTo *(RegExp[]) (default=[])*
#### appendTsxSuffixTo *(RegExp[]) (default=[])*
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.
Expand Down
56 changes: 0 additions & 56 deletions UPGRADE.md

This file was deleted.

6 changes: 1 addition & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ environment:
FORCE_COLOR: 1
nodejs_version: "8"
matrix:
- TYPESCRIPT: typescript@2.7.0-rc
- TYPESCRIPT: typescript@2.7.1
- TYPESCRIPT: typescript@next
- TYPESCRIPT: typescript@2.6.1
- TYPESCRIPT: typescript@2.5.2
- TYPESCRIPT: typescript@2.4.1
- TYPESCRIPT: typescript@2.3.1
- TYPESCRIPT: typescript@2.2.1
- TYPESCRIPT: typescript@2.1.5
- TYPESCRIPT: typescript@2.0.9
install:
- ps: Install-Product node $env:nodejs_version
- yarn install
Expand Down
11 changes: 6 additions & 5 deletions examples/fork-ts-checker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"main": "index.js",
"version": "1.0.0",
"scripts": {
"start": "webpack --watch"
"start": "webpack --watch --mode development"
},
"devDependencies": {
"fork-ts-checker-webpack-plugin": "^0.2.0",
"ts-loader": "^3.0.3",
"typescript": "^2.2.2",
"webpack": "^3.8.1"
"fork-ts-checker-webpack-plugin": "johnnyreilly/fork-ts-checker-webpack-plugin#4.0.0-beta.0",
"ts-loader": "^4.0.0-beta.0",
"typescript": "^2.6.2",
"webpack": "^4.0.0-beta.0",
"webpack-cli": "^2.0.4"
}
}
Loading

0 comments on commit 388f2a6

Please sign in to comment.