Skip to content

feat(changesets-renovate): filter out private packages#2545

Open
silouanwright wants to merge 2 commits intoscaleway:mainfrom
silouanwright:main
Open

feat(changesets-renovate): filter out private packages#2545
silouanwright wants to merge 2 commits intoscaleway:mainfrom
silouanwright:main

Conversation

@silouanwright
Copy link
Copy Markdown

@silouanwright silouanwright commented Apr 10, 2025

In a monorepo, people may choose to have some packages published, and keep other packages private.

Private packages (which are represented with a private: true key) ideally shouldn't be published. An example below:

{
  "name": "@scope/package-name",
  "version": "0.0.0",
  "private": true,
  "description": "An internal package for providing a shared configuration to apps",
  "main": "./index.js",
}

In the original GitHub Action from Backstage this is based off, the code is in fact filtering out private packages:

// Parses package.json files and returns the package names
async function getPackagesNames(files) {
  const names = [];
  for (const file of files) {
    const data = JSON.parse(await fs.readFile(file, "utf8"));
    if (!data.private) { // ← It only grabs the package if it's not private.
      names.push(data.name);
    }
  }
  return names;
}

Would love to see that functionality represented in this package as well.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 10, 2025

🦋 Changeset detected

Latest commit: d4baef6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@scaleway/changesets-renovate Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@silouanwright silouanwright marked this pull request as ready for review April 10, 2025 19:24
@silouanwright
Copy link
Copy Markdown
Author

👋

@philibea philibea force-pushed the main branch 2 times, most recently from ea4e8bc to aba524c Compare December 26, 2025 16:37
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.

1 participant