@modern-js/module-tools 2.38.0-beta.0 → 2.38.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.
@@ -157,8 +157,9 @@ const adapterPlugin = (compiler) => {
157
157
  if (resultPath === false) {
158
158
  (0, import_debug.debugResolve)("resolve false:", args);
159
159
  return {
160
- path: "/empty-stub",
161
- sideEffects: false
160
+ path: `${import_path.sep}empty-stub`,
161
+ sideEffects: false,
162
+ namespace: "resolve-false"
162
163
  };
163
164
  }
164
165
  const sideEffects = await getSideEffects(resultPath, isExternal);
@@ -182,17 +183,17 @@ const adapterPlugin = (compiler) => {
182
183
  contents: `module.exports = (typeof globalThis !== "undefined" ? globalThis : (typeof global !== "undefined" ? global : self || Function('return this')()))[${JSON.stringify(value)}]`
183
184
  };
184
185
  }
186
+ if (args.namespace === "resolve-false") {
187
+ return {
188
+ contents: "module.exports = {}"
189
+ };
190
+ }
185
191
  if (args.suffix) {
186
192
  args.path += args.suffix;
187
193
  }
188
194
  if (args.namespace !== "file") {
189
195
  return;
190
196
  }
191
- if (args.path === "/empty-stub") {
192
- return {
193
- contents: "module.exports = {}"
194
- };
195
- }
196
197
  compiler.addWatchFile(args.path);
197
198
  let result = await compiler.hooks.load.promise(args);
198
199
  if (!result) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/module-tools",
3
- "version": "2.38.0-beta.0",
3
+ "version": "2.38.0",
4
4
  "description": "Simple, powerful, high-performance modern npm package development solution.",
5
5
  "keywords": [
6
6
  "modern",
@@ -71,15 +71,15 @@
71
71
  "tapable": "2.2.1",
72
72
  "terser": "5.19.2",
73
73
  "tsconfig-paths-webpack-plugin": "4.1.0",
74
- "@modern-js/plugin-changeset": "2.37.1",
75
- "@modern-js/core": "2.37.1",
76
- "@modern-js/new-action": "2.37.1",
77
- "@modern-js/plugin": "2.37.1",
78
- "@modern-js/plugin-i18n": "2.37.1",
79
- "@modern-js/plugin-lint": "2.37.1",
80
- "@modern-js/upgrade": "2.37.1",
81
- "@modern-js/types": "2.37.1",
82
- "@modern-js/utils": "2.37.1"
74
+ "@modern-js/core": "2.38.0",
75
+ "@modern-js/new-action": "2.38.0",
76
+ "@modern-js/plugin": "2.38.0",
77
+ "@modern-js/plugin-changeset": "2.38.0",
78
+ "@modern-js/plugin-i18n": "2.38.0",
79
+ "@modern-js/plugin-lint": "2.38.0",
80
+ "@modern-js/types": "2.38.0",
81
+ "@modern-js/upgrade": "2.38.0",
82
+ "@modern-js/utils": "2.38.0"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@types/babel__generator": "7.6.4",
@@ -87,10 +87,10 @@
87
87
  "@types/convert-source-map": "1.5.2",
88
88
  "@types/node": "^14",
89
89
  "typescript": "^5",
90
- "@modern-js/builder-webpack-provider": "2.37.1",
91
- "@scripts/build": "2.37.1",
92
- "@modern-js/self": "npm:@modern-js/module-tools@2.38.0-beta.0",
93
- "@scripts/vitest-config": "2.37.1"
90
+ "@modern-js/builder-webpack-provider": "2.38.0",
91
+ "@modern-js/self": "npm:@modern-js/module-tools@2.38.0",
92
+ "@scripts/build": "2.38.0",
93
+ "@scripts/vitest-config": "2.38.0"
94
94
  },
95
95
  "peerDependencies": {
96
96
  "typescript": "^4 || ^5"