File tree Expand file tree Collapse file tree
commands/search-files-for-context-command/utils
context/providers/workspace Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,12 +2,7 @@ import * as path from 'path'
22import * as fs from 'fs'
33import { Logger } from '@shared/utils/logger'
44import { create_search_regex } from './create-search-regex'
5-
6- const IGNORED_FILES = new Set ( [
7- 'pnpm-lock.yaml' ,
8- 'package-lock.json' ,
9- 'yarn.lock'
10- ] )
5+ import { IGNORED_LOCK_FILES } from '@/constants/ignored-lock-files'
116
127export const search_files_by_term = async ( params : {
138 files : string [ ]
@@ -20,7 +15,7 @@ export const search_files_by_term = async (params: {
2015 try {
2116 const file_name = path . basename ( file_path )
2217
23- if ( IGNORED_FILES . has ( file_name ) ) {
18+ if ( IGNORED_LOCK_FILES . includes ( file_name ) ) {
2419 continue
2520 }
2621
Original file line number Diff line number Diff line change 1+ export const IGNORED_LOCK_FILES = [
2+ 'package-lock.json' ,
3+ 'pnpm-lock.yaml' ,
4+ 'yarn.lock' ,
5+ 'Cargo.lock' ,
6+ 'Gemfile.lock' ,
7+ 'composer.lock'
8+ ]
Original file line number Diff line number Diff line change 77 CONTEXT_CHECKED_TIMESTAMPS_STATE_KEY ,
88 RANGES_STATE_KEY
99} from '@/constants/state-keys'
10+ import { IGNORED_LOCK_FILES } from '@/constants/ignored-lock-files'
1011import { natural_sort } from '@/utils/natural-sort'
1112import { dictionary } from '@shared/constants/dictionary'
1213import { Logger } from '@shared/utils/logger'
@@ -1612,7 +1613,7 @@ export class WorkspaceProvider
16121613 this . _user_ignore_patterns . add ( patterns )
16131614 }
16141615
1615- this . _user_ignore_patterns . add ( 'node_modules' )
1616+ this . _user_ignore_patterns . add ( [ 'node_modules' , ... IGNORED_LOCK_FILES ] )
16161617
16171618 const allow_patterns = config . get < string [ ] > ( 'allowPatterns' )
16181619 this . _user_allow_patterns = ignore ( )
You can’t perform that action at this time.
0 commit comments