Skip to content

⬆️ Upgrade www to revolution 0.9 and Effection v4 - #1258

Merged
taras merged 3 commits into
v4from
tm/www-effection-v4
Oct 4, 2026
Merged

taras merged 3 commits into
v4from
tm/www-effection-v4

Conversation

@taras

@taras taras commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Important

Both upstream releases are out: @frontside/revolution@0.9.1 and @effectionx/watch@0.4.8. CI still fails until 2026-10-04 11:34 UTC, when revolution 0.9.1 clears Deno's 24 hour minimum dependency age. Everything below was verified locally against the published packages.

Motivation

The site still ran on Effection v3. Revolution 0.9 is the first release built against v4, so the two have to move together.

Doing it also takes the site off deno.land/x entirely, which was the second half of the ask. Two imports came from there:

  • revolution and revolution/jsx-runtime, pinned at 0.6.1
  • _posixNormalize, an alias for https://deno.land/std@0.203.0/path/_normalize.ts — a private module (leading underscore) of a std release from 2023

Approach

The site's own code did not change

It uses no action() and never passes a promise to call(), so nothing it does changed meaning in v4. The entire diff is www/deno.json plus one import line.

Why not deno.land/x/revolution@0.8.0

0.8.0 runs on whatever effection the consumer supplies, so it would have worked. It is not worth taking: it imports nine bare specifiers, and a remote module resolves those against the workspace root import map rather than www's. Getting it to type-check meant adding a nine-entry scopes block to the repository root to serve one dependency of one workspace member.

Why 0.9.0 could not be used either

@frontside/revolution@0.9.0 cannot be imported at all. It ships 28 bare import statements across nine packages and declares none of them, with nothing vendored:

error: Could not find package '@std/http' from referrer
  .../node_modules/@frontside/revolution/esm/lib/sse.js

Three of those (@std/http, @std/path, esbuild-deno-loader) are JSR-only and have no npm package under that name, so no consumer can supply them. thefrontside/revolution#26 fixes it at the source — a dnt bump that vendors the JSR modules, plus a mapping that keeps effection a genuine peer dependency rather than a second private copy.

@effectionx packages move from jsr to npm

Only the npm builds accept effection@^4; the jsr builds are pinned to ^3.

@effectionx/watch keeps working, on its npm build

Its jsr build is pinned to ^3 and resolves the site's effection through the import map, so deno task dev dies on startup:

failed to start: TypeError: yield* (intermediate value)}(intermediate value) is not iterable

The npm build accepts ^3 || ^4, but publishes no bin:

error: Failed resolving binary export ... did not have a bin property

thefrontside/effectionx#261 declares the bin, released as 0.4.8, so the task stays deno run -A @effectionx/watch deno run -A main.tsx and only the version pin moves.

Verification

Run against the published @frontside/revolution@0.9.1 and @effectionx/watch@0.4.8 from npm, with no local patching. The published revolution tarball matches the candidate exactly: @std and @luca vendored, no vendored effection, dependencies declared.

  • deno check main.tsx — clean
  • deno fmt --check (143 files), deno lint (120 files) — clean
  • deno task test — 10 passed, 29 steps
  • deno task smoke — 7 passed
  • deno task dev — boots, restarts gracefully on a source change, serving again 16s later
  • Every route serves: /, /api, /api/v4/main, /guides/v4/operations, /x/task-buffer, /blog, /AGENTS.md, /llms.txt, /api.md, /blog/feed.xml, /sitemap.xml, and every asset the home page references
  • deno task staticalize — 719 pages, 21 assets, 11.9 MB, zero failures; sitemap.xml and blog/feed.xml parse as well-formed XML and canonical links are intact
  • node_modules holds exactly one effection, resolved from the site, so revolution shares its scopes rather than running a private copy

Note on deno task test

Unrelated to this PR, but worth recording: www/deno.json sets fmt.exclude and lint.exclude for build, but there is no test.exclude. Once the site has run once, deno task test globs the hundreds of *.test.ts files under www/build/clones/ and fails with ~377 type errors. Removing build/ makes it pass. Worth a separate fix.

Revolution 0.9 is the first release built against Effection v4, so the
two move together. It is published to npm, which retires the last
deno.land/x imports the site had: revolution itself, and a private
`std@0.203.0` module aliased as `_posixNormalize`, now the public
`@std/path/posix/normalize`.

The site's own code needs no changes. It uses no `action()` and never
passes a promise to `call()`, so nothing it does changed meaning in v4.

The @effectionx packages move from jsr to npm because only the npm
builds accept `effection@^4`; their jsr builds are pinned to ^3.

`@effectionx/watch` is dropped. Its jsr build is pinned to ^3 and picks
up the site's effection through the import map, so it now fails on
startup, and its npm build publishes no `bin` to run instead. Deno's own
`--watch` restarts the site on a source change, which is all the task
was asking for.
The jsr build is pinned to effection ^3 and resolves the site's effection
through the import map, so it fails on startup against v4. The npm build
accepts ^3 || ^4, but publishes no `bin`, so `deno run -A @effectionx/watch`
cannot find anything to run.

Its CLI is the package's main export, so importing it runs it. A two line
module does that, and the task invokes the module.
@effectionx/watch 0.4.8 declares a `bin`, so the task can invoke the
package instead of a module that imports it for its side effects.
@taras
taras marked this pull request as ready for review October 4, 2026 16:38
@taras taras closed this Oct 4, 2026
@taras taras reopened this Oct 4, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/effection@1258

commit: 98d091a

@codspeed

codspeed Bot commented Oct 4, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing tm/www-effection-v4 (98d091a) with v4 (e3a419f)

Open in CodSpeed

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Deploy Preview Ready!

Effection is a structured concurrency and effects framework for JavaScript.
Effection is a structured concurrency and effects framework for JavaScript.

@taras
taras merged commit 1a440c7 into v4 Oct 4, 2026
23 of 33 checks passed
@taras
taras deleted the tm/www-effection-v4 branch October 4, 2026 16:45

This branch was successfully deployed

1 active deployment
Preview — 98d091ac Deployed Oct 4, 2026 by taras via deploy-preview #1429
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.

2 participants