@ryanatkn/gro 0.121.0 → 0.121.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.
package/dist/config.js CHANGED
@@ -20,7 +20,17 @@ export const create_empty_config = () => ({
20
20
  * Customize via `search_filters` in the `Gro_Config`.
21
21
  * See the test cases for the exact behavior.
22
22
  */
23
- export const DEFAULT_SEARCH_EXCLUDER = new RegExp(`(${['\\.[^/]+', NODE_MODULES_DIRNAME, SVELTEKIT_BUILD_DIRNAME, `(?<!(^|/)gro/)${SVELTEKIT_DIST_DIRNAME}`, SERVER_DIST_PATH].map((p) => '(^|/)' + p).join('|')})($|/)`, 'u');
23
+ export const DEFAULT_SEARCH_EXCLUDER = new RegExp(`(${[
24
+ '\\.[^/]+',
25
+ // TODO probably change to `pkg.name` instead of this catch-all
26
+ `${NODE_MODULES_DIRNAME}(?!/(@[^/]+/)?gro/${SVELTEKIT_DIST_DIRNAME})`,
27
+ // `${NODE_MODULES_DIRNAME}(?!/(@.+?/)?gro/${SVELTEKIT_DIST_DIRNAME})`,
28
+ SVELTEKIT_BUILD_DIRNAME,
29
+ `(?<!(^|/)gro/)${SVELTEKIT_DIST_DIRNAME}`,
30
+ SERVER_DIST_PATH,
31
+ ]
32
+ .map((p) => '(^|/)' + p)
33
+ .join('|')})($|/)`, 'u');
24
34
  const default_map_package_json = async (package_json) => {
25
35
  if (package_json.exports) {
26
36
  package_json.exports = Object.fromEntries(Object.entries(package_json.exports).filter(([k]) => !DEFAULT_EXPORTS_EXCLUDER.test(k)));
@@ -48,6 +48,9 @@ test('DEFAULT_SEARCH_EXCLUDER', () => {
48
48
  assert_includes('gro/buildE', true);
49
49
  assert_includes('groE/build', false);
50
50
  assert_includes('gro/dist', true);
51
+ assert_includes('node_modules/gro/dist', true);
52
+ assert_includes('node_modules/@someuser/gro/dist', true);
53
+ assert_includes('node_modules/@someuser/foo/gro/dist', false);
51
54
  assert_includes('gro/distE', true);
52
55
  assert_includes('groE/dist', false);
53
56
  assert_includes('Egro/dist', false);
package/dist/gen.js CHANGED
@@ -151,8 +151,7 @@ export const find_genfiles = async (input_paths, root_dirs, config, timings) =>
151
151
  }
152
152
  // Find all of the files for any directories.
153
153
  const timing_to_search_fs = timings?.start('find files');
154
- const { resolved_input_files, resolved_input_files_by_input_path, resolved_input_files_by_root_dir, input_directories_with_no_files, } = resolve_input_files(resolved_input_paths, (id, options) => search_fs(id, {
155
- ...options,
154
+ const { resolved_input_files, resolved_input_files_by_input_path, resolved_input_files_by_root_dir, input_directories_with_no_files, } = resolve_input_files(resolved_input_paths, (id) => search_fs(id, {
156
155
  filter: config.search_filters,
157
156
  file_filter: (p) => extensions.some((e) => p.includes(e)),
158
157
  }));
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { Flavored } from '@ryanatkn/belt/types.js';
3
- import type { Path_Id } from './path.js';
3
+ import type { Path_Id, Resolved_Path } from './path.js';
4
4
  export declare const Input_Path: z.ZodString;
5
5
  export type Input_Path = Flavored<z.infer<typeof Input_Path>, 'Input_Path'>;
6
6
  export declare const Raw_Input_Path: z.ZodString;
@@ -62,4 +62,4 @@ export interface Resolved_Input_Files {
62
62
  * Finds all of the matching files for the given input paths.
63
63
  * De-dupes source ids.
64
64
  */
65
- export declare const resolve_input_files: (resolved_input_paths: Resolved_Input_Path[], custom_search_fs?: (dir: string, options?: import("./search_fs.js").Search_Fs_Options) => import("./path.js").Resolved_Path[]) => Resolved_Input_Files;
65
+ export declare const resolve_input_files: (resolved_input_paths: Resolved_Input_Path[], custom_search_fs?: (dir: string) => Resolved_Path[]) => Resolved_Input_Files;
@@ -148,7 +148,7 @@ export const resolve_input_files = (resolved_input_paths, custom_search_fs = sea
148
148
  for (const resolved_input_path of resolved_input_paths) {
149
149
  const { input_path, id, is_directory } = resolved_input_path;
150
150
  if (is_directory) {
151
- const files = custom_search_fs(id, { include_directories: true });
151
+ const files = custom_search_fs(id);
152
152
  if (files.length) {
153
153
  const path_ids = [];
154
154
  let has_files = false;
package/dist/package.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // generated by src/lib/package.gen.ts
2
2
  export const package_json = {
3
3
  name: '@ryanatkn/gro',
4
- version: '0.121.0',
4
+ version: '0.121.1',
5
5
  description: 'task runner and toolkit extending SvelteKit',
6
6
  motto: 'generate, run, optimize',
7
7
  icon: '🌰',
@@ -256,7 +256,7 @@ export const package_json = {
256
256
  };
257
257
  export const src_json = {
258
258
  name: '@ryanatkn/gro',
259
- version: '0.121.0',
259
+ version: '0.121.1',
260
260
  modules: {
261
261
  '.': {
262
262
  path: 'index.ts',
package/dist/task.js CHANGED
@@ -47,8 +47,7 @@ export const find_tasks = (input_paths, task_root_dirs, config, timings) => {
47
47
  }
48
48
  // Find all of the files for any directories.
49
49
  const timing_to_resolve_input_files = timings?.start('resolve input files');
50
- const { resolved_input_files, resolved_input_files_by_input_path, resolved_input_files_by_root_dir, input_directories_with_no_files, } = resolve_input_files(resolved_input_paths, (id, options) => search_fs(id, {
51
- ...options,
50
+ const { resolved_input_files, resolved_input_files_by_input_path, resolved_input_files_by_root_dir, input_directories_with_no_files, } = resolve_input_files(resolved_input_paths, (id) => search_fs(id, {
52
51
  filter: config.search_filters,
53
52
  file_filter: (p) => TASK_FILE_SUFFIXES.some((s) => p.endsWith(s)),
54
53
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryanatkn/gro",
3
- "version": "0.121.0",
3
+ "version": "0.121.1",
4
4
  "description": "task runner and toolkit extending SvelteKit",
5
5
  "motto": "generate, run, optimize",
6
6
  "icon": "🌰",