packtory 0.0.10 → 0.0.12

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 (250) hide show
  1. package/artifacts/artifacts-builder.d.ts +0 -14
  2. package/artifacts/artifacts-builder.d.ts.map +1 -1
  3. package/artifacts/artifacts-builder.js +75 -0
  4. package/artifacts/artifacts-builder.js.map +1 -1
  5. package/bundle-emitter/emitter.d.ts +0 -30
  6. package/bundle-emitter/emitter.d.ts.map +1 -1
  7. package/bundle-emitter/emitter.js +34 -0
  8. package/bundle-emitter/emitter.js.map +1 -1
  9. package/bundle-emitter/extract-package-tarball.js +11 -0
  10. package/bundle-emitter/extract-package-tarball.js.map +1 -1
  11. package/bundle-emitter/registry-client.d.ts +0 -21
  12. package/bundle-emitter/registry-client.d.ts.map +1 -1
  13. package/bundle-emitter/registry-client.js +261 -0
  14. package/bundle-emitter/registry-client.js.map +1 -1
  15. package/bundle-emitter/repository-url-normalizer.js +36 -0
  16. package/bundle-emitter/repository-url-normalizer.js.map +1 -1
  17. package/checks/check-runner.js +5 -0
  18. package/checks/check-runner.js.map +1 -1
  19. package/checks/rule.js +8 -0
  20. package/checks/rule.js.map +1 -1
  21. package/checks/rules/max-bundle-size.js +35 -0
  22. package/checks/rules/max-bundle-size.js.map +1 -1
  23. package/checks/rules/no-dev-dependency-imports.js +28 -0
  24. package/checks/rules/no-dev-dependency-imports.js.map +1 -1
  25. package/checks/rules/no-duplicated-files.js +107 -0
  26. package/checks/rules/no-duplicated-files.js.map +1 -1
  27. package/checks/rules/no-side-effects.js +42 -0
  28. package/checks/rules/no-side-effects.js.map +1 -1
  29. package/checks/rules/no-unused-bundle-dependencies.js +24 -0
  30. package/checks/rules/no-unused-bundle-dependencies.js.map +1 -1
  31. package/checks/rules/registry.js +9 -0
  32. package/checks/rules/registry.js.map +1 -1
  33. package/checks/rules/required-files.js +31 -0
  34. package/checks/rules/required-files.js.map +1 -1
  35. package/checks/rules/unique-target-paths.js +25 -0
  36. package/checks/rules/unique-target-paths.js.map +1 -1
  37. package/common/clock.d.ts +0 -6
  38. package/common/clock.d.ts.map +1 -1
  39. package/common/code-files.js +4 -0
  40. package/common/code-files.js.map +1 -1
  41. package/config/additional-files.js +4 -0
  42. package/config/additional-files.js.map +1 -1
  43. package/config/automatic-versioning-settings.js +4 -0
  44. package/config/automatic-versioning-settings.js.map +1 -1
  45. package/config/config.js +2 -0
  46. package/config/config.js.map +1 -1
  47. package/config/dead-code-elimination-settings.d.ts +0 -1
  48. package/config/dead-code-elimination-settings.d.ts.map +1 -1
  49. package/config/dead-code-elimination-settings.js +19 -0
  50. package/config/dead-code-elimination-settings.js.map +1 -1
  51. package/config/dependency-policy.js +3 -0
  52. package/config/dependency-policy.js.map +1 -1
  53. package/config/main-package-json-schema.js +1 -0
  54. package/config/main-package-json-schema.js.map +1 -1
  55. package/config/manual-versioning-settings.js +4 -0
  56. package/config/manual-versioning-settings.js.map +1 -1
  57. package/config/package-config.js +6 -0
  58. package/config/package-config.js.map +1 -1
  59. package/config/package-interface.js +26 -0
  60. package/config/package-interface.js.map +1 -1
  61. package/config/package-json.d.ts +0 -1
  62. package/config/package-json.d.ts.map +1 -1
  63. package/config/package-json.js +16 -0
  64. package/config/package-json.js.map +1 -1
  65. package/config/packtory-config-schema.js +3 -0
  66. package/config/packtory-config-schema.js.map +1 -1
  67. package/config/publish-settings.js +22 -0
  68. package/config/publish-settings.js.map +1 -1
  69. package/config/registry-settings.d.ts +0 -18
  70. package/config/registry-settings.d.ts.map +1 -1
  71. package/config/registry-settings.js +38 -0
  72. package/config/registry-settings.js.map +1 -1
  73. package/config/root.js +4 -0
  74. package/config/root.js.map +1 -1
  75. package/config/sbom-settings.js +3 -0
  76. package/config/sbom-settings.js.map +1 -1
  77. package/config/validation.d.ts +0 -18
  78. package/config/validation.d.ts.map +1 -1
  79. package/config/validation.js +254 -0
  80. package/config/validation.js.map +1 -1
  81. package/config/versioning-settings.js +1 -0
  82. package/config/versioning-settings.js.map +1 -1
  83. package/dead-code-eliminator/analyzed-bundle.d.ts +0 -9
  84. package/dead-code-eliminator/analyzed-bundle.d.ts.map +1 -1
  85. package/dead-code-eliminator/analyzed-bundle.js +7 -0
  86. package/dead-code-eliminator/analyzed-bundle.js.map +1 -1
  87. package/dead-code-eliminator/eliminator.js +12 -1
  88. package/dead-code-eliminator/eliminator.js.map +1 -1
  89. package/dead-code-eliminator/load-bundle.js +10 -5
  90. package/dead-code-eliminator/load-bundle.js.map +1 -1
  91. package/dead-code-eliminator/reachability/binding-extractor.js +20 -7
  92. package/dead-code-eliminator/reachability/binding-extractor.js.map +1 -1
  93. package/dead-code-eliminator/reachability/reachability.js +10 -1
  94. package/dead-code-eliminator/reachability/reachability.js.map +1 -1
  95. package/dead-code-eliminator/transform/declaration-remover.js +3 -2
  96. package/dead-code-eliminator/transform/declaration-remover.js.map +1 -1
  97. package/dead-code-eliminator/variable-declaration-bindings.js +34 -0
  98. package/dead-code-eliminator/variable-declaration-bindings.js.map +1 -0
  99. package/dependency-scanner/dependency-graph.d.ts +0 -27
  100. package/dependency-scanner/dependency-graph.d.ts.map +1 -1
  101. package/dependency-scanner/dependency-graph.js +73 -0
  102. package/dependency-scanner/dependency-graph.js.map +1 -1
  103. package/dependency-scanner/external-dependencies.js +16 -0
  104. package/dependency-scanner/external-dependencies.js.map +1 -1
  105. package/dependency-scanner/scanner.d.ts +0 -13
  106. package/dependency-scanner/scanner.d.ts.map +1 -1
  107. package/dependency-scanner/scanner.js +69 -0
  108. package/dependency-scanner/scanner.js.map +1 -1
  109. package/dependency-scanner/source-file-references.js +26 -0
  110. package/dependency-scanner/source-file-references.js.map +1 -1
  111. package/dependency-scanner/source-map-file-locator.d.ts +0 -7
  112. package/dependency-scanner/source-map-file-locator.d.ts.map +1 -1
  113. package/dependency-scanner/source-map-file-locator.js +27 -0
  114. package/dependency-scanner/source-map-file-locator.js.map +1 -1
  115. package/dependency-scanner/typescript-file-host.d.ts +0 -9
  116. package/dependency-scanner/typescript-file-host.d.ts.map +1 -1
  117. package/dependency-scanner/typescript-file-host.js +114 -0
  118. package/dependency-scanner/typescript-file-host.js.map +1 -1
  119. package/dependency-scanner/typescript-project-analyzer.d.ts +0 -17
  120. package/dependency-scanner/typescript-project-analyzer.d.ts.map +1 -1
  121. package/dependency-scanner/typescript-project-analyzer.js +52 -0
  122. package/dependency-scanner/typescript-project-analyzer.js.map +1 -1
  123. package/directed-graph/graph.d.ts +0 -26
  124. package/directed-graph/graph.d.ts.map +1 -1
  125. package/directed-graph/graph.js +229 -0
  126. package/directed-graph/graph.js.map +1 -1
  127. package/file-manager/compare.js +17 -0
  128. package/file-manager/compare.js.map +1 -1
  129. package/file-manager/equal.js +5 -0
  130. package/file-manager/equal.js.map +1 -1
  131. package/file-manager/file-manager.d.ts +0 -15
  132. package/file-manager/file-manager.d.ts.map +1 -1
  133. package/file-manager/file-manager.js +52 -0
  134. package/file-manager/file-manager.js.map +1 -1
  135. package/file-manager/permissions.js +26 -0
  136. package/file-manager/permissions.js.map +1 -1
  137. package/linker/linker.d.ts +0 -8
  138. package/linker/linker.d.ts.map +1 -1
  139. package/linker/linker.js +23 -0
  140. package/linker/linker.js.map +1 -1
  141. package/linker/resource-graph.js +25 -0
  142. package/linker/resource-graph.js.map +1 -1
  143. package/linker/source-modifier/import-paths.js +22 -0
  144. package/linker/source-modifier/import-paths.js.map +1 -1
  145. package/linker/substitute-bundles.js +84 -0
  146. package/linker/substitute-bundles.js.map +1 -1
  147. package/linker/substituted-resource-graph.js +72 -0
  148. package/linker/substituted-resource-graph.js.map +1 -1
  149. package/package-surface/modules.js +232 -5
  150. package/package-surface/modules.js.map +1 -1
  151. package/package-surface/surface.d.ts +0 -1
  152. package/package-surface/surface.d.ts.map +1 -1
  153. package/package-surface/surface.js +15 -0
  154. package/package-surface/surface.js.map +1 -1
  155. package/package.json +1 -1
  156. package/packtory/map-config.d.ts +0 -10
  157. package/packtory/map-config.d.ts.map +1 -1
  158. package/packtory/map-config.js +14 -0
  159. package/packtory/map-config.js.map +1 -1
  160. package/packtory/normalize-paths.js +24 -0
  161. package/packtory/normalize-paths.js.map +1 -1
  162. package/packtory/package-processor-build.js +72 -0
  163. package/packtory/package-processor-build.js.map +1 -1
  164. package/packtory/package-processor-publish.d.ts +0 -5
  165. package/packtory/package-processor-publish.d.ts.map +1 -1
  166. package/packtory/package-processor-publish.js +133 -0
  167. package/packtory/package-processor-publish.js.map +1 -1
  168. package/packtory/package-processor.d.ts +0 -17
  169. package/packtory/package-processor.d.ts.map +1 -1
  170. package/packtory/package-processor.js +8 -0
  171. package/packtory/package-processor.js.map +1 -1
  172. package/packtory/packtory-results.d.ts +0 -10
  173. package/packtory/packtory-results.d.ts.map +1 -1
  174. package/packtory/packtory-results.js +15 -0
  175. package/packtory/packtory-results.js.map +1 -1
  176. package/packtory/packtory.d.ts +0 -8
  177. package/packtory/packtory.d.ts.map +1 -1
  178. package/packtory/prepare-package-options.d.ts +0 -2
  179. package/packtory/prepare-package-options.d.ts.map +1 -1
  180. package/packtory/prepare-package-options.js +122 -0
  181. package/packtory/prepare-package-options.js.map +1 -1
  182. package/packtory/resolved-package.d.ts +0 -2
  183. package/packtory/resolved-package.d.ts.map +1 -1
  184. package/packtory/resolved-package.js +31 -0
  185. package/packtory/resolved-package.js.map +1 -1
  186. package/packtory/scheduler.d.ts +0 -37
  187. package/packtory/scheduler.d.ts.map +1 -1
  188. package/progress/progress-broadcaster.d.ts +0 -13
  189. package/progress/progress-broadcaster.d.ts.map +1 -1
  190. package/progress/progress-broadcaster.js +45 -0
  191. package/progress/progress-broadcaster.js.map +1 -1
  192. package/report/artifact-entry-merger.js +20 -0
  193. package/report/artifact-entry-merger.js.map +1 -1
  194. package/report/inspectors.js +73 -0
  195. package/report/inspectors.js.map +1 -1
  196. package/report/report-aggregator.d.ts +0 -5
  197. package/report/report-aggregator.d.ts.map +1 -1
  198. package/report/report-aggregator.js +185 -0
  199. package/report/report-aggregator.js.map +1 -1
  200. package/resource-resolver/content.js +53 -0
  201. package/resource-resolver/content.js.map +1 -1
  202. package/resource-resolver/resolved-bundle.d.ts +0 -10
  203. package/resource-resolver/resolved-bundle.d.ts.map +1 -1
  204. package/resource-resolver/resource-resolve-options.d.ts +0 -4
  205. package/resource-resolver/resource-resolve-options.d.ts.map +1 -1
  206. package/resource-resolver/resource-resolve-options.js +12 -0
  207. package/resource-resolver/resource-resolve-options.js.map +1 -1
  208. package/resource-resolver/resource-resolver.d.ts +0 -8
  209. package/resource-resolver/resource-resolver.d.ts.map +1 -1
  210. package/resource-resolver/resource-resolver.js +78 -0
  211. package/resource-resolver/resource-resolver.js.map +1 -1
  212. package/sbom/extract-license.js +10 -0
  213. package/sbom/extract-license.js.map +1 -1
  214. package/sbom/license-resolver.d.ts +0 -11
  215. package/sbom/license-resolver.d.ts.map +1 -1
  216. package/sbom/license-resolver.js +19 -0
  217. package/sbom/license-resolver.js.map +1 -1
  218. package/sbom/sbom-file.d.ts +0 -12
  219. package/sbom/sbom-file.d.ts.map +1 -1
  220. package/sbom/sbom-file.js +54 -0
  221. package/sbom/sbom-file.js.map +1 -1
  222. package/sbom/sbom-serializer.d.ts +0 -4
  223. package/sbom/sbom-serializer.d.ts.map +1 -1
  224. package/sbom/sbom-serializer.js +9 -0
  225. package/sbom/sbom-serializer.js.map +1 -1
  226. package/tar/extract-tar.js +38 -0
  227. package/tar/extract-tar.js.map +1 -1
  228. package/tar/tarball-builder.d.ts +0 -4
  229. package/tar/tarball-builder.d.ts.map +1 -1
  230. package/version-manager/manager.d.ts +0 -4
  231. package/version-manager/manager.d.ts.map +1 -1
  232. package/version-manager/manager.js +46 -0
  233. package/version-manager/manager.js.map +1 -1
  234. package/version-manager/manifest/builder.js +56 -0
  235. package/version-manager/manifest/builder.js.map +1 -1
  236. package/version-manager/manifest/serialize.js +46 -0
  237. package/version-manager/manifest/serialize.js.map +1 -1
  238. package/version-manager/manifest/sort-values.js +16 -0
  239. package/version-manager/manifest/sort-values.js.map +1 -1
  240. package/version-manager/specifier-classifier.js +33 -0
  241. package/version-manager/specifier-classifier.js.map +1 -1
  242. package/version-manager/specifier-errors.js +43 -0
  243. package/version-manager/specifier-errors.js.map +1 -1
  244. package/version-manager/versioned-bundle-dependencies.js +107 -0
  245. package/version-manager/versioned-bundle-dependencies.js.map +1 -1
  246. package/version-manager/versioned-bundle-imports.js +72 -0
  247. package/version-manager/versioned-bundle-imports.js.map +1 -1
  248. package/version-manager/versioned-bundle.js +60 -0
  249. package/version-manager/versioned-bundle.js.map +1 -1
  250. package/sbom.cdx.json +0 -390
@@ -2,4 +2,111 @@ import { oneLine } from 'common-tags';
2
2
  import { mergeAll } from 'remeda';
3
3
  import { classifySpecifier } from "./specifier-classifier.js";
4
4
  import { renderMalformedSpecifierMessage, renderMutableSpecifierMessage, renderUnusedAllowListMessage } from "./specifier-errors.js";
5
+ function getVersionFromDependencies(moduleName, mainPackageJson, kind) {
6
+ const dependencies = { ...mainPackageJson[kind] };
7
+ return String(dependencies[moduleName]);
8
+ }
9
+ function findBundleByPackageName(bundles, name) {
10
+ return bundles.find((bundle) => {
11
+ return bundle.name === name;
12
+ });
13
+ }
14
+ function mergeDependencyGroups(...groups) {
15
+ return {
16
+ dependencies: mergeAll(groups.map((group) => {
17
+ return group.dependencies;
18
+ })),
19
+ peerDependencies: mergeAll(groups.map((group) => {
20
+ return group.peerDependencies;
21
+ }))
22
+ };
23
+ }
24
+ function groupBundleDependencies(bundle, bundlePeerDependencies, bundleDependencies) {
25
+ const grouped = { dependencies: {}, peerDependencies: {} };
26
+ for (const dependencyName of bundle.linkedBundleDependencies.keys()) {
27
+ const peerBundle = findBundleByPackageName(bundlePeerDependencies, dependencyName);
28
+ if (peerBundle === undefined) {
29
+ const foundBundle = findBundleByPackageName(bundleDependencies, dependencyName);
30
+ if (foundBundle === undefined) {
31
+ throw new Error(`Couldn’t determine version number of bundle dependency ${dependencyName}`);
32
+ }
33
+ grouped.dependencies[dependencyName] = foundBundle.version;
34
+ }
35
+ else {
36
+ grouped.peerDependencies[dependencyName] = peerBundle.version;
37
+ }
38
+ }
39
+ return grouped;
40
+ }
41
+ function resolveExternalDependencyEntry(dependencyName, mainPackageJson) {
42
+ const isPeer = mainPackageJson.peerDependencies?.[dependencyName] !== undefined;
43
+ const isDirect = mainPackageJson.dependencies?.[dependencyName] !== undefined;
44
+ if (!isPeer && !isDirect) {
45
+ throw new Error(oneLine `Couldn’t determine version number of ${dependencyName},
46
+ because it is not listed in the main package.json`);
47
+ }
48
+ const kind = isPeer ? 'peerDependencies' : 'dependencies';
49
+ return {
50
+ name: dependencyName,
51
+ version: getVersionFromDependencies(dependencyName, mainPackageJson, kind),
52
+ kind
53
+ };
54
+ }
55
+ function recordClassification(entry, allowMutableSpecifiers, accumulator) {
56
+ const classification = classifySpecifier(entry.name, entry.version);
57
+ if (classification.kind === 'malformed') {
58
+ accumulator.malformedOffenders.push({
59
+ name: entry.name,
60
+ specifier: entry.version,
61
+ reason: classification.reason
62
+ });
63
+ return;
64
+ }
65
+ if (classification.kind === 'mutable') {
66
+ if (allowMutableSpecifiers.includes(entry.name)) {
67
+ accumulator.usedAllowListEntries.add(entry.name);
68
+ }
69
+ else {
70
+ accumulator.mutableOffenders.push({
71
+ name: entry.name,
72
+ specifier: entry.version,
73
+ npaType: classification.npaType
74
+ });
75
+ }
76
+ }
77
+ }
78
+ function throwHighestPriorityFailure(accumulator, allowMutableSpecifiers) {
79
+ if (accumulator.malformedOffenders.length > 0) {
80
+ throw new Error(renderMalformedSpecifierMessage(accumulator.malformedOffenders));
81
+ }
82
+ if (accumulator.mutableOffenders.length > 0) {
83
+ throw new Error(renderMutableSpecifierMessage(accumulator.mutableOffenders));
84
+ }
85
+ const unusedAllowListEntries = allowMutableSpecifiers.filter((entry) => {
86
+ return !accumulator.usedAllowListEntries.has(entry);
87
+ });
88
+ if (unusedAllowListEntries.length > 0) {
89
+ throw new Error(renderUnusedAllowListMessage(unusedAllowListEntries));
90
+ }
91
+ }
92
+ function groupExternalDependencies(bundle, mainPackageJson, allowMutableSpecifiers) {
93
+ const grouped = { dependencies: {}, peerDependencies: {} };
94
+ const accumulator = {
95
+ mutableOffenders: [],
96
+ malformedOffenders: [],
97
+ usedAllowListEntries: new Set()
98
+ };
99
+ for (const dependencyName of bundle.externalDependencies.keys()) {
100
+ const entry = resolveExternalDependencyEntry(dependencyName, mainPackageJson);
101
+ recordClassification(entry, allowMutableSpecifiers, accumulator);
102
+ grouped[entry.kind][entry.name] = entry.version;
103
+ }
104
+ throwHighestPriorityFailure(accumulator, allowMutableSpecifiers);
105
+ return grouped;
106
+ }
107
+ export function distributeDependencies(options) {
108
+ const bundleGrouped = groupBundleDependencies(options.bundle, options.bundlePeerDependencies, options.bundleDependencies);
109
+ const externalGrouped = groupExternalDependencies(options.bundle, options.mainPackageJson, options.allowMutableSpecifiers);
110
+ return mergeDependencyGroups(bundleGrouped, externalGrouped);
111
+ }
5
112
  //# sourceMappingURL=versioned-bundle-dependencies.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"versioned-bundle-dependencies.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ;AAGjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B;AAC7D,OAAO,EACH,+BAA+B,EAC/B,6BAA6B,EAC7B,4BAA4B,EAG/B,MAAM,uBAAuB"}
1
+ {"version":3,"file":"versioned-bundle-dependencies.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACH,+BAA+B,EAC/B,6BAA6B,EAC7B,4BA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B,CAC9B,MAAsB,EACtB,eAAgC,EAChC,sBAAyC;IAEzC,MAAM,OAAO,GAAwB,EAAE,YAAY,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC;IAChF,MAAM,WAAW,GAAyB;QACtC,gBAAgB,EAAE,EAAE;QACpB,kBAAkB,EAAE,EAAE;QACtB,oBAAoB,EAAE,IAAI,GAAG,EAAU;KAC1C,CAAC;IAEF,KAAK,MAAM,cAAc,IAAI,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9D,MAAM,KAAK,GAAG,8BAA8B,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAC9E,oBAAoB,CAAC,KAAK,EAAE,sBAAsB,EAAE,WAAW,CAAC,CAAC;QACjE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;IACpD,CAAC;IAED,2BAA2B,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;IAEjE,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAsC;IACzE,MAAM,aAAa,GAAG,uBAAuB,CACzC,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,sBAAsB,EAC9B,OAAO,CAAC,kBAAkB,CAC7B,CAAC;IACF,MAAM,eAAe,GAAG,yBAAyB,CAC7C,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,sBAAsB,CACjC,CAAC;IACF,OAAO,qBAAqB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;AACjE,CAAC"}
@@ -1,3 +1,75 @@
1
1
  import { ts as typescript } from 'ts-morph';
2
2
  import { isCodeFile } from "../common/code-files.js";
3
+ function getHashImportSpecifiers(bundle) {
4
+ const importSpecifiers = new Set();
5
+ for (const resource of bundle.contents) {
6
+ const { fileDescription: { targetFilePath, content } } = resource;
7
+ if (isCodeFile(targetFilePath)) {
8
+ const parsedFile = typescript.preProcessFile(content, true);
9
+ for (const literal of parsedFile.importedFiles) {
10
+ const specifier = literal.fileName;
11
+ if (specifier.startsWith('#')) {
12
+ importSpecifiers.add(specifier);
13
+ }
14
+ }
15
+ }
16
+ }
17
+ return importSpecifiers;
18
+ }
19
+ function escapeRegExp(value) {
20
+ return value.replaceAll(/[.*+?^${}()|[\]\\]/gu, '\\$&');
21
+ }
22
+ function findMatchingImportEntryKey(specifier, importsField) {
23
+ const matchingKeys = Object.keys(importsField)
24
+ .filter((key) => {
25
+ const wildcardPattern = `^${escapeRegExp(key).replaceAll('\\*', '.*')}$`;
26
+ return new RegExp(wildcardPattern).test(specifier);
27
+ })
28
+ .toSorted((left, right) => {
29
+ if (left === specifier || right === specifier) {
30
+ return left === specifier ? -1 : 1;
31
+ }
32
+ return right.length - left.length;
33
+ });
34
+ return matchingKeys[0];
35
+ }
36
+ function getConfiguredImportsOrThrow(mainPackageJson, referencedSpecifiers) {
37
+ if (mainPackageJson.imports !== undefined) {
38
+ return mainPackageJson.imports;
39
+ }
40
+ const [firstSpecifier] = referencedSpecifiers;
41
+ throw new Error([
42
+ `Found surviving package.json imports specifier "${firstSpecifier}"`,
43
+ 'but mainPackageJson.imports is not configured'
44
+ ].join(' '));
45
+ }
46
+ function collectReferencedImportsEntries(referencedSpecifiers, configuredImports) {
47
+ const importsField = {};
48
+ for (const specifier of referencedSpecifiers) {
49
+ const matchingKey = findMatchingImportEntryKey(specifier, configuredImports);
50
+ if (matchingKey === undefined) {
51
+ throw new Error([
52
+ `Found surviving package.json imports specifier "${specifier}"`,
53
+ 'but no matching mainPackageJson.imports entry'
54
+ ].join(' '));
55
+ }
56
+ const matchingImport = configuredImports[matchingKey];
57
+ if (matchingImport === undefined) {
58
+ throw new Error([
59
+ `Found surviving package.json imports specifier "${specifier}"`,
60
+ `but matching mainPackageJson.imports entry "${matchingKey}" is undefined`
61
+ ].join(' '));
62
+ }
63
+ importsField[matchingKey] = matchingImport;
64
+ }
65
+ return importsField;
66
+ }
67
+ export function buildImportsField(bundle, mainPackageJson) {
68
+ const referencedSpecifiers = getHashImportSpecifiers(bundle);
69
+ if (referencedSpecifiers.size === 0) {
70
+ return undefined;
71
+ }
72
+ const configuredImports = getConfiguredImportsOrThrow(mainPackageJson, referencedSpecifiers);
73
+ return collectReferencedImportsEntries(referencedSpecifiers, configuredImports);
74
+ }
3
75
  //# sourceMappingURL=versioned-bundle-imports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"versioned-bundle-imports.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,UAAU,EAAE,MAAM,UAAU;AAI3C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB"}
1
+ {"version":3,"file":"versioned-bundle-imports.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AAI5C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrD,SAAS,uBAAuB,CAAC,MAAsB;IACnD,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE3C,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,EACF,eAAe,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,EAC/C,GAAG,QAAQ,CAAC;QAEb,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YAC7B,MAAM,UAAU,GAAG,UAAU,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC5D,KAAK,MAAM,OAAO,IAAI,UAAU,CAAC,aAAa,EAAE,CAAC;gBAC7C,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;gBACnC,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAA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E,+CAA+C;KAClD,CAAC,IAAI,CAAC,GAAG,CAAC,CACd,CAAC;AACN,CAAC;AAED,SAAS,+BAA+B,CACpC,oBAAyC,EACzC,iBAA+B;IAE/B,MAAM,YAAY,GAA8B,EAAE,CAAC;IAEnD,KAAK,MAAM,SAAS,IAAI,oBAAoB,EAAE,CAAC;QAC3C,MAAM,WAAW,GAAG,0BAA0B,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAC7E,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CACX;gBACI,mDAAmD,SAAS,GAAG;gBAC/D,+CAA+C;aAClD,CAAC,IAAI,CAAC,GAAG,CAAC,CACd,CAAC;QACN,CAAC;QAED,MAAM,cAAc,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACtD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CACX;gBACI,mDAAmD,SAAS,GAAG;gBAC/D,+CAA+C,WAAW,gBAAgB;aAC7E,CAAC,IAAI,CAAC,GAAG,CAAC,CACd,CAAC;QACN,CAAC;QAED,YAAY,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC;IAC/C,CAAC;IAED,OAAO,YAAY,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAsB,EAAE,eAAgC;IACtF,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC7D,IAAI,oBAAoB,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,iBAAiB,GAAG,2BAA2B,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;IAC7F,OAAO,+BAA+B,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;AACpF,CAAC"}
@@ -2,4 +2,64 @@ import { isImplicitPackageSurface } from "../package-surface/surface.js";
2
2
  import { buildBinField, buildExportsField } from "../package-surface/modules.js";
3
3
  import { distributeDependencies } from "./versioned-bundle-dependencies.js";
4
4
  import { buildImportsField } from "./versioned-bundle-imports.js";
5
+ function firstExplicitRootId(packageInterface) {
6
+ const firstModule = packageInterface.modules?.[0];
7
+ if (firstModule !== undefined) {
8
+ return firstModule.root;
9
+ }
10
+ const firstBin = packageInterface.bins?.[0];
11
+ if (firstBin !== undefined) {
12
+ return firstBin.root;
13
+ }
14
+ return undefined;
15
+ }
16
+ function resolveRepresentativeRootId(bundle) {
17
+ if (isImplicitPackageSurface(bundle.surface)) {
18
+ return bundle.surface.defaultModuleRoot;
19
+ }
20
+ const referencedRootId = firstExplicitRootId(bundle.surface.packageInterface);
21
+ if (referencedRootId === undefined) {
22
+ throw new Error(`Package "${bundle.name}" explicit surface declares neither modules nor bins`);
23
+ }
24
+ return referencedRootId;
25
+ }
26
+ function resolveRepresentativeRoot(bundle, rootId) {
27
+ // Invariant: buildExportsField (implicit) and buildBinField (explicit) run before this
28
+ // and throw when the referenced root is absent, so the lookup cannot return undefined.
29
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- see invariant above
30
+ return bundle.roots[rootId];
31
+ }
32
+ function buildOptionalVersionedBundleFields(params) {
33
+ const { importsField, binField, typesMainFile } = params;
34
+ return {
35
+ ...(importsField === undefined ? {} : { importsField }),
36
+ ...(binField === undefined ? {} : { binField }),
37
+ ...(typesMainFile === undefined ? {} : { typesMainFile })
38
+ };
39
+ }
40
+ export function buildVersionedBundle(options) {
41
+ const { bundle, version, mainPackageJson, additionalPackageJsonAttributes } = options;
42
+ const distributedDependencies = distributeDependencies(options);
43
+ const importsField = buildImportsField(bundle, mainPackageJson);
44
+ const exportsField = buildExportsField(bundle, options.substitutionPublicModuleSourcePaths ?? new Set());
45
+ const binField = buildBinField(bundle);
46
+ const representativeRoot = resolveRepresentativeRoot(bundle, resolveRepresentativeRootId(bundle));
47
+ const mainFile = representativeRoot.js;
48
+ const typesMainFile = representativeRoot.declarationFile;
49
+ return {
50
+ name: bundle.name,
51
+ version,
52
+ roots: bundle.roots,
53
+ surface: bundle.surface,
54
+ dependencies: distributedDependencies.dependencies,
55
+ peerDependencies: distributedDependencies.peerDependencies,
56
+ exportsField,
57
+ contents: bundle.contents,
58
+ mainFile,
59
+ additionalAttributes: additionalPackageJsonAttributes,
60
+ packageType: mainPackageJson.type,
61
+ sideEffectsField: bundle.sideEffectsField,
62
+ ...buildOptionalVersionedBundleFields({ importsField, binField, typesMainFile })
63
+ };
64
+ }
5
65
  //# sourceMappingURL=versioned-bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"versioned-bundle.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B;AAExE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,+BAA+B;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC;AAC3E,OAAO,EAAE,iBAAiB,EAAqB,MAAM,+BAA+B"}
1
+ {"version":3,"file":"versioned-bundle.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAqB,MAAM,+BAA+B,CAAC;AAuCrF,SAAS,mBAAmB,CAAC,gBAA8C;IACvE,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,WAAW,CAAC,IAAI,CAAC;IAC5B,CAAC;IACD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;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AAe,EAAE,+BAA+B,EAAE,GAAG,OAAO,CAAC;IAEtF,MAAM,uBAAuB,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChE,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAChE,MAAM,YAAY,GAAG,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,mCAAmC,IAAI,IAAI,GAAG,EAAU,CAAC,CAAC;IACjH,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,MAAM,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC,CAAC;IAClG,MAAM,QAAQ,GAAG,kBAAkB,CAAC,EAAE,CAAC;IACvC,MAAM,aAAa,GAAG,kBAAkB,CAAC,eAAe,CAAC;IAEzD,OAAO;QACH,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,OAAO;QACP,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,YAAY,EAAE,uBAAuB,CAAC,YAAY;QAClD,gBAAgB,EAAE,uBAAuB,CAAC,gBAAgB;QAC1D,YAAY;QACZ,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,QAAQ;QACR,oBAAoB,EAAE,+BAA+B;QACrD,WAAW,EAAE,eAAe,CAAC,IAAI;QACjC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,GAAG,kCAAkC,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;KACnF,CAAC;AACN,CAAC"}
package/sbom.cdx.json DELETED
@@ -1,390 +0,0 @@
1
- {
2
- "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3
- "bomFormat": "CycloneDX",
4
- "specVersion": "1.6",
5
- "version": 1,
6
- "metadata": {
7
- "tools": {
8
- "components": [
9
- {
10
- "type": "application",
11
- "name": "packtory",
12
- "version": "0.0.9"
13
- }
14
- ]
15
- },
16
- "component": {
17
- "type": "library",
18
- "name": "packtory",
19
- "version": "0.0.10",
20
- "bom-ref": "pkg:npm/packtory@0.0.10",
21
- "purl": "pkg:npm/packtory@0.0.10"
22
- }
23
- },
24
- "components": [
25
- {
26
- "type": "library",
27
- "name": "@cyclonedx/cyclonedx-library",
28
- "version": "10.0.0",
29
- "bom-ref": "pkg:npm/@cyclonedx/cyclonedx-library@10.0.0",
30
- "scope": "required",
31
- "licenses": [
32
- {
33
- "expression": "Apache-2.0"
34
- }
35
- ],
36
- "purl": "pkg:npm/@cyclonedx/cyclonedx-library@10.0.0"
37
- },
38
- {
39
- "type": "library",
40
- "name": "@jridgewell/gen-mapping",
41
- "version": "0.3.13",
42
- "bom-ref": "pkg:npm/@jridgewell/gen-mapping@0.3.13",
43
- "scope": "required",
44
- "licenses": [
45
- {
46
- "expression": "MIT"
47
- }
48
- ],
49
- "purl": "pkg:npm/@jridgewell/gen-mapping@0.3.13"
50
- },
51
- {
52
- "type": "library",
53
- "name": "@jridgewell/trace-mapping",
54
- "version": "0.3.31",
55
- "bom-ref": "pkg:npm/@jridgewell/trace-mapping@0.3.31",
56
- "scope": "required",
57
- "licenses": [
58
- {
59
- "expression": "MIT"
60
- }
61
- ],
62
- "purl": "pkg:npm/@jridgewell/trace-mapping@0.3.31"
63
- },
64
- {
65
- "type": "library",
66
- "name": "@schema-hub/zod-error-formatter",
67
- "version": "0.0.11",
68
- "bom-ref": "pkg:npm/@schema-hub/zod-error-formatter@0.0.11",
69
- "scope": "required",
70
- "licenses": [
71
- {
72
- "expression": "MIT"
73
- }
74
- ],
75
- "purl": "pkg:npm/@schema-hub/zod-error-formatter@0.0.11"
76
- },
77
- {
78
- "type": "library",
79
- "name": "@ts-morph/common",
80
- "version": "0.29.0",
81
- "bom-ref": "pkg:npm/@ts-morph/common@0.29.0",
82
- "scope": "required",
83
- "licenses": [
84
- {
85
- "expression": "MIT"
86
- }
87
- ],
88
- "purl": "pkg:npm/@ts-morph/common@0.29.0"
89
- },
90
- {
91
- "type": "library",
92
- "name": "@types/libnpmpublish",
93
- "version": "9.0.1",
94
- "bom-ref": "pkg:npm/@types/libnpmpublish@9.0.1",
95
- "scope": "required",
96
- "licenses": [
97
- {
98
- "expression": "MIT"
99
- }
100
- ],
101
- "purl": "pkg:npm/@types/libnpmpublish@9.0.1"
102
- },
103
- {
104
- "type": "library",
105
- "name": "@types/npm-registry-fetch",
106
- "version": "8.0.9",
107
- "bom-ref": "pkg:npm/@types/npm-registry-fetch@8.0.9",
108
- "scope": "required",
109
- "licenses": [
110
- {
111
- "expression": "MIT"
112
- }
113
- ],
114
- "purl": "pkg:npm/@types/npm-registry-fetch@8.0.9"
115
- },
116
- {
117
- "type": "library",
118
- "name": "common-tags",
119
- "version": "1.8.2",
120
- "bom-ref": "pkg:npm/common-tags@1.8.2",
121
- "scope": "required",
122
- "licenses": [
123
- {
124
- "expression": "MIT"
125
- }
126
- ],
127
- "purl": "pkg:npm/common-tags@1.8.2"
128
- },
129
- {
130
- "type": "library",
131
- "name": "hosted-git-info",
132
- "version": "10.1.0",
133
- "bom-ref": "pkg:npm/hosted-git-info@10.1.0",
134
- "scope": "required",
135
- "licenses": [
136
- {
137
- "expression": "ISC"
138
- }
139
- ],
140
- "purl": "pkg:npm/hosted-git-info@10.1.0"
141
- },
142
- {
143
- "type": "library",
144
- "name": "libnpmpublish",
145
- "version": "11.1.3",
146
- "bom-ref": "pkg:npm/libnpmpublish@11.1.3",
147
- "scope": "required",
148
- "licenses": [
149
- {
150
- "expression": "ISC"
151
- }
152
- ],
153
- "purl": "pkg:npm/libnpmpublish@11.1.3"
154
- },
155
- {
156
- "type": "library",
157
- "name": "npm-package-arg",
158
- "version": "14.0.0",
159
- "bom-ref": "pkg:npm/npm-package-arg@14.0.0",
160
- "scope": "required",
161
- "licenses": [
162
- {
163
- "expression": "ISC"
164
- }
165
- ],
166
- "purl": "pkg:npm/npm-package-arg@14.0.0"
167
- },
168
- {
169
- "type": "library",
170
- "name": "npm-registry-fetch",
171
- "version": "19.1.1",
172
- "bom-ref": "pkg:npm/npm-registry-fetch@19.1.1",
173
- "scope": "required",
174
- "licenses": [
175
- {
176
- "expression": "ISC"
177
- }
178
- ],
179
- "purl": "pkg:npm/npm-registry-fetch@19.1.1"
180
- },
181
- {
182
- "type": "library",
183
- "name": "remeda",
184
- "version": "2.34.1",
185
- "bom-ref": "pkg:npm/remeda@2.34.1",
186
- "scope": "required",
187
- "licenses": [
188
- {
189
- "expression": "MIT"
190
- }
191
- ],
192
- "purl": "pkg:npm/remeda@2.34.1"
193
- },
194
- {
195
- "type": "library",
196
- "name": "semver",
197
- "version": "7.8.0",
198
- "bom-ref": "pkg:npm/semver@7.8.0",
199
- "scope": "required",
200
- "licenses": [
201
- {
202
- "expression": "ISC"
203
- }
204
- ],
205
- "purl": "pkg:npm/semver@7.8.0"
206
- },
207
- {
208
- "type": "library",
209
- "name": "spdx-expression-parse",
210
- "version": "4.0.0",
211
- "bom-ref": "pkg:npm/spdx-expression-parse@4.0.0",
212
- "scope": "required",
213
- "licenses": [
214
- {
215
- "expression": "MIT"
216
- }
217
- ],
218
- "purl": "pkg:npm/spdx-expression-parse@4.0.0"
219
- },
220
- {
221
- "type": "library",
222
- "name": "tar-stream",
223
- "version": "3.1.8",
224
- "bom-ref": "pkg:npm/tar-stream@3.1.8",
225
- "scope": "required",
226
- "licenses": [
227
- {
228
- "expression": "MIT"
229
- }
230
- ],
231
- "purl": "pkg:npm/tar-stream@3.1.8"
232
- },
233
- {
234
- "type": "library",
235
- "name": "true-myth",
236
- "version": "9.3.1",
237
- "bom-ref": "pkg:npm/true-myth@9.3.1",
238
- "scope": "required",
239
- "licenses": [
240
- {
241
- "expression": "MIT"
242
- }
243
- ],
244
- "purl": "pkg:npm/true-myth@9.3.1"
245
- },
246
- {
247
- "type": "library",
248
- "name": "ts-morph",
249
- "version": "27.0.2",
250
- "bom-ref": "pkg:npm/ts-morph@27.0.2",
251
- "scope": "required",
252
- "licenses": [
253
- {
254
- "expression": "MIT"
255
- }
256
- ],
257
- "purl": "pkg:npm/ts-morph@27.0.2"
258
- },
259
- {
260
- "type": "library",
261
- "name": "type-fest",
262
- "version": "5.6.0",
263
- "bom-ref": "pkg:npm/type-fest@5.6.0",
264
- "scope": "required",
265
- "licenses": [
266
- {
267
- "expression": "(MIT OR CC0-1.0)"
268
- }
269
- ],
270
- "purl": "pkg:npm/type-fest@5.6.0"
271
- },
272
- {
273
- "type": "library",
274
- "name": "unix-permissions",
275
- "version": "6.0.1",
276
- "bom-ref": "pkg:npm/unix-permissions@6.0.1",
277
- "scope": "required",
278
- "licenses": [
279
- {
280
- "expression": "Apache-2.0"
281
- }
282
- ],
283
- "purl": "pkg:npm/unix-permissions@6.0.1"
284
- },
285
- {
286
- "type": "library",
287
- "name": "zod",
288
- "version": "4.4.3",
289
- "bom-ref": "pkg:npm/zod@4.4.3",
290
- "scope": "required",
291
- "licenses": [
292
- {
293
- "expression": "MIT"
294
- }
295
- ],
296
- "purl": "pkg:npm/zod@4.4.3"
297
- }
298
- ],
299
- "dependencies": [
300
- {
301
- "ref": "pkg:npm/@cyclonedx/cyclonedx-library@10.0.0"
302
- },
303
- {
304
- "ref": "pkg:npm/@jridgewell/gen-mapping@0.3.13"
305
- },
306
- {
307
- "ref": "pkg:npm/@jridgewell/trace-mapping@0.3.31"
308
- },
309
- {
310
- "ref": "pkg:npm/@schema-hub/zod-error-formatter@0.0.11"
311
- },
312
- {
313
- "ref": "pkg:npm/@ts-morph/common@0.29.0"
314
- },
315
- {
316
- "ref": "pkg:npm/@types/libnpmpublish@9.0.1"
317
- },
318
- {
319
- "ref": "pkg:npm/@types/npm-registry-fetch@8.0.9"
320
- },
321
- {
322
- "ref": "pkg:npm/common-tags@1.8.2"
323
- },
324
- {
325
- "ref": "pkg:npm/hosted-git-info@10.1.0"
326
- },
327
- {
328
- "ref": "pkg:npm/libnpmpublish@11.1.3"
329
- },
330
- {
331
- "ref": "pkg:npm/npm-package-arg@14.0.0"
332
- },
333
- {
334
- "ref": "pkg:npm/npm-registry-fetch@19.1.1"
335
- },
336
- {
337
- "ref": "pkg:npm/packtory@0.0.10",
338
- "dependsOn": [
339
- "pkg:npm/@cyclonedx/cyclonedx-library@10.0.0",
340
- "pkg:npm/@jridgewell/gen-mapping@0.3.13",
341
- "pkg:npm/@jridgewell/trace-mapping@0.3.31",
342
- "pkg:npm/@schema-hub/zod-error-formatter@0.0.11",
343
- "pkg:npm/@ts-morph/common@0.29.0",
344
- "pkg:npm/@types/libnpmpublish@9.0.1",
345
- "pkg:npm/@types/npm-registry-fetch@8.0.9",
346
- "pkg:npm/common-tags@1.8.2",
347
- "pkg:npm/hosted-git-info@10.1.0",
348
- "pkg:npm/libnpmpublish@11.1.3",
349
- "pkg:npm/npm-package-arg@14.0.0",
350
- "pkg:npm/npm-registry-fetch@19.1.1",
351
- "pkg:npm/remeda@2.34.1",
352
- "pkg:npm/semver@7.8.0",
353
- "pkg:npm/spdx-expression-parse@4.0.0",
354
- "pkg:npm/tar-stream@3.1.8",
355
- "pkg:npm/true-myth@9.3.1",
356
- "pkg:npm/ts-morph@27.0.2",
357
- "pkg:npm/type-fest@5.6.0",
358
- "pkg:npm/unix-permissions@6.0.1",
359
- "pkg:npm/zod@4.4.3"
360
- ]
361
- },
362
- {
363
- "ref": "pkg:npm/remeda@2.34.1"
364
- },
365
- {
366
- "ref": "pkg:npm/semver@7.8.0"
367
- },
368
- {
369
- "ref": "pkg:npm/spdx-expression-parse@4.0.0"
370
- },
371
- {
372
- "ref": "pkg:npm/tar-stream@3.1.8"
373
- },
374
- {
375
- "ref": "pkg:npm/true-myth@9.3.1"
376
- },
377
- {
378
- "ref": "pkg:npm/ts-morph@27.0.2"
379
- },
380
- {
381
- "ref": "pkg:npm/type-fest@5.6.0"
382
- },
383
- {
384
- "ref": "pkg:npm/unix-permissions@6.0.1"
385
- },
386
- {
387
- "ref": "pkg:npm/zod@4.4.3"
388
- }
389
- ]
390
- }