aboutsummaryrefslogtreecommitdiff
path: root/misctools
diff options
context:
space:
mode:
Diffstat (limited to 'misctools')
-rw-r--r--misctools/gen-unicode-table.js12
-rw-r--r--misctools/headers-cleaner.js8
-rw-r--r--misctools/mime.js2
-rw-r--r--misctools/publish-examples.js16
4 files changed, 19 insertions, 19 deletions
diff --git a/misctools/gen-unicode-table.js b/misctools/gen-unicode-table.js
index cd46ac31c..ad38a0ec5 100644
--- a/misctools/gen-unicode-table.js
+++ b/misctools/gen-unicode-table.js
@@ -19,7 +19,7 @@ const idStartES5 = []
require("@unicode/unicode-3.0.0/General_Category/Lowercase_Letter/code-points"),
require("@unicode/unicode-3.0.0/General_Category/Titlecase_Letter/code-points"),
require("@unicode/unicode-3.0.0/General_Category/Modifier_Letter/code-points"),
- require("@unicode/unicode-3.0.0/General_Category/Other_Letter/code-points")
+ require("@unicode/unicode-3.0.0/General_Category/Other_Letter/code-points"),
// The "letter number" category is not included because old versions of Safari
// had a bug where they didn't include it. This means it does not match ES5.
@@ -38,7 +38,7 @@ const idContinueES5 = idStartES5
require("@unicode/unicode-3.0.0/General_Category/Nonspacing_Mark/code-points"),
require("@unicode/unicode-3.0.0/General_Category/Spacing_Mark/code-points"),
require("@unicode/unicode-3.0.0/General_Category/Decimal_Number/code-points"),
- require("@unicode/unicode-3.0.0/General_Category/Connector_Punctuation/code-points")
+ require("@unicode/unicode-3.0.0/General_Category/Connector_Punctuation/code-points"),
)
.sort((a, b) => a - b);
@@ -60,12 +60,12 @@ const idContinueESNextSet = new Set(idContinueESNext);
// These identifiers are valid in both ES5 and ES6+ (i.e. an intersection of both)
const idStartES5AndESNext = idStartES5.filter((n) => idStartESNextSet.has(n));
const idContinueES5AndESNext = idContinueES5.filter((n) =>
- idContinueESNextSet.has(n)
+ idContinueESNextSet.has(n),
);
// These identifiers are valid in either ES5 or ES6+ (i.e. a union of both)
const idStartES5OrESNext = [...new Set(idStartES5.concat(idStartESNext))].sort(
- (a, b) => a - b
+ (a, b) => a - b,
);
const idContinueES5OrESNext = [
...new Set(idContinueES5.concat(idContinueESNext)),
@@ -166,7 +166,7 @@ function generateBigSwitchStatement(codePoints) {
fs.writeFileSync(
path.join(__dirname, "..", "src", "js_lexer", "unicode.zig"),
`// This file was automatically generated by ${path.basename(
- __filename
+ __filename,
)}. Do not edit.
const RangeTable = @import("./range_table.zig");
@@ -190,5 +190,5 @@ pub fn isIdentifierContinue(comptime Codepoint: type, codepoint: Codepoint) bool
}
-`
+`,
);
diff --git a/misctools/headers-cleaner.js b/misctools/headers-cleaner.js
index 10824d916..850cc3196 100644
--- a/misctools/headers-cleaner.js
+++ b/misctools/headers-cleaner.js
@@ -5,7 +5,7 @@ var { join } = require("path");
const destination = join(__dirname, "../src/bun.js/bindings/headers.zig");
const replacements = join(
__dirname,
- "../src/bun.js/bindings/headers-replacements.zig"
+ "../src/bun.js/bindings/headers-replacements.zig",
);
console.log("Writing to", destination);
@@ -24,7 +24,7 @@ const keep = (
(a) =>
/const (JSC|WTF|Web)_/gi.test(a) &&
!a.includes("JSValue") &&
- !a.includes("CatchScope")
+ !a.includes("CatchScope"),
)
.join("\n")
.trim();
@@ -36,7 +36,7 @@ input = input.replaceAll("[*c] JSC__", "[*c]bindings.");
input = input.replaceAll("[*c] const JSC__", "[*c]const bindings.");
input = input.replaceAll(
"[*c]Inspector__ScriptArguments",
- "[*c]bindings.ScriptArguments"
+ "[*c]bindings.ScriptArguments",
);
input = input
@@ -98,5 +98,5 @@ writeFileSync(
readFileSync(replacements, "utf8").trim() +
"\n" +
input.trim() +
- "\n"
+ "\n",
);
diff --git a/misctools/mime.js b/misctools/mime.js
index 74f9773e7..6f46a711f 100644
--- a/misctools/mime.js
+++ b/misctools/mime.js
@@ -10,7 +10,7 @@ json["application/javascript"].extensions.push(
`cts`,
`cjs`,
`mjs`,
- `js`
+ `js`,
);
delete json["application/node"];
diff --git a/misctools/publish-examples.js b/misctools/publish-examples.js
index d84466e15..4124d0785 100644
--- a/misctools/publish-examples.js
+++ b/misctools/publish-examples.js
@@ -16,7 +16,7 @@ var count = 0;
const examplesFolderEntries = fs.readdirSync(
path.join(process.cwd(), "examples"),
- { withFileTypes: true }
+ { withFileTypes: true },
);
const packageNames = [];
@@ -30,7 +30,7 @@ for (let folder of examplesFolderEntries) {
try {
packageJSONText = fs.readFileSync(
path.join(absolute, "package.json"),
- "utf8"
+ "utf8",
);
} catch {
continue;
@@ -72,7 +72,7 @@ for (let folder of examplesFolderEntries) {
try {
fs.copyFileSync(
path.join(absolute, ".gitignore"),
- path.join(absolute, "gitignore")
+ path.join(absolute, "gitignore"),
);
} catch (exception) {}
@@ -87,7 +87,7 @@ for (let folder of examplesFolderEntries) {
fs.writeFileSync(
path.join(absolute, "package.json"),
- JSON.stringify(packageJSON, null, 2)
+ JSON.stringify(packageJSON, null, 2),
);
try {
exec(`npm version patch --force --no-commit-hooks --no-git-tag-version`, {
@@ -95,7 +95,7 @@ for (let folder of examplesFolderEntries) {
});
packageJSON = JSON.parse(
- fs.readFileSync(path.join(absolute, "package.json"), "utf8")
+ fs.readFileSync(path.join(absolute, "package.json"), "utf8"),
);
version = packageJSON.version;
} catch (e) {
@@ -109,7 +109,7 @@ for (let folder of examplesFolderEntries) {
`npm publish ${
DRY_RUN ? "--dry-run" : ""
} --access public --registry https://registry.npmjs.org/`,
- { cwd: absolute }
+ { cwd: absolute },
);
packageNames.push([
packageJSON.name,
@@ -149,13 +149,13 @@ if (packageNames.length > 0) {
} catch (exception) {}
fs.writeFileSync(
path.join(dir, "package.json"),
- JSON.stringify(packageJSON, null, 2)
+ JSON.stringify(packageJSON, null, 2),
);
exec(
`npm publish ${
DRY_RUN ? "--dry-run" : ""
} --access public --registry https://registry.npmjs.org/`,
- { cwd: dir }
+ { cwd: dir },
);
}