Skip to content

Commit

Permalink
refactor: require "from" when looking for imports that are unlinked
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Feb 10, 2025
1 parent 49f54be commit ec85dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/detect.unlinked.dep.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const fileExists = async (path) => !!(await fs.stat(path).catch(() => false));
function getAllImports(path) {
const allImports = new Set();

const data = cp.execSync(`grep -R "'@basemaps" ${path}/src || true`).toString().split('\n');
const data = cp.execSync(`grep -R "from '@basemaps" ${path}/src || true`).toString().split('\n');

for (const line of data) {
if (line.includes('require.resolve')) continue;
Expand Down

0 comments on commit ec85dca

Please sign in to comment.