Skip to content

Commit b76223e

Browse files
committed
feat: use the name and the version after prepack
1 parent 5ac7395 commit b76223e

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.yarn/versions/c78e53dc.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
releases:
2+
"@yarnpkg/builder": patch
3+
"@yarnpkg/cli": patch
4+
"@yarnpkg/core": patch
5+
"@yarnpkg/doctor": patch
6+
"@yarnpkg/extensions": patch
7+
"@yarnpkg/nm": patch
8+
"@yarnpkg/plugin-compat": patch
9+
"@yarnpkg/plugin-constraints": patch
10+
"@yarnpkg/plugin-dlx": patch
11+
"@yarnpkg/plugin-essentials": patch
12+
"@yarnpkg/plugin-exec": patch
13+
"@yarnpkg/plugin-file": patch
14+
"@yarnpkg/plugin-git": patch
15+
"@yarnpkg/plugin-github": patch
16+
"@yarnpkg/plugin-http": patch
17+
"@yarnpkg/plugin-init": patch
18+
"@yarnpkg/plugin-interactive-tools": patch
19+
"@yarnpkg/plugin-link": patch
20+
"@yarnpkg/plugin-nm": patch
21+
"@yarnpkg/plugin-npm": patch
22+
"@yarnpkg/plugin-npm-cli": patch
23+
"@yarnpkg/plugin-pack": patch
24+
"@yarnpkg/plugin-patch": patch
25+
"@yarnpkg/plugin-pnp": patch
26+
"@yarnpkg/plugin-pnpm": patch
27+
"@yarnpkg/plugin-stage": patch
28+
"@yarnpkg/plugin-typescript": patch
29+
"@yarnpkg/plugin-version": patch
30+
"@yarnpkg/plugin-workspace-tools": patch
31+
"@yarnpkg/pnpify": patch
32+
"@yarnpkg/sdks": patch

packages/plugin-npm-cli/sources/commands/npm/publish.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ export default class NpmPublishCommand extends BaseCommand {
9393
await scriptUtils.maybeExecuteWorkspaceLifecycleScript(workspace, `prepublish`, {report});
9494

9595
await packUtils.prepareForPack(workspace, {report}, async () => {
96+
if (workspace.manifest.name === null || workspace.manifest.version === null)
97+
throw new UsageError(`Workspaces must have valid names and versions to be published on an external registry`);
98+
99+
const ident = workspace.manifest.name;
100+
96101
const files = await packUtils.genPackList(workspace);
97102

98103
for (const file of files)

0 commit comments

Comments
 (0)