Skip to content

fix(core): Adiciona 'publishConfig' para registro NPM GitHub - #147

Closed
4sllan wants to merge 1 commit into
mainfrom
feat/package
Closed

4sllan wants to merge 1 commit into
mainfrom
feat/package

Conversation

@4sllan

@4sllan 4sllan commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Configured npm package publishing through GitHub Packages.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The package metadata now directs npm publishing to the GitHub Packages registry.

Changes

GitHub Packages publishing configuration

Layer / File(s) Summary
npm registry configuration
package.json
Adds publishConfig with the GitHub Packages npm registry URL.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the addition of publishConfig for publishing to the GitHub npm registry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 20-22: Align the package metadata and release workflow with the
intended registry: if publishing to GitHub Packages, scope the package name,
configure actions/setup-node with https://npm.pkg.github.com, grant packages:
write permission, and authenticate publishing with secrets.GITHUB_TOKEN via
NODE_AUTH_TOKEN; otherwise remove the publishConfig change and retain npmjs.org
publishing.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 153e8fc1-1b36-48f7-a163-a1a32379608e

📥 Commits

Reviewing files that changed from the base of the PR and between c041757 and 64f3346.

📒 Files selected for processing (1)
  • package.json

Comment thread package.json
Comment on lines +20 to +22
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- package.json ---'
cat -n package.json | sed -n '1,45p'
printf '%s\n' '--- release workflow candidates ---'
fd -i 'release.yml|release.yaml' .github . 2>/dev/null | head -20
printf '%s\n' '--- workflow excerpt ---'
if [ -f .github/workflows/release.yml ]; then
  cat -n .github/workflows/release.yml | sed -n '1,130p'
elif [ -f .github/workflows/release.yaml ]; then
  cat -n .github/workflows/release.yaml | sed -n '1,130p'
fi

Repository: 4sllan/nuxt-umbu

Length of output: 5771


🌐 Web query:

GitHub Packages npm registry package names must be scoped owner packages write GITHUB_TOKEN actions/setup-node registry-url authentication publishConfig

💡 Result:

GitHub Packages only supports scoped npm packages [1][2][3]. Packages must have a name formatted as @SCOPE/PACKAGE-NAME, where the scope typically corresponds to the GitHub user or organization that owns the repository [1][2][3]. To publish to the GitHub Packages npm registry using GitHub Actions, you must configure your project to point to the registry and authenticate properly. 1. Package Configuration: You must ensure the package name in your package.json uses the required scope [1][2]. You can map this scope to the GitHub Packages registry using either a local.npmrc file or the publishConfig field in your package.json [1][3]. - Using publishConfig: "publishConfig": { "@SCOPE:registry": "https://npm.pkg.github.com/" } 2. GitHub Actions Authentication with GITHUB_TOKEN: To authenticate within a workflow, use the actions/setup-node action to configure the registry and authentication [4][5][6]. - Workflow Setup: You must grant the GITHUB_TOKEN the necessary permissions to publish [4][5]. permissions: packages: write contents: read - actions/setup-node configuration: Use the registry-url input to point to the GitHub Packages registry [4][5]. - uses: actions/setup-node@v7 with: registry-url: 'https://npm.pkg.github.com/' When running npm publish, you must provide the GITHUB_TOKEN via the NODE_AUTH_TOKEN environment variable [4][5][7]: - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} The setup-node action automatically generates an.npmrc file on the runner that references this NODE_AUTH_TOKEN for authentication [4][5][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
python3 - <<'PY'
import json
from pathlib import Path

package = json.loads(Path("package.json").read_text())
workflow = Path(".github/workflows/release.yml").read_text()

print("package.name:", package.get("name"))
print("package.publishConfig.registry:", package.get("publishConfig", {}).get("registry"))
for needle in [
    "registry-url: 'https://registry.npmjs.org/'",
    "NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}",
    "packages: write",
    "pnpm publish",
]:
    print(f"{needle!r}:", needle in workflow)
PY

Repository: 4sllan/nuxt-umbu

Length of output: 385


Align the package metadata and release workflow with GitHub Packages.

If GitHub Packages is the intended registry, scope the package name (for example, @4sllan/nuxt-umbu) because the GitHub npm registry requires scoped packages. Update actions/setup-node to https://npm.pkg.github.com, add packages: write, and use ${{ secrets.GITHUB_TOKEN }} as NODE_AUTH_TOKEN. The current npmjs configuration and NPM_TOKEN do not authenticate pnpm publish to GitHub Packages. If npmjs.org is intended, remove the publishConfig change.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 20 - 22, Align the package metadata and release
workflow with the intended registry: if publishing to GitHub Packages, scope the
package name, configure actions/setup-node with https://npm.pkg.github.com,
grant packages: write permission, and authenticate publishing with
secrets.GITHUB_TOKEN via NODE_AUTH_TOKEN; otherwise remove the publishConfig
change and retain npmjs.org publishing.

@4sllan 4sllan closed this Aug 11, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Umbuzeiro Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant