diff options
author | 2023-09-28 03:51:49 -0300 | |
---|---|---|
committer | 2023-09-27 23:51:49 -0700 | |
commit | e60b3607c12c91959ec795228cc299703d5b09d0 (patch) | |
tree | 2b4e8115501077adef7dc5d35a3627cc588ae63a /src/js/_codegen/build-modules.ts | |
parent | 31d96a1b7f8a72a1976bee92e6c3f08faade8c31 (diff) | |
download | bun-e60b3607c12c91959ec795228cc299703d5b09d0.tar.gz bun-e60b3607c12c91959ec795228cc299703d5b09d0.tar.zst bun-e60b3607c12c91959ec795228cc299703d5b09d0.zip |
Complete rework of the majority of `node:util`, primarily `util.inspect` (#4493)
* 1st revision of new util.inspect impl. (not done)
* fix util.types.isArrayBuffer
* fix some utl tests and bugs
* fix node:tty missing primordials
* fix utl stackoverflow handling & some tests
* narrow down diff. context test
* util.inspect indirect circulars optimization
* temp workaround for buggy is...Function checks
* impl. Map/Set/Iterator entries inspection
* fix bigint & symbol objects inspection
* error inspection fixes
* misc util tests stuff
* inline getExternalValue stub
* leftovers
* util.inspect promise internals
* run bun fmt
* commit make js changes
* cut out unnecessary utl files
* reorganize utl folder structure
* remove browserify buffer check
* Try to revert git messing up uws somehow
This reverts commit 2c27e16e7d361657b9c3a7dc7892117cf31e15ee.
* commit src/js/out files again
* redo this edit too
* refresh js/out files
* Removed uws submodule
* tidy up
* unused primordials
* run fmt
---------
Co-authored-by: dave caruso <me@paperdave.net>
Diffstat (limited to 'src/js/_codegen/build-modules.ts')
-rw-r--r-- | src/js/_codegen/build-modules.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/js/_codegen/build-modules.ts b/src/js/_codegen/build-modules.ts index 2e49dfffe..d72c89cd6 100644 --- a/src/js/_codegen/build-modules.ts +++ b/src/js/_codegen/build-modules.ts @@ -29,7 +29,13 @@ const internalRegistry = new Map(); // Build Registry for (let i = 0; i < moduleList.length; i++) { - const prefix = moduleList[i].startsWith("node/") ? "node:" : moduleList[i].startsWith("bun:") ? "bun/" : undefined; + const prefix = moduleList[i].startsWith("node/") + ? "node:" + : moduleList[i].startsWith("bun:") + ? "bun/" + : moduleList[i].startsWith("internal/") + ? "internal/" + : undefined; if (prefix) { const id = prefix + moduleList[i].slice(prefix.length).replaceAll(".", "/").slice(0, -3); internalRegistry.set(id, i); @@ -91,7 +97,7 @@ globalThis.requireTransformer = (specifier: string, from: string) => { return codegenRequireId(`${found}/*${path.relative(BASE, relativeMatch)}*/`); } - throw new Error(`Builtin Bundler: Could not resolve "${specifier}" in ${from}. These cannot be relative.`); + throw new Error(`Builtin Bundler: Could not resolve "${specifier}" in ${from}.`); }; // Preprocess builtins |