Skip to content

Commit

Permalink
chore: need to alter the changeset config
Browse files Browse the repository at this point in the history
  • Loading branch information
petertonysmith94 committed Jan 31, 2025
1 parent bacff82 commit 2eeefc9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/changeset/changeset-format-for-github-packages.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { execSync } from "child_process";
import { readFileSync, writeFileSync } from "fs";
import { globSync } from "glob";

const CHANGESET_CONFIG_PATH = ".changeset/config.json";
const GITHUB_ORGANIZATION_SCOPE = "@FuelLabs";

const formatPackageJsonContents = (contents: { name: string }) => ({
Expand Down Expand Up @@ -39,3 +40,16 @@ globSync("**/package.json")
// Add the formatted package.json files to the git index
execSync(`git add ${pkg.path}`);
});

/**
* Update the changeset config to include the FuelLabs organization scope
*/
const changesetConfigContents = JSON.parse(
readFileSync(CHANGESET_CONFIG_PATH, "utf-8"),
);
const changesetConfig = {
...changesetConfigContents,
fixed: [[`${GITHUB_ORGANIZATION_SCOPE}/*`]],
};
writeFileSync(CHANGESET_CONFIG_PATH, JSON.stringify(changesetConfig, null, 2));
execSync(`git add ${CHANGESET_CONFIG_PATH}`);

0 comments on commit 2eeefc9

Please sign in to comment.