Skip to content

Commit f922185

Browse files
[autofix.ci] apply automated fixes
1 parent da4c544 commit f922185

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

packages/arkenv/src/arkenv.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,10 @@ export function arkenv<T extends CompiledEnvSchema>(
153153
export function arkenv<
154154
const T extends SchemaShape,
155155
const D extends EnvSchema<T> | CompiledEnvSchema,
156-
>(def: D, config: ArkEnvConfig & { safe: true }): SafeArkEnvResult<ArkenvOutput<T, D>>;
156+
>(
157+
def: D,
158+
config: ArkEnvConfig & { safe: true },
159+
): SafeArkEnvResult<ArkenvOutput<T, D>>;
157160
export function arkenv<
158161
const T extends SchemaShape,
159162
const D extends EnvSchema<T> | CompiledEnvSchema,

packages/arkenv/src/errors.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,21 @@ describe("ArkEnvError & arkenv safe mode", () => {
118118
});
119119

120120
it("should run arkenv safely", () => {
121-
const result = arkenv({ PORT: "number" }, { safe: true, env: { PORT: "3000" } });
121+
const result = arkenv(
122+
{ PORT: "number" },
123+
{ safe: true, env: { PORT: "3000" } },
124+
);
122125
expect(result.success).toBe(true);
123126
if (result.success) {
124127
expect(result.data).toEqual({ PORT: 3000 });
125128
}
126129
});
127130

128131
it("should return failure for arkenv safe mode with invalid input", () => {
129-
const result = arkenv({ PORT: "number" }, { safe: true, env: { PORT: "abc" } });
132+
const result = arkenv(
133+
{ PORT: "number" },
134+
{ safe: true, env: { PORT: "abc" } },
135+
);
130136
expect(result.success).toBe(false);
131137
if (!result.success) {
132138
expect(result.issues).toBeDefined();

0 commit comments

Comments
 (0)