ReviewOS

stacks/stx

The stx VS Code extension declares the same marketplace ID as the Stacks extension

#2020
Closed chris opened this 9 days ago ·
9 days ago

`packages/vscode/package.json` declares `Stacks.vscode-stacks`, which is also the ID of the Stacks framework extension published from stacksjs/stacks (`storage/framework/defaults/ide/vscode`). The marketplace currently holds that ID at 0.75.40, from Stacks. An stx publish (0.2.x) is therefore either rejected as a version downgrade or, at a higher version, replaces the Stacks extension for everyone who installed it.

They are different extensions: this one is the `.stx` language support, and the Stacks one is the framework pack plus its commands (preview, dev server, buddy commands; stacksjs/stacks#451). The stx extension needs its own ID, for example `Stacks.vscode-stx`, and the Stacks pack can then list it in `extensionPack` so Stacks users still get it.

Found while making the Stacks extension a real extension.

9 days ago

Fixed, and the scope grew a little along the way.

stx (cba2093, e46783d, released in v0.2.351 / v0.2.352)

  • The extension is now Stacks.vscode-stx ("stx Language Support"). A test pins the ID and checks it differs from Stacks.vscode-stacks.
  • Removed the 62 Stacks.* settings, which nothing read (copied from a Laravel extension), and stx.setLanguageMode, which nothing registered.
  • engines.vscode was ^1.999.0, from an automated bump, so no editor could install it. It is back to ^1.109.0, with @types/vscode pinned to the same floor and excluded from buddy-bot.
  • The language support is also published as @stacksjs/stx-vscode, built from the same source. The Stacks extension builds it in. When both are installed, this extension stands down whenever the Stacks extension's activate resolves to { stx: { active: true } }.
  • Found by running it in a real VS Code: the bundle did not load on Node at all, because bunfig's import.meta was bundled in through @stacksjs/ts-css. That is fixed in ts-css 0.3.7, and a test now parses the bundle as CommonJS. Separately, the semantic tokenizer looped forever on any or @directive('x') line.
  • .github/workflows/vscode-extension.yml publishes the vsix on each release tag.

Stacks (stacksjs/stacks 8bb7499, released as v0.75.42)

  • Stacks.vscode-stacks no longer installs an extension pack or depends on any other extension. stx support, pickier (lint, format, fix-all) and env files (decrypted hovers, missing keys, buddy env:*) are built in.

Still needed: Stacks.vscode-stx is not on the Marketplace yet, because this repository has no VSCE_PAT secret. Once the token for the Stacks publisher is added here, run gh workflow run vscode-extension.yml --repo stacksjs/stx to publish it.

Sign in to comment on this issue.