Skip to content

chore(vscode-extension): un-vendor affine-vscode (Refs hyperpolymath/affinescript#104)#66

Merged
hyperpolymath merged 1 commit into
mainfrom
feat-104-unvendor-affine-vscode
May 21, 2026
Merged

chore(vscode-extension): un-vendor affine-vscode (Refs hyperpolymath/affinescript#104)#66
hyperpolymath merged 1 commit into
mainfrom
feat-104-unvendor-affine-vscode

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

  • Replace the 141-line in-tree copy of vscode-extension/src/affine-vscode-adapter.cjs with a require("@hyperpolymath/affine-vscode") against the published npm package.
  • Drop the --vscode-extension-adapter=../src/affine-vscode-adapter.cjs override from the compile and vscode:prepublish scripts so the AffineScript codegen default (@hyperpolymath/affine-vscode) takes over.
  • out/extension.cjs line 101 hand-edited from require("../src/affine-vscode-adapter.cjs")require("@hyperpolymath/affine-vscode"). This matches what affinescript compile --vscode-extension will regenerate next time npm run vscode:prepublish runs after the npm package is live. The line is --vscode-extension auto-generated glue — see the "Inserted by --vscode-extension" comment block above it in the file.

DRAFT — gated on hyperpolymath/affinescript#104

This PR cannot be marked ready-for-review until the package is on npm. Current state of affinescript#104:

Acceptance criterion Status
package.json shape, peer deps, repository.directory ✅ on affinescript/main
CI tag-driven publish affine-vscode-publish.yml on affinescript/main
README documents npm-install as primary ✅ on affinescript/main (tightened in hyperpolymath/affinescript#316)
npm view @hyperpolymath/affine-vscode resolves ❌ owner action: create npm org hyperpolymath, add NPM_TOKEN secret to affinescript repo, push tag affine-vscode-v0.1.0
my-lang + standards un-vendored 🟡 this PR (DRAFT) + companion DRAFT in hyperpolymath/standards

Test plan

After hyperpolymath/affinescript#104 lands the first publish:

  • npm install in vscode-extension/ resolves the new dep
  • npm run compile regenerates out/extension.cjs to a file byte-identical (or only-difference whitespace) to what's currently committed in this branch
  • vsce package produces a working .vsix and the extension activates in a fresh VS Code instance
  • Mark this PR ready-for-review, then merge

🤖 Generated with Claude Code

…olymath/affinescript#104)

Replace the in-tree copy of `vscode-extension/src/affine-vscode-adapter.cjs`
(141-line copy of `packages/affine-vscode/mod.js` in hyperpolymath/affinescript)
with the published `@hyperpolymath/affine-vscode` npm package.

Concrete edits:

  * package.json: add `@hyperpolymath/affine-vscode@^0.1.0` to `dependencies`;
    drop `--vscode-extension-adapter=../src/affine-vscode-adapter.cjs` from
    `compile` + `vscode:prepublish` scripts so the codegen default kicks in.
  * src/affine-vscode-adapter.cjs: deleted (was a verbatim copy of the
    upstream mod.js as of bindings PR #102).
  * out/extension.cjs line 101 hand-edited: `require("../src/affine-vscode-adapter.cjs")`
    → `require("@hyperpolymath/affine-vscode")`. This matches what
    `affinescript compile --vscode-extension` will regenerate on first
    `npm run vscode:prepublish` after the package is on npm — the line is
    auto-generated glue (see "Inserted by --vscode-extension" comment above
    it), and the only difference is the bare specifier vs the relative path.

# DRAFT — gated on hyperpolymath/affinescript#104 (npm first publish)

Do NOT merge until `npm view @hyperpolymath/affine-vscode` resolves. Until then
`npm install` here will 404. The PR is staged so the diff is reviewable in
isolation from the publish step.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath marked this pull request as ready for review May 21, 2026 00:17
@hyperpolymath hyperpolymath merged commit a4ba3b8 into main May 21, 2026
0 of 12 checks passed
@hyperpolymath hyperpolymath deleted the feat-104-unvendor-affine-vscode branch May 21, 2026 00:17
hyperpolymath added a commit to hyperpolymath/standards that referenced this pull request May 21, 2026
…ath/affinescript#104) (#160)

## Summary

- Replace the 463-line in-tree copy of
`rsr-certifier/extensions/vscode/src/affine-vscode-adapter.cjs` with a
`require("@hyperpolymath/affine-vscode")` against the published npm
package.
- `src/index.cjs` line 18 swap + accompanying comment-block update.
- `out/extension.cjs` is unchanged — this extension uses the
manual-wiring pattern (`src/index.cjs` as the extension's `main`), so
only the hand-written entry-point needs touching, not the
AffineScript-compiled wasm shim.

## DRAFT — gated on hyperpolymath/affinescript#104

This PR cannot be marked ready-for-review until the package is on npm.
Current state of affinescript#104:

| Acceptance criterion | Status |
|---|---|
| `package.json` shape, peer deps, `repository.directory` | ✅ on
`affinescript/main` |
| CI tag-driven publish | ✅ `affine-vscode-publish.yml` on
`affinescript/main` |
| README documents npm-install as primary | ✅ on `affinescript/main`
(tightened in hyperpolymath/affinescript#316) |
| `npm view @hyperpolymath/affine-vscode` resolves | ❌ owner action:
create npm org `hyperpolymath`, add `NPM_TOKEN` secret to affinescript
repo, push tag `affine-vscode-v0.1.0` |
| my-lang + standards un-vendored | 🟡 **this PR** (DRAFT) + companion
DRAFT in hyperpolymath/my-lang#66 |

## Test plan

After hyperpolymath/affinescript#104 lands the first publish:

- [ ] `npm install` in
`rhodium-standard-repositories/satellites/rsr-certifier/extensions/vscode/`
resolves the new dep
- [ ] Loading the extension in a fresh VS Code instance: `activate` runs
without error, `rsr.checkCompliance` is registered, `deactivate` tears
down cleanly
- [ ] Mark this PR ready-for-review, then merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant