@rspack/core 1.0.0-alpha.1 → 1.0.0-alpha.2
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/compiled/zod-validation-error/index.d.ts +4 -170
- package/compiled/zod-validation-error/index.js +4 -4154
- package/dist/builtin-loader/swc/index.d.ts +0 -2
- package/dist/builtin-loader/swc/index.js +1 -3
- package/dist/builtin-loader/swc/types.d.ts +0 -2
- package/dist/config/adapterRuleUse.js +0 -3
- package/dist/node/nodeConsole.js +26 -3
- package/package.json +5 -5
- package/dist/builtin-loader/swc/preact.d.ts +0 -6
- package/dist/builtin-loader/swc/preact.js +0 -15
|
@@ -2,6 +2,4 @@ export { resolvePluginImport } from "./pluginImport";
|
|
|
2
2
|
export type { PluginImportOptions } from "./pluginImport";
|
|
3
3
|
export type { ReactOptions } from "./react";
|
|
4
4
|
export { resolveReact } from "./react";
|
|
5
|
-
export { resolvePreact } from "./preact";
|
|
6
|
-
export type { PreactOptions } from "./preact";
|
|
7
5
|
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./types";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resolveReact = exports.resolvePluginImport = void 0;
|
|
4
4
|
var pluginImport_1 = require("./pluginImport");
|
|
5
5
|
Object.defineProperty(exports, "resolvePluginImport", { enumerable: true, get: function () { return pluginImport_1.resolvePluginImport; } });
|
|
6
6
|
var react_1 = require("./react");
|
|
7
7
|
Object.defineProperty(exports, "resolveReact", { enumerable: true, get: function () { return react_1.resolveReact; } });
|
|
8
|
-
var preact_1 = require("./preact");
|
|
9
|
-
Object.defineProperty(exports, "resolvePreact", { enumerable: true, get: function () { return preact_1.resolvePreact; } });
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* license at https://github.com/swc-project/swc/blob/main/LICENSE
|
|
4
4
|
*/
|
|
5
5
|
import type { PluginImportOptions } from "./pluginImport";
|
|
6
|
-
import type { PreactOptions } from "./preact";
|
|
7
6
|
import type { ReactOptions } from "./react";
|
|
8
7
|
export type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "esnext";
|
|
9
8
|
export type SwcLoaderParserConfig = SwcLoaderTsParserConfig | SwcLoaderEsParserConfig;
|
|
@@ -442,6 +441,5 @@ export type SwcLoaderOptions = {
|
|
|
442
441
|
*/
|
|
443
442
|
rspackExperiments?: {
|
|
444
443
|
import?: PluginImportOptions;
|
|
445
|
-
preact?: PreactOptions;
|
|
446
444
|
};
|
|
447
445
|
};
|
|
@@ -19,9 +19,6 @@ const getSwcLoaderOptions = (o, options) => {
|
|
|
19
19
|
if (expr.import || expr.pluginImport) {
|
|
20
20
|
expr.import = (0, builtin_loader_1.resolvePluginImport)(expr.import || expr.pluginImport);
|
|
21
21
|
}
|
|
22
|
-
if (expr.preact) {
|
|
23
|
-
expr.preact = (0, builtin_loader_1.resolvePreact)(expr.preact);
|
|
24
|
-
}
|
|
25
22
|
}
|
|
26
23
|
return o;
|
|
27
24
|
};
|
package/dist/node/nodeConsole.js
CHANGED
|
@@ -8,8 +8,31 @@
|
|
|
8
8
|
* Copyright (c) JS Foundation and other contributors
|
|
9
9
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(o, k2, desc);
|
|
18
|
+
}) : (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
}));
|
|
22
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
+
}) : function(o, v) {
|
|
25
|
+
o["default"] = v;
|
|
26
|
+
});
|
|
27
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
const util = __importStar(require("util"));
|
|
35
|
+
const truncateArgs_1 = require("../logging/truncateArgs");
|
|
13
36
|
module.exports = ({ colors, appendOnly, stream }) => {
|
|
14
37
|
// @ts-expect-error
|
|
15
38
|
let currentStatusMessage = undefined;
|
|
@@ -43,7 +66,7 @@ module.exports = ({ colors, appendOnly, stream }) => {
|
|
|
43
66
|
return;
|
|
44
67
|
const l = stream.columns;
|
|
45
68
|
const args = l
|
|
46
|
-
? truncateArgs(currentStatusMessage, l - 1)
|
|
69
|
+
? (0, truncateArgs_1.truncateArgs)(currentStatusMessage, l - 1)
|
|
47
70
|
: currentStatusMessage;
|
|
48
71
|
const str = args.join(" ");
|
|
49
72
|
const coloredStr = `\u001b[1m${str}\u001b[39m\u001b[22m`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.2",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
"webpack-sources": "3.2.3",
|
|
80
80
|
"zod": "^3.21.4",
|
|
81
81
|
"zod-validation-error": "1.3.1",
|
|
82
|
-
"@rspack/core": "1.0.0-alpha.
|
|
83
|
-
"@rspack/plugin-minify": "^1.0.0-alpha.
|
|
82
|
+
"@rspack/core": "1.0.0-alpha.2",
|
|
83
|
+
"@rspack/plugin-minify": "^1.0.0-alpha.2"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
86
|
"@module-federation/runtime-tools": "0.2.3",
|
|
87
87
|
"caniuse-lite": "^1.0.30001616",
|
|
88
|
-
"@rspack/binding": "1.0.0-alpha.
|
|
89
|
-
"@rspack/lite-tapable": "1.0.0-alpha.
|
|
88
|
+
"@rspack/binding": "1.0.0-alpha.2",
|
|
89
|
+
"@rspack/lite-tapable": "1.0.0-alpha.2"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@swc/helpers": ">=0.5.1"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolvePreact = void 0;
|
|
4
|
-
function resolvePreact(preact) {
|
|
5
|
-
if (typeof preact === "object") {
|
|
6
|
-
return preact;
|
|
7
|
-
}
|
|
8
|
-
else if (preact === true) {
|
|
9
|
-
return {};
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.resolvePreact = resolvePreact;
|