Update babel to v8.0.0-rc.5 (#19156)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
renovate[bot]andfisker authored and GitHub committed 2026-05-19 04:14:49 +08:00
1 parent bd886a7c23
commit 5c9002f92f
8 files changed
+79 -45

No files matched your search

+16
View File
@@ -70,6 +70,22 @@ const mainModule = {
}),
path: require.resolve("@babel/code-frame"),
},
// `parse-json` uses old version of `@babel/code-frame`
// Remove this when `parse-json` supports @babel/code-frame v8
{
module: require.resolve("parse-json"),
process(text) {
text = text.replace(
"return {line: Number(line), column: Number(column)}",
"return {line: Number(line), column: Number(column) - 1}",
);
text = text.replace(
"return indexToPosition(string, Number(index), {oneBased: true});",
"return indexToPosition(string, Number(index), {oneBasedLine: true});",
);
return text;
},
},
{
module: getPackageFile("json5/dist/index.mjs"),
find: "export default lib;",