diff --git a/packages/build/package.json b/packages/build/package.json index b0a95e7..44d9b78 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -46,7 +46,7 @@ "globals": "^13.23.0", "graceful-fs": "^4.2.11", "js-yaml": "4.1.0", - "mocha": "^7.0.0", + "mocha": "^10.2.0", "rimraf": "^3.0.2", "source-map-loader": "4.0.1", "source-map-support": "0.5.19", diff --git a/packages/core/build/flecks.js b/packages/core/build/flecks.js index 67f873c..a1a46dd 100644 --- a/packages/core/build/flecks.js +++ b/packages/core/build/flecks.js @@ -7,7 +7,7 @@ const { } = require('path'); const get = require('lodash.get'); -const set = require('lodash.set'); +const set = require('set-value'); const compose = require('./compose'); const D = require('./debug'); @@ -905,17 +905,6 @@ exports.Flecks = class Flecks { } } - /** - * Set a configuration value. - * - * @param {string} path The configuration path e.g. `@flecks/example.config`. - * @param {*} value The value to set. - * @returns {*} The value that was set. - */ - set(path, value) { - return set(this.config, path, value); - } - /** * Unregister hooks for a fleck. * @param {*} fleck diff --git a/packages/core/package.json b/packages/core/package.json index 1f37a5e..908e7cf 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -27,7 +27,7 @@ "glob": "^10.3.10", "jsonparse": "^1.3.1", "lodash.get": "^4.4.2", - "lodash.set": "^4.3.2", + "set-value": "^4.1.0", "source-map-support": "0.5.19", "supports-color": "9.2.1" }, @@ -53,7 +53,7 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-webpack-plugin": "^3.2.0", "globals": "^13.23.0", - "mocha": "^7.0.0", + "mocha": "^10.2.0", "rimraf": "^3.0.2", "source-map-loader": "4.0.1", "webpack": "^5.89.0", diff --git a/packages/fleck/package.json b/packages/fleck/package.json index 04f37ee..aec8115 100644 --- a/packages/fleck/package.json +++ b/packages/fleck/package.json @@ -25,7 +25,7 @@ "chokidar": "^3.5.3", "clear-module": "^4.1.2", "debug": "^4.3.3", - "mocha": "^8.3.2" + "mocha": "^10.2.0" }, "devDependencies": { "@flecks/build": "^3.1.5", diff --git a/packages/react-redux/package.json b/packages/react-redux/package.json index fbfbf77..f05b5fb 100644 --- a/packages/react-redux/package.json +++ b/packages/react-redux/package.json @@ -1,6 +1,8 @@ { "name": "@flecks/react-redux", "version": "3.1.5", + "author": "cha0s", + "license": "MIT", "scripts": { "build": "flecks build", "clean": "flecks clean", @@ -8,6 +10,14 @@ "postversion": "cp package.json dist", "test": "flecks test" }, + "repository": { + "type": "git", + "url": "git+https://github.com/cha0s/flecks.git", + "directory": "packages/react-redux" + }, + "publishConfig": { + "access": "public" + }, "files": [ "client.js", "index.js", @@ -19,9 +29,6 @@ "@flecks/redux": "^3.1.5", "react-redux": "^7.2.2" }, - "publishConfig": { - "access": "public" - }, "devDependencies": { "@flecks/build": "^3.1.5", "@flecks/fleck": "^3.1.5" diff --git a/packages/web/build/fix-mocha-critical-dependency.js b/packages/web/build/fix-mocha-critical-dependency.js new file mode 100644 index 0000000..2bc24c6 --- /dev/null +++ b/packages/web/build/fix-mocha-critical-dependency.js @@ -0,0 +1,8 @@ +// mocha tried... +module.exports = function FixMochaCriticalDependency(source) { + return source + .replace( + 'foundReporter = require.resolve(reporterName);', + '// foundReporter = require.resolve(reporterName);', + ); +}; diff --git a/packages/web/build/runtime.js b/packages/web/build/runtime.js index b4fac43..f4b88e2 100644 --- a/packages/web/build/runtime.js +++ b/packages/web/build/runtime.js @@ -143,5 +143,10 @@ module.exports = async (config, env, argv, flecks) => { }, ], }); + // Fix a little derp in mocha 10.2.0. + config.module.rules.push({ + test: /mocha\/mocha\.js$/, + use: await flecks.resolver.resolve('@flecks/web/build/fix-mocha-critical-dependency'), + }); } }; diff --git a/packages/web/package.json b/packages/web/package.json index 44096ba..dea6ecb 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -31,9 +31,9 @@ "@babel/types": "^7.17.0", "@flecks/core": "^3.1.5", "@webpack-cli/serve": "^2.0.5", - "add-asset-html-webpack-plugin": "^3.2.2", + "add-asset-html-webpack-plugin": "^6.0.0", "assert": "^2.1.0", - "autoprefixer": "^9.8.6", + "autoprefixer": "^10.4.17", "before-build-webpack": "^0.2.13", "browserify-zlib": "^0.2.0", "buffer": "^6.0.3", @@ -44,12 +44,12 @@ "html-loader": "^4.2.0", "html-webpack-plugin": "^5.5.3", "http-proxy": "^1.17.0", - "lodash.flatten": "^4.4.0", "mini-css-extract-plugin": "^2.7.6", - "mocha": "^8.3.2", + "mocha": "^10.2.0", "null-loader": "^4.0.1", "path-browserify": "^1.0.1", - "postcss-loader": "4.2.0", + "postcss": "^8.4.33", + "postcss-loader": "^8.1.0", "process": "^0.11.10", "react-dev-utils": "12.0.0", "sass": "^1.49.9",