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

Gasket CLI ESM Port(ongoing) #635

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions ESM-PORT-NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
### Issues

- `runShellCommand` cross-spawn fails when running `gasket create` on an existing application
```json
// Command results in non-zero code
{
"cmd": "git",
"argv": [
"checkout",
"-b",
"main"
],
"opts": {
"cwd": "/Users/mmason2/Development/zzz-cool-app"
},
"debug": false
}
```

- `Deprecation Warning` - Automatic extension resolution of the "main" field is deprecated for ES modules


<!-- Demo commands -->

<!-- NextJS local preset -->
/Users/mmason2/Development/godaddy/gasket/packages/gasket-cli/bin/run.js create zzz-local-next --preset-path=/Users/mmason2/Development/godaddy/gasket/packages/gasket-preset-nextjs

<!-- NextJS Remote -->
gasket create zzz-next --presets @gasket/[email protected]

<!-- Base create Remote -->
gasket create zzz-next


<!-- Topics -->
- Backwards compatibility
- Gasket config - cjs vs mjs
- Default exports
- No default exports as a rule of thumb
- Plugins named exports or default exports?
- File assertions
- Small util in @gasket/utils to load package.json
- Remove assertions
- Migrations

- Node v20


- Investigations
- Backwards compatibility
- Destination Gasket app type module or not
- Do it work with ESM gasket file?
- Can it work for both mjs & cjs?
- Test if ESM gasket packages work with type module declared - https://nodejs.org/docs/latest-v20.x/api/esm.html#enabling

- Alternative for `import.meta.resolve` to support Node v18
- https://www.npmjs.com/package/import-meta-resolve utilize this package in the resolver
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6.43.1",
"version": "6.43.2-canary-esm-port.2",
"$schema": "https://json.schemastore.org/lerna.json",
"useWorkspaces": true,
"useNx": true,
Expand Down
Loading
Loading