-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Description
What version of Bun is running?
1.3.4+5eb2145b3
What platform is your computer?
Linux 6.14.0-36-generic x86_64 x86_64
What steps can reproduce the bug?
-
Initiate a new bun project
bun init -y -
Install zod
bun install zod -
A few source code file for Zod will have unterminated double quotes. Example:
// node_modules/zod/v4/classic/compat.d.cts
import * as core from "zod/v4/core
import type { ZodType } from "./schemas.cjs";
export type {
/** @deprecated Use `z.output<T>` instead. */
output as TypeOf,
/** @deprecated Use `z.output<T>` instead. */
output as Infer,
/** @deprecated Use `z.core.$$ZodFirstPartyTypes` instead */
$ZodTypes as ZodFirstPartySchemaTypes, } from "zod/v4/core
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
export declare const ZodIssueCode: {
readonly invalid_type: "invalid_type";
readonly too_big: "too_big";
readonly too_small: "too_small";
readonly invalid_format: "invalid_format";
readonly not_multiple_of: "not_multiple_of";
readonly unrecognized_keys: "unrecognized_keys";
readonly invalid_union: "invalid_union";
readonly invalid_key: "invalid_key";
readonly invalid_element: "invalid_element";
readonly invalid_value: "invalid_value";
readonly custom: "custom";
};
/** @deprecated Use `z.$ZodFlattenedError` */
export type inferFlattenedErrors<T extends core.$ZodType, U = string> = core.$ZodFlattenedError<core.output<T>, U>;
/** @deprecated Use `z.$ZodFormattedError` */
export type inferFormattedError<T extends core.$ZodType<any, any>, U = string> = core.$ZodFormattedError<core.output<T>, U>;
/** Use `z.$brand` instead */
export type BRAND<T extends string | number | symbol = string | number | symbol> = {
[core.$brand]: {
[k in T]: true;
};
};
export { $brand, config } from "zod/v4/core
/** @deprecated Use `z.config(params)` instead. */
export declare function setErrorMap(map: core.$ZodErrorMap): void;
/** @deprecated Use `z.config()` instead. */
export declare function getErrorMap(): core.$ZodErrorMap<core.$ZodIssue> | undefined;
export type {
/** @deprecated Use z.ZodType (without generics) instead. */
ZodType as ZodTypeAny,
/** @deprecated Use `z.ZodType` */
ZodType as ZodSchema,
/** @deprecated Use `z.ZodType` */
ZodType as Schema, };
/** Included for Zod 3 compatibility */
export type ZodRawShape = core.$ZodShape;
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
export declare enum ZodFirstPartyTypeKind {
}What is the expected behavior?
The import line should be terminated with double quote like this:
import * as core from "zod/v4/core"What do you see instead?
The import line is unterminated:
import * as core from "zod/v4/coreAdditional information
This happens in a lot of other places throughout the Zod package's code. I tried using npm to install the package and it works fine. Hence why I am suspecting that this is a Bun issue rather than a Zod issue.
coderabbitai