Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ Strongly prefer one-word variable and function names (e.g. `dir` not `tmpDir`,
(`deno run`) without errors
- **Build**: `deno task build:npm` (dnt) and `deno task build:jsr`

### Dependencies

When adding dependencies to the import map in `deno.json`, strongly prefer
`npm:` specifiers over `jsr:` specifiers whenever a package is available on npm.
Some packages (e.g. `@std/*`, `@deno/*`) are only available on JSR, and that is
fine.

### Git

- Use gitmoji for commit messages
Expand Down
5 changes: 1 addition & 4 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
"license": "MIT",
"publish": { "include": ["vendor", "lib", "mod.ts", "README.md"] },
"imports": {
"@standard-schema/spec": "jsr:@standard-schema/spec@^1.0.0",
"@std/assert": "jsr:@std/assert@1",
"@std/cli": "jsr:@std/cli@^1.0.21",
"@standard-schema/spec": "npm:@standard-schema/spec@^1.0.0",
"@std/expect": "jsr:@std/expect@^1.0.16",
"@std/testing": "jsr:@std/testing@^1.0.15",
"arktype": "npm:arktype@^2.1.20",
"sprintf-js": "npm:sprintf-js@^1.1.3",
"ts-case-convert": "npm:ts-case-convert@^2.1.0",
"dnt": "jsr:@deno/dnt@0.42.3"
},
Expand Down
210 changes: 24 additions & 186 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from "@std/assert/assert";
import assert from "node:assert";
import { type } from "arktype";
import { cli, field } from "../lib/field.ts";
import { object } from "../lib/object.ts";
Expand Down
2 changes: 1 addition & 1 deletion examples/phased-commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from "@std/assert/assert";
import assert from "node:assert";
import { type } from "arktype";
import { cli, field } from "../lib/field.ts";
import { object } from "../lib/object.ts";
Expand Down
2 changes: 1 addition & 1 deletion examples/simple.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert } from "@std/assert/assert";
import assert from "node:assert";
import { type } from "arktype";
import { cli, field } from "../lib/field.ts";
import { object } from "../lib/object.ts";
Expand Down
1 change: 0 additions & 1 deletion lib/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from "./constant.ts";
export * from "./field.ts";
export * from "./object.ts";
export * from "./commands.ts";
export * from "./parse.ts";
export * from "./help.ts";
export * from "./program.ts";
export * from "./sequence.ts";
14 changes: 0 additions & 14 deletions lib/parse.ts

This file was deleted.

2 changes: 1 addition & 1 deletion lib/program.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AnyStep, Input, Parser } from "./types.ts";
import { object } from "./object.ts";
import { format, inspect } from "./help.ts";
import { assert } from "@std/assert";
import assert from "node:assert";

export interface Program<P extends Parser<[AnyStep, ...AnyStep[]]>> {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions test/field.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { describe, it } from "@std/testing/bdd";
import { expect } from "@std/expect";
import { type } from "arktype";
import { field } from "../lib/field.ts";
import { assert } from "@std/assert/assert";
import assert from "node:assert";
import { ValidationError } from "../lib/validate.ts";
import { parseSync } from "../lib/parse.ts";
import { parseSync } from "./test-helpers.ts";

describe("field", () => {
describe("from js", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/help.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type } from "arktype";
import { cli, field } from "../lib/field.ts";
import { type Attrs, object } from "../lib/object.ts";
import type { Input } from "../lib/types.ts";
import { parseSync } from "../lib/parse.ts";
import { parseSync } from "./test-helpers.ts";
import { format, inspect } from "../lib/help.ts";

function exam<T extends object>(attrs: Attrs<T>, input?: Input): string {
Expand Down
5 changes: 2 additions & 3 deletions test/object.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { expect } from "@std/expect";
import { type } from "arktype";
import { object } from "../lib/object.ts";
import { cli, field } from "../lib/field.ts";
import { assert } from "@std/assert";
import assert from "node:assert";
import { ValidationError } from "../lib/validate.ts";
import { ObjectValidationError } from "../lib/object.ts";
import { parseSync } from "../lib/parse.ts";
import { parseNotOk, parseOk } from "./test-helpers.ts";
import { parseNotOk, parseOk, parseSync } from "./test-helpers.ts";

describe("object", () => {
let configuration = object({
Expand Down
2 changes: 1 addition & 1 deletion test/sequence.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, it } from "@std/testing/bdd";
import { expect } from "@std/expect";
import { assert } from "@std/assert/assert";
import assert from "node:assert";
import { type } from "arktype";
import { cli, field } from "../lib/field.ts";
import { object } from "../lib/object.ts";
Expand Down
Loading
Loading