@rspack/core 0.6.4-canary-010ffa6-20240507093348 → 0.6.5-canary-0a5cf0d-20240508123903

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.
Files changed (47) hide show
  1. package/compiled/browserslist/index.d.ts +1 -0
  2. package/compiled/browserslist/index.js +2028 -0
  3. package/compiled/browserslist/license +20 -0
  4. package/compiled/browserslist/package.json +1 -0
  5. package/compiled/graceful-fs/index.d.ts +13 -0
  6. package/compiled/graceful-fs/index.js +1063 -0
  7. package/compiled/graceful-fs/license +15 -0
  8. package/compiled/graceful-fs/package.json +1 -0
  9. package/compiled/json-parse-even-better-errors/index.d.ts +1 -0
  10. package/compiled/json-parse-even-better-errors/index.js +193 -0
  11. package/compiled/json-parse-even-better-errors/package.json +1 -0
  12. package/compiled/neo-async/index.d.ts +685 -0
  13. package/compiled/neo-async/index.js +9207 -0
  14. package/compiled/neo-async/license +22 -0
  15. package/compiled/neo-async/package.json +1 -0
  16. package/compiled/watchpack/index.d.ts +216 -0
  17. package/compiled/watchpack/index.js +2075 -0
  18. package/compiled/watchpack/license +20 -0
  19. package/compiled/watchpack/package.json +1 -0
  20. package/compiled/zod/index.d.ts +1647 -0
  21. package/compiled/zod/index.js +4208 -0
  22. package/compiled/zod/license +21 -0
  23. package/compiled/zod/package.json +1 -0
  24. package/compiled/zod-validation-error/index.d.ts +188 -0
  25. package/compiled/zod-validation-error/index.js +4367 -0
  26. package/compiled/zod-validation-error/license +9 -0
  27. package/compiled/zod-validation-error/package.json +1 -0
  28. package/dist/Compiler.d.ts +2 -2
  29. package/dist/MultiCompiler.js +1 -1
  30. package/dist/MultiWatching.js +1 -1
  31. package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
  32. package/dist/builtin-plugin/BannerPlugin.js +1 -1
  33. package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +1 -1
  34. package/dist/builtin-plugin/HtmlRspackPlugin.js +1 -1
  35. package/dist/builtin-plugin/IgnorePlugin.js +1 -1
  36. package/dist/config/browserslistTargetHandler.js +1 -1
  37. package/dist/config/zod.d.ts +1 -1
  38. package/dist/config/zod.js +1 -1
  39. package/dist/lib/CacheFacade.js +1 -1
  40. package/dist/loader-runner/index.js +1 -1
  41. package/dist/node/NodeEnvironmentPlugin.js +1 -1
  42. package/dist/node/NodeWatchFileSystem.d.ts +3 -3
  43. package/dist/node/NodeWatchFileSystem.js +1 -1
  44. package/dist/rspackOptionsApply.js +1 -1
  45. package/dist/util/validate.d.ts +1 -1
  46. package/dist/util/validate.js +1 -1
  47. package/package.json +20 -14
@@ -0,0 +1,9 @@
1
+ (The MIT License)
2
+
3
+ Copyright 2022 Causaly, Inc <front-end@causaly.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"zod-validation-error","author":{"name":"Causaly Team","email":"front-end@causaly.com","url":"https://www.causaly.com"},"version":"1.3.1","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -12,7 +12,7 @@ import * as binding from "@rspack/binding";
12
12
  import * as tapable from "tapable";
13
13
  import * as liteTapable from "./lite-tapable";
14
14
  import { Callback } from "tapable";
15
- import type { WatchOptions } from "watchpack";
15
+ import type Watchpack from "../compiled/watchpack";
16
16
  import { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from "./config";
17
17
  import { RuleSetCompiler } from "./RuleSetCompiler";
18
18
  import { Stats } from "./Stats";
@@ -114,7 +114,7 @@ declare class Compiler {
114
114
  */
115
115
  __internal__rebuild(modifiedFiles?: ReadonlySet<string>, removedFiles?: ReadonlySet<string>, callback?: (error: Error | null) => void): void;
116
116
  compile(callback: Callback<Error, Compilation>): void;
117
- watch(watchOptions: WatchOptions, handler: Callback<Error, Stats>): Watching;
117
+ watch(watchOptions: Watchpack.WatchOptions, handler: Callback<Error, Stats>): Watching;
118
118
  purgeInputFileSystem(): void;
119
119
  close(callback: (error?: Error | null) => void): void;
120
120
  getAsset(name: string): Buffer | null;
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.MultiCompiler = void 0;
22
22
  const tapable_1 = require("tapable");
23
23
  const MultiStats_1 = __importDefault(require("./MultiStats"));
24
- const neo_async_1 = __importDefault(require("neo-async"));
24
+ const neo_async_1 = __importDefault(require("../compiled/neo-async"));
25
25
  const ArrayQueue_1 = __importDefault(require("./util/ArrayQueue"));
26
26
  const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError"));
27
27
  const MultiWatching_1 = __importDefault(require("./MultiWatching"));
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const neo_async_1 = __importDefault(require("neo-async"));
15
+ const neo_async_1 = __importDefault(require("../compiled/neo-async"));
16
16
  class MultiWatching {
17
17
  /**
18
18
  * @param watchings - child compilers' watchers
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from "../../compiled/zod";
2
2
  import { BuiltinPluginName, JsChunk, RawBannerPluginOptions } from "@rspack/binding";
3
3
  declare const rule: z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>;
4
4
  export type Rule = z.infer<typeof rule>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BannerPlugin = void 0;
4
- const zod_1 = require("zod");
4
+ const zod_1 = require("../../compiled/zod");
5
5
  const binding_1 = require("@rspack/binding");
6
6
  const base_1 = require("./base");
7
7
  const rule = zod_1.z.string().or(zod_1.z.instanceof(RegExp));
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from "../../compiled/zod";
2
2
  import { BuiltinPluginName, RawHtmlRspackPluginOptions } from "@rspack/binding";
3
3
  declare const htmlRspackPluginOptions: z.ZodObject<{
4
4
  filename: z.ZodOptional<z.ZodString>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HtmlRspackPlugin = void 0;
4
- const zod_1 = require("zod");
4
+ const zod_1 = require("../../compiled/zod");
5
5
  const binding_1 = require("@rspack/binding");
6
6
  const base_1 = require("./base");
7
7
  const validate_1 = require("../util/validate");
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IgnorePlugin = void 0;
4
4
  const binding_1 = require("@rspack/binding");
5
- const zod_1 = require("zod");
5
+ const zod_1 = require("../../compiled/zod");
6
6
  const validate_1 = require("../util/validate");
7
7
  const base_1 = require("./base");
8
8
  const IgnorePluginOptions = zod_1.z.union([
@@ -8,7 +8,7 @@
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
10
  "use strict";
11
- const browserslist = require("browserslist");
11
+ const browserslist = require("../../compiled/browserslist");
12
12
  const path = require("path");
13
13
  /** @typedef {import("./target").ApiTargetProperties} ApiTargetProperties */
14
14
  /** @typedef {import("./target").EcmaTargetProperties} EcmaTargetProperties */
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { RawFuncUseCtx, JsAssetInfo } from "@rspack/binding";
3
- import { z } from "zod";
3
+ import { z } from "../../compiled/zod";
4
4
  import { Compilation, Compiler } from "..";
5
5
  import type * as oldBuiltins from "../builtin-plugin";
6
6
  import type * as webpackDevServer from "webpack-dev-server";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.rspackOptions = exports.externalsType = void 0;
4
- const zod_1 = require("zod");
4
+ const zod_1 = require("../../compiled/zod");
5
5
  const util_1 = require("../util");
6
6
  const Module_1 = require("../Module");
7
7
  const Chunk_1 = require("../Chunk");
@@ -4,7 +4,7 @@
4
4
  */
5
5
  "use strict";
6
6
  const { forEachBail } = require("enhanced-resolve");
7
- const asyncLib = require("neo-async");
7
+ const asyncLib = require("../../compiled/neo-async");
8
8
  const getLazyHashedEtag = require("./cache/getLazyHashedEtag.js");
9
9
  const mergeEtags = require("./cache/mergeEtags.js");
10
10
  /** @typedef {import("./Cache")} Cache */
@@ -484,7 +484,7 @@ async function runLoaders(compiler, rawContext) {
484
484
  if (typeof options === "string") {
485
485
  if (options.startsWith("{") && options.endsWith("}")) {
486
486
  try {
487
- const parseJson = require("json-parse-even-better-errors");
487
+ const parseJson = require("../../compiled/json-parse-even-better-errors");
488
488
  options = parseJson(options);
489
489
  }
490
490
  catch (e) {
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  */
15
15
  // @ts-expect-error
16
16
  const CachedInputFileSystem_1 = __importDefault(require("enhanced-resolve/lib/CachedInputFileSystem"));
17
- const graceful_fs_1 = __importDefault(require("graceful-fs"));
17
+ const graceful_fs_1 = __importDefault(require("../../compiled/graceful-fs"));
18
18
  const createConsoleLogger_1 = __importDefault(require("../logging/createConsoleLogger"));
19
19
  const NodeWatchFileSystem_1 = __importDefault(require("./NodeWatchFileSystem"));
20
20
  const nodeConsole_1 = __importDefault(require("./nodeConsole"));
@@ -7,12 +7,12 @@
7
7
  * Copyright (c) JS Foundation and other contributors
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
- import Watchpack, { WatchOptions } from "watchpack";
10
+ import Watchpack from "../../compiled/watchpack";
11
11
  import { FileSystemInfoEntry, Watcher, WatchFileSystem } from "../util/fs";
12
12
  export default class NodeWatchFileSystem implements WatchFileSystem {
13
13
  inputFileSystem: any;
14
- watcherOptions: WatchOptions;
14
+ watcherOptions: Watchpack.WatchOptions;
15
15
  watcher: Watchpack;
16
16
  constructor(inputFileSystem: any);
17
- watch(files: Iterable<string>, directories: Iterable<string>, missing: Iterable<string>, startTime: number, options: WatchOptions, callback: (error: Error, fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">, contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">, changedFiles: Set<string>, removedFiles: Set<string>) => void, callbackUndelayed: (fileName: string, changeTime: number) => void): Watcher;
17
+ watch(files: Iterable<string>, directories: Iterable<string>, missing: Iterable<string>, startTime: number, options: Watchpack.WatchOptions, callback: (error: Error, fileTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">, contextTimeInfoEntries: Map<string, FileSystemInfoEntry | "ignore">, changedFiles: Set<string>, removedFiles: Set<string>) => void, callbackUndelayed: (fileName: string, changeTime: number) => void): Watcher;
18
18
  }
@@ -13,7 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const util_1 = __importDefault(require("util"));
16
- const watchpack_1 = __importDefault(require("watchpack"));
16
+ const watchpack_1 = __importDefault(require("../../compiled/watchpack"));
17
17
  class NodeWatchFileSystem {
18
18
  constructor(inputFileSystem) {
19
19
  this.inputFileSystem = inputFileSystem;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.RspackOptionsApply = void 0;
7
- const graceful_fs_1 = __importDefault(require("graceful-fs"));
7
+ const graceful_fs_1 = __importDefault(require("../compiled/graceful-fs"));
8
8
  const DefaultStatsFactoryPlugin_1 = require("./stats/DefaultStatsFactoryPlugin");
9
9
  const DefaultStatsPrinterPlugin_1 = require("./stats/DefaultStatsPrinterPlugin");
10
10
  const cleverMerge_1 = require("./util/cleverMerge");
@@ -1,3 +1,3 @@
1
- import { z } from "zod";
1
+ import { z } from "../../compiled/zod";
2
2
  export declare function validate<T extends z.ZodType>(opts: any, schema: T): void;
3
3
  export declare function isValidate<T extends z.ZodType>(opts: any, schema: T): boolean;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isValidate = exports.validate = void 0;
4
- const zod_validation_error_1 = require("zod-validation-error");
4
+ const zod_validation_error_1 = require("../../compiled/zod-validation-error");
5
5
  function validate(opts, schema) {
6
6
  var _a;
7
7
  const res = schema.safeParse(opts);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/core",
3
- "version": "0.6.4-canary-010ffa6-20240507093348",
3
+ "version": "0.6.5-canary-0a5cf0d-20240508123903",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "A Fast Rust-based Web Bundler",
@@ -16,7 +16,8 @@
16
16
  },
17
17
  "files": [
18
18
  "dist",
19
- "hot"
19
+ "hot",
20
+ "compiled"
20
21
  ],
21
22
  "engines": {
22
23
  "node": ">=16.0.0"
@@ -30,27 +31,33 @@
30
31
  },
31
32
  "devDependencies": {
32
33
  "@swc/plugin-remove-console": "1.5.121",
34
+ "@types/neo-async": "^2.6.6",
33
35
  "@types/watchpack": "^2.4.0",
34
36
  "@types/webpack-sources": "3.2.3",
35
37
  "@types/ws": "8.5.10",
36
38
  "babel-loader": "^9.1.0",
37
39
  "babel-plugin-import": "^1.13.5",
40
+ "browserslist": "^4.21.3",
38
41
  "copy-webpack-plugin": "5.1.2",
39
42
  "cross-env": "^7.0.3",
40
43
  "del": "^6.0.0",
41
44
  "file-loader": "^6.2.0",
42
45
  "glob": "^10.3.10",
46
+ "graceful-fs": "4.2.10",
43
47
  "html-loader": "^5.0.0",
44
48
  "html-webpack-plugin": "^5.5.0",
45
49
  "identity-obj-proxy": "3.0.0",
46
50
  "jest-environment-jsdom": "^29",
47
51
  "jest-serializer-path": "^0.1.15",
48
52
  "jsdom": "^24.0.0",
53
+ "json-parse-even-better-errors": "^3.0.0",
49
54
  "less": "4.2.0",
50
55
  "less-loader": "^12.0.0",
56
+ "neo-async": "2.6.2",
51
57
  "node-polyfill-webpack-plugin": "3.0.0",
52
58
  "postcss-loader": "^8.0.0",
53
59
  "postcss-pxtorem": "^6.0.0",
60
+ "prebundle": "^1.1.0",
54
61
  "pug-loader": "^2.4.0",
55
62
  "react-relay": "^16.0.0",
56
63
  "sass": "1.56.2",
@@ -59,23 +66,21 @@
59
66
  "source-map-loader": "^5.0.0",
60
67
  "styled-components": "^6.0.8",
61
68
  "terser": "5.27.2",
69
+ "tsc-alias": "^1.8.8",
62
70
  "wast-loader": "^1.11.4",
63
- "@rspack/plugin-minify": "^0.6.4-canary-010ffa6-20240507093348",
64
- "@rspack/core": "0.6.4-canary-010ffa6-20240507093348"
71
+ "watchpack": "^2.4.0",
72
+ "zod": "^3.21.4",
73
+ "zod-validation-error": "1.3.1",
74
+ "@rspack/core": "0.6.5-canary-0a5cf0d-20240508123903",
75
+ "@rspack/plugin-minify": "^0.6.5-canary-0a5cf0d-20240508123903"
65
76
  },
66
77
  "dependencies": {
67
78
  "@module-federation/runtime-tools": "0.1.6",
68
- "browserslist": "^4.21.3",
79
+ "caniuse-lite": "^1.0.30001616",
69
80
  "enhanced-resolve": "5.12.0",
70
- "graceful-fs": "4.2.10",
71
- "json-parse-even-better-errors": "^3.0.0",
72
- "neo-async": "2.6.2",
73
81
  "tapable": "2.2.1",
74
- "watchpack": "^2.4.0",
75
82
  "webpack-sources": "3.2.3",
76
- "zod": "^3.21.4",
77
- "zod-validation-error": "1.3.1",
78
- "@rspack/binding": "0.6.4-canary-010ffa6-20240507093348"
83
+ "@rspack/binding": "0.6.5-canary-0a5cf0d-20240508123903"
79
84
  },
80
85
  "peerDependencies": {
81
86
  "@swc/helpers": ">=0.5.1"
@@ -86,8 +91,9 @@
86
91
  }
87
92
  },
88
93
  "scripts": {
89
- "build": "tsc -b ./tsconfig.build.json",
90
- "dev": "tsc -w",
94
+ "build": "prebundle && tsc -b ./tsconfig.build.json && tsc-alias -p tsconfig.build.json",
95
+ "build:force": "prebundle && tsc -b ./tsconfig.build.json --force && tsc-alias -p tsconfig.build.json",
96
+ "dev": "prebundle && tsc -w",
91
97
  "api-extractor": "api-extractor run --verbose",
92
98
  "api-extractor:ci": "api-extractor run --verbose || diff temp/api.md etc/api.md"
93
99
  }