Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
chore: Update dependency webpack to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasOneSpanDev committed Jul 12, 2021
1 parent 7082218 commit 91b24b2
Show file tree
Hide file tree
Showing 62 changed files with 539 additions and 958 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"prettier": "^2.2.1",
"verdaccio": "^4.10.0",
"verdaccio-memory": "^9.7.2",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack": "^5.44.0",
"webpack-cli": "^4.7.0",
"webpack-dev-server": "^3.11.0"
}
}
4 changes: 2 additions & 2 deletions packages/airbnb-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ instead._

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9 and one of the Neutrino build presets
- webpack 4
- neutrino 10 and one of the Neutrino build presets
- webpack 5
- ESLint 6 or 7

## Quickstart
Expand Down
2 changes: 1 addition & 1 deletion packages/airbnb-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0",
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/airbnb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ with Airbnb's ESLint config, following the

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9 and one of the Neutrino build presets
- webpack 4
- neutrino 10 and one of the Neutrino build presets
- webpack 5
- ESLint 6 or 7

## Quickstart
Expand Down
2 changes: 1 addition & 1 deletion packages/airbnb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0",
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/banner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ source code files.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/banner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/clean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ directory, as well as all unused webpack assets after every successful rebuild.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/clean/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/compile-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ with Babel.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/compile-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/copy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/copy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/dev-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Server for fast development cycles.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5
- webpack-dev-server 3

## Installation
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0",
"webpack": "^5.0.0",
"webpack-dev-server": "^3.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/eslint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ and eslint-loader.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9 and one of the Neutrino build presets
- webpack 4
- neutrino 10 and one of the Neutrino build presets
- webpack 5
- ESLint 6 or 7

## Installation
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0",
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/font-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ files from modules.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/font-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/html-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ files from modules.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/html-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/html-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ HTML files for configured entry points.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/html-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/image-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ image files from modules.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- neutrino 10
- webpack 5

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/image-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ projects with the Jest test runner.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9 and one of the Neutrino build presets
- webpack 4
- neutrino 10 and one of the Neutrino build presets
- webpack 5
- Jest 24-26

## Quickstart
Expand Down
4 changes: 2 additions & 2 deletions packages/karma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ using the Karma test runner.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9 and one of the Neutrino build presets
- webpack 4
- neutrino 10 and one of the Neutrino build presets
- webpack 5
- Karma 4 or 5 and Karma CLI 2
- Mocha 6 or 7

Expand Down
8 changes: 3 additions & 5 deletions packages/karma/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = (options = {}) => (neutrino) => {
flags: ['--no-sandbox'],
},
},
frameworks: ['mocha'],
frameworks: ['mocha', 'webpack'],
files: [
{
pattern: tests,
Expand All @@ -67,17 +67,15 @@ module.exports = (options = {}) => (neutrino) => {
[tests]: ['webpack'],
[sources]: ['webpack'],
},
webpackMiddleware: {
// Only display webpack compile duration and errors/warnings, since
// the focus should be on the output from the tests/karma instead.
webpack: {
...omit(neutrino.config.toConfig(), ['entry']),
stats: {
all: false,
errors: true,
timings: true,
warnings: true,
},
},
webpack: omit(neutrino.config.toConfig(), ['entry']),
reporters: ['mocha', 'coverage'],
coverageReporter: {
dir: '.coverage',
Expand Down
4 changes: 2 additions & 2 deletions packages/karma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"karma-coverage": "^2.0.3",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-webpack": "^4.0.2",
"karma-webpack": "^5.0.0",
"lodash.omit": "^4.5.0",
"mocha-coverage-reporter": "^0.0.1"
},
Expand All @@ -43,6 +43,6 @@
"karma-cli": "^2.0.0",
"mocha": "^6.0.0 || ^7.0.0 || ^8.0.0",
"neutrino": "^9.0.0",
"webpack": "^4.0.0"
"webpack": "^5.0.0"
}
}
6 changes: 3 additions & 3 deletions packages/library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ automatically include polyfills based on usage. More details

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9
- webpack 4
- webpack-cli 3
- neutrino 10
- webpack 5
- webpack-cli 4

## Quickstart

Expand Down
7 changes: 0 additions & 7 deletions packages/library/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,6 @@ module.exports = (opts = {}) => {
])
.end()
.end()
.node.when(options.target === 'web', (node) => {
node.set('Buffer', false).set('fs', 'empty').set('tls', 'empty');
})
.when(options.target === 'node', (node) => {
node.set('__filename', false).set('__dirname', false);
})
.end()
// The default output is too noisy, particularly with multiple entrypoints.
.stats({
children: false,
Expand Down
4 changes: 2 additions & 2 deletions packages/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"peerDependencies": {
"neutrino": "^9.0.0",
"webpack": "^4.0.0",
"webpack-cli": "^3.0.0"
"webpack": "^5.0.0",
"webpack-cli": "^4.0.0"
}
}
14 changes: 6 additions & 8 deletions packages/library/test/library_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ test('valid preset production', (t) => {
t.is(config.devtool, 'source-map');
t.not(config.externals, undefined);

const errors = validate(config);
t.is(errors.length, 0);
t.notThrows(() => validate(config));
});

test('valid preset development', (t) => {
Expand All @@ -85,8 +84,7 @@ test('valid preset development', (t) => {
t.is(config.devtool, 'source-map');
t.not(config.externals, undefined);

const errors = validate(config);
t.is(errors.length, 0);
t.notThrows(() => validate(config));
});

test('removes webpack externals when NODE_ENV=test', (t) => {
Expand All @@ -105,18 +103,18 @@ test('valid preset Node.js target', (t) => {
const api = new Neutrino();
api.use(mw({ name: 'alpha', target: 'node' }));

const errors = validate(api.config.toConfig());
const config = api.config.toConfig();

t.is(errors.length, 0);
t.notThrows(() => validate(config));
});

test('valid preset commonjs2 libraryTarget', (t) => {
const api = new Neutrino();
api.use(mw({ name: 'alpha', libraryTarget: 'commonjs2' }));

const errors = validate(api.config.toConfig());
const config = api.config.toConfig();

t.is(errors.length, 0);
t.notThrows(() => validate(config));
});

test('targets option test', (t) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/mocha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ projects with the Mocha test runner.

- Node.js 10+
- Yarn v1.2.1+, or npm v5.4+
- Neutrino 9 and one of the Neutrino build presets
- webpack 4
- neutrino 10 and one of the Neutrino build presets
- webpack 5
- Mocha 6 or 7

## Quickstart
Expand Down
Loading

0 comments on commit 91b24b2

Please sign in to comment.