Skip to content

feat(meta): publish @node-core/* packages #7776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 26, 2025
Merged

Conversation

avivkeller
Copy link
Member

The current vote on importing @node-core/* into api-docs-tooling stands at 8/0/0 in favor of publishing the @node-core/* packages. Given the lack of opposition in broader discussions, this outcome is unlikely to change.

As a result, this PR publishes the following packages to the npm registry:

  • @node-core/ui-components
  • @node-core/website-i18n
  • @node-core/rehype-shiki
  • Any future packages in the packages/ directory

These packages will be published on any commit that modifies their directories, provided the following conditions are met:

  • The commit passes the "Linting and Tests" check on push to main, or the workflow is manually triggered.
  • The commit was merged via the queue (i.e., not force-pushed to main).

Publishing requires a publish secrets.NPM_TOKEN for the @node-core scope, similar to the one used for Caritat.

@Copilot Copilot AI review requested due to automatic review settings May 23, 2025 20:25
@avivkeller avivkeller requested a review from a team as a code owner May 23, 2025 20:25
Copy link

vercel bot commented May 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview May 26, 2025 1:47pm

@codecov-commenter
Copy link

codecov-commenter commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.34%. Comparing base (39e3ae1) to head (8572965).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7776      +/-   ##
==========================================
+ Coverage   75.31%   75.34%   +0.02%     
==========================================
  Files          96       96              
  Lines        7856     7861       +5     
  Branches      192      192              
==========================================
+ Hits         5917     5923       +6     
+ Misses       1938     1937       -1     
  Partials        1        1              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a GitHub Actions workflow to automatically detect, verify, and publish any @node-core/* packages in the packages/ directory when changes are merged to main or manually triggered.

  • Introduces .github/workflows/publish-packages.yml
  • Detects which packages changed (or a specific package via input)
  • Verifies commit authenticity and merge-queue origin before publishing via pnpm
Comments suppressed due to low confidence (1)

.github/workflows/publish-packages.yml:38

  • [nitpick] Parsing ls output can break on directories with spaces or unexpected files. Consider using find packages -maxdepth 1 -type d -printf '%f\n' or verifying each folder contains a package.json.
PACKAGES=$(ls -d packages/* | xargs -n 1 basename | jq -R -s -c 'split("\n")[:-1]')

@AugustinMauroy
Copy link
Member

we should add doc about

  • how to release as collaborator
  • why release package on npm registry

@avivkeller
Copy link
Member Author

I've updated the PR with:

  • More comments on the workflow
  • A slack notification on manual publish
  • Docs

@AugustinMauroy
Copy link
Member

we need a npm token ?

@avivkeller
Copy link
Member Author

Publishing requires a publish secrets.NPM_TOKEN for the @node-core scope, similar to the one used for Caritat.

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

LGTM

@ovflowd
Copy link
Member

ovflowd commented May 25, 2025

I've opened this issue: nodejs/admin#971

And thanks, @avivkeller for the work here <3

@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label May 26, 2025
Copy link
Contributor

github-actions bot commented May 26, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟠 82 🔗
/en/about/previous-releases 🟢 100 🟢 100 🟢 100 🟠 83 🔗
/en/download 🟢 96 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

@avivkeller avivkeller added this pull request to the merge queue May 26, 2025
Merged via the queue into main with commit 3783f9f May 26, 2025
19 checks passed
@avivkeller avivkeller deleted the feat/publish-monorepo-deps branch May 26, 2025 16:35
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.

5 participants