Skip to content

Commit f026bc7

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

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.yarn/versions/c78e53dc.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
releases:
2+
"@yarnpkg/plugin-npm-cli": patch

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

+5
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)