-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Make --print respect --input-type=module #58994
Copy link
Copy link
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered stale
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered stale
Type
Projects
Status
Awaiting Triage
What is the problem this feature will solve?
This doesn't work, but it should:
Related to #45924 (comment) - but that was about --print and --eval. It seems to be fixed for
--evalbut not for--printNote:
bun -p 'await Promise.resolve(123)'worksWhat is the feature you are proposing to solve the problem?
Make a similar change to whatever fixed #45924
What alternatives have you considered?
bun
Note:
node -e 'console.log(await Promise.resolve(123))' --input-type=moduledoes work, but it's not always possible to use a console.log, especially when usingnode -pin a piped bash expression