Commit e511fac
fix(cli): restore a publishable manifest and a real bin entry point (#727)
The compiler shim has been **unpublishable and uninstallable as a CLI**.
Two gaps, both fixed here.
## 1. No manifest
`packages/affinescript-cli/` ships `mod.js`, `pins.js`, `mod_test.js`
and `mod.d.affine` — but **no `package.json`, `jsr.json` or
`deno.json`**, and git history shows one was never committed.
The shim is live on JSR as `@hyperpolymath/affinescript` **0.1.2**, so
it was published from an untracked manifest and **cannot be republished
from a clean checkout**. `pins.js` even instructs the maintainer to
*"bump THIS package's `deno.json` version in lockstep"* — with a file
that is not in the tree.
## 2. No `bin` entry
**Nothing in this repository declares a `bin` field**, so nothing
installs as an `affinescript` command. `mod.js` self-executes when it is
the entry module but carries no hashbang, so it cannot be a `bin` target
on Unix.
`bin/affinescript.js` adds the hashbang and delegates to `mod.js`'s
exported `run()`. No behaviour moves.
## Verified, not assumed
```
bun bin/affinescript.js --version → resolves, verifies, execs, prints a version
node bin/affinescript.js --version → same
```
Both resolve the pinned release binary, check its SHA-256, cache it, and
exec it.
## Why `package.json` and not `deno.json`
Deno is being removed estate-wide per the 2026-08-26 owner ruling
(#655). The manifest is npm-compatible, so **Bun, npm and Node all
consume it**. Version `0.1.2` matches what is already on JSR — same
code, same version, two registries.
## Found while testing — flagged, not silently fixed
The shim resolves the **v0.1.1** release binary, but that binary
**self-reports `0.1.0`**, while `dune-project` and `lib/version.ml` both
say `0.1.1`. The v0.1.1 release was cut before the version bump landed.
## Still open — needs a fresh tag
**`v0.2.0` has zero release assets.** Root cause is in the run logs:
```
HTTP 422: Cannot upload assets to an immutable release
```
The release was published *before* the build legs uploaded.
`release.yml` has **already been fixed** for exactly this (create as
draft → upload → publish last, sealing atomically) — but **that fix has
never been exercised**. v0.2.0 is immutable and cannot be repaired
retroactively; it needs a new tag to run the corrected workflow.
## Scope note
This makes AffineScript installable. It does **not** unblock the 18
estate repos whose `deno.json` files request `affinescript@^12.0.0` —
that version has never existed, the CLI has no `build`/`clean`/`-w`
subcommands, and it rejects `.res` input outright (demonstrated: a real
estate `.res` file gives `parse error`). Those repos need their sources
ported. Full analysis: standards#658.
---------
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>1 parent 09e92de commit e511fac
2 files changed
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments