Skip to content

feat: publish @pgflow/edge-worker to npm with Node/Bun process runtime support#628

Open
jumski wants to merge 1 commit into
portable-worker-process-adapterfrom
portable-worker-npm-build
Open

feat: publish @pgflow/edge-worker to npm with Node/Bun process runtime support#628
jumski wants to merge 1 commit into
portable-worker-process-adapterfrom
portable-worker-npm-build

Conversation

@jumski

@jumski jumski commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

@pgflow/edge-worker is now published to npm alongside the other pgflow packages. Previously it was excluded from npm publishing and only released to JSR.

To support npm distribution, the following changes were made:

  • The TypeScript build target for edge-worker is now active, compiling sources to dist/ via @nx/js:tsc
  • Import paths updated from .ts to .js extensions for compatibility with compiled output
  • Replaced the @std/crypto/timing-safe-equal Deno dependency with an inline timingSafeEqualBytes implementation, removing the Deno-specific dependency and enabling Node/Bun compatibility
  • globalThis.crypto access updated to avoid TypeScript strict-mode errors in non-browser environments
  • TypeScript config updated to include es2022, dom, and dom.iterable libs
  • A smoke test script (scripts/smoke-edge-worker-dist.mjs) was added to verify the built dist/ exports are valid before publishing
  • The validate:publish:npm and publish:npm scripts now include edge-worker and run the smoke test as part of the publish flow

@changeset-bot

changeset-bot Bot commented Jun 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 32e76c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@pgflow/core Minor
@pgflow/dsl Minor
@pgflow/client Minor
@pgflow/edge-worker Minor
pgflow Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

jumski commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@nx-cloud

nx-cloud Bot commented Jun 7, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 32e76c9

Command Status Duration Result
nx run edge-worker:test:integration ✅ Succeeded 4m 27s View ↗
nx run client:e2e ✅ Succeeded 1m 15s View ↗
nx run edge-worker:e2e ✅ Succeeded 37s View ↗
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 3s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 3s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 25s View ↗
nx run core:pgtap ✅ Succeeded 1m 50s View ↗
nx run cli:e2e ✅ Succeeded 3s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-06-08 18:35:41 UTC

@jumski jumski force-pushed the portable-worker-process-adapter branch from 3cb8c81 to efd6d99 Compare June 8, 2026 17:50
@jumski jumski force-pushed the portable-worker-npm-build branch from ff59b77 to dd04543 Compare June 8, 2026 17:50
@jumski jumski force-pushed the portable-worker-process-adapter branch from efd6d99 to 6b47ef1 Compare June 8, 2026 18:08
@jumski jumski force-pushed the portable-worker-npm-build branch from dd04543 to be382bd Compare June 8, 2026 18:08
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