@rspack/core 1.3.11 → 1.3.13
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/README.md +2 -2
- package/compiled/browserslist-load-config/index.d.ts +10 -0
- package/compiled/browserslist-load-config/index.js +266 -0
- package/compiled/browserslist-load-config/license +21 -0
- package/compiled/browserslist-load-config/package.json +1 -0
- package/compiled/watchpack/index.js +61 -19
- package/compiled/watchpack/package.json +1 -1
- package/compiled/webpack-sources/index.js +1539 -339
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types.d.ts +320 -0
- package/compiled/zod/dist/types/index.d.ts +3 -0
- package/compiled/zod/{lib → dist/types/v3}/ZodError.d.ts +7 -7
- package/compiled/zod/{lib → dist/types/v3}/errors.d.ts +2 -2
- package/compiled/zod/dist/types/v3/external.d.ts +6 -0
- package/compiled/zod/{lib → dist/types/v3}/helpers/errorUtil.d.ts +1 -1
- package/compiled/zod/{lib → dist/types/v3}/helpers/parseUtil.d.ts +4 -4
- package/compiled/zod/{lib → dist/types/v3}/helpers/partialUtil.d.ts +1 -1
- package/compiled/zod/{lib → dist/types/v3}/helpers/util.d.ts +12 -9
- package/compiled/zod/dist/types/v3/index.d.ts +4 -0
- package/compiled/zod/{lib → dist/types/v3}/locales/en.d.ts +1 -1
- package/compiled/zod/{lib/__tests__ → dist/types/v3/tests}/Mocker.d.ts +6 -6
- package/compiled/zod/{lib → dist/types/v3}/types.d.ts +118 -149
- package/compiled/zod/dist/types/v4/classic/checks.d.ts +1 -0
- package/compiled/zod/dist/types/v4/classic/coerce.d.ts +17 -0
- package/compiled/zod/dist/types/v4/classic/compat.d.ts +48 -0
- package/compiled/zod/dist/types/v4/classic/errors.d.ts +30 -0
- package/compiled/zod/dist/types/v4/classic/external.d.ts +8 -0
- package/compiled/zod/dist/types/v4/classic/index.d.ts +4 -0
- package/compiled/zod/dist/types/v4/classic/iso.d.ts +22 -0
- package/compiled/zod/dist/types/v4/classic/parse.d.ts +23 -0
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +661 -0
- package/compiled/zod/dist/types/v4/core/api.d.ts +273 -0
- package/compiled/zod/dist/types/v4/core/checks.d.ts +277 -0
- package/compiled/zod/dist/types/v4/core/config.d.ts +9 -0
- package/compiled/zod/dist/types/v4/core/core.d.ts +43 -0
- package/compiled/zod/dist/types/v4/core/doc.d.ts +14 -0
- package/compiled/zod/dist/types/v4/core/errors.d.ts +205 -0
- package/compiled/zod/dist/types/v4/core/function.d.ts +47 -0
- package/compiled/zod/dist/types/v4/core/index.d.ts +15 -0
- package/compiled/zod/dist/types/v4/core/json-schema.d.ts +100 -0
- package/compiled/zod/dist/types/v4/core/parse.d.ts +25 -0
- package/compiled/zod/dist/types/v4/core/regexes.d.ts +63 -0
- package/compiled/zod/dist/types/v4/core/registries.d.ts +32 -0
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +983 -0
- package/compiled/zod/dist/types/v4/core/standard-schema.d.ts +55 -0
- package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +84 -0
- package/compiled/zod/dist/types/v4/core/util.d.ts +186 -0
- package/compiled/zod/dist/types/v4/core/versions.d.ts +5 -0
- package/compiled/zod/dist/types/v4/core/zsf.d.ts +91 -0
- package/compiled/zod/dist/types/v4/index.d.ts +3 -0
- package/compiled/zod/dist/types/v4/locales/ar.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/az.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/be.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ca.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/cs.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/de.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/en.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/es.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/fa.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/fi.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/fr.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/frCA.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/he.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/hu.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/id.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/index.d.ts +34 -0
- package/compiled/zod/dist/types/v4/locales/it.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ja.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ko.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/mk.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ms.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/no.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ota.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/pl.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/pt.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ru.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/sl.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ta.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/th.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/tr.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ua.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/ur.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/vi.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/zh-CN.d.ts +7 -0
- package/compiled/zod/dist/types/v4/locales/zh-tw.d.ts +7 -0
- package/compiled/zod/dist/types/v4/mini/checks.d.ts +1 -0
- package/compiled/zod/dist/types/v4/mini/coerce.d.ts +7 -0
- package/compiled/zod/dist/types/v4/mini/external.d.ts +7 -0
- package/compiled/zod/dist/types/v4/mini/index.d.ts +3 -0
- package/compiled/zod/dist/types/v4/mini/iso.d.ts +22 -0
- package/compiled/zod/dist/types/v4/mini/parse.d.ts +1 -0
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +407 -0
- package/compiled/zod/index.js +555 -602
- package/compiled/zod/license +1 -1
- package/compiled/zod/package.json +1 -1
- package/compiled/zod/v3/index.d.ts +1 -0
- package/compiled/zod/v4/core/index.d.ts +1 -0
- package/compiled/zod/v4/index.d.ts +1 -0
- package/compiled/zod/v4/locales/en.d.ts +2 -0
- package/compiled/zod/v4/locales/index.d.ts +1 -0
- package/compiled/zod/v4-mini/index.d.ts +1 -0
- package/dist/Compilation.d.ts +2 -2
- package/dist/Compiler.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +2 -3
- package/dist/builtin-plugin/RstestPlugin.d.ts +11 -0
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/config/browserslistTargetHandler.d.ts +0 -6
- package/dist/exports.d.ts +2 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +187 -254
- package/dist/node/NodeWatchFileSystem.d.ts +2 -2
- package/dist/stats/statsFactoryUtils.d.ts +24 -0
- package/dist/trace/index.d.ts +5 -0
- package/module.d.ts +53 -21
- package/package.json +12 -14
- package/compiled/browserslist/index.d.ts +0 -1
- package/compiled/browserslist/index.js +0 -2123
- package/compiled/browserslist/license +0 -20
- package/compiled/browserslist/package.json +0 -1
- package/compiled/webpack-sources/index.d.ts +0 -130
- package/compiled/zod/index.d.ts +0 -2
- package/compiled/zod/lib/external.d.ts +0 -6
- package/compiled/zod/lib/index.d.ts +0 -4
- package/dist/setupEnv.d.ts +0 -1
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/datetime.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/discriminatedUnion.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/index.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/ipv4.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/object.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/primitives.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/realworld.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/string.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/benchmarks/union.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/helpers/enumUtil.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/helpers/typeAliases.d.ts +0 -0
- /package/compiled/zod/{lib → dist/types/v3}/standard-schema.d.ts +0 -0
package/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<picture>
|
2
|
-
<img alt="Rspack Banner" src="https://assets.rspack.
|
2
|
+
<img alt="Rspack Banner" src="https://assets.rspack.rs/rspack/rspack-banner.png">
|
3
3
|
</picture>
|
4
4
|
|
5
5
|
# @rspack/core
|
@@ -8,7 +8,7 @@ The fast Rust-based web bundler with webpack-compatible API.
|
|
8
8
|
|
9
9
|
## Documentation
|
10
10
|
|
11
|
-
See <https://rspack.
|
11
|
+
See <https://rspack.rs> for details.
|
12
12
|
|
13
13
|
## License
|
14
14
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
declare function findConfig(from: string): Record<string, string[]> | undefined;
|
2
|
+
type LoadConfigOptions = {
|
3
|
+
config?: string;
|
4
|
+
path?: string;
|
5
|
+
env?: string;
|
6
|
+
};
|
7
|
+
declare function loadConfig(opts: LoadConfigOptions): string[] | undefined;
|
8
|
+
|
9
|
+
export { findConfig, loadConfig };
|
10
|
+
export type { LoadConfigOptions };
|
@@ -0,0 +1,266 @@
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
2
|
+
/******/ "use strict";
|
3
|
+
/******/ var __webpack_modules__ = ({
|
4
|
+
|
5
|
+
/***/ 24:
|
6
|
+
/***/ ((module) => {
|
7
|
+
|
8
|
+
module.exports = require("node:fs");
|
9
|
+
|
10
|
+
/***/ }),
|
11
|
+
|
12
|
+
/***/ 760:
|
13
|
+
/***/ ((module) => {
|
14
|
+
|
15
|
+
module.exports = require("node:path");
|
16
|
+
|
17
|
+
/***/ }),
|
18
|
+
|
19
|
+
/***/ 725:
|
20
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
21
|
+
|
22
|
+
|
23
|
+
// The require scope
|
24
|
+
var __nested_webpack_require_39__ = {};
|
25
|
+
/************************************************************************/ // webpack/runtime/compat_get_default_export
|
26
|
+
(()=>{
|
27
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
28
|
+
__nested_webpack_require_39__.n = function(module) {
|
29
|
+
var getter = module && module.__esModule ? function() {
|
30
|
+
return module['default'];
|
31
|
+
} : function() {
|
32
|
+
return module;
|
33
|
+
};
|
34
|
+
__nested_webpack_require_39__.d(getter, {
|
35
|
+
a: getter
|
36
|
+
});
|
37
|
+
return getter;
|
38
|
+
};
|
39
|
+
})();
|
40
|
+
// webpack/runtime/define_property_getters
|
41
|
+
(()=>{
|
42
|
+
__nested_webpack_require_39__.d = function(exports1, definition) {
|
43
|
+
for(var key in definition)if (__nested_webpack_require_39__.o(definition, key) && !__nested_webpack_require_39__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
44
|
+
enumerable: true,
|
45
|
+
get: definition[key]
|
46
|
+
});
|
47
|
+
};
|
48
|
+
})();
|
49
|
+
// webpack/runtime/has_own_property
|
50
|
+
(()=>{
|
51
|
+
__nested_webpack_require_39__.o = function(obj, prop) {
|
52
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
53
|
+
};
|
54
|
+
})();
|
55
|
+
// webpack/runtime/make_namespace_object
|
56
|
+
(()=>{
|
57
|
+
// define __esModule on exports
|
58
|
+
__nested_webpack_require_39__.r = function(exports1) {
|
59
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
60
|
+
value: 'Module'
|
61
|
+
});
|
62
|
+
Object.defineProperty(exports1, '__esModule', {
|
63
|
+
value: true
|
64
|
+
});
|
65
|
+
};
|
66
|
+
})();
|
67
|
+
/************************************************************************/ var __nested_webpack_exports__ = {};
|
68
|
+
// ESM COMPAT FLAG
|
69
|
+
__nested_webpack_require_39__.r(__nested_webpack_exports__);
|
70
|
+
// EXPORTS
|
71
|
+
__nested_webpack_require_39__.d(__nested_webpack_exports__, {
|
72
|
+
findConfig: ()=>/* binding */ findConfig,
|
73
|
+
loadConfig: ()=>/* binding */ loadConfig
|
74
|
+
});
|
75
|
+
const external_node_fs_namespaceObject = __nccwpck_require__(24);
|
76
|
+
var external_node_fs_default = /*#__PURE__*/ __nested_webpack_require_39__.n(external_node_fs_namespaceObject);
|
77
|
+
const external_node_path_namespaceObject = __nccwpck_require__(760);
|
78
|
+
var external_node_path_default = /*#__PURE__*/ __nested_webpack_require_39__.n(external_node_path_namespaceObject);
|
79
|
+
function _define_property(obj, key, value) {
|
80
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
81
|
+
value: value,
|
82
|
+
enumerable: true,
|
83
|
+
configurable: true,
|
84
|
+
writable: true
|
85
|
+
});
|
86
|
+
else obj[key] = value;
|
87
|
+
return obj;
|
88
|
+
}
|
89
|
+
class BrowserslistError extends Error {
|
90
|
+
constructor(message){
|
91
|
+
super(message), _define_property(this, "browserslist", void 0);
|
92
|
+
this.name = 'BrowserslistError';
|
93
|
+
this.browserslist = true;
|
94
|
+
if (Error.captureStackTrace) Error.captureStackTrace(this, BrowserslistError);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
const isFileCache = {};
|
98
|
+
function isFile(file) {
|
99
|
+
if (file in isFileCache) return isFileCache[file];
|
100
|
+
const result = external_node_fs_default().existsSync(file) && external_node_fs_default().statSync(file).isFile();
|
101
|
+
isFileCache[file] = result;
|
102
|
+
return result;
|
103
|
+
}
|
104
|
+
function check(section) {
|
105
|
+
const FORMAT = 'Browserslist config should be a string or an array of strings with browser queries';
|
106
|
+
if (Array.isArray(section)) {
|
107
|
+
for(let i = 0; i < section.length; i++)if ('string' != typeof section[i]) throw new BrowserslistError(FORMAT);
|
108
|
+
} else if ('string' != typeof section) throw new BrowserslistError(FORMAT);
|
109
|
+
}
|
110
|
+
function parsePackage(file) {
|
111
|
+
const config = JSON.parse(external_node_fs_default().readFileSync(file).toString().replace(/^\uFEFF/m, ''));
|
112
|
+
if (config.browserlist && !config.browserslist) throw new BrowserslistError(`\`browserlist\` key instead of \`browserslist\` in ${file}`);
|
113
|
+
let list = config.browserslist;
|
114
|
+
if (Array.isArray(list)) list = {
|
115
|
+
defaults: list
|
116
|
+
};
|
117
|
+
if ('string' == typeof list) list = parseConfig(list);
|
118
|
+
for(const i in list)check(list[i]);
|
119
|
+
return list;
|
120
|
+
}
|
121
|
+
const IS_SECTION = /^\s*\[(.+)]\s*$/;
|
122
|
+
function parseConfig(string) {
|
123
|
+
const result = {
|
124
|
+
defaults: []
|
125
|
+
};
|
126
|
+
let sections = [
|
127
|
+
'defaults'
|
128
|
+
];
|
129
|
+
string.toString().replace(/#[^\n]*/g, '').split(/\n|,/).map((line)=>line.trim()).filter((line)=>'' !== line).forEach((line)=>{
|
130
|
+
const matched = line.match(IS_SECTION);
|
131
|
+
if (matched) {
|
132
|
+
sections = matched[1].trim().split(' ');
|
133
|
+
sections.forEach((section)=>{
|
134
|
+
if (result[section]) throw new BrowserslistError(`Duplicate section ${section} in Browserslist config`);
|
135
|
+
result[section] = [];
|
136
|
+
});
|
137
|
+
} else sections.forEach((section)=>{
|
138
|
+
result[section].push(line);
|
139
|
+
});
|
140
|
+
});
|
141
|
+
return result;
|
142
|
+
}
|
143
|
+
function readConfig(file) {
|
144
|
+
if (!isFile(file)) throw new BrowserslistError(`Can't read ${file} config`);
|
145
|
+
return parseConfig(external_node_fs_default().readFileSync(file, 'utf-8'));
|
146
|
+
}
|
147
|
+
function parsePackageOrReadConfig(file) {
|
148
|
+
if ('package.json' === external_node_path_default().basename(file)) return parsePackage(file);
|
149
|
+
return readConfig(file);
|
150
|
+
}
|
151
|
+
function pickEnv(config, opts) {
|
152
|
+
if ('object' != typeof config) return config;
|
153
|
+
let name;
|
154
|
+
if ('string' == typeof opts.env) name = opts.env;
|
155
|
+
else if (process.env.BROWSERSLIST_ENV) name = process.env.BROWSERSLIST_ENV;
|
156
|
+
else if (process.env.NODE_ENV) name = process.env.NODE_ENV;
|
157
|
+
else name = 'production';
|
158
|
+
return config[name] || config.defaults;
|
159
|
+
}
|
160
|
+
function eachParent(file, callback) {
|
161
|
+
const dir = isFile(file) ? external_node_path_default().dirname(file) : file;
|
162
|
+
let loc = external_node_path_default().resolve(dir);
|
163
|
+
do {
|
164
|
+
const result = callback(loc);
|
165
|
+
if (void 0 !== result) return result;
|
166
|
+
}while (loc !== (loc = external_node_path_default().dirname(loc)));
|
167
|
+
}
|
168
|
+
function findConfigFile(from) {
|
169
|
+
return eachParent(from, (dir)=>{
|
170
|
+
const config = external_node_path_default().join(dir, 'browserslist');
|
171
|
+
const pkg = external_node_path_default().join(dir, 'package.json');
|
172
|
+
const rc = external_node_path_default().join(dir, '.browserslistrc');
|
173
|
+
let pkgBrowserslist;
|
174
|
+
if (isFile(pkg)) try {
|
175
|
+
pkgBrowserslist = parsePackage(pkg);
|
176
|
+
} catch (e) {
|
177
|
+
if (e instanceof BrowserslistError) throw e;
|
178
|
+
console.warn(`[Browserslist] Could not parse ${pkg}. Ignoring it.`);
|
179
|
+
}
|
180
|
+
if (isFile(config) && pkgBrowserslist) throw new BrowserslistError(`${dir} contains both browserslist and package.json with browsers`);
|
181
|
+
if (isFile(rc) && pkgBrowserslist) throw new BrowserslistError(`${dir} contains both .browserslistrc and package.json with browsers`);
|
182
|
+
if (isFile(config) && isFile(rc)) throw new BrowserslistError(`${dir} contains both .browserslistrc and browserslist`);
|
183
|
+
if (isFile(config)) return config;
|
184
|
+
if (isFile(rc)) return rc;
|
185
|
+
if (pkgBrowserslist) return pkg;
|
186
|
+
});
|
187
|
+
}
|
188
|
+
const configCache = {};
|
189
|
+
function findConfig(from) {
|
190
|
+
from = external_node_path_default().resolve(from);
|
191
|
+
const fromDir = isFile(from) ? external_node_path_default().dirname(from) : from;
|
192
|
+
if (fromDir in configCache) return configCache[fromDir];
|
193
|
+
let resolved;
|
194
|
+
const configFile = findConfigFile(from);
|
195
|
+
if (configFile) resolved = parsePackageOrReadConfig(configFile);
|
196
|
+
const configDir = configFile && external_node_path_default().dirname(configFile);
|
197
|
+
eachParent(from, (dir)=>{
|
198
|
+
if (resolved) configCache[dir] = resolved;
|
199
|
+
if (dir === configDir) return null;
|
200
|
+
});
|
201
|
+
return resolved;
|
202
|
+
}
|
203
|
+
function loadConfig(opts) {
|
204
|
+
if (opts.config) return pickEnv(parsePackageOrReadConfig(opts.config), opts);
|
205
|
+
if (opts.path) {
|
206
|
+
const config = findConfig(opts.path);
|
207
|
+
if (!config) return;
|
208
|
+
return pickEnv(config, opts);
|
209
|
+
}
|
210
|
+
}
|
211
|
+
var __webpack_export_target__ = exports;
|
212
|
+
for(var i in __nested_webpack_exports__)__webpack_export_target__[i] = __nested_webpack_exports__[i];
|
213
|
+
if (__nested_webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
214
|
+
value: true
|
215
|
+
});
|
216
|
+
|
217
|
+
|
218
|
+
/***/ })
|
219
|
+
|
220
|
+
/******/ });
|
221
|
+
/************************************************************************/
|
222
|
+
/******/ // The module cache
|
223
|
+
/******/ var __webpack_module_cache__ = {};
|
224
|
+
/******/
|
225
|
+
/******/ // The require function
|
226
|
+
/******/ function __nccwpck_require__(moduleId) {
|
227
|
+
/******/ // Check if module is in cache
|
228
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
229
|
+
/******/ if (cachedModule !== undefined) {
|
230
|
+
/******/ return cachedModule.exports;
|
231
|
+
/******/ }
|
232
|
+
/******/ // Create a new module (and put it into the cache)
|
233
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
234
|
+
/******/ // no module.id needed
|
235
|
+
/******/ // no module.loaded needed
|
236
|
+
/******/ exports: {}
|
237
|
+
/******/ };
|
238
|
+
/******/
|
239
|
+
/******/ // Execute the module function
|
240
|
+
/******/ var threw = true;
|
241
|
+
/******/ try {
|
242
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__);
|
243
|
+
/******/ threw = false;
|
244
|
+
/******/ } finally {
|
245
|
+
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
246
|
+
/******/ }
|
247
|
+
/******/
|
248
|
+
/******/ // Return the exports of the module
|
249
|
+
/******/ return module.exports;
|
250
|
+
/******/ }
|
251
|
+
/******/
|
252
|
+
/************************************************************************/
|
253
|
+
/******/ /* webpack/runtime/compat */
|
254
|
+
/******/
|
255
|
+
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
256
|
+
/******/
|
257
|
+
/************************************************************************/
|
258
|
+
/******/
|
259
|
+
/******/ // startup
|
260
|
+
/******/ // Load entry module and return exports
|
261
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
262
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(725);
|
263
|
+
/******/ module.exports = __webpack_exports__;
|
264
|
+
/******/
|
265
|
+
/******/ })()
|
266
|
+
;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Rspack Contrib
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"browserslist-load-config","version":"1.0.0","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
@@ -138,7 +138,7 @@ module.exports = function (glob, opts) {
|
|
138
138
|
|
139
139
|
/***/ }),
|
140
140
|
|
141
|
-
/***/
|
141
|
+
/***/ 799:
|
142
142
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
143
143
|
|
144
144
|
"use strict";
|
@@ -152,13 +152,15 @@ const EventEmitter = (__nccwpck_require__(434).EventEmitter);
|
|
152
152
|
const fs = __nccwpck_require__(923);
|
153
153
|
const path = __nccwpck_require__(928);
|
154
154
|
|
155
|
-
const watchEventSource = __nccwpck_require__(
|
155
|
+
const watchEventSource = __nccwpck_require__(214);
|
156
156
|
|
157
157
|
const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({});
|
158
158
|
|
159
159
|
let FS_ACCURACY = 2000;
|
160
160
|
|
161
161
|
const IS_OSX = (__nccwpck_require__(857).platform)() === "darwin";
|
162
|
+
const IS_WIN = (__nccwpck_require__(857).platform)() === "win32";
|
163
|
+
|
162
164
|
const WATCHPACK_POLLING = process.env.WATCHPACK_POLLING;
|
163
165
|
const FORCE_POLLING =
|
164
166
|
`${+WATCHPACK_POLLING}` === WATCHPACK_POLLING
|
@@ -777,7 +779,9 @@ class DirectoryWatcher extends EventEmitter {
|
|
777
779
|
err2.code === "ENOENT" ||
|
778
780
|
err2.code === "EPERM" ||
|
779
781
|
err2.code === "EACCES" ||
|
780
|
-
err2.code === "EBUSY"
|
782
|
+
err2.code === "EBUSY" ||
|
783
|
+
// TODO https://github.com/libuv/libuv/pull/4566
|
784
|
+
(err2.code === "EINVAL" && IS_WIN)
|
781
785
|
) {
|
782
786
|
this.setMissing(itemPath, initial, "scan (" + err2.code + ")");
|
783
787
|
} else {
|
@@ -933,7 +937,7 @@ function ensureFsAccuracy(mtime) {
|
|
933
937
|
|
934
938
|
/***/ }),
|
935
939
|
|
936
|
-
/***/
|
940
|
+
/***/ 308:
|
937
941
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
938
942
|
|
939
943
|
"use strict";
|
@@ -1048,7 +1052,7 @@ module.exports = LinkResolver;
|
|
1048
1052
|
|
1049
1053
|
/***/ }),
|
1050
1054
|
|
1051
|
-
/***/
|
1055
|
+
/***/ 847:
|
1052
1056
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1053
1057
|
|
1054
1058
|
"use strict";
|
@@ -1059,7 +1063,7 @@ module.exports = LinkResolver;
|
|
1059
1063
|
|
1060
1064
|
|
1061
1065
|
const path = __nccwpck_require__(928);
|
1062
|
-
const DirectoryWatcher = __nccwpck_require__(
|
1066
|
+
const DirectoryWatcher = __nccwpck_require__(799);
|
1063
1067
|
|
1064
1068
|
class WatcherManager {
|
1065
1069
|
constructor(options) {
|
@@ -1108,7 +1112,7 @@ module.exports.WatcherManager = WatcherManager;
|
|
1108
1112
|
|
1109
1113
|
/***/ }),
|
1110
1114
|
|
1111
|
-
/***/
|
1115
|
+
/***/ 935:
|
1112
1116
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1113
1117
|
|
1114
1118
|
"use strict";
|
@@ -1254,7 +1258,7 @@ module.exports = (plan, limit) => {
|
|
1254
1258
|
|
1255
1259
|
/***/ }),
|
1256
1260
|
|
1257
|
-
/***/
|
1261
|
+
/***/ 214:
|
1258
1262
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
1259
1263
|
|
1260
1264
|
"use strict";
|
@@ -1267,14 +1271,16 @@ module.exports = (plan, limit) => {
|
|
1267
1271
|
const fs = __nccwpck_require__(896);
|
1268
1272
|
const path = __nccwpck_require__(928);
|
1269
1273
|
const { EventEmitter } = __nccwpck_require__(434);
|
1270
|
-
const reducePlan = __nccwpck_require__(
|
1274
|
+
const reducePlan = __nccwpck_require__(935);
|
1271
1275
|
|
1272
1276
|
const IS_OSX = (__nccwpck_require__(857).platform)() === "darwin";
|
1273
1277
|
const IS_WIN = (__nccwpck_require__(857).platform)() === "win32";
|
1274
1278
|
const SUPPORTS_RECURSIVE_WATCHING = IS_OSX || IS_WIN;
|
1275
1279
|
|
1280
|
+
// Use 20 for OSX to make `FSWatcher.close` faster
|
1281
|
+
// https://github.com/nodejs/node/issues/29949
|
1276
1282
|
const watcherLimit =
|
1277
|
-
+process.env.WATCHPACK_WATCHER_LIMIT || (IS_OSX ?
|
1283
|
+
+process.env.WATCHPACK_WATCHER_LIMIT || (IS_OSX ? 20 : 10000);
|
1278
1284
|
|
1279
1285
|
const recursiveWatcherLogging = !!process.env
|
1280
1286
|
.WATCHPACK_RECURSIVE_WATCHER_LOGGING;
|
@@ -1294,6 +1300,33 @@ const directWatchers = new Map();
|
|
1294
1300
|
/** @type {Map<Watcher, RecursiveWatcher | DirectWatcher>} */
|
1295
1301
|
const underlyingWatcher = new Map();
|
1296
1302
|
|
1303
|
+
function createEPERMError(filePath) {
|
1304
|
+
const error = new Error(`Operation not permitted: ${filePath}`);
|
1305
|
+
error.code = "EPERM";
|
1306
|
+
return error;
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
function createHandleChangeEvent(watcher, filePath, handleChangeEvent) {
|
1310
|
+
return (type, filename) => {
|
1311
|
+
// TODO: After Node.js v22, fs.watch(dir) and deleting a dir will trigger the rename change event.
|
1312
|
+
// Here we just ignore it and keep the same behavior as before v22
|
1313
|
+
// https://github.com/libuv/libuv/pull/4376
|
1314
|
+
if (
|
1315
|
+
type === "rename" &&
|
1316
|
+
path.isAbsolute(filename) &&
|
1317
|
+
path.basename(filename) === path.basename(filePath)
|
1318
|
+
) {
|
1319
|
+
if (!IS_OSX) {
|
1320
|
+
// Before v22, windows will throw EPERM error
|
1321
|
+
watcher.emit("error", createEPERMError(filename));
|
1322
|
+
}
|
1323
|
+
// Before v22, macos nothing to do
|
1324
|
+
return;
|
1325
|
+
}
|
1326
|
+
handleChangeEvent(type, filename);
|
1327
|
+
};
|
1328
|
+
}
|
1329
|
+
|
1297
1330
|
class DirectWatcher {
|
1298
1331
|
constructor(filePath) {
|
1299
1332
|
this.filePath = filePath;
|
@@ -1301,12 +1334,18 @@ class DirectWatcher {
|
|
1301
1334
|
this.watcher = undefined;
|
1302
1335
|
try {
|
1303
1336
|
const watcher = fs.watch(filePath);
|
1337
|
+
|
1304
1338
|
this.watcher = watcher;
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1339
|
+
const handleChangeEvent = createHandleChangeEvent(
|
1340
|
+
watcher,
|
1341
|
+
filePath,
|
1342
|
+
(type, filename) => {
|
1343
|
+
for (const w of this.watchers) {
|
1344
|
+
w.emit("change", type, filename);
|
1345
|
+
}
|
1308
1346
|
}
|
1309
|
-
|
1347
|
+
);
|
1348
|
+
watcher.on("change", handleChangeEvent);
|
1310
1349
|
watcher.on("error", error => {
|
1311
1350
|
for (const w of this.watchers) {
|
1312
1351
|
w.emit("error", error);
|
@@ -1592,10 +1631,13 @@ exports.getNumberOfWatchers = () => {
|
|
1592
1631
|
return watcherCount;
|
1593
1632
|
};
|
1594
1633
|
|
1634
|
+
exports.createHandleChangeEvent = createHandleChangeEvent;
|
1635
|
+
exports.watcherLimit = watcherLimit;
|
1636
|
+
|
1595
1637
|
|
1596
1638
|
/***/ }),
|
1597
1639
|
|
1598
|
-
/***/
|
1640
|
+
/***/ 882:
|
1599
1641
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
1600
1642
|
|
1601
1643
|
"use strict";
|
@@ -1605,11 +1647,11 @@ exports.getNumberOfWatchers = () => {
|
|
1605
1647
|
*/
|
1606
1648
|
|
1607
1649
|
|
1608
|
-
const getWatcherManager = __nccwpck_require__(
|
1609
|
-
const LinkResolver = __nccwpck_require__(
|
1650
|
+
const getWatcherManager = __nccwpck_require__(847);
|
1651
|
+
const LinkResolver = __nccwpck_require__(308);
|
1610
1652
|
const EventEmitter = (__nccwpck_require__(434).EventEmitter);
|
1611
1653
|
const globToRegExp = __nccwpck_require__(137);
|
1612
|
-
const watchEventSource = __nccwpck_require__(
|
1654
|
+
const watchEventSource = __nccwpck_require__(214);
|
1613
1655
|
|
1614
1656
|
const EMPTY_ARRAY = [];
|
1615
1657
|
const EMPTY_OPTIONS = {};
|
@@ -2078,7 +2120,7 @@ module.exports = require("path");
|
|
2078
2120
|
/******/ // startup
|
2079
2121
|
/******/ // Load entry module and return exports
|
2080
2122
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
2081
|
-
/******/ var __webpack_exports__ = __nccwpck_require__(
|
2123
|
+
/******/ var __webpack_exports__ = __nccwpck_require__(882);
|
2082
2124
|
/******/ module.exports = __webpack_exports__;
|
2083
2125
|
/******/
|
2084
2126
|
/******/ })()
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"watchpack","author":"Tobias Koppers @sokra","version":"2.4.
|
1
|
+
{"name":"watchpack","author":"Tobias Koppers @sokra","version":"2.4.4","license":"MIT","types":"index.d.ts","type":"commonjs"}
|