@flatjs/evolve 1.8.1-next.93 → 1.8.1-next.95

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @flatjs/evolve
2
2
 
3
+ ## 1.8.1-next.95
4
+
5
+ ### Patch Changes
6
+
7
+ - e5bb77c: change `failOnError` as true for Circular
8
+ - Updated dependencies [c3a3400]
9
+ - Updated dependencies [2372f79]
10
+ - @flatjs/mock@1.8.1-next.73
11
+
12
+ ## 1.8.1-next.94
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [3a97bf4]
17
+ - Updated dependencies [c97d12e]
18
+ - @flatjs/mock@1.8.1-next.72
19
+ - @flatjs/graph@1.8.1-next.50
20
+ - @flatjs/common@1.8.1-next.35
21
+ - @flatjs/evolve-preset-babel@1.8.1-next.17
22
+
3
23
  ## 1.8.1-next.93
4
24
 
5
25
  ### Patch Changes
@@ -1,7 +1,16 @@
1
1
  import ImageMinimizerPlugin from 'image-minimizer-webpack-plugin';
2
2
  /**
3
+ * Install libpng library & gifsicle tool
4
+ * macos
5
+ * =====================
3
6
  * brew install libpng
4
7
  * brew install gifsicle
8
+ *
9
+ * centos
10
+ * =====================
11
+ * sudo yum install libpng
12
+ * sudo yum install epel-release
13
+ * sudo yum install gifsicle
5
14
  * @returns
6
15
  */
7
16
  export declare const imageMinimizer: () => ImageMinimizerPlugin<unknown, unknown> | null;
@@ -16,7 +16,7 @@ export interface Options {
16
16
  include?: RegExp;
17
17
  /**
18
18
  * add errors to webpack instead of warnings
19
- * @default false
19
+ * @default true
20
20
  */
21
21
  failOnError?: boolean;
22
22
  /**
@@ -1 +1 @@
1
- import{relative}from"node:path";import{mergeOptions}from"@flatjs/common";import Graph from"tarjan-graph";import webpack from"webpack";const BASE_ERROR="Circular dependency detected:\r\n",PLUGIN_TITLE="CircularDependencyPlugin";export class CircularDependencyPlugin{constructor(o={}){this.options=mergeOptions({exclude:/node_modules/,include:/.*/,failOnError:!1,allowAsyncCycles:!1,projectCwd:process.cwd()},o)}apply(o){const e=this.options.projectCwd;o.hooks.compilation.tap(PLUGIN_TITLE,(o=>{o.hooks.optimizeModules.tap(PLUGIN_TITLE,(t=>{this.options.onStart&&this.options.onStart({compilation:o});const n=new(Graph.default||Graph);for(const e of t){const t=[];for(const n of e.dependencies){if(n.constructor&&"CommonJsSelfReferenceDependency"===n.constructor.name)continue;let r=null;r=o.moduleGraph?o.moduleGraph.getModule(n):n.module,r&&(r instanceof webpack.NormalModule&&r.resource&&(this.options.allowAsyncCycles&&n.weak||e!==r&&t.push(r.identifier())))}n.add(e.identifier(),t)}const r=n.getCycles();this.isCyclic(r,o,e),this.options.onEnd&&this.options.onEnd({compilation:o})}))}))}isCyclic(o,e,t){o.forEach((o=>{const n=o.slice().reverse().map((o=>{const t=e.findModule(o.name);return t instanceof webpack.NormalModule&&t.resource||null}));if(n.every((o=>!o||this.options.exclude.test(o)||!this.options.include.test(o))))return;const r=n.map((o=>relative(t,o)));if(this.options.onDetected){try{this.options.onDetected({paths:r.concat([r[0]]),compilation:e})}catch(o){e.errors.push(o)}return}const s=new Error(BASE_ERROR.concat(r.concat([r[0]]).join(" -> ")));this.options.failOnError?e.errors.push(s):e.warnings.push(s)}))}}
1
+ import{relative}from"node:path";import{mergeOptions}from"@flatjs/common";import Graph from"tarjan-graph";import webpack from"webpack";const BASE_ERROR="Circular dependency detected:\r\n",PLUGIN_TITLE="CircularDependencyPlugin";export class CircularDependencyPlugin{constructor(o={}){this.options=mergeOptions({exclude:/node_modules/,include:/.*/,failOnError:!0,allowAsyncCycles:!1,projectCwd:process.cwd()},o)}apply(o){const e=this.options.projectCwd;o.hooks.compilation.tap(PLUGIN_TITLE,(o=>{o.hooks.optimizeModules.tap(PLUGIN_TITLE,(t=>{this.options.onStart&&this.options.onStart({compilation:o});const n=new(Graph.default||Graph);for(const e of t){const t=[];for(const n of e.dependencies){if(n.constructor&&"CommonJsSelfReferenceDependency"===n.constructor.name)continue;let r=null;r=o.moduleGraph?o.moduleGraph.getModule(n):n.module,r&&(r instanceof webpack.NormalModule&&r.resource&&(this.options.allowAsyncCycles&&n.weak||e!==r&&t.push(r.identifier())))}n.add(e.identifier(),t)}const r=n.getCycles();this.isCyclic(r,o,e),this.options.onEnd&&this.options.onEnd({compilation:o})}))}))}isCyclic(o,e,t){o.forEach((o=>{const n=o.slice().reverse().map((o=>{const t=e.findModule(o.name);return t instanceof webpack.NormalModule&&t.resource||null}));if(n.every((o=>!o||this.options.exclude.test(o)||!this.options.include.test(o))))return;const r=n.map((o=>relative(t,o)));if(this.options.onDetected){try{this.options.onDetected({paths:r.concat([r[0]]),compilation:e})}catch(o){e.errors.push(o)}return}const s=new Error(BASE_ERROR.concat(r.concat([r[0]]).join(" -> ")));this.options.failOnError?e.errors.push(s):e.warnings.push(s)}))}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "1.8.1-next.93",
3
+ "version": "1.8.1-next.95",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -46,8 +46,8 @@
46
46
  "@flatjs/common": "1.8.1-next.35",
47
47
  "@flatjs/evolve-preset-babel": "1.8.1-next.17",
48
48
  "@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.35",
49
- "@flatjs/graph": "1.8.1-next.49",
50
- "@flatjs/mock": "1.8.1-next.71",
49
+ "@flatjs/graph": "1.8.1-next.50",
50
+ "@flatjs/mock": "1.8.1-next.73",
51
51
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
52
52
  "@types/babel__core": "7.20.1",
53
53
  "babel-loader": "9.1.3",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "devDependencies": {
84
84
  "@armit/eslint-config-bases": "^0.0.23",
85
- "@flatjs/testing": "1.8.1-next.36",
85
+ "@flatjs/testing": "1.8.1-next.37",
86
86
  "@swc/core": "1.3.74",
87
87
  "@types/express": "4.17.17",
88
88
  "@types/listr": "0.14.4",