diff --git a/CHANGELOG.md b/CHANGELOG.md index 4518422..9027dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # bedrock-webpack ChangeLog +## 11.5.0 - 2026-mm-dd + +### Changed +- Update dependencies: + - `less-loader@13` + - `sass-loader@17`. +- Update all dev dependencies. + - `@digitalbazaar/eslint-config@8`. + - `eslint@9`. +- **NOTE**: Update supported platforms. + - Test on Node.js >=22. + - Update `engines.node` to `>=22`. + - Update README requirements section. + ## 11.4.0 - 2025-09-21 ### Changed diff --git a/README.md b/README.md index 6a063a4..ccf41b6 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ for development and to the [bedrock-views][] optimize command. ## Requirements -- npm v6+ +- node v22+ +- npm v11+ ## Quick Examples @@ -55,7 +56,7 @@ if(typeof MY_JSON !== 'undefined') { ## License -[Apache License, Version 2.0](LICENSE) Copyright 2017-2024 Digital Bazaar, Inc. +[Apache License, Version 2.0](LICENSE) Copyright 2017-2026 Digital Bazaar, Inc. Other Bedrock libraries are available under a non-commercial license for uses such as self-study, research, personal projects, or for evaluation purposes. diff --git a/.eslintrc.cjs b/eslint.config.js similarity index 70% rename from .eslintrc.cjs rename to eslint.config.js index 1f9ded9..42b4cfe 100644 --- a/.eslintrc.cjs +++ b/eslint.config.js @@ -1,5 +1,5 @@ /*! - * Copyright 2024 Digital Bazaar, Inc. + * Copyright 2022 - 2026 Digital Bazaar, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,17 +16,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -module.exports = { - root: true, - env: { - node: true - }, - extends: [ - 'digitalbazaar', - 'digitalbazaar/jsdoc', - 'digitalbazaar/module' - ], - rules: { - 'unicorn/prefer-node-protocol': 'error' - } -}; +import config from '@digitalbazaar/eslint-config/node-recommended'; + +export default [ + ...config +]; diff --git a/lib/index.js b/lib/index.js index d565a7d..3b16ef4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,5 +1,5 @@ /*! - * Copyright 2017 - 2025 Digital Bazaar, Inc. + * Copyright 2017 - 2026 Digital Bazaar, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -150,7 +150,7 @@ bedrock.events.on('bedrock-views.bundle.run', async options => { modules: [ // FIXME: this should be a param // FIXME: improve this - path.dirname(bedrock.config.views.bundle.paths.input.root), + path.dirname(bedrock.config.views.bundle.paths.input.root) ] } }; @@ -163,7 +163,7 @@ bedrock.events.on('bedrock-views.bundle.run', async options => { paths, configs: [ rootConfig, - ...overrideConfigs, + ...overrideConfigs ], optimize: options.optimize, watch: options.watch @@ -337,7 +337,7 @@ export async function bundle(options = {}) { corejs: '3.45', bugfixes: true, debug: command.webpackBabelDebug === 'true', - targets: ['defaults', 'not IE 11'], + targets: ['defaults', 'not IE 11'] } ] ] @@ -389,7 +389,7 @@ export async function bundle(options = {}) { hotReload: hmr, prettify: !isProduction } - }, + } /* // FIXME: fix or remove due to webpack v5 path issues { @@ -445,7 +445,7 @@ export async function bundle(options = {}) { // check if path exists try { await fs.promises.access(root, fs.constants.R_OK); - } catch(e) { + } catch { return; } // check current level @@ -526,12 +526,12 @@ export async function bundle(options = {}) { terserOptions.terserOptions.output = terserOptions.terserOptions.output || {}; terserOptions.terserOptions.output.comments = { - /* eslint-disable quote-props */ + /* eslint-disable @stylistic/quote-props */ 'true': true, 'all': 'all', 'some': 'some', 'false': false - /* eslint-enable quote-props */ + /* eslint-enable @stylistic/quote-props */ }[command.webpackJsComments]; } const cfg = { @@ -667,7 +667,7 @@ export async function bundle(options = {}) { // eslint-disable-next-line no-unused-vars compiler.hooks.invalid.tap('bedrock-webpack', (filename, changeTime) => { logger.info('watch bundle invalidated', { - filename, + filename //changeTime }); }); diff --git a/package.json b/package.json index 863e25b..c3fbd32 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "Apache-2.0", "main": "./lib/index.js", "scripts": { - "lint": "eslint --ext .cjs,.js ." + "lint": "eslint" }, "repository": { "type": "git", @@ -36,10 +36,10 @@ "file-size": "^1.0.0", "html-webpack-plugin": "^5.6.3", "less": "^4.1.2", - "less-loader": "^12.2.0", + "less-loader": "^13.0.0", "regenerator-runtime": "^0.14.1", "sass": "^1.80.3", - "sass-loader": "^16.0.2", + "sass-loader": "^17.0.0", "stats-webpack-plugin": "^0.7.0", "style-loader": "^4.0.0", "terser-webpack-plugin": "^5.3.14", @@ -57,12 +57,10 @@ "lib": "./lib" }, "engines": { - "node": ">=18" + "node": ">=22" }, "devDependencies": { - "eslint": "^8.57.1", - "eslint-config-digitalbazaar": "^5.0.1", - "eslint-plugin-jsdoc": "^50.4.1", - "eslint-plugin-unicorn": "^56.0.0" + "@digitalbazaar/eslint-config": "^8.0.1", + "eslint": "^9.39.4" } }