@modern-js/app-tools 2.13.2 → 2.13.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @modern-js/app-tools
2
2
 
3
+ ## 2.13.3
4
+
5
+ ### Patch Changes
6
+
7
+ - ac0610a: fix: should empty dist dir when execute deploy command
8
+ fix: 应该清空 dist 目录,当执行 deploy 命令时
9
+ - 6eff0fd: fix: inline-loader match path error in windows
10
+ fix: inline-loader 在 windows 里路径匹配错误。
11
+ - Updated dependencies [7b9dc49]
12
+ - Updated dependencies [18cd03f]
13
+ - Updated dependencies [28583e8]
14
+ - @modern-js/builder-webpack-provider@2.13.3
15
+ - @modern-js/builder-shared@2.13.3
16
+ - @modern-js/builder@2.13.3
17
+ - @modern-js/builder-plugin-esbuild@2.13.3
18
+ - @modern-js/builder-plugin-node-polyfill@2.13.3
19
+ - @modern-js/builder-rspack-provider@2.13.3
20
+ - @modern-js/core@2.13.3
21
+ - @modern-js/plugin-data-loader@2.13.3
22
+ - @modern-js/plugin-i18n@2.13.3
23
+ - @modern-js/plugin-lint@2.13.3
24
+ - @modern-js/new-action@2.13.3
25
+ - @modern-js/prod-server@2.13.3
26
+ - @modern-js/server@2.13.3
27
+ - @modern-js/node-bundle-require@2.13.3
28
+ - @modern-js/plugin@2.13.3
29
+ - @modern-js/types@2.13.3
30
+ - @modern-js/upgrade@2.13.3
31
+ - @modern-js/utils@2.13.3
32
+
3
33
  ## 2.13.2
4
34
 
5
35
  ### Patch Changes
@@ -177,7 +177,7 @@ function applySSRDataLoader(chain, options) {
177
177
  const { normalizedConfig, appContext } = options;
178
178
  const { appDirectory } = appContext;
179
179
  const { entriesDir = "./src" } = normalizedConfig.source;
180
- const absolutePath = path.resolve(appDirectory, entriesDir);
180
+ const absolutePath = path.resolve(appDirectory, entriesDir).split(path.sep).join("(\\\\|/)");
181
181
  const reg = new RegExp(`${absolutePath}.*\\.loader\\.[t|j]s$`);
182
182
  chain.module.rule("ssr-data-loader").test(reg).use("data-loader").loader(require.resolve("@modern-js/plugin-data-loader/loader")).end();
183
183
  }
package/dist/cjs/index.js CHANGED
@@ -170,7 +170,7 @@ var src_default = (options = {
170
170
  },
171
171
  async prepare() {
172
172
  const command = (0, import_utils.getCommand)();
173
- if (command === "dev" || command === "start" || command === "build") {
173
+ if (command === "dev" || command === "start" || command === "build" || command === "deploy") {
174
174
  const appContext = api.useAppContext();
175
175
  await (0, import_utils.emptyDir)(appContext.distDirectory);
176
176
  }
@@ -360,7 +360,7 @@ function applySSRDataLoader(chain, options) {
360
360
  var normalizedConfig = options.normalizedConfig, appContext = options.appContext;
361
361
  var appDirectory = appContext.appDirectory;
362
362
  var _normalizedConfig_source = normalizedConfig.source, _normalizedConfig_source_entriesDir = _normalizedConfig_source.entriesDir, entriesDir = _normalizedConfig_source_entriesDir === void 0 ? "./src" : _normalizedConfig_source_entriesDir;
363
- var absolutePath = path.resolve(appDirectory, entriesDir);
363
+ var absolutePath = path.resolve(appDirectory, entriesDir).split(path.sep).join("(\\\\|/)");
364
364
  var reg = new RegExp("".concat(absolutePath, ".*\\.loader\\.[t|j]s$"));
365
365
  chain.module.rule("ssr-data-loader").test(reg).use("data-loader").loader(require.resolve("@modern-js/plugin-data-loader/loader")).end();
366
366
  }
package/dist/esm/index.js CHANGED
@@ -621,7 +621,7 @@ var src_default = function() {
621
621
  switch(_state.label){
622
622
  case 0:
623
623
  command = getCommand();
624
- if (!(command === "dev" || command === "start" || command === "build")) return [
624
+ if (!(command === "dev" || command === "start" || command === "build" || command === "deploy")) return [
625
625
  3,
626
626
  2
627
627
  ];
@@ -147,7 +147,7 @@ function applySSRDataLoader(chain, options) {
147
147
  const { normalizedConfig, appContext } = options;
148
148
  const { appDirectory } = appContext;
149
149
  const { entriesDir = "./src" } = normalizedConfig.source;
150
- const absolutePath = path.resolve(appDirectory, entriesDir);
150
+ const absolutePath = path.resolve(appDirectory, entriesDir).split(path.sep).join("(\\\\|/)");
151
151
  const reg = new RegExp(`${absolutePath}.*\\.loader\\.[t|j]s$`);
152
152
  chain.module.rule("ssr-data-loader").test(reg).use("data-loader").loader(require.resolve("@modern-js/plugin-data-loader/loader")).end();
153
153
  }
@@ -139,7 +139,7 @@ var src_default = (options = {
139
139
  },
140
140
  async prepare() {
141
141
  const command = getCommand();
142
- if (command === "dev" || command === "start" || command === "build") {
142
+ if (command === "dev" || command === "start" || command === "build" || command === "deploy") {
143
143
  const appContext = api.useAppContext();
144
144
  await emptyDir(appContext.distDirectory);
145
145
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.13.2",
14
+ "version": "2.13.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/cjs/index.js",
@@ -69,23 +69,23 @@
69
69
  "es-module-lexer": "^1.1.0",
70
70
  "esbuild": "0.15.7",
71
71
  "rspack-plugin-virtual-module": "0.1.0",
72
- "@modern-js/builder": "2.13.2",
73
- "@modern-js/builder-plugin-esbuild": "2.13.2",
74
- "@modern-js/builder-plugin-node-polyfill": "2.13.2",
75
- "@modern-js/builder-shared": "2.13.2",
76
- "@modern-js/builder-webpack-provider": "2.13.2",
77
- "@modern-js/core": "2.13.2",
78
- "@modern-js/new-action": "2.13.2",
79
- "@modern-js/node-bundle-require": "2.13.2",
80
- "@modern-js/plugin": "2.13.2",
81
- "@modern-js/plugin-data-loader": "2.13.2",
82
- "@modern-js/plugin-i18n": "2.13.2",
83
- "@modern-js/plugin-lint": "2.13.2",
84
- "@modern-js/prod-server": "2.13.2",
85
- "@modern-js/server": "2.13.2",
86
- "@modern-js/types": "2.13.2",
87
- "@modern-js/upgrade": "2.13.2",
88
- "@modern-js/utils": "2.13.2"
72
+ "@modern-js/builder": "2.13.3",
73
+ "@modern-js/builder-plugin-esbuild": "2.13.3",
74
+ "@modern-js/builder-plugin-node-polyfill": "2.13.3",
75
+ "@modern-js/builder-shared": "2.13.3",
76
+ "@modern-js/builder-webpack-provider": "2.13.3",
77
+ "@modern-js/core": "2.13.3",
78
+ "@modern-js/new-action": "2.13.3",
79
+ "@modern-js/node-bundle-require": "2.13.3",
80
+ "@modern-js/plugin": "2.13.3",
81
+ "@modern-js/plugin-data-loader": "2.13.3",
82
+ "@modern-js/plugin-i18n": "2.13.3",
83
+ "@modern-js/plugin-lint": "2.13.3",
84
+ "@modern-js/prod-server": "2.13.3",
85
+ "@modern-js/server": "2.13.3",
86
+ "@modern-js/types": "2.13.3",
87
+ "@modern-js/upgrade": "2.13.3",
88
+ "@modern-js/utils": "2.13.3"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@types/babel__traverse": "^7.14.2",
@@ -94,14 +94,14 @@
94
94
  "jest": "^29",
95
95
  "typescript": "^4",
96
96
  "webpack": "^5.76.2",
97
- "@modern-js/builder-plugin-swc": "2.13.2",
98
- "@modern-js/builder-rspack-provider": "2.13.2",
99
- "@modern-js/server-core": "2.13.2",
100
- "@scripts/jest-config": "2.13.2",
101
- "@scripts/build": "2.13.2"
97
+ "@modern-js/builder-plugin-swc": "2.13.3",
98
+ "@modern-js/builder-rspack-provider": "2.13.3",
99
+ "@modern-js/server-core": "2.13.3",
100
+ "@scripts/build": "2.13.3",
101
+ "@scripts/jest-config": "2.13.3"
102
102
  },
103
103
  "peerDependencies": {
104
- "@modern-js/builder-rspack-provider": "^2.13.2"
104
+ "@modern-js/builder-rspack-provider": "^2.13.3"
105
105
  },
106
106
  "peerDependenciesMeta": {
107
107
  "@modern-js/builder-rspack-provider": {