@@ -19,6 +19,8 @@ newer target.
1919
2020- ` npm install ` : install dependencies from ` package-lock.json ` .
2121- ` npm link ` : expose the local ` wdl ` binary for manual testing.
22+ - ` npm run format ` : format supported source and documentation files.
23+ - ` npm run format:check ` : verify formatting without modifying files.
2224- ` npm run lint ` : run ESLint over the CLI, docs helpers, and examples.
2325- ` npm run typecheck ` : run TypeScript's JavaScript-aware ` tsc --noEmit ` check.
2426- ` npm test ` : run Node's built-in test runner against
@@ -31,9 +33,9 @@ newer target.
3133 configured — the CLI has no default endpoint.
3234
3335Use Node.js 22 or newer for local work. The GitHub Actions workflow uses Node
34- 22, runs ` npm ci ` , ` npm audit --audit-level=moderate ` , ` npm run lint ` ,
35- ` npm run typecheck ` , ` npm test ` , and ` npm pack --dry-run ` , then checks workflow
36- syntax with actionlint.
36+ 22, runs ` npm ci ` , ` npm audit --audit-level=moderate ` , ` npm run format:check ` ,
37+ ` npm run lint ` , ` npm run typecheck` , ` npm test ` , and ` npm pack --dry-run ` , then
38+ checks workflow syntax with actionlint.
3739
3840## Coding Style & Naming Conventions
3941
@@ -47,14 +49,14 @@ dependency injection for testable command behavior, as seen in
4749types rather than ` any ` , and use ` unknown ` plus narrowing for values validated
4850at runtime.
4951
50- Markdown wrapping is bilingual by design, normalized with Prettier
51- (` --embedded-language-formatting=off ` ; code blocks are hand-formatted) and kept
52- by editing habit rather than a linter : English prose hard-wraps at 80 columns
53- (` --prose-wrap always ` ), while Chinese prose never hard-wraps inside a sentence
54- (` --prose-wrap never ` , one line per paragraph) because CommonMark renders a soft
55- break as a space and CJK text would pick up spurious mid-sentence spaces.
56- Tables, code blocks, and long URLs are exempt; there is no line-length lint,
57- since table rows would trip it .
52+ Prettier formats supported files with a 120-column source width. Markdown
53+ wrapping is bilingual by design (` --embedded-language-formatting=off ` ; code
54+ blocks are hand-formatted) : English prose hard-wraps at 80 columns
55+ (` --prose-wrap always ` ), while Chinese ` *-zh.md ` prose never hard-wraps inside a
56+ sentence (` --prose-wrap never ` , one line per paragraph) because CommonMark
57+ renders a soft break as a space and CJK text would pick up spurious mid-sentence
58+ spaces. Tables, code blocks, and long URLs are exempt; run
59+ ` npm run format:check ` to enforce the repository configuration .
5860
5961## Testing Guidelines
6062
@@ -75,26 +77,27 @@ defaults change. The per-feature docs are bilingual pairs — `docs/<name>.md`
7577(English) and ` docs/<name>-zh.md ` (Chinese) — and both languages are
7678authoritative: update the pair in the same change. Agent-facing references
7779(` templates/AGENTS.md ` , the wdl-deploy skill, generated projects) point only at
78- the English set. Before packaging, re-run the audit, test, and `npm pack
79- --dry-run` checks from Build, Test, and Development Commands.
80+ the English set. Before packaging, re-run the audit, test, and
81+ ` npm pack --dry-run` checks from Build, Test, and Development Commands.
8082
8183## Release
8284
83- Releases are tag-driven. ` .github/workflows/release.yml ` re-runs audit, lint,
84- typecheck, and tests, verifies the tag matches ` version ` in ` package.json ` , and
85- runs ` npm pack --dry-run ` — all before any publish, so a broken release fails the
86- tag's check job and never publishes. It then publishes ` @wdl-dev/cli ` to npmjs
87- (with provenance) and to GitHub Packages (authenticated with the workflow's own
88- ` GITHUB_TOKEN ` ), and creates a GitHub Release for the tag: final releases take
89- their notes from the matching ` CHANGELOG.md ` section, pre-releases fall back to
90- generated notes and are marked Pre-release. Do not run ` npm publish ` by hand.
85+ Releases are tag-driven. ` .github/workflows/release.yml ` re-runs formatting,
86+ audit, lint, typecheck, and tests, verifies the tag matches ` version ` in
87+ ` package.json ` , and runs ` npm pack --dry-run ` — all before any publish, so a
88+ broken release fails the tag's check job and never publishes. It then publishes
89+ ` @wdl-dev/cli ` to npmjs (with provenance) and to GitHub Packages (authenticated
90+ with the workflow's own ` GITHUB_TOKEN ` ), and creates a GitHub Release for the
91+ tag: final releases take their notes from the matching ` CHANGELOG.md ` section,
92+ pre-releases fall back to generated notes and are marked Pre-release. Do not run
93+ ` npm publish ` by hand.
9194
9295Published npm versions are immutable (no reuse; unpublish only within 72 hours),
9396but the check job gates every publish, so most releases tag the final version
9497directly. This project ships documented breaking removals in 1.x minors (called
9598out in the CHANGELOG) — do not hold or re-version a release for generic SemVer
9699reasons. Stage a pre-release only for the narrower risk an RC actually guards:
97- the * published artifact * differing from what the check job validated — packaging
100+ the _ published artifact _ differing from what the check job validated — packaging
98101changes (the ` files ` allowlist, entry points, the bundle/publish pipeline) or a
99102large release you want to smoke-test as a real ` @next ` install. For an RC, set
100103` version ` to e.g. ` 2.0.0-rc.1 ` , write the CHANGELOG entry, commit, and tag
@@ -128,15 +131,15 @@ drops a `.env`-supplied endpoint when the effective token is not from the same
128131` .env ` ), then the global token store (` ~/.config/wdl/credentials ` , managed by
129132` wdl token ` ). The store is trusted (home directory, same-source token +
130133endpoint) and not subject to the guard; a project ` .env ` is not. The namespace
131- itself follows the same shape — `--ns > shell WDL_NS > project .env WDL_NS >
132- store default (base WDL_NS)` — so the store's default namespace is the lowest
133- selector, materialized into ` env.WDL_NS ` before the per-key gap-fill. Keep that
134- ordering and the guard intact when touching ` loadCliControlEnv ` or
135- ` lib/token-store.js ` ; ` --no-token-store ` / ` WDL_TOKEN_STORE=off ` (via
136- ` tokenStoreReader ` , read from the process env, not a project ` .env ` ) must keep
137- opting the store out of resolution entirely. Do not commit tenant tokens or
138- generated secrets; read credentials from the environment and keep example
139- configuration generic.
134+ itself follows the same shape —
135+ ` --ns > shell WDL_NS > project .env WDL_NS > store default (base WDL_NS) ` — so
136+ the store's default namespace is the lowest selector, materialized into
137+ ` env.WDL_NS ` before the per-key gap-fill. Keep that ordering and the guard
138+ intact when touching ` loadCliControlEnv ` or ` lib/token-store.js ` ;
139+ ` --no-token-store ` / ` WDL_TOKEN_STORE=off ` (via ` tokenStoreReader ` , read from
140+ the process env, not a project ` .env ` ) must keep opting the store out of
141+ resolution entirely. Do not commit tenant tokens or generated secrets; read
142+ credentials from the environment and keep example configuration generic.
140143
141144### Deploy runs project code as you
142145
0 commit comments