@flatjs/evolve 1.8.1-next.64 → 1.8.1-next.66
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +25 -0
- package/dist/default-options.js +1 -1
- package/dist/main/prepare-build.js +1 -1
- package/dist/minimizer/image-minimizer.js +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
# @flatjs/evolve
|
2
2
|
|
3
|
+
## 1.8.1-next.66
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- c8b6937: Update `loading` message with newline
|
8
|
+
- 2204384: formatting evolve building messages
|
9
|
+
- Updated dependencies [929b998]
|
10
|
+
- Updated dependencies [728d0e1]
|
11
|
+
- @flatjs/mock@1.8.1-next.54
|
12
|
+
|
13
|
+
## 1.8.1-next.65
|
14
|
+
|
15
|
+
### Patch Changes
|
16
|
+
|
17
|
+
- 2ddec91: bump version
|
18
|
+
- a3f55aa: adjust maxProcesses to 75%
|
19
|
+
- Updated dependencies [94632ae]
|
20
|
+
- Updated dependencies [cfdc3af]
|
21
|
+
- Updated dependencies [2ddec91]
|
22
|
+
- @flatjs/mock@1.8.1-next.53
|
23
|
+
- @flatjs/forge-postcss-plugin-pixel@1.8.1-next.29
|
24
|
+
- @flatjs/evolve-preset-babel@1.8.1-next.14
|
25
|
+
- @flatjs/common@1.8.1-next.29
|
26
|
+
- @flatjs/graph@1.8.1-next.35
|
27
|
+
|
3
28
|
## 1.8.1-next.64
|
4
29
|
|
5
30
|
### Patch Changes
|
package/dist/default-options.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const defaultEvolveOptions={projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",rejectWarnings:!1,devServer:{autoOpen:!0,mockOptions:{mockBaseDir:"mocks"},clientOverlay:{errors:!0,warnings:!1},middlewares:[],watchOptions:{poll:1e3,ignored:/node_modules/,aggregateTimeout:500},defaultServeGlobalData:()=>Promise.resolve({})},webpack:{target:["web","es5"],plugins:[],ruleSets:[],publicPath:"auto",externals:{vue:"Vue",react:"React","react-dom":"ReactDOM"},outputDir:"public",enableBundleHashName:!0},pluginOptions:{},loaderOptions:{assetDataUrlMaxSize:4096,babelOptions:{usePreset:"react",plugins:[],presets:[]},runTsChecker:!0,lessOptions:{},postcssOptions:{cssnanoOptions:{}},pixelOptions:{rootValue:{px:100,rpx:1},outputUnit:"rem"},modularImports:[]},entryMap:{},multiHtmlCdn:{},multiHtmlCdnEnvResolver:function cdnResolver(){},needVerifyPackages:{},packageInstallChecker:{enabled:!1,detectModules:["@dimjs/*"],throwError:!1,showAllInstalledGraph:!0},maxProcesses:"
|
1
|
+
export const defaultEvolveOptions={projectCwd:process.cwd(),projectVirtualPath:"flatjs/evolve",rejectWarnings:!1,devServer:{autoOpen:!0,mockOptions:{mockBaseDir:"mocks"},clientOverlay:{errors:!0,warnings:!1},middlewares:[],watchOptions:{poll:1e3,ignored:/node_modules/,aggregateTimeout:500},defaultServeGlobalData:()=>Promise.resolve({})},webpack:{target:["web","es5"],plugins:[],ruleSets:[],publicPath:"auto",externals:{vue:"Vue",react:"React","react-dom":"ReactDOM"},outputDir:"public",enableBundleHashName:!0},pluginOptions:{},loaderOptions:{assetDataUrlMaxSize:4096,babelOptions:{usePreset:"react",plugins:[],presets:[]},runTsChecker:!0,lessOptions:{},postcssOptions:{cssnanoOptions:{}},pixelOptions:{rootValue:{px:100,rpx:1},outputUnit:"rem"},modularImports:[]},entryMap:{},multiHtmlCdn:{},multiHtmlCdnEnvResolver:function cdnResolver(){},needVerifyPackages:{},packageInstallChecker:{enabled:!1,detectModules:["@dimjs/*"],throwError:!1,showAllInstalledGraph:!0},maxProcesses:"80%",ci:{basedBranch:"master"}};
|
@@ -1 +1 @@
|
|
1
|
-
import{cpus}from"node:os";import{ensureSlash,logger,mergeOptions}from"@flatjs/common";import ora from"ora";import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{EvolveBuildError}from"../errors/evolve-build-error.js";import{chunkEntryMap}from"../helpers/chunk-entry-map.js";import{printCompilerError}from"../helpers/print-log.js";import{splitToMultiCompilerConfigs}from"../helpers/split-to-multi-compiler.js";import{envVerify}from"./env-verify.js";const getMaxProcessTasks=(r,o)=>Math.max(1,"string"==typeof o&&o.endsWith("%")?Math.round(cpus().length*Number(o.slice(0,-1))/100):Number(o)||r),startSingleEntryBuild=async(r,o)=>{const t=await loadWebpackConfig("production",r,o),e=splitToMultiCompilerConfigs(r,t,o);if(e.length>1)throw new Error("startSingleEntryBuild() only support `compiler` at a time");const n=e[0];return new Promise(((r,t)=>{webpack(n,((e,s)=>{if(e)return t(e);const i=s?.toJson();return i?.errors?.length?t(i.errors):o.rejectWarnings&&i?.warnings?.length?t(i.warnings):void r({name:n.name,warningStats:i?.warnings})}))}))};export const prepareBuild=async(r,o,t)=>{await envVerify(r,t);const e=t.multiHtmlCdn?.prod||[];if(!e.length)throw new Error('No CDN configuration for env: "prod"');const n=ensureSlash(e[Math.floor(Math.random()*e.length)],!0),s=[],i=chunkEntryMap(o,getMaxProcessTasks(Object.keys(o).length,t.maxProcesses)),a=i.length;logger.info(`
|
1
|
+
import{cpus}from"node:os";import{chalk,ensureSlash,logger,mergeOptions}from"@flatjs/common";import ora from"ora";import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{EvolveBuildError}from"../errors/evolve-build-error.js";import{chunkEntryMap}from"../helpers/chunk-entry-map.js";import{printCompilerError}from"../helpers/print-log.js";import{splitToMultiCompilerConfigs}from"../helpers/split-to-multi-compiler.js";import{envVerify}from"./env-verify.js";const getMaxProcessTasks=(r,o)=>Math.max(1,"string"==typeof o&&o.endsWith("%")?Math.round(cpus().length*Number(o.slice(0,-1))/100):Number(o)||r),startSingleEntryBuild=async(r,o)=>{const t=await loadWebpackConfig("production",r,o),e=splitToMultiCompilerConfigs(r,t,o);if(e.length>1)throw new Error("startSingleEntryBuild() only support `compiler` at a time");const n=e[0];return new Promise(((r,t)=>{webpack(n,((e,s)=>{if(e)return t(e);const i=s?.toJson();return i?.errors?.length?t(i.errors):o.rejectWarnings&&i?.warnings?.length?t(i.warnings):void r({name:n.name,warningStats:i?.warnings})}))}))};export const prepareBuild=async(r,o,t)=>{await envVerify(r,t);const e=t.multiHtmlCdn?.prod||[];if(!e.length)throw new Error('No CDN configuration for env: "prod"');const n=ensureSlash(e[Math.floor(Math.random()*e.length)],!0),s=[],i=chunkEntryMap(o,getMaxProcessTasks(Object.keys(o).length,t.maxProcesses)),a=i.length;logger.info(`Total ${chalk(["magenta"])(String(a))} jobs will be performed ...`);for(let r=0;r<a;r++){const o=ora(`Run build job (${chalk(["magenta"])(String(r+1))}) ...\n`).start();try{const e=i[r],a=[];for(const[r,o]of Object.entries(e)){const e={[r]:o},s=o.options?.useRelativeAssetPath;a.push(startSingleEntryBuild(e,mergeOptions(t,{webpack:{publicPath:s?"auto":n}})))}const l=await Promise.all(a);s.push(...l),o.succeed()}catch(r){o.fail();const t=printCompilerError(r);throw new EvolveBuildError("BUILD_ERROR",t)}}return s};
|
@@ -1 +1 @@
|
|
1
|
-
import{projectHasYarn}from"@armit/package";import{chalk,logger,requireResolve}from"@flatjs/common";import ImageMinimizerPlugin from"image-minimizer-webpack-plugin";import{moduleName}from"../constants.js";const logs=new Map;export const imageMinimizer=()=>{const e=[["svgo",{}],["gifsicle",{}],["jpegtran",{}],["pngquant",{}]].map((
|
1
|
+
import{projectHasYarn}from"@armit/package";import{chalk,logger,requireResolve}from"@flatjs/common";import ImageMinimizerPlugin from"image-minimizer-webpack-plugin";import{moduleName}from"../constants.js";const logs=new Map;export const imageMinimizer=()=>{const e=[],i=[["svgo",{}],["gifsicle",{}],["jpegtran",{}],["pngquant",{}]].map((i=>{const n=i[0];try{return requireResolve(`imagemin-${n}`),i}catch(i){if(!logs.get(n)){logs.set(n,!0);const i=chalk(["magenta"])(`"${projectHasYarn()?"yarn add":"npm install"} imagemin-${n} -D"`);e.push(`Execute ${i} for assets optimization`)}return null}})).filter(Boolean);if(e.length)for(const i of e)logger.warn(i,moduleName);return i.length?new ImageMinimizerPlugin({minimizer:{implementation:ImageMinimizerPlugin.imageminMinify,options:{plugins:i}}}):null};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flatjs/evolve",
|
3
|
-
"version": "1.8.1-next.
|
3
|
+
"version": "1.8.1-next.66",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -37,15 +37,15 @@
|
|
37
37
|
"typecheck": "tsc --project ./tsconfig.json --noEmit"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@armit/file-utility": "^0.0.
|
41
|
-
"@armit/git": "^0.0.
|
42
|
-
"@armit/package": "^0.0.
|
40
|
+
"@armit/file-utility": "^0.0.26",
|
41
|
+
"@armit/git": "^0.0.31",
|
42
|
+
"@armit/package": "^0.0.41",
|
43
43
|
"@babel/core": "7.22.5",
|
44
|
-
"@flatjs/common": "1.8.1-next.
|
45
|
-
"@flatjs/evolve-preset-babel": "1.8.1-next.
|
46
|
-
"@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.
|
47
|
-
"@flatjs/graph": "1.8.1-next.
|
48
|
-
"@flatjs/mock": "1.8.1-next.
|
44
|
+
"@flatjs/common": "1.8.1-next.29",
|
45
|
+
"@flatjs/evolve-preset-babel": "1.8.1-next.14",
|
46
|
+
"@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.29",
|
47
|
+
"@flatjs/graph": "1.8.1-next.35",
|
48
|
+
"@flatjs/mock": "1.8.1-next.54",
|
49
49
|
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
|
50
50
|
"@types/babel__core": "7.20.1",
|
51
51
|
"babel-loader": "9.1.2",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"fork-ts-checker-webpack-plugin": "8.0.0",
|
60
60
|
"happy-dom": "9.20.3",
|
61
61
|
"html-webpack-plugin": "5.5.3",
|
62
|
-
"image-minimizer-webpack-plugin": "3.8.
|
62
|
+
"image-minimizer-webpack-plugin": "3.8.3",
|
63
63
|
"less": "4.1.3",
|
64
64
|
"less-loader": "11.1.3",
|
65
65
|
"lodash": "4.17.21",
|
@@ -72,20 +72,20 @@
|
|
72
72
|
"terser-webpack-plugin": "5.3.9",
|
73
73
|
"tsconfig-paths-webpack-plugin": "4.0.1",
|
74
74
|
"type-fest": "^3.12.0",
|
75
|
-
"webpack": "5.
|
75
|
+
"webpack": "5.88.0",
|
76
76
|
"webpack-bundle-analyzer": "4.9.0",
|
77
77
|
"webpack-dev-server": "4.15.1",
|
78
78
|
"webpack-sources": "3.2.3"
|
79
79
|
},
|
80
80
|
"devDependencies": {
|
81
|
-
"@armit/eslint-config-bases": "^0.0.
|
82
|
-
"@flatjs/testing": "1.8.1-next.
|
83
|
-
"@swc/core": "1.3.
|
81
|
+
"@armit/eslint-config-bases": "^0.0.21",
|
82
|
+
"@flatjs/testing": "1.8.1-next.30",
|
83
|
+
"@swc/core": "1.3.66",
|
84
84
|
"@types/express": "4.17.17",
|
85
85
|
"@types/node": "20.3.1",
|
86
|
-
"@vitest/coverage-istanbul": "0.32.
|
87
|
-
"@vitest/ui": "0.32.
|
88
|
-
"eslint": "8.
|
86
|
+
"@vitest/coverage-istanbul": "0.32.2",
|
87
|
+
"@vitest/ui": "0.32.2",
|
88
|
+
"eslint": "8.43.0",
|
89
89
|
"imagemin-gifsicle": "7.0.0",
|
90
90
|
"imagemin-jpegtran": "7.0.0",
|
91
91
|
"imagemin-pngquant": "9.0.2",
|
@@ -97,7 +97,7 @@
|
|
97
97
|
"swc-unplugin-ts": "1.0.2",
|
98
98
|
"ts-node": "10.9.1",
|
99
99
|
"vite-tsconfig-paths": "4.2.0",
|
100
|
-
"vitest": "0.32.
|
100
|
+
"vitest": "0.32.2",
|
101
101
|
"vue-loader": "17.2.2"
|
102
102
|
},
|
103
103
|
"peerDependencies": {
|