Elffuss BraidHub

kikocis/continue public

fix: vaildate aliases fix core
Changesetb87cf24dd0069de951ae33ec753ecb63f88c1e2c0eb687b83840582bbfc2aad2
AuthorNate <sestinj@gmail.com> · 2025-08-22 20:47 -07:00
CommitterNate <sestinj@gmail.com> · 2025-08-22 20:47 -07:00
Parentsbf522405847f

Browse the files at this changeset

1 file changed

modified extensions/cli/validate-aliases.mjs +8 −4
@@ -42,10 +42,14 @@
4242 }
4343
4444 // Look for package names in non-commented lines
45- // Match both @continuedev/* packages and simple package names like "core"
46- const packageMatch = line.match(/"(@continuedev\/[^"]+|[^"@\/]+)":/);
47- if (packageMatch) {
48- aliases.add(packageMatch[1]);
45+ // Match both quoted and unquoted keys
46+ const quotedMatch = line.match(/"([^"]+)":/);
47+ const unquotedMatch = line.match(/\s+([a-zA-Z@][a-zA-Z0-9@\/_-]*)\s*:/);
48+
49+ if (quotedMatch) {
50+ aliases.add(quotedMatch[1]);
51+ } else if (unquotedMatch && !unquotedMatch[1].includes('__dirname') && unquotedMatch[1] !== 'js') {
52+ aliases.add(unquotedMatch[1]);
4953 }
5054 }
5155