Skip to content

The design language that makes your AI harness better at design.

JavaScript

Sync generated provider output

github-actions[bot]33b9a3752b88
diff --git a/.agents/skills/impeccable/scripts/detector/node/file-system.mjs b/.agents/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.agents/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.agents/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.claude/skills/impeccable/scripts/detector/node/file-system.mjs b/.claude/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.claude/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.claude/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.cursor/skills/impeccable/scripts/detector/node/file-system.mjs b/.cursor/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.cursor/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.cursor/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.gemini/skills/impeccable/scripts/detector/node/file-system.mjs b/.gemini/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.gemini/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.gemini/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.github/skills/impeccable/scripts/detector/node/file-system.mjs b/.github/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.github/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.github/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.grok/skills/impeccable/scripts/detector/node/file-system.mjs b/.grok/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.grok/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.grok/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.kiro/skills/impeccable/scripts/detector/node/file-system.mjs b/.kiro/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.kiro/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.kiro/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.opencode/skills/impeccable/scripts/detector/node/file-system.mjs b/.opencode/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.opencode/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.opencode/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.pi/skills/impeccable/scripts/detector/node/file-system.mjs b/.pi/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.pi/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.pi/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.qoder/skills/impeccable/scripts/detector/node/file-system.mjs b/.qoder/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.qoder/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.qoder/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.rovodev/skills/impeccable/scripts/detector/node/file-system.mjs b/.rovodev/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.rovodev/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.rovodev/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.trae-cn/skills/impeccable/scripts/detector/node/file-system.mjs b/.trae-cn/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.trae-cn/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.trae-cn/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.trae/skills/impeccable/scripts/detector/node/file-system.mjs b/.trae/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.trae/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.trae/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/.vibe/skills/impeccable/scripts/detector/node/file-system.mjs b/.vibe/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/.vibe/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/.vibe/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);
diff --git a/plugin/skills/impeccable/scripts/detector/node/file-system.mjs b/plugin/skills/impeccable/scripts/detector/node/file-system.mjs
index eee17ea4f..6a74fa353 100644
--- a/plugin/skills/impeccable/scripts/detector/node/file-system.mjs
+++ b/plugin/skills/impeccable/scripts/detector/node/file-system.mjs
@@ -31,6 +31,12 @@ const SCANNABLE_EXTENSIONS = new Set([
const HTML_EXTENSIONS = new Set(['.html', '.htm']);
+const IMPORT_SPECIFIER_PATTERNS = [
+ /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g,
+ /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g,
+ /@(?:use|forward)\s+['"]([^'"]+)['"]/g,
+];
+
function walkDir(dir) {
const files = [];
let entries;
@@ -75,26 +81,11 @@ function buildImportGraph(files) {
const dir = path.dirname(file);
const imports = new Set();
- // ES imports: import ... from '...' and import '...'
- const esRe = /import\s+(?:[\s\S]*?from\s+)?['"]([^'"]+)['"]/g;
- let m;
- while ((m = esRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // CSS @import
- const cssRe = /@import\s+(?:url\(\s*)?['"]?([^'");\s]+)['"]?\s*\)?/g;
- while ((m = cssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
- }
-
- // SCSS @use / @forward
- const scssRe = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
- while ((m = scssRe.exec(content)) !== null) {
- const resolved = resolveImport(m[1], dir, fileSet);
- if (resolved) imports.add(resolved);
+ for (const pattern of IMPORT_SPECIFIER_PATTERNS) {
+ for (const match of content.matchAll(pattern)) {
+ const resolved = resolveImport(match[1], dir, fileSet);
+ if (resolved) imports.add(resolved);
+ }
}
graph.set(file, imports);