@flatjs/evolve 2.2.7 → 2.3.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.
- package/dist/compiler/create-build-server-global-compiler.js +1 -1
- package/dist/compiler/create-global-compiler.d.ts +0 -2
- package/dist/compiler/create-global-compiler.js +1 -1
- package/dist/helpers/is-vue-entry-item.d.ts +2 -0
- package/dist/helpers/is-vue-entry-item.js +1 -0
- package/dist/types/types-global-compiler-options.d.ts +2 -1
- package/dist/types/types-loader-options.d.ts +1 -1
- package/package.json +24 -24
- package/dist/plugins/ts-checker/ts-checker-guard-plugin.d.ts +0 -13
- package/dist/plugins/ts-checker/ts-checker-guard-plugin.js +0 -1
- package/dist/plugins/ts-checker/ts-checker-plugin.d.ts +0 -3
- package/dist/plugins/ts-checker/ts-checker-plugin.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
import webpack from"webpack";import{logger}from"@flatjs/common";import{
|
1
|
+
import webpack from"webpack";import{logger,mergeOptions}from"@flatjs/common";import{createTsCheckerCompilerConfig}from"@flatjs/forge-ts-checker";import{isVueEntryItem}from"../helpers/is-vue-entry-item.js";export const createBuildServerGlobalCompiler=async e=>{const{entryMap:r,globalCompilerOptions:o,projectCwd:t,devServer:i}=e;if(isVueEntryItem(r))return;const p=mergeOptions({serveMode:!0,projectCwd:t,runTsChecker:o?.runTsChecker},{watchOptions:{ignored:i?.watchOptions?.ignored,poll:i?.watchOptions?.poll}}),n=createTsCheckerCompilerConfig(p);return n?webpack(n,(e=>{e&&logger.error(e)})):void 0};
|
@@ -1,4 +1,2 @@
|
|
1
|
-
import webpack from 'webpack';
|
2
1
|
import { type FlatEvolveOptions } from '../types/types-options.js';
|
3
|
-
export declare const createGlobalCompilerConfig: (serveMode: boolean, evolveOptions: FlatEvolveOptions) => false | webpack.Configuration;
|
4
2
|
export declare const createGlobalCompiler: (serveMode: boolean, evolveOptions: FlatEvolveOptions) => Promise<boolean>;
|
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import{mergeOptions}from"@flatjs/common";import{createTsCheckerCompiler}from"@flatjs/forge-ts-checker";import{isVueEntryItem}from"../helpers/is-vue-entry-item.js";export const createGlobalCompiler=async(e,r)=>{const{entryMap:t,globalCompilerOptions:o,projectCwd:s,devServer:i}=r,n=mergeOptions({serveMode:e,projectCwd:s,runTsChecker:o?.runTsChecker},{runTsChecker:!isVueEntryItem(t),watchOptions:{ignored:i?.watchOptions?.ignored,poll:i?.watchOptions?.poll}});return await createTsCheckerCompiler(n)};
|
@@ -0,0 +1 @@
|
|
1
|
+
export const isVueEntryItem=e=>{let t=!1;for(const[,r]of Object.entries(e)){if((r.entry||[]).find((e=>/.vue$/.test(e)))){t=!0;break}}return t};
|
@@ -1,7 +1,8 @@
|
|
1
|
+
import type { ForgeTsCheckerOptions } from '@flatjs/forge-ts-checker';
|
1
2
|
export interface GlobalCompilerOptions {
|
2
3
|
/**
|
3
4
|
* The value indicates whether runs typescript type checker and linter on separate process.
|
4
5
|
* @default true
|
5
6
|
*/
|
6
|
-
runTsChecker?:
|
7
|
+
runTsChecker?: ForgeTsCheckerOptions['runTsChecker'];
|
7
8
|
}
|
@@ -84,7 +84,7 @@ export interface RuleSetLoaderOptions {
|
|
84
84
|
cssnanoOptions?: Record<string, unknown>;
|
85
85
|
/**
|
86
86
|
* Allow to extends extra plugins of `postcss-loader`
|
87
|
-
* @example `
|
87
|
+
* @example `env.resolve(import.meta.url, '@tailwindcss/postcss'),
|
88
88
|
*/
|
89
89
|
plugins?: Array<AcceptedPlugin | string | [string, Record<string, unknown>]>;
|
90
90
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flatjs/evolve",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.3.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -41,14 +41,15 @@
|
|
41
41
|
"@armit/git": "^0.2.11",
|
42
42
|
"@armit/package": "^0.2.15",
|
43
43
|
"@babel/core": "^7.26.10",
|
44
|
-
"@clack/prompts": "^0.10.
|
44
|
+
"@clack/prompts": "^0.10.1",
|
45
45
|
"@discoveryjs/json-ext": "0.6.3",
|
46
|
-
"@flatjs/babel-plugin-import": "2.2.
|
47
|
-
"@flatjs/common": "2.2.
|
48
|
-
"@flatjs/evolve-preset-babel": "2.2.
|
49
|
-
"@flatjs/forge-postcss-plugin-pixel": "2.2.
|
50
|
-
"@flatjs/
|
51
|
-
"@flatjs/
|
46
|
+
"@flatjs/babel-plugin-import": "2.2.8",
|
47
|
+
"@flatjs/common": "2.2.3",
|
48
|
+
"@flatjs/evolve-preset-babel": "2.2.3",
|
49
|
+
"@flatjs/forge-postcss-plugin-pixel": "2.2.3",
|
50
|
+
"@flatjs/forge-ts-checker": "1.1.0",
|
51
|
+
"@flatjs/graph": "2.2.8",
|
52
|
+
"@flatjs/mock": "2.4.0",
|
52
53
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.16",
|
53
54
|
"@types/babel__core": "^7.20.5",
|
54
55
|
"babel-loader": "^10.0.0",
|
@@ -58,13 +59,12 @@
|
|
58
59
|
"ci-info": "^4.2.0",
|
59
60
|
"css-loader": "^7.1.2",
|
60
61
|
"cssnano": "^7.0.6",
|
61
|
-
"express": "^
|
62
|
+
"express": "^5.1.0",
|
62
63
|
"fast-glob": "^3.3.3",
|
63
|
-
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
64
64
|
"happy-dom": "^17.4.4",
|
65
65
|
"html-webpack-plugin": "^5.6.3",
|
66
66
|
"image-minimizer-webpack-plugin": "^4.1.3",
|
67
|
-
"less": "^4.
|
67
|
+
"less": "^4.3.0",
|
68
68
|
"less-loader": "^12.2.0",
|
69
69
|
"listr": "^0.14.3",
|
70
70
|
"lodash": "^4.17.21",
|
@@ -78,25 +78,25 @@
|
|
78
78
|
"terser-webpack-plugin": "^5.3.14",
|
79
79
|
"tinypool": "^1.0.2",
|
80
80
|
"tsconfig-paths-webpack-plugin": "^4.2.0",
|
81
|
-
"type-fest": "^4.
|
82
|
-
"typescript": "^5.8.
|
83
|
-
"webpack": "^5.
|
81
|
+
"type-fest": "^4.40.0",
|
82
|
+
"typescript": "^5.8.3",
|
83
|
+
"webpack": "^5.99.6",
|
84
84
|
"webpack-bundle-analyzer": "^4.10.2",
|
85
85
|
"webpack-dev-server": "^5.2.1",
|
86
86
|
"webpack-sources": "^3.2.3"
|
87
87
|
},
|
88
88
|
"devDependencies": {
|
89
|
-
"@dimjs/lang": "2.1.
|
90
|
-
"@dimjs/model": "2.1.
|
91
|
-
"@dimjs/model-react": "2.1.
|
92
|
-
"@dimjs/utils": "2.1.
|
93
|
-
"@flatjs/testing": "2.2.
|
94
|
-
"@hyperse/eslint-config-hyperse": "^1.
|
95
|
-
"@swc/core": "1.11.
|
89
|
+
"@dimjs/lang": "2.1.1",
|
90
|
+
"@dimjs/model": "2.1.1",
|
91
|
+
"@dimjs/model-react": "2.1.1",
|
92
|
+
"@dimjs/utils": "2.1.2",
|
93
|
+
"@flatjs/testing": "2.2.3",
|
94
|
+
"@hyperse/eslint-config-hyperse": "^1.4.1",
|
95
|
+
"@swc/core": "1.11.21",
|
96
96
|
"@types/express": "5.0.1",
|
97
97
|
"@types/listr": "0.14.9",
|
98
|
-
"@types/node": "22.
|
99
|
-
"eslint": "^9.
|
98
|
+
"@types/node": "22.14.1",
|
99
|
+
"eslint": "^9.25.1",
|
100
100
|
"imagemin-gifsicle": "7.0.0",
|
101
101
|
"imagemin-jpegtran": "8.0.0",
|
102
102
|
"imagemin-pngquant": "10.0.0",
|
@@ -105,7 +105,7 @@
|
|
105
105
|
"react": "19.1.0",
|
106
106
|
"rimraf": "6.0.1",
|
107
107
|
"vite-tsconfig-paths": "5.1.4",
|
108
|
-
"vitest": "3.
|
108
|
+
"vitest": "3.1.2",
|
109
109
|
"vue-loader": "17.4.2"
|
110
110
|
},
|
111
111
|
"peerDependencies": {
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { type Compiler } from 'webpack';
|
2
|
-
export interface TsCheckerGuardPluginOption {
|
3
|
-
/**
|
4
|
-
* Whether to exit the process when issues is not empty
|
5
|
-
* @default false
|
6
|
-
*/
|
7
|
-
autoExit?: boolean;
|
8
|
-
}
|
9
|
-
export declare class TsCheckerGuardPlugin {
|
10
|
-
private options;
|
11
|
-
constructor(option?: TsCheckerGuardPluginOption);
|
12
|
-
apply(compiler: Compiler): void;
|
13
|
-
}
|
@@ -1 +0,0 @@
|
|
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 +0,0 @@
|
|
1
|
-
import ForkTsCheckerWebpackPlugin from"fork-ts-checker-webpack-plugin";import{TsCheckerGuardPlugin}from"./ts-checker-guard-plugin.js";export const createTsCheckerPlugins=(e,r)=>{const{entryMap:t,globalCompilerOptions:c}=r,s=[];let n=!1;for(const[,e]of Object.entries(t)){if((e.entry||[]).find((e=>/.vue$/.test(e)))){n=!0;break}}if(c?.runTsChecker&&!n){const t=new ForkTsCheckerWebpackPlugin({async:e,devServer:!1,issue:{},typescript:{context:r.projectCwd,memoryLimit:8192}});s.push(t),s.push(new TsCheckerGuardPlugin({autoExit:!e}))}return s};
|