From bf892ca03f0b265a67dc7f56e198e692f537acb2 Mon Sep 17 00:00:00 2001 From: suraj_markup <96483690+suraj-markup@users.noreply.github.com> Date: Fri, 22 May 2026 05:30:09 +0530 Subject: [PATCH] fix(canary): include all publishable packages (#1997) * fix(canary): include all publishable packages, not just linked group * fix(canary): avoid glob dependency in fallback changeset * fix(canary): harden publishable package scan --------- Co-authored-by: suraj-markup --- .github/workflows/canary.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index ef89b8915..9cdfe5dce 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -112,12 +112,29 @@ jobs: # deletes it, so no cleanup is needed. if [ -z "$(ls .changeset/*.md 2>/dev/null | grep -vi 'README')" ]; then node << 'SCRIPT' - const cfg = require('./.changeset/config.json'); - const pkgs = cfg.linked.flat(); + const fs = require('fs'); + const pkgs = []; + + const addPackage = (m) => { + if (!fs.existsSync(m)) return; + const d = JSON.parse(fs.readFileSync(m, 'utf8')); + if (!d.private && d.publishConfig?.access === 'public') pkgs.push(d.name); + }; + + const scanPackages = (dir) => { + if (!fs.existsSync(dir)) return; + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + if (entry.isDirectory()) addPackage(`${dir}/${entry.name}/package.json`); + } + }; + + scanPackages('packages'); + scanPackages('packages/plugins'); + let body = '---\n'; pkgs.forEach(p => body += '"' + p + '": patch\n'); body += '---\n\nchore: canary build\n'; - require('fs').writeFileSync('.changeset/canary-temp.md', body); + fs.writeFileSync('.changeset/canary-temp.md', body); SCRIPT fi pnpm changeset version --snapshot nightly