aboutsummaryrefslogtreecommitdiff
path: root/src/js/_codegen/build-functions.ts
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-09-22 01:09:55 -0400
committerGravatar GitHub <noreply@github.com> 2023-09-21 22:09:55 -0700
commit25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a (patch)
treeadf1d5e53f27a2f4ca7b2074fbd54e2c67764a74 /src/js/_codegen/build-functions.ts
parent9d5459221ff663b6c0058440167e098886d97cc2 (diff)
downloadbun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.tar.gz
bun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.tar.zst
bun-25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a.zip
Implement module.parent (#5889)bun-v1.0.3
* Make module.parent work * yay * oops * yay
Diffstat (limited to 'src/js/_codegen/build-functions.ts')
-rw-r--r--src/js/_codegen/build-functions.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js/_codegen/build-functions.ts b/src/js/_codegen/build-functions.ts
index 6e4114624..275cd2e1a 100644
--- a/src/js/_codegen/build-functions.ts
+++ b/src/js/_codegen/build-functions.ts
@@ -206,12 +206,14 @@ $$capture_start$$(${fn.async ? "async " : ""}${
}
return {
- functions: bundledFunctions,
+ functions: bundledFunctions.sort((a, b) => a.name.localeCompare(b.name)),
internal,
};
}
-const filesToProcess = readdirSync(SRC_DIR).filter(x => x.endsWith(".ts") && !x.endsWith(".d.ts"));
+const filesToProcess = readdirSync(SRC_DIR)
+ .filter(x => x.endsWith(".ts") && !x.endsWith(".d.ts"))
+ .sort();
const files: Array<{ basename: string; functions: BundledBuiltin[]; internal: boolean }> = [];
async function processFile(x: string) {