Skip to content

Commit fa87310

Browse files
fixup! shared build and linting
1 parent f42cbf2 commit fa87310

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

tools/js2c.cc

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -712,14 +712,17 @@ int AddModule(const std::string& filename,
712712
// Transpile TypeScript sources to JavaScript using SWC type stripping.
713713
if (filename.ends_with(kTsSuffix)) {
714714
Debug("Transpiling TypeScript: %s\n", filename.c_str());
715-
SwcTransformResult result = swc_transform(
716-
code.data(), code.size(),
717-
filename.c_str(), filename.size(),
718-
SWC_MODE_STRIP_ONLY);
715+
SwcTransformResult result = swc_transform(code.data(),
716+
code.size(),
717+
filename.c_str(),
718+
filename.size(),
719+
SWC_MODE_STRIP_ONLY);
719720
if (result.error != nullptr) {
720-
fprintf(stderr, "SWC error transpiling %s: %.*s\n",
721+
fprintf(stderr,
722+
"SWC error transpiling %s: %.*s\n",
721723
filename.c_str(),
722-
static_cast<int>(result.error_len), result.error);
724+
static_cast<int>(result.error_len),
725+
result.error);
723726
swc_transform_free_result(&result);
724727
return 1;
725728
}
@@ -728,7 +731,8 @@ int AddModule(const std::string& filename,
728731

729732
if (!output_transpiled_dir.empty()) {
730733
// Write transpiled output as .js for debuggability.
731-
std::string out_path = output_transpiled_dir + "/" +
734+
std::string out_path =
735+
output_transpiled_dir + "/" +
732736
filename.substr(0, filename.size() - kTsSuffix.size()) + ".js";
733737
size_t last_slash = out_path.find_last_of('/');
734738
if (last_slash != std::string::npos) {
@@ -897,7 +901,8 @@ int JS2C(const FileList& js_files,
897901
Fragments initializers;
898902
initializers.reserve(js_files.size() + mjs_files.size() + ts_files.size());
899903
Fragments registrations;
900-
registrations.reserve(js_files.size() + mjs_files.size() + ts_files.size() + 1);
904+
registrations.reserve(js_files.size() + mjs_files.size() + ts_files.size() +
905+
1);
901906

902907
for (const auto& filename : js_files) {
903908
int r = AddModule(filename, &definitions, &initializers, &registrations);
@@ -1043,7 +1048,8 @@ int Main(int argc, char* argv[]) {
10431048
std::sort(mjs_it->second.begin(), mjs_it->second.end());
10441049
std::sort(ts_it->second.begin(), ts_it->second.end());
10451050

1046-
return JS2C(js_it->second, mjs_it->second, ts_it->second, gypi_it->second[0], output);
1051+
return JS2C(
1052+
js_it->second, mjs_it->second, ts_it->second, gypi_it->second[0], output);
10471053
}
10481054
} // namespace js2c
10491055
} // namespace node

tools/nix/v8.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
4040
../../common.gypi
4141
../../configure
4242
../../configure.py
43+
../../deps/crates/crates.gyp
4344
../../deps/inspector_protocol/inspector_protocol.gyp
4445
../../deps/ncrypto/ncrypto.gyp
4546
v8Dir

0 commit comments

Comments
 (0)