feat(#1726): G1-G6 portability AST rules; fix all offenders; delete the ratchet (Phase 4) (#1731)

Phase 4 of epic #1702. Closes #1726.
This commit is contained in:
Tom Boucher
2026-06-25 18:24:39 -04:00
committed by GitHub
parent 2990305f78
commit f08b177215
88 changed files with 2038 additions and 377 deletions

View File

@@ -87,7 +87,7 @@ describe('detectConfigDir runtime behavior (#1860)', () => {
const hookSource = fs.readFileSync(CHECK_UPDATE_PATH, 'utf8');
// Extract detectConfigDir function body (from 'function detectConfigDir' to the closing brace)
const fnMatch = hookSource.match(/(function detectConfigDir\(baseDir\)\s*\{[\s\S]*?\n\})/);
const fnMatch = hookSource.match(/(function detectConfigDir\(baseDir\)\s*\{[\s\S]*?\r?\n\})/);
assert.ok(fnMatch, 'should be able to extract detectConfigDir function from hook source');
const fnSource = fnMatch[1];
@@ -124,7 +124,7 @@ describe('detectConfigDir runtime behavior (#1860)', () => {
fs.writeFileSync(path.join(openCodeVersionDir, 'VERSION'), '1.0.0\n');
const hookSource = fs.readFileSync(CHECK_UPDATE_PATH, 'utf8');
const fnMatch = hookSource.match(/(function detectConfigDir\(baseDir\)\s*\{[\s\S]*?\n\})/);
const fnMatch = hookSource.match(/(function detectConfigDir\(baseDir\)\s*\{[\s\S]*?\r?\n\})/);
assert.ok(fnMatch, 'should be able to extract detectConfigDir function from hook source');
const fnSource = fnMatch[1];