You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any particular reason that commonjs was selected as the default type? Would it not be more logical to initialize new package with module considering they would likely be authored in ESM?
Is there any particular reason that commonjs was selected as the default type? Would it not be more logical to initialize new package with module considering they would likely be authored in ESM?
@jonkoops the default in nodejs is commonjs, before this when you initialized it was implicit, now by default it's fixed.
Understandable, but npm init is to generate a new package. There is very little reason (if any) why the default for new packages should be CommonJS, using module is a much better starting point for new developers that are starting out now.
I'll log a separate issue for this, I think this PR was a good starting point, just needs some tweaking to make it more useful for new users, rather than lock them into legacy module systems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I saw a warning for this supported flag, wanted to fix it.