Update all dependencies

This commit is contained in:
Quantum 2023-07-21 22:50:04 -04:00
parent 0ed1fd7dbf
commit 4599d9af26
4 changed files with 2151 additions and 4944 deletions

7009
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
"version": "0.0.1", "version": "0.0.1",
"description": "Correct Horse Battery Staple-style Password Generator", "description": "Correct Horse Battery Staple-style Password Generator",
"scripts": { "scripts": {
"build": "rimraf dist && cross-env NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=production webpack", "build": "rimraf dist && cross-env NODE_ENV=production webpack",
"serve": "webpack-dev-server", "serve": "webpack-dev-server",
"test": "mocha tests" "test": "mocha tests"
}, },
@ -11,7 +11,7 @@
"author": "Quantum", "author": "Quantum",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"devDependencies": { "devDependencies": {
"autoprefixer": "^9.8.0", "autoprefixer": "^10.4.14",
"css-loader": "^6.8.1", "css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1", "css-minimizer-webpack-plugin": "^5.0.1",
"ejs-loader": "^0.5.0", "ejs-loader": "^0.5.0",
@ -19,16 +19,16 @@
"html-loader": "^1.1.0", "html-loader": "^1.1.0",
"html-webpack-plugin": "^5.5.3", "html-webpack-plugin": "^5.5.3",
"mini-css-extract-plugin": "^2.7.6", "mini-css-extract-plugin": "^2.7.6",
"mocha": "^8.1.3", "mocha": "^10.2.0",
"postcss-loader": "^3.0.0", "postcss-loader": "^7.3.3",
"rimraf": "^2.7.1", "rimraf": "^5.0.1",
"sass": "^1.64.1", "sass": "^1.64.1",
"sass-loader": "^13.3.2", "sass-loader": "^13.3.2",
"style-loader": "^0.23.1", "style-loader": "^3.3.3",
"terser-webpack-plugin": "^4.2.3", "terser-webpack-plugin": "^5.3.9",
"webpack": "^5.88.2", "webpack": "^5.88.2",
"webpack-cli": "^5.1.4", "webpack-cli": "^5.1.4",
"webpack-dev-server": "^3.11.3" "webpack-dev-server": "^4.15.1"
}, },
"dependencies": { "dependencies": {
"bootstrap": "^4.5.0", "bootstrap": "^4.5.0",

View file

@ -36,7 +36,7 @@ body {
.footer { .footer {
min-height: $spacer * 4; min-height: $spacer * 4;
padding: ($spacer * 4 - $font-size-base) / 2 0; padding: calc(($spacer * 4 - $font-size-base) / 2) 0;
} }
#generated-password { #generated-password {

View file

@ -1,32 +1,32 @@
const path = require('path') const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin') const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin');
const mode = process.env.NODE_ENV || 'development' const mode = process.env.NODE_ENV || 'development';
module.exports = { module.exports = {
optimization: { optimization: {
minimizer: [ minimizer: [
new TerserPlugin({ new TerserPlugin({
cache: true,
extractComments: true,
parallel: true, parallel: true,
sourceMap: true terserOptions: {
sourceMap: true,
},
}), }),
new CssMinimizerPlugin({}) new CssMinimizerPlugin({}),
] ],
}, },
entry: [ entry: [
'core-js/fn/array/from', 'core-js/fn/array/from',
'core-js/fn/array/includes', 'core-js/fn/array/includes',
'./src/app.js' './src/app.js',
], ],
mode: mode, mode: mode,
output: { output: {
filename: '[name].[contenthash].js', filename: '[name].[contenthash].js',
path: path.resolve(__dirname, 'dist') path: path.resolve(__dirname, 'dist'),
}, },
plugins: [ plugins: [
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
@ -37,12 +37,12 @@ module.exports = {
removeRedundantAttributes: true, removeRedundantAttributes: true,
removeScriptTypeAttributes: true, removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true, removeStyleLinkTypeAttributes: true,
useShortDoctype: true useShortDoctype: true,
} : false } : false,
}), }),
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: '[name].[contenthash].css' filename: '[name].[contenthash].css',
}) }),
], ],
module: { module: {
rules: [ rules: [
@ -50,33 +50,35 @@ module.exports = {
test: /\.(scss)$/, test: /\.(scss)$/,
use: [ use: [
{ {
loader: mode === 'production' ? MiniCssExtractPlugin.loader : 'style-loader' loader: mode === 'production' ? MiniCssExtractPlugin.loader : 'style-loader',
}, },
{ {
// Interprets `@import` and `url()` like `import/require()` and will resolve them // Interprets `@import` and `url()` like `import/require()` and will resolve them
loader: 'css-loader' loader: 'css-loader',
}, },
{ {
// Loader for webpack to process CSS with PostCSS // Loader for webpack to process CSS with PostCSS
loader: 'postcss-loader', loader: 'postcss-loader',
options: { options: {
plugins: function () { postcssOptions: {
return [ plugins: function () {
require('autoprefixer') return [
] require('autoprefixer'),
} ];
} },
},
},
}, },
{ {
// Loads a SASS/SCSS file and compiles it to CSS // Loads a SASS/SCSS file and compiles it to CSS
loader: 'sass-loader' loader: 'sass-loader',
} },
] ],
}, },
{ {
test: /\.(png|jp(e*)g|svg)$/, test: /\.(png|jp(e*)g|svg)$/,
type: 'asset/resource' type: 'asset/resource',
} },
] ],
} },
} };