@ohos-ports/rspack-core 2.2.9-beta.0 → 2.3.4-beta.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/README.md +7 -7
- package/compiled/http-proxy-middleware/index.d.ts +12 -10
- package/compiled/http-proxy-middleware/package.json +1 -1
- package/compiled/tinypool/dist/index.js +5 -3
- package/compiled/watchpack/index.js +459 -60
- package/compiled/watchpack/package.json +1 -1
- package/compiled/watchpack/types/DirectoryWatcher.d.ts +24 -0
- package/compiled/watchpack/types/index.d.ts +1 -1
- package/compiled/watchpack/types/watchEventSource.d.ts +9 -0
- package/compiled/webpack-sources/index.d.ts +2 -0
- package/compiled/webpack-sources/index.js +207 -94
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types/RawSource.d.ts +0 -10
- package/compiled/webpack-sources/types/helpers/sourceMap.d.ts +47 -0
- package/compiled/webpack-sources/types/index.d.ts +1 -0
- package/dist/BuildInfo.d.ts +7 -0
- package/dist/Compilation.d.ts +3 -1
- package/dist/Compiler.d.ts +5 -6
- package/dist/ConcatenatedModule.d.ts +5 -1
- package/dist/ContextModule.d.ts +3 -1
- package/dist/ExternalModule.d.ts +7 -6
- package/dist/FileSystemInfo.d.ts +1 -0
- package/dist/Module.d.ts +12 -8
- package/dist/ModuleGraphConnection.d.ts +9 -3
- package/dist/NativeWatchFileSystem.d.ts +19 -7
- package/dist/NormalModule.d.ts +14 -6
- package/dist/RuntimeGlobals.d.ts +2 -1
- package/dist/RuntimeTemplate.d.ts +2 -0
- package/dist/Stats.d.ts +1 -1
- package/dist/builtin-loader/lightningcss/index.d.ts +5 -1
- package/dist/builtin-plugin/CompactHashedChunkIdsPlugin.d.ts +1 -0
- package/dist/builtin-plugin/CompactHashedModuleIdsPlugin.d.ts +1 -0
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +5 -0
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +3 -2
- package/dist/builtin-plugin/ImportedByDeferModulesPlugin.d.ts +9 -0
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -0
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +2 -2
- package/dist/config/adapterRuleUse.d.ts +1 -0
- package/dist/config/normalization.d.ts +2 -2
- package/dist/config/target.d.ts +6 -0
- package/dist/config/types.d.ts +69 -36
- package/dist/cssExtractHmr.js +1 -1
- package/dist/cssExtractLoader.js +1 -1
- package/dist/exports.d.ts +5 -4
- package/dist/index.js +1577 -1151
- package/dist/loader-runner/codeFilter.d.ts +9 -0
- package/dist/loader-runner/dependencies.d.ts +1 -1
- package/dist/loader-runner/index.d.ts +2 -1
- package/dist/loader-runner/service.d.ts +0 -4
- package/dist/loader-runner/worker.d.ts +4 -1
- package/dist/node/NodeWatchFileSystem.d.ts +7 -4
- package/dist/sharing/IndependentSharedPlugin.d.ts +1 -2
- package/dist/sharing/utils.d.ts +1 -1
- package/dist/sources.d.ts +3 -0
- package/dist/stats/statsFactoryUtils.d.ts +7 -0
- package/dist/util/bindingHelpers.d.ts +2 -0
- package/dist/util/createModule.d.ts +3 -0
- package/dist/util/fs.d.ts +13 -7
- package/dist/util/resolveLayerExternals.d.ts +1 -0
- package/dist/util/source.d.ts +12 -3
- package/dist/util/symbols.d.ts +10 -0
- package/dist/util/watchTimeInfo.d.ts +5 -1
- package/dist/worker.js +327 -326
- package/hot/lazy-compilation-node.js +1 -1
- package/hot/lazy-compilation-web.js +1 -1
- package/package.json +4 -4
- package/dist/loader-runner/cache.d.ts +0 -27
|
@@ -46,8 +46,12 @@ declare class DirectoryWatcher extends EventEmitter<{
|
|
|
46
46
|
files: Map<string, Entry>;
|
|
47
47
|
/** @type {Map<string, number>} */
|
|
48
48
|
filesWithoutCase: Map<string, number>;
|
|
49
|
+
/** @type {boolean | undefined} */
|
|
50
|
+
caseInsensitive: boolean | undefined;
|
|
49
51
|
/** @type {Map<string, Watcher<DirectoryWatcherEvents> | boolean>} */
|
|
50
52
|
directories: Map<string, Watcher<DirectoryWatcherEvents> | boolean>;
|
|
53
|
+
/** @type {Map<string, number>} */
|
|
54
|
+
directorySafeTimes: Map<string, number>;
|
|
51
55
|
/** @type {Map<string, Watcher<FileWatcherEvents>>} */
|
|
52
56
|
_symlinkTargetWatchers: Map<string, Watcher<FileWatcherEvents>>;
|
|
53
57
|
lastWatchEvent: number;
|
|
@@ -62,6 +66,8 @@ declare class DirectoryWatcher extends EventEmitter<{
|
|
|
62
66
|
initialScanRemoved: null | InitialScanRemoved;
|
|
63
67
|
/** @type {undefined | number} */
|
|
64
68
|
initialScanFinished: undefined | number;
|
|
69
|
+
/** @type {Map<string, number>} */
|
|
70
|
+
removedTimes: Map<string, number>;
|
|
65
71
|
/** @type {Map<string, Set<Watcher<DirectoryWatcherEvents> | Watcher<FileWatcherEvents>>>} */
|
|
66
72
|
watchers: Map<
|
|
67
73
|
string,
|
|
@@ -69,6 +75,8 @@ declare class DirectoryWatcher extends EventEmitter<{
|
|
|
69
75
|
>;
|
|
70
76
|
/** @type {Watcher<FileWatcherEvents> | null} */
|
|
71
77
|
parentWatcher: Watcher<FileWatcherEvents> | null;
|
|
78
|
+
/** @type {undefined | NodeJS.Timeout} */
|
|
79
|
+
retryTimeout: undefined | NodeJS.Timeout;
|
|
72
80
|
refs: number;
|
|
73
81
|
/** @type {Map<string, boolean>} */
|
|
74
82
|
_activeEvents: Map<string, boolean>;
|
|
@@ -145,6 +153,11 @@ declare class DirectoryWatcher extends EventEmitter<{
|
|
|
145
153
|
* @param {unknown=} err error
|
|
146
154
|
*/
|
|
147
155
|
onWatcherError(err?: unknown | undefined): void;
|
|
156
|
+
/**
|
|
157
|
+
* Polls the directory, which still exists, when the OS cannot watch it.
|
|
158
|
+
* @param {unknown} err watcher limit error
|
|
159
|
+
*/
|
|
160
|
+
pollAfterWatcherLimit(err: unknown): void;
|
|
148
161
|
/**
|
|
149
162
|
* @param {Error | NodeJS.ErrnoException=} err error
|
|
150
163
|
*/
|
|
@@ -158,6 +171,12 @@ declare class DirectoryWatcher extends EventEmitter<{
|
|
|
158
171
|
* @param {string} reason a reason
|
|
159
172
|
*/
|
|
160
173
|
onDirectoryRemoved(reason: string): void;
|
|
174
|
+
/**
|
|
175
|
+
* Creates the watcher once the parent directory reports this path.
|
|
176
|
+
* @param {number} mtime mtime
|
|
177
|
+
* @param {EventType} type type
|
|
178
|
+
*/
|
|
179
|
+
retryWatcher(mtime: number, type: EventType): void;
|
|
161
180
|
watchInParentDirectory(): void;
|
|
162
181
|
/**
|
|
163
182
|
* @param {boolean} initial true when initial, otherwise false
|
|
@@ -176,6 +195,11 @@ declare class DirectoryWatcher extends EventEmitter<{
|
|
|
176
195
|
fileTimestamps: TimeInfoEntries,
|
|
177
196
|
directoryTimestamps: TimeInfoEntries,
|
|
178
197
|
): number;
|
|
198
|
+
/**
|
|
199
|
+
* @param {string} target a watched path that is not in `files`
|
|
200
|
+
* @returns {string | undefined} the file it names on a case-insensitive file system
|
|
201
|
+
*/
|
|
202
|
+
getFileWithOtherCase(target: string): string | undefined;
|
|
179
203
|
close(): void;
|
|
180
204
|
}
|
|
181
205
|
declare namespace DirectoryWatcher {
|
|
@@ -35,7 +35,7 @@ type FileWatcherEvents = import("./DirectoryWatcher").FileWatcherEvents;
|
|
|
35
35
|
type EventMap = Record<string, (...args: any[]) => any>;
|
|
36
36
|
type Watcher<T extends EventMap> = import("./DirectoryWatcher").Watcher<T>;
|
|
37
37
|
type IgnoredFunction = (item: string) => boolean;
|
|
38
|
-
type Ignored = string[] | RegExp | string | IgnoredFunction;
|
|
38
|
+
type Ignored = (string | RegExp)[] | RegExp | string | IgnoredFunction;
|
|
39
39
|
type WatcherOptions = {
|
|
40
40
|
/**
|
|
41
41
|
* true when need to resolve symlinks and watch symlink and real file, otherwise false
|
|
@@ -13,11 +13,16 @@ export type WatcherEvents = {
|
|
|
13
13
|
* error event
|
|
14
14
|
*/
|
|
15
15
|
error: (err: unknown) => void;
|
|
16
|
+
/**
|
|
17
|
+
* rescan event, when events may have been lost
|
|
18
|
+
*/
|
|
19
|
+
rescan: () => void;
|
|
16
20
|
};
|
|
17
21
|
/**
|
|
18
22
|
* @typedef {object} WatcherEvents
|
|
19
23
|
* @property {(eventType: EventType, filename?: string) => void} change change event
|
|
20
24
|
* @property {(err: unknown) => void} error error event
|
|
25
|
+
* @property {() => void} rescan rescan event, when events may have been lost
|
|
21
26
|
*/
|
|
22
27
|
/**
|
|
23
28
|
* @extends {EventEmitter<{ [K in keyof WatcherEvents]: Parameters<WatcherEvents[K]> }>}
|
|
@@ -34,6 +39,10 @@ export class Watcher extends EventEmitter<{
|
|
|
34
39
|
* error event
|
|
35
40
|
*/
|
|
36
41
|
error: [err: unknown];
|
|
42
|
+
/**
|
|
43
|
+
* rescan event, when events may have been lost
|
|
44
|
+
*/
|
|
45
|
+
rescan: [];
|
|
37
46
|
}> {
|
|
38
47
|
constructor();
|
|
39
48
|
close(): void;
|
|
@@ -25,11 +25,13 @@ import Source = require("./types/Source");
|
|
|
25
25
|
import SourceMapSource = require("./types/SourceMapSource");
|
|
26
26
|
import GetGeneratedSourceInfo = require("./types/helpers/getGeneratedSourceInfo");
|
|
27
27
|
import Scopes = require("./types/helpers/scopes");
|
|
28
|
+
import SourceMap = require("./types/helpers/sourceMap");
|
|
28
29
|
import StreamChunks = require("./types/helpers/streamChunks");
|
|
29
30
|
import StringBufferUtils = require("./types/helpers/stringBufferUtils");
|
|
30
31
|
|
|
31
32
|
export namespace util {
|
|
32
33
|
export import scopes = Scopes;
|
|
34
|
+
export import sourceMap = SourceMap;
|
|
33
35
|
export import stringBufferUtils = StringBufferUtils;
|
|
34
36
|
}
|
|
35
37
|
export type OnChunk = StreamChunks.OnChunk;
|