Skip to content

Commit 43b48f1

Browse files
committed
chore: drop support for old node & webpack version
BREAKING CHANGE: Drop support for: - [email protected] - [email protected] - webpack@1
1 parent 4c7c166 commit 43b48f1

File tree

4 files changed

+12
-40
lines changed

4 files changed

+12
-40
lines changed

.travis.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ node_js:
33
- '8'
44
- '6'
55
- '4'
6-
- '0.12'
7-
- '0.10'
86

97
env:
10-
- WEBPACK_VERSION=1 EXTRACT_PLUGIN_VERSION=1
118
- WEBPACK_VERSION=2 EXTRACT_PLUGIN_VERSION=2
129
- WEBPACK_VERSION=3 EXTRACT_PLUGIN_VERSION=3.0.0-rc.1
1310

@@ -16,10 +13,7 @@ install:
1613
- npm install webpack@$WEBPACK_VERSION extract-text-webpack-plugin@$EXTRACT_PLUGIN_VERSION || true
1714

1815
script:
19-
# TODO: remove when dropping support for node 0.10 and 0.12
20-
- if [ ${TRAVIS_NODE_VERSION} != "0.10" ] && [ ${TRAVIS_NODE_VERSION} != "0.12" ] || [ ${WEBPACK_VERSION} == "1" ]; then
21-
npm test;
22-
fi
16+
- npm test;
2317

2418
after_script:
2519
- './node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov'

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
"author": "Dane Thurber <[email protected]>",
1010
"license": "MIT",
1111
"engines": {
12-
"node": ">=0.10"
12+
"node": ">=4"
1313
},
1414
"peerDependencies": {
15-
"webpack": "1 || 2 || 3"
15+
"webpack": "2 || 3"
1616
},
1717
"devDependencies": {
1818
"codecov": "^2.2.0",
1919
"css-loader": "^0.9.1",
20-
"extract-text-webpack-plugin": "^0.5.0",
20+
"extract-text-webpack-plugin": "^3.0.0",
2121
"file-loader": "^0.9.0",
2222
"jasmine": "^2.2.1",
2323
"memory-fs": "^0.2.0",
2424
"nyc": "^10.3.2",
2525
"rimraf": "^2.6.1",
2626
"style-loader": "^0.8.3",
27-
"webpack": "^1.7.3"
27+
"webpack": "^3.5.2"
2828
},
2929
"files": [
3030
"index.js",

spec/plugin.integration.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ describe('ManifestPlugin using real fs', function() {
9494
hashes.push(stats.hash);
9595

9696
if (hashes.length === 2) {
97-
// TODO: uncomment when dropping support for node@10
98-
// expect(hashes[0]).not.toEqual(hashes[1]);
97+
expect(hashes[0]).not.toEqual(hashes[1]);
9998
return done();
10099
}
101100

spec/plugin.spec.js

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,8 @@ var MemoryFileSystem = require('memory-fs');
44
var webpack = require('webpack');
55
var _ = require('lodash');
66
var ExtractTextPlugin = require('extract-text-webpack-plugin');
7-
var extractTextPluginMajorVersion = require('extract-text-webpack-plugin/package.json').version.split('.')[0];
87
var plugin = require('../index.js');
98

10-
// TODO: remove when dropping support for webpack@1
11-
if (Number(extractTextPluginMajorVersion) > 1) {
12-
function FakeExtractTextPlugin(fileName, opts) {
13-
ExtractTextPlugin.call(this, _.assign(
14-
opts,
15-
{
16-
filename: fileName
17-
}
18-
));
19-
}
20-
21-
FakeExtractTextPlugin.prototype = Object.create(ExtractTextPlugin.prototype);
22-
FakeExtractTextPlugin.prototype.constructor = FakeExtractTextPlugin;
23-
24-
FakeExtractTextPlugin.extract = function (fallback, use) {
25-
return ExtractTextPlugin.extract({
26-
fallback: fallback,
27-
use: use
28-
});
29-
};
30-
} else {
31-
FakeExtractTextPlugin = ExtractTextPlugin;
32-
}
33-
349
var OUTPUT_DIR = path.join(__dirname, './webpack-out');
3510
var manifestPath = path.join(OUTPUT_DIR, 'manifest.json');
3611

@@ -405,12 +380,16 @@ describe('ManifestPlugin', function() {
405380
module: {
406381
loaders: [{
407382
test: /\.css$/,
408-
loader: FakeExtractTextPlugin.extract('style-loader', 'css-loader')
383+
loader: ExtractTextPlugin.extract({
384+
fallback: 'style-loader',
385+
use: 'css-loader'
386+
})
409387
}]
410388
},
411389
plugins: [
412390
new plugin(),
413-
new FakeExtractTextPlugin('[name].css', {
391+
new ExtractTextPlugin({
392+
filename: '[name].css',
414393
allChunks: true
415394
})
416395
]

0 commit comments

Comments
 (0)