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

make the license field of npm init more stubborn #655

Open
nlf opened this issue Mar 13, 2023 · 4 comments
Open

make the license field of npm init more stubborn #655

nlf opened this issue Mar 13, 2023 · 4 comments

Comments

@nlf
Copy link

nlf commented Mar 13, 2023

Is your feature request related to a problem? Please describe.
Currently we set licenses to ISC by default

Describe the solution you'd like
We should not select a default license on behalf of our users. Instead we should default to omitting the license field entirely in non-interactive mode, and in interactive mode require that the user either provides a value or confirms that they do not want to select a license at all. As a bonus it would be nice if we had a site to link to that helps our users select a license that fits their needs.

> npm init
license: <enter>

leaving this field blank means your package is unlicensed. if you're sure, press enter again to continue
license: <enter>

Describe alternatives you've considered
The license default could change, but a new default means that we are once again providing a default that may not align with users needs. It feels best to not provide a license by default at all.

Additional context
npm/rfcs#597

@ljharb
Copy link

ljharb commented Mar 13, 2023

This is great - we should definitely include a link to help users choose.

@aretrace
Copy link

aretrace commented Aug 5, 2024

Is there any update on this? Having ISC as the default license in 2024 seems unusual and might hinder the convenience of using npm, especially if users have to manually change the license every time they initialize a new package.

@ljharb
Copy link

ljharb commented Aug 6, 2024

@aretrace you can set an npm config for init.license and address that problem.

@aretrace
Copy link

aretrace commented Aug 7, 2024

@ljharb I did not know that, thanks! I would still advocate for an interactive confirmation user prompt.

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

No branches or pull requests

3 participants