Generate CommonJS provider values and shrink deps.ts #229
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#229
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Phase 10 of the original dual ESM/CJS loader plan called for shrinking
packages/workspace/src/lib/deps.tsto generated compatibility data andexplicit legacy overrides. The current resolver uses generated provider
metadata, but it still imports a large manual
deps.tsobject for actualCommonJS provider values. That means adding or changing official plugin
dependencies can still require manual workspace dependency-map edits.
Goal
Move CommonJS provider value generation to a single catalogue/config source so
official plugin dependencies do not require expanding the manual
deps.tsobject.
Scope
clearly documented adjacent config used by
pnpm plugin-host:check.cases.
values and legacy overrides without depending on a broad manual
deps.tsmap.
transition behavior.
Non-goals
still rely on supported CommonJS host modules.
Acceptance Criteria
packages/workspace/src/lib/deps.tsno longer contains the large manual listof official CommonJS dependency imports.
source and regenerating derived provider artifacts, not hand-editing
workspace dependency maps.
audit.
pnpm plugin-host:checkvalidates the generated provider metadata and thegenerated provider values stay in sync.
legacy overrides.
deps.ts, are the current source of truth.Implementation Notes
packages/workspace/src/lib/plugin-runtime/workspace-plugin-dependency-resolver.tsand the generated provider metadata before deciding where generated value
artifacts should live.
a stale-generation failure path.
Suggested Files or Specs To Inspect
spec/src/30-cross-package-contracts/plugin-runtime.mdpackages/workspace/src/lib/deps.tspackages/workspace/src/lib/plugin-runtime/workspace-plugin-dependency-resolver.tspackages/workspace/src/lib/plugin-runtime/generated-plugin-commonjs-providers.tspnpm plugin-host:checkpackages/api/src/lib/plugin-distribution/runtime-validation.tsValidation Commands
pnpm plugin-host:checkpnpm --filter @lapis-notes/workspace check:allpnpm --filter @lapis-notes/api check:allmake spec-lintmdbook build specRelated Issues
Follow-up Tasks
Implementation Summary
Generated CommonJS provider values from the host-module catalogue, shrank deps.ts to explicit legacy/private overrides and browser fallbacks, updated the workspace resolver and generator checks, and added resolver/spec coverage.