Skip to content

Commit

Permalink
chore: swap to tinyglobby
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaduck authored and jfmengels committed Nov 1, 2024
1 parent 30b82ff commit 2b166e2
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 59 deletions.
8 changes: 3 additions & 5 deletions lib/extra-files.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @import {ExtraFileRequest, NonElmFiles} from './types/content';
*/
const {glob} = require('tinyglobby');
const FS = require('./fs-wrapper');
const OsHelpers = require('./os-helpers');

Expand Down Expand Up @@ -37,9 +38,7 @@ async function collect(requests) {
* @returns {Promise<string[]>}
*/
async function getFiles(request) {
const {globby} = await import('globby');

return await globby(
return await glob(
request.files.map(
(file) =>
`${file.included ? '' : '!'}${OsHelpers.makePathOsAgnostic(
Expand All @@ -52,8 +51,7 @@ async function getFiles(request) {
expandDirectories: false,
caseSensitiveMatch: true,
onlyFiles: true,
dot: true,
extglob: false
dot: true
}
);
}
Expand Down
Loading

0 comments on commit 2b166e2

Please sign in to comment.