@lage-run/globby 14.0.3 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@lage-run/globby",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 11 Sep 2024 20:30:17 GMT",
5
+ "date": "Wed, 02 Oct 2024 20:25:42 GMT",
6
+ "version": "14.2.0",
7
+ "tag": "@lage-run/globby_v14.2.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "kchau@microsoft.com",
12
+ "package": "@lage-run/globby",
13
+ "commit": "6ecbd570669a07fa87429af5de13ec1adc58b864",
14
+ "comment": "packages into a bundled globby types"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Fri, 27 Sep 2024 20:03:49 GMT",
21
+ "version": "14.1.0",
22
+ "tag": "@lage-run/globby_v14.1.0",
23
+ "comments": {
24
+ "minor": [
25
+ {
26
+ "author": "kchau@microsoft.com",
27
+ "package": "@lage-run/globby",
28
+ "commit": "2919f9041f931dc6ef65017f7aedb9fef9dab66d",
29
+ "comment": "packages into a bundled globby types"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Wed, 11 Sep 2024 20:30:48 GMT",
6
36
  "version": "14.0.3",
7
37
  "tag": "@lage-run/globby_v14.0.3",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Change Log - @lage-run/globby
2
2
 
3
- This log was last generated on Wed, 11 Sep 2024 20:30:17 GMT and should not be manually modified.
3
+ <!-- This log was last generated on Wed, 02 Oct 2024 20:25:42 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 14.2.0
8
+
9
+ Wed, 02 Oct 2024 20:25:42 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - packages into a bundled globby types (kchau@microsoft.com)
14
+
15
+ ## 14.1.0
16
+
17
+ Fri, 27 Sep 2024 20:03:49 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - packages into a bundled globby types (kchau@microsoft.com)
22
+
7
23
  ## 14.0.3
8
24
 
9
- Wed, 11 Sep 2024 20:30:17 GMT
25
+ Wed, 11 Sep 2024 20:30:48 GMT
10
26
 
11
27
  ### Patches
12
28
 
@@ -0,0 +1,56 @@
1
+ import FastGlob from 'fast-glob';
2
+
3
+ export type ExpandDirectoriesOption = boolean | readonly string[] | {
4
+ files?: readonly string[];
5
+ extensions?: readonly string[];
6
+ };
7
+ export type FastGlobOptionsWithoutCwd = Omit<FastGlob.Options, "cwd">;
8
+ export type Options = {
9
+ /**
10
+ If set to `true`, `globby` will automatically glob directories for you. If you define an `Array` it will only glob files that matches the patterns inside the `Array`. You can also define an `Object` with `files` and `extensions` like in the example below.
11
+
12
+ Note that if you set this option to `false`, you won't get back matched directories unless you set `onlyFiles: false`.
13
+
14
+ @default true
15
+
16
+ @example
17
+ ```
18
+ import {globby} from 'globby';
19
+
20
+ const paths = await globby('images', {
21
+ expandDirectories: {
22
+ files: ['cat', 'unicorn', '*.jpg'],
23
+ extensions: ['png']
24
+ }
25
+ });
26
+
27
+ console.log(paths);
28
+ //=> ['cat.png', 'unicorn.png', 'cow.jpg', 'rainbow.jpg']
29
+ ```
30
+ */
31
+ readonly expandDirectories?: ExpandDirectoriesOption;
32
+ /**
33
+ Respect ignore patterns in `.gitignore` files that apply to the globbed files.
34
+
35
+ @default false
36
+ */
37
+ readonly gitignore?: boolean;
38
+ /**
39
+ Glob patterns to look for ignore files, which are then used to ignore globbed files.
40
+
41
+ This is a more generic form of the `gitignore` option, allowing you to find ignore files with a [compatible syntax](http://git-scm.com/docs/gitignore). For instance, this works with Babel's `.babelignore`, Prettier's `.prettierignore`, or ESLint's `.eslintignore` files.
42
+
43
+ @default undefined
44
+ */
45
+ readonly ignoreFiles?: string | readonly string[];
46
+ /**
47
+ The current working directory in which to search.
48
+
49
+ @default process.cwd()
50
+ */
51
+ readonly cwd?: URL | string;
52
+ } & FastGlobOptionsWithoutCwd;
53
+ export declare function globAsync(patterns: string[], options?: Options): Promise<string[]>;
54
+ export declare function glob(patterns: string[], options?: Options): string[];
55
+
56
+ export {};
@@ -0,0 +1,25 @@
1
+ // @ts-check
2
+ const path = require("path");
3
+
4
+ /** @type {import('dts-bundle-generator/config-schema').BundlerConfig} */
5
+ module.exports = {
6
+ compilationOptions: {
7
+ preferredConfigPath: path.join(__dirname, "tsconfig.json"),
8
+ },
9
+ entries: [
10
+ {
11
+ filePath: path.join(__dirname, "lib/index.d.ts"),
12
+ outFile: "./dist/index.d.ts",
13
+ libraries: {
14
+ // Inline any types from workspace packages into the dts bundle
15
+ inlinedLibraries: ["globby"],
16
+ },
17
+ output: {
18
+ // Only export the types which are explicitly exported in the original files
19
+ // (rather than all types referenced by exported types)
20
+ exportReferencedTypes: true,
21
+ noBanner: true,
22
+ },
23
+ },
24
+ ],
25
+ };
package/lib/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { type Options } from "globby";
2
+ export declare function globAsync(patterns: string[], options?: Options): Promise<string[]>;
3
+ export declare function glob(patterns: string[], options?: Options): string[];
4
+ export { type Options };
package/lib/index.js CHANGED
@@ -37,9 +37,9 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
37
37
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
38
38
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
39
39
 
40
- // ../../node_modules/globby/node_modules/fast-glob/out/utils/array.js
40
+ // ../../node_modules/fast-glob/out/utils/array.js
41
41
  var require_array = __commonJS({
42
- "../../node_modules/globby/node_modules/fast-glob/out/utils/array.js"(exports2) {
42
+ "../../node_modules/fast-glob/out/utils/array.js"(exports2) {
43
43
  "use strict";
44
44
  Object.defineProperty(exports2, "__esModule", { value: true });
45
45
  exports2.splitWhen = exports2.flatten = void 0;
@@ -64,9 +64,9 @@ var require_array = __commonJS({
64
64
  }
65
65
  });
66
66
 
67
- // ../../node_modules/globby/node_modules/fast-glob/out/utils/errno.js
67
+ // ../../node_modules/fast-glob/out/utils/errno.js
68
68
  var require_errno = __commonJS({
69
- "../../node_modules/globby/node_modules/fast-glob/out/utils/errno.js"(exports2) {
69
+ "../../node_modules/fast-glob/out/utils/errno.js"(exports2) {
70
70
  "use strict";
71
71
  Object.defineProperty(exports2, "__esModule", { value: true });
72
72
  exports2.isEnoentCodeError = void 0;
@@ -77,9 +77,9 @@ var require_errno = __commonJS({
77
77
  }
78
78
  });
79
79
 
80
- // ../../node_modules/globby/node_modules/fast-glob/out/utils/fs.js
80
+ // ../../node_modules/fast-glob/out/utils/fs.js
81
81
  var require_fs = __commonJS({
82
- "../../node_modules/globby/node_modules/fast-glob/out/utils/fs.js"(exports2) {
82
+ "../../node_modules/fast-glob/out/utils/fs.js"(exports2) {
83
83
  "use strict";
84
84
  Object.defineProperty(exports2, "__esModule", { value: true });
85
85
  exports2.createDirentFromStats = void 0;
@@ -102,9 +102,9 @@ var require_fs = __commonJS({
102
102
  }
103
103
  });
104
104
 
105
- // ../../node_modules/globby/node_modules/fast-glob/out/utils/path.js
105
+ // ../../node_modules/fast-glob/out/utils/path.js
106
106
  var require_path = __commonJS({
107
- "../../node_modules/globby/node_modules/fast-glob/out/utils/path.js"(exports2) {
107
+ "../../node_modules/fast-glob/out/utils/path.js"(exports2) {
108
108
  "use strict";
109
109
  Object.defineProperty(exports2, "__esModule", { value: true });
110
110
  exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
@@ -478,9 +478,9 @@ var require_to_regex_range = __commonJS({
478
478
  let shorthand = String(opts.shorthand);
479
479
  let capture = String(opts.capture);
480
480
  let wrap = String(opts.wrap);
481
- let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
482
- if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
483
- return toRegexRange.cache[cacheKey].result;
481
+ let cacheKey2 = min + ":" + max + "=" + relax + shorthand + capture + wrap;
482
+ if (toRegexRange.cache.hasOwnProperty(cacheKey2)) {
483
+ return toRegexRange.cache[cacheKey2].result;
484
484
  }
485
485
  let a = Math.min(min, max);
486
486
  let b = Math.max(min, max);
@@ -518,7 +518,7 @@ var require_to_regex_range = __commonJS({
518
518
  } else if (opts.wrap !== false && positives.length + negatives.length > 1) {
519
519
  state.result = `(?:${state.result})`;
520
520
  }
521
- toRegexRange.cache[cacheKey] = state;
521
+ toRegexRange.cache[cacheKey2] = state;
522
522
  return state.result;
523
523
  };
524
524
  function collatePatterns(neg, pos, options) {
@@ -1911,7 +1911,7 @@ var require_scan = __commonJS({
1911
1911
  }
1912
1912
  let base = str;
1913
1913
  let prefix = "";
1914
- let glob = "";
1914
+ let glob2 = "";
1915
1915
  if (start > 0) {
1916
1916
  prefix = str.slice(0, start);
1917
1917
  str = str.slice(start);
@@ -1919,10 +1919,10 @@ var require_scan = __commonJS({
1919
1919
  }
1920
1920
  if (base && isGlob === true && lastIndex > 0) {
1921
1921
  base = str.slice(0, lastIndex);
1922
- glob = str.slice(lastIndex);
1922
+ glob2 = str.slice(lastIndex);
1923
1923
  } else if (isGlob === true) {
1924
1924
  base = "";
1925
- glob = str;
1925
+ glob2 = str;
1926
1926
  } else {
1927
1927
  base = str;
1928
1928
  }
@@ -1932,7 +1932,7 @@ var require_scan = __commonJS({
1932
1932
  }
1933
1933
  }
1934
1934
  if (opts.unescape === true) {
1935
- if (glob) glob = utils.removeBackslashes(glob);
1935
+ if (glob2) glob2 = utils.removeBackslashes(glob2);
1936
1936
  if (base && backslashes === true) {
1937
1937
  base = utils.removeBackslashes(base);
1938
1938
  }
@@ -1942,7 +1942,7 @@ var require_scan = __commonJS({
1942
1942
  input,
1943
1943
  start,
1944
1944
  base,
1945
- glob,
1945
+ glob: glob2,
1946
1946
  isBrace,
1947
1947
  isBracket,
1948
1948
  isGlob,
@@ -2780,9 +2780,9 @@ var require_picomatch = __commonJS({
2780
2780
  var utils = require_utils2();
2781
2781
  var constants = require_constants2();
2782
2782
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
2783
- var picomatch = (glob, options, returnState = false) => {
2784
- if (Array.isArray(glob)) {
2785
- const fns = glob.map((input) => picomatch(input, options, returnState));
2783
+ var picomatch = (glob2, options, returnState = false) => {
2784
+ if (Array.isArray(glob2)) {
2785
+ const fns = glob2.map((input) => picomatch(input, options, returnState));
2786
2786
  const arrayMatcher = (str) => {
2787
2787
  for (const isMatch of fns) {
2788
2788
  const state2 = isMatch(str);
@@ -2792,13 +2792,13 @@ var require_picomatch = __commonJS({
2792
2792
  };
2793
2793
  return arrayMatcher;
2794
2794
  }
2795
- const isState = isObject(glob) && glob.tokens && glob.input;
2796
- if (glob === "" || typeof glob !== "string" && !isState) {
2795
+ const isState = isObject(glob2) && glob2.tokens && glob2.input;
2796
+ if (glob2 === "" || typeof glob2 !== "string" && !isState) {
2797
2797
  throw new TypeError("Expected pattern to be a non-empty string");
2798
2798
  }
2799
2799
  const opts = options || {};
2800
2800
  const posix = utils.isWindows(options);
2801
- const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
2801
+ const regex = isState ? picomatch.compileRe(glob2, options) : picomatch.makeRe(glob2, options, false, true);
2802
2802
  const state = regex.state;
2803
2803
  delete regex.state;
2804
2804
  let isIgnored = () => false;
@@ -2807,8 +2807,8 @@ var require_picomatch = __commonJS({
2807
2807
  isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
2808
2808
  }
2809
2809
  const matcher = (input, returnObject = false) => {
2810
- const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
2811
- const result = { glob, state, regex, posix, input, output, match, isMatch };
2810
+ const { isMatch, match, output } = picomatch.test(input, regex, options, { glob: glob2, posix });
2811
+ const result = { glob: glob2, state, regex, posix, input, output, match, isMatch };
2812
2812
  if (typeof opts.onResult === "function") {
2813
2813
  opts.onResult(result);
2814
2814
  }
@@ -2833,7 +2833,7 @@ var require_picomatch = __commonJS({
2833
2833
  }
2834
2834
  return matcher;
2835
2835
  };
2836
- picomatch.test = (input, regex, options, { glob, posix } = {}) => {
2836
+ picomatch.test = (input, regex, options, { glob: glob2, posix } = {}) => {
2837
2837
  if (typeof input !== "string") {
2838
2838
  throw new TypeError("Expected input to be a string");
2839
2839
  }
@@ -2842,11 +2842,11 @@ var require_picomatch = __commonJS({
2842
2842
  }
2843
2843
  const opts = options || {};
2844
2844
  const format = opts.format || (posix ? utils.toPosixSlashes : null);
2845
- let match = input === glob;
2845
+ let match = input === glob2;
2846
2846
  let output = match && format ? format(input) : input;
2847
2847
  if (match === false) {
2848
2848
  output = format ? format(input) : input;
2849
- match = output === glob;
2849
+ match = output === glob2;
2850
2850
  }
2851
2851
  if (match === false || opts.capture === true) {
2852
2852
  if (opts.matchBase === true || opts.basename === true) {
@@ -2857,8 +2857,8 @@ var require_picomatch = __commonJS({
2857
2857
  }
2858
2858
  return { isMatch: Boolean(match), match, output };
2859
2859
  };
2860
- picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
2861
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
2860
+ picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => {
2861
+ const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options);
2862
2862
  return regex.test(path2.basename(input));
2863
2863
  };
2864
2864
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
@@ -2919,9 +2919,9 @@ var require_picomatch2 = __commonJS({
2919
2919
  }
2920
2920
  });
2921
2921
 
2922
- // ../../node_modules/micromatch/index.js
2922
+ // ../../node_modules/fast-glob/node_modules/micromatch/index.js
2923
2923
  var require_micromatch = __commonJS({
2924
- "../../node_modules/micromatch/index.js"(exports2, module2) {
2924
+ "../../node_modules/fast-glob/node_modules/micromatch/index.js"(exports2, module2) {
2925
2925
  "use strict";
2926
2926
  var util = require("util");
2927
2927
  var braces = require_braces();
@@ -3041,9 +3041,9 @@ var require_micromatch = __commonJS({
3041
3041
  }
3042
3042
  return [].concat(patterns).every((p) => picomatch(p, options)(str));
3043
3043
  };
3044
- micromatch.capture = (glob, input, options) => {
3044
+ micromatch.capture = (glob2, input, options) => {
3045
3045
  let posix = utils.isWindows(options);
3046
- let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
3046
+ let regex = picomatch.makeRe(String(glob2), { ...options, capture: true });
3047
3047
  let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
3048
3048
  if (match) {
3049
3049
  return match.slice(1).map((v) => v === void 0 ? "" : v);
@@ -3075,9 +3075,9 @@ var require_micromatch = __commonJS({
3075
3075
  }
3076
3076
  });
3077
3077
 
3078
- // ../../node_modules/globby/node_modules/fast-glob/out/utils/pattern.js
3078
+ // ../../node_modules/fast-glob/out/utils/pattern.js
3079
3079
  var require_pattern = __commonJS({
3080
- "../../node_modules/globby/node_modules/fast-glob/out/utils/pattern.js"(exports2) {
3080
+ "../../node_modules/fast-glob/out/utils/pattern.js"(exports2) {
3081
3081
  "use strict";
3082
3082
  Object.defineProperty(exports2, "__esModule", { value: true });
3083
3083
  exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
@@ -3342,9 +3342,9 @@ var require_merge2 = __commonJS({
3342
3342
  }
3343
3343
  });
3344
3344
 
3345
- // ../../node_modules/globby/node_modules/fast-glob/out/utils/stream.js
3345
+ // ../../node_modules/fast-glob/out/utils/stream.js
3346
3346
  var require_stream = __commonJS({
3347
- "../../node_modules/globby/node_modules/fast-glob/out/utils/stream.js"(exports2) {
3347
+ "../../node_modules/fast-glob/out/utils/stream.js"(exports2) {
3348
3348
  "use strict";
3349
3349
  Object.defineProperty(exports2, "__esModule", { value: true });
3350
3350
  exports2.merge = void 0;
@@ -3365,9 +3365,9 @@ var require_stream = __commonJS({
3365
3365
  }
3366
3366
  });
3367
3367
 
3368
- // ../../node_modules/globby/node_modules/fast-glob/out/utils/string.js
3368
+ // ../../node_modules/fast-glob/out/utils/string.js
3369
3369
  var require_string = __commonJS({
3370
- "../../node_modules/globby/node_modules/fast-glob/out/utils/string.js"(exports2) {
3370
+ "../../node_modules/fast-glob/out/utils/string.js"(exports2) {
3371
3371
  "use strict";
3372
3372
  Object.defineProperty(exports2, "__esModule", { value: true });
3373
3373
  exports2.isEmpty = exports2.isString = void 0;
@@ -3382,9 +3382,9 @@ var require_string = __commonJS({
3382
3382
  }
3383
3383
  });
3384
3384
 
3385
- // ../../node_modules/globby/node_modules/fast-glob/out/utils/index.js
3385
+ // ../../node_modules/fast-glob/out/utils/index.js
3386
3386
  var require_utils3 = __commonJS({
3387
- "../../node_modules/globby/node_modules/fast-glob/out/utils/index.js"(exports2) {
3387
+ "../../node_modules/fast-glob/out/utils/index.js"(exports2) {
3388
3388
  "use strict";
3389
3389
  Object.defineProperty(exports2, "__esModule", { value: true });
3390
3390
  exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0;
@@ -3405,9 +3405,9 @@ var require_utils3 = __commonJS({
3405
3405
  }
3406
3406
  });
3407
3407
 
3408
- // ../../node_modules/globby/node_modules/fast-glob/out/managers/tasks.js
3408
+ // ../../node_modules/fast-glob/out/managers/tasks.js
3409
3409
  var require_tasks = __commonJS({
3410
- "../../node_modules/globby/node_modules/fast-glob/out/managers/tasks.js"(exports2) {
3410
+ "../../node_modules/fast-glob/out/managers/tasks.js"(exports2) {
3411
3411
  "use strict";
3412
3412
  Object.defineProperty(exports2, "__esModule", { value: true });
3413
3413
  exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
@@ -4081,7 +4081,7 @@ var require_queue = __commonJS({
4081
4081
  if (concurrency < 1) {
4082
4082
  throw new Error("fastqueue concurrency must be greater than 1");
4083
4083
  }
4084
- var cache = reusify(Task);
4084
+ var cache2 = reusify(Task);
4085
4085
  var queueHead = null;
4086
4086
  var queueTail = null;
4087
4087
  var _running = 0;
@@ -4141,7 +4141,7 @@ var require_queue = __commonJS({
4141
4141
  return _running === 0 && self.length() === 0;
4142
4142
  }
4143
4143
  function push(value, done) {
4144
- var current = cache.get();
4144
+ var current = cache2.get();
4145
4145
  current.context = context;
4146
4146
  current.release = release;
4147
4147
  current.value = value;
@@ -4162,7 +4162,7 @@ var require_queue = __commonJS({
4162
4162
  }
4163
4163
  }
4164
4164
  function unshift(value, done) {
4165
- var current = cache.get();
4165
+ var current = cache2.get();
4166
4166
  current.context = context;
4167
4167
  current.release = release;
4168
4168
  current.value = value;
@@ -4183,7 +4183,7 @@ var require_queue = __commonJS({
4183
4183
  }
4184
4184
  function release(holder) {
4185
4185
  if (holder) {
4186
- cache.release(holder);
4186
+ cache2.release(holder);
4187
4187
  }
4188
4188
  var next = queueHead;
4189
4189
  if (next) {
@@ -4694,9 +4694,9 @@ var require_out3 = __commonJS({
4694
4694
  }
4695
4695
  });
4696
4696
 
4697
- // ../../node_modules/globby/node_modules/fast-glob/out/readers/reader.js
4697
+ // ../../node_modules/fast-glob/out/readers/reader.js
4698
4698
  var require_reader2 = __commonJS({
4699
- "../../node_modules/globby/node_modules/fast-glob/out/readers/reader.js"(exports2) {
4699
+ "../../node_modules/fast-glob/out/readers/reader.js"(exports2) {
4700
4700
  "use strict";
4701
4701
  Object.defineProperty(exports2, "__esModule", { value: true });
4702
4702
  var path2 = require("path");
@@ -4733,9 +4733,9 @@ var require_reader2 = __commonJS({
4733
4733
  }
4734
4734
  });
4735
4735
 
4736
- // ../../node_modules/globby/node_modules/fast-glob/out/readers/stream.js
4736
+ // ../../node_modules/fast-glob/out/readers/stream.js
4737
4737
  var require_stream3 = __commonJS({
4738
- "../../node_modules/globby/node_modules/fast-glob/out/readers/stream.js"(exports2) {
4738
+ "../../node_modules/fast-glob/out/readers/stream.js"(exports2) {
4739
4739
  "use strict";
4740
4740
  Object.defineProperty(exports2, "__esModule", { value: true });
4741
4741
  var stream_1 = require("stream");
@@ -4790,9 +4790,9 @@ var require_stream3 = __commonJS({
4790
4790
  }
4791
4791
  });
4792
4792
 
4793
- // ../../node_modules/globby/node_modules/fast-glob/out/readers/async.js
4793
+ // ../../node_modules/fast-glob/out/readers/async.js
4794
4794
  var require_async5 = __commonJS({
4795
- "../../node_modules/globby/node_modules/fast-glob/out/readers/async.js"(exports2) {
4795
+ "../../node_modules/fast-glob/out/readers/async.js"(exports2) {
4796
4796
  "use strict";
4797
4797
  Object.defineProperty(exports2, "__esModule", { value: true });
4798
4798
  var fsWalk = require_out3();
@@ -4829,9 +4829,9 @@ var require_async5 = __commonJS({
4829
4829
  }
4830
4830
  });
4831
4831
 
4832
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/matchers/matcher.js
4832
+ // ../../node_modules/fast-glob/out/providers/matchers/matcher.js
4833
4833
  var require_matcher = __commonJS({
4834
- "../../node_modules/globby/node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) {
4834
+ "../../node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) {
4835
4835
  "use strict";
4836
4836
  Object.defineProperty(exports2, "__esModule", { value: true });
4837
4837
  var utils = require_utils3();
@@ -4880,9 +4880,9 @@ var require_matcher = __commonJS({
4880
4880
  }
4881
4881
  });
4882
4882
 
4883
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/matchers/partial.js
4883
+ // ../../node_modules/fast-glob/out/providers/matchers/partial.js
4884
4884
  var require_partial = __commonJS({
4885
- "../../node_modules/globby/node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) {
4885
+ "../../node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) {
4886
4886
  "use strict";
4887
4887
  Object.defineProperty(exports2, "__esModule", { value: true });
4888
4888
  var matcher_1 = require_matcher();
@@ -4917,9 +4917,9 @@ var require_partial = __commonJS({
4917
4917
  }
4918
4918
  });
4919
4919
 
4920
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/filters/deep.js
4920
+ // ../../node_modules/fast-glob/out/providers/filters/deep.js
4921
4921
  var require_deep = __commonJS({
4922
- "../../node_modules/globby/node_modules/fast-glob/out/providers/filters/deep.js"(exports2) {
4922
+ "../../node_modules/fast-glob/out/providers/filters/deep.js"(exports2) {
4923
4923
  "use strict";
4924
4924
  Object.defineProperty(exports2, "__esModule", { value: true });
4925
4925
  var utils = require_utils3();
@@ -4982,9 +4982,9 @@ var require_deep = __commonJS({
4982
4982
  }
4983
4983
  });
4984
4984
 
4985
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/filters/entry.js
4985
+ // ../../node_modules/fast-glob/out/providers/filters/entry.js
4986
4986
  var require_entry = __commonJS({
4987
- "../../node_modules/globby/node_modules/fast-glob/out/providers/filters/entry.js"(exports2) {
4987
+ "../../node_modules/fast-glob/out/providers/filters/entry.js"(exports2) {
4988
4988
  "use strict";
4989
4989
  Object.defineProperty(exports2, "__esModule", { value: true });
4990
4990
  var utils = require_utils3();
@@ -5048,9 +5048,9 @@ var require_entry = __commonJS({
5048
5048
  }
5049
5049
  });
5050
5050
 
5051
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/filters/error.js
5051
+ // ../../node_modules/fast-glob/out/providers/filters/error.js
5052
5052
  var require_error = __commonJS({
5053
- "../../node_modules/globby/node_modules/fast-glob/out/providers/filters/error.js"(exports2) {
5053
+ "../../node_modules/fast-glob/out/providers/filters/error.js"(exports2) {
5054
5054
  "use strict";
5055
5055
  Object.defineProperty(exports2, "__esModule", { value: true });
5056
5056
  var utils = require_utils3();
@@ -5069,9 +5069,9 @@ var require_error = __commonJS({
5069
5069
  }
5070
5070
  });
5071
5071
 
5072
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/transformers/entry.js
5072
+ // ../../node_modules/fast-glob/out/providers/transformers/entry.js
5073
5073
  var require_entry2 = __commonJS({
5074
- "../../node_modules/globby/node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) {
5074
+ "../../node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) {
5075
5075
  "use strict";
5076
5076
  Object.defineProperty(exports2, "__esModule", { value: true });
5077
5077
  var utils = require_utils3();
@@ -5101,9 +5101,9 @@ var require_entry2 = __commonJS({
5101
5101
  }
5102
5102
  });
5103
5103
 
5104
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/provider.js
5104
+ // ../../node_modules/fast-glob/out/providers/provider.js
5105
5105
  var require_provider = __commonJS({
5106
- "../../node_modules/globby/node_modules/fast-glob/out/providers/provider.js"(exports2) {
5106
+ "../../node_modules/fast-glob/out/providers/provider.js"(exports2) {
5107
5107
  "use strict";
5108
5108
  Object.defineProperty(exports2, "__esModule", { value: true });
5109
5109
  var path2 = require("path");
@@ -5155,9 +5155,9 @@ var require_provider = __commonJS({
5155
5155
  }
5156
5156
  });
5157
5157
 
5158
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/async.js
5158
+ // ../../node_modules/fast-glob/out/providers/async.js
5159
5159
  var require_async6 = __commonJS({
5160
- "../../node_modules/globby/node_modules/fast-glob/out/providers/async.js"(exports2) {
5160
+ "../../node_modules/fast-glob/out/providers/async.js"(exports2) {
5161
5161
  "use strict";
5162
5162
  Object.defineProperty(exports2, "__esModule", { value: true });
5163
5163
  var async_1 = require_async5();
@@ -5184,9 +5184,9 @@ var require_async6 = __commonJS({
5184
5184
  }
5185
5185
  });
5186
5186
 
5187
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/stream.js
5187
+ // ../../node_modules/fast-glob/out/providers/stream.js
5188
5188
  var require_stream4 = __commonJS({
5189
- "../../node_modules/globby/node_modules/fast-glob/out/providers/stream.js"(exports2) {
5189
+ "../../node_modules/fast-glob/out/providers/stream.js"(exports2) {
5190
5190
  "use strict";
5191
5191
  Object.defineProperty(exports2, "__esModule", { value: true });
5192
5192
  var stream_1 = require("stream");
@@ -5218,9 +5218,9 @@ var require_stream4 = __commonJS({
5218
5218
  }
5219
5219
  });
5220
5220
 
5221
- // ../../node_modules/globby/node_modules/fast-glob/out/readers/sync.js
5221
+ // ../../node_modules/fast-glob/out/readers/sync.js
5222
5222
  var require_sync5 = __commonJS({
5223
- "../../node_modules/globby/node_modules/fast-glob/out/readers/sync.js"(exports2) {
5223
+ "../../node_modules/fast-glob/out/readers/sync.js"(exports2) {
5224
5224
  "use strict";
5225
5225
  Object.defineProperty(exports2, "__esModule", { value: true });
5226
5226
  var fsStat = require_out();
@@ -5266,9 +5266,9 @@ var require_sync5 = __commonJS({
5266
5266
  }
5267
5267
  });
5268
5268
 
5269
- // ../../node_modules/globby/node_modules/fast-glob/out/providers/sync.js
5269
+ // ../../node_modules/fast-glob/out/providers/sync.js
5270
5270
  var require_sync6 = __commonJS({
5271
- "../../node_modules/globby/node_modules/fast-glob/out/providers/sync.js"(exports2) {
5271
+ "../../node_modules/fast-glob/out/providers/sync.js"(exports2) {
5272
5272
  "use strict";
5273
5273
  Object.defineProperty(exports2, "__esModule", { value: true });
5274
5274
  var sync_1 = require_sync5();
@@ -5295,9 +5295,9 @@ var require_sync6 = __commonJS({
5295
5295
  }
5296
5296
  });
5297
5297
 
5298
- // ../../node_modules/globby/node_modules/fast-glob/out/settings.js
5298
+ // ../../node_modules/fast-glob/out/settings.js
5299
5299
  var require_settings4 = __commonJS({
5300
- "../../node_modules/globby/node_modules/fast-glob/out/settings.js"(exports2) {
5300
+ "../../node_modules/fast-glob/out/settings.js"(exports2) {
5301
5301
  "use strict";
5302
5302
  Object.defineProperty(exports2, "__esModule", { value: true });
5303
5303
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
@@ -5355,9 +5355,9 @@ var require_settings4 = __commonJS({
5355
5355
  }
5356
5356
  });
5357
5357
 
5358
- // ../../node_modules/globby/node_modules/fast-glob/out/index.js
5358
+ // ../../node_modules/fast-glob/out/index.js
5359
5359
  var require_out4 = __commonJS({
5360
- "../../node_modules/globby/node_modules/fast-glob/out/index.js"(exports2, module2) {
5360
+ "../../node_modules/fast-glob/out/index.js"(exports2, module2) {
5361
5361
  "use strict";
5362
5362
  var taskManager = require_tasks();
5363
5363
  var async_1 = require_async6();
@@ -5777,33 +5777,33 @@ var require_ignore = __commonJS({
5777
5777
  };
5778
5778
  }
5779
5779
  // @returns {TestResult}
5780
- _test(originalPath, cache, checkUnignored, slices) {
5780
+ _test(originalPath, cache2, checkUnignored, slices) {
5781
5781
  const path2 = originalPath && checkPath.convert(originalPath);
5782
5782
  checkPath(
5783
5783
  path2,
5784
5784
  originalPath,
5785
5785
  this._allowRelativePaths ? RETURN_FALSE : throwError
5786
5786
  );
5787
- return this._t(path2, cache, checkUnignored, slices);
5787
+ return this._t(path2, cache2, checkUnignored, slices);
5788
5788
  }
5789
- _t(path2, cache, checkUnignored, slices) {
5790
- if (path2 in cache) {
5791
- return cache[path2];
5789
+ _t(path2, cache2, checkUnignored, slices) {
5790
+ if (path2 in cache2) {
5791
+ return cache2[path2];
5792
5792
  }
5793
5793
  if (!slices) {
5794
5794
  slices = path2.split(SLASH);
5795
5795
  }
5796
5796
  slices.pop();
5797
5797
  if (!slices.length) {
5798
- return cache[path2] = this._testOne(path2, checkUnignored);
5798
+ return cache2[path2] = this._testOne(path2, checkUnignored);
5799
5799
  }
5800
5800
  const parent = this._t(
5801
5801
  slices.join(SLASH) + SLASH,
5802
- cache,
5802
+ cache2,
5803
5803
  checkUnignored,
5804
5804
  slices
5805
5805
  );
5806
- return cache[path2] = parent.ignored ? parent : this._testOne(path2, checkUnignored);
5806
+ return cache2[path2] = parent.ignored ? parent : this._testOne(path2, checkUnignored);
5807
5807
  }
5808
5808
  ignores(path2) {
5809
5809
  return this._test(path2, this._ignoreCache, false).ignored;
@@ -5839,15 +5839,8 @@ var require_ignore = __commonJS({
5839
5839
  // src/index.mts
5840
5840
  var src_exports = {};
5841
5841
  __export(src_exports, {
5842
- convertPathToPattern: () => convertPathToPattern,
5843
- generateGlobTasks: () => generateGlobTasks,
5844
- generateGlobTasksSync: () => generateGlobTasksSync,
5845
- globby: () => globby,
5846
- globbyStream: () => globbyStream,
5847
- globbySync: () => globbySync,
5848
- isDynamicPattern: () => isDynamicPattern,
5849
- isGitIgnored: () => isGitIgnored,
5850
- isGitIgnoredSync: () => isGitIgnoredSync
5842
+ glob: () => glob,
5843
+ globAsync: () => globAsync
5851
5844
  });
5852
5845
  module.exports = __toCommonJS(src_exports);
5853
5846
 
@@ -6180,8 +6173,6 @@ var isIgnoredByIgnoreFilesSync = (patterns, options) => {
6180
6173
  }));
6181
6174
  return getIsIgnoredPredicate(files, cwd);
6182
6175
  };
6183
- var isGitIgnored = (options) => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);
6184
- var isGitIgnoredSync = (options) => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);
6185
6176
 
6186
6177
  // ../../node_modules/globby/index.js
6187
6178
  var assertPatternsInput = (patterns) => {
@@ -6372,17 +6363,30 @@ var isDynamicPattern = normalizeArgumentsSync(
6372
6363
  var generateGlobTasks = normalizeArguments(generateTasks);
6373
6364
  var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
6374
6365
  var { convertPathToPattern } = import_fast_glob2.default;
6366
+
6367
+ // src/index.mts
6368
+ var cache = /* @__PURE__ */ new Map();
6369
+ function cacheKey(patterns, options = {}) {
6370
+ return JSON.stringify({ patterns, options });
6371
+ }
6372
+ async function globAsync(patterns, options) {
6373
+ const key = cacheKey(patterns, options);
6374
+ if (!cache.has(key)) {
6375
+ cache.set(key, await globby(patterns, options));
6376
+ }
6377
+ return cache.get(key) || [];
6378
+ }
6379
+ function glob(patterns, options) {
6380
+ const key = cacheKey(patterns, options);
6381
+ if (!cache.has(key)) {
6382
+ cache.set(key, globbySync(patterns, options));
6383
+ }
6384
+ return cache.get(key) || [];
6385
+ }
6375
6386
  // Annotate the CommonJS export names for ESM import in node:
6376
6387
  0 && (module.exports = {
6377
- convertPathToPattern,
6378
- generateGlobTasks,
6379
- generateGlobTasksSync,
6380
- globby,
6381
- globbyStream,
6382
- globbySync,
6383
- isDynamicPattern,
6384
- isGitIgnored,
6385
- isGitIgnoredSync
6388
+ glob,
6389
+ globAsync
6386
6390
  });
6387
6391
  /*! Bundled license information:
6388
6392
 
package/package.json CHANGED
@@ -1,21 +1,24 @@
1
1
  {
2
2
  "name": "@lage-run/globby",
3
- "version": "14.0.3",
3
+ "version": "14.2.0",
4
4
  "main": "lib/index.js",
5
5
  "scripts": {
6
- "build": "esbuild src/index.mts --bundle --platform=node --target=node14 --format=cjs --outfile=lib/index.js && tsc"
6
+ "transpile": "esbuild src/index.mts --bundle --platform=node --target=node14 --format=cjs --outfile=lib/index.js",
7
+ "types": "yarn tsc && node scripts/rename.js && yarn dts-bundle-generator --config ./dts-bundle.config.js"
7
8
  },
8
9
  "license": "MIT",
9
10
  "devDependencies": {
11
+ "dts-bundle-generator": "^9.5.1",
10
12
  "esbuild": "^0.21.5",
11
- "globby": "14.0.1"
13
+ "globby": "^14.0.2",
14
+ "typescript": "~5.0.3"
12
15
  },
13
16
  "exports": {
14
17
  ".": {
18
+ "types": "./dist/index.d.ts",
15
19
  "import": "./lib/index.js",
16
20
  "require": "./lib/index.js",
17
- "source": "./src/index.mts",
18
- "types": "./lib/index.d.ts"
21
+ "source": "./src/index.mts"
19
22
  }
20
23
  }
21
24
  }
package/tsconfig.json CHANGED
@@ -5,5 +5,7 @@
5
5
  "emitDeclarationOnly": true,
6
6
  "module": "Node16"
7
7
  },
8
- "include": ["src"]
8
+ "files": [],
9
+ "include": ["src/index.mts"],
10
+ "exclude": ["lib/**/*.mts"]
9
11
  }
package/lib/index.d.mts DELETED
@@ -1 +0,0 @@
1
- export * from "globby";