Skip to content

Commit

Permalink
fix: avoid type error when skipLibCheck is not enabled (#7155)
Browse files Browse the repository at this point in the history
* Fix zod type error

* Update api.md

* Bump [email protected] -> 3.6.0

* Update api.md
  • Loading branch information
CPunisher authored Jul 15, 2024
1 parent 492bcc1 commit f93ce95
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 94 deletions.
2 changes: 1 addition & 1 deletion packages/rspack-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@types/ws": "8.5.10"
},
"dependencies": {
"chokidar": "3.5.3",
"chokidar": "3.6.0",
"connect-history-api-fallback": "2.0.0",
"express": "4.19.2",
"http-proxy-middleware": "2.0.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/rspack/etc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9553,7 +9553,7 @@ export const rspackOptions: z.ZodObject<{
templateLiteral?: boolean | undefined;
} | undefined;
}>>;
target: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">]>, z.ZodLiteral<"async-node">]>, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>]>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>]>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>]>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>]>, z.ZodLiteral<"electron-main">]>, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>]>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>]>, z.ZodLiteral<"electron-renderer">]>, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>]>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>]>, z.ZodLiteral<"electron-preload">]>, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>]>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>]>, z.ZodLiteral<"nwjs">]>, z.ZodType<`nwjs${number}`, z.ZodTypeDef, `nwjs${number}`>]>, z.ZodType<`nwjs${number}.${number}`, z.ZodTypeDef, `nwjs${number}.${number}`>]>, z.ZodLiteral<"node-webkit">]>, z.ZodType<`node-webkit${number}`, z.ZodTypeDef, `node-webkit${number}`>]>, z.ZodType<`node-webkit${number}.${number}`, z.ZodTypeDef, `node-webkit${number}.${number}`>]>]>, z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">]>, z.ZodLiteral<"async-node">]>, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>]>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>]>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>]>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>]>, z.ZodLiteral<"electron-main">]>, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>]>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>]>, z.ZodLiteral<"electron-renderer">]>, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>]>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>]>, z.ZodLiteral<"electron-preload">]>, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>]>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>]>, z.ZodLiteral<"nwjs">]>, z.ZodType<`nwjs${number}`, z.ZodTypeDef, `nwjs${number}`>]>, z.ZodType<`nwjs${number}.${number}`, z.ZodTypeDef, `nwjs${number}.${number}`>]>, z.ZodLiteral<"node-webkit">]>, z.ZodType<`node-webkit${number}`, z.ZodTypeDef, `node-webkit${number}`>]>, z.ZodType<`node-webkit${number}.${number}`, z.ZodTypeDef, `node-webkit${number}.${number}`>]>, "many">]>>;
target: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">, z.ZodLiteral<"async-node">, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>, z.ZodLiteral<"electron-main">, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>, z.ZodLiteral<"electron-renderer">, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>, z.ZodLiteral<"electron-preload">, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>, z.ZodLiteral<"nwjs">, z.ZodType<`nwjs${number}`, z.ZodTypeDef, `nwjs${number}`>, z.ZodType<`nwjs${number}.${number}`, z.ZodTypeDef, `nwjs${number}.${number}`>, z.ZodLiteral<"node-webkit">, z.ZodType<`node-webkit${number}`, z.ZodTypeDef, `node-webkit${number}`>, z.ZodType<`node-webkit${number}.${number}`, z.ZodTypeDef, `node-webkit${number}.${number}`>]>, z.ZodArray<z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">, z.ZodLiteral<"async-node">, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>, z.ZodLiteral<"electron-main">, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>, z.ZodLiteral<"electron-renderer">, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>, z.ZodLiteral<"electron-preload">, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>, z.ZodLiteral<"nwjs">, z.ZodType<`nwjs${number}`, z.ZodTypeDef, `nwjs${number}`>, z.ZodType<`nwjs${number}.${number}`, z.ZodTypeDef, `nwjs${number}.${number}`>, z.ZodLiteral<"node-webkit">, z.ZodType<`node-webkit${number}`, z.ZodTypeDef, `node-webkit${number}`>, z.ZodType<`node-webkit${number}.${number}`, z.ZodTypeDef, `node-webkit${number}.${number}`>]>, "many">]>>;
mode: z.ZodOptional<z.ZodEnum<["development", "production", "none"]>>;
experiments: z.ZodOptional<z.ZodObject<{
lazyCompilation: z.ZodUnion<[z.ZodOptional<z.ZodBoolean>, z.ZodObject<{
Expand Down Expand Up @@ -13419,7 +13419,7 @@ interface SystemjsConfig {
export type Target = z.infer<typeof target>;

// @public (undocumented)
const target: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">]>, z.ZodLiteral<"async-node">]>, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>]>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>]>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>]>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>]>, z.ZodLiteral<"electron-main">]>, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>]>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>]>, z.ZodLiteral<"electron-renderer">]>, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>]>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>]>, z.ZodLiteral<"electron-preload">]>, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>]>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>]>, z.ZodLiteral<"nwjs">]>, z.ZodType<`nwjs${number}`, z.ZodTypeDef, `nwjs${number}`>]>, z.ZodType<`nwjs${number}.${number}`, z.ZodTypeDef, `nwjs${number}.${number}`>]>, z.ZodLiteral<"node-webkit">]>, z.ZodType<`node-webkit${number}`, z.ZodTypeDef, `node-webkit${number}`>]>, z.ZodType<`node-webkit${number}.${number}`, z.ZodTypeDef, `node-webkit${number}.${number}`>]>]>, z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">]>, z.ZodLiteral<"async-node">]>, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>]>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>]>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>]>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>]>, z.ZodLiteral<"electron-main">]>, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>]>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>]>, z.ZodLiteral<"electron-renderer">]>, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>]>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>]>, z.ZodLiteral<"electron-preload">]>, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>]>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>]>, z.ZodLiteral<"nwjs">]>, z.ZodType<`nwjs${number}`, z.ZodTypeDef, `nwjs${number}`>]>, z.ZodType<`nwjs${number}.${number}`, z.ZodTypeDef, `nwjs${number}.${number}`>]>, z.ZodLiteral<"node-webkit">]>, z.ZodType<`node-webkit${number}`, z.ZodTypeDef, `node-webkit${number}`>]>, z.ZodType<`node-webkit${number}.${number}`, z.ZodTypeDef, `node-webkit${number}.${number}`>]>, "many">]>;
const target: z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">, z.ZodLiteral<"async-node">, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>, z.ZodLiteral<"electron-main">, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>, z.ZodLiteral<"electron-renderer">, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>, z.ZodLiteral<"electron-preload">, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>, z.ZodLiteral<"nwjs">, z.ZodType<`nwjs${number}`, z.ZodTypeDef, `nwjs${number}`>, z.ZodType<`nwjs${number}.${number}`, z.ZodTypeDef, `nwjs${number}.${number}`>, z.ZodLiteral<"node-webkit">, z.ZodType<`node-webkit${number}`, z.ZodTypeDef, `node-webkit${number}`>, z.ZodType<`node-webkit${number}.${number}`, z.ZodTypeDef, `node-webkit${number}.${number}`>]>, z.ZodArray<z.ZodUnion<[z.ZodEnum<["web", "webworker", "es3", "es5", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021", "es2022", "browserslist"]>, z.ZodLiteral<"node">, z.ZodLiteral<"async-node">, z.ZodType<`node${number}`, z.ZodTypeDef, `node${number}`>, z.ZodType<`async-node${number}`, z.ZodTypeDef, `async-node${number}`>, z.ZodType<`node${number}.${number}`, z.ZodTypeDef, `node${number}.${number}`>, z.ZodType<`async-node${number}.${number}`, z.ZodTypeDef, `async-node${number}.${number}`>, z.ZodLiteral<"electron-main">, z.ZodType<`electron${number}-main`, z.ZodTypeDef, `electron${number}-main`>, z.ZodType<`electron${number}.${number}-main`, z.ZodTypeDef, `electron${number}.${number}-main`>, z.ZodLiteral<"electron-renderer">, z.ZodType<`electron${number}-renderer`, z.ZodTypeDef, `electron${number}-renderer`>, z.ZodType<`electron${number}.${number}-renderer`, z.ZodTypeDef, `electron${number}.${number}-renderer`>, z.ZodLiteral<"electron-preload">, z.ZodType<`electron${number}-preload`, z.ZodTypeDef, `electron${number}-preload`>, z.ZodType<`electron${number}.${number}-preload`, z.ZodTypeDef, `electron${number}.${number}-preload`>, z.ZodLiteral<"nwjs">, z.ZodType<`nwjs${number}`, z.ZodTypeDef, `nwjs${number}`>, z.ZodType<`nwjs${number}.${number}`, z.ZodTypeDef, `nwjs${number}.${number}`>, z.ZodLiteral<"node-webkit">, z.ZodType<`node-webkit${number}`, z.ZodTypeDef, `node-webkit${number}`>, z.ZodType<`node-webkit${number}.${number}`, z.ZodTypeDef, `node-webkit${number}.${number}`>]>, "many">]>;

export { Template }

Expand Down
138 changes: 55 additions & 83 deletions packages/rspack/src/config/zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,8 @@ export type ModuleOptions = z.infer<typeof moduleOptions>;
//#endregion

//#region Target
const allowTarget = z
.enum([
const allowTarget = z.union([
z.enum([
"web",
"webworker",
"es3",
Expand All @@ -776,89 +776,61 @@ const allowTarget = z
"es2021",
"es2022",
"browserslist"
])
.or(z.literal("node"))
.or(z.literal("async-node"))
.or(
z.custom<`node${number}`>(
value => typeof value === "string" && /^node\d+$/.test(value)
)
)
.or(
z.custom<`async-node${number}`>(
value => typeof value === "string" && /^async-node\d+$/.test(value)
)
)
.or(
z.custom<`node${number}.${number}`>(
value => typeof value === "string" && /^node\d+\.\d+$/.test(value)
)
)
.or(
z.custom<`async-node${number}.${number}`>(
value => typeof value === "string" && /^async-node\d+\.\d+$/.test(value)
)
)
.or(z.literal("electron-main"))
.or(
z.custom<`electron${number}-main`>(
value => typeof value === "string" && /^electron\d+-main$/.test(value)
)
)
.or(
z.custom<`electron${number}.${number}-main`>(
value =>
typeof value === "string" && /^electron\d+\.\d+-main$/.test(value)
)
)
.or(z.literal("electron-renderer"))
.or(
z.custom<`electron${number}-renderer`>(
value => typeof value === "string" && /^electron\d+-renderer$/.test(value)
)
]),
z.literal("node"),
z.literal("async-node"),
z.custom<`node${number}`>(
value => typeof value === "string" && /^node\d+$/.test(value)
),
z.custom<`async-node${number}`>(
value => typeof value === "string" && /^async-node\d+$/.test(value)
),
z.custom<`node${number}.${number}`>(
value => typeof value === "string" && /^node\d+\.\d+$/.test(value)
),
z.custom<`async-node${number}.${number}`>(
value => typeof value === "string" && /^async-node\d+\.\d+$/.test(value)
),
z.literal("electron-main"),
z.custom<`electron${number}-main`>(
value => typeof value === "string" && /^electron\d+-main$/.test(value)
),
z.custom<`electron${number}.${number}-main`>(
value => typeof value === "string" && /^electron\d+\.\d+-main$/.test(value)
),
z.literal("electron-renderer"),
z.custom<`electron${number}-renderer`>(
value => typeof value === "string" && /^electron\d+-renderer$/.test(value)
),
z.custom<`electron${number}.${number}-renderer`>(
value =>
typeof value === "string" && /^electron\d+\.\d+-renderer$/.test(value)
),
z.literal("electron-preload"),
z.custom<`electron${number}-preload`>(
value => typeof value === "string" && /^electron\d+-preload$/.test(value)
),
z.custom<`electron${number}.${number}-preload`>(
value =>
typeof value === "string" && /^electron\d+\.\d+-preload$/.test(value)
),
z.literal("nwjs"),
z.custom<`nwjs${number}`>(
value => typeof value === "string" && /^nwjs\d+$/.test(value)
),
z.custom<`nwjs${number}.${number}`>(
value => typeof value === "string" && /^nwjs\d+\.\d+$/.test(value)
),
z.literal("node-webkit"),
z.custom<`node-webkit${number}`>(
value => typeof value === "string" && /^node-webkit\d+$/.test(value)
),
z.custom<`node-webkit${number}.${number}`>(
value => typeof value === "string" && /^node-webkit\d+\.\d+$/.test(value)
)
.or(
z.custom<`electron${number}.${number}-renderer`>(
value =>
typeof value === "string" && /^electron\d+\.\d+-renderer$/.test(value)
)
)
.or(z.literal("electron-preload"))
.or(
z.custom<`electron${number}-preload`>(
value => typeof value === "string" && /^electron\d+-preload$/.test(value)
)
)
.or(
z.custom<`electron${number}.${number}-preload`>(
value =>
typeof value === "string" && /^electron\d+\.\d+-preload$/.test(value)
)
)
.or(z.literal("nwjs"))
.or(
z.custom<`nwjs${number}`>(
value => typeof value === "string" && /^nwjs\d+$/.test(value)
)
)
.or(
z.custom<`nwjs${number}.${number}`>(
value => typeof value === "string" && /^nwjs\d+\.\d+$/.test(value)
)
)
.or(z.literal("node-webkit"))
.or(
z.custom<`node-webkit${number}`>(
value => typeof value === "string" && /^node-webkit\d+$/.test(value)
)
)
.or(
z.custom<`node-webkit${number}.${number}`>(
value => typeof value === "string" && /^node-webkit\d+\.\d+$/.test(value)
)
);
]);

const target = z.literal(false).or(allowTarget).or(allowTarget.array());
const target = z.union([z.literal(false), allowTarget, allowTarget.array()]);
export type Target = z.infer<typeof target>;
//#endregion

Expand Down
Loading

2 comments on commit f93ce95

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-07-15 7540e88) Current Change
10000_development-mode + exec 2.23 s ± 9.2 ms 2.25 s ± 33 ms +1.04 %
10000_development-mode_hmr + exec 698 ms ± 6.9 ms 697 ms ± 5.6 ms -0.08 %
10000_production-mode + exec 2.79 s ± 30 ms 2.83 s ± 41 ms +1.67 %
arco-pro_development-mode + exec 1.89 s ± 68 ms 1.91 s ± 75 ms +1.00 %
arco-pro_development-mode_hmr + exec 435 ms ± 1.7 ms 434 ms ± 1.4 ms -0.18 %
arco-pro_production-mode + exec 3.46 s ± 59 ms 3.48 s ± 64 ms +0.65 %
threejs_development-mode_10x + exec 1.69 s ± 17 ms 1.69 s ± 16 ms +0.09 %
threejs_development-mode_10x_hmr + exec 858 ms ± 16 ms 860 ms ± 7.9 ms +0.28 %
threejs_production-mode_10x + exec 5.66 s ± 39 ms 5.68 s ± 53 ms +0.26 %

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
_selftest ✅ success
nx ✅ success
rspress ✅ success
rsbuild ✅ success
examples ✅ success

Please sign in to comment.