Skip to content

Commit 1e072cc

Browse files
committed
Add canonicals
1 parent 9d3f4df commit 1e072cc

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

scripts/manual-publish.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,6 @@ execSync(`cd lib && pnpm build && npm publish ${provenance} --access public --ta
9090
execSync(
9191
`gh release create ${NEW_VERSION} --generate-notes${isLatestRelease ? " --latest" : ""} -n "$(sed '1,/^## /d;/^## /,$d' CHANGELOG.md)" --title "Release v${NEW_VERSION}"`,
9292
);
93+
94+
// Publish canonical packages
95+
execSync("node scripts/publish-canonical.js");

scripts/publish-canonical.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const { execSync } = require("child_process");
2+
3+
// Publish canonical packages
4+
["esraw", "esbuild-raw"].forEach(pkg => {
5+
execSync(`sed -i -e "s/name.*/name\\": \\"${pkg}\\",/" lib/package.json`);
6+
execSync("cd lib && npm publish --provenance --access public");
7+
});

scripts/publish.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ execSync(`cd lib && pnpm build && npm publish ${provenance} --access public`);
4949
execSync(
5050
`gh release create ${VERSION} --generate-notes --latest -n "$(sed '1,/^## /d;/^## /,$d' CHANGELOG.md)" --title "Release v${VERSION}"`,
5151
);
52+
53+
// Publish canonical packages
54+
execSync("node scripts/publish-canonical.js");

0 commit comments

Comments
 (0)