Skip to content

Commit 321e7d4

Browse files
fix: remove death code
1 parent d81dfda commit 321e7d4

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

recipes/repl-builtin-modules/src/workflow.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,6 @@ export default function transform(root: SgRoot<Js>): string | null {
9393
}
9494
} else {
9595
// Case 3: Split into two statements
96-
const newText = originalText.replace(/,?\s*(builtinModules|_builtinLibs)\s*(:\s*\w+)?\s*,?/g, (match, property, alias, offset, string) => {
97-
// If the match is at the beginning, remove leading comma from the rest
98-
if (offset === 1) { // After opening brace
99-
return "";
100-
}
101-
// If there's a comma before, keep the comma for the remaining items
102-
if (match.startsWith(",")) {
103-
return "";
104-
}
105-
// If there's a comma after, remove it
106-
return "";
107-
}).replace(/^{\s*,/, "{ ").replace(/,\s*}$/, " }").replace(/,\s*,/g, ",").trim();
108-
109-
// Better approach: manually reconstruct the object pattern
11096
const propertiesToKeep = [];
11197
const properties = objectPattern.findAll({
11298
rule: {

0 commit comments

Comments
 (0)