Skip to content

Change the JavaScript kits to @fastly/js-compute 4.0.1 - #104

Merged
harmony7 merged 5 commits into
mainfrom
kats/js-compute-4.0.1
Oct 15, 2026
Merged

harmony7 merged 5 commits into
mainfrom
kats/js-compute-4.0.1

Conversation

@harmony7

@harmony7 harmony7 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Closes #96.

All 16 JavaScript and TypeScript kits change @fastly/js-compute from ^3.46.0 to
^4.0.1. Dependabot does not propose major version changes, thus this change is manual.

Command: node tools/bump-deps.mts @fastly/js-compute 4.0.1 javascript

After this PR, no kit has the decompress advisory. No kit has more than one copy of
the SDK.

Commits

Commit Change
02d5ceb Change js-compute to ^4.0.1 in 16 kits
2564e80 Update the jco transitive, which removes decompress
5793802 Change typescript-hono to @fastly/hono-fastly-compute 0.4.0
1dc8e62 Repair the openapi-validation build
b4221e1 Change expressly to @fastly/expressly 2.5.0

The js-compute change alone does not remove decompress

js-compute 4.0.1 requires weval ^0.5.1, which does not use decompress. But it also
requires jco ^1.17.9, and npm kept the jco 1.25.2 from each lockfile. jco 1.25.2
requires componentize-js ^0.21.0, which requires weval ^0.4.1. That weval uses
decompress.

npm update @bytecodealliance/jco changes jco to 1.38.0 and componentize-js to 0.23.0.
componentize-js 0.23.0 requires weval ^0.5.0. jco is a transitive dependency, thus
only the lockfiles change. This removes decompress from 14 kits.

Two kits had a different cause. Their wrapper packages had @fastly/js-compute in
dependencies, thus npm installed a second, nested copy of js-compute 3.46.0. That
copy contains the old weval. Both wrappers now have a release that makes js-compute a
peer dependency:

Kit Wrapper Accepts
typescript-hono @fastly/hono-fastly-compute 0.4.0 ^3.33.0 || ^4.0.0
expressly @fastly/expressly 2.5.0 ^3.33.2 || ^4.0.0

The openapi-validation kit does not build on main

This bump is not the cause. Both failures also occur on main with js-compute 3.46.0.

  1. process/browser has no file extension, thus webpack cannot resolve it from a fully
    specified importer. The kit depends on @apidevtools/json-schema-ref-parser, which
    is an ESM package, and ESM modules are fully specified. An explicit extension
    resolves in both types of importer.
  2. output.publicPath has no value, thus webpack writes a runtime that looks for
    document or location. The Compute runtime has neither, and the build stopped at
    Wizer with the message "Automatic publicPath is not supported in this browser". The
    kit serves no assets, thus an empty string is correct.

Commit 1dc8e62 makes these two changes. Without it, this PR cannot pass CI. It also
unblocks PR #103, which has a High severity fix for openapi-backend and fails on the
same kit. Tell me if you prefer a separate PR for this commit.

Tests

I built all 16 kits with Fastly CLI v16.1.0. All 16 kits pass.

I also ran the expressly kit with Viceroy, because a third-party library in this kit
moves to js-compute 4.x. The middleware header, GET /, POST /submit and the 404
response are all correct.

🤖 Generated with Claude Code

harmony7 and others added 4 commits October 15, 2026 13:59
All 16 JavaScript and TypeScript kits move from ^3.46.0 to ^4.0.1.
Done with `node tools/bump-deps.mts @fastly/js-compute 4.0.1 javascript`,
which delegates each change to npm, so the manifest and the lockfile stay
in agreement.

Dependabot caps routine updates at minor and patch, so it does not propose
a major version change. This is that change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The js-compute 4.0.1 bump alone does not remove `decompress`. js-compute
4.0.1 asks for weval ^0.5.1, which no longer uses it, but it also asks for
jco ^1.17.9, and npm kept the jco 1.25.2 that was already in each lockfile.
jco 1.25.2 asks for componentize-js ^0.21.0, which asks for weval ^0.4.1,
which still uses `decompress`.

`npm update @bytecodealliance/jco` in each kit moves jco to 1.38.0 and
componentize-js to 0.23.0, which asks for weval ^0.5.0. This touches
lockfiles only -- jco is a transitive, so no manifest changes.

This clears `decompress` in 14 of the 16 kits. The expressly and
typescript-hono kits keep it for a different reason, through their own
wrapper packages.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Version 0.3.x has `@fastly/js-compute: ^3.0.0` as both a dependency and a
peer dependency, so the move to js-compute 4.0.1 made npm install a second,
nested copy of js-compute 3.46.0 in this kit. That nested copy is what kept
the `decompress` advisory here after the jco refresh.

Version 0.4.0 makes js-compute a peer dependency only, and accepts
`^3.33.0 || ^4.0.0`. The nested copy goes away, and with it `decompress`.

Built locally with the Fastly CLI to make sure 0.4.0 works with js-compute
4.0.1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This kit does not build on main, for two reasons that are independent of
the js-compute bump. Both were confirmed against main with js-compute
3.46.0.

1. `process/browser` has no file extension, so webpack cannot resolve it
   from an importer that is fully specified. One of the kit's own
   dependencies, @apidevtools/json-schema-ref-parser, is an ESM package,
   which makes its modules fully specified. Giving the extension
   (`process/browser.js`) resolves in both kinds of importer.
2. Without `output.publicPath`, webpack writes a runtime that looks for
   `document` or `location` to find the public path. Neither exists in the
   Compute runtime, so the build stopped at Wizer with "Automatic
   publicPath is not supported in this browser". The kit serves no assets,
   so an empty string is correct.

This also unblocks PR #103, which cannot go green while the kit is broken.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@harmony7
harmony7 requested a review from a team as a code owner October 15, 2026 05:08
@harmony7
harmony7 requested a review from kpfleming October 15, 2026 05:08
@harmony7 harmony7 self-assigned this Oct 15, 2026
Version 2.4.0 has `@fastly/js-compute: ^3.7.0` as a real dependency, not a
peer dependency, so the move to 4.0.1 made npm install a second, nested
copy of js-compute 3.46.0. That nested copy kept the `decompress` advisory
in this kit after the jco refresh.

Version 2.5.0 makes js-compute a peer dependency and accepts
`^3.33.2 || ^4.0.0`. The kit now has one copy of the SDK, one copy of
weval, and no `decompress`.

Tested locally with the Fastly CLI: the kit builds, and under Viceroy the
middleware header, `GET /`, `POST /submit` and the 404 fallback all answer
as expected.

With this, all 16 JavaScript kits are free of `decompress`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@harmony7 harmony7 changed the title Move the JavaScript kits to @fastly/js-compute 4.0.1 Change the JavaScript kits to @fastly/js-compute 4.0.1 Oct 15, 2026
@harmony7
harmony7 merged commit 16738c5 into main Oct 15, 2026
23 checks passed
@harmony7
harmony7 deleted the kats/js-compute-4.0.1 branch October 15, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move all JavaScript kits to @fastly/js-compute 4.0.1

2 participants