@flatjs/evolve 3.0.0-next.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
|
|
1
|
-
import CaseSensitivePathsPlugin from"case-sensitive-paths-webpack-plugin";import{logger}from"@flatjs/common";import{RsdoctorRspackPlugin}from"@rsdoctor/rspack-plugin";import rspack,{CssExtractRspackPlugin}from"@rspack/core";import ReactRefreshPlugin from"@rspack/plugin-react-refresh";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{createBuiltinDefineVariablesRspackPlugins}from"../../plugins/rspack/define-variable/index.js";import{createModuleFederationRspackPlugins}from"../../plugins/rspack/module-federation/index.js";import{createHtmlRspackPlugins}from"../../plugins/rspack/multi-html/index.js";import{createProgressRspackPlugins}from"../../plugins/rspack/progress-plugin/index.js";import{createCircularDependencyWebpackPlugins}from"../../plugins/webpack/circular-dependency/index.js";import{createCleanWebpackPlugins}from"../../plugins/webpack/clean-webpack/index.js";import{createStatsWebpackPlugins}from"../../plugins/webpack/stats-webpack/index.js";export const createRspackPlugins=async(e,s,a,r)=>{const n=s[0],[i,l]=n,c=enableBundleHashNameForModule(a,l?.options),t=[...createProgressRspackPlugins(s),new rspack.IgnorePlugin({resourceRegExp:/\.d\.[cm]ts$/}),new CaseSensitivePathsPlugin,...createCircularDependencyWebpackPlugins(e,a),new CssExtractRspackPlugin({filename:`[name]/${getBundleFileName("css",e,c)}`,chunkFilename:c?"[id].[contenthash].css":"[id].css"}),...await createBuiltinDefineVariablesRspackPlugins(e,a),...createCleanWebpackPlugins(e,s,a),...createModuleFederationRspackPlugins(e,s,a),...createHtmlRspackPlugins(e,s,a),...createStatsWebpackPlugins(e,a,r)],o=shouldEnableReactFastRefresh(e,n,a);o&&t.push(new ReactRefreshPlugin({overlay:!1,exclude:[/node_modules/]})),!o&&e&&(a.devServer?.liveReload?logger.warn('The HMR disabled cause of "liveReload" specificed'):logger.warn(`The HMR disabled cause of \`"moduleFederation":"${i}"\``)),a.openRsdoctor&&t.push(new RsdoctorRspackPlugin);const p=a.webpack?.plugins||[];return t.concat(p)};
|
1
|
+
import CaseSensitivePathsPlugin from"case-sensitive-paths-webpack-plugin";import{logger}from"@flatjs/common";import{RsdoctorRspackPlugin}from"@rsdoctor/rspack-plugin";import rspack,{CssExtractRspackPlugin}from"@rspack/core";import ReactRefreshPlugin from"@rspack/plugin-react-refresh";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{createBuiltinDefineVariablesRspackPlugins}from"../../plugins/rspack/define-variable/index.js";import{createModuleFederationRspackPlugins}from"../../plugins/rspack/module-federation/index.js";import{createHtmlRspackPlugins}from"../../plugins/rspack/multi-html/index.js";import{createProgressRspackPlugins}from"../../plugins/rspack/progress-plugin/index.js";import{createCircularDependencyWebpackPlugins}from"../../plugins/webpack/circular-dependency/index.js";import{createCleanWebpackPlugins}from"../../plugins/webpack/clean-webpack/index.js";import{createStatsWebpackPlugins}from"../../plugins/webpack/stats-webpack/index.js";export const createRspackPlugins=async(e,s,a,r)=>{const n=s[0],[i,l]=n,c=enableBundleHashNameForModule(a,l?.options),t=[...createProgressRspackPlugins(e,s),new rspack.IgnorePlugin({resourceRegExp:/\.d\.[cm]ts$/}),new CaseSensitivePathsPlugin,...createCircularDependencyWebpackPlugins(e,a),new CssExtractRspackPlugin({filename:`[name]/${getBundleFileName("css",e,c)}`,chunkFilename:c?"[id].[contenthash].css":"[id].css"}),...await createBuiltinDefineVariablesRspackPlugins(e,a),...createCleanWebpackPlugins(e,s,a),...createModuleFederationRspackPlugins(e,s,a),...createHtmlRspackPlugins(e,s,a),...createStatsWebpackPlugins(e,a,r)],o=shouldEnableReactFastRefresh(e,n,a);o&&t.push(new ReactRefreshPlugin({overlay:!1,exclude:[/node_modules/]})),!o&&e&&(a.devServer?.liveReload?logger.warn('The HMR disabled cause of "liveReload" specificed'):logger.warn(`The HMR disabled cause of \`"moduleFederation":"${i}"\``)),a.openRsdoctor&&t.push(new RsdoctorRspackPlugin);const p=a.webpack?.plugins||[];return t.concat(p)};
|
@@ -1 +1 @@
|
|
1
|
-
import{dirname,join}from"path";import{fileURLToPath}from"url";import{searchPackageDir}from"@armit/package";import{logger,mergeOptions,requireResolve}from"@flatjs/common";export const mergeInspectorEvolveConfig=e=>{const{inspector:r}=e;if(!r)return e;const{externals:n}=e.webpack||{};if(n){let r=n;if("function"==typeof n&&(r=n()),r.react||r["react-dom"])return logger.warn("React and ReactDOM are external dependencies, you need to manually integrate Inspector"),e}const{keys:
|
1
|
+
import{dirname,join}from"path";import{fileURLToPath}from"url";import{searchPackageDir}from"@armit/package";import{logger,mergeOptions,requireResolve}from"@flatjs/common";import{normalizePageProxy}from"./normalize-page-proxy.js";export const mergeInspectorEvolveConfig=e=>{const{inspector:r,devServer:o}=e;if(!r)return e;const{externals:n}=e.webpack||{};if(n){let r=n;if("function"==typeof n&&(r=n()),r.react||r["react-dom"])return logger.warn("React and ReactDOM are external dependencies, you need to manually integrate Inspector"),e}const t=normalizePageProxy(o?.pageProxy||"/pages"),{keys:i=["$mod","i"],customLaunchEditorEndpoint:s="/__hps_inspector"}=r,a={"process.env.INSPECTOR_ENDPOINT":JSON.stringify(join(t,s)),"process.env.INSPECTOR_KEYS":JSON.stringify(i.join(",")),"process.env.INSPECTOR_HIDE_CONSOLE":JSON.stringify("FALSE"),"process.env.INSPECTOR_HIDE_CONTEXT":JSON.stringify("TRUE"),"process.env.INSPECTOR_HIDE_DOM_PATH_ATTR":JSON.stringify("TRUE"),"process.env.INSPECTOR_DISABLE":JSON.stringify("FALSE")},p=mergeOptions(e,{pluginOptions:{definePlugin:a}}),c=requireResolve(import.meta.url,"@hyperse/inspector"),g=searchPackageDir({cwd:fileURLToPath(dirname(c))});if(!g)return logger.debug("@hyperse/inspector package not found"),p;const m=join(g,"dist","client","index.js"),f=p.entryMap;for(const[e,r]of Object.entries(f)){r.entry.push(m)}return p};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { Plugin as RspackPlugin } from '@rspack/core';
|
2
2
|
import { type ProgressPluginArgument } from '@rspack/core';
|
3
3
|
import type { EntryMapItem } from '../../../types/types-entry-map.js';
|
4
|
-
export declare const createProgressRspackPlugins: (entryMapItemList: EntryMapItem[], pluginOptions?: ProgressPluginArgument) => RspackPlugin[];
|
4
|
+
export declare const createProgressRspackPlugins: (serveMode: boolean, entryMapItemList: EntryMapItem[], pluginOptions?: ProgressPluginArgument) => RspackPlugin[];
|
@@ -1 +1 @@
|
|
1
|
-
import{Worker}from"node:worker_threads";import{resolve}from"path";import{getDirname}from"@armit/file-utility";import{mergeOptions}from"@hyperse/config-loader";import{ProgressPlugin}from"@rspack/core";import{progressHandler}from"./progress-handler.js";export const createProgressRspackPlugins=(r,e={})=>{if("test"===process.env.NODE_ENV)return console.warn("[WARNING] Using fake thread pool worker for unittest!"),[new ProgressPlugin({prefix:"[ evolve vite progress ]"})];const
|
1
|
+
import{Worker}from"node:worker_threads";import{resolve}from"path";import{getDirname}from"@armit/file-utility";import{mergeOptions}from"@hyperse/config-loader";import{ProgressPlugin}from"@rspack/core";import{progressHandler}from"./progress-handler.js";export const createProgressRspackPlugins=(r,e,o={})=>{if(r)return[];if("test"===process.env.NODE_ENV)return console.warn("[WARNING] Using fake thread pool worker for unittest!"),[new ProgressPlugin({prefix:"[ evolve vite progress ]"})];const s=resolve(getDirname(import.meta.url),"./progress-worker.js"),t=new Worker(s,{env:{...process.env,FORCE_COLOR:"3"}}),n=mergeOptions(progressHandler(t,e),o);return[new ProgressPlugin(n),{apply(r){r.hooks.done.tap("shutdown",()=>{t.terminate()})}}]};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flatjs/evolve",
|
3
|
-
"version": "3.0.0
|
3
|
+
"version": "3.0.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -49,25 +49,25 @@
|
|
49
49
|
"@babel/core": "^7.27.4",
|
50
50
|
"@clack/prompts": "^0.11.0",
|
51
51
|
"@discoveryjs/json-ext": "0.6.3",
|
52
|
-
"@flatjs/babel-plugin-import": "2.2.9
|
53
|
-
"@flatjs/common": "2.2.4
|
54
|
-
"@flatjs/evolve-preset-babel": "2.2.4
|
55
|
-
"@flatjs/forge-postcss-plugin-pixel": "2.2.4
|
56
|
-
"@flatjs/forge-ts-checker": "1.1.2
|
57
|
-
"@flatjs/graph": "2.2.9
|
58
|
-
"@flatjs/mock": "2.4.1
|
59
|
-
"@flatjs/swc-plugin-import": "1.0.0
|
52
|
+
"@flatjs/babel-plugin-import": "2.2.9",
|
53
|
+
"@flatjs/common": "2.2.4",
|
54
|
+
"@flatjs/evolve-preset-babel": "2.2.4",
|
55
|
+
"@flatjs/forge-postcss-plugin-pixel": "2.2.4",
|
56
|
+
"@flatjs/forge-ts-checker": "1.1.2",
|
57
|
+
"@flatjs/graph": "2.2.9",
|
58
|
+
"@flatjs/mock": "2.4.1",
|
59
|
+
"@flatjs/swc-plugin-import": "1.0.0",
|
60
60
|
"@hyperse/config-loader": "^1.0.5",
|
61
61
|
"@hyperse/html-webpack-plugin-loader": "^1.0.6",
|
62
|
-
"@hyperse/inspector": "^1.1.
|
63
|
-
"@hyperse/inspector-babel-plugin": "^1.1.
|
64
|
-
"@hyperse/inspector-common": "^1.1.
|
65
|
-
"@hyperse/inspector-middleware": "^1.1.
|
66
|
-
"@hyperse/inspector-swc-plugin": "^1.1.
|
62
|
+
"@hyperse/inspector": "^1.1.13",
|
63
|
+
"@hyperse/inspector-babel-plugin": "^1.1.7",
|
64
|
+
"@hyperse/inspector-common": "^1.1.4",
|
65
|
+
"@hyperse/inspector-middleware": "^1.1.7",
|
66
|
+
"@hyperse/inspector-swc-plugin": "^1.1.9",
|
67
67
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.0",
|
68
|
-
"@rsdoctor/rspack-plugin": "^1.1.
|
69
|
-
"@rspack/core": "
|
70
|
-
"@rspack/dev-server": "
|
68
|
+
"@rsdoctor/rspack-plugin": "^1.1.6",
|
69
|
+
"@rspack/core": "~1.4.2",
|
70
|
+
"@rspack/dev-server": "~1.1.3",
|
71
71
|
"@rspack/plugin-react-refresh": "^1.4.3",
|
72
72
|
"@swc/helpers": "^0.5.17",
|
73
73
|
"@types/babel__core": "^7.20.5",
|
@@ -105,7 +105,7 @@
|
|
105
105
|
"webpack-sources": "^3.3.2"
|
106
106
|
},
|
107
107
|
"devDependencies": {
|
108
|
-
"@flatjs/testing": "2.2.4
|
108
|
+
"@flatjs/testing": "2.2.4",
|
109
109
|
"@hyperse/eslint-config-hyperse": "^1.4.5",
|
110
110
|
"@swc/core": "1.12.1",
|
111
111
|
"@types/express": "5.0.3",
|