Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forbid prereleasing to npm tag @latest #3927

Merged
merged 3 commits into from Oct 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/release/prerelease.ts
Expand Up @@ -65,6 +65,12 @@ export async function runPrerelease({
);
}

if (FORBIDDEN_TAGS.includes(npmTag)) {
throw Error(
`Publishing to npm tag ${npmTag} is not allowed for prereleases`
);
}

const sha = await getCurrentSha();
const updates = await getAllPackages();
const pkgJsons = await Promise.all(
Expand Down Expand Up @@ -97,6 +103,8 @@ export async function runPrerelease({
}
}

const FORBIDDEN_TAGS = ['latest', 'next', 'exp'];

interface PrereleaseOptions {
prereleaseName: string;
npmTag: string;
Expand Down