@flatjs/evolve 1.8.1-next.26 → 1.8.1-next.28

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @flatjs/evolve
2
2
 
3
+ ## 1.8.1-next.28
4
+
5
+ ### Patch Changes
6
+
7
+ - 4d7d4aa: refactor config-loader allow projectCwd passing
8
+ - Updated dependencies [4d7d4aa]
9
+ - @flatjs/common@1.8.1-next.15
10
+ - @flatjs/mock@1.8.1-next.25
11
+ - @flatjs/forge-postcss-plugin-pixel@1.8.1-next.15
12
+ - @flatjs/evolve-preset-babel@1.8.1-next.6
13
+
14
+ ## 1.8.1-next.27
15
+
16
+ ### Patch Changes
17
+
18
+ - 22c4464: Improved performance of `ForkTsCheckerWebpackPlugin`
19
+
3
20
  ## 1.8.1-next.26
4
21
 
5
22
  ### Patch Changes
@@ -1 +1 @@
1
- import{logger}from"@flatjs/common";import ReactRefreshWebpackPlugin from"@pmmmwh/react-refresh-webpack-plugin";import CaseSensitivePathsPlugin from"case-sensitive-paths-webpack-plugin";import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import MiniCssExtractPlugin from"mini-css-extract-plugin";import{BundleAnalyzerPlugin}from"webpack-bundle-analyzer";import{enableBundleHashNameForModule}from"../helpers/enable-bundle-hashname-for-module.js";import{getBundleFileName}from"../helpers/get-bundle-file-name.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{createCleanWebpackPlugin}from"../plugins/clean-webpack/index.js";import{createModuleFederationPlugin}from"../plugins/module-federation/index.js";import{createHtmlPlugins}from"../plugins/multi-html/index.js";export const createPlugins=(e,n,a)=>{const[r,l]=n,s=enableBundleHashNameForModule(a,l?.options),i=[new CaseSensitivePathsPlugin,new MiniCssExtractPlugin({filename:`[name]/${getBundleFileName("css",e,s)}`,chunkFilename:"[id].[contenthash].css"}),...createCleanWebpackPlugin(e,n,a),...createModuleFederationPlugin(e,n,a),...createHtmlPlugins(e,n,a)],{analyzer:t,loaderOptions:o,webpack:u}=a;o.runTsChecker&&i.push(new ForkTsCheckerWebpackPlugin({async:e})),t&&i.push(new BundleAnalyzerPlugin({analyzerPort:"auto",analyzerMode:"server",...t}));const c=shouldEnableReactFastRefresh(e,n,a);c&&i.push(new ReactRefreshWebpackPlugin({overlay:!1})),!c&&e&&logger.warn(`The HMR has disabled cause of ("${r}":"moduleFederation")`);const m=u?.plugins||[];return i.concat(m)};
1
+ import{logger}from"@flatjs/common";import ReactRefreshWebpackPlugin from"@pmmmwh/react-refresh-webpack-plugin";import CaseSensitivePathsPlugin from"case-sensitive-paths-webpack-plugin";import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import MiniCssExtractPlugin from"mini-css-extract-plugin";import{BundleAnalyzerPlugin}from"webpack-bundle-analyzer";import{moduleName}from"../constants.js";import{enableBundleHashNameForModule}from"../helpers/enable-bundle-hashname-for-module.js";import{getBundleFileName}from"../helpers/get-bundle-file-name.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{createCleanWebpackPlugin}from"../plugins/clean-webpack/index.js";import{createModuleFederationPlugin}from"../plugins/module-federation/index.js";import{createHtmlPlugins}from"../plugins/multi-html/index.js";export const createPlugins=(e,n,r)=>{const[t,s]=n,a=enableBundleHashNameForModule(r,s?.options),l=[new CaseSensitivePathsPlugin,new MiniCssExtractPlugin({filename:`[name]/${getBundleFileName("css",e,a)}`,chunkFilename:"[id].[contenthash].css"}),...createCleanWebpackPlugin(e,n,r),...createModuleFederationPlugin(e,n,r),...createHtmlPlugins(e,n,r)],{analyzer:i,loaderOptions:o,webpack:c}=r,u=n[1].entry||[],m=u.find((e=>/.vue$/.test(e)));if(o.runTsChecker&&!m){const n=u.reduce(((e,n)=>{const r=/\.(?:ts|tsx|js|jsx)$/.test(n)?[n]:[".ts",".tsx","jsx",".js"].map((e=>n+e));return e.concat(r)}),[]);logger.debug(`ForkTsCheckerWebpackPlugin: include: ${JSON.stringify(n)}`,moduleName),l.push(new ForkTsCheckerWebpackPlugin({async:e,typescript:{context:r.projectCwd,memoryLimit:8192,configOverwrite:{include:[...n,"./*.d.ts"]}}}))}i&&l.push(new BundleAnalyzerPlugin({analyzerPort:"auto",analyzerMode:"server",...i}));const p=shouldEnableReactFastRefresh(e,n,r);p&&l.push(new ReactRefreshWebpackPlugin({overlay:!1})),!p&&e&&logger.warn(`The HMR has disabled cause of ("${t}":"moduleFederation")`);const d=c?.plugins||[];return l.concat(d)};
@@ -5,6 +5,7 @@ export type ConfigLoaderOptions = {
5
5
  configFile: string;
6
6
  esmLoaderOptions: {
7
7
  externals: string[];
8
+ projectCwd?: string;
8
9
  };
9
10
  };
10
11
  export declare const loadEvolveConfig: (configEnv: EvolveConfigBase, projectCwd: string, overrideOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions) => Promise<FlatEvolveOptions>;
@@ -1 +1 @@
1
- import{mergeOptions,logger,searchConfig}from"@flatjs/common";import{configFileName,moduleName}from"../constants.js";import{defaultEvolveOptions}from"../default-options.js";import{refreshEvolveMockOptions}from"../helpers/refresh-evolve-mock-options.js";export const loadEvolveConfig=async(o,e,t={},i={configFile:configFileName,esmLoaderOptions:{externals:["@flatjs/evolve"]}})=>{const{configFile:n,esmLoaderOptions:s}=i,r=await searchConfig(n,e,{esm:s});let f={};f="function"==typeof r?.config?r?.config(o):r?.config||{};const l=mergeOptions(defaultEvolveOptions,f),m=mergeOptions(l,t),a=mergeOptions(m,{projectCwd:e}),c=await refreshEvolveMockOptions(e,a,i);return logger.debug(c,moduleName),c};
1
+ import{mergeOptions,logger,searchConfig}from"@flatjs/common";import{configFileName,moduleName}from"../constants.js";import{defaultEvolveOptions}from"../default-options.js";import{refreshEvolveMockOptions}from"../helpers/refresh-evolve-mock-options.js";export const loadEvolveConfig=async(o,e,t={},i={configFile:configFileName,esmLoaderOptions:{externals:["@flatjs/evolve"]}})=>{const{configFile:n,esmLoaderOptions:s}=i,r=await searchConfig(n,e,{esm:{...s,projectCwd:e}});let f={};f="function"==typeof r?.config?r?.config(o):r?.config||{};const l=mergeOptions(defaultEvolveOptions,f),m=mergeOptions(l,t),a=mergeOptions(m,{projectCwd:e}),c=await refreshEvolveMockOptions(e,a,i);return logger.debug(c,moduleName),c};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "1.8.1-next.26",
3
+ "version": "1.8.1-next.28",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -40,10 +40,10 @@
40
40
  "@armit/file-utility": "^0.0.19",
41
41
  "@armit/package": "^0.0.29",
42
42
  "@babel/core": "7.21.8",
43
- "@flatjs/common": "1.8.1-next.14",
43
+ "@flatjs/common": "1.8.1-next.15",
44
44
  "@flatjs/evolve-preset-babel": "1.8.1-next.6",
45
- "@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.14",
46
- "@flatjs/mock": "1.8.1-next.24",
45
+ "@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.15",
46
+ "@flatjs/mock": "1.8.1-next.25",
47
47
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
48
48
  "@types/babel__core": "7.20.0",
49
49
  "babel-loader": "9.1.2",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "devDependencies": {
77
77
  "@armit/eslint-config-bases": "^0.0.16",
78
- "@flatjs/testing": "1.8.1-next.11",
78
+ "@flatjs/testing": "1.8.1-next.12",
79
79
  "@swc/core": "1.3.59",
80
80
  "@types/express": "4.17.17",
81
81
  "@types/node": "20.2.3",