Skip to content

Commit 25aa1fa

Browse files
authored
chore(dynamic-import-vars): revert 2.1.4 changes (#1799)
1 parent 0f45234 commit 25aa1fa

File tree

4 files changed

+9
-30
lines changed

4 files changed

+9
-30
lines changed

Diff for: packages/dynamic-import-vars/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
"@rollup/pluginutils": "^5.0.1",
6767
"astring": "^1.8.5",
6868
"estree-walker": "^2.0.2",
69-
"magic-string": "^0.30.3",
70-
"tinyglobby": "^0.2.8"
69+
"fast-glob": "^3.2.12",
70+
"magic-string": "^0.30.3"
7171
},
7272
"devDependencies": {
7373
"acorn": "^8.8.0",

Diff for: packages/dynamic-import-vars/src/dynamic-import-to-glob.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'path';
22

3-
import { escapePath } from 'tinyglobby';
3+
import fastGlob from 'fast-glob';
44

55
export class VariableDynamicImportError extends Error {}
66

@@ -12,7 +12,7 @@ function sanitizeString(str) {
1212
if (str.includes('*')) {
1313
throw new VariableDynamicImportError('A dynamic import cannot contain * characters.');
1414
}
15-
return escapePath(str);
15+
return fastGlob.escapePath(str);
1616
}
1717

1818
function templateLiteralToGlob(node) {

Diff for: packages/dynamic-import-vars/src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22

33
import { walk } from 'estree-walker';
44
import MagicString from 'magic-string';
5-
import { globSync } from 'tinyglobby';
5+
import fastGlob from 'fast-glob';
66
import { generate } from 'astring';
77

88
import { createFilter } from '@rollup/pluginutils';
@@ -50,7 +50,7 @@ function dynamicImportVariables({ include, exclude, warnOnError, errorWhenNoFile
5050
}
5151

5252
// execute the glob
53-
const result = globSync(glob, { cwd: path.dirname(id), expandDirectories: false });
53+
const result = fastGlob.sync(glob, { cwd: path.dirname(id) });
5454
const paths = result.map((r) =>
5555
r.startsWith('./') || r.startsWith('../') ? r : `./${r}`
5656
);

Diff for: pnpm-lock.yaml

+3-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)