generatesaas 1.19.2 → 1.20.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.
@@ -40,22 +40,28 @@ function hashFile(filePath) {
40
40
  // ── File Walking ──
41
41
 
42
42
  // MUST stay in sync with the CLI's template/exclusions.ts: exactly
43
- // EXCLUDED_NAMES + SNAPSHOT_EXCLUDED_NAMES plus the two project-root extras
44
- // ("data", INTERNAL_DIR). A drift silently corrupts classification - a path the
45
- // CLI stages but this walker skips never gets diffed or hashed. The
46
- // exclusions-parity test in the CLI repo asserts this set equality.
43
+ // EXCLUDED_NAMES + SNAPSHOT_EXCLUDED_NAMES, matched at ANY depth. A drift
44
+ // silently corrupts classification - a path the CLI stages but this walker skips
45
+ // never gets diffed or hashed. The exclusions-parity test in the CLI repo
46
+ // asserts this set equality and the root-only matching below.
47
47
  const WALK_EXCLUSIONS = new Set([
48
48
  ".git", "node_modules", ".pnpm-store", ".env", ".env.test",
49
- ".turbo", ".nuxt", ".output", ".data", "dist", "data",
49
+ ".turbo", ".nuxt", ".output", ".data", "dist",
50
50
  ".next", ".svelte-kit", ".wrangler",
51
51
  ".devcontainer", "playwright-report", "test-results",
52
52
  "pnpm-lock.yaml",
53
- INTERNAL_DIR,
54
53
  ]);
55
54
 
55
+ // Excluded ONLY at the project root (first path segment), mirroring the CLI's
56
+ // EXCLUDED_ROOT treatment of "data" and INTERNAL_DIR. Matching these at any
57
+ // depth would wrongly skip nested dirs the CLI keeps (e.g. packages/x/data/y),
58
+ // dropping upstream changes to them from every update.
59
+ const WALK_EXCLUSIONS_ROOT = new Set(["data", INTERNAL_DIR]);
60
+
56
61
  /** Check if a relative path should be excluded from walking. */
57
62
  function shouldExcludeWalk(relativePath) {
58
63
  const parts = relativePath.split("/");
64
+ if (WALK_EXCLUSIONS_ROOT.has(parts[0])) return true;
59
65
  for (const part of parts) {
60
66
  if (WALK_EXCLUSIONS.has(part)) return true;
61
67
  if (part.startsWith(".env") && !part.includes("example")) return true;
@@ -93,6 +99,7 @@ module.exports = {
93
99
  walkDir,
94
100
  shouldExcludeWalk,
95
101
  WALK_EXCLUSIONS,
102
+ WALK_EXCLUSIONS_ROOT,
96
103
  INTERNAL_DIR,
97
104
  MANIFEST_FILE,
98
105
  HASHES_FILE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generatesaas",
3
- "version": "1.19.2",
3
+ "version": "1.20.0",
4
4
  "type": "module",
5
5
  "description": "CLI for scaffolding and managing GenerateSaaS projects",
6
6
  "license": "UNLICENSED",