Skip to content

Commit

Permalink
chore(upgrade): Fix node module matcher, add yarn/pnpm to default ign…
Browse files Browse the repository at this point in the history
…ores
  • Loading branch information
jescalan committed Jan 8, 2024
1 parent 2776f08 commit 24478b2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/upgrade/source/scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ export default function Scan({ fromVersion, toVersion, sdks, dir, ignore }) {
// result = `files` set to format: ['/filename', '/other/filename']
useEffect(() => {
setStatus('Collecting files to scan');
ignore.push('node_modules/**', '.git/**', 'package.json', 'package-lock.json');
ignore.push(
'node_modules/**',
'**/node_modules/**',
'.git/**',
'package.json',
'package-lock.json',
'yarn.lock',
'pnpm-lock.yaml',
);
globby(dir, { ignore: [...ignore.filter(x => x)] }).then(files => setFiles(files));
}, [dir, ignore]);

Expand All @@ -52,6 +60,8 @@ export default function Scan({ fromVersion, toVersion, sdks, dir, ignore }) {
useEffect(() => {
if (!matchers || !files) return;

console.log(files);

Promise.all(
// first we read all the files
files.map(async file => {
Expand Down

0 comments on commit 24478b2

Please sign in to comment.