@flatjs/evolve 2.1.4 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. package/dist/create-webpack/create-plugins.d.ts +1 -1
  2. package/dist/create-webpack/load-watch-options.d.ts +1 -1
  3. package/dist/create-webpack/load-webpack-config.d.ts +1 -1
  4. package/dist/dev-server/middlewares/create-page-middleware.js +1 -1
  5. package/dist/helpers/custom-listr-renderer.d.ts +1 -1
  6. package/dist/helpers/get-stats-file-name.d.ts +1 -1
  7. package/dist/helpers/normalize-entry-module-absolute-path.d.ts +2 -2
  8. package/dist/main/prepare-build.d.ts +1 -1
  9. package/dist/main/start-analyzer.d.ts +1 -1
  10. package/dist/main/start-build-worker.d.ts +2 -2
  11. package/dist/main/start-build.d.ts +1 -1
  12. package/dist/main/start-group-entry-build.d.ts +1 -1
  13. package/dist/plugins/multi-html/multi-html-modify-plugin.d.ts +2 -2
  14. package/dist/plugins/stats-webpack/helper-write-stats.d.ts +1 -1
  15. package/dist/plugins/stats-webpack/index.d.ts +1 -1
  16. package/dist/plugins/stats-webpack/stats-webpack-plugin.d.ts +1 -1
  17. package/dist/plugins/ts-checker/ts-checker-guard-plugin.js +1 -1
  18. package/dist/types/types-dev-server.d.ts +2 -1
  19. package/package.json +31 -31
  20. package/templates/html-plugin/index-dev.html +1 -1
  21. package/templates/html-plugin/index-inte.html +1 -1
  22. package/templates/html-plugin/index-inte2.html +1 -1
  23. package/templates/html-plugin/index-inte3.html +1 -1
  24. package/templates/html-plugin/index-inte4.html +1 -1
  25. package/templates/html-plugin/index-me.html +1 -1
  26. package/templates/html-plugin/index-ntv.html +1 -1
  27. package/templates/html-plugin/index-prod.html +1 -1
  28. package/templates/html-plugin/index-rc.html +1 -1
  29. package/templates/html-plugin/index-uat.html +1 -1
  30. package/templates/main.html +1 -1
  31. package/templates/module-404.html +1 -1
  32. package/templates/module.html +1 -1
@@ -1,4 +1,4 @@
1
- import { FlatCliOptions } from '../types/types-cli-options.js';
1
+ import type { FlatCliOptions } from '../types/types-cli-options.js';
2
2
  import { type EntryMapItem } from '../types/types-entry-map.js';
3
3
  import { type FlatEvolveOptions } from '../types/types-options.js';
4
4
  import { type FlatEvolveWebpackOptions } from '../types/types-webpack.js';
@@ -1,5 +1,5 @@
1
1
  import { type FlatEvolveDevServerOptions } from '../types/types-dev-server.js';
2
- import { EvolveEntryMap } from '../types/types-entry-map.js';
2
+ import type { EvolveEntryMap } from '../types/types-entry-map.js';
3
3
  import { type FlatEvolveOptions } from '../types/types-options.js';
4
4
  /**
5
5
  * Loads the watch options for webpack configuration.
@@ -1,5 +1,5 @@
1
1
  import { type Configuration } from 'webpack';
2
- import { FlatCliOptions } from '../types/types-cli-options.js';
2
+ import type { FlatCliOptions } from '../types/types-cli-options.js';
3
3
  import { type EvolveEntryMap } from '../types/types-entry-map.js';
4
4
  import { type FlatEvolveOptions } from '../types/types-options.js';
5
5
  /**
@@ -1 +1 @@
1
- import{getPageMainHtml}from"./get-page-main-html.js";import{getPageModuleHtml}from"./get-page-module-html.js";import{getRuntimeManifest}from"./get-runtime-manifest.js";export const createPageMiddleware=(e,t,a,m)=>(m.devServer?.middlewares||[]).concat((async(i,n)=>{let g;if("/runtime/manifest.json"===i.path){const t=await getRuntimeManifest(a,e,m);return n.json(t)}g="/"===i.path?await getPageMainHtml(a,e,m):await getPageModuleHtml(a,i,e,t,m),n.send(g)}));
1
+ import{getPageMainHtml}from"./get-page-main-html.js";import{getPageModuleHtml}from"./get-page-module-html.js";import{getRuntimeManifest}from"./get-runtime-manifest.js";export const createPageMiddleware=(e,t,a,m)=>(m.devServer?.middlewares||[]).concat((async(i,n)=>{let g;if("/runtime/manifest.json"!==i.path)g="/"===i.path?await getPageMainHtml(a,e,m):await getPageModuleHtml(a,i,e,t,m),n.send(g);else{const t=await getRuntimeManifest(a,e,m);n.json(t)}}));
@@ -1,4 +1,4 @@
1
- import { ListrTaskObject } from 'listr';
1
+ import type { ListrTaskObject } from 'listr';
2
2
  /**
3
3
  * CustomListrRenderer is a class that provides a custom renderer for Listr tasks.
4
4
  * It renders the tasks in a specific format and updates the output periodically.
@@ -1,2 +1,2 @@
1
- import { StatsCompilation } from 'webpack';
1
+ import type { StatsCompilation } from 'webpack';
2
2
  export declare const getStatsFileName: (stats: StatsCompilation) => string;
@@ -1,5 +1,5 @@
1
- import { EvolveEntryMap } from '../types/types-entry-map.js';
2
- import { FlatEvolveOptions } from '../types/types-options.js';
1
+ import type { EvolveEntryMap } from '../types/types-entry-map.js';
2
+ import type { FlatEvolveOptions } from '../types/types-options.js';
3
3
  /**
4
4
  * Normalizes the absolute paths of entry modules based on the provided evolve options and entry map.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { FlatCliOptions } from '../types/types-cli-options.js';
1
+ import type { FlatCliOptions } from '../types/types-cli-options.js';
2
2
  import { type EvolveEntryMap } from '../types/types-entry-map.js';
3
3
  import { type FlatEvolveOptions } from '../types/types-options.js';
4
4
  import { type EvolveBuildResult } from './start-group-entry-build.js';
@@ -1,5 +1,5 @@
1
1
  import { type AnalyzeServeOptions } from '../types/types-analyzer.js';
2
- import { FlatEvolveOptions } from '../types/types-options.js';
2
+ import type { FlatEvolveOptions } from '../types/types-options.js';
3
3
  /**
4
4
  * Starts the analysis process for the given evolve options and analyze options.
5
5
  *
@@ -1,6 +1,6 @@
1
- import { MessageChannel } from 'node:worker_threads';
1
+ import type { MessageChannel } from 'node:worker_threads';
2
2
  import { type ConfigLoaderOptions } from '../load-config/types.js';
3
- import { FlatCliOptions } from '../types/types-cli-options.js';
3
+ import type { FlatCliOptions } from '../types/types-cli-options.js';
4
4
  import { type EvolveBuildResult } from './start-group-entry-build.js';
5
5
  /**
6
6
  * FIXME: The main entry to start an evolve `build`, NOTE: avoid pass configuration with `function` here.
@@ -1,6 +1,6 @@
1
1
  import { type PartialDeep } from 'type-fest';
2
2
  import { type ConfigLoaderOptions } from '../load-config/types.js';
3
- import { FlatCliOptions } from '../types/types-cli-options.js';
3
+ import type { FlatCliOptions } from '../types/types-cli-options.js';
4
4
  import { type FlatEvolveOptions } from '../types/types-options.js';
5
5
  import { type EvolveBuildResult } from './start-group-entry-build.js';
6
6
  export declare const startBuild: (projectCwd: string, buildModules: string[], overrideEvolveOptions?: PartialDeep<FlatEvolveOptions>, configLoaderOptions?: ConfigLoaderOptions, cliOptions?: FlatCliOptions) => Promise<EvolveBuildResult[]>;
@@ -1,4 +1,4 @@
1
- import { FlatCliOptions } from '../types/types-cli-options.js';
1
+ import type { FlatCliOptions } from '../types/types-cli-options.js';
2
2
  import { type EvolveEntryMap } from '../types/types-entry-map.js';
3
3
  import { type FlatEvolveOptions } from '../types/types-options.js';
4
4
  export type EvolveBuildResult = {
@@ -1,5 +1,5 @@
1
- import { Compiler } from 'webpack';
2
- import { EntryMapItem } from '../../types/types-entry-map.js';
1
+ import type { Compiler } from 'webpack';
2
+ import type { EntryMapItem } from '../../types/types-entry-map.js';
3
3
  /**
4
4
  * The MultiHtmlModifyPlugin class is responsible for modifying the HTML output of the webpack compiler.
5
5
  * It hooks into the compilation process and replaces occurrences of "<%= title %>" with the title specified in the options.
@@ -1,5 +1,5 @@
1
1
  import { Readable } from 'node:stream';
2
- import { StatsCompilation } from 'webpack';
2
+ import type { StatsCompilation } from 'webpack';
3
3
  /**
4
4
  * A readable stream that serializes a StatsCompilation object into a string representation.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { type WebpackPlugin } from '../../create-webpack/types.js';
2
- import { FlatCliOptions } from '../../types/types-cli-options.js';
2
+ import type { FlatCliOptions } from '../../types/types-cli-options.js';
3
3
  import { type FlatEvolveOptions } from '../../types/types-options.js';
4
4
  /**
5
5
  * Creates an array of Webpack plugins for generating stats files.
@@ -1,4 +1,4 @@
1
- import { Compiler, Stats, StatsCompilation } from 'webpack';
1
+ import type { Compiler, Stats, StatsCompilation } from 'webpack';
2
2
  export interface Options {
3
3
  /**
4
4
  * The project root.
@@ -1 +1 @@
1
- import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import{mergeOptions}from"@flatjs/common";export class TsCheckerGuardPlugin{constructor(r={}){this.options=mergeOptions({autoExit:!1},r)}apply(r){ForkTsCheckerWebpackPlugin.getCompilerHooks(r).issues.tap("issues",(r=>{const{autoExit:e}=this.options,o=r.filter((r=>"error"===r.severity));if(e&&o?.length>0)throw new Error(`TS_CHECKER_ERROR: \n ${JSON.stringify(o,null,2)}`);return r}))}}
1
+ import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import{logger,mergeOptions}from"@flatjs/common";export class TsCheckerGuardPlugin{constructor(r={}){this.options=mergeOptions({autoExit:!1},r)}apply(r){const t=ForkTsCheckerWebpackPlugin.getCompilerHooks(r);t.start.tap("start",(r=>(logger.info("Check typing..."),r))),t.issues.tap("issues",(r=>{const{autoExit:t}=this.options,o=r.filter((r=>"error"===r.severity));if(t&&o?.length>0)throw new Error(`TS_CHECKER_ERROR: \n ${JSON.stringify(o,null,2)}`);return r}))}}
@@ -1,5 +1,6 @@
1
1
  import { type RequestHandler } from 'express';
2
- import { type ClientConfiguration, Middleware, type WebSocketURL } from 'webpack-dev-server';
2
+ import type { Middleware } from 'webpack-dev-server';
3
+ import { type ClientConfiguration, type WebSocketURL } from 'webpack-dev-server';
3
4
  import { type FlatMockOptions, type SecureContextHttps } from '@flatjs/mock';
4
5
  import { type EvolveEntryMapContent } from './types-entry-map.js';
5
6
  export interface WebpackWatchOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -35,32 +35,32 @@
35
35
  "typecheck": "tsc --project ./tsconfig.json --noEmit"
36
36
  },
37
37
  "dependencies": {
38
- "@armit/babel-merge": "^0.2.5",
39
- "@armit/config-loader": "^0.2.9",
40
- "@armit/file-utility": "^0.2.5",
41
- "@armit/git": "^0.2.5",
42
- "@armit/package": "^0.2.9",
43
- "@babel/core": "^7.25.2",
38
+ "@armit/babel-merge": "^0.2.6",
39
+ "@armit/config-loader": "^0.3.0",
40
+ "@armit/file-utility": "^0.2.6",
41
+ "@armit/git": "^0.2.6",
42
+ "@armit/package": "^0.2.10",
43
+ "@babel/core": "^7.25.9",
44
44
  "@clack/prompts": "^0.7.0",
45
- "@discoveryjs/json-ext": "0.6.1",
46
- "@flatjs/babel-plugin-import": "2.1.3",
47
- "@flatjs/common": "2.1.3",
48
- "@flatjs/evolve-preset-babel": "2.1.3",
49
- "@flatjs/forge-postcss-plugin-pixel": "2.1.3",
50
- "@flatjs/graph": "2.1.3",
51
- "@flatjs/mock": "2.1.3",
45
+ "@discoveryjs/json-ext": "0.6.2",
46
+ "@flatjs/babel-plugin-import": "2.1.4",
47
+ "@flatjs/common": "2.1.4",
48
+ "@flatjs/evolve-preset-babel": "2.1.4",
49
+ "@flatjs/forge-postcss-plugin-pixel": "2.1.4",
50
+ "@flatjs/graph": "2.1.4",
51
+ "@flatjs/mock": "2.2.0",
52
52
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
53
53
  "@types/babel__core": "^7.20.5",
54
- "babel-loader": "^9.1.3",
54
+ "babel-loader": "^9.2.1",
55
55
  "better-opn": "^3.0.2",
56
56
  "case-sensitive-paths-webpack-plugin": "^2.4.0",
57
57
  "ci-info": "^4.0.0",
58
58
  "css-loader": "^7.1.2",
59
59
  "cssnano": "^7.0.6",
60
- "express": "^4.19.2",
60
+ "express": "^4.21.1",
61
61
  "fork-ts-checker-webpack-plugin": "^9.0.2",
62
- "happy-dom": "^15.7.3",
63
- "html-webpack-plugin": "^5.6.0",
62
+ "happy-dom": "^15.7.4",
63
+ "html-webpack-plugin": "^5.6.3",
64
64
  "image-minimizer-webpack-plugin": "^4.1.0",
65
65
  "less": "^4.2.0",
66
66
  "less-loader": "^12.2.0",
@@ -68,7 +68,7 @@
68
68
  "lodash": "^4.17.21",
69
69
  "log-update": "^6.1.0",
70
70
  "mini-css-extract-plugin": "^2.9.1",
71
- "postcss": "^8.4.45",
71
+ "postcss": "^8.4.47",
72
72
  "postcss-loader": "^8.1.1",
73
73
  "react-refresh": "^0.14.2",
74
74
  "svgo": "^3.3.2",
@@ -76,9 +76,9 @@
76
76
  "terser-webpack-plugin": "^5.3.10",
77
77
  "tinypool": "^1.0.1",
78
78
  "tsconfig-paths-webpack-plugin": "^4.1.0",
79
- "type-fest": "^4.26.0",
80
- "typescript": "^5.5.4",
81
- "webpack": "^5.94.0",
79
+ "type-fest": "^4.26.1",
80
+ "typescript": "^5.6.3",
81
+ "webpack": "^5.95.0",
82
82
  "webpack-bundle-analyzer": "^4.10.2",
83
83
  "webpack-dev-server": "^5.1.0",
84
84
  "webpack-sources": "^3.2.3"
@@ -87,23 +87,23 @@
87
87
  "@dimjs/lang": "2.0.0",
88
88
  "@dimjs/model": "2.0.1",
89
89
  "@dimjs/model-react": "2.0.1",
90
- "@dimjs/utils": "2.0.1",
91
- "@flatjs/testing": "2.1.3",
92
- "@hyperse/eslint-config-hyperse": "^1.1.3",
93
- "@swc/core": "1.7.23",
94
- "@types/express": "4.17.21",
90
+ "@dimjs/utils": "2.0.2",
91
+ "@flatjs/testing": "2.1.4",
92
+ "@hyperse/eslint-config-hyperse": "^1.2.6",
93
+ "@swc/core": "1.7.39",
94
+ "@types/express": "5.0.0",
95
95
  "@types/listr": "0.14.9",
96
- "@types/node": "22.5.4",
97
- "eslint": "^9.9.1",
96
+ "@types/node": "22.7.9",
97
+ "eslint": "^9.13.0",
98
98
  "imagemin-gifsicle": "7.0.0",
99
- "imagemin-jpegtran": "7.0.0",
99
+ "imagemin-jpegtran": "8.0.0",
100
100
  "imagemin-pngquant": "10.0.0",
101
101
  "imagemin-svgo": "11.0.1",
102
102
  "npm-run-all": "4.1.5",
103
103
  "react": "18.3.1",
104
104
  "rimraf": "6.0.1",
105
105
  "vite-tsconfig-paths": "5.0.1",
106
- "vitest": "2.0.5",
106
+ "vitest": "2.1.3",
107
107
  "vue-loader": "17.4.2"
108
108
  },
109
109
  "peerDependencies": {
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta
@@ -8,7 +8,7 @@
8
8
  <meta http-equiv="Cache-control" content="no-cache" />
9
9
  <meta http-equiv="Cache" content="no-cache" />
10
10
  <meta name="format-detection" content="telephone=no,email=no" />
11
- <meta name="apple-mobile-web-app-capable" content="yes" />
11
+ <meta name="mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-touch-fullscreen" content="yes" />
13
13
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
14
14
  <meta