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,9 +1,298 @@
|
|
|
1
|
-
import 'node:path';
|
|
2
|
-
import 'ts-morph';
|
|
3
|
-
import "../common/declaration-companion-paths.js";
|
|
4
|
-
import "../dead-code-eliminator/reachability/bfs-closure.js";
|
|
5
|
-
import "../package-surface/package-surface-index.js";
|
|
6
|
-
import "../package-surface/public-specifiers.js";
|
|
7
|
-
import "../package-surface/root-registry.js";
|
|
8
|
-
import "../package-surface/specifier-syntax.js";
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { ts as typescript } from 'ts-morph';
|
|
3
|
+
import { declarationCompanionCandidates, isDeclarationCompanionFilePath } from "../common/declaration-companion-paths.js";
|
|
4
|
+
import { bfsClosure } from "../dead-code-eliminator/reachability/bfs-closure.js";
|
|
5
|
+
import { rootInputFilePaths } from "../package-surface/package-surface-index.js";
|
|
6
|
+
import { getPublicModuleSpecifierForSourcePath } from "../package-surface/public-specifiers.js";
|
|
7
|
+
import { getRoot } from "../package-surface/root-registry.js";
|
|
8
|
+
import { toPackageSpecifier } from "../package-surface/specifier-syntax.js";
|
|
9
|
+
export function ownsSourcePath(file, bundle) {
|
|
10
|
+
return bundle.contents.some(function (content) {
|
|
11
|
+
return content.fileDescription.inputFilePath === file;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function needsImportReplacement(file) {
|
|
15
|
+
return !file.endsWith('.map');
|
|
16
|
+
}
|
|
17
|
+
function isDefined(value) {
|
|
18
|
+
return value !== undefined;
|
|
19
|
+
}
|
|
20
|
+
function createContentLookup(bundle) {
|
|
21
|
+
const contentBySourcePath = new Map();
|
|
22
|
+
const sourcePathByTargetPath = new Map();
|
|
23
|
+
for (const content of bundle.contents) {
|
|
24
|
+
contentBySourcePath.set(content.fileDescription.inputFilePath, content);
|
|
25
|
+
sourcePathByTargetPath.set(content.fileDescription.targetFilePath, content.fileDescription.inputFilePath);
|
|
26
|
+
}
|
|
27
|
+
return { contentBySourcePath, sourcePathByTargetPath };
|
|
28
|
+
}
|
|
29
|
+
function exportDeclaration(statement) {
|
|
30
|
+
if (!typescript.isExportDeclaration(statement)) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
return statement;
|
|
34
|
+
}
|
|
35
|
+
function moduleSpecifierText(statement) {
|
|
36
|
+
const { moduleSpecifier } = statement;
|
|
37
|
+
if (moduleSpecifier === undefined) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
if (!typescript.isStringLiteral(moduleSpecifier) || !moduleSpecifier.text.startsWith('.')) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return moduleSpecifier.text;
|
|
44
|
+
}
|
|
45
|
+
function exportDeclarations(content) {
|
|
46
|
+
const sourceFile = typescript.createSourceFile(content, content, typescript.ScriptTarget.Latest);
|
|
47
|
+
return sourceFile
|
|
48
|
+
.statements
|
|
49
|
+
.map(exportDeclaration)
|
|
50
|
+
.filter(isDefined);
|
|
51
|
+
}
|
|
52
|
+
function exportedTargetPath(currentTargetFilePath, specifier) {
|
|
53
|
+
return path.posix.normalize(path.posix.join(path.posix.dirname(currentTargetFilePath), specifier));
|
|
54
|
+
}
|
|
55
|
+
function exportedInputFilePaths(lookup, currentTargetFilePath, specifier) {
|
|
56
|
+
const targetPath = exportedTargetPath(currentTargetFilePath, specifier);
|
|
57
|
+
const inputFilePaths = [];
|
|
58
|
+
for (const candidate of [targetPath, ...declarationCompanionCandidates(targetPath)]) {
|
|
59
|
+
for (const [targetFilePath, inputFilePath] of lookup.sourcePathByTargetPath) {
|
|
60
|
+
if (targetFilePath === candidate) {
|
|
61
|
+
inputFilePaths.push(inputFilePath);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return inputFilePaths;
|
|
66
|
+
}
|
|
67
|
+
function namedExports(declaration) {
|
|
68
|
+
const { exportClause } = declaration;
|
|
69
|
+
if (exportClause === undefined || !typescript.isNamedExports(exportClause)) {
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
return Array.from(exportClause.elements);
|
|
73
|
+
}
|
|
74
|
+
function isExportStar(declaration) {
|
|
75
|
+
return declaration.exportClause === undefined;
|
|
76
|
+
}
|
|
77
|
+
function declarationInputFilePaths(lookup, currentTargetFilePath, declaration) {
|
|
78
|
+
return exportedInputFilePaths(lookup, currentTargetFilePath, moduleSpecifierText(declaration) ?? '');
|
|
79
|
+
}
|
|
80
|
+
const pathClosureDependencies = {
|
|
81
|
+
visitedHas(visited, value) {
|
|
82
|
+
return visited.has(value);
|
|
83
|
+
},
|
|
84
|
+
neighborAdded: undefined
|
|
85
|
+
};
|
|
86
|
+
function exportStateValue(value, property) {
|
|
87
|
+
return Reflect.get(new Object(value), property);
|
|
88
|
+
}
|
|
89
|
+
function inputFilePathForState(state) {
|
|
90
|
+
return state.inputFilePath;
|
|
91
|
+
}
|
|
92
|
+
const exportClosureDependencies = {
|
|
93
|
+
visitedHas(visited, value) {
|
|
94
|
+
return Array.from(visited).some(function (state) {
|
|
95
|
+
return exportStateValue(state, 'inputFilePath') === exportStateValue(value, 'inputFilePath') &&
|
|
96
|
+
exportStateValue(state, 'exportName') === exportStateValue(value, 'exportName');
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
neighborAdded: undefined
|
|
100
|
+
};
|
|
101
|
+
function exportedStateNames(lookup, state) {
|
|
102
|
+
const content = lookup.contentBySourcePath.get(inputFilePathForState(state));
|
|
103
|
+
if (content === undefined) {
|
|
104
|
+
return Array.from(new Set());
|
|
105
|
+
}
|
|
106
|
+
return exportDeclarations(content.fileDescription.content).flatMap(function (declaration) {
|
|
107
|
+
const inputFilePaths = declarationInputFilePaths(lookup, content.fileDescription.targetFilePath, declaration);
|
|
108
|
+
const exportStarStates = inputFilePaths
|
|
109
|
+
.filter(function () {
|
|
110
|
+
return state.exportName !== 'default' && isExportStar(declaration);
|
|
111
|
+
})
|
|
112
|
+
.map(function (nextInputFilePath) {
|
|
113
|
+
return { inputFilePath: nextInputFilePath, exportName: state.exportName };
|
|
114
|
+
});
|
|
115
|
+
const namedExportStates = namedExports(declaration)
|
|
116
|
+
.filter(function (namedExport) {
|
|
117
|
+
return namedExport.name.text === state.exportName;
|
|
118
|
+
})
|
|
119
|
+
.flatMap(function (namedExport) {
|
|
120
|
+
const sourceExportName = namedExport.propertyName?.text ?? namedExport.name.text;
|
|
121
|
+
return inputFilePaths.map(function (nextInputFilePath) {
|
|
122
|
+
return { inputFilePath: nextInputFilePath, exportName: sourceExportName };
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
return [...exportStarStates, ...namedExportStates];
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function publicModuleCanExport(rootInputFilePathsForModule, lookup, request, exportName) {
|
|
129
|
+
const closure = bfsClosure(rootInputFilePathsForModule.map(function (inputFilePath) {
|
|
130
|
+
return { inputFilePath, exportName };
|
|
131
|
+
}), function (state) {
|
|
132
|
+
return exportedStateNames(lookup, state);
|
|
133
|
+
}, new Set(), { dependencies: exportClosureDependencies, maximumNodeCount: lookup.contentBySourcePath.size });
|
|
134
|
+
return Array.from(closure).some(function (state) {
|
|
135
|
+
return inputFilePathForState(state) === request.inputFilePath;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function publicModuleReachesSourceFile(rootInputFilePathsForModule, lookup, request) {
|
|
139
|
+
const closure = bfsClosure(rootInputFilePathsForModule, function (inputFilePath) {
|
|
140
|
+
const content = lookup.contentBySourcePath.get(inputFilePath);
|
|
141
|
+
return content === undefined
|
|
142
|
+
? new Array()
|
|
143
|
+
: exportDeclarations(content.fileDescription.content).flatMap(function (declaration) {
|
|
144
|
+
return declarationInputFilePaths(lookup, content.fileDescription.targetFilePath, declaration);
|
|
145
|
+
});
|
|
146
|
+
}, new Set(), { dependencies: pathClosureDependencies, maximumNodeCount: lookup.contentBySourcePath.size });
|
|
147
|
+
return closure.has(request.inputFilePath);
|
|
148
|
+
}
|
|
149
|
+
function publicModuleCanSatisfyRequest(rootInputFilePathsForModule, lookup, request) {
|
|
150
|
+
if (request.requiredExportNames.size === 0 && !request.requiresNamespaceExport) {
|
|
151
|
+
return publicModuleReachesSourceFile(rootInputFilePathsForModule, lookup, request);
|
|
152
|
+
}
|
|
153
|
+
for (const exportName of request.requiredExportNames) {
|
|
154
|
+
if (!publicModuleCanExport(rootInputFilePathsForModule, lookup, request, exportName)) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (!request.requiresNamespaceExport) {
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
return publicModuleCanExport(rootInputFilePathsForModule, lookup, request, undefined);
|
|
162
|
+
}
|
|
163
|
+
function shortestSpecifier(specifiers) {
|
|
164
|
+
const [specifier] = specifiers.toSorted(function (left, right) {
|
|
165
|
+
return left.length - right.length;
|
|
166
|
+
});
|
|
167
|
+
return specifier;
|
|
168
|
+
}
|
|
169
|
+
function getExplicitPublicModuleSpecifierForSourcePath(bundle, surface, request) {
|
|
170
|
+
const lookup = createContentLookup(bundle);
|
|
171
|
+
const specifiers = [];
|
|
172
|
+
const moduleEntries = surface.packageInterface.modules ?? [];
|
|
173
|
+
for (const moduleEntry of moduleEntries) {
|
|
174
|
+
const root = getRoot(bundle, moduleEntry.root);
|
|
175
|
+
const rootPaths = rootInputFilePaths(root);
|
|
176
|
+
const candidate = toPackageSpecifier(bundle.name, moduleEntry.export);
|
|
177
|
+
if (publicModuleCanSatisfyRequest(rootPaths, lookup, request)) {
|
|
178
|
+
specifiers.push(candidate);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return shortestSpecifier(specifiers);
|
|
182
|
+
}
|
|
183
|
+
function getImplicitPublicModuleSpecifierForSourcePath(bundle, surface, request) {
|
|
184
|
+
const lookup = createContentLookup(bundle);
|
|
185
|
+
const specifiers = [];
|
|
186
|
+
const defaultRoot = getRoot(bundle, surface.defaultModuleRoot);
|
|
187
|
+
if (publicModuleCanSatisfyRequest(rootInputFilePaths(defaultRoot), lookup, request)) {
|
|
188
|
+
specifiers.push(bundle.name);
|
|
189
|
+
}
|
|
190
|
+
for (const root of Object.values(bundle.roots)) {
|
|
191
|
+
const candidate = toPackageSpecifier(bundle.name, `./${root.js.targetFilePath}`);
|
|
192
|
+
if (publicModuleCanSatisfyRequest(rootInputFilePaths(root), lookup, request)) {
|
|
193
|
+
specifiers.push(candidate);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return shortestSpecifier(specifiers) ?? getPublicModuleSpecifierForSourcePath(bundle, request.inputFilePath);
|
|
197
|
+
}
|
|
198
|
+
function getExistingPublicModuleSpecifierForSourcePath(bundle, request) {
|
|
199
|
+
const { surface } = bundle;
|
|
200
|
+
if (surface.mode === 'implicit') {
|
|
201
|
+
return getImplicitPublicModuleSpecifierForSourcePath(bundle, surface, request);
|
|
202
|
+
}
|
|
203
|
+
return getExplicitPublicModuleSpecifierForSourcePath(bundle, surface, request);
|
|
204
|
+
}
|
|
205
|
+
function findReplacementInBundles(request, bundles, getTargetPath) {
|
|
206
|
+
for (const bundle of bundles) {
|
|
207
|
+
const targetPath = getTargetPath(bundle, request);
|
|
208
|
+
if (targetPath !== undefined) {
|
|
209
|
+
return {
|
|
210
|
+
bundle,
|
|
211
|
+
replacement: {
|
|
212
|
+
emittedSpecifier: targetPath,
|
|
213
|
+
packageName: bundle.name
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
if (needsImportReplacement(request.inputFilePath) && ownsSourcePath(request.inputFilePath, bundle)) {
|
|
218
|
+
throw new Error(`Package "${bundle.name}" does not expose "${request.inputFilePath}" for cross-package substitution`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return undefined;
|
|
222
|
+
}
|
|
223
|
+
function findReplacement(request, bundleDependencies, bundlePeerDependencies) {
|
|
224
|
+
const dependencyReplacement = findReplacementInBundles(request, bundleDependencies, function (bundle, replacementRequest) {
|
|
225
|
+
return getPublicModuleSpecifierForSourcePath(bundle, replacementRequest.inputFilePath);
|
|
226
|
+
});
|
|
227
|
+
if (dependencyReplacement !== undefined) {
|
|
228
|
+
return dependencyReplacement;
|
|
229
|
+
}
|
|
230
|
+
return findReplacementInBundles(request, bundlePeerDependencies, getExistingPublicModuleSpecifierForSourcePath);
|
|
231
|
+
}
|
|
232
|
+
function withSubstitutedSourcePath(substitutedInputFilePathsByPackageName, packageName, file) {
|
|
233
|
+
const existing = substitutedInputFilePathsByPackageName.get(packageName) ?? [];
|
|
234
|
+
const updated = new Map(substitutedInputFilePathsByPackageName);
|
|
235
|
+
updated.set(packageName, new Set([...existing, file]));
|
|
236
|
+
return updated;
|
|
237
|
+
}
|
|
238
|
+
function contentWithInputFilePath(bundle, inputFilePath) {
|
|
239
|
+
return bundle.contents.find(function (content) {
|
|
240
|
+
return content.fileDescription.inputFilePath === inputFilePath;
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
function runtimeInputFilePathForDeclaration(bundle, declarationContent) {
|
|
244
|
+
const runtimeContent = bundle.contents.find(function (content) {
|
|
245
|
+
return declarationCompanionCandidates(content.fileDescription.targetFilePath)
|
|
246
|
+
.includes(declarationContent.fileDescription.targetFilePath);
|
|
247
|
+
});
|
|
248
|
+
return runtimeContent?.fileDescription.inputFilePath;
|
|
249
|
+
}
|
|
250
|
+
function substitutedInputFilePathsFor(bundle, file) {
|
|
251
|
+
const content = contentWithInputFilePath(bundle, file);
|
|
252
|
+
if (content === undefined || !isDeclarationCompanionFilePath(content.fileDescription.targetFilePath)) {
|
|
253
|
+
return declarationCompanionCandidates(file).length === 0
|
|
254
|
+
? []
|
|
255
|
+
: [
|
|
256
|
+
file
|
|
257
|
+
];
|
|
258
|
+
}
|
|
259
|
+
const runtimeInputFilePath = runtimeInputFilePathForDeclaration(bundle, content);
|
|
260
|
+
if (runtimeInputFilePath === undefined) {
|
|
261
|
+
return [
|
|
262
|
+
file
|
|
263
|
+
];
|
|
264
|
+
}
|
|
265
|
+
return [
|
|
266
|
+
runtimeInputFilePath,
|
|
267
|
+
file
|
|
268
|
+
];
|
|
269
|
+
}
|
|
270
|
+
function withSubstitutedSourcePaths(substitutedInputFilePathsByPackageName, match, request) {
|
|
271
|
+
let updated = substitutedInputFilePathsByPackageName;
|
|
272
|
+
for (const inputFilePath of substitutedInputFilePathsFor(match.bundle, request.inputFilePath)) {
|
|
273
|
+
updated = withSubstitutedSourcePath(updated, match.replacement.packageName, inputFilePath);
|
|
274
|
+
}
|
|
275
|
+
return updated;
|
|
276
|
+
}
|
|
277
|
+
export function findAllPathReplacements(requests, bundleDependencies, bundlePeerDependencies) {
|
|
278
|
+
const importPathReplacements = new Map();
|
|
279
|
+
const matchedBundleDependencies = [];
|
|
280
|
+
let substitutedInputFilePathsByPackageName = new Map();
|
|
281
|
+
function recordReplacement(match, request) {
|
|
282
|
+
importPathReplacements.set(request.inputFilePath, match.replacement);
|
|
283
|
+
matchedBundleDependencies.push(match.replacement.packageName);
|
|
284
|
+
substitutedInputFilePathsByPackageName = withSubstitutedSourcePaths(substitutedInputFilePathsByPackageName, match, request);
|
|
285
|
+
}
|
|
286
|
+
for (const request of requests) {
|
|
287
|
+
const replacement = findReplacement(request, bundleDependencies, bundlePeerDependencies);
|
|
288
|
+
if (replacement !== undefined) {
|
|
289
|
+
recordReplacement(replacement, request);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return {
|
|
293
|
+
importPathReplacements,
|
|
294
|
+
bundleDependencies: matchedBundleDependencies,
|
|
295
|
+
substitutedInputFilePathsByPackageName
|
|
296
|
+
};
|
|
297
|
+
}
|
|
9
298
|
//# sourceMappingURL=replacement-lookup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replacement-lookup.js","sourceRoot":"","sources":["../../../../source/linker/replacement-lookup.ts"],"names":[],"mappings":"AAAA,OAAiB,WAAW,CAAC;AAC7B,OAAiC,UAAU,CAAC;AAC5C,OAGO,0CAA0C,CAAC;AAClD,OAAwD,qDAAqD,CAAC;AAE9G,OAAmC,6CAA6C,CAAC;AACjF,OAAsD,yCAAyC,CAAC;AAChG,OAAwB,qCAAqC,CAAC;AAC9D,OAAmC,wCAAwC,CAAC"}
|
|
1
|
+
{"version":3,"file":"replacement-lookup.js","sourceRoot":"","sources":["../../../../source/linker/replacement-lookup.ts"],"names":[],"mappings":"AAAA,OA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AAa,CAAC,EAAE,CAAC;QAC5F,OAAO,GAAG,yBAAyB,CAAC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAC/F,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,uBAAuB,CACnC,QAAiD,EACjD,kBAAuD,EACvD,sBAA2D;IAE3D,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAiC,CAAC;IACxE,MAAM,yBAAyB,GAAa,EAAE,CAAC;IAC/C,IAAI,sCAAsC,GAA6C,IAAI,GAAG,EAAE,CAAC;IAEjG,SAAS,iBAAiB,CAAC,KAAuB,EAAE,OAAqC;QACrF,sBAAsB,CAAC,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QACrE,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAC9D,sCAAsC,GAAG,0BAA0B,CAC/D,sCAAsC,EACtC,KAAK,EACL,OAAO,CACV,CAAC;IACN,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,CAAC,CAAC;QACzF,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC5B,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;IACL,CAAC;IAED,OAAO;QACH,sBAAsB;QACtB,kBAAkB,EAAE,yBAAyB;QAC7C,sCAAsC;KACzC,CAAC;AACN,CAAC"}
|
package/linker/resource-graph.js
CHANGED
|
@@ -1,3 +1,66 @@
|
|
|
1
|
-
import 'remeda';
|
|
2
|
-
import "../directed-graph/graph.js";
|
|
1
|
+
import { flatMap, pipe } from 'remeda';
|
|
2
|
+
import { createDirectedGraph } from "../directed-graph/graph.js";
|
|
3
|
+
function collectResourceSpecificExternalDependencies(resource, externalDependencies) {
|
|
4
|
+
return pipe(Array.from(externalDependencies.values()), flatMap(function (dependency) {
|
|
5
|
+
const references = dependency.references?.filter(function (reference) {
|
|
6
|
+
return reference.targetFilePath === resource.fileDescription.targetFilePath;
|
|
7
|
+
});
|
|
8
|
+
if (references !== undefined) {
|
|
9
|
+
return references.map(function (reference) {
|
|
10
|
+
return {
|
|
11
|
+
name: dependency.name,
|
|
12
|
+
sourceSpecifier: reference.sourceSpecifier,
|
|
13
|
+
emittedSpecifier: reference.emittedSpecifier
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
if (dependency.referencedFrom.includes(resource.fileDescription.targetFilePath)) {
|
|
18
|
+
return [{
|
|
19
|
+
name: dependency.name,
|
|
20
|
+
sourceSpecifier: dependency.name,
|
|
21
|
+
emittedSpecifier: dependency.name
|
|
22
|
+
}];
|
|
23
|
+
}
|
|
24
|
+
return [];
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
function targetPathIndexes(bundle) {
|
|
28
|
+
const inputFilePathByTargetFilePath = new Map();
|
|
29
|
+
const targetFilePathByInputFilePath = new Map();
|
|
30
|
+
for (const resource of bundle.contents) {
|
|
31
|
+
inputFilePathByTargetFilePath.set(resource.fileDescription.targetFilePath, resource.fileDescription.inputFilePath);
|
|
32
|
+
targetFilePathByInputFilePath.set(resource.fileDescription.inputFilePath, resource.fileDescription.targetFilePath);
|
|
33
|
+
}
|
|
34
|
+
return { inputFilePathByTargetFilePath, targetFilePathByInputFilePath };
|
|
35
|
+
}
|
|
36
|
+
function addResourceNodes(graph, bundle) {
|
|
37
|
+
for (const resource of bundle.contents) {
|
|
38
|
+
const externalDependencies = collectResourceSpecificExternalDependencies(resource, bundle.externalDependencies);
|
|
39
|
+
graph.addNode(resource.fileDescription.inputFilePath, {
|
|
40
|
+
fileDescription: resource.fileDescription,
|
|
41
|
+
moduleReferences: resource.moduleReferences,
|
|
42
|
+
externalDependencies,
|
|
43
|
+
project: resource.project,
|
|
44
|
+
isExplicitlyIncluded: resource.isExplicitlyIncluded,
|
|
45
|
+
...resource.isGeneratedManifest ? { isGeneratedManifest: true } : {}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function connectDirectDependencies(graph, bundle) {
|
|
50
|
+
for (const resource of bundle.contents) {
|
|
51
|
+
for (const directDependency of resource.directDependencies) {
|
|
52
|
+
const inputFilePath = graph.inputFilePathByTargetFilePath.get(directDependency);
|
|
53
|
+
if (inputFilePath !== undefined) {
|
|
54
|
+
graph.connect({ from: resource.fileDescription.inputFilePath, to: inputFilePath });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export function createGraphFromResolvedBundle(bundle) {
|
|
60
|
+
const indexes = targetPathIndexes(bundle);
|
|
61
|
+
const graph = Object.assign(createDirectedGraph(), indexes);
|
|
62
|
+
addResourceNodes(graph, bundle);
|
|
63
|
+
connectDirectDependencies(graph, bundle);
|
|
64
|
+
return graph;
|
|
65
|
+
}
|
|
3
66
|
//# sourceMappingURL=resource-graph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-graph.js","sourceRoot":"","sources":["../../../../source/linker/resource-graph.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"resource-graph.js","sourceRoot":"","sources":["../../../../source/linker/resource-graph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAKvC,OAAO,EAAsB,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAkBrF,SAAS,2CAA2C,CAChD,QAAwB,EACxB,oBAA0C;IAE1C,OAAO,IAAI,CACP,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,EACzC,OAAO,CAAC,UAAU,UAAU;QACxB,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC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,KAAK,EAAE,MAAM,CAAC,CAAC;IAChC,yBAAyB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAEzC,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
|
@@ -1,4 +1,81 @@
|
|
|
1
|
-
import "../../dead-code-eliminator/transform/line-index.js";
|
|
2
|
-
import "../../dependency-scanner/source-file-references.js";
|
|
3
|
-
import "../../dependency-scanner/typescript-
|
|
1
|
+
import { buildLineIndex } from "../../dead-code-eliminator/transform/line-index.js";
|
|
2
|
+
import { getModuleReferenceLiterals } from "../../dependency-scanner/source-file-references.js";
|
|
3
|
+
import { resolveTypescriptModuleFilePath } from "../../dependency-scanner/typescript-module-resolution.js";
|
|
4
|
+
function collectImportPathEdits(sourceFile, replacements) {
|
|
5
|
+
const edits = [];
|
|
6
|
+
const literals = getModuleReferenceLiterals(sourceFile);
|
|
7
|
+
for (const literal of literals) {
|
|
8
|
+
const resolvedFilePath = resolveTypescriptModuleFilePath({
|
|
9
|
+
moduleSpecifier: literal.getLiteralValue(),
|
|
10
|
+
containingSourceFile: sourceFile,
|
|
11
|
+
resolutionMode: 'type'
|
|
12
|
+
});
|
|
13
|
+
if (resolvedFilePath !== undefined) {
|
|
14
|
+
const replacement = replacements.get(resolvedFilePath);
|
|
15
|
+
if (replacement !== undefined) {
|
|
16
|
+
edits.push({
|
|
17
|
+
start: literal.getStart() + 1,
|
|
18
|
+
end: literal.getEnd() - 1,
|
|
19
|
+
reference: {
|
|
20
|
+
name: replacement.packageName,
|
|
21
|
+
sourceSpecifier: literal.getLiteralValue(),
|
|
22
|
+
emittedSpecifier: replacement.emittedSpecifier
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return edits.toSorted(function (left, right) {
|
|
29
|
+
return left.start - right.start;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function applyEdits(sourceContent, edits) {
|
|
33
|
+
let content = '';
|
|
34
|
+
let originalOffset = 0;
|
|
35
|
+
const atoms = [];
|
|
36
|
+
function appendEdit(edit) {
|
|
37
|
+
const newStart = content.length;
|
|
38
|
+
content += sourceContent.slice(originalOffset, edit.start) + edit.reference.emittedSpecifier;
|
|
39
|
+
atoms.push({ originalStart: originalOffset, originalEnd: edit.start, newStart });
|
|
40
|
+
originalOffset = edit.end;
|
|
41
|
+
}
|
|
42
|
+
function appendTail() {
|
|
43
|
+
const tailStart = content.length;
|
|
44
|
+
content += sourceContent.slice(originalOffset);
|
|
45
|
+
atoms.push({
|
|
46
|
+
originalStart: originalOffset,
|
|
47
|
+
originalEnd: sourceContent.length,
|
|
48
|
+
newStart: tailStart
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
for (const edit of edits) {
|
|
52
|
+
appendEdit(edit);
|
|
53
|
+
}
|
|
54
|
+
appendTail();
|
|
55
|
+
return {
|
|
56
|
+
content,
|
|
57
|
+
dependencyReferences: edits.map(function (edit) {
|
|
58
|
+
return edit.reference;
|
|
59
|
+
}),
|
|
60
|
+
sourceMapTransform: {
|
|
61
|
+
originalLineIndex: buildLineIndex(sourceContent),
|
|
62
|
+
transformedLineIndex: buildLineIndex(content),
|
|
63
|
+
atoms
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export function replaceImportPathsWithTransform(project, inputFilePath, sourceContent, replacements) {
|
|
68
|
+
if (project === undefined) {
|
|
69
|
+
return { content: sourceContent, dependencyReferences: [], sourceMapTransform: undefined };
|
|
70
|
+
}
|
|
71
|
+
const sourceFile = project.getSourceFile(inputFilePath);
|
|
72
|
+
if (sourceFile === undefined) {
|
|
73
|
+
return { content: sourceContent, dependencyReferences: [], sourceMapTransform: undefined };
|
|
74
|
+
}
|
|
75
|
+
const edits = collectImportPathEdits(sourceFile, replacements);
|
|
76
|
+
if (edits.length === 0) {
|
|
77
|
+
return { content: sourceContent, dependencyReferences: [], sourceMapTransform: undefined };
|
|
78
|
+
}
|
|
79
|
+
return applyEdits(sourceContent, edits);
|
|
80
|
+
}
|
|
4
81
|
//# sourceMappingURL=import-paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-paths.js","sourceRoot":"","sources":["../../../../../source/linker/source-modifier/import-paths.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"import-paths.js","sourceRoot":"","sources":["../../../../../source/linker/source-modifier/import-paths.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AAEpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAChG,OAAO,EAAE,+BAA+B,EAAE,MAAM,0DAA0D,CAAC;AAuB3G,SAAS,sBAAsB,CAAC,UAAsB,EAAE,YAA0B;IAC9E,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,0BAA0B,CAAC,UAAU,CAAC,CAAC;IACxD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC7B,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;YACrD,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE;YAC1C,oBAAoB,EAAE,UAAU;YAChC,cAAc,EAAE,MAAM;SACzB,CAAC,CAAC;QACH,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,WAAW,GAAG,YAAY,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;YACvD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;gBAC5B,KAAK,CAAC,IAAI,CAAC;oBACP,KAAK,EAAE,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;oBAC7B,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;oBACzB,SAAS,EAAE;wBACP,IAAI,EAAE,WAAW,CAAC,WAAW;wBAC7B,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE;wBAC1C,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;qBACjD;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