-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
refactor(cli): runtime compiler APIs consolidated to Deno.emit() #8799
Conversation
0634813
to
5c32d3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I have only a few minor comments.
I'm strongly in favor of this change, but wouldn't mind a bit more of bike-shedding on the API name.
Like what? It isn't bike-shedding if there isn't a suggestion. |
15329b9
to
9bb89a6
Compare
Alright, I retract my words, I can't come up with a better name for this API. LGTM |
Closes: #4752
This is a breaking change that replaces the unstable
Deno.compile()
,Deno.bundle()
, andDeno.transpileOnly()
APIs with a single API,Deno.emit()
which behaves more in line with the waydeno run
,deno cache
, anddeno bundle
work, where there is acheck
option which determines if the program is checked or not. In addition, theDeno.emit()
API supports import maps, which the previous APIs did not. (It should be noted, that Deno does not transform any paths with an import map, so any consumers of the emitted code would need to be able to leverage the same resolutions as the import map).