@arcgis/components-build-utils 5.0.0-next.4 → 5.0.0-next.5

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.
@@ -1,5 +1,7 @@
1
1
  import { Command } from '@commander-js/extra-typings';
2
+ import { PackageWalkerItem } from './utils';
2
3
  export declare const registerCommand: (command: Command) => undefined;
3
- export declare function scanDist(packages: string[], { blocklistedNames }: {
4
+ export declare function scanDist({ blocklistedNames }: {
4
5
  blocklistedNames?: string[];
5
6
  }): Promise<void>;
7
+ export declare function scanPackageDist({ packagePath, content: packageJson }: PackageWalkerItem, blocklistedNames?: string[]): Promise<void>;
@@ -1,5 +1,7 @@
1
1
  import { Command } from '@commander-js/extra-typings';
2
+ import { PackageWalkerItem } from './utils';
2
3
  export declare const registerCommand: (command: Command) => undefined;
3
- export declare function scanDist(packages: string[], { blocklistedNames }: {
4
+ export declare function scanDist({ blocklistedNames }: {
4
5
  blocklistedNames?: string[];
5
6
  }): Promise<void>;
7
+ export declare function scanPackageDist({ packagePath, content: packageJson }: PackageWalkerItem, blocklistedNames?: string[]): Promise<void>;
@@ -14,16 +14,18 @@ export declare function sh(command: string, options?: Partial<ExecSyncOptionsWit
14
14
  export declare function findRepositoryRoot(): string;
15
15
  export declare function isURL(source: string): boolean;
16
16
  /**
17
- * Returns a list of all package.json paths in the workspace,
17
+ * Returns a list of all package paths in the workspace,
18
18
  * as resolved from workspaces in root package.json
19
19
  */
20
20
  export declare function getWorkspacesPackagePaths(includeRootPackage?: boolean): Promise<string[]>;
21
- type PackageWalkerItem = {
22
- path: string;
23
- content: MiniPackageJson;
24
- };
21
+ export type PackageWalkerItem = PackageWalkerResult<MiniPackageJson>;
25
22
  type PackageWalkerResult<T> = {
26
- path: string;
23
+ /**
24
+ * @example packages/support-packages/components-build-utils/
25
+ * @privateRemarks
26
+ * Property is named `packagePath` to avoid collision with `path` package
27
+ */
28
+ packagePath: string;
27
29
  content: T;
28
30
  };
29
31
  /**
@@ -32,11 +34,9 @@ type PackageWalkerResult<T> = {
32
34
  * If the callback returns null or undefined, that package is not included in the results.
33
35
  */
34
36
  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;
37
+ type AffectedPackage = PackageWalkerItem & {
38
38
  files: string[];
39
- }
39
+ };
40
40
  /**
41
41
  * Computes the list of workspace packages affected by a given set of changed files.
42
42
  *
@@ -50,7 +50,7 @@ interface AffectedPackage {
50
50
  * Note: Only internal workspace packages are considered in the dependency graph;
51
51
  * external dependencies are ignored.
52
52
  *
53
- * @param changed - Iterable list of file paths that were modified.
53
+ * @param changed - Iterable list of root-relative file paths that were modified.
54
54
  * @param options - Additional options:
55
55
  * - dfs: Whether to include transitive dependents by traversing the dependency graph.
56
56
  *
@@ -14,16 +14,18 @@ export declare function sh(command: string, options?: Partial<ExecSyncOptionsWit
14
14
  export declare function findRepositoryRoot(): string;
15
15
  export declare function isURL(source: string): boolean;
16
16
  /**
17
- * Returns a list of all package.json paths in the workspace,
17
+ * Returns a list of all package paths in the workspace,
18
18
  * as resolved from workspaces in root package.json
19
19
  */
20
20
  export declare function getWorkspacesPackagePaths(includeRootPackage?: boolean): Promise<string[]>;
21
- type PackageWalkerItem = {
22
- path: string;
23
- content: MiniPackageJson;
24
- };
21
+ export type PackageWalkerItem = PackageWalkerResult<MiniPackageJson>;
25
22
  type PackageWalkerResult<T> = {
26
- path: string;
23
+ /**
24
+ * @example packages/support-packages/components-build-utils/
25
+ * @privateRemarks
26
+ * Property is named `packagePath` to avoid collision with `path` package
27
+ */
28
+ packagePath: string;
27
29
  content: T;
28
30
  };
29
31
  /**
@@ -32,11 +34,9 @@ type PackageWalkerResult<T> = {
32
34
  * If the callback returns null or undefined, that package is not included in the results.
33
35
  */
34
36
  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;
37
+ type AffectedPackage = PackageWalkerItem & {
38
38
  files: string[];
39
- }
39
+ };
40
40
  /**
41
41
  * Computes the list of workspace packages affected by a given set of changed files.
42
42
  *
@@ -50,7 +50,7 @@ interface AffectedPackage {
50
50
  * Note: Only internal workspace packages are considered in the dependency graph;
51
51
  * external dependencies are ignored.
52
52
  *
53
- * @param changed - Iterable list of file paths that were modified.
53
+ * @param changed - Iterable list of root-relative file paths that were modified.
54
54
  * @param options - Additional options:
55
55
  * - dfs: Whether to include transitive dependents by traversing the dependency graph.
56
56
  *
@@ -28,6 +28,9 @@ export type MiniPackageJson = {
28
28
  "web-types"?: string;
29
29
  "exports"?: Record<string, Record<string, string> | string>;
30
30
  "scripts"?: Record<string, string>;
31
+ "webGISComponents"?: {
32
+ deployBuilds?: Record<string, unknown>;
33
+ };
31
34
  };
32
35
  export declare function retrievePackageJson(location?: string): MiniPackageJson;
33
36
  export declare function asyncRetrievePackageJson(location?: string): Promise<MiniPackageJson>;
@@ -28,6 +28,9 @@ export type MiniPackageJson = {
28
28
  "web-types"?: string;
29
29
  "exports"?: Record<string, Record<string, string> | string>;
30
30
  "scripts"?: Record<string, string>;
31
+ "webGISComponents"?: {
32
+ deployBuilds?: Record<string, unknown>;
33
+ };
31
34
  };
32
35
  export declare function retrievePackageJson(location?: string): MiniPackageJson;
33
36
  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": "5.0.0-next.4",
3
+ "version": "5.0.0-next.5",
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",