From 1eff7f4a65ec916c6f24dd5424a18d9f336d7e86 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sat, 10 Feb 2024 11:09:21 -0600 Subject: [PATCH] refactor: post-lerna --- packages/build/build/build.eslint.config.js | 1 - .../build/build/build.test.webpack.config.js | 8 -- packages/build/build/build.webpack.config.js | 17 ----- packages/build/package.json | 8 +- packages/build/test/{server => e2e}/lint.js | 0 packages/core/build/core.eslint.config.js | 74 ------------------- packages/core/build/core.webpack.config.js | 15 ---- packages/core/build/test.webpack.config.js | 8 -- packages/core/package.json | 10 +-- packages/create-fleck/package.json | 1 - .../template/package.json.noconflict | 1 - packages/db/package.json | 1 - packages/docker/package.json | 1 - packages/electron/package.json | 1 - packages/passport-local-react/package.json | 1 - packages/passport-local/package.json | 1 - packages/passport-react/package.json | 1 - packages/passport/package.json | 1 - packages/react/package.json | 1 - packages/redis/package.json | 1 - packages/redux/package.json | 1 - packages/repl/package.json | 1 - packages/server/package.json | 1 - packages/session/package.json | 1 - packages/socket/package.json | 1 - packages/web/package.json | 1 - website | 2 +- 27 files changed, 8 insertions(+), 152 deletions(-) delete mode 100644 packages/build/build/build.eslint.config.js delete mode 100644 packages/build/build/build.test.webpack.config.js delete mode 100644 packages/build/build/build.webpack.config.js rename packages/build/test/{server => e2e}/lint.js (100%) delete mode 100644 packages/core/build/core.eslint.config.js delete mode 100644 packages/core/build/core.webpack.config.js delete mode 100644 packages/core/build/test.webpack.config.js diff --git a/packages/build/build/build.eslint.config.js b/packages/build/build/build.eslint.config.js deleted file mode 100644 index a179d08..0000000 --- a/packages/build/build/build.eslint.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./default.eslint.config')(require('./build').from()); diff --git a/packages/build/build/build.test.webpack.config.js b/packages/build/build/build.test.webpack.config.js deleted file mode 100644 index 361e327..0000000 --- a/packages/build/build/build.test.webpack.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const Build = require('./build'); -const configFn = require('./test.webpack.config'); - -module.exports = async (env, argv) => { - const flecks = await Build.from(); - const config = await configFn(env, argv, flecks); - return config; -}; diff --git a/packages/build/build/build.webpack.config.js b/packages/build/build/build.webpack.config.js deleted file mode 100644 index dff3508..0000000 --- a/packages/build/build/build.webpack.config.js +++ /dev/null @@ -1,17 +0,0 @@ -const Build = require('./build'); -const configFn = require('./fleck.webpack.config'); -const {ProcessAssets, processFleckAssets} = require('./process-assets'); -const {executable} = require('./webpack'); - -module.exports = async (env, argv) => { - const flecks = await Build.from(); - const config = await configFn(env, argv, flecks); - config.plugins.push(new ProcessAssets('fleck', flecks)); - // Small hack because internals. - flecks.hooks['@flecks/build.processAssets'] = [{ - fleck: '@flecks/build', - fn: (target, assets, compilation) => processFleckAssets(assets, compilation), - }]; - config.plugins.push(executable()); - return config; -}; diff --git a/packages/build/package.json b/packages/build/package.json index d097c3d..cc93e34 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -4,12 +4,10 @@ "author": "cha0s", "license": "MIT", "scripts": { - "build": "webpack --config ./build/build.webpack.config.js --mode production", + "build": "flecks build", "clean": "rm -rf dist node_modules yarn.lock", - "lint": "eslint --config ./build/eslint.config.js .", - "postversion": "npm run build", - "test": "webpack --config ./build/build.test.webpack.config.js --mode production && mocha --colors --parallel ./dist/test/*.js ./dist/test/server/*.js", - "test:watch": "webpack watch --config ./build/build.test.webpack.config.js --mode development & mocha --colors --parallel --watch --watch-files ./dist/test/*.js ./dist/test/server/*.js" + "lint": "flecks lint", + "test": "flecks test" }, "repository": { "type": "git", diff --git a/packages/build/test/server/lint.js b/packages/build/test/e2e/lint.js similarity index 100% rename from packages/build/test/server/lint.js rename to packages/build/test/e2e/lint.js diff --git a/packages/core/build/core.eslint.config.js b/packages/core/build/core.eslint.config.js deleted file mode 100644 index 1bfd462..0000000 --- a/packages/core/build/core.eslint.config.js +++ /dev/null @@ -1,74 +0,0 @@ -const globals = require('globals'); - -module.exports = ({ - extends: [ - require.resolve('eslint-config-airbnb'), - require.resolve('eslint-config-airbnb/hooks'), - ], - globals: { - ...globals.browser, - ...globals.es2021, - ...globals.mocha, - ...globals.node, - __non_webpack_require__: true, - }, - ignorePatterns: [ - 'dist/**', - // Not even gonna try. - 'build/flecks.hooks.js', - ], - overrides: [ - { - files: [ - 'build/**/*.js', - ], - rules: { - 'import/no-extraneous-dependencies': ['error', {devDependencies: true}], - 'import/no-dynamic-require': 'off', - 'global-require': 'off', - }, - }, - { - files: [ - 'test/**/*.js', - ], - rules: { - 'brace-style': 'off', - 'class-methods-use-this': 'off', - 'import/no-extraneous-dependencies': 'off', - 'import/no-unresolved': 'off', - 'max-classes-per-file': 'off', - 'no-new': 'off', - 'no-unused-expressions': 'off', - 'padded-blocks': 'off', - }, - }, - ], - parser: require.resolve('@babel/eslint-parser'), - parserOptions: { - requireConfigFile: false, - }, - plugins: ['@babel'], - rules: { - 'brace-style': ['error', 'stroustrup'], - // Bug: https://github.com/import-js/eslint-plugin-import/issues/2181 - 'import/no-import-module-exports': 'off', - 'import/prefer-default-export': 'off', - 'jsx-a11y/control-has-associated-label': ['error', {assert: 'either'}], - 'jsx-a11y/label-has-associated-control': ['error', {assert: 'either'}], - 'no-param-reassign': ['error', {props: false}], - 'no-plusplus': 'off', - 'no-shadow': 'off', - 'object-curly-spacing': 'off', - 'padded-blocks': ['error', {classes: 'always'}], - yoda: 'off', - }, - settings: { - 'import/resolver': { - node: {}, - }, - react: { - version: '18.2.0', - }, - }, -}); diff --git a/packages/core/build/core.webpack.config.js b/packages/core/build/core.webpack.config.js deleted file mode 100644 index d8df2e0..0000000 --- a/packages/core/build/core.webpack.config.js +++ /dev/null @@ -1,15 +0,0 @@ -const Build = require('../../build/build/build'); -const configFn = require('../../build/build/fleck.webpack.config'); -const {ProcessAssets, processFleckAssets} = require('../../build/build/process-assets'); - -module.exports = async (env, argv) => { - const flecks = await Build.from(); - const config = await configFn(env, argv, flecks); - config.plugins.push(new ProcessAssets('fleck', flecks)); - // Small hack because internals. - flecks.hooks['@flecks/build.processAssets'] = [{ - fleck: '@flecks/build', - fn: (target, assets, compilation) => processFleckAssets(assets, compilation), - }]; - return config; -}; diff --git a/packages/core/build/test.webpack.config.js b/packages/core/build/test.webpack.config.js deleted file mode 100644 index d6615da..0000000 --- a/packages/core/build/test.webpack.config.js +++ /dev/null @@ -1,8 +0,0 @@ -const Build = require('../../build/build/build'); -const configFn = require('../../build/build/test.webpack.config'); - -module.exports = async (env, argv) => { - const flecks = await Build.from(); - const config = await configFn(env, argv, flecks); - return config; -}; diff --git a/packages/core/package.json b/packages/core/package.json index 7c1a984..6085cf4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -4,12 +4,10 @@ "author": "cha0s", "license": "MIT", "scripts": { - "build": "webpack --config ./build/core.webpack.config.js --mode production", - "clean": "rm -rf dist node_modules yarn.lock", - "lint": "eslint --config ./build/core.eslint.config.js .", - "postversion": "npm run build", - "test": "webpack --config ./build/test.webpack.config.js --mode production && mocha --colors --parallel ./dist/test/*.js ./dist/test/server/*.js", - "test:watch": "webpack watch --config ./build/test.webpack.config.js --mode development & mocha --colors --parallel --watch --watch-files ./dist/test/*.js ./dist/test/server/*.js" + "build": "flecks build", + "clean": "flecks clean", + "lint": "flecks lint", + "test": "flecks test" }, "repository": { "type": "git", diff --git a/packages/create-fleck/package.json b/packages/create-fleck/package.json index be2152c..8b841de 100644 --- a/packages/create-fleck/package.json +++ b/packages/create-fleck/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/create-fleck/template/package.json.noconflict b/packages/create-fleck/template/package.json.noconflict index c1a8cc9..192e04b 100644 --- a/packages/create-fleck/template/package.json.noconflict +++ b/packages/create-fleck/template/package.json.noconflict @@ -4,7 +4,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "files": [ diff --git a/packages/db/package.json b/packages/db/package.json index 92410b6..07a051a 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/docker/package.json b/packages/docker/package.json index aa78624..0bbd066 100644 --- a/packages/docker/package.json +++ b/packages/docker/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/electron/package.json b/packages/electron/package.json index 8c58657..09cb2d7 100644 --- a/packages/electron/package.json +++ b/packages/electron/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/passport-local-react/package.json b/packages/passport-local-react/package.json index 0ff00f2..dd3bca6 100644 --- a/packages/passport-local-react/package.json +++ b/packages/passport-local-react/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/passport-local/package.json b/packages/passport-local/package.json index feaaa31..6c16b04 100644 --- a/packages/passport-local/package.json +++ b/packages/passport-local/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/passport-react/package.json b/packages/passport-react/package.json index 955f054..9179cbe 100644 --- a/packages/passport-react/package.json +++ b/packages/passport-react/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/passport/package.json b/packages/passport/package.json index 2f14094..5a70cda 100644 --- a/packages/passport/package.json +++ b/packages/passport/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/react/package.json b/packages/react/package.json index db61225..97de014 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "postinstall": "node src/fake-context.js", "test": "flecks test" }, diff --git a/packages/redis/package.json b/packages/redis/package.json index 175ac06..9d8512a 100644 --- a/packages/redis/package.json +++ b/packages/redis/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/redux/package.json b/packages/redux/package.json index b9d5685..583f7a9 100644 --- a/packages/redux/package.json +++ b/packages/redux/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/repl/package.json b/packages/repl/package.json index b5f7cdc..e11f3bd 100644 --- a/packages/repl/package.json +++ b/packages/repl/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/server/package.json b/packages/server/package.json index 7d6609b..7f2f4f8 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/session/package.json b/packages/session/package.json index f1b9749..9250989 100644 --- a/packages/session/package.json +++ b/packages/session/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/socket/package.json b/packages/socket/package.json index a26f3e6..a87e4cd 100644 --- a/packages/socket/package.json +++ b/packages/socket/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/packages/web/package.json b/packages/web/package.json index 460c5d9..a63bcdb 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -7,7 +7,6 @@ "build": "flecks build", "clean": "flecks clean", "lint": "flecks lint", - "postversion": "npm run build", "test": "flecks test" }, "repository": { diff --git a/website b/website index a353767..813bc11 160000 --- a/website +++ b/website @@ -1 +1 @@ -Subproject commit a353767791b7cff7b47057ec4cfb7651bb12e020 +Subproject commit 813bc11d09557e9fb25126ceb7041f130c36551e