-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Rewrite built-in modules to use CommonJS over ESM #3814
Conversation
❌ @paperdave 4 files with test failures on linux-x64:
|
❌ @paperdave 3 files with test failures on linux-x64-baseline:
|
❌ @paperdave 2 files with test failures on bun-darwin-aarch64:
|
❌ @paperdave 7 files with test failures on bun-darwin-x64-baseline:
|
230f5bb
to
0ed39c7
Compare
93a9ba2
to
fa3df07
Compare
|
||
DEFINE_VISIT_CHILDREN_WITH_MODIFIER(template<unsigned passedNumberOfInternalFields>, JSInternalFieldObjectImpl<passedNumberOfInternalFields>); | ||
|
||
} // namespace JSC |
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.
explanation: added JSInternalFieldObjectImplInlines.h
which fixes needing this copypaste
f145ae2
to
bdab64c
Compare
✅ #c79b96d021ad8ea844ec3c5b04cc81ebaf2a2bb7 |
✅ |
* stfdsafsd sadffdsa stuff finish commonjs stuff asdf not done but work not done but work not done yet but this is how far i am remove files lol update built files uncomment everything in events lol export default stuff * afdsafsd * its not perfect but almost done * okay * cool * remove temp file * finish rebase * revert settings.json * a * ch-ch-ch-ch-changes * okay * remove this check in release for now * sxdcfghnjm, * lkjhgf * fmt * filename can be null * Update NodeModuleModule.h * weee * fmt --------- Co-authored-by: Jarred Sumner <[email protected]>
Closes #3773
Closes #3863
Closes
Fixes immediate segfault of #3746 but astro isnt working fully yet
node:*
andbun:*
modules to use CommonJS modules. Since the bundler does not emit CommonJS code, this is done with a custom pre/postprocessor step.require
is intercepted at build time and inlined to$requireId(...)
where a static number is inlined.InternalModuleRegistry
in C++. This is an internal fields object of about 50.$isArray
and so on.make builtins
&make esm
are now one build process:make js
. It is also faster.Symbol.for("CommonJS")
$lazy("primordials")
globalThis[Symbol.for("Bun.lazy")]
and make$lazy
real, or take a diff approach to this.bun:events_native
. it is now$lazy('events')
, we should fully remove this later.ProcessBindingConstants
and$processBindingConstants