Skip to content

Enable spec publishing to NPM - #25

Merged
bcdxn merged 2 commits into
mainfrom
feature/npm-spec-pkg
Sep 22, 2026
Merged

bcdxn merged 2 commits into
mainfrom
feature/npm-spec-pkg

Conversation

@bcdxn

@bcdxn bcdxn commented Sep 22, 2026

Copy link
Copy Markdown
Owner

publish a spec-only package to NPM to support downstream packages that rely on the OpenCLI specification. On publish, the canonical spec is copied from the root of the opencli repo to the npm/specification package directory. The version of the package is determined by the git tag that triggers the workflow (and verified to match the version within the JSON schema)

Published NPM packages for OpenCLI can be found at: https://www.npmjs.com/package/@openclidev/specification

@bcdxn
bcdxn requested a lite review from Copilot September 22, 2026 17:22
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The remaining README clarification is a minor, non-blocking nit.

Review effort: Lite
Findings: None

What changed in this PR

Adds a spec-only NPM package for distributing the canonical OpenCLI JSON Schema.

Changes:

  • Adds package metadata, exports, and documentation.
  • Adds tag-triggered validation and publishing workflow.
  • Includes the schema and license in the published package.
File Summary
npm/​specification/​README.md Documents installation and schema usage; clarify prerelease dist-tag usage.
npm/​specification/​package.json.tmpl Defines package metadata and exports.
.github/​workflows/​npm-publish-specification.yaml Validates versions, prepares contents, and publishes the package.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bcdxn
bcdxn merged commit 8a58d4c into main Sep 22, 2026
8 checks passed
@bcdxn
bcdxn deleted the feature/npm-spec-pkg branch September 22, 2026 17:32
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.

3 participants