workspace-tools 0.41.0 → 0.41.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.
Files changed (160) hide show
  1. package/README.md +1 -1
  2. package/lib/dependencies/index.d.ts +2 -2
  3. package/lib/dependencies/index.js +31 -12
  4. package/lib/dependencies/index.js.map +1 -1
  5. package/lib/dependencies/transitiveDeps.d.ts +1 -1
  6. package/lib/dependencies/transitiveDeps.js +59 -38
  7. package/lib/dependencies/transitiveDeps.js.map +1 -1
  8. package/lib/getPackageInfo.d.ts +1 -1
  9. package/lib/getPackageInfo.js +46 -40
  10. package/lib/getPackageInfo.js.map +1 -1
  11. package/lib/getPackageInfos.d.ts +4 -2
  12. package/lib/getPackageInfos.js +35 -53
  13. package/lib/getPackageInfos.js.map +1 -1
  14. package/lib/git/config.d.ts +1 -1
  15. package/lib/git/config.js +15 -12
  16. package/lib/git/config.js.map +1 -1
  17. package/lib/git/getDefaultRemote.js +45 -30
  18. package/lib/git/getDefaultRemote.js.map +1 -1
  19. package/lib/git/getDefaultRemoteBranch.d.ts +1 -1
  20. package/lib/git/getDefaultRemoteBranch.js +35 -24
  21. package/lib/git/getDefaultRemoteBranch.js.map +1 -1
  22. package/lib/git/getRepositoryName.d.ts +1 -1
  23. package/lib/git/getRepositoryName.js +17 -19
  24. package/lib/git/getRepositoryName.js.map +1 -1
  25. package/lib/git/git.d.ts +2 -5
  26. package/lib/git/git.js +62 -64
  27. package/lib/git/git.js.map +1 -1
  28. package/lib/git/gitUtilities.d.ts +3 -3
  29. package/lib/git/gitUtilities.js +377 -147
  30. package/lib/git/gitUtilities.js.map +1 -1
  31. package/lib/git/index.d.ts +5 -5
  32. package/lib/git/index.js +50 -28
  33. package/lib/git/index.js.map +1 -1
  34. package/lib/git/types.js +4 -3
  35. package/lib/git/types.js.map +1 -1
  36. package/lib/graph/createDependencyMap.d.ts +2 -2
  37. package/lib/graph/createDependencyMap.js +18 -18
  38. package/lib/graph/createDependencyMap.js.map +1 -1
  39. package/lib/graph/createPackageGraph.d.ts +3 -3
  40. package/lib/graph/createPackageGraph.js +58 -45
  41. package/lib/graph/createPackageGraph.js.map +1 -1
  42. package/lib/graph/getPackageDependencies.d.ts +1 -1
  43. package/lib/graph/getPackageDependencies.js +17 -17
  44. package/lib/graph/getPackageDependencies.js.map +1 -1
  45. package/lib/graph/index.d.ts +4 -4
  46. package/lib/graph/index.js +25 -27
  47. package/lib/graph/index.js.map +1 -1
  48. package/lib/index.d.ts +29 -26
  49. package/lib/index.js +154 -70
  50. package/lib/index.js.map +1 -1
  51. package/lib/isCachingEnabled.js +17 -6
  52. package/lib/isCachingEnabled.js.map +1 -1
  53. package/lib/lockfile/nameAtVersion.js +9 -4
  54. package/lib/lockfile/nameAtVersion.js.map +1 -1
  55. package/lib/lockfile/parseBerryLock.d.ts +1 -1
  56. package/lib/lockfile/parseBerryLock.js +13 -11
  57. package/lib/lockfile/parseBerryLock.js.map +1 -1
  58. package/lib/lockfile/parseLockFile.d.ts +2 -0
  59. package/lib/lockfile/parseLockFile.js +87 -0
  60. package/lib/lockfile/parseLockFile.js.map +1 -0
  61. package/lib/lockfile/parseNpmLock.d.ts +1 -1
  62. package/lib/lockfile/parseNpmLock.js +15 -7
  63. package/lib/lockfile/parseNpmLock.js.map +1 -1
  64. package/lib/lockfile/parsePnpmLock.d.ts +1 -1
  65. package/lib/lockfile/parsePnpmLock.js +14 -9
  66. package/lib/lockfile/parsePnpmLock.js.map +1 -1
  67. package/lib/lockfile/queryLockFile.d.ts +1 -1
  68. package/lib/lockfile/queryLockFile.js +11 -6
  69. package/lib/lockfile/queryLockFile.js.map +1 -1
  70. package/lib/lockfile/readYaml.js +17 -9
  71. package/lib/lockfile/readYaml.js.map +1 -1
  72. package/lib/lockfile/types.js +3 -2
  73. package/lib/lockfile/types.js.map +1 -1
  74. package/lib/logging.js +10 -6
  75. package/lib/logging.js.map +1 -1
  76. package/lib/paths.d.ts +1 -1
  77. package/lib/paths.js +59 -59
  78. package/lib/paths.js.map +1 -1
  79. package/lib/scope.js +30 -21
  80. package/lib/scope.js.map +1 -1
  81. package/lib/types/Catalogs.js +8 -3
  82. package/lib/types/Catalogs.js.map +1 -1
  83. package/lib/types/PackageGraph.js +4 -3
  84. package/lib/types/PackageGraph.js.map +1 -1
  85. package/lib/types/PackageInfo.d.ts +1 -1
  86. package/lib/types/PackageInfo.js +3 -2
  87. package/lib/types/PackageInfo.js.map +1 -1
  88. package/lib/types/WorkspaceInfo.d.ts +1 -1
  89. package/lib/types/WorkspaceInfo.js +3 -2
  90. package/lib/types/WorkspaceInfo.js.map +1 -1
  91. package/lib/types/WorkspaceManager.js +3 -2
  92. package/lib/types/WorkspaceManager.js.map +1 -1
  93. package/lib/workspaces/catalogsToYaml.d.ts +1 -1
  94. package/lib/workspaces/catalogsToYaml.js +12 -10
  95. package/lib/workspaces/catalogsToYaml.js.map +1 -1
  96. package/lib/workspaces/findWorkspacePath.d.ts +2 -1
  97. package/lib/workspaces/findWorkspacePath.js +10 -12
  98. package/lib/workspaces/findWorkspacePath.js.map +1 -1
  99. package/lib/workspaces/getAllPackageJsonFiles.js +32 -28
  100. package/lib/workspaces/getAllPackageJsonFiles.js.map +1 -1
  101. package/lib/workspaces/getCatalogVersion.d.ts +1 -1
  102. package/lib/workspaces/getCatalogVersion.js +19 -32
  103. package/lib/workspaces/getCatalogVersion.js.map +1 -1
  104. package/lib/workspaces/getCatalogs.d.ts +2 -2
  105. package/lib/workspaces/getCatalogs.js +17 -22
  106. package/lib/workspaces/getCatalogs.js.map +1 -1
  107. package/lib/workspaces/getChangedPackages.d.ts +1 -1
  108. package/lib/workspaces/getChangedPackages.js +47 -30
  109. package/lib/workspaces/getChangedPackages.js.map +1 -1
  110. package/lib/workspaces/getPackagesByFiles.js +29 -24
  111. package/lib/workspaces/getPackagesByFiles.js.map +1 -1
  112. package/lib/workspaces/getWorkspaceInfos.d.ts +2 -2
  113. package/lib/workspaces/getWorkspaceInfos.js +43 -58
  114. package/lib/workspaces/getWorkspaceInfos.js.map +1 -1
  115. package/lib/workspaces/getWorkspaceManagerRoot.d.ts +1 -1
  116. package/lib/workspaces/getWorkspaceManagerRoot.js +16 -13
  117. package/lib/workspaces/getWorkspaceManagerRoot.js.map +1 -1
  118. package/lib/workspaces/getWorkspacePackagePaths.d.ts +1 -1
  119. package/lib/workspaces/getWorkspacePackagePaths.js +86 -72
  120. package/lib/workspaces/getWorkspacePackagePaths.js.map +1 -1
  121. package/lib/workspaces/getWorkspacePatterns.d.ts +1 -1
  122. package/lib/workspaces/getWorkspacePatterns.js +18 -20
  123. package/lib/workspaces/getWorkspacePatterns.js.map +1 -1
  124. package/lib/workspaces/implementations/WorkspaceUtilities.d.ts +1 -1
  125. package/lib/workspaces/implementations/WorkspaceUtilities.js +3 -2
  126. package/lib/workspaces/implementations/WorkspaceUtilities.js.map +1 -1
  127. package/lib/workspaces/implementations/getPackageJsonWorkspacePatterns.d.ts +1 -1
  128. package/lib/workspaces/implementations/getPackageJsonWorkspacePatterns.js +24 -22
  129. package/lib/workspaces/implementations/getPackageJsonWorkspacePatterns.js.map +1 -1
  130. package/lib/workspaces/implementations/getWorkspaceManagerAndRoot.d.ts +1 -1
  131. package/lib/workspaces/implementations/getWorkspaceManagerAndRoot.js +38 -43
  132. package/lib/workspaces/implementations/getWorkspaceManagerAndRoot.js.map +1 -1
  133. package/lib/workspaces/implementations/getWorkspaceUtilities.d.ts +2 -2
  134. package/lib/workspaces/implementations/getWorkspaceUtilities.js +25 -13
  135. package/lib/workspaces/implementations/getWorkspaceUtilities.js.map +1 -1
  136. package/lib/workspaces/implementations/index.d.ts +2 -2
  137. package/lib/workspaces/implementations/index.js +19 -7
  138. package/lib/workspaces/implementations/index.js.map +1 -1
  139. package/lib/workspaces/implementations/lerna.d.ts +1 -1
  140. package/lib/workspaces/implementations/lerna.js +55 -31
  141. package/lib/workspaces/implementations/lerna.js.map +1 -1
  142. package/lib/workspaces/implementations/npm.d.ts +1 -1
  143. package/lib/workspaces/implementations/npm.js +12 -7
  144. package/lib/workspaces/implementations/npm.js.map +1 -1
  145. package/lib/workspaces/implementations/pnpm.d.ts +1 -1
  146. package/lib/workspaces/implementations/pnpm.js +28 -17
  147. package/lib/workspaces/implementations/pnpm.js.map +1 -1
  148. package/lib/workspaces/implementations/rush.d.ts +1 -1
  149. package/lib/workspaces/implementations/rush.js +27 -16
  150. package/lib/workspaces/implementations/rush.js.map +1 -1
  151. package/lib/workspaces/implementations/yarn.d.ts +1 -1
  152. package/lib/workspaces/implementations/yarn.js +34 -26
  153. package/lib/workspaces/implementations/yarn.js.map +1 -1
  154. package/lib/workspaces/wrapWorkspaceUtility.d.ts +1 -1
  155. package/lib/workspaces/wrapWorkspaceUtility.js +25 -27
  156. package/lib/workspaces/wrapWorkspaceUtility.js.map +1 -1
  157. package/package.json +21 -12
  158. package/lib/lockfile/index.d.ts +0 -6
  159. package/lib/lockfile/index.js +0 -105
  160. package/lib/lockfile/index.js.map +0 -1
@@ -1,3 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=Catalogs.js.map
1
+ /**
2
+ * Mapping from package name to package version.
3
+ * @see https://pnpm.io/catalogs#default-catalog
4
+ * @see https://yarnpkg.com/features/catalogs#basic-usage
5
+ */ "use strict";
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"Catalogs.js","sourceRoot":"","sources":["../../src/types/Catalogs.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../../src/types/Catalogs.ts"],"sourcesContent":["/**\n * Mapping from package name to package version.\n * @see https://pnpm.io/catalogs#default-catalog\n * @see https://yarnpkg.com/features/catalogs#basic-usage\n */\nexport interface Catalog {\n [packageName: string]: string;\n}\n\n/**\n * Mapping from catalog name (non-default) to catalog definition\n * @see https://pnpm.io/catalogs#named-catalogs\n * @see https://yarnpkg.com/features/catalogs#named-catalogs\n */\nexport interface NamedCatalogs {\n [catalogName: string]: Catalog;\n}\n\n/**\n * Package version catalogs\n * @see https://pnpm.io/catalogs\n * @see https://yarnpkg.com/features/catalogs\n */\nexport interface Catalogs {\n /**\n * The default catalog (`catalog:`) if present.\n *\n * Whether this is equivalent to `catalogs.default` depends on the package manager:\n * they're the same in pnpm, but different in yarn. If there was a pnpm catalog named \"default\",\n * it will be stored under this property instead (but `getCatalogVersion` supports either syntax).\n */\n default?: Catalog;\n\n /**\n * Mapping from catalog name to catalog definition, if present.\n *\n * (For pnpm, if there was a catalog named \"default\", it will be under `Catalogs.default`\n * and omitted here.)\n */\n named?: NamedCatalogs;\n}\n"],"names":[],"mappings":"AAAA;;;;CAIC"}
@@ -1,3 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=PackageGraph.js.map
1
+ /** A package graph edge that defines a single package name and one of its dependency */ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"PackageGraph.js","sourceRoot":"","sources":["../../src/types/PackageGraph.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../../src/types/PackageGraph.ts"],"sourcesContent":["/** A package graph edge that defines a single package name and one of its dependency */\nexport interface PackageDependency {\n /** Name of a package */\n name: string;\n /** A dependency of `name` */\n dependency: string;\n}\n\n/** The graph is defined by as a list of package names as nodes, and a list of dependencies as edges */\nexport interface PackageGraph {\n /** Nodes: list of package names */\n packages: string[];\n\n /** Edges: list of package dependencies */\n dependencies: PackageDependency[];\n}\n"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -1,4 +1,4 @@
1
- import type { Catalog, NamedCatalogs } from "./Catalogs";
1
+ import type { Catalog, NamedCatalogs } from "./Catalogs.js";
2
2
  /** Contents of `package.json`, plus the `packageJsonPath` */
3
3
  export interface PackageInfo {
4
4
  /** Absolute path to this package.json file */
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=PackageInfo.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"PackageInfo.js","sourceRoot":"","sources":["../../src/types/PackageInfo.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { PackageInfo } from "./PackageInfo";
1
+ import { type PackageInfo } from "./PackageInfo.js";
2
2
  /**
3
3
  * Info about a single package ("workspace" in npm/yarn/pnpm terms) within a monorepo.
4
4
  *
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=WorkspaceInfo.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceInfo.js","sourceRoot":"","sources":["../../src/types/WorkspaceInfo.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=WorkspaceManager.js.map
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceManager.js","sourceRoot":"","sources":["../../src/types/WorkspaceManager.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import type { Catalogs } from "../types/Catalogs";
1
+ import type { Catalogs } from "../types/Catalogs.js";
2
2
  /**
3
3
  * Convert catalogs to the yaml format used by yarn v4 and pnpm.
4
4
  */
@@ -1,29 +1,31 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.catalogsToYaml = void 0;
4
- /**
5
- * Convert catalogs to the yaml format used by yarn v4 and pnpm.
6
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "catalogsToYaml", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return catalogsToYaml;
9
+ }
10
+ });
7
11
  function catalogsToYaml(catalogs, options = {}) {
8
12
  const { named, default: defaultCatalog } = catalogs;
9
13
  const lines = [];
10
14
  const indent = typeof options.indent === "string" ? options.indent : " ".repeat(options.indent ?? 2);
11
15
  if (defaultCatalog) {
12
16
  lines.push("catalog:");
13
- for (const [pkg, version] of Object.entries(defaultCatalog)) {
17
+ for (const [pkg, version] of Object.entries(defaultCatalog)){
14
18
  lines.push(`${indent}${pkg}: ${version}`);
15
19
  }
16
20
  }
17
21
  if (named) {
18
22
  lines.push("catalogs:");
19
- for (const [catalogName, catalogEntries] of Object.entries(named)) {
23
+ for (const [catalogName, catalogEntries] of Object.entries(named)){
20
24
  lines.push(`${indent}${catalogName}:`);
21
- for (const [pkg, version] of Object.entries(catalogEntries)) {
25
+ for (const [pkg, version] of Object.entries(catalogEntries)){
22
26
  lines.push(`${indent}${indent}${pkg}: ${version}`);
23
27
  }
24
28
  }
25
29
  }
26
30
  return lines.join("\n");
27
31
  }
28
- exports.catalogsToYaml = catalogsToYaml;
29
- //# sourceMappingURL=catalogsToYaml.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalogsToYaml.js","sourceRoot":"","sources":["../../src/workspaces/catalogsToYaml.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,SAAgB,cAAc,CAC5B,QAAkB,EAClB,UAGI,EAAE;IAEN,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC;IACpD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IAErG,IAAI,cAAc,EAAE;QAClB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACvB,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;YAC3D,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,GAAG,KAAK,OAAO,EAAE,CAAC,CAAC;SAC3C;KACF;IAED,IAAI,KAAK,EAAE;QACT,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxB,KAAK,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACjE,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,WAAW,GAAG,CAAC,CAAC;YACvC,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;gBAC3D,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,GAAG,KAAK,OAAO,EAAE,CAAC,CAAC;aACpD;SACF;KACF;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AA7BD,wCA6BC"}
1
+ {"version":3,"sources":["../../src/workspaces/catalogsToYaml.ts"],"sourcesContent":["import type { Catalogs } from \"../types/Catalogs.js\";\n\n/**\n * Convert catalogs to the yaml format used by yarn v4 and pnpm.\n */\nexport function catalogsToYaml(\n catalogs: Catalogs,\n options: {\n /** Number of spaces (default 2), or another indentation character */\n indent?: number | string;\n } = {}\n): string {\n const { named, default: defaultCatalog } = catalogs;\n const lines: string[] = [];\n const indent = typeof options.indent === \"string\" ? options.indent : \" \".repeat(options.indent ?? 2);\n\n if (defaultCatalog) {\n lines.push(\"catalog:\");\n for (const [pkg, version] of Object.entries(defaultCatalog)) {\n lines.push(`${indent}${pkg}: ${version}`);\n }\n }\n\n if (named) {\n lines.push(\"catalogs:\");\n for (const [catalogName, catalogEntries] of Object.entries(named)) {\n lines.push(`${indent}${catalogName}:`);\n for (const [pkg, version] of Object.entries(catalogEntries)) {\n lines.push(`${indent}${indent}${pkg}: ${version}`);\n }\n }\n }\n\n return lines.join(\"\\n\");\n}\n"],"names":["catalogsToYaml","catalogs","options","named","default","defaultCatalog","lines","indent","repeat","push","pkg","version","Object","entries","catalogName","catalogEntries","join"],"mappings":";;;;+BAKgBA;;;eAAAA;;;AAAT,SAASA,eACdC,QAAkB,EAClBC,UAGI,CAAC,CAAC;IAEN,MAAM,EAAEC,KAAK,EAAEC,SAASC,cAAc,EAAE,GAAGJ;IAC3C,MAAMK,QAAkB,EAAE;IAC1B,MAAMC,SAAS,OAAOL,QAAQK,MAAM,KAAK,WAAWL,QAAQK,MAAM,GAAG,IAAIC,MAAM,CAACN,QAAQK,MAAM,IAAI;IAElG,IAAIF,gBAAgB;QAClBC,MAAMG,IAAI,CAAC;QACX,KAAK,MAAM,CAACC,KAAKC,QAAQ,IAAIC,OAAOC,OAAO,CAACR,gBAAiB;YAC3DC,MAAMG,IAAI,CAAC,GAAGF,SAASG,IAAI,EAAE,EAAEC,SAAS;QAC1C;IACF;IAEA,IAAIR,OAAO;QACTG,MAAMG,IAAI,CAAC;QACX,KAAK,MAAM,CAACK,aAAaC,eAAe,IAAIH,OAAOC,OAAO,CAACV,OAAQ;YACjEG,MAAMG,IAAI,CAAC,GAAGF,SAASO,YAAY,CAAC,CAAC;YACrC,KAAK,MAAM,CAACJ,KAAKC,QAAQ,IAAIC,OAAOC,OAAO,CAACE,gBAAiB;gBAC3DT,MAAMG,IAAI,CAAC,GAAGF,SAASA,SAASG,IAAI,EAAE,EAAEC,SAAS;YACnD;QACF;IACF;IAEA,OAAOL,MAAMU,IAAI,CAAC;AACpB"}
@@ -1,9 +1,10 @@
1
- import type { WorkspaceInfos } from "../types/WorkspaceInfo";
1
+ import type { WorkspaceInfos } from "../types/WorkspaceInfo.js";
2
2
  /**
3
3
  * Find the path for a particular package name from an array of info about packages ("workspaces"
4
4
  * in npm/yarn/pnpm terms) within a monorepo.
5
5
  * @param workspaces Array of info about packages within a monorepo
6
6
  * @param packageName Package name to find
7
7
  * @returns Package path if found, or undefined
8
+ * @deprecated Just write `workspaces.find(({ name }) => name === packageName)?.path` instead
8
9
  */
9
10
  export declare function findWorkspacePath(workspaces: WorkspaceInfos, packageName: string): string | undefined;
@@ -1,15 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findWorkspacePath = void 0;
4
- /**
5
- * Find the path for a particular package name from an array of info about packages ("workspaces"
6
- * in npm/yarn/pnpm terms) within a monorepo.
7
- * @param workspaces Array of info about packages within a monorepo
8
- * @param packageName Package name to find
9
- * @returns Package path if found, or undefined
10
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "findWorkspacePath", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return findWorkspacePath;
9
+ }
10
+ });
11
11
  function findWorkspacePath(workspaces, packageName) {
12
- return workspaces.find(({ name }) => name === packageName)?.path;
12
+ return workspaces.find(({ name })=>name === packageName)?.path;
13
13
  }
14
- exports.findWorkspacePath = findWorkspacePath;
15
- //# sourceMappingURL=findWorkspacePath.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"findWorkspacePath.js","sourceRoot":"","sources":["../../src/workspaces/findWorkspacePath.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,UAA0B,EAAE,WAAmB;IAC/E,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,EAAE,IAAI,CAAC;AACnE,CAAC;AAFD,8CAEC"}
1
+ {"version":3,"sources":["../../src/workspaces/findWorkspacePath.ts"],"sourcesContent":["import type { WorkspaceInfos } from \"../types/WorkspaceInfo.js\";\n\n/**\n * Find the path for a particular package name from an array of info about packages (\"workspaces\"\n * in npm/yarn/pnpm terms) within a monorepo.\n * @param workspaces Array of info about packages within a monorepo\n * @param packageName Package name to find\n * @returns Package path if found, or undefined\n * @deprecated Just write `workspaces.find(({ name }) => name === packageName)?.path` instead\n */\nexport function findWorkspacePath(workspaces: WorkspaceInfos, packageName: string): string | undefined {\n return workspaces.find(({ name }) => name === packageName)?.path;\n}\n"],"names":["findWorkspacePath","workspaces","packageName","find","name","path"],"mappings":";;;;+BAUgBA;;;eAAAA;;;AAAT,SAASA,kBAAkBC,UAA0B,EAAEC,WAAmB;IAC/E,OAAOD,WAAWE,IAAI,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKA,SAASF,cAAcG;AAC9D"}
@@ -1,45 +1,49 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getAllPackageJsonFilesAsync = exports._resetPackageJsonFilesCache = exports.getAllPackageJsonFiles = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const getWorkspacePackagePaths_1 = require("./getWorkspacePackagePaths");
9
- const isCachingEnabled_1 = require("../isCachingEnabled");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get _resetPackageJsonFilesCache () {
13
+ return _resetPackageJsonFilesCache;
14
+ },
15
+ get getAllPackageJsonFiles () {
16
+ return getAllPackageJsonFiles;
17
+ },
18
+ get getAllPackageJsonFilesAsync () {
19
+ return getAllPackageJsonFilesAsync;
20
+ }
21
+ });
22
+ const _path = /*#__PURE__*/ _interop_require_default(require("path"));
23
+ const _getWorkspacePackagePaths = require("./getWorkspacePackagePaths.js");
24
+ const _isCachingEnabled = require("../isCachingEnabled.js");
25
+ function _interop_require_default(obj) {
26
+ return obj && obj.__esModule ? obj : {
27
+ default: obj
28
+ };
29
+ }
10
30
  const cache = new Map();
11
- /**
12
- * Get paths to every package.json in the monorepo, given a cwd, with caching.
13
- *
14
- * @returns Array of package.json paths, or undefined if there's any issue
15
- * (logs verbose warnings instead of throwing on error)
16
- */
17
31
  function getAllPackageJsonFiles(cwd) {
18
- if ((0, isCachingEnabled_1.isCachingEnabled)() && cache.has(cwd)) {
32
+ if ((0, _isCachingEnabled.isCachingEnabled)() && cache.has(cwd)) {
19
33
  return cache.get(cwd);
20
34
  }
21
- const packageJsonFiles = (0, getWorkspacePackagePaths_1.getWorkspacePackagePaths)(cwd)?.map((packagePath) => path_1.default.join(packagePath, "package.json"));
35
+ const packageJsonFiles = (0, _getWorkspacePackagePaths.getWorkspacePackagePaths)(cwd)?.map((packagePath)=>_path.default.join(packagePath, "package.json"));
22
36
  cache.set(cwd, packageJsonFiles);
23
37
  return packageJsonFiles;
24
38
  }
25
- exports.getAllPackageJsonFiles = getAllPackageJsonFiles;
26
39
  function _resetPackageJsonFilesCache() {
27
40
  cache.clear();
28
41
  }
29
- exports._resetPackageJsonFilesCache = _resetPackageJsonFilesCache;
30
- /**
31
- * Get paths to every package.json in the monorepo, given a cwd, with caching.
32
- *
33
- * @returns Array of package.json paths, or undefined if there's any issue
34
- * (logs verbose warnings instead of throwing on error)
35
- */
36
42
  async function getAllPackageJsonFilesAsync(cwd) {
37
- if ((0, isCachingEnabled_1.isCachingEnabled)() && cache.has(cwd)) {
43
+ if ((0, _isCachingEnabled.isCachingEnabled)() && cache.has(cwd)) {
38
44
  return cache.get(cwd);
39
45
  }
40
- const packageJsonFiles = (await (0, getWorkspacePackagePaths_1.getWorkspacePackagePathsAsync)(cwd))?.map((packagePath) => path_1.default.join(packagePath, "package.json"));
46
+ const packageJsonFiles = (await (0, _getWorkspacePackagePaths.getWorkspacePackagePathsAsync)(cwd))?.map((packagePath)=>_path.default.join(packagePath, "package.json"));
41
47
  cache.set(cwd, packageJsonFiles);
42
48
  return packageJsonFiles;
43
49
  }
44
- exports.getAllPackageJsonFilesAsync = getAllPackageJsonFilesAsync;
45
- //# sourceMappingURL=getAllPackageJsonFiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAllPackageJsonFiles.js","sourceRoot":"","sources":["../../src/workspaces/getAllPackageJsonFiles.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,yEAAqG;AACrG,0DAAuD;AAEvD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAgC,CAAC;AAEtD;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,GAAW;IAChD,IAAI,IAAA,mCAAgB,GAAE,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACxC,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;KACxB;IAED,MAAM,gBAAgB,GAAG,IAAA,mDAAwB,EAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;IAErH,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAEjC,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAVD,wDAUC;AAED,SAAgB,2BAA2B;IACzC,KAAK,CAAC,KAAK,EAAE,CAAC;AAChB,CAAC;AAFD,kEAEC;AAED;;;;;GAKG;AACI,KAAK,UAAU,2BAA2B,CAAC,GAAW;IAC3D,IAAI,IAAA,mCAAgB,GAAE,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACxC,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;KACxB;IAED,MAAM,gBAAgB,GAAG,CAAC,MAAM,IAAA,wDAA6B,EAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CACvF,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CACvC,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;IAEjC,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAZD,kEAYC"}
1
+ {"version":3,"sources":["../../src/workspaces/getAllPackageJsonFiles.ts"],"sourcesContent":["import path from \"path\";\nimport { getWorkspacePackagePaths, getWorkspacePackagePathsAsync } from \"./getWorkspacePackagePaths.js\";\nimport { isCachingEnabled } from \"../isCachingEnabled.js\";\n\nconst cache = new Map<string, string[] | undefined>();\n\n/**\n * Get paths to every package.json in the monorepo, given a cwd, with caching.\n *\n * @returns Array of package.json paths, or undefined if there's any issue\n * (logs verbose warnings instead of throwing on error)\n */\nexport function getAllPackageJsonFiles(cwd: string): string[] | undefined {\n if (isCachingEnabled() && cache.has(cwd)) {\n return cache.get(cwd)!;\n }\n\n const packageJsonFiles = getWorkspacePackagePaths(cwd)?.map((packagePath) => path.join(packagePath, \"package.json\"));\n\n cache.set(cwd, packageJsonFiles);\n\n return packageJsonFiles;\n}\n\nexport function _resetPackageJsonFilesCache(): void {\n cache.clear();\n}\n\n/**\n * Get paths to every package.json in the monorepo, given a cwd, with caching.\n *\n * @returns Array of package.json paths, or undefined if there's any issue\n * (logs verbose warnings instead of throwing on error)\n */\nexport async function getAllPackageJsonFilesAsync(cwd: string): Promise<string[] | undefined> {\n if (isCachingEnabled() && cache.has(cwd)) {\n return cache.get(cwd)!;\n }\n\n const packageJsonFiles = (await getWorkspacePackagePathsAsync(cwd))?.map((packagePath) =>\n path.join(packagePath, \"package.json\")\n );\n\n cache.set(cwd, packageJsonFiles);\n\n return packageJsonFiles;\n}\n"],"names":["_resetPackageJsonFilesCache","getAllPackageJsonFiles","getAllPackageJsonFilesAsync","cache","Map","cwd","isCachingEnabled","has","get","packageJsonFiles","getWorkspacePackagePaths","map","packagePath","path","join","set","clear","getWorkspacePackagePathsAsync"],"mappings":";;;;;;;;;;;QAwBgBA;eAAAA;;QAZAC;eAAAA;;QAsBMC;eAAAA;;;6DAlCL;0CACuD;kCACvC;;;;;;AAEjC,MAAMC,QAAQ,IAAIC;AAQX,SAASH,uBAAuBI,GAAW;IAChD,IAAIC,IAAAA,kCAAgB,OAAMH,MAAMI,GAAG,CAACF,MAAM;QACxC,OAAOF,MAAMK,GAAG,CAACH;IACnB;IAEA,MAAMI,mBAAmBC,IAAAA,kDAAwB,EAACL,MAAMM,IAAI,CAACC,cAAgBC,aAAI,CAACC,IAAI,CAACF,aAAa;IAEpGT,MAAMY,GAAG,CAACV,KAAKI;IAEf,OAAOA;AACT;AAEO,SAAST;IACdG,MAAMa,KAAK;AACb;AAQO,eAAed,4BAA4BG,GAAW;IAC3D,IAAIC,IAAAA,kCAAgB,OAAMH,MAAMI,GAAG,CAACF,MAAM;QACxC,OAAOF,MAAMK,GAAG,CAACH;IACnB;IAEA,MAAMI,mBAAoB,CAAA,MAAMQ,IAAAA,uDAA6B,EAACZ,IAAG,GAAIM,IAAI,CAACC,cACxEC,aAAI,CAACC,IAAI,CAACF,aAAa;IAGzBT,MAAMY,GAAG,CAACV,KAAKI;IAEf,OAAOA;AACT"}
@@ -1,4 +1,4 @@
1
- import type { Catalogs } from "../types/Catalogs";
1
+ import type { Catalogs } from "../types/Catalogs.js";
2
2
  /**
3
3
  * Returns true if the version starts with `catalog:`.
4
4
  */
@@ -1,30 +1,25 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCatalogVersion = exports.isCatalogVersion = void 0;
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get getCatalogVersion () {
13
+ return getCatalogVersion;
14
+ },
15
+ get isCatalogVersion () {
16
+ return isCatalogVersion;
17
+ }
18
+ });
4
19
  const catalogPrefix = "catalog:";
5
- /**
6
- * Returns true if the version starts with `catalog:`.
7
- */
8
20
  function isCatalogVersion(version) {
9
21
  return version.startsWith(catalogPrefix);
10
22
  }
11
- exports.isCatalogVersion = isCatalogVersion;
12
- /**
13
- * Given a dependency package name and a version spec string, if the version starts with `catalog:`,
14
- * look up the actual version spec (not the final resolved version) from the given catalogs.
15
- *
16
- * Throws an error if there's anything invalid about the catalog spec (no catalogs defined,
17
- * no matching catalog, catalog doesn't contain `name`, recursive catalog version).
18
- *
19
- * Returns undefined if the version doesn't start with `catalog:`.
20
- * @see https://pnpm.io/catalogs
21
- * @see https://yarnpkg.com/features/catalogs
22
- *
23
- * @param name - Dependency package name
24
- * @param version - Dependency version spec, e.g. `catalog:my-catalog` or `catalog:`,
25
- * or some non-catalog spec like `^1.2.3`
26
- * @returns Actual version spec from the catalog, or undefined if not a catalog version
27
- */
28
23
  function getCatalogVersion(params) {
29
24
  const { name, version, catalogs } = params;
30
25
  if (!isCatalogVersion(version)) {
@@ -34,17 +29,11 @@ function getCatalogVersion(params) {
34
29
  throw new Error(`Dependency "${name}" uses a catalog version "${version}" but no catalogs are defined.`);
35
30
  }
36
31
  const catalogName = version.slice(catalogPrefix.length);
37
- const checkCatalog =
38
- // Explicit catalog:default refers to the default catalog in pnpm, or a catalog named "default"
32
+ const checkCatalog = // Explicit catalog:default refers to the default catalog in pnpm, or a catalog named "default"
39
33
  // in yarn... Check for the yarn case first or fall back to .default. (getCatalogs should have
40
34
  // removed the named "default" catalog from namedCatalogs in managers where they're the same,
41
35
  // and yarn install would have errored if a named catalog "default" was referenced but not defined.)
42
- catalogName === "default"
43
- ? catalogs.named?.default || catalogs.default
44
- : // Otherwise use either the given named catalog, or the default if no name was specified
45
- catalogName
46
- ? catalogs.named?.[catalogName]
47
- : catalogs.default;
36
+ catalogName === "default" ? catalogs.named?.default || catalogs.default : catalogName ? catalogs.named?.[catalogName] : catalogs.default;
48
37
  const catalogNameStr = catalogName ? `catalogs.${catalogName}` : "the default catalog";
49
38
  if (!checkCatalog) {
50
39
  throw new Error(`Dependency "${name}" uses a catalog version "${version}" but ${catalogNameStr} is not defined.`);
@@ -58,5 +47,3 @@ function getCatalogVersion(params) {
58
47
  }
59
48
  return actualSpec;
60
49
  }
61
- exports.getCatalogVersion = getCatalogVersion;
62
- //# sourceMappingURL=getCatalogVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCatalogVersion.js","sourceRoot":"","sources":["../../src/workspaces/getCatalogVersion.ts"],"names":[],"mappings":";;;AAEA,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC;;GAEG;AACH,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,OAAO,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC;AAFD,4CAEC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,iBAAiB,CAAC,MAIjC;IACC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAE3C,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE;QAC9B,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,eAAe,IAAI,6BAA6B,OAAO,gCAAgC,CAAC,CAAC;KAC1G;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACxD,MAAM,YAAY;IAChB,+FAA+F;IAC/F,8FAA8F;IAC9F,6FAA6F;IAC7F,oGAAoG;IACpG,WAAW,KAAK,SAAS;QACvB,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,IAAI,QAAQ,CAAC,OAAO;QAC7C,CAAC,CAAC,wFAAwF;YACxF,WAAW;gBACX,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,WAAW,CAAC;gBAC/B,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;IACzB,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,YAAY,WAAW,EAAE,CAAC,CAAC,CAAC,qBAAqB,CAAC;IAEvF,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,eAAe,IAAI,6BAA6B,OAAO,SAAS,cAAc,kBAAkB,CAAC,CAAC;KACnH;IAED,MAAM,UAAU,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,KAAK,CACb,eAAe,IAAI,6BAA6B,OAAO,UAAU,cAAc,kCAAkC,IAAI,IAAI,CAC1H,CAAC;KACH;IAED,IAAI,gBAAgB,CAAC,UAAU,CAAC,EAAE;QAChC,MAAM,IAAI,KAAK,CACb,eAAe,IAAI,8CAA8C,UAAU,4BAA4B,CACxG,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AA/CD,8CA+CC"}
1
+ {"version":3,"sources":["../../src/workspaces/getCatalogVersion.ts"],"sourcesContent":["import type { Catalogs } from \"../types/Catalogs.js\";\n\nconst catalogPrefix = \"catalog:\";\n\n/**\n * Returns true if the version starts with `catalog:`.\n */\nexport function isCatalogVersion(version: string): boolean {\n return version.startsWith(catalogPrefix);\n}\n\n/**\n * Given a dependency package name and a version spec string, if the version starts with `catalog:`,\n * look up the actual version spec (not the final resolved version) from the given catalogs.\n *\n * Throws an error if there's anything invalid about the catalog spec (no catalogs defined,\n * no matching catalog, catalog doesn't contain `name`, recursive catalog version).\n *\n * Returns undefined if the version doesn't start with `catalog:`.\n * @see https://pnpm.io/catalogs\n * @see https://yarnpkg.com/features/catalogs\n *\n * @param name - Dependency package name\n * @param version - Dependency version spec, e.g. `catalog:my-catalog` or `catalog:`,\n * or some non-catalog spec like `^1.2.3`\n * @returns Actual version spec from the catalog, or undefined if not a catalog version\n */\nexport function getCatalogVersion(params: {\n name: string;\n version: string;\n catalogs: Catalogs | undefined;\n}): string | undefined {\n const { name, version, catalogs } = params;\n\n if (!isCatalogVersion(version)) {\n return undefined;\n }\n\n if (!catalogs) {\n throw new Error(`Dependency \"${name}\" uses a catalog version \"${version}\" but no catalogs are defined.`);\n }\n\n const catalogName = version.slice(catalogPrefix.length);\n const checkCatalog =\n // Explicit catalog:default refers to the default catalog in pnpm, or a catalog named \"default\"\n // in yarn... Check for the yarn case first or fall back to .default. (getCatalogs should have\n // removed the named \"default\" catalog from namedCatalogs in managers where they're the same,\n // and yarn install would have errored if a named catalog \"default\" was referenced but not defined.)\n catalogName === \"default\"\n ? catalogs.named?.default || catalogs.default\n : // Otherwise use either the given named catalog, or the default if no name was specified\n catalogName\n ? catalogs.named?.[catalogName]\n : catalogs.default;\n const catalogNameStr = catalogName ? `catalogs.${catalogName}` : \"the default catalog\";\n\n if (!checkCatalog) {\n throw new Error(`Dependency \"${name}\" uses a catalog version \"${version}\" but ${catalogNameStr} is not defined.`);\n }\n\n const actualSpec = checkCatalog[name];\n if (!actualSpec) {\n throw new Error(\n `Dependency \"${name}\" uses a catalog version \"${version}\", but ${catalogNameStr} doesn't define a version for \"${name}\".`\n );\n }\n\n if (isCatalogVersion(actualSpec)) {\n throw new Error(\n `Dependency \"${name}\" resolves to a recursive catalog version \"${actualSpec}\", which is not supported.`\n );\n }\n\n return actualSpec;\n}\n"],"names":["getCatalogVersion","isCatalogVersion","catalogPrefix","version","startsWith","params","name","catalogs","undefined","Error","catalogName","slice","length","checkCatalog","named","default","catalogNameStr","actualSpec"],"mappings":";;;;;;;;;;;QA2BgBA;eAAAA;;QApBAC;eAAAA;;;AALhB,MAAMC,gBAAgB;AAKf,SAASD,iBAAiBE,OAAe;IAC9C,OAAOA,QAAQC,UAAU,CAACF;AAC5B;AAkBO,SAASF,kBAAkBK,MAIjC;IACC,MAAM,EAAEC,IAAI,EAAEH,OAAO,EAAEI,QAAQ,EAAE,GAAGF;IAEpC,IAAI,CAACJ,iBAAiBE,UAAU;QAC9B,OAAOK;IACT;IAEA,IAAI,CAACD,UAAU;QACb,MAAM,IAAIE,MAAM,CAAC,YAAY,EAAEH,KAAK,0BAA0B,EAAEH,QAAQ,8BAA8B,CAAC;IACzG;IAEA,MAAMO,cAAcP,QAAQQ,KAAK,CAACT,cAAcU,MAAM;IACtD,MAAMC,eACJ,+FAA+F;IAC/F,8FAA8F;IAC9F,6FAA6F;IAC7F,oGAAoG;IACpGH,gBAAgB,YACZH,SAASO,KAAK,EAAEC,WAAWR,SAASQ,OAAO,GAE3CL,cACEH,SAASO,KAAK,EAAE,CAACJ,YAAY,GAC7BH,SAASQ,OAAO;IACxB,MAAMC,iBAAiBN,cAAc,CAAC,SAAS,EAAEA,aAAa,GAAG;IAEjE,IAAI,CAACG,cAAc;QACjB,MAAM,IAAIJ,MAAM,CAAC,YAAY,EAAEH,KAAK,0BAA0B,EAAEH,QAAQ,MAAM,EAAEa,eAAe,gBAAgB,CAAC;IAClH;IAEA,MAAMC,aAAaJ,YAAY,CAACP,KAAK;IACrC,IAAI,CAACW,YAAY;QACf,MAAM,IAAIR,MACR,CAAC,YAAY,EAAEH,KAAK,0BAA0B,EAAEH,QAAQ,OAAO,EAAEa,eAAe,+BAA+B,EAAEV,KAAK,EAAE,CAAC;IAE7H;IAEA,IAAIL,iBAAiBgB,aAAa;QAChC,MAAM,IAAIR,MACR,CAAC,YAAY,EAAEH,KAAK,2CAA2C,EAAEW,WAAW,0BAA0B,CAAC;IAE3G;IAEA,OAAOA;AACT"}
@@ -1,5 +1,5 @@
1
- import type { Catalogs } from "../types/Catalogs";
2
- import type { WorkspaceManager } from "../types/WorkspaceManager";
1
+ import type { Catalogs } from "../types/Catalogs.js";
2
+ import type { WorkspaceManager } from "../types/WorkspaceManager.js";
3
3
  /**
4
4
  * Get version catalogs, if supported by the manager (only pnpm and yarn v4 as of writing).
5
5
  * Returns undefined if no catalogs are present or the manager doesn't support them.
@@ -1,30 +1,25 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCatalogs = void 0;
4
- const implementations_1 = require("./implementations");
5
- const wrapWorkspaceUtility_1 = require("./wrapWorkspaceUtility");
6
- /**
7
- * Get version catalogs, if supported by the manager (only pnpm and yarn v4 as of writing).
8
- * Returns undefined if no catalogs are present or the manager doesn't support them.
9
- * @see https://pnpm.io/catalogs
10
- * @see https://yarnpkg.com/features/catalogs
11
- *
12
- * @param cwd - Current working directory. It will search up from here to find the root, with caching.
13
- * @param managerOverride Workspace/monorepo manager to use instead of auto-detecting
14
- *
15
- * @returns Catalogs if defined, or undefined if not available
16
- * (logs verbose warnings instead of throwing on error)
17
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "getCatalogs", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return getCatalogs;
9
+ }
10
+ });
11
+ const _implementations = require("./implementations");
12
+ const _wrapWorkspaceUtility = require("./wrapWorkspaceUtility.js");
18
13
  function getCatalogs(cwd, managerOverride) {
19
- return (0, wrapWorkspaceUtility_1.wrapWorkspaceUtility)({
14
+ return (0, _wrapWorkspaceUtility.wrapWorkspaceUtility)({
20
15
  cwd,
21
16
  managerOverride,
22
17
  description: "catalogs",
23
- impl: ({ manager, root }) => {
18
+ impl: ({ manager, root })=>{
24
19
  // There is no default implementation for catalogs, since not all managers support it
25
- return (0, implementations_1.getWorkspaceUtilities)(manager).getCatalogs?.({ root });
26
- },
20
+ return (0, _implementations.getWorkspaceUtilities)(manager).getCatalogs?.({
21
+ root
22
+ });
23
+ }
27
24
  });
28
25
  }
29
- exports.getCatalogs = getCatalogs;
30
- //# sourceMappingURL=getCatalogs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCatalogs.js","sourceRoot":"","sources":["../../src/workspaces/getCatalogs.ts"],"names":[],"mappings":";;;AAEA,uDAA0D;AAC1D,iEAA8D;AAE9D;;;;;;;;;;;GAWG;AACH,SAAgB,WAAW,CAAC,GAAW,EAAE,eAAkC;IACzE,OAAO,IAAA,2CAAoB,EAAC;QAC1B,GAAG;QACH,eAAe;QACf,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;YAC1B,qFAAqF;YACrF,OAAO,IAAA,uCAAqB,EAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QAChE,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAVD,kCAUC"}
1
+ {"version":3,"sources":["../../src/workspaces/getCatalogs.ts"],"sourcesContent":["import type { Catalogs } from \"../types/Catalogs.js\";\nimport type { WorkspaceManager } from \"../types/WorkspaceManager.js\";\nimport { getWorkspaceUtilities } from \"./implementations\";\nimport { wrapWorkspaceUtility } from \"./wrapWorkspaceUtility.js\";\n\n/**\n * Get version catalogs, if supported by the manager (only pnpm and yarn v4 as of writing).\n * Returns undefined if no catalogs are present or the manager doesn't support them.\n * @see https://pnpm.io/catalogs\n * @see https://yarnpkg.com/features/catalogs\n *\n * @param cwd - Current working directory. It will search up from here to find the root, with caching.\n * @param managerOverride Workspace/monorepo manager to use instead of auto-detecting\n *\n * @returns Catalogs if defined, or undefined if not available\n * (logs verbose warnings instead of throwing on error)\n */\nexport function getCatalogs(cwd: string, managerOverride?: WorkspaceManager): Catalogs | undefined {\n return wrapWorkspaceUtility({\n cwd,\n managerOverride,\n description: \"catalogs\",\n impl: ({ manager, root }) => {\n // There is no default implementation for catalogs, since not all managers support it\n return getWorkspaceUtilities(manager).getCatalogs?.({ root });\n },\n });\n}\n"],"names":["getCatalogs","cwd","managerOverride","wrapWorkspaceUtility","description","impl","manager","root","getWorkspaceUtilities"],"mappings":";;;;+BAiBgBA;;;eAAAA;;;iCAfsB;sCACD;AAc9B,SAASA,YAAYC,GAAW,EAAEC,eAAkC;IACzE,OAAOC,IAAAA,0CAAoB,EAAC;QAC1BF;QACAC;QACAE,aAAa;QACbC,MAAM,CAAC,EAAEC,OAAO,EAAEC,IAAI,EAAE;YACtB,qFAAqF;YACrF,OAAOC,IAAAA,sCAAqB,EAACF,SAASN,WAAW,GAAG;gBAAEO;YAAK;QAC7D;IACF;AACF"}
@@ -1,4 +1,4 @@
1
- import { GitCommonOptions, type GetChangesBetweenRefsOptions } from "../git/types";
1
+ import { type GitCommonOptions, type GetChangesBetweenRefsOptions } from "../git/types.js";
2
2
  type GetChangedPackagesOptions = GitCommonOptions & {
3
3
  /** The `merge-base` branch (must have been fetched locally) */
4
4
  target?: string;
@@ -1,52 +1,69 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getChangedPackages = exports.getChangedPackagesBetweenRefs = void 0;
4
- const git_1 = require("../git");
5
- const getPackagesByFiles_1 = require("./getPackagesByFiles");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get getChangedPackages () {
13
+ return getChangedPackages;
14
+ },
15
+ get getChangedPackagesBetweenRefs () {
16
+ return getChangedPackagesBetweenRefs;
17
+ }
18
+ });
19
+ const _git = require("../git");
20
+ const _getPackagesByFiles = require("./getPackagesByFiles.js");
6
21
  function getChangedPackagesBetweenRefs(paramsOrCwd, _fromRef, _toRef, _ignoreGlobs, _returnAllPackagesOnNoMatch) {
7
- const params = typeof paramsOrCwd === "string"
8
- ? {
9
- cwd: paramsOrCwd,
10
- fromRef: _fromRef,
11
- toRef: _toRef,
12
- ignoreGlobs: _ignoreGlobs,
13
- returnAllPackagesOnNoMatch: _returnAllPackagesOnNoMatch,
14
- }
15
- : paramsOrCwd;
22
+ var _gitOptions;
23
+ const params = typeof paramsOrCwd === "string" ? {
24
+ cwd: paramsOrCwd,
25
+ fromRef: _fromRef,
26
+ toRef: _toRef,
27
+ ignoreGlobs: _ignoreGlobs,
28
+ returnAllPackagesOnNoMatch: _returnAllPackagesOnNoMatch
29
+ } : paramsOrCwd;
16
30
  const { fromRef, toRef, ignoreGlobs, returnAllPackagesOnNoMatch = true, ...gitOptions } = params;
17
- gitOptions.throwOnError ?? (gitOptions.throwOnError = true);
31
+ (_gitOptions = gitOptions).throwOnError ?? (_gitOptions.throwOnError = true);
18
32
  const changes = [
19
33
  ...new Set([
20
- ...(0, git_1.getUntrackedChanges)(gitOptions),
21
- ...(0, git_1.getUnstagedChanges)(gitOptions),
22
- ...(0, git_1.getChangesBetweenRefs)({ fromRef, toRef, ...gitOptions }),
23
- ...(0, git_1.getStagedChanges)(gitOptions),
24
- ]),
34
+ ...(0, _git.getUntrackedChanges)(gitOptions),
35
+ ...(0, _git.getUnstagedChanges)(gitOptions),
36
+ ...(0, _git.getChangesBetweenRefs)({
37
+ fromRef,
38
+ toRef,
39
+ ...gitOptions
40
+ }),
41
+ ...(0, _git.getStagedChanges)(gitOptions)
42
+ ])
25
43
  ];
26
- return (0, getPackagesByFiles_1.getPackagesByFiles)({
44
+ return (0, _getPackagesByFiles.getPackagesByFiles)({
27
45
  root: gitOptions.cwd,
28
46
  files: changes,
29
47
  ignoreGlobs,
30
- returnAllPackagesOnNoMatch,
48
+ returnAllPackagesOnNoMatch
31
49
  });
32
50
  }
33
- exports.getChangedPackagesBetweenRefs = getChangedPackagesBetweenRefs;
34
51
  function getChangedPackages(cwdOrOptions, target, ignoreGlobs, returnAllPackagesOnNoMatch) {
52
+ var _gitOptions;
35
53
  let gitOptions;
36
54
  if (typeof cwdOrOptions === "string") {
37
- gitOptions = { cwd: cwdOrOptions };
38
- }
39
- else {
55
+ gitOptions = {
56
+ cwd: cwdOrOptions
57
+ };
58
+ } else {
40
59
  ({ target, ignoreGlobs, returnAllPackagesOnNoMatch, ...gitOptions } = cwdOrOptions);
41
60
  }
42
- gitOptions.throwOnError ?? (gitOptions.throwOnError = true);
43
- const targetBranch = target || (0, git_1.getDefaultRemoteBranch)(gitOptions);
61
+ (_gitOptions = gitOptions).throwOnError ?? (_gitOptions.throwOnError = true);
62
+ const targetBranch = target || (0, _git.getDefaultRemoteBranch)(gitOptions);
44
63
  return getChangedPackagesBetweenRefs({
45
64
  fromRef: targetBranch,
46
65
  ...gitOptions,
47
66
  ignoreGlobs,
48
- returnAllPackagesOnNoMatch,
67
+ returnAllPackagesOnNoMatch
49
68
  });
50
69
  }
51
- exports.getChangedPackages = getChangedPackages;
52
- //# sourceMappingURL=getChangedPackages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getChangedPackages.js","sourceRoot":"","sources":["../../src/workspaces/getChangedPackages.ts"],"names":[],"mappings":";;;AAAA,gCAMgB;AAEhB,6DAA0D;AAiD1D,SAAgB,6BAA6B,CAC3C,WAA0D,EAC1D,QAAiB,EACjB,MAAe,EACf,YAAuB,EACvB,2BAAqC;IAErC,MAAM,MAAM,GACV,OAAO,WAAW,KAAK,QAAQ;QAC7B,CAAC,CAAC;YACE,GAAG,EAAE,WAAW;YAChB,OAAO,EAAE,QAAS;YAClB,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,YAAY;YACzB,0BAA0B,EAAE,2BAA2B;SACxD;QACH,CAAC,CAAC,WAAW,CAAC;IAClB,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,0BAA0B,GAAG,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,MAAM,CAAC;IACjG,UAAU,CAAC,YAAY,KAAvB,UAAU,CAAC,YAAY,GAAK,IAAI,EAAC;IAEjC,MAAM,OAAO,GAAG;QACd,GAAG,IAAI,GAAG,CAAC;YACT,GAAG,IAAA,yBAAmB,EAAC,UAAU,CAAC;YAClC,GAAG,IAAA,wBAAkB,EAAC,UAAU,CAAC;YACjC,GAAG,IAAA,2BAAqB,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CAAC;YAC3D,GAAG,IAAA,sBAAgB,EAAC,UAAU,CAAC;SAChC,CAAC;KACH,CAAC;IAEF,OAAO,IAAA,uCAAkB,EAAC;QACxB,IAAI,EAAE,UAAU,CAAC,GAAG;QACpB,KAAK,EAAE,OAAO;QACd,WAAW;QACX,0BAA0B;KAC3B,CAAC,CAAC;AACL,CAAC;AAnCD,sEAmCC;AAoCD,SAAgB,kBAAkB,CAChC,YAAgD,EAChD,MAAe,EACf,WAAsB,EACtB,0BAAoC;IAEpC,IAAI,UAA4B,CAAC;IACjC,IAAI,OAAO,YAAY,KAAK,QAAQ,EAAE;QACpC,UAAU,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;KACpC;SAAM;QACL,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE,GAAG,UAAU,EAAE,GAAG,YAAY,CAAC,CAAC;KACrF;IACD,UAAU,CAAC,YAAY,KAAvB,UAAU,CAAC,YAAY,GAAK,IAAI,EAAC;IAEjC,MAAM,YAAY,GAAG,MAAM,IAAI,IAAA,4BAAsB,EAAC,UAAU,CAAC,CAAC;IAElE,OAAO,6BAA6B,CAAC;QACnC,OAAO,EAAE,YAAY;QACrB,GAAG,UAAU;QACb,WAAW;QACX,0BAA0B;KAC3B,CAAC,CAAC;AACL,CAAC;AAtBD,gDAsBC"}
1
+ {"version":3,"sources":["../../src/workspaces/getChangedPackages.ts"],"sourcesContent":["import {\n getChangesBetweenRefs,\n getDefaultRemoteBranch,\n getStagedChanges,\n getUnstagedChanges,\n getUntrackedChanges,\n} from \"../git\";\nimport { type GitCommonOptions, type GetChangesBetweenRefsOptions } from \"../git/types.js\";\nimport { getPackagesByFiles } from \"./getPackagesByFiles.js\";\n\ntype GetChangedPackagesOptions = GitCommonOptions & {\n /** The `merge-base` branch (must have been fetched locally) */\n target?: string;\n /** Glob patterns to ignore */\n ignoreGlobs?: string[];\n /** If true (the default), return all packages if no matches are found for any file. */\n returnAllPackagesOnNoMatch?: boolean;\n};\n\ntype GetChangedPackagesBetweenRefsOptions = Omit<GetChangedPackagesOptions, \"target\"> &\n Pick<GetChangesBetweenRefsOptions, \"fromRef\" | \"toRef\">;\n\n/**\n * Finds all packages that had been changed between two refs in the repo under cwd,\n * by executing `git diff $fromRef...$toRef`.\n *\n * **NOTE: The new object params version will throw if any of the git operations error.**\n * Disabling this behavior is not recommended due to the potential for hiding other issues,\n * but can be done by setting `throwOnError: false` in the options.\n *\n * Note that by default, if a repo-wide file such as the root package.json has changed,\n * all packages are assumed to have changed. (This is highly lage-specific behavior.)\n * Disable by setting `returnAllPackagesOnNoMatch` to `false`.\n *\n * Explanation of the three dots:\n *\n * ```txt\n * git diff [--options] <commit>...<commit> [--] [<path>...]\n *\n * This form is to view the changes on the branch containing and up to\n * the second <commit>, starting at a common ancestor of both\n * <commit>. \"git diff A...B\" is equivalent to \"git diff\n * $(git-merge-base A B) B\". You can omit any one of <commit>, which\n * has the same effect as using HEAD instead.\n * ```\n *\n * @returns list of package names that have changed\n */\nexport function getChangedPackagesBetweenRefs(params: GetChangedPackagesBetweenRefsOptions): string[];\n/** @deprecated Use object params version */\nexport function getChangedPackagesBetweenRefs(\n cwd: string,\n fromRef: string,\n toRef?: string,\n ignoreGlobs?: string[],\n returnAllPackagesOnNoMatch?: boolean\n): string[];\nexport function getChangedPackagesBetweenRefs(\n paramsOrCwd: GetChangedPackagesBetweenRefsOptions | string,\n _fromRef?: string,\n _toRef?: string,\n _ignoreGlobs?: string[],\n _returnAllPackagesOnNoMatch?: boolean\n): string[] {\n const params: GetChangedPackagesBetweenRefsOptions =\n typeof paramsOrCwd === \"string\"\n ? {\n cwd: paramsOrCwd,\n fromRef: _fromRef!,\n toRef: _toRef,\n ignoreGlobs: _ignoreGlobs,\n returnAllPackagesOnNoMatch: _returnAllPackagesOnNoMatch,\n }\n : paramsOrCwd;\n const { fromRef, toRef, ignoreGlobs, returnAllPackagesOnNoMatch = true, ...gitOptions } = params;\n gitOptions.throwOnError ??= true;\n\n const changes = [\n ...new Set([\n ...getUntrackedChanges(gitOptions),\n ...getUnstagedChanges(gitOptions),\n ...getChangesBetweenRefs({ fromRef, toRef, ...gitOptions }),\n ...getStagedChanges(gitOptions),\n ]),\n ];\n\n return getPackagesByFiles({\n root: gitOptions.cwd,\n files: changes,\n ignoreGlobs,\n returnAllPackagesOnNoMatch,\n });\n}\n\n/**\n * Finds all packages that had been changed in the repo under cwd, by executing\n * `git diff $target...`.\n *\n * **NOTE: The new object params version will throw if any of the git operations error.**\n * Disabling this behavior is not recommended due to the potential for hiding other issues,\n * but can be done by setting `throwOnError: false` in the options.\n *\n * Note that by default, if a repo-wide file such as the root package.json has changed,\n * all packages are assumed to have changed. (This is highly lage-specific behavior.)\n * Disable by setting `returnAllPackagesOnNoMatch` to `false`.\n *\n * Explanation of the three dots:\n *\n * ```txt\n * git diff [--options] <commit>...<commit> [--] [<path>...]\n *\n * This form is to view the changes on the branch containing and up to\n * the second <commit>, starting at a common ancestor of both\n * <commit>. \"git diff A...B\" is equivalent to \"git diff\n * $(git-merge-base A B) B\". You can omit any one of <commit>, which\n * has the same effect as using HEAD instead.\n * ```\n *\n * @returns list of package names that have changed\n */\nexport function getChangedPackages(params: GetChangedPackagesOptions): string[];\n/** @deprecated Use object params version */\nexport function getChangedPackages(\n cwd: string,\n target?: string,\n ignoreGlobs?: string[],\n returnAllPackagesOnNoMatch?: boolean\n): string[];\nexport function getChangedPackages(\n cwdOrOptions: string | GetChangedPackagesOptions,\n target?: string,\n ignoreGlobs?: string[],\n returnAllPackagesOnNoMatch?: boolean\n): string[] {\n let gitOptions: GitCommonOptions;\n if (typeof cwdOrOptions === \"string\") {\n gitOptions = { cwd: cwdOrOptions };\n } else {\n ({ target, ignoreGlobs, returnAllPackagesOnNoMatch, ...gitOptions } = cwdOrOptions);\n }\n gitOptions.throwOnError ??= true;\n\n const targetBranch = target || getDefaultRemoteBranch(gitOptions);\n\n return getChangedPackagesBetweenRefs({\n fromRef: targetBranch,\n ...gitOptions,\n ignoreGlobs,\n returnAllPackagesOnNoMatch,\n });\n}\n"],"names":["getChangedPackages","getChangedPackagesBetweenRefs","paramsOrCwd","_fromRef","_toRef","_ignoreGlobs","_returnAllPackagesOnNoMatch","gitOptions","params","cwd","fromRef","toRef","ignoreGlobs","returnAllPackagesOnNoMatch","throwOnError","changes","Set","getUntrackedChanges","getUnstagedChanges","getChangesBetweenRefs","getStagedChanges","getPackagesByFiles","root","files","cwdOrOptions","target","targetBranch","getDefaultRemoteBranch"],"mappings":";;;;;;;;;;;QAgIgBA;eAAAA;;QAvEAC;eAAAA;;;qBAnDT;oCAE4B;AAiD5B,SAASA,8BACdC,WAA0D,EAC1DC,QAAiB,EACjBC,MAAe,EACfC,YAAuB,EACvBC,2BAAqC;QAarCC;IAXA,MAAMC,SACJ,OAAON,gBAAgB,WACnB;QACEO,KAAKP;QACLQ,SAASP;QACTQ,OAAOP;QACPQ,aAAaP;QACbQ,4BAA4BP;IAC9B,IACAJ;IACN,MAAM,EAAEQ,OAAO,EAAEC,KAAK,EAAEC,WAAW,EAAEC,6BAA6B,IAAI,EAAE,GAAGN,YAAY,GAAGC;IAC1FD,CAAAA,cAAAA,YAAWO,YAAY,KAAvBP,YAAWO,YAAY,GAAK;IAE5B,MAAMC,UAAU;WACX,IAAIC,IAAI;eACNC,IAAAA,wBAAmB,EAACV;eACpBW,IAAAA,uBAAkB,EAACX;eACnBY,IAAAA,0BAAqB,EAAC;gBAAET;gBAASC;gBAAO,GAAGJ,UAAU;YAAC;eACtDa,IAAAA,qBAAgB,EAACb;SACrB;KACF;IAED,OAAOc,IAAAA,sCAAkB,EAAC;QACxBC,MAAMf,WAAWE,GAAG;QACpBc,OAAOR;QACPH;QACAC;IACF;AACF;AAoCO,SAASb,mBACdwB,YAAgD,EAChDC,MAAe,EACfb,WAAsB,EACtBC,0BAAoC;QAQpCN;IANA,IAAIA;IACJ,IAAI,OAAOiB,iBAAiB,UAAU;QACpCjB,aAAa;YAAEE,KAAKe;QAAa;IACnC,OAAO;QACJ,CAAA,EAAEC,MAAM,EAAEb,WAAW,EAAEC,0BAA0B,EAAE,GAAGN,YAAY,GAAGiB,YAAW;IACnF;IACAjB,CAAAA,cAAAA,YAAWO,YAAY,KAAvBP,YAAWO,YAAY,GAAK;IAE5B,MAAMY,eAAeD,UAAUE,IAAAA,2BAAsB,EAACpB;IAEtD,OAAON,8BAA8B;QACnCS,SAASgB;QACT,GAAGnB,UAAU;QACbK;QACAC;IACF;AACF"}