Skip to content

Add Node/PNPM monorepo support for effectionx extensions#1083

Merged
cowboyd merged 4 commits intov4from
fix-node-x
Jan 20, 2026
Merged

Add Node/PNPM monorepo support for effectionx extensions#1083
cowboyd merged 4 commits intov4from
fix-node-x

Conversation

@taras
Copy link
Copy Markdown
Member

@taras taras commented Jan 20, 2026

Motivation

The effectionx repository was migrated from Deno to Node/PNPM monorepo structure. The website was hardcoded to read deno.json files for package metadata, which no longer works since effectionx now uses package.json and pnpm-workspace.yaml.

Additionally, effectionx packages are no longer published to JSR, so the JSR API calls were failing and causing inconsistent display on the /x pages.

Approach

New Monorepo Adapter

Created a new package/workspace abstraction that supports both Deno and Node/PNPM monorepos:

  • lib/workspaces/ - Auto-detects monorepo type by checking for deno.json vs pnpm-workspace.yaml
  • lib/package/ - Package representation for both Deno and Node projects, reading from respective manifest files
  • lib/registries/ - Registry abstractions for npm (JSR kept for potential future use)

Key implementation details:

  • Parse Node package.json exports with conditional export support (uses development condition for source files)
  • Filter hidden packages (e.g., .internal) from listings
  • Sanitize semver OR ranges (e.g., ^3 || ^4) for Deno npm: specifiers

JSR Removal

  • Removed getJSRDetails() calls - now uses local package manifest data for name/description
  • Removed JSR badge from package headers (kept npm badge only)
  • Deleted ScoreCard component (was entirely JSR-focused)
  • Cleaned up unused JSR-specific types

taras added 4 commits January 19, 2026 18:45
Implement a new package/workspace abstraction that supports both Deno
and Node/PNPM monorepos, enabling the website to read package metadata
from effectionx which has migrated from Deno to Node/PNPM.

New modules:
- lib/registries/ - Registry abstractions for JSR and npm
- lib/package/ - Package representation for Deno and Node projects
- lib/workspaces/ - Workspace detection and package enumeration

Key changes:
- Auto-detect workspace type (deno.json vs pnpm-workspace.yaml)
- Parse Node package.json exports with conditional export support
- Filter hidden packages (e.g., .internal) from listings
- Update routes and components to use new useWorkspaces API
- Add @std/yaml dependency for parsing pnpm-workspace.yaml
Since effectionx packages are no longer published to JSR, remove all
JSR-related fetching and display from the extensions pages.

Changes:
- Remove getJSRDetails() calls, use package manifest data instead
- Remove JSR badge from package headers (keep npm badge only)
- Delete ScoreCard component (was entirely JSR-focused)
- Remove JSR properties from Package interface
- Clean up unused imports and JSR-specific types
Package.json peerDependencies can use OR ranges like '^3 || ^4' which
are not valid in Deno npm: specifiers. Sanitize version strings by
taking the first part of OR ranges.

Also handle workspace: protocol versions by converting to '*'.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jan 20, 2026

Open in StackBlitz

npm i https://pkg.pr.new/thefrontside/effection@1083

commit: 7fe634d

@cowboyd
Copy link
Copy Markdown
Member

cowboyd commented Jan 20, 2026

Why do we need a Deno abstraction?

@taras
Copy link
Copy Markdown
Member Author

taras commented Jan 20, 2026

We still use demo for effection and I didn't want to completely get rid of the deno integration in case we decide to use deno again. They might fix all of the problems tomorrow and who knows.

@cowboyd
Copy link
Copy Markdown
Member

cowboyd commented Jan 20, 2026

We still use demo for effection and I didn't want to completely get rid of the deno integration in case we decide to use deno again. They might fix all of the problems tomorrow and who knows.

I'm of two minds here. I would love the ability to go back to Deno, but but until then, this is dead code sitting in our repo, right? If we keep the API, and just have one implementation, that should be enough. I'd rather let the api evolve with our needs according to what we need for the website, and not be burdened by having to keep one foot in each world.

@taras
Copy link
Copy Markdown
Member Author

taras commented Jan 20, 2026

Sounds good

Copy link
Copy Markdown
Member

@cowboyd cowboyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to go ahead and pre-approve this so that we can move forward. I'll leave whether or not to remove the Deno package api up to you because I can see both ways really. It shouldn't be a blocker

@cowboyd cowboyd merged commit b162d38 into v4 Jan 20, 2026
15 checks passed
@cowboyd cowboyd deleted the fix-node-x branch January 20, 2026 19:51
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