view-ignored 0.6.0 → 0.7.1

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.
Files changed (47) hide show
  1. package/out/browser_scan.d.ts +1 -1
  2. package/out/browser_scan.js +14 -9
  3. package/out/browser_stream.d.ts +1 -1
  4. package/out/browser_stream.js +14 -9
  5. package/out/patterns/extractor.d.ts +16 -10
  6. package/out/patterns/gitignore.d.ts +1 -1
  7. package/out/patterns/gitignore.js +1 -1
  8. package/out/patterns/ignores.d.ts +30 -1
  9. package/out/patterns/jsrjson.d.ts +2 -2
  10. package/out/patterns/jsrjson.js +2 -2
  11. package/out/patterns/matcherContext.d.ts +8 -8
  12. package/out/patterns/matcherContextPatch.d.ts +2 -2
  13. package/out/patterns/matcherContextPatch.js +16 -11
  14. package/out/patterns/matcherStream.d.ts +9 -9
  15. package/out/patterns/matcherStream.js +1 -1
  16. package/out/patterns/packagejson.d.ts +1 -1
  17. package/out/patterns/packagejson.js +1 -1
  18. package/out/patterns/pattern.d.ts +6 -6
  19. package/out/patterns/pattern.js +2 -2
  20. package/out/patterns/patternMatcher.d.ts +3 -3
  21. package/out/patterns/resolveSources.d.ts +4 -4
  22. package/out/patterns/resolveSources.js +16 -18
  23. package/out/patterns/signedPattern.d.ts +21 -12
  24. package/out/patterns/signedPattern.js +60 -25
  25. package/out/patterns/source.d.ts +7 -7
  26. package/out/patterns/source.js +1 -1
  27. package/out/patterns/stringCompile.d.ts +1 -1
  28. package/out/patterns/stringCompile.js +1 -1
  29. package/out/scan.d.ts +1 -1
  30. package/out/scan.js +1 -1
  31. package/out/stream.d.ts +1 -1
  32. package/out/stream.js +1 -1
  33. package/out/targets/git.d.ts +1 -1
  34. package/out/targets/git.js +1 -1
  35. package/out/targets/jsr.d.ts +1 -1
  36. package/out/targets/jsr.js +1 -1
  37. package/out/targets/npm.d.ts +1 -1
  38. package/out/targets/npm.js +1 -1
  39. package/out/targets/target.d.ts +3 -3
  40. package/out/targets/vsce.d.ts +1 -1
  41. package/out/targets/vsce.js +1 -1
  42. package/out/targets/yarn.d.ts +1 -1
  43. package/out/targets/yarn.js +1 -1
  44. package/out/types.d.ts +11 -11
  45. package/out/walk.d.ts +1 -0
  46. package/out/walk.js +4 -7
  47. package/package.json +1 -1
@@ -12,7 +12,7 @@ export type * from "./types.js";
12
12
  * @param options Scan options.
13
13
  * @returns A promise that resolves to a {@link MatcherContext} containing the scan results.
14
14
  *
15
- * @since 0.0.6
15
+ * @since 0.6.0
16
16
  */
17
17
  export declare function scan(options: ScanOptions & {
18
18
  fs: FsAdapter;
@@ -1,4 +1,5 @@
1
1
  import { resolve } from "node:path";
2
+ import { relative } from "node:path/posix";
2
3
  import { normalizeCwd } from "./normalizeCwd.js";
3
4
  import { opendir } from "./opendir.js";
4
5
  import { walkIncludes } from "./walk.js";
@@ -13,10 +14,10 @@ import { walkIncludes } from "./walk.js";
13
14
  * @param options Scan options.
14
15
  * @returns A promise that resolves to a {@link MatcherContext} containing the scan results.
15
16
  *
16
- * @since 0.0.6
17
+ * @since 0.6.0
17
18
  */
18
19
  export function scan(options) {
19
- const { target, cwd, within: select = ".", invert = false, depth: maxDepth = Infinity, signal = null, fastDepth = false, fastInternal = false, fs, } = options;
20
+ const { target, cwd, within = ".", invert = false, depth: maxDepth = Infinity, signal = null, fastDepth = false, fastInternal = false, fs, } = options;
20
21
  if (maxDepth < 0) {
21
22
  throw new TypeError("Depth must be a non-negative integer");
22
23
  }
@@ -32,7 +33,7 @@ export function scan(options) {
32
33
  const normalCwd = normalizeCwd(cwd);
33
34
  const scanOptions = {
34
35
  cwd: normalCwd,
35
- within: select,
36
+ within,
36
37
  depth: maxDepth,
37
38
  fastDepth,
38
39
  fastInternal,
@@ -41,12 +42,16 @@ export function scan(options) {
41
42
  signal,
42
43
  target,
43
44
  };
44
- const result = opendir(fs, resolve(normalCwd, select), (entry) => walkIncludes({
45
- entry,
46
- ctx,
47
- stream: undefined,
48
- scanOptions,
49
- }));
45
+ const result = opendir(fs, normalizeCwd(resolve(normalCwd, within)), (entry) => {
46
+ const path = relative(normalCwd, normalizeCwd(entry.parentPath) + "/" + entry.name);
47
+ return walkIncludes({
48
+ path,
49
+ entry,
50
+ ctx,
51
+ stream: undefined,
52
+ scanOptions,
53
+ });
54
+ });
50
55
  return (async () => {
51
56
  await result;
52
57
  return ctx;
@@ -4,7 +4,7 @@ export type * from "./types.js";
4
4
  /**
5
5
  * @see {@link browserScan}
6
6
  *
7
- * @since 0.0.6
7
+ * @since 0.6.0
8
8
  */
9
9
  export declare function scanStream(options: ScanOptions & {
10
10
  fs: FsAdapter;
@@ -1,4 +1,5 @@
1
1
  import { resolve } from "node:path";
2
+ import { relative } from "node:path/posix";
2
3
  import { normalizeCwd } from "./normalizeCwd.js";
3
4
  import { opendir } from "./opendir.js";
4
5
  import { MatcherStream } from "./patterns/matcherStream.js";
@@ -6,10 +7,10 @@ import { walkIncludes } from "./walk.js";
6
7
  /**
7
8
  * @see {@link browserScan}
8
9
  *
9
- * @since 0.0.6
10
+ * @since 0.6.0
10
11
  */
11
12
  export function scanStream(options) {
12
- const { target, cwd, within: select = ".", invert = false, depth: maxDepth = Infinity, signal = null, fastDepth = false, fastInternal = false, fs, } = options;
13
+ const { target, cwd, within = ".", invert = false, depth: maxDepth = Infinity, signal = null, fastDepth = false, fastInternal = false, fs, } = options;
13
14
  const ctx = {
14
15
  paths: new Map(),
15
16
  external: new Map(),
@@ -23,7 +24,7 @@ export function scanStream(options) {
23
24
  const normalCwd = normalizeCwd(cwd);
24
25
  const scanOptions = {
25
26
  cwd: normalCwd,
26
- within: select,
27
+ within,
27
28
  depth: maxDepth,
28
29
  fastDepth,
29
30
  fastInternal,
@@ -32,12 +33,16 @@ export function scanStream(options) {
32
33
  signal,
33
34
  target,
34
35
  };
35
- const result = opendir(fs, resolve(normalCwd, select), (entry) => walkIncludes({
36
- entry,
37
- ctx,
38
- stream,
39
- scanOptions,
40
- }));
36
+ const result = opendir(fs, normalizeCwd(resolve(normalCwd, within)), (entry) => {
37
+ const path = relative(normalCwd, normalizeCwd(entry.parentPath) + "/" + entry.name);
38
+ return walkIncludes({
39
+ path,
40
+ entry,
41
+ ctx,
42
+ stream,
43
+ scanOptions,
44
+ });
45
+ });
41
46
  void (async () => {
42
47
  await result;
43
48
  stream.emit("end", ctx);
@@ -10,13 +10,13 @@ import type { Source } from "./source.js";
10
10
  * @see {@link Source.pattern} for more details.
11
11
  * @throws Error if extraction fails. Processing stops.
12
12
  *
13
- * @since 0.0.6
13
+ * @since 0.6.0
14
14
  */
15
15
  export type ExtractorFn = (source: Source, content: Buffer, ctx: MatcherContext) => void | "none";
16
16
  /**
17
17
  * Defines a method for extracting patterns from a specific source file.
18
18
  *
19
- * @since 0.0.6
19
+ * @since 0.6.0
20
20
  */
21
21
  export interface Extractor {
22
22
  /**
@@ -25,7 +25,7 @@ export interface Extractor {
25
25
  * @example
26
26
  * ".gitignore"
27
27
  *
28
- * @since 0.0.6
28
+ * @since 0.6.0
29
29
  */
30
30
  path: string;
31
31
  /**
@@ -33,7 +33,7 @@ export interface Extractor {
33
33
  *
34
34
  * @see {@link ExtractorFn}
35
35
  *
36
- * @since 0.0.6
36
+ * @since 0.6.0
37
37
  */
38
38
  extract: ExtractorFn;
39
39
  }
@@ -43,38 +43,44 @@ export interface Extractor {
43
43
  * @see {@link resolveSources}
44
44
  * @see {@link signedPatternIgnores}
45
45
  *
46
- * @since 0.0.6
46
+ * @since 0.6.0
47
47
  */
48
48
  export interface PatternFinderOptions {
49
49
  /**
50
50
  * The file system adapter for directory walking and reading files.
51
51
  *
52
- * @since 0.0.6
52
+ * @since 0.6.0
53
53
  */
54
54
  fs: FsAdapter;
55
55
  /**
56
56
  * The context to modify.
57
57
  *
58
- * @since 0.0.6
58
+ * @since 0.6.0
59
59
  */
60
60
  ctx: MatcherContext;
61
61
  /**
62
62
  * The current working directory.
63
63
  *
64
- * @since 0.0.6
64
+ * @since 0.6.0
65
65
  */
66
66
  cwd: string;
67
67
  /**
68
68
  * The target implementation.
69
69
  *
70
- * @since 0.0.6
70
+ * @since 0.6.0
71
71
  */
72
72
  target: Target;
73
73
  /**
74
74
  * Initial search directory.
75
75
  * Relative to the `cwd` path or absolute path.
76
76
  *
77
- * @since 0.0.6
77
+ * @since 0.6.0
78
78
  */
79
79
  root: string;
80
+ /**
81
+ * Return as soon as possible.
82
+ *
83
+ * @since 0.7.1
84
+ */
85
+ signal: AbortSignal | null;
80
86
  }
@@ -4,6 +4,6 @@ import { type Source } from "./source.js";
4
4
  *
5
5
  * @see {@link signedPatternCompile}
6
6
  *
7
- * @since 0.0.6
7
+ * @since 0.6.0
8
8
  */
9
9
  export declare function extractGitignore(source: Source, content: Buffer): void;
@@ -5,7 +5,7 @@ import { sourcePushNegatable } from "./source.js";
5
5
  *
6
6
  * @see {@link signedPatternCompile}
7
7
  *
8
- * @since 0.0.6
8
+ * @since 0.6.0
9
9
  */
10
10
  export function extractGitignore(source, content) {
11
11
  for (let line of content.toString().split("\n")) {
@@ -1,11 +1,40 @@
1
1
  import type { MatcherContext } from "../patterns/matcherContext.js";
2
2
  import type { SignedPatternMatch } from "../patterns/signedPattern.js";
3
3
  import type { FsAdapter } from "../types.js";
4
+ /**
5
+ * Used in {@link Ignores}.
6
+ *
7
+ * @since 0.6.0
8
+ */
4
9
  export interface IgnoresOptions {
10
+ /**
11
+ * The file system adapter for directory walking and reading files.
12
+ *
13
+ * @since 0.6.0
14
+ */
5
15
  fs: FsAdapter;
16
+ /**
17
+ * @since 0.6.0
18
+ */
6
19
  cwd: string;
20
+ /**
21
+ * File or directory without the slash suffix.
22
+ *
23
+ * @since 0.6.0
24
+ */
7
25
  entry: string;
26
+ /**
27
+ * The context to populate.
28
+ *
29
+ * @since 0.6.0
30
+ */
8
31
  ctx: MatcherContext;
32
+ /**
33
+ * Return as soon as possible.
34
+ *
35
+ * @since 0.7.1
36
+ */
37
+ signal: AbortSignal | null;
9
38
  }
10
39
  /**
11
40
  * Checks whether a given entry path should be ignored based on its patterns.
@@ -14,6 +43,6 @@ export interface IgnoresOptions {
14
43
  * @see {@link signedPatternIgnores}
15
44
  * @see {@link https://github.com/Mopsgamer/view-ignored/tree/main/src/targets} for usage examples.
16
45
  *
17
- * @since 0.0.6
46
+ * @since 0.6.0
18
47
  */
19
48
  export type Ignores = (options: IgnoresOptions) => Promise<SignedPatternMatch>;
@@ -3,7 +3,7 @@ import type { Source } from "./source.js";
3
3
  /**
4
4
  * Extracts and compiles patterns from the file.
5
5
  *
6
- * @since 0.0.6
6
+ * @since 0.6.0
7
7
  */
8
8
  export declare function extractJsrJson(source: Source, content: Buffer, ctx: MatcherContext): void;
9
9
  /**
@@ -11,6 +11,6 @@ export declare function extractJsrJson(source: Source, content: Buffer, ctx: Mat
11
11
  *
12
12
  * @see {@link signedPatternCompile}
13
13
  *
14
- * @since 0.0.6
14
+ * @since 0.6.0
15
15
  */
16
16
  export declare function extractJsrJsonc(source: Source, content: Buffer, ctx: MatcherContext): void;
@@ -15,7 +15,7 @@ const parse = type("string")
15
15
  /**
16
16
  * Extracts and compiles patterns from the file.
17
17
  *
18
- * @since 0.0.6
18
+ * @since 0.6.0
19
19
  */
20
20
  export function extractJsrJson(source, content, ctx) {
21
21
  const dist = parse(content.toString());
@@ -48,7 +48,7 @@ extractJsrJson;
48
48
  *
49
49
  * @see {@link signedPatternCompile}
50
50
  *
51
- * @since 0.0.6
51
+ * @since 0.6.0
52
52
  */
53
53
  export function extractJsrJsonc(source, content, ctx) {
54
54
  extractJsrJson(source, Buffer.from(stripJsonComments(content.toString())), ctx);
@@ -3,14 +3,14 @@ import type { Source } from "./source.js";
3
3
  /**
4
4
  * Post-scan results.
5
5
  *
6
- * @since 0.0.6
6
+ * @since 0.6.0
7
7
  */
8
8
  export interface MatcherContext {
9
9
  /**
10
10
  * Paths and their corresponding sources.
11
11
  * Directory paths are having the slash suffix.
12
12
  *
13
- * @since 0.0.6
13
+ * @since 0.6.0
14
14
  */
15
15
  paths: Map<string, SignedPatternMatch>;
16
16
  /**
@@ -20,14 +20,14 @@ export interface MatcherContext {
20
20
  * "dir" => Source
21
21
  * "dir/subdir" => Source
22
22
  *
23
- * @since 0.0.6
23
+ * @since 0.6.0
24
24
  */
25
25
  external: Map<string, Source | "none">;
26
26
  /**
27
27
  * If any fatal errors were encountered during source extractions,
28
28
  * this property will contain an array of failed sources.
29
29
  *
30
- * @since 0.0.6
30
+ * @since 0.6.0
31
31
  */
32
32
  failed: Source[];
33
33
  /**
@@ -47,25 +47,25 @@ export interface MatcherContext {
47
47
  * "src/components" => 0
48
48
  * "src/views" => 1
49
49
  *
50
- * @since 0.0.6
50
+ * @since 0.6.0
51
51
  */
52
52
  depthPaths: Map<string, number>;
53
53
  /**
54
54
  * Total number of files scanned.
55
55
  *
56
- * @since 0.0.6
56
+ * @since 0.6.0
57
57
  */
58
58
  totalFiles: number;
59
59
  /**
60
60
  * Total number of files matched by the target.
61
61
  *
62
- * @since 0.0.6
62
+ * @since 0.6.0
63
63
  */
64
64
  totalMatchedFiles: number;
65
65
  /**
66
66
  * Total number of directories scanned.
67
67
  *
68
- * @since 0.0.6
68
+ * @since 0.6.0
69
69
  */
70
70
  totalDirs: number;
71
71
  }
@@ -4,13 +4,13 @@ import type { MatcherContext } from "./matcherContext.js";
4
4
  * Provides patching abilities for the given {@link MatcherContext}.
5
5
  * Directories should have the slash suffix.
6
6
  *
7
- * @since 0.0.6
7
+ * @since 0.6.0
8
8
  */
9
9
  export declare function matcherContextAddPath(ctx: MatcherContext, options: Required<ScanOptions>, entry: string): Promise<boolean>;
10
10
  /**
11
11
  * Provides patching abilities for the given {@link MatcherContext}.
12
12
  * Directories should have the slash suffix.
13
13
  *
14
- * @since 0.0.6
14
+ * @since 0.6.0
15
15
  */
16
16
  export declare function matcherContextRemovePath(ctx: MatcherContext, options: Required<ScanOptions>, entry: string): Promise<boolean>;
@@ -1,4 +1,5 @@
1
1
  import { resolve, dirname } from "node:path";
2
+ import { relative } from "node:path/posix";
2
3
  import { getDepth } from "../getDepth.js";
3
4
  import { normalizeCwd } from "../normalizeCwd.js";
4
5
  import { opendir } from "../opendir.js";
@@ -7,13 +8,13 @@ import { walkIncludes } from "../walk.js";
7
8
  * Provides patching abilities for the given {@link MatcherContext}.
8
9
  * Directories should have the slash suffix.
9
10
  *
10
- * @since 0.0.6
11
+ * @since 0.6.0
11
12
  */
12
13
  export async function matcherContextAddPath(ctx, options, entry) {
13
14
  if (ctx.paths.has(entry)) {
14
15
  return false;
15
16
  }
16
- const { target, fs, cwd } = options;
17
+ const { target, fs, cwd, signal } = options;
17
18
  const isDir = entry.endsWith("/");
18
19
  if (isDir) {
19
20
  // recursive parent population
@@ -21,7 +22,7 @@ export async function matcherContextAddPath(ctx, options, entry) {
21
22
  if (direntPath === ".") {
22
23
  return true;
23
24
  }
24
- ctx.paths.set(entry, await target.ignores({ fs, cwd, entry: direntPath, ctx }));
25
+ ctx.paths.set(entry, await target.ignores({ fs, cwd, entry: direntPath, ctx, signal }));
25
26
  if (ctx.totalFiles >= 0) {
26
27
  ctx.totalDirs++;
27
28
  }
@@ -42,7 +43,7 @@ export async function matcherContextAddPath(ctx, options, entry) {
42
43
  // 1. recursively populate parents
43
44
  await matcherContextAddPath(ctx, options, parent + "/");
44
45
  // 2. if ignored, remove, otherwise add
45
- const match = await target.ignores({ fs, cwd, entry, ctx });
46
+ const match = await target.ignores({ fs, cwd, entry, ctx, signal });
46
47
  if (match.ignored) {
47
48
  // 2.1. remove
48
49
  await matcherContextRemovePath(ctx, options, entry);
@@ -60,7 +61,7 @@ export async function matcherContextAddPath(ctx, options, entry) {
60
61
  * Provides patching abilities for the given {@link MatcherContext}.
61
62
  * Directories should have the slash suffix.
62
63
  *
63
- * @since 0.0.6
64
+ * @since 0.6.0
64
65
  */
65
66
  export async function matcherContextRemovePath(ctx, options, entry) {
66
67
  const isDir = entry.endsWith("/");
@@ -141,11 +142,15 @@ export async function matcherContextRemovePath(ctx, options, entry) {
141
142
  }
142
143
  async function rescan(ctx, options) {
143
144
  const normalCwd = normalizeCwd(options.cwd);
144
- await opendir(options.fs, resolve(normalCwd, options.within), (entry) => walkIncludes({
145
- entry,
146
- ctx,
147
- stream: undefined,
148
- scanOptions: { ...options, cwd: normalCwd },
149
- }));
145
+ await opendir(options.fs, resolve(normalCwd, options.within), (entry) => {
146
+ const path = relative(normalCwd, normalizeCwd(entry.parentPath) + "/" + entry.name);
147
+ return walkIncludes({
148
+ path,
149
+ entry,
150
+ ctx,
151
+ stream: undefined,
152
+ scanOptions: { ...options, cwd: normalCwd },
153
+ });
154
+ });
150
155
  ctx.totalDirs = ctx.totalFiles = ctx.totalMatchedFiles = -1;
151
156
  }
@@ -5,50 +5,50 @@ import type { SignedPatternMatch } from "./signedPattern.js";
5
5
  /**
6
6
  * Post-scan entry information.
7
7
  *
8
- * @since 0.0.6
8
+ * @since 0.6.0
9
9
  */
10
10
  export type EntryInfo = {
11
11
  /**
12
12
  * The relative path of the entry.
13
13
  *
14
- * @since 0.0.6
14
+ * @since 0.6.0
15
15
  */
16
16
  path: string;
17
17
  /**
18
18
  * The directory entry.
19
19
  *
20
- * @since 0.0.6
20
+ * @since 0.6.0
21
21
  */
22
22
  dirent: Dirent;
23
23
  /**
24
24
  * Whether the entry was ignored.
25
25
  *
26
- * @since 0.0.6
26
+ * @since 0.6.0
27
27
  */
28
28
  match: SignedPatternMatch;
29
29
  /**
30
30
  * The matcher context.
31
31
  *
32
- * @since 0.0.6
32
+ * @since 0.6.0
33
33
  */
34
34
  ctx: MatcherContext;
35
35
  };
36
36
  /**
37
37
  * @see {@link MatcherStream} uses it for the "dirent" event.
38
38
  *
39
- * @since 0.0.6
39
+ * @since 0.6.0
40
40
  */
41
41
  export type EntryListener = (info: EntryInfo) => void;
42
42
  /**
43
43
  * @see {@link MatcherStream} uses it for the "end" event.
44
44
  *
45
- * @since 0.0.6
45
+ * @since 0.6.0
46
46
  */
47
47
  export type EndListener = (ctx: MatcherContext) => void;
48
48
  /**
49
49
  * @see {@link MatcherStream} uses it for its event map.
50
50
  *
51
- * @since 0.0.6
51
+ * @since 0.6.0
52
52
  */
53
53
  export type EventMap = {
54
54
  dirent: [EntryInfo];
@@ -58,7 +58,7 @@ export type EventMap = {
58
58
  * Event emitter.
59
59
  * @extends EventEmitter
60
60
  *
61
- * @since 0.0.6
61
+ * @since 0.6.0
62
62
  */
63
63
  export declare class MatcherStream extends EventEmitter<EventMap> {
64
64
  }
@@ -3,7 +3,7 @@ import { EventEmitter } from "node:events";
3
3
  * Event emitter.
4
4
  * @extends EventEmitter
5
5
  *
6
- * @since 0.0.6
6
+ * @since 0.6.0
7
7
  */
8
8
  export class MatcherStream extends EventEmitter {
9
9
  }
@@ -4,6 +4,6 @@ import { type Source } from "./source.js";
4
4
  *
5
5
  * @see {@link signedPatternCompile}
6
6
  *
7
- * @since 0.0.6
7
+ * @since 0.6.0
8
8
  */
9
9
  export declare function extractPackageJson(source: Source, content: Buffer): void | "none";
@@ -12,7 +12,7 @@ const parse = type("string")
12
12
  *
13
13
  * @see {@link signedPatternCompile}
14
14
  *
15
- * @since 0.0.6
15
+ * @since 0.6.0
16
16
  */
17
17
  export function extractPackageJson(source, content) {
18
18
  source.inverted = true;
@@ -4,33 +4,33 @@
4
4
  * @see {@link stringCompile}
5
5
  * @see {@link signedPatternCompile}
6
6
  *
7
- * @since 0.0.6
7
+ * @since 0.6.0
8
8
  */
9
9
  export type PatternMinimatch = {
10
10
  re: RegExp;
11
11
  /**
12
12
  * The original pattern string this minimatch was compiled from.
13
13
  *
14
- * @since 0.0.6
14
+ * @since 0.6.0
15
15
  */
16
16
  pattern: string;
17
17
  /**
18
18
  * The original pattern list this pattern was compiled from.
19
19
  *
20
- * @since 0.0.6
20
+ * @since 0.6.0
21
21
  */
22
22
  patternContext: Pattern;
23
23
  };
24
24
  /**
25
25
  * Safely calls RegExp.test.
26
26
  *
27
- * @since 0.0.6
27
+ * @since 0.6.0
28
28
  */
29
29
  export declare function patternMinimatchTest(pattern: PatternMinimatch, path: string): boolean;
30
30
  /**
31
31
  * Represents a list of positive minimatch patterns.
32
32
  *
33
- * @since 0.0.6
33
+ * @since 0.6.0
34
34
  */
35
35
  export type Pattern = string[];
36
36
  /**
@@ -39,6 +39,6 @@ export type Pattern = string[];
39
39
  * @see {@link stringCompile}
40
40
  * @see {@link signedPatternCompile}
41
41
  *
42
- * @since 0.0.6
42
+ * @since 0.6.0
43
43
  */
44
44
  export declare function patternCompile(pattern: Pattern): PatternMinimatch[];
@@ -2,7 +2,7 @@ import { stringCompile } from "./stringCompile.js";
2
2
  /**
3
3
  * Safely calls RegExp.test.
4
4
  *
5
- * @since 0.0.6
5
+ * @since 0.6.0
6
6
  */
7
7
  export function patternMinimatchTest(pattern, path) {
8
8
  pattern.re.lastIndex = 0;
@@ -14,7 +14,7 @@ export function patternMinimatchTest(pattern, path) {
14
14
  * @see {@link stringCompile}
15
15
  * @see {@link signedPatternCompile}
16
16
  *
17
- * @since 0.0.6
17
+ * @since 0.6.0
18
18
  */
19
19
  export function patternCompile(pattern) {
20
20
  return pattern.map(stringCompile);
@@ -4,20 +4,20 @@ import type { SignedPattern } from "./signedPattern.js";
4
4
  *
5
5
  * @see {@link signedPatternIgnores}
6
6
  *
7
- * @since 0.0.6
7
+ * @since 0.6.0
8
8
  */
9
9
  export type PatternMatcher = {
10
10
  /**
11
11
  * Internal patterns are provided by the target.
12
12
  * Almost always they are predefined.
13
13
  *
14
- * @since 0.0.6
14
+ * @since 0.6.0
15
15
  */
16
16
  internal: SignedPattern;
17
17
  /**
18
18
  * External patterns are sourced from existing project files at runtime.
19
19
  *
20
- * @since 0.0.6
20
+ * @since 0.6.0
21
21
  */
22
22
  external: SignedPattern;
23
23
  };
@@ -7,13 +7,13 @@ import type { SignedPattern } from "./signedPattern.js";
7
7
  *
8
8
  * @see {@link patternCompile}
9
9
  *
10
- * @since 0.0.6
10
+ * @since 0.6.0
11
11
  */
12
12
  export declare function signedPatternCompile(signedPattern: SignedPattern): SignedPattern;
13
13
  /**
14
14
  * @see {@link resolveSources}
15
15
  *
16
- * @since 0.0.6
16
+ * @since 0.6.0
17
17
  */
18
18
  export interface ResolveSourcesOptions extends PatternFinderOptions {
19
19
  /**
@@ -22,13 +22,13 @@ export interface ResolveSourcesOptions extends PatternFinderOptions {
22
22
  * @example
23
23
  * "dir/subdir"
24
24
  *
25
- * @since 0.0.6
25
+ * @since 0.6.0
26
26
  */
27
27
  dir: string;
28
28
  }
29
29
  /**
30
30
  * Populates the {@link MatcherContext.external} map with {@link Source} objects.
31
31
  *
32
- * @since 0.0.6
32
+ * @since 0.6.0
33
33
  */
34
34
  export declare function resolveSources(options: ResolveSourcesOptions): Promise<void>;