[loader] Pilot first-party dual ESM/CJS plugin builds #220
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#220
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
The official plugin build and release path currently assumes CommonJS-style plugin artifacts. The ESM-first loader needs at least one first-party plugin to publish
main.mjswith a CommonJS fallback where useful.Goal
Pilot first-party dual ESM/CommonJS plugin builds and manifest metadata before migrating larger official plugins.
Scope
main.mjsandmain.jswhere appropriate.lapis.runtime.entries.workspacemetadata with format, fallbackPath, sharedDependencies, and reload requirements.Non-goals
Acceptance Criteria
Implementation Notes
Active Implementation Plan
@lapis-notes/telemetry/lapis-telemetryas the pilot because it is already an official registry-installable first-party plugin and is smaller than Docs.dist/main.mjsfor the ESM artifact while keepingdist/main.jsas the CommonJS fallback and preserving existing package exports.main.mjsfile.lapis.runtime.entries.workspacemetadata to the Telemetry manifest withformat,fallbackPath,sharedDependencies, andrequiresReloadOnUpdate.main.mjsbeside requiredmain.js.Affected Packages and Files
packages/plugins/plugin-telemetry/vite.config.tspackages/plugins/plugin-telemetry/package.jsonpackages/plugins/plugin-telemetry/manifest.jsonpackages/plugins/plugin-telemetry/src/telemetry-plugin.tspackages/plugins/plugin-telemetry/spec.mdpackages/api/src/lib/__tests__/plugin-runtime-entry.test.tsspec/src/20-packages/plugins/telemetry/index.mdscripts/plugin-release.test.mjsscripts/publish-official-plugin-assets.test.mjsspec/src/30-cross-package-contracts/plugin-registry.mdspec/src/30-cross-package-contracts/plugin-runtime.mdSuggested Files or Specs To Inspect
spec/src/20-packages/plugins/index.mdspec/src/50-roadmap/full-registry-v1.mdpackages/plugins/plugin-*/scripts/Validation Commands
pnpm plugin-host:checkpnpm --filter <pilot-package> check:allpnpm check:allRelated Issues
Follow-up Tasks
Implementation Summary
Implemented the Telemetry dual ESM/CommonJS official plugin pilot, including main.mjs output, CommonJS fallback metadata, generated shared-external validation, release artifact coverage, and registry/runtime spec updates.