packtory 0.0.8 → 0.0.9
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.d.ts +7 -5
- package/artifacts/artifacts-builder.d.ts.map +1 -1
- package/artifacts/artifacts-builder.js +47 -18
- package/artifacts/artifacts-builder.js.map +1 -1
- package/bundle-emitter/emitter.d.ts +12 -2
- package/bundle-emitter/emitter.d.ts.map +1 -1
- package/bundle-emitter/emitter.js +11 -6
- package/bundle-emitter/emitter.js.map +1 -1
- package/bundle-emitter/extract-package-tarball.js +1 -2
- package/bundle-emitter/extract-package-tarball.js.map +1 -1
- package/bundle-emitter/publish-settings-bridge.js +133 -0
- package/bundle-emitter/publish-settings-bridge.js.map +1 -0
- package/bundle-emitter/registry-client.d.ts +13 -6
- package/bundle-emitter/registry-client.d.ts.map +1 -1
- package/bundle-emitter/registry-client.js +217 -45
- package/bundle-emitter/registry-client.js.map +1 -1
- package/bundle-emitter/repository-coherence.js +54 -0
- package/bundle-emitter/repository-coherence.js.map +1 -0
- package/bundle-emitter/repository-url-normalizer.js +38 -0
- package/bundle-emitter/repository-url-normalizer.js.map +1 -0
- package/checks/check-runner.js +3 -9
- package/checks/check-runner.js.map +1 -1
- package/checks/rule.js +13 -0
- package/checks/rule.js.map +1 -0
- package/checks/rules/max-bundle-size.js +44 -0
- package/checks/rules/max-bundle-size.js.map +1 -0
- package/checks/rules/no-dev-dependency-imports.js +37 -0
- package/checks/rules/no-dev-dependency-imports.js.map +1 -0
- package/checks/rules/no-duplicated-files.js +102 -27
- package/checks/rules/no-duplicated-files.js.map +1 -1
- package/checks/rules/no-side-effects.js +51 -0
- package/checks/rules/no-side-effects.js.map +1 -0
- package/checks/rules/no-unused-bundle-dependencies.js +33 -0
- package/checks/rules/no-unused-bundle-dependencies.js.map +1 -0
- package/checks/rules/registry.js +17 -0
- package/checks/rules/registry.js.map +1 -0
- package/checks/rules/required-files.js +41 -0
- package/checks/rules/required-files.js.map +1 -0
- package/checks/rules/unique-target-paths.js +34 -0
- package/checks/rules/unique-target-paths.js.map +1 -0
- package/common/clock.d.ts +7 -0
- package/common/clock.d.ts.map +1 -0
- package/common/clock.js +11 -0
- package/common/clock.js.map +1 -0
- package/common/code-files.js +5 -0
- package/common/code-files.js.map +1 -0
- package/config/additional-package-json-attributes-schema.js +7 -0
- package/config/additional-package-json-attributes-schema.js.map +1 -0
- package/config/automatic-versioning-settings.js +7 -0
- package/config/automatic-versioning-settings.js.map +1 -0
- package/config/checks-schema.d.ts +74 -0
- package/config/checks-schema.d.ts.map +1 -0
- package/config/checks-schema.js +27 -0
- package/config/checks-schema.js.map +1 -0
- package/config/common-package-settings-schemas.js +20 -0
- package/config/common-package-settings-schemas.js.map +1 -0
- package/config/config.d.ts +16 -704
- package/config/config.d.ts.map +1 -1
- package/config/config.js +3 -71
- package/config/config.js.map +1 -1
- package/config/dead-code-elimination-settings.d.ts +6 -0
- package/config/dead-code-elimination-settings.d.ts.map +1 -0
- package/config/dead-code-elimination-settings.js +5 -0
- package/config/dead-code-elimination-settings.js.map +1 -0
- package/config/dependency-policy.d.ts +6 -0
- package/config/dependency-policy.d.ts.map +1 -0
- package/config/dependency-policy.js +6 -0
- package/config/dependency-policy.js.map +1 -0
- package/config/main-package-json-schema.js +14 -0
- package/config/main-package-json-schema.js.map +1 -0
- package/config/manual-versioning-settings.js +7 -0
- package/config/manual-versioning-settings.js.map +1 -0
- package/config/optional-package-settings-schema.js +15 -0
- package/config/optional-package-settings-schema.js.map +1 -0
- package/config/package-config.d.ts +49 -0
- package/config/package-config.d.ts.map +1 -0
- package/config/package-config.js +7 -0
- package/config/package-config.js.map +1 -0
- package/config/package-interface.d.ts +34 -0
- package/config/package-interface.d.ts.map +1 -0
- package/config/package-interface.js +26 -0
- package/config/package-interface.js.map +1 -0
- package/config/package-json.d.ts +11 -10
- package/config/package-json.d.ts.map +1 -1
- package/config/package-json.js +11 -19
- package/config/package-json.js.map +1 -1
- package/config/package-schemas.js +10 -0
- package/config/package-schemas.js.map +1 -0
- package/config/packtory-config-schema.js +7 -0
- package/config/packtory-config-schema.js.map +1 -0
- package/config/packtory-config-without-registry-schema.js +32 -0
- package/config/packtory-config-without-registry-schema.js.map +1 -0
- package/config/per-package-settings-schema.js +22 -0
- package/config/per-package-settings-schema.js.map +1 -0
- package/config/publish-settings.d.ts +22 -0
- package/config/publish-settings.d.ts.map +1 -0
- package/config/publish-settings.js +26 -0
- package/config/publish-settings.js.map +1 -0
- package/config/publish-settings.report.js +17 -0
- package/config/publish-settings.report.js.map +1 -0
- package/config/registry-settings.d.ts +83 -1
- package/config/registry-settings.d.ts.map +1 -1
- package/config/registry-settings.js +35 -1
- package/config/registry-settings.js.map +1 -1
- package/config/registry-settings.report.js +41 -0
- package/config/registry-settings.report.js.map +1 -0
- package/config/root.d.ts +7 -0
- package/config/root.d.ts.map +1 -0
- package/config/{entry-point.js → root.js} +2 -2
- package/config/root.js.map +1 -0
- package/config/sbom-settings.js +5 -0
- package/config/sbom-settings.js.map +1 -0
- package/config/validation.d.ts +2 -2
- package/config/validation.d.ts.map +1 -1
- package/config/validation.js +155 -37
- package/config/validation.js.map +1 -1
- package/config/versioning-settings.d.ts.map +1 -1
- package/config/versioning-settings.js +2 -9
- package/config/versioning-settings.js.map +1 -1
- package/dead-code-eliminator/analyzed-bundle.d.ts +27 -0
- package/dead-code-eliminator/analyzed-bundle.d.ts.map +1 -0
- package/dead-code-eliminator/analyzed-bundle.js +8 -0
- package/dead-code-eliminator/analyzed-bundle.js.map +1 -0
- package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js +126 -0
- package/dead-code-eliminator/cross-bundle/cross-bundle-seeds.js.map +1 -0
- package/dead-code-eliminator/elimination-emitter.js +53 -0
- package/dead-code-eliminator/elimination-emitter.js.map +1 -0
- package/dead-code-eliminator/eliminator.js +141 -0
- package/dead-code-eliminator/eliminator.js.map +1 -0
- package/dead-code-eliminator/load-bundle.js +52 -0
- package/dead-code-eliminator/load-bundle.js.map +1 -0
- package/dead-code-eliminator/reachability/binding-extractor.js +88 -0
- package/dead-code-eliminator/reachability/binding-extractor.js.map +1 -0
- package/dead-code-eliminator/reachability/impure-statements.js +12 -0
- package/dead-code-eliminator/reachability/impure-statements.js.map +1 -0
- package/dead-code-eliminator/reachability/reachability.js +141 -0
- package/dead-code-eliminator/reachability/reachability.js.map +1 -0
- package/dead-code-eliminator/side-effect-classifier.js +289 -0
- package/dead-code-eliminator/side-effect-classifier.js.map +1 -0
- package/dead-code-eliminator/side-effects-field.js +25 -0
- package/dead-code-eliminator/side-effects-field.js.map +1 -0
- package/dead-code-eliminator/transform/atom-translator.js +13 -0
- package/dead-code-eliminator/transform/atom-translator.js.map +1 -0
- package/dead-code-eliminator/transform/declaration-remover.js +92 -0
- package/dead-code-eliminator/transform/declaration-remover.js.map +1 -0
- package/dead-code-eliminator/transform/line-index.js +27 -0
- package/dead-code-eliminator/transform/line-index.js.map +1 -0
- package/dead-code-eliminator/transform/source-map-composer.js +68 -0
- package/dead-code-eliminator/transform/source-map-composer.js.map +1 -0
- package/dependency-scanner/dependency-graph.d.ts +1 -1
- package/dependency-scanner/dependency-graph.d.ts.map +1 -1
- package/dependency-scanner/dependency-graph.js +5 -7
- package/dependency-scanner/dependency-graph.js.map +1 -1
- package/dependency-scanner/external-dependencies.js +2 -2
- package/dependency-scanner/external-dependencies.js.map +1 -1
- package/dependency-scanner/scanner.d.ts +7 -7
- package/dependency-scanner/scanner.d.ts.map +1 -1
- package/dependency-scanner/scanner.js +9 -14
- package/dependency-scanner/scanner.js.map +1 -1
- package/dependency-scanner/source-file-references.js +3 -48
- package/dependency-scanner/source-file-references.js.map +1 -1
- package/dependency-scanner/source-map-file-locator.d.ts.map +1 -1
- package/dependency-scanner/source-map-file-locator.js +10 -3
- package/dependency-scanner/source-map-file-locator.js.map +1 -1
- package/dependency-scanner/typescript-file-host.d.ts +2 -0
- package/dependency-scanner/typescript-file-host.d.ts.map +1 -1
- package/dependency-scanner/typescript-file-host.js +99 -32
- package/dependency-scanner/typescript-file-host.js.map +1 -1
- package/dependency-scanner/typescript-project-analyzer.d.ts +4 -5
- package/dependency-scanner/typescript-project-analyzer.d.ts.map +1 -1
- package/dependency-scanner/typescript-project-analyzer.js +5 -17
- package/dependency-scanner/typescript-project-analyzer.js.map +1 -1
- package/directed-graph/graph.d.ts +1 -1
- package/directed-graph/graph.d.ts.map +1 -1
- package/directed-graph/graph.js +132 -97
- package/directed-graph/graph.js.map +1 -1
- package/file-manager/compare.js +11 -9
- package/file-manager/compare.js.map +1 -1
- package/file-manager/file-manager.d.ts +1 -1
- package/file-manager/file-manager.d.ts.map +1 -1
- package/file-manager/file-manager.js +7 -1
- package/file-manager/file-manager.js.map +1 -1
- package/file-manager/permissions.js +20 -6
- package/file-manager/permissions.js.map +1 -1
- package/linker/linked-bundle.d.ts +5 -3
- package/linker/linked-bundle.d.ts.map +1 -1
- package/linker/linker.d.ts.map +1 -1
- package/linker/linker.js +8 -7
- package/linker/linker.js.map +1 -1
- package/linker/resource-graph.js +5 -8
- package/linker/resource-graph.js.map +1 -1
- package/linker/source-modifier/import-paths.js +1 -12
- package/linker/source-modifier/import-paths.js.map +1 -1
- package/linker/substitute-bundles.js +55 -48
- package/linker/substitute-bundles.js.map +1 -1
- package/linker/substituted-resource-graph.js +5 -8
- package/linker/substituted-resource-graph.js.map +1 -1
- package/npm-oidc-id-token-resolver.js +56 -0
- package/npm-oidc-id-token-resolver.js.map +1 -0
- package/package-surface/modules.js +307 -0
- package/package-surface/modules.js.map +1 -0
- package/package-surface/public-module-usage.js +37 -0
- package/package-surface/public-module-usage.js.map +1 -0
- package/package-surface/surface.d.ts +14 -0
- package/package-surface/surface.d.ts.map +1 -0
- package/package-surface/surface.js +16 -0
- package/package-surface/surface.js.map +1 -0
- package/package.json +13 -9
- package/packages/package-processor.composition.js +127 -0
- package/packages/package-processor.composition.js.map +1 -0
- package/packages/packtory/packtory.entry-point.d.ts +10 -5
- package/packages/packtory/packtory.entry-point.d.ts.map +1 -1
- package/packages/packtory/packtory.entry-point.js +7 -43
- package/packages/packtory/packtory.entry-point.js.map +1 -1
- package/packtory/map-config.d.ts +7 -16
- package/packtory/map-config.d.ts.map +1 -1
- package/packtory/map-config.js +5 -60
- package/packtory/map-config.js.map +1 -1
- package/packtory/normalize-paths.js +2 -2
- package/packtory/normalize-paths.js.map +1 -1
- package/packtory/package-processor-build.js +75 -0
- package/packtory/package-processor-build.js.map +1 -0
- package/packtory/package-processor-publish.d.ts +29 -0
- package/packtory/package-processor-publish.d.ts.map +1 -0
- package/packtory/package-processor-publish.js +134 -0
- package/packtory/package-processor-publish.js.map +1 -0
- package/packtory/package-processor.d.ts +17 -21
- package/packtory/package-processor.d.ts.map +1 -1
- package/packtory/package-processor.js +6 -81
- package/packtory/package-processor.js.map +1 -1
- package/packtory/packtory-publish.js +66 -0
- package/packtory/packtory-publish.js.map +1 -0
- package/packtory/packtory-resolve.js +77 -0
- package/packtory/packtory-resolve.js.map +1 -0
- package/packtory/packtory-results.d.ts +47 -0
- package/packtory/packtory-results.d.ts.map +1 -0
- package/packtory/packtory-results.js +16 -0
- package/packtory/packtory-results.js.map +1 -0
- package/packtory/packtory.d.ts +16 -37
- package/packtory/packtory.d.ts.map +1 -1
- package/packtory/packtory.js +33 -114
- package/packtory/packtory.js.map +1 -1
- package/packtory/prepare-package-options.d.ts +28 -0
- package/packtory/prepare-package-options.d.ts.map +1 -0
- package/packtory/prepare-package-options.js +122 -0
- package/packtory/prepare-package-options.js.map +1 -0
- package/packtory/report-attachment.js +25 -0
- package/packtory/report-attachment.js.map +1 -0
- package/packtory/resolved-package.d.ts +17 -0
- package/packtory/resolved-package.d.ts.map +1 -0
- package/packtory/resolved-package.js +35 -0
- package/packtory/resolved-package.js.map +1 -0
- package/packtory/scheduler.d.ts.map +1 -1
- package/packtory/scheduler.js +17 -15
- package/packtory/scheduler.js.map +1 -1
- package/progress/progress-broadcaster.d.ts +128 -5
- package/progress/progress-broadcaster.d.ts.map +1 -1
- package/progress/progress-broadcaster.js +37 -8
- package/progress/progress-broadcaster.js.map +1 -1
- package/report/artifact-entry-merger.js +22 -0
- package/report/artifact-entry-merger.js.map +1 -0
- package/report/config-redactor.js +27 -0
- package/report/config-redactor.js.map +1 -0
- package/report/decorators.js +68 -0
- package/report/decorators.js.map +1 -0
- package/report/inspectors.js +74 -0
- package/report/inspectors.js.map +1 -0
- package/report/report-aggregator.d.ts +61 -0
- package/report/report-aggregator.d.ts.map +1 -0
- package/report/report-aggregator.js +187 -0
- package/report/report-aggregator.js.map +1 -0
- package/resource-resolver/content.js +14 -0
- package/resource-resolver/content.js.map +1 -1
- package/resource-resolver/resolved-bundle.d.ts +4 -2
- package/resource-resolver/resolved-bundle.d.ts.map +1 -1
- package/resource-resolver/resource-resolve-options.d.ts +12 -5
- package/resource-resolver/resource-resolve-options.d.ts.map +1 -1
- package/resource-resolver/resource-resolve-options.js +14 -0
- package/resource-resolver/resource-resolve-options.js.map +1 -0
- package/resource-resolver/resource-resolver.d.ts +1 -1
- package/resource-resolver/resource-resolver.d.ts.map +1 -1
- package/resource-resolver/resource-resolver.js +37 -22
- package/resource-resolver/resource-resolver.js.map +1 -1
- package/sbom/extract-license.js +12 -0
- package/sbom/extract-license.js.map +1 -0
- package/sbom/license-resolver.d.ts +14 -0
- package/sbom/license-resolver.d.ts.map +1 -0
- package/sbom/license-resolver.js +22 -0
- package/sbom/license-resolver.js.map +1 -0
- package/sbom/sbom-builder.js +68 -0
- package/sbom/sbom-builder.js.map +1 -0
- package/sbom/sbom-file.d.ts +19 -0
- package/sbom/sbom-file.d.ts.map +1 -0
- package/sbom/sbom-file.js +57 -0
- package/sbom/sbom-file.js.map +1 -0
- package/sbom/sbom-serializer.d.ts +6 -0
- package/sbom/sbom-serializer.d.ts.map +1 -0
- package/sbom/sbom-serializer.js +11 -0
- package/sbom/sbom-serializer.js.map +1 -0
- package/sbom/tool-version.js +44 -0
- package/sbom/tool-version.js.map +1 -0
- package/tar/extract-tar.js +28 -3
- package/tar/extract-tar.js.map +1 -1
- package/tar/tarball-builder.d.ts.map +1 -1
- package/tar/tarball-builder.js +10 -7
- package/tar/tarball-builder.js.map +1 -1
- package/version-manager/manager.d.ts +5 -1
- package/version-manager/manager.d.ts.map +1 -1
- package/version-manager/manager.js +9 -1
- package/version-manager/manager.js.map +1 -1
- package/version-manager/manifest/builder.js +52 -6
- package/version-manager/manifest/builder.js.map +1 -1
- package/version-manager/manifest/serialize.js +31 -39
- package/version-manager/manifest/serialize.js.map +1 -1
- package/version-manager/manifest/sort-values.js +17 -0
- package/version-manager/manifest/sort-values.js.map +1 -0
- package/version-manager/specifier-classifier.js +35 -0
- package/version-manager/specifier-classifier.js.map +1 -0
- package/version-manager/specifier-errors.js +44 -0
- package/version-manager/specifier-errors.js.map +1 -0
- package/version-manager/versioned-bundle-dependencies.js +112 -0
- package/version-manager/versioned-bundle-dependencies.js.map +1 -0
- package/version-manager/versioned-bundle-imports.d.ts +5 -0
- package/version-manager/versioned-bundle-imports.d.ts.map +1 -0
- package/version-manager/versioned-bundle-imports.js +75 -0
- package/version-manager/versioned-bundle-imports.js.map +1 -0
- package/version-manager/versioned-bundle.d.ts +16 -8
- package/version-manager/versioned-bundle.d.ts.map +1 -1
- package/version-manager/versioned-bundle.js +48 -62
- package/version-manager/versioned-bundle.js.map +1 -1
- package/config/entry-point.d.ts +0 -7
- package/config/entry-point.d.ts.map +0 -1
- package/config/entry-point.js.map +0 -1
- package/file-manager/sort.js +0 -13
- package/file-manager/sort.js.map +0 -1
- package/list/unique-list.js +0 -5
- package/list/unique-list.js.map +0 -1
- package/version-manager/manifest/builder.d.ts +0 -5
- package/version-manager/manifest/builder.d.ts.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { oneLine } from 'common-tags';
|
|
2
|
+
import { mergeAll } from 'remeda';
|
|
3
|
+
import { classifySpecifier } from "./specifier-classifier.js";
|
|
4
|
+
import { renderMalformedSpecifierMessage, renderMutableSpecifierMessage, renderUnusedAllowListMessage } from "./specifier-errors.js";
|
|
5
|
+
function getVersionFromDependencies(moduleName, mainPackageJson, kind) {
|
|
6
|
+
const dependencies = { ...mainPackageJson[kind] };
|
|
7
|
+
return String(dependencies[moduleName]);
|
|
8
|
+
}
|
|
9
|
+
function findBundleByPackageName(bundles, name) {
|
|
10
|
+
return bundles.find((bundle) => {
|
|
11
|
+
return bundle.name === name;
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function mergeDependencyGroups(...groups) {
|
|
15
|
+
return {
|
|
16
|
+
dependencies: mergeAll(groups.map((group) => {
|
|
17
|
+
return group.dependencies;
|
|
18
|
+
})),
|
|
19
|
+
peerDependencies: mergeAll(groups.map((group) => {
|
|
20
|
+
return group.peerDependencies;
|
|
21
|
+
}))
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function groupBundleDependencies(bundle, bundlePeerDependencies, bundleDependencies) {
|
|
25
|
+
const grouped = { dependencies: {}, peerDependencies: {} };
|
|
26
|
+
for (const dependencyName of bundle.linkedBundleDependencies.keys()) {
|
|
27
|
+
const peerBundle = findBundleByPackageName(bundlePeerDependencies, dependencyName);
|
|
28
|
+
if (peerBundle === undefined) {
|
|
29
|
+
const foundBundle = findBundleByPackageName(bundleDependencies, dependencyName);
|
|
30
|
+
if (foundBundle === undefined) {
|
|
31
|
+
throw new Error(`Couldn’t determine version number of bundle dependency ${dependencyName}`);
|
|
32
|
+
}
|
|
33
|
+
grouped.dependencies[dependencyName] = foundBundle.version;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
grouped.peerDependencies[dependencyName] = peerBundle.version;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return grouped;
|
|
40
|
+
}
|
|
41
|
+
function resolveExternalDependencyEntry(dependencyName, mainPackageJson) {
|
|
42
|
+
const isPeer = mainPackageJson.peerDependencies?.[dependencyName] !== undefined;
|
|
43
|
+
const isDirect = mainPackageJson.dependencies?.[dependencyName] !== undefined;
|
|
44
|
+
if (!isPeer && !isDirect) {
|
|
45
|
+
throw new Error(oneLine `Couldn’t determine version number of ${dependencyName},
|
|
46
|
+
because it is not listed in the main package.json`);
|
|
47
|
+
}
|
|
48
|
+
const kind = isPeer ? 'peerDependencies' : 'dependencies';
|
|
49
|
+
return {
|
|
50
|
+
name: dependencyName,
|
|
51
|
+
version: getVersionFromDependencies(dependencyName, mainPackageJson, kind),
|
|
52
|
+
kind
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function recordClassification(entry, allowMutableSpecifiers, accumulator) {
|
|
56
|
+
const classification = classifySpecifier(entry.name, entry.version);
|
|
57
|
+
if (classification.kind === 'malformed') {
|
|
58
|
+
accumulator.malformedOffenders.push({
|
|
59
|
+
name: entry.name,
|
|
60
|
+
specifier: entry.version,
|
|
61
|
+
reason: classification.reason
|
|
62
|
+
});
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (classification.kind === 'mutable') {
|
|
66
|
+
if (allowMutableSpecifiers.includes(entry.name)) {
|
|
67
|
+
accumulator.usedAllowListEntries.add(entry.name);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
accumulator.mutableOffenders.push({
|
|
71
|
+
name: entry.name,
|
|
72
|
+
specifier: entry.version,
|
|
73
|
+
npaType: classification.npaType
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function throwHighestPriorityFailure(accumulator, allowMutableSpecifiers) {
|
|
79
|
+
if (accumulator.malformedOffenders.length > 0) {
|
|
80
|
+
throw new Error(renderMalformedSpecifierMessage(accumulator.malformedOffenders));
|
|
81
|
+
}
|
|
82
|
+
if (accumulator.mutableOffenders.length > 0) {
|
|
83
|
+
throw new Error(renderMutableSpecifierMessage(accumulator.mutableOffenders));
|
|
84
|
+
}
|
|
85
|
+
const unusedAllowListEntries = allowMutableSpecifiers.filter((entry) => {
|
|
86
|
+
return !accumulator.usedAllowListEntries.has(entry);
|
|
87
|
+
});
|
|
88
|
+
if (unusedAllowListEntries.length > 0) {
|
|
89
|
+
throw new Error(renderUnusedAllowListMessage(unusedAllowListEntries));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function groupExternalDependencies(bundle, mainPackageJson, allowMutableSpecifiers) {
|
|
93
|
+
const grouped = { dependencies: {}, peerDependencies: {} };
|
|
94
|
+
const accumulator = {
|
|
95
|
+
mutableOffenders: [],
|
|
96
|
+
malformedOffenders: [],
|
|
97
|
+
usedAllowListEntries: new Set()
|
|
98
|
+
};
|
|
99
|
+
for (const dependencyName of bundle.externalDependencies.keys()) {
|
|
100
|
+
const entry = resolveExternalDependencyEntry(dependencyName, mainPackageJson);
|
|
101
|
+
recordClassification(entry, allowMutableSpecifiers, accumulator);
|
|
102
|
+
grouped[entry.kind][entry.name] = entry.version;
|
|
103
|
+
}
|
|
104
|
+
throwHighestPriorityFailure(accumulator, allowMutableSpecifiers);
|
|
105
|
+
return grouped;
|
|
106
|
+
}
|
|
107
|
+
export function distributeDependencies(options) {
|
|
108
|
+
const bundleGrouped = groupBundleDependencies(options.bundle, options.bundlePeerDependencies, options.bundleDependencies);
|
|
109
|
+
const externalGrouped = groupExternalDependencies(options.bundle, options.mainPackageJson, options.allowMutableSpecifiers);
|
|
110
|
+
return mergeDependencyGroups(bundleGrouped, externalGrouped);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=versioned-bundle-dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioned-bundle-dependencies.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACH,+BAA+B,EAC/B,6BAA6B,EAC7B,4BAA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,CAC9B,MAAsB,EACtB,eAAgC,EAChC,sBAAyC;IAEzC,MAAM,OAAO,GAAwB,EAAE,YAAY,EAAE,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC;IAChF,MAAM,WAAW,GAAyB;QACtC,gBAAgB,EAAE,EAAE;QACpB,kBAAkB,EAAE,EAAE;QACtB,oBAAoB,EAAE,IAAI,GAAG,EAAU;KAC1C,CAAC;IAEF,KAAK,MAAM,cAAc,IAAI,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,EAAE,CAAC;QAC9D,MAAM,KAAK,GAAG,8BAA8B,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAC9E,oBAAoB,CAAC,KAAK,EAAE,sBAAsB,EAAE,WAAW,CAAC,CAAC;QACjE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;IACpD,CAAC;IAED,2BAA2B,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;IAEjE,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAsC;IACzE,MAAM,aAAa,GAAG,uBAAuB,CACzC,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,sBAAsB,EAC9B,OAAO,CAAC,kBAAkB,CAC7B,CAAC;IACF,MAAM,eAAe,GAAG,yBAAyB,CAC7C,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,sBAAsB,CACjC,CAAC;IACF,OAAO,qBAAqB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AnalyzedBundle } from '../dead-code-eliminator/analyzed-bundle.ts';
|
|
2
|
+
import type { MainPackageJson } from '../config/package-json.ts';
|
|
3
|
+
export type ImportsField = NonNullable<MainPackageJson['imports']>;
|
|
4
|
+
export declare function buildImportsField(bundle: AnalyzedBundle, mainPackageJson: MainPackageJson): ImportsField | undefined;
|
|
5
|
+
//# sourceMappingURL=versioned-bundle-imports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioned-bundle-imports.d.ts","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle-imports.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;AA+FnE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,GAAG,YAAY,GAAG,SAAS,CAQpH"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ts as typescript } from 'ts-morph';
|
|
2
|
+
import { isCodeFile } from "../common/code-files.js";
|
|
3
|
+
function getHashImportSpecifiers(bundle) {
|
|
4
|
+
const importSpecifiers = new Set();
|
|
5
|
+
for (const resource of bundle.contents) {
|
|
6
|
+
const { fileDescription: { targetFilePath, content } } = resource;
|
|
7
|
+
if (isCodeFile(targetFilePath)) {
|
|
8
|
+
const parsedFile = typescript.preProcessFile(content, true);
|
|
9
|
+
for (const literal of parsedFile.importedFiles) {
|
|
10
|
+
const specifier = literal.fileName;
|
|
11
|
+
if (specifier.startsWith('#')) {
|
|
12
|
+
importSpecifiers.add(specifier);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return importSpecifiers;
|
|
18
|
+
}
|
|
19
|
+
function escapeRegExp(value) {
|
|
20
|
+
return value.replaceAll(/[.*+?^${}()|[\]\\]/gu, '\\$&');
|
|
21
|
+
}
|
|
22
|
+
function findMatchingImportEntryKey(specifier, importsField) {
|
|
23
|
+
const matchingKeys = Object.keys(importsField)
|
|
24
|
+
.filter((key) => {
|
|
25
|
+
const wildcardPattern = `^${escapeRegExp(key).replaceAll('\\*', '.*')}$`;
|
|
26
|
+
return new RegExp(wildcardPattern).test(specifier);
|
|
27
|
+
})
|
|
28
|
+
.toSorted((left, right) => {
|
|
29
|
+
if (left === specifier || right === specifier) {
|
|
30
|
+
return left === specifier ? -1 : 1;
|
|
31
|
+
}
|
|
32
|
+
return right.length - left.length;
|
|
33
|
+
});
|
|
34
|
+
return matchingKeys[0];
|
|
35
|
+
}
|
|
36
|
+
function getConfiguredImportsOrThrow(mainPackageJson, referencedSpecifiers) {
|
|
37
|
+
if (mainPackageJson.imports !== undefined) {
|
|
38
|
+
return mainPackageJson.imports;
|
|
39
|
+
}
|
|
40
|
+
const [firstSpecifier] = referencedSpecifiers;
|
|
41
|
+
throw new Error([
|
|
42
|
+
`Found surviving package.json imports specifier "${firstSpecifier}"`,
|
|
43
|
+
'but mainPackageJson.imports is not configured'
|
|
44
|
+
].join(' '));
|
|
45
|
+
}
|
|
46
|
+
function collectReferencedImportsEntries(referencedSpecifiers, configuredImports) {
|
|
47
|
+
const importsField = {};
|
|
48
|
+
for (const specifier of referencedSpecifiers) {
|
|
49
|
+
const matchingKey = findMatchingImportEntryKey(specifier, configuredImports);
|
|
50
|
+
if (matchingKey === undefined) {
|
|
51
|
+
throw new Error([
|
|
52
|
+
`Found surviving package.json imports specifier "${specifier}"`,
|
|
53
|
+
'but no matching mainPackageJson.imports entry'
|
|
54
|
+
].join(' '));
|
|
55
|
+
}
|
|
56
|
+
const matchingImport = configuredImports[matchingKey];
|
|
57
|
+
if (matchingImport === undefined) {
|
|
58
|
+
throw new Error([
|
|
59
|
+
`Found surviving package.json imports specifier "${specifier}"`,
|
|
60
|
+
`but matching mainPackageJson.imports entry "${matchingKey}" is undefined`
|
|
61
|
+
].join(' '));
|
|
62
|
+
}
|
|
63
|
+
importsField[matchingKey] = matchingImport;
|
|
64
|
+
}
|
|
65
|
+
return importsField;
|
|
66
|
+
}
|
|
67
|
+
export function buildImportsField(bundle, mainPackageJson) {
|
|
68
|
+
const referencedSpecifiers = getHashImportSpecifiers(bundle);
|
|
69
|
+
if (referencedSpecifiers.size === 0) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
const configuredImports = getConfiguredImportsOrThrow(mainPackageJson, referencedSpecifiers);
|
|
73
|
+
return collectReferencedImportsEntries(referencedSpecifiers, configuredImports);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=versioned-bundle-imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioned-bundle-imports.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AAI5C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrD,SAAS,uBAAuB,CAAC,MAAsB;IACnD,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE3C,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,EACF,eAAe,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,EAC/C,GAAG,QAAQ,CAAC;QAEb,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YAC7B,MAAM,UAAU,GAAG,UAAU,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC5D,KAAK,MAAM,OAAO,IAAI,UAAU,CAAC,aAAa,EAAE,CAAC;gBAC7C,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;gBACnC,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;oBAC5B,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACpC,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AAED,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AAC;IAEnD,KAAK,MAAM,SAAS,IAAI,oBAAoB,EAAE,CAAC;QAC3C,MAAM,WAAW,GAAG,0BAA0B,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAC7E,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CACX;gBACI,mDAAmD,SAAS,GAAG;gBAC/D,+CAA+C;aAClD,CAAC,IAAI,CAAC,GAAG,CAAC,CACd,CAAC;QACN,CAAC;QAED,MAAM,cAAc,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACtD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CACX;gBACI,mDAAmD,SAAS,GAAG;gBAC/D,+CAA+C,WAAW,gBAAgB;aAC7E,CAAC,IAAI,CAAC,GAAG,CAAC,CACd,CAAC;QACN,CAAC;QAED,YAAY,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC;IAC/C,CAAC;IAED,OAAO,YAAY,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAsB,EAAE,eAAgC;IACtF,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC7D,IAAI,oBAAoB,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,iBAAiB,GAAG,2BAA2B,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC;IAC7F,OAAO,+BAA+B,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -1,28 +1,36 @@
|
|
|
1
|
-
import type { PackageJson } from 'type-fest';
|
|
2
|
-
import type {
|
|
1
|
+
import type { PackageJson, SetRequired } from 'type-fest';
|
|
2
|
+
import type { AnalyzedBundle } from '../dead-code-eliminator/analyzed-bundle.ts';
|
|
3
3
|
import type { AdditionalPackageJsonAttributes, MainPackageJson } from '../config/package-json.ts';
|
|
4
4
|
import type { FileDescription, TransferableFileDescription } from '../file-manager/file-description.ts';
|
|
5
|
-
import type
|
|
6
|
-
export type
|
|
5
|
+
import { type ImportsField } from './versioned-bundle-imports.ts';
|
|
6
|
+
export type BundlePackageJson = Readonly<SetRequired<PackageJson, 'name' | 'version'>>;
|
|
7
|
+
type ExportsField = NonNullable<PackageJson['exports']>;
|
|
8
|
+
export type VersionedBundle = Pick<AnalyzedBundle, 'contents' | 'name' | 'roots' | 'sideEffectsField' | 'surface'> & {
|
|
7
9
|
readonly version: string;
|
|
8
10
|
readonly dependencies: Record<string, string>;
|
|
9
11
|
readonly peerDependencies: Record<string, string>;
|
|
12
|
+
readonly importsField?: ImportsField | undefined;
|
|
13
|
+
readonly exportsField: ExportsField;
|
|
14
|
+
readonly binField?: PackageJson['bin'] | undefined;
|
|
10
15
|
readonly additionalAttributes: AdditionalPackageJsonAttributes;
|
|
11
|
-
readonly mainFile: TransferableFileDescription;
|
|
12
|
-
readonly typesMainFile?: TransferableFileDescription | undefined;
|
|
13
|
-
readonly packageType:
|
|
16
|
+
readonly mainFile: FileDescription | TransferableFileDescription;
|
|
17
|
+
readonly typesMainFile?: FileDescription | TransferableFileDescription | undefined;
|
|
18
|
+
readonly packageType: 'module';
|
|
14
19
|
};
|
|
15
20
|
export type VersionedBundleWithManifest = VersionedBundle & {
|
|
16
21
|
readonly manifestFile: FileDescription;
|
|
17
22
|
readonly packageJson: BundlePackageJson;
|
|
18
23
|
};
|
|
19
24
|
export type BuildVersionedBundleOptions = {
|
|
20
|
-
readonly bundle:
|
|
25
|
+
readonly bundle: AnalyzedBundle;
|
|
21
26
|
readonly version: string;
|
|
22
27
|
readonly mainPackageJson: MainPackageJson;
|
|
23
28
|
readonly bundleDependencies: readonly VersionedBundle[];
|
|
24
29
|
readonly bundlePeerDependencies: readonly VersionedBundle[];
|
|
25
30
|
readonly additionalPackageJsonAttributes: AdditionalPackageJsonAttributes;
|
|
31
|
+
readonly allowMutableSpecifiers: readonly string[];
|
|
32
|
+
readonly substitutionPublicModuleSourcePaths?: ReadonlySet<string> | undefined;
|
|
26
33
|
};
|
|
27
34
|
export declare function buildVersionedBundle(options: BuildVersionedBundleOptions): VersionedBundle;
|
|
35
|
+
export {};
|
|
28
36
|
//# sourceMappingURL=versioned-bundle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versioned-bundle.d.ts","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"versioned-bundle.d.ts","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,KAAK,EAAE,+BAA+B,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAKxG,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAErF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AACvF,KAAK,YAAY,GAAG,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAAC,GAAG;IACjH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,QAAQ,CAAC,gBAA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
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { isImplicitPackageSurface } from "../package-surface/surface.js";
|
|
2
|
+
import { buildBinField, buildExportsField } from "../package-surface/modules.js";
|
|
3
|
+
import { distributeDependencies } from "./versioned-bundle-dependencies.js";
|
|
4
|
+
import { buildImportsField } from "./versioned-bundle-imports.js";
|
|
5
|
+
function firstExplicitRootId(packageInterface) {
|
|
6
|
+
const firstModule = packageInterface.modules?.[0];
|
|
7
|
+
if (firstModule !== undefined) {
|
|
8
|
+
return firstModule.root;
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return bundles.find((bundle) => {
|
|
12
|
-
return bundle.name === name;
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
function mergeDependencyGroups(...groups) {
|
|
16
|
-
return groups.reduce((accumulator, group) => {
|
|
17
|
-
return {
|
|
18
|
-
dependencies: { ...accumulator.dependencies, ...group.dependencies },
|
|
19
|
-
peerDependencies: { ...accumulator.peerDependencies, ...group.peerDependencies }
|
|
20
|
-
};
|
|
21
|
-
}, { dependencies: {}, peerDependencies: {} });
|
|
22
|
-
}
|
|
23
|
-
function groupBundleDependencies(bundle, bundlePeerDependencies, bundleDependencies) {
|
|
24
|
-
const grouped = { dependencies: {}, peerDependencies: {} };
|
|
25
|
-
for (const dependencyName of bundle.linkedBundleDependencies.keys()) {
|
|
26
|
-
const peerBundle = findBundleByPackageName(bundlePeerDependencies, dependencyName);
|
|
27
|
-
if (peerBundle === undefined) {
|
|
28
|
-
const foundBundle = findBundleByPackageName(bundleDependencies, dependencyName);
|
|
29
|
-
if (foundBundle === undefined) {
|
|
30
|
-
throw new Error(`Couldn’t determine version number of bundle dependency ${dependencyName}`);
|
|
31
|
-
}
|
|
32
|
-
grouped.dependencies[dependencyName] = foundBundle.version;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
grouped.peerDependencies[dependencyName] = peerBundle.version;
|
|
36
|
-
}
|
|
10
|
+
const firstBin = packageInterface.bins?.[0];
|
|
11
|
+
if (firstBin !== undefined) {
|
|
12
|
+
return firstBin.root;
|
|
37
13
|
}
|
|
38
|
-
return
|
|
14
|
+
return undefined;
|
|
39
15
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
const version = getVersionFromDependencies(dependencyName, mainPackageJson, 'dependencies');
|
|
49
|
-
grouped.dependencies[dependencyName] = version;
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
const version = getVersionFromDependencies(dependencyName, mainPackageJson, 'peerDependencies');
|
|
53
|
-
grouped.peerDependencies[dependencyName] = version;
|
|
54
|
-
}
|
|
16
|
+
function resolveRepresentativeRootId(bundle) {
|
|
17
|
+
if (isImplicitPackageSurface(bundle.surface)) {
|
|
18
|
+
return bundle.surface.defaultModuleRoot;
|
|
19
|
+
}
|
|
20
|
+
const referencedRootId = firstExplicitRootId(bundle.surface.packageInterface);
|
|
21
|
+
if (referencedRootId === undefined) {
|
|
22
|
+
throw new Error(`Package "${bundle.name}" explicit surface declares neither modules nor bins`);
|
|
55
23
|
}
|
|
56
|
-
return
|
|
24
|
+
return referencedRootId;
|
|
57
25
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
26
|
+
function resolveRepresentativeRoot(bundle, rootId) {
|
|
27
|
+
// Invariant: buildExportsField (implicit) and buildBinField (explicit) run before this
|
|
28
|
+
// and throw when the referenced root is absent, so the lookup cannot return undefined.
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- see invariant above
|
|
30
|
+
return bundle.roots[rootId];
|
|
31
|
+
}
|
|
32
|
+
function buildOptionalVersionedBundleFields(params) {
|
|
33
|
+
const { importsField, binField, typesMainFile } = params;
|
|
34
|
+
return {
|
|
35
|
+
...(importsField === undefined ? {} : { importsField }),
|
|
36
|
+
...(binField === undefined ? {} : { binField }),
|
|
37
|
+
...(typesMainFile === undefined ? {} : { typesMainFile })
|
|
38
|
+
};
|
|
62
39
|
}
|
|
63
40
|
export function buildVersionedBundle(options) {
|
|
64
|
-
const { bundle, version, mainPackageJson, additionalPackageJsonAttributes
|
|
65
|
-
const
|
|
66
|
-
const
|
|
41
|
+
const { bundle, version, mainPackageJson, additionalPackageJsonAttributes } = options;
|
|
42
|
+
const distributedDependencies = distributeDependencies(options);
|
|
43
|
+
const importsField = buildImportsField(bundle, mainPackageJson);
|
|
44
|
+
const exportsField = buildExportsField(bundle, options.substitutionPublicModuleSourcePaths ?? new Set());
|
|
45
|
+
const binField = buildBinField(bundle);
|
|
46
|
+
const representativeRoot = resolveRepresentativeRoot(bundle, resolveRepresentativeRootId(bundle));
|
|
47
|
+
const mainFile = representativeRoot.js;
|
|
48
|
+
const typesMainFile = representativeRoot.declarationFile;
|
|
67
49
|
return {
|
|
68
50
|
name: bundle.name,
|
|
69
51
|
version,
|
|
52
|
+
roots: bundle.roots,
|
|
53
|
+
surface: bundle.surface,
|
|
70
54
|
dependencies: distributedDependencies.dependencies,
|
|
71
55
|
peerDependencies: distributedDependencies.peerDependencies,
|
|
56
|
+
exportsField,
|
|
72
57
|
contents: bundle.contents,
|
|
73
|
-
mainFile
|
|
74
|
-
typesMainFile: firstEntryPoint.declarationFile,
|
|
58
|
+
mainFile,
|
|
75
59
|
additionalAttributes: additionalPackageJsonAttributes,
|
|
76
|
-
packageType: mainPackageJson.type
|
|
60
|
+
packageType: mainPackageJson.type,
|
|
61
|
+
sideEffectsField: bundle.sideEffectsField,
|
|
62
|
+
...buildOptionalVersionedBundleFields({ importsField, binField, typesMainFile })
|
|
77
63
|
};
|
|
78
64
|
}
|
|
79
65
|
//# sourceMappingURL=versioned-bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versioned-bundle.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"versioned-bundle.js","sourceRoot":"","sources":["../../../../source/version-manager/versioned-bundle.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAqB,MAAM,+BAA+B,CAAC;AAuCrF,SAAS,mBAAmB,CAAC,gBAA8C;IACvE,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,WAAW,CAAC,IAAI,CAAC;IAC5B,CAAC;IACD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,SAAS,2BAA2B,CAAC,MAAsB;IACvD,IAAI,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3C,OAAO,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAC5C,CAAC;IACD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC9E,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,YAAY,MAAM,CAAC,IAAI,sDAAsD,CAAC,CAAC;IACnG,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AAED,SAAS,yBAAyB,CAAC,MAAsB,EAAE,MAAc;IACrE,uFAAuF;IACvF,uFAAuF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,KAAK;QACnB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,YAAY,EAAE,uBAAuB,CAAC,YAAY;QAClD,gBAAgB,EAAE,uBAAuB,CAAC,gBAAgB;QAC1D,YAAY;QACZ,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,QAAQ;QACR,oBAAoB,EAAE,+BAA+B;QACrD,WAAW,EAAE,eAAe,CAAC,IAAI;QACjC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,GAAG,kCAAkC,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;KACnF,CAAC;AACN,CAAC"}
|
package/config/entry-point.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/mini';
|
|
2
|
-
export declare const entryPointSchema: z.ZodMiniReadonly<z.ZodMiniObject<{
|
|
3
|
-
js: z.ZodMiniString<string>;
|
|
4
|
-
declarationFile: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
5
|
-
}, z.core.$strict>>;
|
|
6
|
-
export type EntryPoint = z.infer<typeof entryPointSchema>;
|
|
7
|
-
//# sourceMappingURL=entry-point.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry-point.d.ts","sourceRoot":"","sources":["../../../../source/config/entry-point.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAG7B,eAAO,MAAM,gBAAgB;;;mBAK5B,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry-point.js","sourceRoot":"","sources":["../../../../source/config/entry-point.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,UAAU,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,QAAQ,CACtC,CAAC,CAAC,YAAY,CAAC;IACX,EAAE,EAAE,oBAAoB;IACxB,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;CACpD,CAAC,CACL,CAAC"}
|
package/file-manager/sort.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
function compareFilePath(first, second) {
|
|
2
|
-
if (first.filePath < second.filePath) {
|
|
3
|
-
return -1;
|
|
4
|
-
}
|
|
5
|
-
if (first.filePath > second.filePath) {
|
|
6
|
-
return 1;
|
|
7
|
-
}
|
|
8
|
-
return 0;
|
|
9
|
-
}
|
|
10
|
-
export function sortByFilePath(fileDescriptions) {
|
|
11
|
-
return Array.from(fileDescriptions).toSorted(compareFilePath);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=sort.js.map
|
package/file-manager/sort.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sort.js","sourceRoot":"","sources":["../../../../source/file-manager/sort.ts"],"names":[],"mappings":"AAOA,SAAS,eAAe,CAAC,KAAsB,EAAE,MAAuB;IACpE,IAAI,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QACnC,OAAO,CAAC,CAAC,CAAC;IACd,CAAC;IACD,IAAI,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QACnC,OAAO,CAAC,CAAC;IACb,CAAC;IACD,OAAO,CAAC,CAAC;AACb,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,gBAA4C;IACvE,OAAO,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAClE,CAAC"}
|
package/list/unique-list.js
DELETED
package/list/unique-list.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unique-list.js","sourceRoot":"","sources":["../../../../source/list/unique-list.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,UAAU,CAAwC,MAAY;IAC1E,0FAA0F;IAC1F,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAoB,CAAC;AAC1D,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SetRequired, PackageJson } from 'type-fest';
|
|
2
|
-
import type { VersionedBundle } from '../versioned-bundle.ts';
|
|
3
|
-
export type BundlePackageJson = Readonly<SetRequired<PackageJson, 'name' | 'version'>>;
|
|
4
|
-
export declare function buildPackageManifest(bundle: VersionedBundle): BundlePackageJson;
|
|
5
|
-
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../source/version-manager/manifest/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AAEvF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAY/E"}
|