upgrade minimum nodejs version, yarn dev deps

Looks like I basically had to do this to keep up. With nodejs version 12
(current LTS), the version of fsevents I installed wouldn't build. A
"yarn upgrade" by itself resulted in a new problem as described in #69.
Conversely, the new versions don't install with nodejs 8. So I bit the
bullet and upgraded all the dev dependency stuff and the nodejs at once.
nodejs 10 seems capable of running either the old or new, fwiw.

I'm a little sad that this seems to have made the UI bundle 5% larger.
Before, "yarn build" said 350 KiB. After, 369 KiB. A little bit in
several places. For example, jquery-ui.bundle.js went from 156 KiB (in
2 chunks) to 160 KiB (in 1 chunk) for some reason.
This commit is contained in:
Scott Lamb 2020-03-01 21:57:51 -08:00
parent b298bd13f2
commit 92c532db3e
6 changed files with 3256 additions and 4689 deletions

View File

@ -33,7 +33,7 @@ matrix:
- yarn build - yarn build
- node_modules/eslint/bin/eslint.js ui-src - node_modules/eslint/bin/eslint.js ui-src
- language: node_js - language: node_js
node_js: "8" node_js: "lts/*"
script: script:
- yarn - yarn
- yarn build - yarn build

View File

@ -18,23 +18,23 @@
"repository": "scottlamb/moonfire-nvr", "repository": "scottlamb/moonfire-nvr",
"version": "0.1.0", "version": "0.1.0",
"devDependencies": { "devDependencies": {
"babel-core": "^6.26.0", "@babel/core": "^7.8.6",
"babel-loader": "^7.1.4", "@babel/preset-env": "^7.8.6",
"babel-plugin-transform-imports": "^1.5.0", "babel-loader": "^8.0.6",
"babel-preset-env": "^1.6.1", "babel-plugin-transform-imports": "^2.0.0",
"clean-webpack-plugin": "^0.1.18", "clean-webpack-plugin": "^3.0.0",
"compression-webpack-plugin": "^1.1.10", "compression-webpack-plugin": "^3.1.0",
"css-loader": "^0.28.10", "css-loader": "^3.4.2",
"eslint": "^4.18.2", "eslint": "^6.8.0",
"eslint-config-google": "^0.9.1", "eslint-config-google": "^0.14.0",
"file-loader": "^1.1.11", "file-loader": "^5.1.0",
"html-loader": "^0.5.5", "html-loader": "^0.5.5",
"html-webpack-plugin": "^3.0.6", "html-webpack-plugin": "^3.2.0",
"prettier": "1.11.1", "prettier": "1.19.1",
"style-loader": "^0.19.0", "style-loader": "^1.1.3",
"webpack": "^4.0.1", "webpack": "^4.41.6",
"webpack-cli": "^2.0.10", "webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.1.0", "webpack-dev-server": "^3.10.3",
"webpack-merge": "^4.1.2" "webpack-merge": "^4.2.2"
} }
} }

View File

@ -37,7 +37,7 @@ fi
# Useful constants # Useful constants
# #
NODE_MIN_VERSION="8" NODE_MIN_VERSION="10"
YARN_MIN_VERSION="1.0" YARN_MIN_VERSION="1.0"
CARGO_MIN_VERSION="0.2" CARGO_MIN_VERSION="0.2"
RUSTC_MIN_VERSION="1.40" RUSTC_MIN_VERSION="1.40"

View File

@ -49,10 +49,17 @@ module.exports = {
test: /\.js$/, test: /\.js$/,
loader: 'babel-loader', loader: 'babel-loader',
query: { query: {
presets: ['env', {modules: false}], presets: [
['@babel/preset-env', {
targets: {
esmodules: true,
},
modules: false
}]
],
}, },
exclude: /(node_modules|bower_components)/, exclude: /(node_modules|bower_components)/,
include: ['./ui-src'], include: [path.resolve('./ui-src')],
}, },
{ {
test: /\.png$/, test: /\.png$/,

View File

@ -35,7 +35,7 @@ const CompressionPlugin = require('compression-webpack-plugin');
const baseConfig = require('./base.config.js'); const baseConfig = require('./base.config.js');
const merge = require('webpack-merge'); const merge = require('webpack-merge');
const CleanWebpackPlugin = require('clean-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = (env, args) => { module.exports = (env, args) => {
return merge(baseConfig, { return merge(baseConfig, {
@ -88,7 +88,7 @@ module.exports = (env, args) => {
plugins: [ plugins: [
new CleanWebpackPlugin(), new CleanWebpackPlugin(),
new CompressionPlugin({ new CompressionPlugin({
asset: '[path].gz[query]', filename: '[path].gz[query]',
algorithm: 'gzip', algorithm: 'gzip',
test: /\.js$|\.css$|\.html$/, test: /\.js$|\.css$|\.html$/,
threshold: 10240, threshold: 10240,

7892
yarn.lock

File diff suppressed because it is too large Load Diff