Conversation
sgammon
commented
Mar 31, 2024
Comment on lines
+189
to
+191
| "minipass": "7.0.4", | ||
| "patch-package": "8.0.0", | ||
| "path-scurry": "1.10.2", |
Owner
Author
There was a problem hiding this comment.
These must be hoisted and pinned so I can patch them on-install.
Comment on lines
+1
to
+7
| import { createRequire } from 'node:module' | ||
| import path from 'node:path' | ||
| import url from 'node:url' | ||
|
|
||
| globalThis.require = createRequire(import.meta.url) | ||
| globalThis.__filename = url.fileURLToPath(import.meta.url) | ||
| globalThis.__dirname = path.dirname(__filename) |
Owner
Author
There was a problem hiding this comment.
This shim is required for require, __filename, and __dirname to be present in an ESM module; it is injected at build time into the CLI entrypoint.
Why ship the CLI like this? Because the module remains backward compatible with type: commonjs, and so this will be loaded as CJS, but we want it to be built as ESM.
85c8104 to
a5fb21b
Compare
- feat: support all popular js runtimes - patches for `glob`, `minipass`, and `path-scurry` - upstream prs (listed below) - test entrypoint commands - test: add test entrypoints for each major runtime - test: add scripts to test entrypoint with each major runtime - chore: sync lockfiles Related Issues - isaacs/node-glob#580 - isaacs/path-scurry#16 - isaacs/minipass#54 - tj/commander.js#2169 Upstream PRs - isaacs/node-glob#581 - isaacs/minipass#55 - isaacs/path-scurry#17 - tj/commander.js#2170 Signed-off-by: Sam Gammon <sam@elide.dev>
a5fb21b to
4acc9bb
Compare
Signed-off-by: Sam Gammon <sam@elide.ventures>
|
darvld
approved these changes
Mar 31, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.




Summary
Support for a Deno entrypoint, and other various fixes.
Related Issues
Upstream PRs
node:-prefixed requires for builtins isaacs/node-glob#581node-prefixed requires for builtins tj/commander.js#2170Changelog
glob,minipass, andpath-scurry