Skip to content

The --init-type flag should default to module #8159

@jonkoops

Description

@jonkoops

The changes from #8081 introduced a new --init-type flag that sets the field type to commonjs by default, or any user provided string value. This is a good start but has a couple of caveats, namely:

  • The default value of commonjs is not suitable for new packages, ideally this would default to module as the whole ecosystem is moving to ECMAScript modules, this is especially true for new packages.
  • There are only two valid options for the type field (commonjs or module), and this field allows free input of text by the user, ideally the user would select from these predefined options only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions