diff --git a/src/publish/index.js b/src/publish/index.js index 3f19167..3ebcfe6 100644 --- a/src/publish/index.js +++ b/src/publish/index.js @@ -416,15 +416,17 @@ export const publish = async (options) => { console.info(`Publishing all packages to npm with tag "${npmTag}"`) // Publish each package - changedPackages.forEach((pkg) => { - const packageDir = path.join(rootDir, pkg.packageDir) - - const cmd = `cd ${packageDir} && pnpm publish --tag ${npmTag} --access=public --no-git-checks` - console.info(` Publishing ${pkg.name}@${version} to npm...`) - execSync(cmd, { - stdio: [process.stdin, process.stdout, process.stderr], + changedPackages + .filter((pkg) => pkg.skipPublish !== true) + .forEach((pkg) => { + const packageDir = path.join(rootDir, pkg.packageDir) + + const cmd = `cd ${packageDir} && pnpm publish --tag ${npmTag} --access=public --no-git-checks` + console.info(` Publishing ${pkg.name}@${version} to npm...`) + execSync(cmd, { + stdio: [process.stdin, process.stdout, process.stderr], + }) }) - }) console.info() diff --git a/src/publish/types.d.ts b/src/publish/types.d.ts index c241761..e4de9f0 100644 --- a/src/publish/types.d.ts +++ b/src/publish/types.d.ts @@ -37,6 +37,7 @@ export type Parsed = { export type Package = { name: string packageDir: string + skipPublish?: boolean } export type BranchConfig = {