@flatjs/evolve 1.8.1-next.65 → 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
CHANGED
@@ -1,5 +1,15 @@
|
|
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
|
+
|
3
13
|
## 1.8.1-next.65
|
4
14
|
|
5
15
|
### 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": {
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"@flatjs/evolve-preset-babel": "1.8.1-next.14",
|
46
46
|
"@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.29",
|
47
47
|
"@flatjs/graph": "1.8.1-next.35",
|
48
|
-
"@flatjs/mock": "1.8.1-next.
|
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",
|