Skip to content

Commit f4aa982

Browse files
authored
chore: bump clang-format and update .yarnrc copy script to exclude plugins (#2611)
1 parent 41c7d2b commit f4aa982

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

scripts/build/clang-format-diff.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set -eo pipefail
33

44
if [[ -z $DEBUG ]]; then
55
brew install clang-format
6-
curl --silent --show-error --remote-name https://raw.githubusercontent.com/llvm/llvm-project/release/18.x/clang/tools/clang-format/clang-format-diff.py
6+
curl --silent --show-error --remote-name https://raw.githubusercontent.com/llvm/llvm-project/release/21.x/clang/tools/clang-format/clang-format-diff.py
77
fi
88
git diff --unified=0 --no-color @^ \
9-
| python clang-format-diff.py -p1 -regex '.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hh|hpp|m|mm|inc)' -sort-includes \
9+
| python3 clang-format-diff.py -p1 -regex '.*\.(cpp|cc|c\+\+|cxx|c|cl|h|hh|hpp|m|mm|inc)' -sort-includes \
1010
| npx suggestion-bot

scripts/build/copy-yarnrc.mjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ function main(src, dst) {
1616
});
1717

1818
const yml = fs.readFileSync(src, { encoding: "utf-8" });
19-
const rc = /** @type {Record<string, string | undefined>} */ (yaml.load(yml));
19+
const rc = /** @type {Record<string, string | string[] | undefined>} */ (
20+
yaml.load(yml)
21+
);
2022

2123
rc["nmHoistingLimits"] = undefined;
22-
rc["plugins"] = undefined;
24+
rc["plugins"] = [];
2325

26+
if (rc.globalFolder) {
27+
const globalFolder = rc.globalFolder.toString();
28+
rc["globalFolder"] = path.join(path.dirname(src), globalFolder);
29+
}
2430
if (rc.yarnPath) {
25-
rc["yarnPath"] = path.join(path.dirname(src), rc.yarnPath);
31+
rc["yarnPath"] = path.join(path.dirname(src), rc.yarnPath.toString());
2632
}
2733

2834
fs.writeFileSync(dst, yaml.dump(rc));

0 commit comments

Comments
 (0)