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

Root package.json name #67

Open
borisdamevin opened this issue Jun 12, 2022 · 2 comments
Open

Root package.json name #67

borisdamevin opened this issue Jun 12, 2022 · 2 comments

Comments

@borisdamevin
Copy link
Contributor

Like version, how can we prevent this error?

[23:29:24] [semantic-release] » ×  ENOPKGNAME Missing `name` property in `package.json`.
The package.json's name (https://docs.npmjs.com/files/package.json#name) property is required in order to publish a package to the npm registry.

Please make sure to add a valid name for your package in your package.json.

AggregateError: 
    SemanticReleaseError: Missing `name` property in `package.json`.
@borisdamevin borisdamevin changed the title Root package.json name Root package.json name Jun 12, 2022
@ext
Copy link
Owner

ext commented Jun 15, 2022

I was going to write something like "isn't name required" but today I learned it's not required if the package isn't published as would be the case with a monorepo root package. By convention I've always used a -monorepo suffix (e.g foobar-monorepo) for the root package name and set private to true to prevent any accidental publish.

Do you have any suggestions how this could be implemented? If package.json is modified semantic-release would throw an error that the working copy is dirty.

@borisdamevin
Copy link
Contributor Author

borisdamevin commented Jun 15, 2022

If this plugin can override this semantic-release rule, maybe follow the convention to let name empty but made warning for private at true for prevent accidental publishing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants