@modern-js/app-tools 2.51.0 → 2.53.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.
@@ -41,7 +41,7 @@ async function cleanDistDirectory(dir) {
41
41
  const items = await import_utils.fs.readdir(dir);
42
42
  for (const item of items) {
43
43
  const fullPath = import_node_path.default.join(dir, item);
44
- if (item !== "static" && item !== "_redirects") {
44
+ if (item !== "static" && item !== "_redirects" && item !== "html") {
45
45
  await import_utils.fs.remove(fullPath);
46
46
  }
47
47
  }
@@ -118,7 +118,7 @@ const createNetlifyPreset = (appContext, modernConfig, needModernServer) => {
118
118
  await import_utils.fs.writeFile(entryFilePath, entryCode);
119
119
  },
120
120
  async end() {
121
- if (process.env.NODE_ENV !== "test" && process.env.NODE_ENV !== "development") {
121
+ if (process.env.NODE_ENV !== "development") {
122
122
  await cleanDistDirectory(distDirectory);
123
123
  }
124
124
  if (!needModernServer) {
@@ -45,7 +45,7 @@ function _cleanDistDirectory() {
45
45
  ];
46
46
  item = _step.value;
47
47
  fullPath = path.join(dir, item);
48
- if (!(item !== "static" && item !== "_redirects"))
48
+ if (!(item !== "static" && item !== "_redirects" && item !== "html"))
49
49
  return [
50
50
  3,
51
51
  5
@@ -251,7 +251,7 @@ var createNetlifyPreset = function(appContext, modernConfig, needModernServer) {
251
251
  return _ts_generator(this, function(_state) {
252
252
  switch (_state.label) {
253
253
  case 0:
254
- if (!(process.env.NODE_ENV !== "test" && process.env.NODE_ENV !== "development"))
254
+ if (!(process.env.NODE_ENV !== "development"))
255
255
  return [
256
256
  3,
257
257
  2
@@ -8,7 +8,7 @@ async function cleanDistDirectory(dir) {
8
8
  const items = await fse.readdir(dir);
9
9
  for (const item of items) {
10
10
  const fullPath = path.join(dir, item);
11
- if (item !== "static" && item !== "_redirects") {
11
+ if (item !== "static" && item !== "_redirects" && item !== "html") {
12
12
  await fse.remove(fullPath);
13
13
  }
14
14
  }
@@ -85,7 +85,7 @@ const createNetlifyPreset = (appContext, modernConfig, needModernServer) => {
85
85
  await fse.writeFile(entryFilePath, entryCode);
86
86
  },
87
87
  async end() {
88
- if (process.env.NODE_ENV !== "test" && process.env.NODE_ENV !== "development") {
88
+ if (process.env.NODE_ENV !== "development") {
89
89
  await cleanDistDirectory(distDirectory);
90
90
  }
91
91
  if (!needModernServer) {
@@ -1,3 +1,3 @@
1
1
  import { Alias } from '@modern-js/utils';
2
- import { ChainedConfig } from '@rsbuild/shared';
3
- export declare const registerCompiler: (appDir: string | undefined, distDir: string, alias?: ChainedConfig<Alias>) => Promise<void>;
2
+ import { ConfigChain } from '@rsbuild/shared';
3
+ export declare const registerCompiler: (appDir: string | undefined, distDir: string, alias?: ConfigChain<Alias>) => Promise<void>;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.51.0",
18
+ "version": "2.53.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -69,9 +69,9 @@
69
69
  "@babel/parser": "^7.22.15",
70
70
  "@babel/traverse": "^7.23.2",
71
71
  "@babel/types": "^7.23.0",
72
- "@rsbuild/plugin-node-polyfill": "0.7.1",
73
- "@rsbuild/shared": "0.7.1",
74
- "@rsbuild/core": "0.7.1",
72
+ "@rsbuild/plugin-node-polyfill": "0.7.3",
73
+ "@rsbuild/shared": "0.7.3",
74
+ "@rsbuild/core": "0.7.3",
75
75
  "@swc/helpers": "0.5.3",
76
76
  "@vercel/nft": "^0.26.4",
77
77
  "es-module-lexer": "^1.1.0",
@@ -80,23 +80,23 @@
80
80
  "mlly": "^1.6.1",
81
81
  "pkg-types": "^1.1.0",
82
82
  "std-env": "^3.7.0",
83
- "@modern-js/node-bundle-require": "2.51.0",
84
- "@modern-js/plugin-i18n": "2.51.0",
85
- "@modern-js/plugin-data-loader": "2.51.0",
86
- "@modern-js/plugin": "2.51.0",
87
- "@modern-js/plugin-lint": "2.51.0",
88
- "@modern-js/core": "2.51.0",
89
- "@modern-js/prod-server": "2.51.0",
90
- "@modern-js/rsbuild-plugin-esbuild": "2.51.0",
91
- "@modern-js/server": "2.51.0",
92
- "@modern-js/server-core": "2.51.0",
93
- "@modern-js/server-utils": "2.51.0",
94
- "@modern-js/types": "2.51.0",
95
- "@modern-js/uni-builder": "2.51.0",
96
- "@modern-js/utils": "2.51.0"
83
+ "@modern-js/core": "2.53.0",
84
+ "@modern-js/node-bundle-require": "2.53.0",
85
+ "@modern-js/plugin-i18n": "2.53.0",
86
+ "@modern-js/plugin": "2.53.0",
87
+ "@modern-js/plugin-data-loader": "2.53.0",
88
+ "@modern-js/prod-server": "2.53.0",
89
+ "@modern-js/plugin-lint": "2.53.0",
90
+ "@modern-js/rsbuild-plugin-esbuild": "2.53.0",
91
+ "@modern-js/server": "2.53.0",
92
+ "@modern-js/server-utils": "2.53.0",
93
+ "@modern-js/types": "2.53.0",
94
+ "@modern-js/uni-builder": "2.53.0",
95
+ "@modern-js/utils": "2.53.0",
96
+ "@modern-js/server-core": "2.53.0"
97
97
  },
98
98
  "devDependencies": {
99
- "@rsbuild/plugin-swc": "0.7.1",
99
+ "@rsbuild/plugin-swc": "0.7.3",
100
100
  "@types/babel__traverse": "7.18.5",
101
101
  "@types/jest": "^29",
102
102
  "@types/node": "^14",
@@ -105,8 +105,8 @@
105
105
  "tsconfig-paths": "^4.2.0",
106
106
  "typescript": "^5",
107
107
  "webpack": "^5.91.0",
108
- "@scripts/build": "2.51.0",
109
- "@scripts/jest-config": "2.51.0"
108
+ "@scripts/build": "2.53.0",
109
+ "@scripts/jest-config": "2.53.0"
110
110
  },
111
111
  "sideEffects": false,
112
112
  "publishConfig": {