packtory 0.0.96 → 0.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/artifacts-builder.js +37 -4
- package/artifacts/artifacts-builder.js.map +1 -1
- package/artifacts/content-collection.js +59 -2
- package/artifacts/content-collection.js.map +1 -1
- package/artifacts/folder-writer.js +25 -2
- package/artifacts/folder-writer.js.map +1 -1
- package/bundle-emitter/emitter.js +137 -6
- package/bundle-emitter/emitter.js.map +1 -1
- package/bundle-emitter/extract-package-tarball.js +13 -2
- package/bundle-emitter/extract-package-tarball.js.map +1 -1
- package/bundle-emitter/fetch-published-artifacts.js +19 -2
- package/bundle-emitter/fetch-published-artifacts.js.map +1 -1
- package/bundle-emitter/publication-outcome.js +5 -0
- package/bundle-emitter/publication-outcome.js.map +1 -1
- package/bundle-emitter/publish-error/auto-mode-error-matching.js +28 -2
- package/bundle-emitter/publish-error/auto-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/error-shape-helpers.js +9 -0
- package/bundle-emitter/publish-error/error-shape-helpers.js.map +1 -1
- package/bundle-emitter/publish-error/file-mode-error-matching.js +33 -2
- package/bundle-emitter/publish-error/file-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/publish-error-messages.js +24 -0
- package/bundle-emitter/publish-error/publish-error-messages.js.map +1 -1
- package/bundle-emitter/registry/metadata-auth-retry.js +24 -1
- package/bundle-emitter/registry/metadata-auth-retry.js.map +1 -1
- package/bundle-emitter/registry/oidc-token-exchange.js +68 -3
- package/bundle-emitter/registry/oidc-token-exchange.js.map +1 -1
- package/bundle-emitter/registry/package-metadata-fetcher.js +210 -7
- package/bundle-emitter/registry/package-metadata-fetcher.js.map +1 -1
- package/bundle-emitter/registry/publish-settings-bridge.js +34 -3
- package/bundle-emitter/registry/publish-settings-bridge.js.map +1 -1
- package/bundle-emitter/registry/registry-auth-config.js +106 -0
- package/bundle-emitter/registry/registry-auth-config.js.map +1 -1
- package/bundle-emitter/registry/registry-client.js +74 -4
- package/bundle-emitter/registry/registry-client.js.map +1 -1
- package/bundle-emitter/registry/registry-package-path.js +3 -0
- package/bundle-emitter/registry/registry-package-path.js.map +1 -1
- package/bundle-emitter/registry/registry-response-schemas.js +50 -2
- package/bundle-emitter/registry/registry-response-schemas.js.map +1 -1
- package/bundle-emitter/registry/tarball-integrity.js +31 -1
- package/bundle-emitter/registry/tarball-integrity.js.map +1 -1
- package/bundle-emitter/registry/validate-tarball-host.js +26 -1
- package/bundle-emitter/registry/validate-tarball-host.js.map +1 -1
- package/bundle-emitter/release-artifact-canonicalizer.js +31 -5
- package/bundle-emitter/release-artifact-canonicalizer.js.map +1 -1
- package/checks/check-runner.js +8 -0
- package/checks/check-runner.js.map +1 -1
- package/checks/rule.js +12 -2
- package/checks/rule.js.map +1 -1
- package/checks/rules/duplicate-detection.js +23 -1
- package/checks/rules/duplicate-detection.js.map +1 -1
- package/checks/rules/duplicate-messages.js +22 -0
- package/checks/rules/duplicate-messages.js.map +1 -1
- package/checks/rules/file-ownership.js +15 -0
- package/checks/rules/file-ownership.js.map +1 -1
- package/checks/rules/max-bundle-size.js +55 -1
- package/checks/rules/max-bundle-size.js.map +1 -1
- package/checks/rules/no-dev-dependency-imports.js +51 -1
- package/checks/rules/no-dev-dependency-imports.js.map +1 -1
- package/checks/rules/no-duplicated-files.js +53 -3
- package/checks/rules/no-duplicated-files.js.map +1 -1
- package/checks/rules/no-side-effects.js +50 -1
- package/checks/rules/no-side-effects.js.map +1 -1
- package/checks/rules/no-unexposed-executables.js +43 -2
- package/checks/rules/no-unexposed-executables.js.map +1 -1
- package/checks/rules/no-unused-bundle-dependencies.js +30 -2
- package/checks/rules/no-unused-bundle-dependencies.js.map +1 -1
- package/checks/rules/registry.js +22 -9
- package/checks/rules/registry.js.map +1 -1
- package/checks/rules/required-files.js +41 -3
- package/checks/rules/required-files.js.map +1 -1
- package/checks/rules/type-script-declaration-integrity.js +81 -3
- package/checks/rules/type-script-declaration-integrity.js.map +1 -1
- package/checks/rules/type-script-declaration-paths.js +55 -1
- package/checks/rules/type-script-declaration-paths.js.map +1 -1
- package/checks/rules/type-script-declaration-project.js +202 -3
- package/checks/rules/type-script-declaration-project.js.map +1 -1
- package/checks/rules/type-script-declaration-reachability.js +38 -2
- package/checks/rules/type-script-declaration-reachability.js.map +1 -1
- package/checks/rules/type-script-declaration-roots.js +29 -0
- package/checks/rules/type-script-declaration-roots.js.map +1 -1
- package/checks/rules/type-script-integrity.js +72 -2
- package/checks/rules/type-script-integrity.js.map +1 -1
- package/checks/rules/type-script-package-resolution.js +42 -1
- package/checks/rules/type-script-package-resolution.js.map +1 -1
- package/checks/rules/type-script-resolution-summary.js +53 -0
- package/checks/rules/type-script-resolution-summary.js.map +1 -1
- package/checks/rules/unique-target-paths.js +34 -2
- package/checks/rules/unique-target-paths.js.map +1 -1
- package/common/bundled-dependency-groups.js +27 -0
- package/common/bundled-dependency-groups.js.map +1 -1
- package/common/code-files.js +28 -0
- package/common/code-files.js.map +1 -1
- package/common/declaration-companion-paths.js +24 -0
- package/common/declaration-companion-paths.js.map +1 -1
- package/common/package-name-map.js +7 -0
- package/common/package-name-map.js.map +1 -1
- package/common/stable-json.js +42 -2
- package/common/stable-json.js.map +1 -1
- package/common/worklist.js +22 -0
- package/common/worklist.js.map +1 -1
- package/config/additional-files.js +6 -2
- package/config/additional-files.js.map +1 -1
- package/config/additional-package-json-attributes-schema.js +6 -2
- package/config/additional-package-json-attributes-schema.js.map +1 -1
- package/config/automatic-versioning-settings.js +6 -2
- package/config/automatic-versioning-settings.js.map +1 -1
- package/config/changelog-settings.js +120 -3
- package/config/changelog-settings.js.map +1 -1
- package/config/common-package-settings-schemas.js +19 -3
- package/config/common-package-settings-schemas.js.map +1 -1
- package/config/config.js +3 -1
- package/config/config.js.map +1 -1
- package/config/cross-package-validation.js +17 -0
- package/config/cross-package-validation.js.map +1 -1
- package/config/dead-code-elimination-settings.js +36 -2
- package/config/dead-code-elimination-settings.js.map +1 -1
- package/config/dependency-existence-validation.js +19 -1
- package/config/dependency-existence-validation.js.map +1 -1
- package/config/dependency-policy.js +5 -2
- package/config/dependency-policy.js.map +1 -1
- package/config/main-package-json-schema.js +11 -2
- package/config/main-package-json-schema.js.map +1 -1
- package/config/manual-versioning-settings.d.ts +12 -0
- package/config/manual-versioning-settings.d.ts.map +1 -1
- package/config/manual-versioning-settings.js +29 -2
- package/config/manual-versioning-settings.js.map +1 -1
- package/config/optional-package-settings-schema.js +16 -7
- package/config/optional-package-settings-schema.js.map +1 -1
- package/config/package-config.js +2 -1
- package/config/package-config.js.map +1 -1
- package/config/package-graph-builder.js +14 -2
- package/config/package-graph-builder.js.map +1 -1
- package/config/package-interface.js +25 -2
- package/config/package-interface.js.map +1 -1
- package/config/package-json.d.ts.map +1 -1
- package/config/package-json.js +16 -0
- package/config/package-json.js.map +1 -1
- package/config/packtory-config-without-registry-schema.js +6 -0
- package/config/packtory-config-without-registry-schema.js.map +1 -1
- package/config/per-package-settings-schema.js +22 -6
- package/config/per-package-settings-schema.js.map +1 -1
- package/config/pre-graph-validation.js +20 -5
- package/config/pre-graph-validation.js.map +1 -1
- package/config/publish-settings.js +25 -3
- package/config/publish-settings.js.map +1 -1
- package/config/publish-settings.report.js +17 -1
- package/config/publish-settings.report.js.map +1 -1
- package/config/registry-settings.js +40 -2
- package/config/registry-settings.js.map +1 -1
- package/config/registry-settings.report.js +46 -0
- package/config/registry-settings.report.js.map +1 -1
- package/config/root-config-validation.js +141 -0
- package/config/root-config-validation.js.map +1 -1
- package/config/root.js +6 -2
- package/config/root.js.map +1 -1
- package/config/sbom-settings.js +4 -1
- package/config/sbom-settings.js.map +1 -1
- package/config/settings-validation.js +28 -0
- package/config/settings-validation.js.map +1 -1
- package/config/versioning-settings.js +10 -3
- package/config/versioning-settings.js.map +1 -1
- package/dead-code-eliminator/analyzed-bundle.js +7 -0
- package/dead-code-eliminator/analyzed-bundle.js.map +1 -1
- package/dead-code-eliminator/artifact-module-reference-contract.js +27 -0
- package/dead-code-eliminator/artifact-module-reference-contract.js.map +1 -0
- package/dead-code-eliminator/bundle-analysis.js +38 -5
- package/dead-code-eliminator/bundle-analysis.js.map +1 -1
- package/dead-code-eliminator/class-purity.js +48 -2
- package/dead-code-eliminator/class-purity.js.map +1 -1
- package/dead-code-eliminator/code-file-analyzer.js +68 -4
- package/dead-code-eliminator/code-file-analyzer.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/bundle-index.js +10 -0
- package/dead-code-eliminator/cross-bundle/bundle-index.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js +22 -3
- package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/import-export-walker.js +164 -3
- package/dead-code-eliminator/cross-bundle/import-export-walker.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/seed-store.js +10 -0
- package/dead-code-eliminator/cross-bundle/seed-store.js.map +1 -1
- package/dead-code-eliminator/dependency-metadata.js +172 -2
- package/dead-code-eliminator/dependency-metadata.js.map +1 -1
- package/dead-code-eliminator/elimination-emitter.js +52 -0
- package/dead-code-eliminator/elimination-emitter.js.map +1 -1
- package/dead-code-eliminator/eliminator.js +22 -4
- package/dead-code-eliminator/eliminator.js.map +1 -1
- package/dead-code-eliminator/expression-unwrapping.js +16 -1
- package/dead-code-eliminator/expression-unwrapping.js.map +1 -1
- package/dead-code-eliminator/imported-expression-origin.js +101 -2
- package/dead-code-eliminator/imported-expression-origin.js.map +1 -1
- package/dead-code-eliminator/liveness/asset-side-effects.js +9 -1
- package/dead-code-eliminator/liveness/asset-side-effects.js.map +1 -1
- package/dead-code-eliminator/liveness/boolean-facts.js +98 -2
- package/dead-code-eliminator/liveness/boolean-facts.js.map +1 -1
- package/dead-code-eliminator/liveness/external-purity-summary.js +314 -3
- package/dead-code-eliminator/liveness/external-purity-summary.js.map +1 -1
- package/dead-code-eliminator/liveness/external-purity.js +39 -3
- package/dead-code-eliminator/liveness/external-purity.js.map +1 -1
- package/dead-code-eliminator/liveness/module-analysis.js +27 -2
- package/dead-code-eliminator/liveness/module-analysis.js.map +1 -1
- package/dead-code-eliminator/liveness/resource-retention.js +91 -1
- package/dead-code-eliminator/liveness/resource-retention.js.map +1 -1
- package/dead-code-eliminator/liveness/runtime-code.js +15 -1
- package/dead-code-eliminator/liveness/runtime-code.js.map +1 -1
- package/dead-code-eliminator/load-bundle.js +86 -5
- package/dead-code-eliminator/load-bundle.js.map +1 -1
- package/dead-code-eliminator/pure-expression.js +178 -5
- package/dead-code-eliminator/pure-expression.js.map +1 -1
- package/dead-code-eliminator/reachability/bfs-closure.js +53 -0
- package/dead-code-eliminator/reachability/bfs-closure.js.map +1 -1
- package/dead-code-eliminator/reachability/binding-extractor.js +100 -2
- package/dead-code-eliminator/reachability/binding-extractor.js.map +1 -1
- package/dead-code-eliminator/reachability/binding-id.js +106 -1
- package/dead-code-eliminator/reachability/binding-id.js.map +1 -1
- package/dead-code-eliminator/reachability/identifier-target-collector.js +96 -1
- package/dead-code-eliminator/reachability/identifier-target-collector.js.map +1 -1
- package/dead-code-eliminator/reachability/impure-statements.js +11 -2
- package/dead-code-eliminator/reachability/impure-statements.js.map +1 -1
- package/dead-code-eliminator/reachability/local-seed-gathering.js +91 -4
- package/dead-code-eliminator/reachability/local-seed-gathering.js.map +1 -1
- package/dead-code-eliminator/reachability/reachability.js +70 -4
- package/dead-code-eliminator/reachability/reachability.js.map +1 -1
- package/dead-code-eliminator/side-effect-classifier.js +39 -4
- package/dead-code-eliminator/side-effect-classifier.js.map +1 -1
- package/dead-code-eliminator/side-effects-field.js +23 -1
- package/dead-code-eliminator/side-effects-field.js.map +1 -1
- package/dead-code-eliminator/source-map-recomposition.js +29 -2
- package/dead-code-eliminator/source-map-recomposition.js.map +1 -1
- package/dead-code-eliminator/statement-classifiers.js +94 -4
- package/dead-code-eliminator/statement-classifiers.js.map +1 -1
- package/dead-code-eliminator/syntax-kind-sets.js +16 -0
- package/dead-code-eliminator/syntax-kind-sets.js.map +1 -1
- package/dead-code-eliminator/transform/atom-translator.js +57 -2
- package/dead-code-eliminator/transform/atom-translator.js.map +1 -1
- package/dead-code-eliminator/transform/declaration-removal.js +183 -5
- package/dead-code-eliminator/transform/declaration-removal.js.map +1 -1
- package/dead-code-eliminator/transform/declaration-remover.js +17 -2
- package/dead-code-eliminator/transform/declaration-remover.js.map +1 -1
- package/dead-code-eliminator/transform/line-index.js +20 -0
- package/dead-code-eliminator/transform/line-index.js.map +1 -1
- package/dead-code-eliminator/transform/named-declaration-kinds.js +3 -0
- package/dead-code-eliminator/transform/named-declaration-kinds.js.map +1 -1
- package/dead-code-eliminator/transform/source-map-composer.js +84 -3
- package/dead-code-eliminator/transform/source-map-composer.js.map +1 -1
- package/dead-code-eliminator/variable-declaration-bindings.js +25 -1
- package/dead-code-eliminator/variable-declaration-bindings.js.map +1 -1
- package/dependency-scanner/dependency-graph.js +77 -3
- package/dependency-scanner/dependency-graph.js.map +1 -1
- package/dependency-scanner/external-dependencies.js +55 -1
- package/dependency-scanner/external-dependencies.js.map +1 -1
- package/dependency-scanner/file-host-predicates.js +9 -0
- package/dependency-scanner/file-host-predicates.js.map +1 -1
- package/dependency-scanner/host-method-binding.js +18 -0
- package/dependency-scanner/host-method-binding.js.map +1 -1
- package/dependency-scanner/injected-dynamic-imports.js +232 -1
- package/dependency-scanner/injected-dynamic-imports.js.map +1 -1
- package/dependency-scanner/node-modules-manifest-synthesizer.js +52 -4
- package/dependency-scanner/node-modules-manifest-synthesizer.js.map +1 -1
- package/dependency-scanner/package-owned-asset-file-path.js +9 -1
- package/dependency-scanner/package-owned-asset-file-path.js.map +1 -1
- package/dependency-scanner/scanner.js +109 -4
- package/dependency-scanner/scanner.js.map +1 -1
- package/dependency-scanner/source-file-references.js +171 -6
- package/dependency-scanner/source-file-references.js.map +1 -1
- package/dependency-scanner/source-map-file-locator.js +66 -2
- package/dependency-scanner/source-map-file-locator.js.map +1 -1
- package/dependency-scanner/typescript-compiler-options.js +21 -1
- package/dependency-scanner/typescript-compiler-options.js.map +1 -1
- package/dependency-scanner/typescript-file-host.js +49 -5
- package/dependency-scanner/typescript-file-host.js.map +1 -1
- package/dependency-scanner/typescript-module-resolution.js +214 -0
- package/dependency-scanner/typescript-module-resolution.js.map +1 -0
- package/dependency-scanner/typescript-project-analyzer.js +32 -3
- package/dependency-scanner/typescript-project-analyzer.js.map +1 -1
- package/dependency-scanner/virtual-package-json-host.js +45 -4
- package/dependency-scanner/virtual-package-json-host.js.map +1 -1
- package/directed-graph/graph.js +240 -1
- package/directed-graph/graph.js.map +1 -1
- package/file-manager/compare.js +23 -2
- package/file-manager/compare.js.map +1 -1
- package/file-manager/equal.js +5 -0
- package/file-manager/equal.js.map +1 -1
- package/file-manager/file-description.js +3 -0
- package/file-manager/file-description.js.map +1 -1
- package/file-manager/permissions.js +28 -1
- package/file-manager/permissions.js.map +1 -1
- package/git/current-git-head.js +24 -0
- package/git/current-git-head.js.map +1 -1
- package/git/git-command.js +49 -1
- package/git/git-command.js.map +1 -1
- package/linker/linked-bundle.js +5 -0
- package/linker/linked-bundle.js.map +1 -1
- package/linker/linker.js +51 -5
- package/linker/linker.js.map +1 -1
- package/linker/replacement-lookup.js +297 -8
- package/linker/replacement-lookup.js.map +1 -1
- package/linker/resource-graph.js +65 -2
- package/linker/resource-graph.js.map +1 -1
- package/linker/source-modifier/import-paths.js +80 -3
- package/linker/source-modifier/import-paths.js.map +1 -1
- package/linker/substitute-bundles.js +166 -3
- package/linker/substitute-bundles.js.map +1 -1
- package/linker/substituted-resource-graph.js +111 -2
- package/linker/substituted-resource-graph.js.map +1 -1
- package/npm-oidc-id-token-resolver.js +82 -0
- package/npm-oidc-id-token-resolver.js.map +1 -1
- package/pack-emitter/pack-emitter.js +27 -0
- package/pack-emitter/pack-emitter.js.map +1 -1
- package/package-surface/bin-field.js +8 -2
- package/package-surface/bin-field.js.map +1 -1
- package/package-surface/explicit-bin.js +24 -2
- package/package-surface/explicit-bin.js.map +1 -1
- package/package-surface/explicit-exports.js +26 -3
- package/package-surface/explicit-exports.js.map +1 -1
- package/package-surface/export-map.js +9 -2
- package/package-surface/export-map.js.map +1 -1
- package/package-surface/implicit-bin.js +25 -1
- package/package-surface/implicit-bin.js.map +1 -1
- package/package-surface/implicit-exports.js +10 -3
- package/package-surface/implicit-exports.js.map +1 -1
- package/package-surface/implicit-root-exports.js +13 -2
- package/package-surface/implicit-root-exports.js.map +1 -1
- package/package-surface/package-json-export.js +9 -0
- package/package-surface/package-json-export.js.map +1 -1
- package/package-surface/package-shape.js +10 -1
- package/package-surface/package-shape.js.map +1 -1
- package/package-surface/package-surface-index.js +165 -3
- package/package-surface/package-surface-index.js.map +1 -1
- package/package-surface/public-module-usage.js +46 -3
- package/package-surface/public-module-usage.js.map +1 -1
- package/package-surface/public-specifiers.js +7 -1
- package/package-surface/public-specifiers.js.map +1 -1
- package/package-surface/root-registry.js +26 -0
- package/package-surface/root-registry.js.map +1 -1
- package/package-surface/specifier-syntax.js +4 -0
- package/package-surface/specifier-syntax.js.map +1 -1
- package/package-surface/substitution-exports.js +101 -3
- package/package-surface/substitution-exports.js.map +1 -1
- package/package-surface/surface.js +12 -0
- package/package-surface/surface.js.map +1 -1
- package/package.json +2 -2
- package/packages/package-processor.composition.js +161 -34
- package/packages/package-processor.composition.js.map +1 -1
- package/packtory/map-config.js +35 -4
- package/packtory/map-config.js.map +1 -1
- package/packtory/normalize-paths.js +25 -1
- package/packtory/normalize-paths.js.map +1 -1
- package/packtory/options/bundle-dependency-resolution.js +17 -1
- package/packtory/options/bundle-dependency-resolution.js.map +1 -1
- package/packtory/options/dead-code-elimination-resolution.js +10 -1
- package/packtory/options/dead-code-elimination-resolution.js.map +1 -1
- package/packtory/options/prepare-package-options.js +46 -5
- package/packtory/options/prepare-package-options.js.map +1 -1
- package/packtory/options/required-value-helpers.js +17 -0
- package/packtory/options/required-value-helpers.js.map +1 -1
- package/packtory/options/setting-resolvers.js +47 -3
- package/packtory/options/setting-resolvers.js.map +1 -1
- package/packtory/options/surface-resolution.js +15 -2
- package/packtory/options/surface-resolution.js.map +1 -1
- package/packtory/options/version-provider-context.js +24 -2
- package/packtory/options/version-provider-context.js.map +1 -1
- package/packtory/options/version-trigger.js +39 -2
- package/packtory/options/version-trigger.js.map +1 -1
- package/packtory/pack-output-preflight.js +60 -3
- package/packtory/pack-output-preflight.js.map +1 -1
- package/packtory/package-processor-build.js +97 -3
- package/packtory/package-processor-build.js.map +1 -1
- package/packtory/package-processor-publish.js +297 -6
- package/packtory/package-processor-publish.js.map +1 -1
- package/packtory/package-processor.js +10 -2
- package/packtory/package-processor.js.map +1 -1
- package/packtory/packtory-pack.js +298 -10
- package/packtory/packtory-pack.js.map +1 -1
- package/packtory/packtory-package-dependencies.js +116 -2
- package/packtory/packtory-package-dependencies.js.map +1 -1
- package/packtory/packtory-package-inspection.js +26 -5
- package/packtory/packtory-package-inspection.js.map +1 -1
- package/packtory/packtory-package-side-effects.js +64 -3
- package/packtory/packtory-package-side-effects.js.map +1 -1
- package/packtory/packtory-package-tree.js +43 -4
- package/packtory/packtory-package-tree.js.map +1 -1
- package/packtory/packtory-publish.js +17 -4
- package/packtory/packtory-publish.js.map +1 -1
- package/packtory/packtory-release-analysis.js +64 -6
- package/packtory/packtory-release-analysis.js.map +1 -1
- package/packtory/packtory-release-diff.js +48 -5
- package/packtory/packtory-release-diff.js.map +1 -1
- package/packtory/packtory-release-plan.js +87 -6
- package/packtory/packtory-release-plan.js.map +1 -1
- package/packtory/packtory-resolve.js +16 -5
- package/packtory/packtory-resolve.js.map +1 -1
- package/packtory/packtory.js +242 -13
- package/packtory/packtory.js.map +1 -1
- package/packtory/publish-failure-mapping.js +6 -0
- package/packtory/publish-failure-mapping.js.map +1 -1
- package/packtory/publish-target-preflight.js +25 -3
- package/packtory/publish-target-preflight.js.map +1 -1
- package/packtory/published-release-state.js +11 -0
- package/packtory/published-release-state.js.map +1 -1
- package/packtory/release-analysis.js +153 -5
- package/packtory/release-analysis.js.map +1 -1
- package/packtory/release-diff-failure-mapping.js +6 -0
- package/packtory/release-diff-failure-mapping.js.map +1 -1
- package/packtory/release-plan.js +135 -7
- package/packtory/release-plan.js.map +1 -1
- package/packtory/report-attachment.js +35 -2
- package/packtory/report-attachment.js.map +1 -1
- package/packtory/resolved-package.js +97 -3
- package/packtory/resolved-package.js.map +1 -1
- package/packtory/scheduler.js +99 -1
- package/packtory/scheduler.js.map +1 -1
- package/packtory/stages/package-analysis-stage.js +50 -2
- package/packtory/stages/package-analysis-stage.js.map +1 -1
- package/packtory/stages/package-resolution-stage.js +80 -5
- package/packtory/stages/package-resolution-stage.js.map +1 -1
- package/packtory/stages/publish-stage.js +125 -4
- package/packtory/stages/publish-stage.js.map +1 -1
- package/packtory/stages/release-diff-stage.js +84 -5
- package/packtory/stages/release-diff-stage.js.map +1 -1
- package/progress/progress-broadcaster.js +45 -0
- package/progress/progress-broadcaster.js.map +1 -1
- package/published-package/published-package.js +12 -1
- package/published-package/published-package.js.map +1 -1
- package/report/aggregator/artifact-entry-merger.js +20 -0
- package/report/aggregator/artifact-entry-merger.js.map +1 -1
- package/report/aggregator/package-report-materialization.js +75 -2
- package/report/aggregator/package-report-materialization.js.map +1 -1
- package/report/aggregator/report-aggregator.js +37 -2
- package/report/aggregator/report-aggregator.js.map +1 -1
- package/report/aggregator/report-event-handlers.js +141 -2
- package/report/aggregator/report-event-handlers.js.map +1 -1
- package/report/aggregator/report-types.js +3 -0
- package/report/aggregator/report-types.js.map +1 -1
- package/report/config-redactor.js +29 -3
- package/report/config-redactor.js.map +1 -1
- package/report/decorators.js +85 -0
- package/report/decorators.js.map +1 -1
- package/report/inspectors/inspect-artifact-sizes.js +34 -1
- package/report/inspectors/inspect-artifact-sizes.js.map +1 -1
- package/report/inspectors/inspect-linker-rewrites.js +14 -1
- package/report/inspectors/inspect-linker-rewrites.js.map +1 -1
- package/report/inspectors/inspect-package-json-provenance.js +15 -0
- package/report/inspectors/inspect-package-json-provenance.js.map +1 -1
- package/report/inspectors/inspect-scan-results.js +15 -0
- package/report/inspectors/inspect-scan-results.js.map +1 -1
- package/report/release-diff/release-version-transition.js +18 -0
- package/report/release-diff/release-version-transition.js.map +1 -1
- package/resource-resolver/bundle-resource-lookup.js +25 -0
- package/resource-resolver/bundle-resource-lookup.js.map +1 -1
- package/resource-resolver/content.js +136 -4
- package/resource-resolver/content.js.map +1 -1
- package/resource-resolver/dependency-resolution-walker.js +73 -2
- package/resource-resolver/dependency-resolution-walker.js.map +1 -1
- package/resource-resolver/resolved-bundle.js +3 -0
- package/resource-resolver/resolved-bundle.js.map +1 -1
- package/resource-resolver/resource-resolve-options.js +13 -1
- package/resource-resolver/resource-resolve-options.js.map +1 -1
- package/resource-resolver/resource-resolver.js +128 -6
- package/resource-resolver/resource-resolver.js.map +1 -1
- package/sbom/extract-license.js +11 -1
- package/sbom/extract-license.js.map +1 -1
- package/sbom/license-resolver.js +23 -2
- package/sbom/license-resolver.js.map +1 -1
- package/sbom/sbom-builder.js +57 -2
- package/sbom/sbom-builder.js.map +1 -1
- package/sbom/sbom-canonicalizer.js +45 -3
- package/sbom/sbom-canonicalizer.js.map +1 -1
- package/sbom/sbom-file.js +54 -5
- package/sbom/sbom-file.js.map +1 -1
- package/sbom/sbom-serializer.js +14 -1
- package/sbom/sbom-serializer.js.map +1 -1
- package/sbom/tool-version.js +49 -1
- package/sbom/tool-version.js.map +1 -1
- package/sbom.cdx.json +10 -10
- package/tar/extract-tar.js +83 -3
- package/tar/extract-tar.js.map +1 -1
- package/tar/gzipped-pack.js +20 -0
- package/tar/gzipped-pack.js.map +1 -1
- package/tar/tarball-builder.js +44 -4
- package/tar/tarball-builder.js.map +1 -1
- package/vendor-materializer/vendor-entry.js +20 -1
- package/vendor-materializer/vendor-entry.js.map +1 -1
- package/vendor-materializer/vendor-materializer.js +240 -8
- package/vendor-materializer/vendor-materializer.js.map +1 -1
- package/version-manager/dependencies/bundle-dependency-grouping.js +32 -2
- package/version-manager/dependencies/bundle-dependency-grouping.js.map +1 -1
- package/version-manager/dependencies/dependency-groups.js +11 -1
- package/version-manager/dependencies/dependency-groups.js.map +1 -1
- package/version-manager/dependencies/external-dependency-classification.js +82 -3
- package/version-manager/dependencies/external-dependency-classification.js.map +1 -1
- package/version-manager/dependencies/versioned-bundle-dependencies.js +8 -3
- package/version-manager/dependencies/versioned-bundle-dependencies.js.map +1 -1
- package/version-manager/imports/hash-import-scanner.js +20 -2
- package/version-manager/imports/hash-import-scanner.js.map +1 -1
- package/version-manager/imports/imports-key-matcher.js +22 -0
- package/version-manager/imports/imports-key-matcher.js.map +1 -1
- package/version-manager/imports/versioned-bundle-imports.js +44 -2
- package/version-manager/imports/versioned-bundle-imports.js.map +1 -1
- package/version-manager/manager.js +46 -6
- package/version-manager/manager.js.map +1 -1
- package/version-manager/manifest/builder.js +51 -1
- package/version-manager/manifest/builder.js.map +1 -1
- package/version-manager/manifest/serialize.js +8 -1
- package/version-manager/manifest/serialize.js.map +1 -1
- package/version-manager/optional-bundle-fields.js +5 -1
- package/version-manager/optional-bundle-fields.js.map +1 -1
- package/version-manager/representative-root.js +9 -1
- package/version-manager/representative-root.js.map +1 -1
- package/version-manager/specifier-classifier.js +42 -2
- package/version-manager/specifier-classifier.js.map +1 -1
- package/version-manager/specifier-errors.js +58 -0
- package/version-manager/specifier-errors.js.map +1 -1
- package/version-manager/versioned-bundle.js +31 -6
- package/version-manager/versioned-bundle.js.map +1 -1
- package/zip/zip-builder.js +81 -2
- package/zip/zip-builder.js.map +1 -1
- package/dead-code-eliminator/liveness/external-module-resolution.js +0 -3
- package/dead-code-eliminator/liveness/external-module-resolution.js.map +0 -1
|
@@ -1 +1,54 @@
|
|
|
1
|
+
function activeProblems(problems) {
|
|
2
|
+
return problems.filter(function (problem) {
|
|
3
|
+
return problem.affectedResolutionKinds.length > 0;
|
|
4
|
+
});
|
|
5
|
+
}
|
|
6
|
+
function groupProblemsByKind(problems) {
|
|
7
|
+
const groups = new Map();
|
|
8
|
+
for (const problem of problems) {
|
|
9
|
+
const existing = groups.get(problem.kind);
|
|
10
|
+
groups.set(problem.kind, {
|
|
11
|
+
shortDescription: problem.shortDescription,
|
|
12
|
+
problems: existing === undefined ? [problem] : [...existing.problems, problem]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return groups;
|
|
16
|
+
}
|
|
17
|
+
function formatQuotedList(prefix, values) {
|
|
18
|
+
return values
|
|
19
|
+
.map(function (value, index) {
|
|
20
|
+
const separator = index === 0 ? ` ${prefix} ` : ', ';
|
|
21
|
+
return `${separator}"${value}"`;
|
|
22
|
+
})
|
|
23
|
+
.join('');
|
|
24
|
+
}
|
|
25
|
+
function affectedEntrypointsOf(group, entrypoints) {
|
|
26
|
+
return entrypoints.filter(function (entrypoint) {
|
|
27
|
+
return group.problems.some(function (problem) {
|
|
28
|
+
return problem.affectedEntrypoints.includes(entrypoint);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function affectedResolutionKindsOf(group, resolutionKinds) {
|
|
33
|
+
return resolutionKinds.filter(function (resolutionKind) {
|
|
34
|
+
return group.problems.some(function (problem) {
|
|
35
|
+
return problem.affectedResolutionKinds.includes(resolutionKind);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function formatProblemGroup(packageName, group, entrypoints, resolutionKinds) {
|
|
40
|
+
const findings = group.problems.length === 1 ? '' : ` (${group.problems.length} findings)`;
|
|
41
|
+
const entrypointList = formatQuotedList('affecting entrypoints', affectedEntrypointsOf(group, entrypoints));
|
|
42
|
+
const resolutionList = formatQuotedList('in resolutions', affectedResolutionKindsOf(group, resolutionKinds));
|
|
43
|
+
return (`Package "${packageName}" failed TypeScript integrity: ` +
|
|
44
|
+
`${group.shortDescription}${findings}${entrypointList}${resolutionList}`);
|
|
45
|
+
}
|
|
46
|
+
export function summarizeResolutionReport(packageName, report, resolutionKinds) {
|
|
47
|
+
if (report.kind === 'missing-declarations') {
|
|
48
|
+
return [`Package "${packageName}" does not expose TypeScript declarations`];
|
|
49
|
+
}
|
|
50
|
+
return Array.from(groupProblemsByKind(activeProblems(report.problems)).values(), function (group) {
|
|
51
|
+
return formatProblemGroup(packageName, group, report.entrypoints, resolutionKinds);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
1
54
|
//# sourceMappingURL=type-script-resolution-summary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-script-resolution-summary.js","sourceRoot":"","sources":["../../../../../source/checks/rules/type-script-resolution-summary.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"type-script-resolution-summary.js","sourceRoot":"","sources":["../../../../../source/checks/rules/type-script-resolution-summary.ts"],"names":[],"mappings":"AAQA,SAAS,cAAc,CAAC,QAA4C;IAChE,OAAO,QAAQ,CAAC,MAAM,CAAC,UAAU,OAAO;QACpC,OAAO,OAAO,CAAC,uBAAuB,CAAC,MAAM,GAAG,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,mBAAmB,CAAC,QAA4C;IACrE,MAAM,MAAM,GAAG,IAAI,GAAG,EAA6B,CAAC;IAEpD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1C,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE;YACrB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,QAAQ,EAAE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAE,OAAO,CAAE,CAAC,CAAC,CAAC,CAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAE;SACrF,CAAC,CAAC;IACP,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,SAAS,gBAAgB,CAAC,MAAc,EAAE,MAAyB;IAC/D,OAAO,MAAM;SACR,GAA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,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC;IAC7G,OAAO,CACH,YAAY,WAAW,iCAAiC;QACxD,GAAG,KAAK,CAAC,gBAAgB,GAAG,QAAQ,GAAG,cAAc,GAAG,cAAc,EAAE,CAC3E,CAAC;AACN,CAAC;AAED,MAAM,UAAU,yBAAyB,CACrC,WAAmB,EACnB,MAA+B,EAC/B,eAA0C;IAE1C,IAAI,MAAM,CAAC,IAAI,KAAK,sBAAsB,EAAE,CAAC;QACzC,OAAO,CAAE,YAAY,WAAW,2CAA2C,CAAE,CAAC;IAClF,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CACb,mBAAmB,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,EAC7D,UAAU,KAAK;QACX,OAAO,kBAAkB,CAAC,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IACvF,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,3 +1,35 @@
|
|
|
1
|
-
import 'remeda';
|
|
2
|
-
import "../rule.js";
|
|
1
|
+
import { groupBy } from 'remeda';
|
|
2
|
+
import { emptyPerPackageSchema, enabledOnlyGlobalSchema } from "../rule.js";
|
|
3
|
+
const ruleName = 'uniqueTargetPaths';
|
|
4
|
+
function findCollidingTargetPaths(bundle) {
|
|
5
|
+
const sourcesByTarget = groupBy(bundle.contents, function (resource) {
|
|
6
|
+
return resource.fileDescription.targetFilePath;
|
|
7
|
+
});
|
|
8
|
+
return Object.entries(sourcesByTarget).flatMap(function ([targetFilePath, resources]) {
|
|
9
|
+
if (resources.length <= 1) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
const sortedSources = resources
|
|
13
|
+
.map(function (resource) {
|
|
14
|
+
return resource.fileDescription.inputFilePath;
|
|
15
|
+
})
|
|
16
|
+
.toSorted(function (left, right) {
|
|
17
|
+
return left.localeCompare(right);
|
|
18
|
+
});
|
|
19
|
+
return [`Package "${bundle.name}" maps multiple sources to "${targetFilePath}": ${sortedSources.join(', ')}`];
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async function run(input) {
|
|
23
|
+
const globalConfig = input.settings?.uniqueTargetPaths;
|
|
24
|
+
if (globalConfig?.enabled !== true) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
return input.bundles.flatMap(findCollidingTargetPaths);
|
|
28
|
+
}
|
|
29
|
+
export const uniqueTargetPathsRule = {
|
|
30
|
+
name: ruleName,
|
|
31
|
+
globalSchema: enabledOnlyGlobalSchema,
|
|
32
|
+
perPackageSchema: emptyPerPackageSchema,
|
|
33
|
+
run
|
|
34
|
+
};
|
|
3
35
|
//# sourceMappingURL=unique-target-paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-target-paths.js","sourceRoot":"","sources":["../../../../../source/checks/rules/unique-target-paths.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"unique-target-paths.js","sourceRoot":"","sources":["../../../../../source/checks/rules/unique-target-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC,OAAO,EACH,qBAAqB,EACrB,uBAAuB,EAG1B,MAAM,YAAY,CAAC;AAEpB,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AAMrC,SAAS,wBAAwB,CAAC,MAAsB;IACpD,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,QAAQ;QAC/D,OAAO,QAAQ,CAAC,eAAe,CAAC,cAAc,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,UAAU,CAAE,cAAc,EAAE,SAAS,CAAE;QAClF,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,CAAC;QACd,CAAC;QACD,MAAM,aAAa,GAAG,SAAS;aAC1B,GAAG,CAAC,UAAU,QAAQ;YACnB,OAAO,QAAQ,CAAC,eAAe,CAAC,aAAa,CAAC;QAClD,CAAC,CAAC;aACD,QAAQ,CAAC,UAAU,IAAI,EAAE,KAAK;YAC3B,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;QACP,OAAO,CAAE,YAAY,MAAM,CAAC,IAAI,+BAA+B,cAAc,MAAM,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAE,CAAC;IACpH,CAAC,CAAC,CAAC;AACP,CAAC;AAED,KAAK,UAAU,GAAG,CAAC,KAAe;IAC9B,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACvD,IAAI,YAAY,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC;QACjC,OAAO,EAAE,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAyE;IACvG,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,uBAAuB;IACrC,gBAAgB,EAAE,qBAAqB;IACvC,GAAG;CACN,CAAC"}
|
|
@@ -1 +1,28 @@
|
|
|
1
|
+
export const bundledDependencyGroup = {
|
|
2
|
+
bundle: {
|
|
3
|
+
propertyName: 'bundleDependencies',
|
|
4
|
+
manifestProperty: 'dependencies',
|
|
5
|
+
missingMessagePrefix: 'Bundle dependency',
|
|
6
|
+
unusedLabel: 'bundle'
|
|
7
|
+
},
|
|
8
|
+
peer: {
|
|
9
|
+
propertyName: 'bundlePeerDependencies',
|
|
10
|
+
manifestProperty: 'peerDependencies',
|
|
11
|
+
missingMessagePrefix: 'Bundle peer dependency',
|
|
12
|
+
unusedLabel: 'bundle peer'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export function bundledDependencyGroups() {
|
|
16
|
+
return [bundledDependencyGroup.bundle, bundledDependencyGroup.peer];
|
|
17
|
+
}
|
|
18
|
+
export function bundledDependencyLookupOrder() {
|
|
19
|
+
return [bundledDependencyGroup.peer, bundledDependencyGroup.bundle];
|
|
20
|
+
}
|
|
21
|
+
export function bundledDependenciesFrom(source) {
|
|
22
|
+
const dependencies = [];
|
|
23
|
+
for (const group of bundledDependencyGroups()) {
|
|
24
|
+
dependencies.push(...source[group.propertyName] ?? []);
|
|
25
|
+
}
|
|
26
|
+
return dependencies;
|
|
27
|
+
}
|
|
1
28
|
//# sourceMappingURL=bundled-dependency-groups.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundled-dependency-groups.js","sourceRoot":"","sources":["../../../../source/common/bundled-dependency-groups.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"bundled-dependency-groups.js","sourceRoot":"","sources":["../../../../source/common/bundled-dependency-groups.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,MAAM,EAAE;QACJ,YAAY,EAAE,oBAAoB;QAClC,gBAAgB,EAAE,cAAc;QAChC,oBAAoB,EAAE,mBAAmB;QACzC,WAAW,EAAE,QAAQ;KACxB;IACD,IAAI,EAAE;QACF,YAAY,EAAE,wBAAwB;QACtC,gBAAgB,EAAE,kBAAkB;QACpC,oBAAoB,EAAE,wBAAwB;QAC9C,WAAW,EAAE,aAAa;KAC7B;CACK,CAAC;AAOX,MAAM,UAAU,uBAAuB;IAInC,OAAO,CAAE,sBAAsB,CAAC,MAAM,EAAE,sBAAsB,CAAC,IAAI,CAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,4BAA4B;IAIxC,OAAO,CAAE,sBAAsB,CAAC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAI,MAAkC;IACzE,MAAM,YAAY,GAAQ,EAAE,CAAC;IAE7B,KAAK,MAAM,KAAK,IAAI,uBAAuB,EAAE,EAAE,CAAC;QAC5C,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,YAAY,CAAC;AACxB,CAAC"}
|
package/common/code-files.js
CHANGED
|
@@ -1 +1,29 @@
|
|
|
1
|
+
const codeFilePattern = /(?:\.d\.ts|\.[cm]?[jt]sx?)$/;
|
|
2
|
+
export function isCodeFile(targetFilePath) {
|
|
3
|
+
return codeFilePattern.test(targetFilePath);
|
|
4
|
+
}
|
|
5
|
+
export function isDeclarationCodeFile(targetFilePath) {
|
|
6
|
+
return targetFilePath.endsWith('.d.ts');
|
|
7
|
+
}
|
|
8
|
+
const textDiffablePatterns = [
|
|
9
|
+
codeFilePattern,
|
|
10
|
+
/\.json$/,
|
|
11
|
+
/\.md$/,
|
|
12
|
+
/\.txt$/,
|
|
13
|
+
/\.ya?ml$/,
|
|
14
|
+
/\.map$/
|
|
15
|
+
];
|
|
16
|
+
const textDiffableBasenames = new Set(['LICENSE', 'COPYING', 'NOTICE', 'CHANGELOG', 'readme']);
|
|
17
|
+
function basenameOf(targetFilePath) {
|
|
18
|
+
return targetFilePath.slice(targetFilePath.lastIndexOf('/') + 1);
|
|
19
|
+
}
|
|
20
|
+
export function isTextDiffablePath(targetFilePath) {
|
|
21
|
+
const matchesPattern = textDiffablePatterns.some(function (pattern) {
|
|
22
|
+
return pattern.test(targetFilePath);
|
|
23
|
+
});
|
|
24
|
+
if (matchesPattern) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return textDiffableBasenames.has(basenameOf(targetFilePath));
|
|
28
|
+
}
|
|
1
29
|
//# sourceMappingURL=code-files.js.map
|
package/common/code-files.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-files.js","sourceRoot":"","sources":["../../../../source/common/code-files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"code-files.js","sourceRoot":"","sources":["../../../../source/common/code-files.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,6BAA6B,CAAC;AACtD,MAAM,UAAU,UAAU,CAAC,cAAsB;IAC7C,OAAO,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,cAAsB;IACxD,OAAO,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,oBAAoB,GAAsB;IAC5C,eAAe;IACf,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,QAAQ;CACX,CAAC;AAEF,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAC,CAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAE,CAAC,CAAC;AAEtH,SAAS,UAAU,CAAC,cAAsB;IACtC,OAAO,cAAc,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,cAAsB;IACrD,MAAM,cAAc,GAAG,oBAAoB,CAAC,IAAI,CAAC,UAAU,OAAO;QAC9D,OAAO,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IACH,IAAI,cAAc,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,qBAAqB,CAAC,GAAG,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -1 +1,25 @@
|
|
|
1
|
+
const declarationCompanionRules = [
|
|
2
|
+
{ declarationExtensions: ['.d.mts', '.d.ts'], jsExtension: '.mjs' },
|
|
3
|
+
{ declarationExtensions: ['.d.cts', '.d.ts'], jsExtension: '.cjs' },
|
|
4
|
+
{ declarationExtensions: ['.d.ts'], jsExtension: '.js' }
|
|
5
|
+
];
|
|
6
|
+
export function declarationCompanionCandidates(filePath) {
|
|
7
|
+
const rule = declarationCompanionRules.find(function (candidate) {
|
|
8
|
+
return filePath.endsWith(candidate.jsExtension);
|
|
9
|
+
});
|
|
10
|
+
if (rule === undefined) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
const pathWithoutExtension = filePath.slice(0, -rule.jsExtension.length);
|
|
14
|
+
return rule.declarationExtensions.map(function (declarationExtension) {
|
|
15
|
+
return `${pathWithoutExtension}${declarationExtension}`;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export function isDeclarationCompanionFilePath(filePath) {
|
|
19
|
+
return declarationCompanionRules.some(function (rule) {
|
|
20
|
+
return rule.declarationExtensions.some(function (declarationExtension) {
|
|
21
|
+
return filePath.endsWith(declarationExtension);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
1
25
|
//# sourceMappingURL=declaration-companion-paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declaration-companion-paths.js","sourceRoot":"","sources":["../../../../source/common/declaration-companion-paths.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"declaration-companion-paths.js","sourceRoot":"","sources":["../../../../source/common/declaration-companion-paths.ts"],"names":[],"mappings":"AAKA,MAAM,yBAAyB,GAAwC;IACnE,EAAE,qBAAqB,EAAE,CAAE,QAAQ,EAAE,OAAO,CAAE,EAAE,WAAW,EAAE,MAAM,EAAE;IACrE,EAAE,qBAAqB,EAAE,CAAE,QAAQ,EAAE,OAAO,CAAE,EAAE,WAAW,EAAE,MAAM,EAAE;IACrE,EAAE,qBAAqB,EAAE,CAAE,OAAO,CAAE,EAAE,WAAW,EAAE,KAAK,EAAE;CAC7D,CAAC;AAEF,MAAM,UAAU,8BAA8B,CAAC,QAAgB;IAC3D,MAAM,IAAI,GAAG,yBAAyB,CAAC,IAAI,CAAC,UAAU,SAAS;QAC3D,OAAO,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IACH,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACrB,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,oBAAoB,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACzE,OAAO,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,UAAU,oBAAoB;QAChE,OAAO,GAAG,oBAAoB,GAAG,oBAAoB,EAAE,CAAC;IAC5D,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,QAAgB;IAC3D,OAAO,yBAAyB,CAAC,IAAI,CAAC,UAAU,IAAI;QAChD,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,oBAAoB;YACjE,OAAO,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-name-map.js","sourceRoot":"","sources":["../../../../source/common/package-name-map.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"package-name-map.js","sourceRoot":"","sources":["../../../../source/common/package-name-map.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAuC,QAAsB;IACvF,MAAM,cAAc,GAAG,IAAI,GAAG,EAAa,CAAC;IAE5C,KAAK,MAAM,YAAY,IAAI,QAAQ,EAAE,CAAC;QAClC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,cAAc,CAAC;AAC1B,CAAC"}
|
package/common/stable-json.js
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
-
import 'remeda';
|
|
2
|
-
import "./sort-values.js";
|
|
1
|
+
import { isArray, isPlainObject } from 'remeda';
|
|
2
|
+
import { compareValues } from "./sort-values.js";
|
|
3
|
+
const indentationSize = 4;
|
|
4
|
+
function assertNoCircularStructures(value) {
|
|
5
|
+
const visitedObjects = new Set();
|
|
6
|
+
JSON.stringify(value, function (_key, currentValue) {
|
|
7
|
+
if (typeof currentValue === 'object' && currentValue !== null) {
|
|
8
|
+
if (visitedObjects.has(currentValue)) {
|
|
9
|
+
throw new Error('Circular structures are not supported');
|
|
10
|
+
}
|
|
11
|
+
visitedObjects.add(currentValue);
|
|
12
|
+
}
|
|
13
|
+
return currentValue;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function deepSortValue(value, shouldPreserveArrayOrder, path) {
|
|
17
|
+
if (isArray(value)) {
|
|
18
|
+
const mapped = value.map(function (entry, index) {
|
|
19
|
+
return deepSortValue(entry, shouldPreserveArrayOrder, [...path, String(index)]);
|
|
20
|
+
});
|
|
21
|
+
if (shouldPreserveArrayOrder?.(path) === true) {
|
|
22
|
+
return mapped;
|
|
23
|
+
}
|
|
24
|
+
return mapped.toSorted(compareValues);
|
|
25
|
+
}
|
|
26
|
+
if (isPlainObject(value)) {
|
|
27
|
+
return Object.fromEntries(Object
|
|
28
|
+
.entries(value)
|
|
29
|
+
.map(function ([key, nestedValue]) {
|
|
30
|
+
return [key, deepSortValue(nestedValue, shouldPreserveArrayOrder, [...path, key])];
|
|
31
|
+
})
|
|
32
|
+
.toSorted(function ([leftKey], [rightKey]) {
|
|
33
|
+
return compareValues(leftKey, rightKey);
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
export function serializeStableJson(value, options = {}) {
|
|
39
|
+
assertNoCircularStructures(value);
|
|
40
|
+
const sortedValue = deepSortValue(value, options.shouldPreserveArrayOrder, []);
|
|
41
|
+
return JSON.stringify(sortedValue, null, indentationSize);
|
|
42
|
+
}
|
|
3
43
|
//# sourceMappingURL=stable-json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stable-json.js","sourceRoot":"","sources":["../../../../source/common/stable-json.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"stable-json.js","sourceRoot":"","sources":["../../../../source/common/stable-json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,eAAe,GAAG,CAAC,CAAC;AAS1B,SAAS,0BAA0B,CAAC,KAAc;IAC9C,MAAM,cAAc,GAAG,IAAI,GAAG,EAAW,CAAC;IAE1C,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,UAAU,IAAI,EAAE,YAAqB;QACvD,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;YAC5D,IAAI,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;gBACnC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;YAC7D,CAAC;YAED,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,YAAY,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,aAAa,CAClB,KAAc,EACd,wBAA8D,EAC9D,IAAuB;IAEvB,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjB,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,KAAK,EAAE,KAAK;YAC3C,OAAO,aAAa,CAAC,KAAK,EAAE,wBAAwB,EAAE,CAAE,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAE,CAAC,CAAC;QACtF,CAAC,CAAC,CAAC;QACH,IAAI,wBAAwB,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC5C,OAAO,MAAM,CAAC;QAClB,CAAC;QACD,OAAO,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,MAAM,CAAC,WAAW,CACrB,MAAM;aACD,OAAO,CAAC,KAAK,CAAC;aACd,GAAG,CAAc,UAAU,CAAE,GAAG,EAAE,WAAW,CAAE;YAC5C,OAAO,CAAE,GAAG,EAAE,aAAa,CAAC,WAAW,EAAE,wBAAwB,EAAE,CAAE,GAAG,IAAI,EAAE,GAAG,CAAE,CAAC,CAAE,CAAC;QAC3F,CAAC,CAAC;aACD,QAAQ,CAAC,UAAU,CAAE,OAAO,CAAe,EAAE,CAAE,QAAQ,CAAe;YACnE,OAAO,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5C,CAAC,CAAC,CACT,CAAC;IACN,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAc,EAAE,UAAsC,EAAE;IACxF,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,WAAW,GAAG,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC;IAC/E,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;AAC9D,CAAC"}
|
package/common/worklist.js
CHANGED
|
@@ -1 +1,23 @@
|
|
|
1
|
+
export function createWorklist(initialItems) {
|
|
2
|
+
const items = Array.from(initialItems);
|
|
3
|
+
let nextIndex = 0;
|
|
4
|
+
return {
|
|
5
|
+
schedule(item) {
|
|
6
|
+
items.push(item);
|
|
7
|
+
},
|
|
8
|
+
scheduleAll(additions) {
|
|
9
|
+
for (const item of additions) {
|
|
10
|
+
items.push(item);
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
takeNext() {
|
|
14
|
+
if (nextIndex >= items.length) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const nextItem = items[nextIndex];
|
|
18
|
+
nextIndex += 1;
|
|
19
|
+
return nextItem;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
1
23
|
//# sourceMappingURL=worklist.js.map
|
package/common/worklist.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worklist.js","sourceRoot":"","sources":["../../../../source/common/worklist.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"worklist.js","sourceRoot":"","sources":["../../../../source/common/worklist.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,cAAc,CAAI,YAAyB;IACvD,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACvC,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,OAAO;QACH,QAAQ,CAAC,IAAI;YACT,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;QACD,WAAW,CAAC,SAAS;YACjB,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;gBAC3B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;QACL,CAAC;QACD,QAAQ;YACJ,IAAI,SAAS,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC5B,OAAO,SAAS,CAAC;YACrB,CAAC;YACD,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;YAClC,SAAS,IAAI,CAAC,CAAC;YACf,OAAO,QAAQ,CAAC;QACpB,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import 'zod/mini';
|
|
2
|
-
import "./base-validations.js";
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
import { bundleRelativePathSchema, nonEmptyStringSchema } from "./base-validations.js";
|
|
3
|
+
export const additionalFileDescriptionSchema = z.readonly(z.strictObject({
|
|
4
|
+
inputFilePath: nonEmptyStringSchema,
|
|
5
|
+
targetFilePath: bundleRelativePathSchema
|
|
6
|
+
}));
|
|
3
7
|
//# sourceMappingURL=additional-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"additional-files.js","sourceRoot":"","sources":["../../../../source/config/additional-files.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"additional-files.js","sourceRoot":"","sources":["../../../../source/config/additional-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEvF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,QAAQ,CACrD,CAAC,CAAC,YAAY,CAAC;IACX,aAAa,EAAE,oBAAoB;IACnC,cAAc,EAAE,wBAAwB;CAC3C,CAAC,CACL,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import 'zod/mini';
|
|
2
|
-
import "./package-json.js";
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
import { isForbiddenAdditionalPackageJsonAttributeName } from "./package-json.js";
|
|
3
|
+
const additionalPackageJsonAttributeNameSchema = z.string().check(z.refine(function (value) {
|
|
4
|
+
return !isForbiddenAdditionalPackageJsonAttributeName(value);
|
|
5
|
+
}));
|
|
6
|
+
export const additionalPackageJsonAttributesSchema = z.readonly(z.record(additionalPackageJsonAttributeNameSchema, z.json()));
|
|
3
7
|
//# sourceMappingURL=additional-package-json-attributes-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"additional-package-json-attributes-schema.js","sourceRoot":"","sources":["../../../../source/config/additional-package-json-attributes-schema.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"additional-package-json-attributes-schema.js","sourceRoot":"","sources":["../../../../source/config/additional-package-json-attributes-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,6CAA6C,EAAE,MAAM,mBAAmB,CAAC;AAElF,MAAM,wCAAwC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAC7D,CAAC,CAAC,MAAM,CAAC,UAAU,KAAK;IACpB,OAAO,CAAC,6CAA6C,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC,CAAC,CACL,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,QAAQ,CAC3D,CAAC,CAAC,MAAM,CAAC,wCAAwC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAC/D,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import 'zod/mini';
|
|
2
|
-
import "./base-validations.js";
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
import { nonEmptyStringSchema } from "./base-validations.js";
|
|
3
|
+
export const automaticVersioningSettingsSchema = z.readonly(z.strictObject({
|
|
4
|
+
automatic: z.literal(true),
|
|
5
|
+
minimumVersion: z.optional(nonEmptyStringSchema)
|
|
6
|
+
}));
|
|
3
7
|
//# sourceMappingURL=automatic-versioning-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automatic-versioning-settings.js","sourceRoot":"","sources":["../../../../source/config/automatic-versioning-settings.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"automatic-versioning-settings.js","sourceRoot":"","sources":["../../../../source/config/automatic-versioning-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,QAAQ,CACvD,CAAC,CAAC,YAAY,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1B,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CACnD,CAAC,CACL,CAAC"}
|
|
@@ -1,4 +1,121 @@
|
|
|
1
|
-
import 'node:path';
|
|
2
|
-
import 'zod/mini';
|
|
3
|
-
import "./base-validations.js";
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { z } from 'zod/mini';
|
|
3
|
+
import { bundleRelativePathSchema, nonEmptyStringSchema } from "./base-validations.js";
|
|
4
|
+
const repositoryFileOutputSchema = z.readonly(z.strictObject({
|
|
5
|
+
kind: z.literal('repository-file'),
|
|
6
|
+
path: bundleRelativePathSchema
|
|
7
|
+
}));
|
|
8
|
+
const packageFileOutputSchema = z.readonly(z.strictObject({
|
|
9
|
+
kind: z.literal('package-file'),
|
|
10
|
+
path: bundleRelativePathSchema
|
|
11
|
+
}));
|
|
12
|
+
const explicitPackageFileOutputSchema = z.readonly(z.strictObject({
|
|
13
|
+
kind: z.literal('package-file'),
|
|
14
|
+
paths: z.readonly(z.record(nonEmptyStringSchema, bundleRelativePathSchema)).check(z.refine(function (value) {
|
|
15
|
+
return Object.keys(value).length > 0;
|
|
16
|
+
}))
|
|
17
|
+
}));
|
|
18
|
+
const githubReleaseOutputSchema = z.readonly(z.strictObject({
|
|
19
|
+
kind: z.literal('github-release')
|
|
20
|
+
}));
|
|
21
|
+
const changelogOutputSchema = z.union([
|
|
22
|
+
repositoryFileOutputSchema,
|
|
23
|
+
packageFileOutputSchema,
|
|
24
|
+
explicitPackageFileOutputSchema,
|
|
25
|
+
githubReleaseOutputSchema
|
|
26
|
+
]);
|
|
27
|
+
export const changelogSettingsSchema = z.readonly(z.strictObject({
|
|
28
|
+
explicitBaseRef: z.optional(nonEmptyStringSchema),
|
|
29
|
+
outputs: z.optional(z.readonly(z.tuple([changelogOutputSchema], changelogOutputSchema))),
|
|
30
|
+
packageTagFormat: z.optional(nonEmptyStringSchema),
|
|
31
|
+
prLog: z.optional(z.unknown()),
|
|
32
|
+
targetScopedLabelPattern: z.optional(nonEmptyStringSchema)
|
|
33
|
+
}));
|
|
34
|
+
function normalizeRelativePath(filePath) {
|
|
35
|
+
return filePath.replaceAll(/[/\\]/gu, '/');
|
|
36
|
+
}
|
|
37
|
+
function normalizeFilePath(...filePathSegments) {
|
|
38
|
+
return path.normalize(path.join(...filePathSegments.map(normalizeRelativePath)));
|
|
39
|
+
}
|
|
40
|
+
function normalizeChangelogOutputPath(filePath) {
|
|
41
|
+
return path.normalize(normalizeRelativePath(filePath));
|
|
42
|
+
}
|
|
43
|
+
function collectDuplicateValueIssues(values, messageFor) {
|
|
44
|
+
const issues = [];
|
|
45
|
+
const seenValues = new Set();
|
|
46
|
+
const reportedValues = new Set();
|
|
47
|
+
for (const value of values) {
|
|
48
|
+
if (seenValues.has(value) && !reportedValues.has(value)) {
|
|
49
|
+
issues.push(messageFor(value));
|
|
50
|
+
reportedValues.add(value);
|
|
51
|
+
}
|
|
52
|
+
seenValues.add(value);
|
|
53
|
+
}
|
|
54
|
+
return issues;
|
|
55
|
+
}
|
|
56
|
+
function hasExplicitPackageFilePaths(output) {
|
|
57
|
+
return Object.hasOwn(output, 'paths');
|
|
58
|
+
}
|
|
59
|
+
function resolveSourcesFolder(packageConfig, packtoryConfig) {
|
|
60
|
+
return packageConfig.sourcesFolder ?? packtoryConfig.commonPackageSettings?.sourcesFolder;
|
|
61
|
+
}
|
|
62
|
+
function collectPackageFileDestinationPaths(packtoryConfig, output) {
|
|
63
|
+
if (output.kind !== 'package-file') {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
if (hasExplicitPackageFilePaths(output)) {
|
|
67
|
+
return Object.values(output.paths).map(normalizeChangelogOutputPath);
|
|
68
|
+
}
|
|
69
|
+
return packtoryConfig.packages.flatMap(function (packageConfig) {
|
|
70
|
+
const sourcesFolder = resolveSourcesFolder(packageConfig, packtoryConfig);
|
|
71
|
+
if (sourcesFolder === undefined) {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
return [normalizeFilePath(sourcesFolder, output.path)];
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function validateTargetScopedLabelPattern(pattern) {
|
|
78
|
+
if (pattern === undefined) {
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
if (!pattern.includes('{targetName}') || !pattern.includes('{label}')) {
|
|
82
|
+
return ['changelog.targetScopedLabelPattern must contain {targetName} and {label}'];
|
|
83
|
+
}
|
|
84
|
+
return [];
|
|
85
|
+
}
|
|
86
|
+
function collectChangelogOutputIssues(packtoryConfig, outputs) {
|
|
87
|
+
const githubReleaseCount = outputs
|
|
88
|
+
.filter(function (output) {
|
|
89
|
+
return output.kind === 'github-release';
|
|
90
|
+
})
|
|
91
|
+
.length;
|
|
92
|
+
const githubReleaseIssues = githubReleaseCount > 1
|
|
93
|
+
? ['changelog.outputs must not contain duplicate github-release outputs']
|
|
94
|
+
: [];
|
|
95
|
+
const repositoryFileIssues = collectDuplicateValueIssues(outputs.flatMap(function (output) {
|
|
96
|
+
return output.kind === 'repository-file' ? [normalizeRelativePath(output.path)] : [];
|
|
97
|
+
}), function (duplicatePath) {
|
|
98
|
+
return `changelog.outputs must not contain duplicate repository-file path "${duplicatePath}"`;
|
|
99
|
+
});
|
|
100
|
+
const packageFileIssues = collectDuplicateValueIssues(outputs.flatMap(function (output) {
|
|
101
|
+
return collectPackageFileDestinationPaths(packtoryConfig, output);
|
|
102
|
+
}), function (duplicatePath) {
|
|
103
|
+
return [
|
|
104
|
+
'changelog.outputs package-file destinations must resolve to unique files;',
|
|
105
|
+
`"${duplicatePath}" is duplicated`
|
|
106
|
+
]
|
|
107
|
+
.join(' ');
|
|
108
|
+
});
|
|
109
|
+
return [...githubReleaseIssues, ...repositoryFileIssues, ...packageFileIssues];
|
|
110
|
+
}
|
|
111
|
+
export function validateChangelogSettings(packtoryConfig) {
|
|
112
|
+
if (packtoryConfig.changelog === undefined) {
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
const patternIssues = validateTargetScopedLabelPattern(packtoryConfig.changelog.targetScopedLabelPattern);
|
|
116
|
+
const { outputs } = packtoryConfig.changelog;
|
|
117
|
+
return outputs === undefined
|
|
118
|
+
? patternIssues
|
|
119
|
+
: [...patternIssues, ...collectChangelogOutputIssues(packtoryConfig, outputs)];
|
|
120
|
+
}
|
|
4
121
|
//# sourceMappingURL=changelog-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog-settings.js","sourceRoot":"","sources":["../../../../source/config/changelog-settings.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"changelog-settings.js","sourceRoot":"","sources":["../../../../source/config/changelog-settings.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEvF,MAAM,0BAA0B,GAAG,CAAC,CAAC,QAAQ,CACzC,CAAC,CAAC,YAAY,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAClC,IAAI,EAAE,wBAAwB;CACjC,CAAC,CACL,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,CAAC,QAAQ,CACtC,CAAC,CAAC,YAAY,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IAC/B,IAAI,EAAE,wBAAwB;CACjC,CAAC,CACL,CAAC;AAEF,MAAM,+BAA+B,GAAG,CAAC,CAAC,QAAQ,CAC9C,CAAC,CAAC,YAAY,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IAC/B,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,CAAC,CAAC,KAAK,CAC7E,CAAC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,aAAa,GAAG,CAAC;IAClG,CAAC,CACJ,CAAC;IACF,MAAM,iBAAiB,GAAG,2BAA2B,CACjD,OAAO,CAAC,OAAO,CAAC,UAAU,MAAM;QAC5B,OAAO,kCAAkC,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC,CAAC,EACF,UAAU,aAAa;QACnB,OAAO;YACH,2EAA2E;YAC3E,IAAI,aAAa,iBAAiB;SACrC;aACI,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC,CACJ,CAAC;IAEF,OAAO,CAAE,GAAG,mBAAmB,EAAE,GAAG,oBAAoB,EAAE,GAAG,iBAAiB,CAAE,CAAC;AACrF,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,cAAyC;IAC/E,IAAI,cAAc,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACzC,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,aAAa,GAAG,gCAAgC,CAAC,cAAc,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;IAC1G,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC,SAAS,CAAC;IAC7C,OAAO,OAAO,KAAK,SAAS;QACxB,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,CAAE,GAAG,aAAa,EAAE,GAAG,4BAA4B,CAAC,cAAc,EAAE,OAAO,CAAC,CAAE,CAAC;AACzF,CAAC"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import 'zod/mini';
|
|
2
|
-
import "./base-validations.js";
|
|
3
|
-
import "./main-package-json-schema.js";
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
import { nonEmptyStringSchema } from "./base-validations.js";
|
|
3
|
+
import { mainPackageJsonSchema } from "./main-package-json-schema.js";
|
|
4
|
+
export const optionalCommonPackageSettingsSchema = z.strictObject({
|
|
5
|
+
sourcesFolder: z.optional(nonEmptyStringSchema),
|
|
6
|
+
mainPackageJson: z.optional(mainPackageJsonSchema)
|
|
7
|
+
});
|
|
8
|
+
export const requiredCommonPackageSettingsSchema = z.strictObject({
|
|
9
|
+
sourcesFolder: nonEmptyStringSchema,
|
|
10
|
+
mainPackageJson: mainPackageJsonSchema
|
|
11
|
+
});
|
|
12
|
+
export const commonPackageSettingsSourcesFolderRequiredSchema = z.strictObject({
|
|
13
|
+
sourcesFolder: nonEmptyStringSchema,
|
|
14
|
+
mainPackageJson: z.optional(mainPackageJsonSchema)
|
|
15
|
+
});
|
|
16
|
+
export const commonPackageSettingsMainPackageJsonRequiredSchema = z.strictObject({
|
|
17
|
+
sourcesFolder: z.optional(nonEmptyStringSchema),
|
|
18
|
+
mainPackageJson: mainPackageJsonSchema
|
|
19
|
+
});
|
|
4
20
|
//# sourceMappingURL=common-package-settings-schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-package-settings-schemas.js","sourceRoot":"","sources":["../../../../source/config/common-package-settings-schemas.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"common-package-settings-schemas.js","sourceRoot":"","sources":["../../../../source/config/common-package-settings-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9D,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAC/C,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CACrD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9D,aAAa,EAAE,oBAAoB;IACnC,eAAe,EAAE,qBAAqB;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gDAAgD,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3E,aAAa,EAAE,oBAAoB;IACnC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CACrD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kDAAkD,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7E,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IAC/C,eAAe,EAAE,qBAAqB;CACzC,CAAC,CAAC"}
|
package/config/config.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import "./package-config.js";
|
|
1
|
+
import { getBundledDependencies as getBundledDependenciesBase } from "./package-config.js";
|
|
2
|
+
const packageConfigOperations = { getBundledDependencies: getBundledDependenciesBase };
|
|
3
|
+
export const { getBundledDependencies } = packageConfigOperations;
|
|
2
4
|
//# sourceMappingURL=config.js.map
|
package/config/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../source/config/config.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../source/config/config.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,sBAAsB,IAAI,0BAA0B,EAIvD,MAAM,qBAAqB,CAAC;AAmB7B,MAAM,uBAAuB,GAAG,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,CAAC;AACvF,MAAM,CAAC,MAAM,EAAE,sBAAsB,EAAE,GAAG,uBAAuB,CAAC"}
|
|
@@ -1 +1,18 @@
|
|
|
1
|
+
export function validateDuplicatePackages(packages) {
|
|
2
|
+
const knownPackageNames = new Set();
|
|
3
|
+
const issues = [];
|
|
4
|
+
packages.forEach(function (packageConfig) {
|
|
5
|
+
if (knownPackageNames.has(packageConfig.name)) {
|
|
6
|
+
issues.push(`Duplicate package definition with the name "${packageConfig.name}"`);
|
|
7
|
+
}
|
|
8
|
+
knownPackageNames.add(packageConfig.name);
|
|
9
|
+
});
|
|
10
|
+
return issues;
|
|
11
|
+
}
|
|
12
|
+
export function validateCyclicDependencies(packageGraph) {
|
|
13
|
+
const cycles = packageGraph.detectCycles();
|
|
14
|
+
return cycles.map(function (cycle) {
|
|
15
|
+
return `Unexpected cyclic dependency path: [${cycle.join('→')}]`;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
1
18
|
//# sourceMappingURL=cross-package-validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cross-package-validation.js","sourceRoot":"","sources":["../../../../source/config/cross-package-validation.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"cross-package-validation.js","sourceRoot":"","sources":["../../../../source/config/cross-package-validation.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,yBAAyB,CAAC,QAAkC;IACxE,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;IAC5C,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,QAAQ,CAAC,OAAO,CAAC,UAAU,aAAa;QACpC,IAAI,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC,+CAA+C,aAAa,CAAC,IAAI,GAAG,CAAC,CAAC;QACtF,CAAC;QACD,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,YAA8C;IACrF,MAAM,MAAM,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC;IAC3C,OAAO,MAAM,CAAC,GAAG,CAAC,UAAU,KAAK;QAC7B,OAAO,uCAAuC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACrE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
import 'zod/mini';
|
|
2
|
-
import "./base-validations.js";
|
|
1
|
+
import { z } from 'zod/mini';
|
|
2
|
+
import { nonEmptyStringSchema } from "./base-validations.js";
|
|
3
|
+
const pureImportTrustSchema = z.readonly(z.strictObject({
|
|
4
|
+
from: nonEmptyStringSchema,
|
|
5
|
+
imports: z.optional(z.readonly(z.array(nonEmptyStringSchema)))
|
|
6
|
+
}));
|
|
7
|
+
export const deadCodeEliminationSettingsSchema = z.readonly(z.strictObject({
|
|
8
|
+
enabled: z.boolean(),
|
|
9
|
+
pureImports: z.optional(z.readonly(z.array(pureImportTrustSchema))),
|
|
10
|
+
pureConstructors: z.optional(z.readonly(z.array(nonEmptyStringSchema)))
|
|
11
|
+
}));
|
|
12
|
+
function mergeOptionalSetting(packageSetting, commonSetting) {
|
|
13
|
+
return packageSetting ?? commonSetting;
|
|
14
|
+
}
|
|
15
|
+
function resolveEnabledSetting(packageSettings, commonSettings) {
|
|
16
|
+
if (packageSettings?.enabled !== undefined) {
|
|
17
|
+
return packageSettings.enabled;
|
|
18
|
+
}
|
|
19
|
+
if (commonSettings?.enabled !== undefined) {
|
|
20
|
+
return commonSettings.enabled;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
function areDeadCodeEliminationSettingsMissing(packageSettings, commonSettings) {
|
|
25
|
+
return packageSettings === undefined && commonSettings === undefined;
|
|
26
|
+
}
|
|
27
|
+
export function resolveDeadCodeEliminationSettings(packageSettings, commonSettings) {
|
|
28
|
+
if (areDeadCodeEliminationSettingsMissing(packageSettings, commonSettings)) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
enabled: resolveEnabledSetting(packageSettings, commonSettings),
|
|
33
|
+
pureImports: mergeOptionalSetting(packageSettings?.pureImports, commonSettings?.pureImports),
|
|
34
|
+
pureConstructors: mergeOptionalSetting(packageSettings?.pureConstructors, commonSettings?.pureConstructors)
|
|
35
|
+
};
|
|
36
|
+
}
|
|
3
37
|
//# sourceMappingURL=dead-code-elimination-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dead-code-elimination-settings.js","sourceRoot":"","sources":["../../../../source/config/dead-code-elimination-settings.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"dead-code-elimination-settings.js","sourceRoot":"","sources":["../../../../source/config/dead-code-elimination-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,qBAAqB,GAAG,CAAC,CAAC,QAAQ,CACpC,CAAC,CAAC,YAAY,CAAC;IACX,IAAI,EAAE,oBAAoB;IAC1B,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC;CACjE,CAAC,CACL,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,QAAQ,CACvD,CAAC,CAAC,YAAY,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC;IACnE,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC;CAC1E,CAAC,CACL,CAAC;AAIF,SAAS,oBAAoB,CAAI,cAA6B,EAAE,aAA4B;IACxF,OAAO,cAAc,IAAI,aAAa,CAAC;AAC3C,CAAC;AAED,SAAS,qBAAqB,CAC1B,eAAwD,EACxD,cAAuD;IAEvD,IAAI,eAAe,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;QACzC,OAAO,eAAe,CAAC,OAAO,CAAC;IACnC,CAAC;IACD,IAAI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