Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Mar 6, 2020
1 parent 3dbc36c commit ee6063d
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 87 deletions.
64 changes: 35 additions & 29 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,55 @@
- Node.js 6 is no longer supported; Node.js 8.9.0 is now the minimum required version, as per nwb's dependencies.
- Dependencies with (documented) breaking changes:
- [copy-webpack-plugin@5.0.0](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#breaking-changes)
- [css-loader@2.0.0](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#breaking-changes)
- [file-loader@2.0.0](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#breaking-changes-1)
- [file-loader@3.0.0](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#breaking-changes)
- [css-loader@3.0.0](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#breaking-changes)
- [file-loader@4.0.0](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#400-2019-06-05)
- [karma@4.0.0](https://github.com/karma-runner/karma/releases/tag/v4.0.0)
- [mocha@6.0.0](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#boom-breaking-changes)

## Changes

- Replaced use of `UglifyJsPlugin` with `TerserWebpackPlugin`.
- Deprecated `webpack.uglify` config, which has been renamed to [`webpack.terser`](https://github.com/insin/nwb/blob/master/docs/Configuration.md#uglify-object--false).
- Deprecated `webpack.uglify` config, which has been renamed to [`webpack.terser`](https://github.com/insin/nwb/blob/master/docs/Configuration.md#terser-object--false).
- Autoprefixer renamed its `browsers` option to `overrideBrowserslist`, so you will get deprecation warnings if you were using `{browsers: ...}` in [`webpack.autoprefixer` config](https://github.com/insin/nwb/blob/master/docs/Configuration.md#autoprefixer-string--object).

## Dependencies

- autoprefixer: v9.0.2 → [v9.4.10](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#9410)
- autoprefixer: v9.0.2 → [v9.7.4](https://github.com/postcss/autoprefixer/blob/master/CHANGELOG.md#974)
- babel-plugin-add-module-exports: v0.2.1 → [v1.0.0](https://github.com/59naga/babel-plugin-add-module-exports/releases)
- babel-plugin-inferno: v5.0.1 → [v5.1.0](https://github.com/infernojs/babel-plugin-inferno/releases)
- case-sensitive-paths-webpack-plugin: v2.1.2 → [v2.2.0](https://github.com/Urthen/case-sensitive-paths-webpack-plugin/blob/master/CHANGELOG.md#v220)
- chalk: v2.4.1 → [v2.4.2](https://github.com/chalk/chalk/compare/v2.4.1...v2.4.2)
- copy-webpack-plugin: v4.5.2 → [v5.0.0](https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#500-2019-02-20)
- css-loader: v1.0.0 → [v2.1.1](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#211-2019-03-07)
- case-sensitive-paths-webpack-plugin: v2.1.2 → [v2.3.0](https://github.com/Urthen/case-sensitive-paths-webpack-plugin/blob/master/CHANGELOG.md#v230)
- chalk: v2.4.1 → [v3.0.0](https://github.com/chalk/chalk/releases/tag/v3.0.0)
- copy-webpack-plugin: v4.5.2 → [v5.1.1]https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/CHANGELOG.md#511-2019-12-12)
- cross-spawn: v6.0.5 → [v7.0.1](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md#701-2019-10-07)
- css-loader: v1.0.0 → [v3.4.2](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md#342-2020-01-10)
- detect-port: v1.2.3 → [v1.3.0](https://github.com/node-modules/detect-port/releases)
- filesize: v3.6.1 → [v4.1.2](https://github.com/avoidwork/filesize.js/compare/3.6.1...4.1.2)
- file-loader: v1.1.11 → [v3.0.1](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#301-2018-12-20)
- fs-extra: v7.0.0 → [v7.0.1](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md#701--2018-11-07)
- inquirer: v6.0.0 → [v6.2.2](https://github.com/SBoudrias/Inquirer.js/releases)
- karma: v2.0.0 → [v4.0.1](https://github.com/karma-runner/karma/releases)
- karma-webpack: v3.0.0 → [v3.0.5](https://github.com/webpack-contrib/karma-webpack/releases)
- mini-css-extract-plugin v0.4.1 → [v0.5.0](https://github.com/webpack-contrib/mini-css-extract-plugin/releases)
- mocha: v5.2.0 → [v6.0.2](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#602--2019-02-25)
- opn: v5.3.0 → [v5.4.0](https://github.com/sindresorhus/opn/compare/v5.3.0...v5.4.0)
- ora: v3.0.0 → [v3.2.0](https://github.com/sindresorhus/ora/compare/v3.0.0...v3.2.0)
- figures: v2.0.0 → v3.2.0
- filesize: v3.6.1 → [v6.1.0](https://github.com/avoidwork/filesize.js/blob/master/CHANGELOG.md#610)
- file-loader: v1.1.11 → [v4.3.0](https://github.com/webpack-contrib/file-loader/blob/master/CHANGELOG.md#430-2019-11-21)
- fs-extra: v7.0.0 → [v8.1.0](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md#810--2019-06-28)
- glob: v7.1.3 → [v7.1.6](https://github.com/isaacs/node-glob/compare/v7.1.3...v7.1.6)
- gzip-size: v5.0.0 → [v5.1.1](https://github.com/sindresorhus/gzip-size/compare/v5.0.0...v5.1.1)
- inquirer: v6.0.0 → [v7.0.6](https://github.com/SBoudrias/Inquirer.js/releases)
- karma: v2.0.0 → [v4.4.1](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md#441-2019-10-18)
- karma-chrome-launcher: v2.2.0 → [v3.1.0](https://github.com/karma-runner/karma-chrome-launcher/blob/master/CHANGELOG.md#310-2019-08-13)
- karma-coverage: v1.1.2 → [v2.0.1](https://github.com/karma-runner/karma-coverage/blob/master/CHANGELOG.md#201-2019-08-20)
- karma-webpack: v3.0.0 → [v4.0.2](https://github.com/webpack-contrib/karma-webpack/blob/master/CHANGELOG.md#402-2019-06-08)
- mini-css-extract-plugin v0.4.1 → [v0.9.0](https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/CHANGELOG.md#090-2019-12-20)
- mocha: v5.2.0 → [v7.1.0](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#710--2020-02-26)
- opn: v5.3.0 → [open v7.0.2](https://github.com/sindresorhus/open/releases)
- ora: v3.0.0 → [v4.0.3](https://github.com/sindresorhus/ora/compare/v3.0.0...v4.0.3)
- postcss-loader: v2.1.6 → [v3.0.0](https://github.com/postcss/postcss-loader/blob/master/CHANGELOG.md#300-2018-08-08) - dropped Node.js 4 support
- promise: v8.0.1 → v8.0.2
- resolve: v1.8.1 → [v1.10.0](https://github.com/browserify/resolve/compare/v1.8.1...v1.10.0)
- semver: v5.5.1 → [v5.6.0](https://github.com/npm/node-semver/compare/v5.5.1...v5.6.0)
- style-loader: v0.21.0 → [v0.23.1](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md#0231-2018-10-08)
- promise: v8.0.1 → v8.1.0
- resolve: v1.8.1 → [v1.15.1](https://github.com/browserify/resolve/compare/v1.8.1...v1.15.1)
- semver: v5.5.1 → [v7.1.3](https://github.com/npm/node-semver/compare/v5.5.1...v7.1.3)
- style-loader: v0.21.0 → [v1.1.3](https://github.com/webpack-contrib/style-loader/blob/master/CHANGELOG.md#0231-2018-10-08)
- uglifyjs-webpack-plugin v1.2.7 → [terser-webpack-plugin v1.2.3](https://github.com/webpack-contrib/terser-webpack-plugin#readme)
- url-loader: v1.0.1 → [v1.1.2](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md#112-2018-10-10)
- webpack: v4.16.4 → [v4.29.6](https://github.com/webpack/webpack/releases)
- webpack-dev-middleware: v3.1.3 → [v3.6.1](https://github.com/webpack/webpack-dev-middleware/releases)
- webpack-dev-server: v3.1.5 → [v3.1.9](https://github.com/webpack/webpack-dev-server/releases)
- webpack-hot-middleware: v2.22.3 → [v2.24.3](https://github.com/glenjamin/webpack-hot-middleware/compare/v2.22.3...v2.24.3)
- webpack-merge: v4.1.4 → [v4.2.1](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#421--2019-01-04)
- url-loader: v1.0.1 → [v2.3.0](https://github.com/webpack-contrib/url-loader/blob/master/CHANGELOG.md#230-2019-11-21)
- webpack: v4.16.4 → [v4.42.0](https://github.com/webpack/webpack/releases)
- webpack-dev-middleware: v3.1.3 → [v3.7.2](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md#372-2019-09-28)
- webpack-dev-server: v3.1.5 → [v3.10.3](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md#3103-2020-02-05)
- webpack-hot-middleware: v2.22.3 → [v2.25.0](https://github.com/webpack-contrib/webpack-hot-middleware/compare/v2.22.3...v2.25.0)
- webpack-merge: v4.1.4 → [v4.2.2](https://github.com/survivejs/webpack-merge/blob/master/CHANGELOG.md#422--2019-08-27)
- whatwg-fetch: v2.0.4 → [v3.0.0](https://github.com/github/fetch/releases/tag/v3.0.0)

# 0.23.0 / 2018-08-03
Expand Down
4 changes: 1 addition & 3 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,7 @@ Any additional options provided will be merged into nwb's defaults, which are:

```js
{
cache: true,
parallel: true,
sourceMap: true
extractComments: false
}
```

Expand Down
74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@
"node": ">=8.9.0"
},
"dependencies": {
"chalk": "2.4.2",
"chalk": "3.0.0",
"copy-template-dir": "1.4.0",
"cross-spawn": "6.0.5",
"cross-spawn": "7.0.1",
"debug": "4.1.1",
"detect-port": "1.3.0",
"figures": "2.0.0",
"filesize": "4.1.2",
"fs-extra": "7.0.1",
"gzip-size": "5.0.0",
"inquirer": "6.2.2",
"figures": "3.2.0",
"filesize": "6.1.0",
"fs-extra": "8.1.0",
"gzip-size": "5.1.1",
"inquirer": "7.0.6",
"minimist": "1.2.0",
"ora": "3.2.0",
"resolve": "1.10.0",
"ora": "4.0.3",
"resolve": "1.15.1",
"run-series": "1.1.8",
"semver": "5.6.0",
"webpack-merge": "4.2.1",
"semver": "7.1.3",
"webpack-merge": "4.2.2",

"babel-cli": "6.26.0",
"babel-core": "6.26.3",
Expand Down Expand Up @@ -74,55 +74,55 @@
"react-transform-hmr": "1.0.4",
"redbox-noreact": "1.1.0",

"karma": "4.0.1",
"karma-chrome-launcher": "2.2.0",
"karma-coverage": "1.1.2",
"karma": "4.4.1",
"karma-chrome-launcher": "3.1.0",
"karma-coverage": "2.0.1",
"karma-mocha": "1.3.0",
"karma-mocha-reporter": "2.2.5",
"karma-phantomjs-launcher": "1.0.4",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "3.0.5",
"karma-webpack": "4.0.2",
"phantomjs-prebuilt": "2.1.16",

"mocha": "6.0.2",
"mocha": "7.1.0",
"expect": "1.20.2",

"object-assign": "4.1.1",
"promise": "8.0.2",
"promise": "8.1.0",
"whatwg-fetch": "3.0.0",

"webpack": "4.29.6",
"autoprefixer": "9.4.10",
"webpack": "4.42.0",
"autoprefixer": "9.7.4",
"babel-loader": "7.1.5",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"copy-webpack-plugin": "5.0.0",
"css-loader": "2.1.1",
"case-sensitive-paths-webpack-plugin": "2.3.0",
"copy-webpack-plugin": "5.1.1",
"css-loader": "3.4.2",
"eventsource-polyfill": "0.9.6",
"file-loader": "3.0.1",
"file-loader": "4.3.0",
"html-webpack-plugin": "3.2.0",
"mini-css-extract-plugin": "0.5.0",
"mini-css-extract-plugin": "0.9.0",
"@insin/npm-install-webpack-plugin": "5.0.0",
"opn": "5.4.0",
"open": "7.0.2",
"postcss-loader": "3.0.0",
"style-loader": "0.23.1",
"url-loader": "1.1.2",
"terser-webpack-plugin": "1.2.3",
"webpack-dev-middleware": "3.6.1",
"webpack-dev-server": "3.2.1",
"webpack-hot-middleware": "2.24.3"
"style-loader": "1.1.3",
"url-loader": "2.3.0",
"terser-webpack-plugin": "2.3.5",
"webpack-dev-middleware": "3.7.2",
"webpack-dev-server": "3.10.3",
"webpack-hot-middleware": "2.25.0"
},
"devDependencies": {
"babel-preset-flow": "6.23.0",
"babel-register": "6.26.0",
"cross-env": "5.2.0",
"cross-env": "7.0.2",
"eslint-config-jonnybuchanan": "6.0.0",
"eventsource": "1.0.7",
"flow-bin": "0.82.0",
"glob": "7.1.3",
"nyc": "13.3.0",
"rimraf": "2.6.3",
"temp": "0.9.0",
"tree-kill": "1.2.1"
"glob": "7.1.6",
"nyc": "15.0.0",
"rimraf": "3.0.2",
"temp": "0.9.1",
"tree-kill": "1.2.2"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/appCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function createBuildConfig(args: Object, extra: Object = {}) {
}

if (directoryExists('public')) {
config.plugins.copy = [{from: path.resolve('public'), to: dist, ignore: '.gitkeep'}]
config.plugins.copy = [{from: path.resolve('public'), to: dist, ignore: ['.gitkeep']}]
}

if (args.polyfill === false || args.polyfills === false) {
Expand Down Expand Up @@ -106,7 +106,7 @@ export function createServeConfig(args: Object, ...extra: Object[]) {
}

if (directoryExists('public')) {
config.plugins.copy = [{from: path.resolve('public'), to: dist, ignore: '.gitkeep'}]
config.plugins.copy = [{from: path.resolve('public'), to: dist, ignore: ['.gitkeep']}]
}

return merge(config, ...extra)
Expand Down
2 changes: 1 addition & 1 deletion src/config/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function processWebpackConfig({pluginConfig, report, userConfig}) {
if ('autoprefixer' in userConfig.webpack) {
// Convenience: allow Autoprefixer browsers config to be configured as a String
if (typeOf(autoprefixer) === 'string') {
userConfig.webpack.autoprefixer = {browsers: autoprefixer}
userConfig.webpack.autoprefixer = {overrideBrowserslist: autoprefixer}
}
else if (typeOf(autoprefixer) !== 'object') {
report.error(
Expand Down
17 changes: 6 additions & 11 deletions src/createWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ type RuleConfigFactory = (?string, RuleConfig) => ?RuleConfig;
type ServerConfig = boolean | Object;

const DEFAULT_TERSER_CONFIG = {
cache: true,
parallel: true,
sourceMap: true,
extractComments: false,
}

function createTerserConfig(userWebpackConfig) {
Expand Down Expand Up @@ -198,10 +196,6 @@ export function createStyleLoaders(
let name = loaderConfigName(prefix)
let styleLoader = createLoader(name('style'), {
loader: require.resolve('style-loader'),
options: {
// Only enable style-loader HMR when we're serving a development build
hmr: Boolean(server),
}
})
let loaders = [
createLoader(name('css'), {
Expand Down Expand Up @@ -561,9 +555,10 @@ export function createPlugins(

// Copy static resources
if (buildConfig.copy || userConfig.copy) {
plugins.push(new CopyPlugin(
...getCopyPluginArgs(buildConfig.copy, userConfig.copy)
))
const [patterns, options] = getCopyPluginArgs(buildConfig.copy, userConfig.copy)
if (patterns.length > 0) {
plugins.push(new CopyPlugin(patterns, options))
}
}

// Automatically install missing npm dependencies and add them to package.json
Expand Down Expand Up @@ -593,7 +588,7 @@ export function createPlugins(
function createDefaultPostCSSPlugins(userWebpackConfig) {
return [
autoprefixer({
browsers: [
overrideBrowserslist: [
'>1%',
'last 4 versions',
'Firefox ESR',
Expand Down
6 changes: 3 additions & 3 deletions src/devServer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import opn from 'opn'
import opn from 'open'
import webpack from 'webpack'
import WebpackDevServer from 'webpack-dev-server'
import merge from 'webpack-merge'
Expand Down Expand Up @@ -38,9 +38,9 @@ export default function devServer(webpackConfig, serverConfig, url, cb) {
if (err) return cb(err)
if (open) {
// --open
if (typeOf(open) === 'boolean') opn(url)
if (typeOf(open) === 'boolean') opn(url, {url: true})
// --open=firefox
else opn(url, {app: open})
else opn(url, {app: open, url: true})
}
})
}
2 changes: 1 addition & 1 deletion tests/config-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ describe('processUserConfig()', () => {
})
it('allows webpack.autoprefixer to be a browser string', () => {
let config = process({webpack: {autoprefixer: 'test'}})
expect(config.webpack.autoprefixer).toEqual({browsers: 'test'})
expect(config.webpack.autoprefixer).toEqual({overrideBrowserslist: 'test'})
})
it('allows webpack.copy to be an array', () => {
let config = process({webpack: {copy: ['test']}})
Expand Down

0 comments on commit ee6063d

Please sign in to comment.