@flatjs/evolve 2.0.7 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- import{searchConfig}from"@armit/config-loader";import{mergeOptions,logger}from"@flatjs/common";import{configFileName,moduleName}from"../constants.js";import{defaultEvolveOptions}from"../default-options.js";import{normalizeResolveAlias}from"../helpers/normalize-resolve-alias.js";import{refreshEvolveMockOptions}from"../helpers/refresh-evolve-mock-options.js";export const loadEvolveConfig=async(o,e,i={},s={configFile:configFileName,esmLoaderOptions:{externals:["@flatjs/evolve","@flatjs/mock","@flatjs/common"]}})=>{const{configFile:l,esmLoaderOptions:r}=s,a=await searchConfig(l,e,{esm:{...r,projectCwd:e}});let n={};n="function"==typeof a?.config?await(a?.config(o)):a?.config||{};const t=mergeOptions(defaultEvolveOptions,n),m=mergeOptions(t,i),f=mergeOptions(m,{projectCwd:e}),c="build"===o.command?f:await refreshEvolveMockOptions(e,f,s);return logger.debug(`Load evolve config:\n${JSON.stringify(c,null,2)}`,moduleName),c.webpack?.resolve?.alias&&(c.webpack.resolve.alias=normalizeResolveAlias(e,c.webpack?.resolve?.alias)),c};
1
+ import{searchConfig}from"@armit/config-loader";import{mergeOptions,logger}from"@flatjs/common";import{configFileName,moduleName}from"../constants.js";import{defaultEvolveOptions}from"../default-options.js";import{normalizeResolveAlias}from"../helpers/normalize-resolve-alias.js";import{refreshEvolveMockOptions}from"../helpers/refresh-evolve-mock-options.js";export const loadEvolveConfig=async(o,e,i={},s={configFile:configFileName,esmLoaderOptions:{externals:[/^@flatjs\/.*/]}})=>{const{configFile:r,esmLoaderOptions:l}=s,a=await searchConfig(r,e,{esm:{...l,projectCwd:e}});let n={};n="function"==typeof a?.config?await(a?.config(o)):a?.config||{};const t=mergeOptions(defaultEvolveOptions,n),m=mergeOptions(t,i),f=mergeOptions(m,{projectCwd:e}),c="build"===o.command?f:await refreshEvolveMockOptions(e,f,s);return logger.debug(`Load evolve config:\n${JSON.stringify(c,null,2)}`,moduleName),c.webpack?.resolve?.alias&&(c.webpack.resolve.alias=normalizeResolveAlias(e,c.webpack?.resolve?.alias)),c};
@@ -1,7 +1,7 @@
1
1
  export type ConfigLoaderOptions = {
2
2
  configFile: string;
3
3
  esmLoaderOptions: {
4
- externals: string[];
4
+ externals: Array<RegExp | string>;
5
5
  projectCwd?: string;
6
6
  };
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -35,17 +35,17 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@armit/babel-merge": "^0.1.4",
38
- "@armit/config-loader": "^0.1.4",
38
+ "@armit/config-loader": "^0.1.5",
39
39
  "@armit/file-utility": "^0.1.3",
40
40
  "@armit/git": "^0.1.3",
41
- "@armit/package": "^0.1.3",
41
+ "@armit/package": "^0.1.4",
42
42
  "@armit/worker-threads": "^0.1.3",
43
43
  "@babel/core": "7.23.9",
44
- "@flatjs/common": "2.0.3",
45
- "@flatjs/evolve-preset-babel": "2.0.3",
46
- "@flatjs/forge-postcss-plugin-pixel": "2.0.3",
47
- "@flatjs/graph": "2.0.5",
48
- "@flatjs/mock": "2.0.5",
44
+ "@flatjs/common": "2.0.4",
45
+ "@flatjs/evolve-preset-babel": "2.0.4",
46
+ "@flatjs/forge-postcss-plugin-pixel": "2.0.4",
47
+ "@flatjs/graph": "2.0.6",
48
+ "@flatjs/mock": "2.0.6",
49
49
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
50
50
  "@types/babel__core": "7.20.5",
51
51
  "babel-loader": "9.1.3",
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "devDependencies": {
82
82
  "@armit/eslint-config-bases": "^0.1.4",
83
- "@flatjs/testing": "2.0.3",
83
+ "@flatjs/testing": "2.0.4",
84
84
  "@swc/core": "1.3.106",
85
85
  "@types/express": "4.17.21",
86
86
  "@types/listr": "0.14.9",