feat: publish framework-agnostic entrypoints - #166
Merged
Conversation
Triggers the semantic-release pipeline to ship the unreleased work sitting on main since v5.0.0: - 736b0b0 Framework-agnostic entrypoints: /core, /tanstack, /next, /node (#164) - 014f8d9 / 95d1f03 chore(migrate): align scaffold + skill with CF-native observability PR #164 introduced the /core, /tanstack, /next, and /node import paths, which is a minor-bump feature surface that never got published because none of the merge commits since v5.0.0 used a release-triggering conventional-commit prefix. Also reverts package.json back to 5.0.0 — semantic-release owns the version field via @semantic-release/exec's prepareCmd (npm version <next> --no-git-tag-version), and PR #165's manual bump to 5.1.0 caused the npm publish step to error with "Version not changed" on the next release-worthy push. Net effect when this merges to main: semantic-release sees a feat: commit since v5.0.0 → computes nextRelease v5.1.0 → npm version 5.1.0 succeeds (package.json is 5.0.0) → publishes @decocms/start@5.1.0 to npm → tags v5.1.0 → moves the v5 floating tag forward Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 5.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
7 tasks
vibe-dex
added a commit
that referenced
this pull request
May 19, 2026
Reverts the full chain of commits introduced in PRs #164, #165, #166, #167, #170, #174, #175, #176, #177 plus the two semantic-release auto commits (5.1.0, 5.1.1). Root cause: PR #164 (Framework-agnostic entrypoints: /core, /tanstack, /next, /node) repointed package.json exports from src/ to dist/ and split the framework into multiple bundle chunks via tsup. This is correct in principle, but the tsup output produces a separate copy of every module per entry tier. Files with module-level mutable state (let foo = ..., new Map(), new Set() at top level) end up with one copy per dist entry, so writes through one export resolve a different copy than reads through another export. Symptoms observed on @decocms/start@5.1.0+ and 5.3.0-rc.0/rc.1: - GET/POST /deco/invoke/site/loaders/<any-site-loader> → 404 "Unknown handler: site/loaders/<name>" despite the loader being correctly emitted into site/server/cms/loaders.gen.ts and registered via setInvokeLoaders() in setup.ts. The site's setup.ts mutates the getRegisteredLoaders closure inside dist/core/admin/index.js, while handleInvoke (mounted on the catch-all route) reads getRegisteredLoaders from a different copy of invoke.ts bundled into dist/tanstack/routes/index.js — which still holds the default () => ({}). - OTel direct-POST channels silently dropped (metrics + error logs) — same pattern in src/core/sdk/observability.ts and src/core/sdk/logger.ts. Partially fixed on the fix/o11y-shared-state-singleton branch (the rc.1 work) but the fix never covered invoke.ts handler registry. PR #167 patched two other #164 regressions (CLI scripts dropped from the tsup entries, ESM bundle wrapping require() in a broken __require shim) and PR #166 finalized the publish surface — both strictly downstream of #164. #174 (router preload options) and #170/#175/ #176/#177 (CI / release machinery) build on the same foundation. Path forward: A future re-attempt at framework-agnostic entrypoints must (a) emit a single shared bundle for the admin/invoke handler registry, the observability state, and any other module-level mutable state, or (b) hoist that state onto a globalThis-keyed singleton from the start, with a CI guard that fails any new module-level mutable state inside src/core/. This revert intentionally takes us back to the single-bundle src/-exports world where the bug is latent but inert. Verification: - npm run build → succeeds against the pre-#164 source layout - On a casaevideo build pinned to a snapshot from this revert, POST /deco/invoke/site/loaders/adressByCep returns 500 ("Cannot read properties of undefined (reading 'replace')" from the loader body, not a 404) — i.e. the registry contains the handler again, matching v5.0.0 behaviour. This is the working-baseline state. Re-landing #174's preload options on top of the restored src/ layout is a follow-up. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why this is needed
Since v5.0.0, three merges have landed on main without a release-triggering conventional-commit prefix:
PR #164 introduced the `/core`, `/tanstack`, `/next`, `/node` import paths — a new feature surface that warrants a minor bump but never reached npm.
What happens when this merges
Test plan
🤖 Generated with Claude Code
Summary by cubic
Publishes the previously merged framework-agnostic entrypoints (
/core,/tanstack,/next,/node) as@decocms/start@5.1.0via semantic-release. Setspackage.jsonback to5.0.0so the@semantic-release/execprepare step can bump and publish cleanly.Written for commit 5bad99b. Summary will update on new commits.