Skip to content

Commit

Permalink
chore: replace fast-glob with tinyglobby
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Aug 26, 2024
1 parent 79a97fe commit d4e8a8a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 15 deletions.
4 changes: 2 additions & 2 deletions packages/cspell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@
"cspell-glob": "workspace:*",
"cspell-io": "workspace:*",
"cspell-lib": "workspace:*",
"fast-glob": "^3.3.2",
"fast-json-stable-stringify": "^2.1.0",
"file-entry-cache": "^9.0.0",
"get-stdin": "^9.0.0",
"semver": "^7.6.3",
"strip-ansi": "^7.1.0"
"strip-ansi": "^7.1.0",
"tinyglobby": "^0.2.5"
},
"engines": {
"node": ">=18"
Expand Down
9 changes: 4 additions & 5 deletions packages/cspell/src/app/util/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { posix } from 'node:path';
import type { CSpellUserSettings, Glob } from '@cspell/cspell-types';
import type { GlobPatternWithRoot } from 'cspell-glob';
import { fileOrGlobToGlob, GlobMatcher } from 'cspell-glob';
import type { Options as FastGlobOptions } from 'fast-glob';
import glob from 'fast-glob';
import type { GlobOptions as TinyGlobbyOptions } from 'tinyglobby';

Check warning on line 8 in packages/cspell/src/app/util/glob.ts

View workflow job for this annotation

GitHub Actions / cspell

Unknown word (tinyglobby)
import { glob } from 'tinyglobby';

Check warning on line 9 in packages/cspell/src/app/util/glob.ts

View workflow job for this annotation

GitHub Actions / cspell

Unknown word (tinyglobby)

import { clean } from './util.js';

Expand Down Expand Up @@ -34,13 +34,12 @@ export async function globP(pattern: string | string[], options?: GlobOptions):
const onlyFiles = options?.nodir;
const dot = options?.dot;
const patterns = typeof pattern === 'string' ? [pattern] : pattern;
const useOptions: FastGlobOptions = clean({
const useOptions: TinyGlobbyOptions = clean({
cwd,
onlyFiles,
dot,
ignore,
absolute: true,
followSymbolicLinks: false,
absolute: true
});

const compare = new Intl.Collator('en').compare;
Expand Down
43 changes: 35 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d4e8a8a

Please sign in to comment.