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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ real interface and feature state
Pin Direct as a development dependency:

```sh
bun add --dev @hraness/direct@0.7.7
bun add --dev @hraness/direct@0.7.8
# or
npm install --save-dev @hraness/direct@0.7.7
npm install --save-dev @hraness/direct@0.7.8
```

Keep Direct in `devDependencies`. A production entry must not import Direct,
Expand Down Expand Up @@ -87,7 +87,7 @@ Copy this prompt into Codex, Claude Code, or another coding agent:

```text
Use $direct to install hraness/direct from
the npm registry at the exact 0.7.7 version. Follow the repository README, add
the npm registry at the exact 0.7.8 version. Follow the repository README, add
`@hraness/direct` to devDependencies only, and verify that the production
dependency graph excludes Direct. Do not add a fixture composition until I
ask.
Expand All @@ -103,7 +103,7 @@ Pin the public npm package to an exact immutable version:
```json
{
"devDependencies": {
"@hraness/direct": "0.7.7"
"@hraness/direct": "0.7.8"
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ cookie, one-time password, recovery code, or write token to GitHub.
`v<package.json version>`.

```sh
git tag v0.7.7
git push origin refs/tags/v0.7.7
git tag v0.7.8
git push origin refs/tags/v0.7.8
```

3. Wait for **Release**. The workflow runs these boundaries in order:
Expand Down Expand Up @@ -123,7 +123,7 @@ Merge the fix to `main`, then dispatch **Release** from current `main` with
the exact existing stable tag:

```sh
gh workflow run release.yml --ref main -f tag=v0.7.7
gh workflow run release.yml --ref main -f tag=v0.7.8
```

The recovery path skips npm publication. It accepts only the newest stable
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hraness/direct",
"version": "0.7.7",
"version": "0.7.8",
"description": "A TypeScript harness for deterministic frontend development with repeatable scenarios, local fixtures, and browser verification for coding agents.",
"license": "MIT",
"type": "module",
Expand Down
26 changes: 13 additions & 13 deletions scripts/npm-publish-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ describe("npm release workflows", () => {
readonly version?: unknown;
};
expect(manifest).toEqual(expect.objectContaining({
version: "0.7.7",
version: "0.7.8",
description: "A TypeScript harness for deterministic frontend development with repeatable scenarios, local fixtures, and browser verification for coding agents.",
keywords: [
"frontend-development",
Expand Down Expand Up @@ -357,7 +357,7 @@ describe("npm release workflows", () => {
const binaryDirectory = join(directory, "bin");
const commandLog = join(directory, "commands.log");
const publishMarker = join(directory, "published.txt");
const tarball = join(directory, "hraness-direct-0.7.7.tgz");
const tarball = join(directory, "hraness-direct-0.7.8.tgz");
const metadata = join(directory, "npm-pack.json");
const digest = join(directory, "npm-package.sha256");
const sourceSha = "b".repeat(40);
Expand All @@ -375,7 +375,7 @@ describe("npm release workflows", () => {
writeFile(metadata, "reviewed metadata fixture\n", "utf8"),
writeFile(digest, "reviewed digest fixture\n", "utf8"),
]);
await writeFile(gitStub, `#!/bin/bash\nset -euo pipefail\nprintf 'git %s\\n' "$*" >> "$COMMAND_LOG"\ncase "$*" in\n *"rev-parse refs/heads/main"*) printf '%s\\n' "$DEFAULT_SHA" ;;\n *"rev-parse refs/tags/v0.7.7^{commit}"*) printf '%s\\n' "$TAG_SHA" ;;\n *"merge-base --is-ancestor"*) [[ "$ANCESTRY_STATE" == ancestor ]] ;;\n *"tag --list v*"*) printf '%s\\n' "$REMOTE_TAGS" ;;\nesac\n`, "utf8");
await writeFile(gitStub, `#!/bin/bash\nset -euo pipefail\nprintf 'git %s\\n' "$*" >> "$COMMAND_LOG"\ncase "$*" in\n *"rev-parse refs/heads/main"*) printf '%s\\n' "$DEFAULT_SHA" ;;\n *"rev-parse refs/tags/v0.7.8^{commit}"*) printf '%s\\n' "$TAG_SHA" ;;\n *"merge-base --is-ancestor"*) [[ "$ANCESTRY_STATE" == ancestor ]] ;;\n *"tag --list v*"*) printf '%s\\n' "$REMOTE_TAGS" ;;\nesac\n`, "utf8");
await writeFile(sha256Stub, `#!/bin/bash\nset -euo pipefail\nprintf 'sha256sum %s\\n' "$*" >> "$COMMAND_LOG"\ncase "$1" in\n "$TARBALL") value="$EXPECTED_ARCHIVE_SHA256" ;;\n "$METADATA") value="$EXPECTED_METADATA_SHA256" ;;\n "$DIGEST") value="$EXPECTED_DIGEST_SHA256" ;;\n *) echo "unexpected hash target: $1" >&2; exit 1 ;;\nesac\nprintf '%s %s\\n' "$value" "$1"\n`, "utf8");
await writeFile(npmStub, `#!/bin/bash\nset -euo pipefail\nprintf 'npm %s\\n' "$*" >> "$COMMAND_LOG"\nif [[ "\${1-}" == view ]]; then\n printf '%s\\n' "$PUBLISHED_VERSIONS_JSON"\n exit 0\nfi\nprintf 'published\\n' > "$PUBLISH_MARKER"\n`, "utf8");
await Promise.all([chmod(gitStub, 0o755), chmod(npmStub, 0o755), chmod(sha256Stub, 0o755)]);
Expand All @@ -391,15 +391,15 @@ describe("npm release workflows", () => {
EXPECTED_DIGEST_SHA256: digestSha256,
EXPECTED_METADATA_SHA256: metadataSha256,
EXPECTED_SOURCE_SHA: sourceSha,
EXPECTED_VERSION: "0.7.7",
GITHUB_REF: "refs/tags/v0.7.7",
EXPECTED_VERSION: "0.7.8",
GITHUB_REF: "refs/tags/v0.7.8",
GITHUB_REPOSITORY: "hraness/direct",
GITHUB_SHA: sourceSha,
METADATA: metadata,
PATH: `${binaryDirectory}:${process.env.PATH ?? ""}`,
PUBLISHED_VERSIONS_JSON: '["0.7.4","0.7.5","0.7.6"]',
PUBLISHED_VERSIONS_JSON: '["0.7.4","0.7.5","0.7.6","0.7.7"]',
PUBLISH_MARKER: publishMarker,
REMOTE_TAGS: "v0.7.4\nv0.7.5\nv0.7.6\nv0.7.7",
REMOTE_TAGS: "v0.7.4\nv0.7.5\nv0.7.6\nv0.7.7\nv0.7.8",
RUNNER_TEMP: directory,
TAG_SHA: sourceSha,
TARBALL: tarball,
Expand Down Expand Up @@ -430,7 +430,7 @@ describe("npm release workflows", () => {
});
expect(moved.exitCode).not.toBe(0);
expect(`${moved.stdout}${moved.stderr}`).toContain(
"Tag v0.7.7 changed after artifact verification",
"Tag v0.7.8 changed after artifact verification",
);
expect(await Bun.file(publishMarker).exists()).toBe(false);

Expand All @@ -441,30 +441,30 @@ describe("npm release workflows", () => {
});
expect(detached.exitCode).not.toBe(0);
expect(`${detached.stdout}${detached.stderr}`).toContain(
"Tag v0.7.7 is no longer reachable from main",
"Tag v0.7.8 is no longer reachable from main",
);
expect(await Bun.file(publishMarker).exists()).toBe(false);

await rm(commandLog, { force: true });
const superseded = await runWorkflowScript(script, {
...baseEnvironment,
REMOTE_TAGS: "v0.7.4\nv0.7.5\nv0.7.6\nv0.7.7\nv0.7.8",
REMOTE_TAGS: "v0.7.4\nv0.7.5\nv0.7.6\nv0.7.7\nv0.7.8\nv0.7.9",
});
expect(superseded.exitCode).not.toBe(0);
expect(`${superseded.stdout}${superseded.stderr}`).toContain(
"Tag v0.7.7 is not the newest stable tag v0.7.8",
"Tag v0.7.8 is not the newest stable tag v0.7.9",
);
expect(await readFile(commandLog, "utf8")).not.toContain("npm publish");
expect(await Bun.file(publishMarker).exists()).toBe(false);

await rm(commandLog, { force: true });
const staleVersion = await runWorkflowScript(script, {
...baseEnvironment,
PUBLISHED_VERSIONS_JSON: '["0.7.4","0.7.8"]',
PUBLISHED_VERSIONS_JSON: '["0.7.4","0.7.9"]',
});
expect(staleVersion.exitCode).not.toBe(0);
expect(`${staleVersion.stdout}${staleVersion.stderr}`).toContain(
"@hraness/direct@0.7.7 is not newer than published stable 0.7.8",
"@hraness/direct@0.7.8 is not newer than published stable 0.7.9",
);
expect(await Bun.file(publishMarker).exists()).toBe(false);

Expand Down
6 changes: 3 additions & 3 deletions skills/direct/references/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ global `direct` CLI.
For a new installation, pin the reviewed public release:

```sh
bun add --dev @hraness/direct@0.7.7
bun add --dev @hraness/direct@0.7.8
# or, in an npm project
npm install --save-dev @hraness/direct@0.7.7
npm install --save-dev @hraness/direct@0.7.8
```

The equivalent manifest entry is:

```json
{
"devDependencies": {
"@hraness/direct": "0.7.7"
"@hraness/direct": "0.7.8"
}
}
```
Expand Down