@ryanatkn/gro 0.190.0 → 0.190.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.
@@ -2,6 +2,7 @@ import type { PathFilter, PathId } from '@fuzdev/fuz_util/path.js';
2
2
  import type { PluginsCreateConfig } from './plugin.ts';
3
3
  import type { PackageJsonMapper } from './package_json.ts';
4
4
  import type { ParsedSvelteConfig } from './svelte_config.ts';
5
+ import type { FilerOptions } from './filer.ts';
5
6
  /**
6
7
  * SHA-256 hash of empty string, used for configs without build_cache_config.
7
8
  * This ensures consistent cache behavior when no custom config is provided.
@@ -50,6 +51,11 @@ export interface GroConfig extends RawGroConfig {
50
51
  * @see RawGroConfig.build_cache_config
51
52
  */
52
53
  build_cache_config_hash: string;
54
+ /**
55
+ * Options passed to the `Filer` for file watching and import resolution.
56
+ * @see FilerOptions
57
+ */
58
+ filer_options: Partial<FilerOptions> | null;
53
59
  }
54
60
  /**
55
61
  * The relaxed variant of `GroConfig` that users can provide via `gro.config.ts`.
@@ -79,6 +85,11 @@ export interface RawGroConfig {
79
85
  * during config normalization. The raw value is never logged or persisted.
80
86
  */
81
87
  build_cache_config?: Record<string, unknown> | (() => Record<string, unknown> | Promise<Record<string, unknown>>);
88
+ /**
89
+ * Options passed to the `Filer` for file watching and import resolution.
90
+ * @see FilerOptions
91
+ */
92
+ filer_options?: Partial<FilerOptions> | null;
82
93
  }
83
94
  export type CreateGroConfig = (base_config: GroConfig, svelte_config?: ParsedSvelteConfig) => RawGroConfig | Promise<RawGroConfig>;
84
95
  export declare const create_empty_gro_config: () => GroConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"gro_config.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gro_config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAejE,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AACrD,OA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,uBAAuB,QAYnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAA+C,CAAC;AAErF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAU,YAAY,YAAY,KAAG,OAAO,CAAC,SAAS,CA+CjF,CAAC;AAEF,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,eAAe,CAAC;CACjD;AAED,eAAO,MAAM,eAAe,GAAU,YAAgB,KAAG,OAAO,CAAC,SAAS,CAqBzE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,CACxC,aAAa,EAAE,GAAG,EAClB,WAAW,EAAE,MAAM,KACf,OAAO,CAAC,aAAa,IAAI,eAS7B,CAAC"}
@@ -32,6 +32,7 @@ export const create_empty_gro_config = () => ({
32
32
  js_cli: JS_CLI_DEFAULT,
33
33
  pm_cli: PM_CLI_DEFAULT,
34
34
  build_cache_config_hash: EMPTY_BUILD_CACHE_CONFIG_HASH,
35
+ filer_options: null,
35
36
  });
36
37
  /**
37
38
  * The regexp used by default to exclude directories and files
@@ -58,7 +59,7 @@ export const cook_gro_config = async (raw_config) => {
58
59
  const empty_config = create_empty_gro_config();
59
60
  // All of the raw config properties are optional,
60
61
  // so fall back to the empty values when `undefined`.
61
- const { plugins = empty_config.plugins, map_package_json = empty_config.map_package_json, task_root_dirs = empty_config.task_root_dirs, search_filters = empty_config.search_filters, js_cli = empty_config.js_cli, pm_cli = empty_config.pm_cli, build_cache_config, } = raw_config;
62
+ const { plugins = empty_config.plugins, map_package_json = empty_config.map_package_json, task_root_dirs = empty_config.task_root_dirs, search_filters = empty_config.search_filters, js_cli = empty_config.js_cli, pm_cli = empty_config.pm_cli, build_cache_config, filer_options = empty_config.filer_options, } = raw_config;
62
63
  // Hash build_cache_config and delete the raw value
63
64
  // IMPORTANT: Raw value may contain secrets - hash it and delete immediately
64
65
  let build_cache_config_hash;
@@ -85,6 +86,7 @@ export const cook_gro_config = async (raw_config) => {
85
86
  js_cli,
86
87
  pm_cli,
87
88
  build_cache_config_hash,
89
+ filer_options: filer_options ?? null,
88
90
  };
89
91
  };
90
92
  export const load_gro_config = async (dir = paths.root) => {
@@ -38,7 +38,7 @@ export const invoke_task = async (task_name, args, config, initial_filer, initia
38
38
  log.info('invoking', task_name ? st('cyan', task_name) : 'gro');
39
39
  // track if we created the filer
40
40
  const owns_filer = !initial_filer;
41
- const filer = initial_filer ?? new Filer({ log: log.child('filer') });
41
+ const filer = initial_filer ?? new Filer({ log: log.child('filer'), ...config.filer_options });
42
42
  const owns_timings = !initial_timings;
43
43
  const timings = initial_timings ?? new Timings();
44
44
  const total_timing = create_stopwatch();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryanatkn/gro",
3
- "version": "0.190.0",
3
+ "version": "0.190.1",
4
4
  "description": "task runner and toolkit extending SvelteKit",
5
5
  "motto": "generate, run, optimize",
6
6
  "glyph": "🌰",
@@ -81,8 +81,8 @@
81
81
  "@changesets/changelog-git": "^0.2.1",
82
82
  "@changesets/types": "^6.1.0",
83
83
  "@fuzdev/fuz_code": "^0.41.0",
84
- "@fuzdev/fuz_css": "^0.45.0",
85
- "@fuzdev/fuz_ui": "^0.180.0",
84
+ "@fuzdev/fuz_css": "^0.47.0",
85
+ "@fuzdev/fuz_ui": "^0.181.1",
86
86
  "@fuzdev/fuz_util": "^0.48.3",
87
87
  "@ryanatkn/eslint-config": "^0.9.0",
88
88
  "@sveltejs/adapter-static": "^3.0.10",
@@ -94,8 +94,8 @@
94
94
  "esbuild": "^0.27.1",
95
95
  "eslint": "^9.39.1",
96
96
  "eslint-plugin-svelte": "^3.13.1",
97
- "svelte": "^5.48.5",
98
- "svelte-check": "^4.3.5",
97
+ "svelte": "^5.49.1",
98
+ "svelte-check": "^4.3.6",
99
99
  "typescript": "^5.9.3",
100
100
  "typescript-eslint": "^8.48.1",
101
101
  "vitest": "^4.0.15"
@@ -19,6 +19,7 @@ import create_default_config from './gro.config.default.ts';
19
19
  import type {PluginsCreateConfig} from './plugin.ts';
20
20
  import type {PackageJsonMapper} from './package_json.ts';
21
21
  import type {ParsedSvelteConfig} from './svelte_config.ts';
22
+ import type {FilerOptions} from './filer.ts';
22
23
 
23
24
  /**
24
25
  * SHA-256 hash of empty string, used for configs without build_cache_config.
@@ -70,6 +71,11 @@ export interface GroConfig extends RawGroConfig {
70
71
  * @see RawGroConfig.build_cache_config
71
72
  */
72
73
  build_cache_config_hash: string;
74
+ /**
75
+ * Options passed to the `Filer` for file watching and import resolution.
76
+ * @see FilerOptions
77
+ */
78
+ filer_options: Partial<FilerOptions> | null;
73
79
  }
74
80
 
75
81
  /**
@@ -102,6 +108,11 @@ export interface RawGroConfig {
102
108
  build_cache_config?:
103
109
  | Record<string, unknown>
104
110
  | (() => Record<string, unknown> | Promise<Record<string, unknown>>);
111
+ /**
112
+ * Options passed to the `Filer` for file watching and import resolution.
113
+ * @see FilerOptions
114
+ */
115
+ filer_options?: Partial<FilerOptions> | null;
105
116
  }
106
117
 
107
118
  export type CreateGroConfig = (
@@ -122,6 +133,7 @@ export const create_empty_gro_config = (): GroConfig => ({
122
133
  js_cli: JS_CLI_DEFAULT,
123
134
  pm_cli: PM_CLI_DEFAULT,
124
135
  build_cache_config_hash: EMPTY_BUILD_CACHE_CONFIG_HASH,
136
+ filer_options: null,
125
137
  });
126
138
 
127
139
  /**
@@ -164,6 +176,7 @@ export const cook_gro_config = async (raw_config: RawGroConfig): Promise<GroConf
164
176
  js_cli = empty_config.js_cli,
165
177
  pm_cli = empty_config.pm_cli,
166
178
  build_cache_config,
179
+ filer_options = empty_config.filer_options,
167
180
  } = raw_config;
168
181
 
169
182
  // Hash build_cache_config and delete the raw value
@@ -195,6 +208,7 @@ export const cook_gro_config = async (raw_config: RawGroConfig): Promise<GroConf
195
208
  js_cli,
196
209
  pm_cli,
197
210
  build_cache_config_hash,
211
+ filer_options: filer_options ?? null,
198
212
  };
199
213
  };
200
214
 
@@ -50,7 +50,7 @@ export const invoke_task = async (
50
50
 
51
51
  // track if we created the filer
52
52
  const owns_filer = !initial_filer;
53
- const filer = initial_filer ?? new Filer({log: log.child('filer')});
53
+ const filer = initial_filer ?? new Filer({log: log.child('filer'), ...config.filer_options});
54
54
 
55
55
  const owns_timings = !initial_timings;
56
56
  const timings = initial_timings ?? new Timings();