@arcgis/components-build-utils 4.34.0-next.120 → 4.34.0-next.122

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.
@@ -0,0 +1,2 @@
1
+ import { Command } from '@commander-js/extra-typings';
2
+ export declare const registerCommand: (program: Command) => undefined;
@@ -0,0 +1,2 @@
1
+ import { Command } from '@commander-js/extra-typings';
2
+ export declare const registerCommand: (program: Command) => undefined;
@@ -32,6 +32,33 @@ type PackageWalkerResult<T> = {
32
32
  * If the callback returns null or undefined, that package is not included in the results.
33
33
  */
34
34
  export declare function workspacesPackageWalker<T = void>(callback: (item: PackageWalkerItem) => Promise<T | undefined> | T | undefined, includeRootPackage?: boolean): Promise<PackageWalkerResult<T>[]>;
35
+ interface AffectedPackage {
36
+ path: string;
37
+ packageJson: MiniPackageJson;
38
+ files: string[];
39
+ }
40
+ /**
41
+ * Computes the list of workspace packages affected by a given set of changed files.
42
+ *
43
+ * This function must always be run from the repository root so that workspace
44
+ * discovery and relative path matching behave correctly.
45
+ *
46
+ * The function first collects all workspace packages (with their paths and package.json).
47
+ * It then checks which of the changed files fall under each package's path and marks
48
+ * those packages as initially affected.
49
+ *
50
+ * Note: Only internal workspace packages are considered in the dependency graph;
51
+ * external dependencies are ignored.
52
+ *
53
+ * @param changed - Iterable list of file paths that were modified.
54
+ * @param options - Additional options:
55
+ * - dfs: Whether to include transitive dependents by traversing the dependency graph.
56
+ *
57
+ * @returns Promise resolving to an array of affected workspace `Package` objects.
58
+ */
59
+ export declare function getAffectedPackages(changed: Iterable<string>, options?: {
60
+ dfs?: boolean;
61
+ }): Promise<AffectedPackage[]>;
35
62
  /**
36
63
  * Helper to check if an error is a SIGINT (interrupt) error.
37
64
  */
@@ -32,6 +32,33 @@ type PackageWalkerResult<T> = {
32
32
  * If the callback returns null or undefined, that package is not included in the results.
33
33
  */
34
34
  export declare function workspacesPackageWalker<T = void>(callback: (item: PackageWalkerItem) => Promise<T | undefined> | T | undefined, includeRootPackage?: boolean): Promise<PackageWalkerResult<T>[]>;
35
+ interface AffectedPackage {
36
+ path: string;
37
+ packageJson: MiniPackageJson;
38
+ files: string[];
39
+ }
40
+ /**
41
+ * Computes the list of workspace packages affected by a given set of changed files.
42
+ *
43
+ * This function must always be run from the repository root so that workspace
44
+ * discovery and relative path matching behave correctly.
45
+ *
46
+ * The function first collects all workspace packages (with their paths and package.json).
47
+ * It then checks which of the changed files fall under each package's path and marks
48
+ * those packages as initially affected.
49
+ *
50
+ * Note: Only internal workspace packages are considered in the dependency graph;
51
+ * external dependencies are ignored.
52
+ *
53
+ * @param changed - Iterable list of file paths that were modified.
54
+ * @param options - Additional options:
55
+ * - dfs: Whether to include transitive dependents by traversing the dependency graph.
56
+ *
57
+ * @returns Promise resolving to an array of affected workspace `Package` objects.
58
+ */
59
+ export declare function getAffectedPackages(changed: Iterable<string>, options?: {
60
+ dfs?: boolean;
61
+ }): Promise<AffectedPackage[]>;
35
62
  /**
36
63
  * Helper to check if an error is a SIGINT (interrupt) error.
37
64
  */
@@ -27,6 +27,7 @@ export type MiniPackageJson = {
27
27
  "html.customData"?: string[];
28
28
  "web-types"?: string;
29
29
  "exports"?: Record<string, Record<string, string> | string>;
30
+ "scripts"?: Record<string, string>;
30
31
  };
31
32
  export declare function retrievePackageJson(location?: string): MiniPackageJson;
32
33
  export declare function asyncRetrievePackageJson(location?: string): Promise<MiniPackageJson>;
@@ -27,6 +27,7 @@ export type MiniPackageJson = {
27
27
  "html.customData"?: string[];
28
28
  "web-types"?: string;
29
29
  "exports"?: Record<string, Record<string, string> | string>;
30
+ "scripts"?: Record<string, string>;
30
31
  };
31
32
  export declare function retrievePackageJson(location?: string): MiniPackageJson;
32
33
  export declare function asyncRetrievePackageJson(location?: string): Promise<MiniPackageJson>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/components-build-utils",
3
- "version": "4.34.0-next.120",
3
+ "version": "4.34.0-next.122",
4
4
  "description": "Collection of common internal build-time patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "type": "module",