Skip to content

Commit

Permalink
Rewrite built-in modules to use CommonJS over ESM (#3814)
Browse files Browse the repository at this point in the history
* 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 <709451+Jarred-Sumner@users.noreply.github.com>
  • Loading branch information
paperdave and Jarred-Sumner authored Aug 2, 2023
1 parent 7656b4b commit c2a77cf
Show file tree
Hide file tree
Showing 199 changed files with 17,349 additions and 37,592 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ cold-jsc-start.d

/test.ts

src/js/out/modules_dev
src/js/out/modules*
src/js/out/functions*
src/js/out/tmp
src/js/out/DebugPath.h

make-dev-stats.csv
14 changes: 14 additions & 0 deletions .vscode/launch.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 4 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ BUN_AUTO_UPDATER_REPO = Jarred-Sumner/bun-releases-for-updater

CMAKE_CXX_COMPILER_LAUNCHER_FLAG :=



# 'make' command will trigger the help target
.DEFAULT_GOAL := help

Expand Down Expand Up @@ -556,22 +554,13 @@ tinycc:

PYTHON=$(shell which python 2>/dev/null || which python3 2>/dev/null || which python2 2>/dev/null)

.PHONY: builtins
builtins:
NODE_ENV=production bun src/js/builtins/codegen/index.ts --minify

.PHONY: esm
esm:
NODE_ENV=production bun src/js/build-esm.ts
js:
NODE_ENV=production bun src/js/_codegen/index.ts

esm-debug:
BUN_DEBUG_QUIET_LOGS=1 NODE_ENV=production bun-debug src/js/build-esm.ts

.PHONY: generate-builtins
generate-builtins: builtins



BUN_TYPES_REPO_PATH ?= $(realpath packages/bun-types)

ifeq ($(DEBUG),true)
Expand Down Expand Up @@ -1118,7 +1107,7 @@ dev-obj-linux:
$(ZIG) build obj -Dtarget=x86_64-linux-gnu -Dcpu="$(CPU_TARGET)"

.PHONY: dev
dev: mkdir-dev esm dev-obj link ## compile zig changes + link bun
dev: mkdir-dev dev-obj link ## compile zig changes + link bun

mkdir-dev:
mkdir -p $(DEBUG_PACKAGE_DIR)
Expand Down Expand Up @@ -1914,7 +1903,7 @@ bun: vendor identifier-cache build-obj bun-link-lld-release bun-codesign-release

.PHONY: regenerate-bindings
regenerate-bindings: ## compile src/js/builtins + all c++ code, does not link
@make clean-bindings builtins
@make clean-bindings js
@make bindings -j$(CPU_COUNT)

.PHONY: setup
Expand Down
Loading

0 comments on commit c2a77cf

Please sign in to comment.