@dbx-tools/path 0.3.22 → 0.3.23

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 (2) hide show
  1. package/package.json +3 -3
  2. package/src/ignore.ts +14 -5
package/package.json CHANGED
@@ -14,15 +14,15 @@
14
14
  "chokidar": "^4.0.3",
15
15
  "glob": "^13.0.6",
16
16
  "minimatch": "^10.2.5",
17
- "@dbx-tools/core": "0.3.22",
18
- "@dbx-tools/shared-core": "0.3.22"
17
+ "@dbx-tools/core": "0.3.23",
18
+ "@dbx-tools/shared-core": "0.3.23"
19
19
  },
20
20
  "main": "index.ts",
21
21
  "license": "UNLICENSED",
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },
25
- "version": "0.3.22",
25
+ "version": "0.3.23",
26
26
  "types": "index.ts",
27
27
  "type": "module",
28
28
  "exports": {
package/src/ignore.ts CHANGED
@@ -6,9 +6,12 @@
6
6
  * composition (`and`/`or`/`negate`) lives in {@link ./match}.
7
7
  *
8
8
  * Consumers:
9
- * - {@link ignorePatterns} - yields the enabled glob strings (for projen prettier/gitignore).
10
- * - {@link ignorePathMatcher} - returns a single {@link PathMatcher} for {@link findFiles}
11
- * and {@link watchFiles}.
9
+ * - {@link ignorePatterns} - yields the enabled glob strings (for projen
10
+ * prettier/gitignore). Pass `{ test: false }` there: the `test` group is for
11
+ * filesystem scanning only (skip test dirs when discovering packages /
12
+ * watching), not for VCS or formatter ignore files.
13
+ * - {@link ignorePathMatcher} - returns a single {@link PathMatcher} for
14
+ * {@link findFiles} and {@link watchFiles} (keeps `test: true` by default).
12
15
  *
13
16
  * @module
14
17
  */
@@ -26,7 +29,11 @@ export type IgnorePatternOptions = {
26
29
  dot?: boolean;
27
30
  /** Temporary directories (`tmp`, `.tmp`, `scratch`, etc.). */
28
31
  temp?: boolean;
29
- /** Test directories and `*.test.*` / `*.spec.*` naming conventions. */
32
+ /**
33
+ * Test directories and `*.test.*` / `*.spec.*` naming conventions.
34
+ * Scanning/watch default on; omit (`false`) when emitting `.gitignore` /
35
+ * `.prettierignore` so tests stay tracked and formatable.
36
+ */
30
37
  test?: boolean;
31
38
  /**
32
39
  * Lockfile ignore group (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`,
@@ -168,7 +175,9 @@ function ignoreMatchPredicates(
168
175
  * Yields the glob strings for each enabled built-in ignore group.
169
176
  *
170
177
  * Useful when a consumer needs literal patterns (e.g. projen `.gitignore` /
171
- * `.prettierignore`) rather than a compiled {@link PathMatcher}.
178
+ * `.prettierignore`) rather than a compiled {@link PathMatcher}. For those
179
+ * file emitters pass `{ test: false }` - the test group belongs to scanning
180
+ * only ({@link ignorePathMatcher}), not VCS/formatter ignores.
172
181
  *
173
182
  * @param options - Group toggles; omitted flags default to enabled.
174
183
  */