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.
WHAT
🤖 Generated by Copilot at 331f473
The pull request switches the codebase and the template files to use ES modules syntax instead of CommonJS syntax, and adds the
type
field to thepackage.json
files to enable this change. This improves the consistency, compatibility, and performance of the codebase and the generated CLI projects. The pull request also updates and reorganizes the dependencies and the shebang line to support the use of ES modules syntax.
🤖 Generated by Copilot at 331f473
WHY
Adds the necessary changes for loading dependencies via ESM
HOW
🤖 Generated by Copilot at 331f473
type
field with the valuemodule
to thepackage.json
files (link, link)-S
and--no-warnings
flags for node (link, link)require
andmodule.exports
statements withimport
andexport
statements (link, link, link, link, link, link, link, link, link, link, link, link)fs
andurl
modules to read and parse thepackage.json
files of the main project and the generated CLI projects (link, link)url
module to get the current directory of the file (link)import.meta
object to thecli-meow-help
package as an option (link, link)dependencies
anddevDependencies
sections in thepackage.json
file of the main project (link)pkgs
array in theutils/generate.js
file to match the upgraded versions (link)Store
class from thedata-store
package todatastore
in theutils/ask.js
file to avoid confusion with the nativeStore
class in Node.js (link)