packtory 0.0.22 → 0.0.24
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/bundle-emitter/emitter.d.ts.map +1 -1
- package/bundle-emitter/emitter.js +2 -2
- package/bundle-emitter/emitter.js.map +1 -1
- package/bundle-emitter/publish-error/auto-mode-error-matching.js +6 -7
- package/bundle-emitter/publish-error/auto-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/file-mode-error-matching.js +16 -10
- package/bundle-emitter/publish-error/file-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/publish-error-messages.js +15 -27
- package/bundle-emitter/publish-error/publish-error-messages.js.map +1 -1
- package/bundle-emitter/registry/metadata-auth-retry.js +5 -6
- package/bundle-emitter/registry/metadata-auth-retry.js.map +1 -1
- package/bundle-emitter/registry/oidc-token-exchange.js +6 -14
- package/bundle-emitter/registry/oidc-token-exchange.js.map +1 -1
- package/bundle-emitter/registry/package-metadata-fetcher.js +12 -17
- package/bundle-emitter/registry/package-metadata-fetcher.js.map +1 -1
- package/bundle-emitter/registry/publish-settings-bridge.js +8 -12
- package/bundle-emitter/registry/publish-settings-bridge.js.map +1 -1
- package/bundle-emitter/registry/registry-auth-config.js +22 -26
- package/bundle-emitter/registry/registry-auth-config.js.map +1 -1
- package/bundle-emitter/registry/registry-client.d.ts +1 -1
- package/bundle-emitter/registry/registry-client.d.ts.map +1 -1
- package/bundle-emitter/registry/registry-client.js +13 -6
- package/bundle-emitter/registry/registry-client.js.map +1 -1
- package/bundle-emitter/registry/registry-package-path.js +4 -0
- package/bundle-emitter/registry/registry-package-path.js.map +1 -0
- package/bundle-emitter/repository-coherence.js +17 -23
- package/bundle-emitter/repository-coherence.js.map +1 -1
- package/bundle-emitter/repository-url-normalizer.js +5 -8
- package/bundle-emitter/repository-url-normalizer.js.map +1 -1
- package/checks/rules/duplicate-messages.js +7 -10
- package/checks/rules/duplicate-messages.js.map +1 -1
- package/checks/rules/no-unused-bundle-dependencies.js +10 -13
- package/checks/rules/no-unused-bundle-dependencies.js.map +1 -1
- package/common/bundled-dependency-groups.js +28 -0
- package/common/bundled-dependency-groups.js.map +1 -0
- package/common/package-layout.js +49 -0
- package/common/package-layout.js.map +1 -0
- package/common/package-name-map.js +8 -0
- package/common/package-name-map.js.map +1 -0
- package/common/worklist.js +23 -0
- package/common/worklist.js.map +1 -0
- package/config/config.d.ts +1 -1
- package/config/config.d.ts.map +1 -1
- package/config/dependency-existence-validation.js +15 -17
- package/config/dependency-existence-validation.js.map +1 -1
- package/config/package-config.d.ts.map +1 -1
- package/config/package-config.js +2 -6
- package/config/package-config.js.map +1 -1
- package/config/publish-settings.d.ts.map +1 -1
- package/config/publish-settings.report.js +8 -7
- package/config/publish-settings.report.js.map +1 -1
- package/config/registry-settings.d.ts.map +1 -1
- package/config/root-config-validation.js +86 -81
- package/config/root-config-validation.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/bundle-index.js +0 -3
- package/dead-code-eliminator/cross-bundle/bundle-index.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/import-export-walker.js +4 -2
- package/dead-code-eliminator/cross-bundle/import-export-walker.js.map +1 -1
- package/dead-code-eliminator/eliminator.js.map +1 -1
- package/dead-code-eliminator/imported-expression-origin.js +28 -32
- package/dead-code-eliminator/imported-expression-origin.js.map +1 -1
- package/dead-code-eliminator/pure-expression.js +53 -64
- package/dead-code-eliminator/pure-expression.js.map +1 -1
- package/dead-code-eliminator/reachability/bfs-closure.js +31 -24
- package/dead-code-eliminator/reachability/bfs-closure.js.map +1 -1
- package/dead-code-eliminator/side-effect-classifier.js +2 -2
- package/dead-code-eliminator/side-effect-classifier.js.map +1 -1
- package/dead-code-eliminator/statement-classifiers.js +4 -5
- package/dead-code-eliminator/statement-classifiers.js.map +1 -1
- package/dead-code-eliminator/syntax-kind-sets.js +24 -65
- package/dead-code-eliminator/syntax-kind-sets.js.map +1 -1
- package/dependency-scanner/node-modules-manifest-synthesizer.js +3 -6
- package/dependency-scanner/node-modules-manifest-synthesizer.js.map +1 -1
- package/dependency-scanner/package-owned-asset-file-path.js +2 -13
- package/dependency-scanner/package-owned-asset-file-path.js.map +1 -1
- package/dependency-scanner/scanner.js +39 -29
- package/dependency-scanner/scanner.js.map +1 -1
- package/dependency-scanner/source-file-references.d.ts.map +1 -1
- package/dependency-scanner/source-file-references.js +75 -79
- package/dependency-scanner/source-file-references.js.map +1 -1
- package/dependency-scanner/typescript-project-analyzer.d.ts.map +1 -1
- package/dependency-scanner/typescript-project-analyzer.js +2 -1
- package/dependency-scanner/typescript-project-analyzer.js.map +1 -1
- package/dependency-scanner/virtual-package-json-host.js +2 -1
- package/dependency-scanner/virtual-package-json-host.js.map +1 -1
- package/directed-graph/graph.js +38 -64
- package/directed-graph/graph.js.map +1 -1
- package/file-manager/compare.js +7 -3
- package/file-manager/compare.js.map +1 -1
- package/file-manager/file-description-by-path.js +8 -0
- package/file-manager/file-description-by-path.js.map +1 -0
- package/npm-oidc-id-token-resolver.js +17 -14
- package/npm-oidc-id-token-resolver.js.map +1 -1
- package/package-surface/implicit-bin.js +9 -6
- package/package-surface/implicit-bin.js.map +1 -1
- package/package-surface/package-json-export.js +4 -3
- package/package-surface/package-json-export.js.map +1 -1
- package/package-surface/package-shape.js +4 -3
- package/package-surface/package-shape.js.map +1 -1
- package/package-surface/package-surface-index.js +136 -0
- package/package-surface/package-surface-index.js.map +1 -0
- package/package-surface/public-specifiers.js +3 -12
- package/package-surface/public-specifiers.js.map +1 -1
- package/package-surface/root-registry.js +10 -20
- package/package-surface/root-registry.js.map +1 -1
- package/package-surface/specifier-syntax.js +0 -19
- package/package-surface/specifier-syntax.js.map +1 -1
- package/package-surface/substitution-exports.js +59 -35
- package/package-surface/substitution-exports.js.map +1 -1
- package/package-surface/surface.js +0 -3
- package/package-surface/surface.js.map +1 -1
- package/package.json +16 -4
- package/packtory/options/bundle-dependency-resolution.js +6 -8
- package/packtory/options/bundle-dependency-resolution.js.map +1 -1
- package/packtory/options/version-trigger.js.map +1 -1
- package/packtory/package-processor-publish.d.ts +2 -1
- package/packtory/package-processor-publish.d.ts.map +1 -1
- package/packtory/package-processor-publish.js +19 -13
- package/packtory/package-processor-publish.js.map +1 -1
- package/packtory/packtory-pack.js +129 -141
- package/packtory/packtory-pack.js.map +1 -1
- package/packtory/packtory-release-analysis.js +8 -16
- package/packtory/packtory-release-analysis.js.map +1 -1
- package/packtory/packtory-results.d.ts +26 -11
- package/packtory/packtory-results.d.ts.map +1 -1
- package/packtory/packtory-results.js +27 -5
- package/packtory/packtory-results.js.map +1 -1
- package/packtory/packtory.js +65 -49
- package/packtory/packtory.js.map +1 -1
- package/packtory/partial-result.js +26 -0
- package/packtory/partial-result.js.map +1 -0
- package/packtory/published-release-state.d.ts +9 -0
- package/packtory/published-release-state.d.ts.map +1 -0
- package/packtory/published-release-state.js +12 -0
- package/packtory/published-release-state.js.map +1 -0
- package/packtory/release-analysis.js +74 -81
- package/packtory/release-analysis.js.map +1 -1
- package/packtory/resolved-package.js +6 -6
- package/packtory/resolved-package.js.map +1 -1
- package/packtory/scheduler.d.ts +1 -0
- package/packtory/scheduler.d.ts.map +1 -1
- package/packtory/scheduler.js +70 -52
- package/packtory/scheduler.js.map +1 -1
- package/packtory/stages/publish-stage.js +11 -6
- package/packtory/stages/publish-stage.js.map +1 -1
- package/packtory/stages/release-diff-stage.js +11 -10
- package/packtory/stages/release-diff-stage.js.map +1 -1
- package/report/aggregator/package-report-materialization.js +35 -22
- package/report/aggregator/package-report-materialization.js.map +1 -1
- package/report/config-redactor.js +5 -4
- package/report/config-redactor.js.map +1 -1
- package/report/inspectors/inspect-artifact-sizes.js +7 -3
- package/report/inspectors/inspect-artifact-sizes.js.map +1 -1
- package/report/inspectors/inspect-scan-results.js +8 -2
- package/report/inspectors/inspect-scan-results.js.map +1 -1
- package/report/preview/preview-document-diff.d.ts +6 -1
- package/report/preview/preview-document-diff.d.ts.map +1 -1
- package/report/preview/preview-document-diff.js +8 -3
- package/report/preview/preview-document-diff.js.map +1 -1
- package/report/release-diff/file-set-diff.d.ts +14 -4
- package/report/release-diff/file-set-diff.d.ts.map +1 -1
- package/report/release-diff/file-set-diff.js +28 -28
- package/report/release-diff/file-set-diff.js.map +1 -1
- package/report/release-diff/release-version-transition.js +6 -4
- package/report/release-diff/release-version-transition.js.map +1 -1
- package/resource-resolver/content.js +5 -3
- package/resource-resolver/content.js.map +1 -1
- package/sbom/license-resolver.js +3 -3
- package/sbom/license-resolver.js.map +1 -1
- package/sbom/sbom-builder.js +1 -8
- package/sbom/sbom-builder.js.map +1 -1
- package/sbom/sbom-file.d.ts.map +1 -1
- package/sbom/sbom-file.js +7 -4
- package/sbom/sbom-file.js.map +1 -1
- package/sbom/sbom-serializer.js +10 -6
- package/sbom/sbom-serializer.js.map +1 -1
- package/sbom.cdx.json +22 -5
- package/vendor-materializer/vendor-materializer.d.ts.map +1 -1
- package/vendor-materializer/vendor-materializer.js +99 -123
- package/vendor-materializer/vendor-materializer.js.map +1 -1
- package/version-manager/dependencies/bundle-dependency-grouping.js +18 -14
- package/version-manager/dependencies/bundle-dependency-grouping.js.map +1 -1
- package/version-manager/imports/versioned-bundle-imports.js +15 -12
- package/version-manager/imports/versioned-bundle-imports.js.map +1 -1
- package/version-manager/manager.d.ts.map +1 -1
- package/version-manager/manager.js +19 -24
- package/version-manager/manager.js.map +1 -1
- package/version-manager/manifest/builder.js +3 -3
- package/version-manager/manifest/builder.js.map +1 -1
- package/version-manager/optional-bundle-fields.js +2 -5
- package/version-manager/optional-bundle-fields.js.map +1 -1
- package/version-manager/representative-root.js +7 -27
- package/version-manager/representative-root.js.map +1 -1
- package/version-manager/specifier-classifier.js +13 -10
- package/version-manager/specifier-classifier.js.map +1 -1
- package/version-manager/specifier-errors.js +17 -6
- package/version-manager/specifier-errors.js.map +1 -1
- package/package-surface/explicit-specifier-build.js +0 -28
- package/package-surface/explicit-specifier-build.js.map +0 -1
- package/package-surface/explicit-specifier-resolve.js +0 -17
- package/package-surface/explicit-specifier-resolve.js.map +0 -1
- package/package-surface/implicit-specifier-build.js +0 -26
- package/package-surface/implicit-specifier-build.js.map +0 -1
- package/package-surface/implicit-specifier-resolve.js +0 -17
- package/package-surface/implicit-specifier-resolve.js.map +0 -1
|
@@ -5,19 +5,22 @@ function isShebangContent(content) {
|
|
|
5
5
|
function unscopedPackageName(packageName) {
|
|
6
6
|
return packageName.replace(/^@[^/]+\//u, '');
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
8
|
+
function findExecutableShebangRoot(bundle) {
|
|
9
|
+
const executableShebangRoots = Object.values(bundle.roots).filter((root) => {
|
|
10
10
|
return root.js.isExecutable && isShebangContent(root.js.content);
|
|
11
11
|
});
|
|
12
|
+
if (executableShebangRoots.length > 1) {
|
|
13
|
+
const duplicateShebangRootsMessage = `Package "${bundle.name}" has multiple executable shebang roots; ` +
|
|
14
|
+
'declare packageInterface.bins explicitly';
|
|
15
|
+
throw new Error(duplicateShebangRootsMessage);
|
|
16
|
+
}
|
|
17
|
+
return executableShebangRoots[0];
|
|
12
18
|
}
|
|
13
19
|
export function buildImplicitBinField(bundle) {
|
|
14
|
-
const
|
|
20
|
+
const root = findExecutableShebangRoot(bundle);
|
|
15
21
|
if (root === undefined) {
|
|
16
22
|
return undefined;
|
|
17
23
|
}
|
|
18
|
-
if (extraRoot !== undefined) {
|
|
19
|
-
throw new Error(`Package "${bundle.name}" has multiple executable shebang roots; declare packageInterface.bins explicitly`);
|
|
20
|
-
}
|
|
21
24
|
return { [unscopedPackageName(bundle.name)]: toImportTarget(root.js.targetFilePath) };
|
|
22
25
|
}
|
|
23
26
|
//# sourceMappingURL=implicit-bin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implicit-bin.js","sourceRoot":"","sources":["../../../../source/package-surface/implicit-bin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA6C,MAAM,oBAAoB,CAAC;AAI/F,SAAS,gBAAgB,CA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E,CAAC;QACrB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,OAAO,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC;AAC1F,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
function packageJsonExportPath() {
|
|
2
|
+
return './package.json';
|
|
3
|
+
}
|
|
3
4
|
export function decorateWithPackageJsonExport(bundle, exportsField) {
|
|
4
5
|
if (bundle.exportPackageJson !== true) {
|
|
5
6
|
return exportsField;
|
|
6
7
|
}
|
|
7
8
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- spread preserves the generic record shape
|
|
8
|
-
return { ...exportsField, [
|
|
9
|
+
return { ...exportsField, [packageJsonExportPath()]: packageJsonExportPath() };
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=package-json-export.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json-export.js","sourceRoot":"","sources":["../../../../source/package-surface/package-json-export.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"package-json-export.js","sourceRoot":"","sources":["../../../../source/package-surface/package-json-export.ts"],"names":[],"mappings":"AAEA,SAAS,qBAAqB;IAC1B,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,6BAA6B,CACzC,MAA6B,EAC7B,YAAsB;IAEtB,IAAI,MAAM,CAAC,iBAAiB,KAAK,IAAI,EAAE,CAAC;QACpC,OAAO,YAAY,CAAC;IACxB,CAAC;IAED,sHAAsH;IACtH,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC,qBAAqB,EAAE,CAAC,EAAE,qBAAqB,EAAE,EAAc,CAAC;AAC/F,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { isDefined, pickBy } from 'remeda';
|
|
1
2
|
export function toImportTarget(targetFilePath) {
|
|
2
3
|
return `./${targetFilePath}`;
|
|
3
4
|
}
|
|
4
5
|
export function buildExportEntry(root) {
|
|
5
|
-
return {
|
|
6
|
+
return pickBy({
|
|
6
7
|
import: toImportTarget(root.js.targetFilePath),
|
|
7
|
-
|
|
8
|
-
};
|
|
8
|
+
types: root.declarationFile === undefined ? undefined : toImportTarget(root.declarationFile.targetFilePath)
|
|
9
|
+
}, isDefined);
|
|
9
10
|
}
|
|
10
11
|
//# sourceMappingURL=package-shape.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-shape.js","sourceRoot":"","sources":["../../../../source/package-surface/package-shape.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package-shape.js","sourceRoot":"","sources":["../../../../source/package-surface/package-shape.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AA8B3C,MAAM,UAAU,cAAc,CAAC,cAAsB;IACjD,OAAO,KAAK,cAAc,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAyB;IACtD,OAAO,MAAM,CACT;QACI,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC;QAC9C,KAAK,EAAE,IAAI,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC;KAC9G,EACD,SAAS,CACZ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { getEntryRootIds, getRoot } from "./root-registry.js";
|
|
2
|
+
import { toPackageSpecifier } from "./specifier-syntax.js";
|
|
3
|
+
function createMutablePublicModuleIndex() {
|
|
4
|
+
return {
|
|
5
|
+
sourceFilePathBySpecifier: new Map(),
|
|
6
|
+
specifierBySourceFilePath: new Map()
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function recordSourceFileSpecifier(publicModuleIndex, sourceFilePath, candidateSpecifier) {
|
|
10
|
+
const currentSpecifier = publicModuleIndex.specifierBySourceFilePath.get(sourceFilePath);
|
|
11
|
+
if (currentSpecifier === undefined) {
|
|
12
|
+
publicModuleIndex.specifierBySourceFilePath.set(sourceFilePath, candidateSpecifier);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function recordShortestSourceFileSpecifier(publicModuleIndex, sourceFilePath, candidateSpecifier) {
|
|
16
|
+
const currentSpecifier = publicModuleIndex.specifierBySourceFilePath.get(sourceFilePath);
|
|
17
|
+
if (currentSpecifier === undefined || candidateSpecifier.length < currentSpecifier.length) {
|
|
18
|
+
publicModuleIndex.specifierBySourceFilePath.set(sourceFilePath, candidateSpecifier);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function recordPublicSourceFilePath(publicModuleIndex, write) {
|
|
22
|
+
const hasPublicSpecifier = publicModuleIndex.sourceFilePathBySpecifier.has(write.specifier);
|
|
23
|
+
if (write.publicSourceFilePath !== undefined && !hasPublicSpecifier) {
|
|
24
|
+
publicModuleIndex.sourceFilePathBySpecifier.set(write.specifier, write.publicSourceFilePath);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function recordFirstIndexedPublicSpecifier(publicModuleIndex, write) {
|
|
28
|
+
for (const sourceFilePath of write.sourceFilePaths) {
|
|
29
|
+
recordSourceFileSpecifier(publicModuleIndex, sourceFilePath, write.specifier);
|
|
30
|
+
}
|
|
31
|
+
recordPublicSourceFilePath(publicModuleIndex, write);
|
|
32
|
+
}
|
|
33
|
+
function recordShortestIndexedPublicSpecifier(publicModuleIndex, write) {
|
|
34
|
+
for (const sourceFilePath of write.sourceFilePaths) {
|
|
35
|
+
recordShortestSourceFileSpecifier(publicModuleIndex, sourceFilePath, write.specifier);
|
|
36
|
+
}
|
|
37
|
+
recordPublicSourceFilePath(publicModuleIndex, write);
|
|
38
|
+
}
|
|
39
|
+
function rootSourceFilePaths(root) {
|
|
40
|
+
if (root.declarationFile === undefined) {
|
|
41
|
+
return [root.js.sourceFilePath];
|
|
42
|
+
}
|
|
43
|
+
return [root.js.sourceFilePath, root.declarationFile.sourceFilePath];
|
|
44
|
+
}
|
|
45
|
+
function isExplicitSummaryBundle(bundle) {
|
|
46
|
+
return bundle.surface.mode === 'explicit';
|
|
47
|
+
}
|
|
48
|
+
function isImplicitSummaryBundle(bundle) {
|
|
49
|
+
return bundle.surface.mode === 'implicit';
|
|
50
|
+
}
|
|
51
|
+
function isExplicitModuleBundle(bundle) {
|
|
52
|
+
return bundle.surface.mode === 'explicit';
|
|
53
|
+
}
|
|
54
|
+
function isImplicitModuleBundle(bundle) {
|
|
55
|
+
return bundle.surface.mode === 'implicit';
|
|
56
|
+
}
|
|
57
|
+
function firstExplicitRootId(surface) {
|
|
58
|
+
return surface.packageInterface.modules?.[0]?.root ?? surface.packageInterface.bins?.[0]?.root;
|
|
59
|
+
}
|
|
60
|
+
function summarizeImplicitPackageSurface(bundle) {
|
|
61
|
+
return {
|
|
62
|
+
publicRootIds: getEntryRootIds(bundle),
|
|
63
|
+
representativeRootId: bundle.surface.defaultModuleRoot
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function summarizeExplicitPackageSurface(bundle) {
|
|
67
|
+
const representativeRootId = firstExplicitRootId(bundle.surface);
|
|
68
|
+
if (representativeRootId === undefined) {
|
|
69
|
+
throw new Error(`Package "${bundle.name}" explicit surface declares neither modules nor bins`);
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
publicRootIds: getEntryRootIds(bundle),
|
|
73
|
+
representativeRootId
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export function summarizePackageSurface(bundle) {
|
|
77
|
+
if (isExplicitSummaryBundle(bundle)) {
|
|
78
|
+
return summarizeExplicitPackageSurface(bundle);
|
|
79
|
+
}
|
|
80
|
+
if (isImplicitSummaryBundle(bundle)) {
|
|
81
|
+
return summarizeImplicitPackageSurface(bundle);
|
|
82
|
+
}
|
|
83
|
+
throw new Error(`Unsupported package surface mode: ${bundle.surface.mode}`);
|
|
84
|
+
}
|
|
85
|
+
function indexExplicitPublicModules(bundle) {
|
|
86
|
+
const publicModuleIndex = createMutablePublicModuleIndex();
|
|
87
|
+
const { modules } = bundle.surface.packageInterface;
|
|
88
|
+
if (modules === undefined) {
|
|
89
|
+
return publicModuleIndex;
|
|
90
|
+
}
|
|
91
|
+
for (const entry of modules) {
|
|
92
|
+
const root = getRoot(bundle, entry.root);
|
|
93
|
+
recordShortestIndexedPublicSpecifier(publicModuleIndex, {
|
|
94
|
+
publicSourceFilePath: root.js.sourceFilePath,
|
|
95
|
+
sourceFilePaths: rootSourceFilePaths(root),
|
|
96
|
+
specifier: toPackageSpecifier(bundle.name, entry.export)
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return publicModuleIndex;
|
|
100
|
+
}
|
|
101
|
+
function indexImplicitPublicModules(bundle) {
|
|
102
|
+
const publicModuleIndex = createMutablePublicModuleIndex();
|
|
103
|
+
const defaultRoot = getRoot(bundle, bundle.surface.defaultModuleRoot);
|
|
104
|
+
recordFirstIndexedPublicSpecifier(publicModuleIndex, {
|
|
105
|
+
publicSourceFilePath: defaultRoot.js.sourceFilePath,
|
|
106
|
+
sourceFilePaths: rootSourceFilePaths(defaultRoot),
|
|
107
|
+
specifier: bundle.name
|
|
108
|
+
});
|
|
109
|
+
for (const root of Object.values(bundle.roots)) {
|
|
110
|
+
if (root.declarationFile !== undefined) {
|
|
111
|
+
recordFirstIndexedPublicSpecifier(publicModuleIndex, {
|
|
112
|
+
publicSourceFilePath: undefined,
|
|
113
|
+
sourceFilePaths: [root.declarationFile.sourceFilePath],
|
|
114
|
+
specifier: toPackageSpecifier(bundle.name, `./${root.js.targetFilePath}`)
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
for (const entry of bundle.contents) {
|
|
119
|
+
recordFirstIndexedPublicSpecifier(publicModuleIndex, {
|
|
120
|
+
publicSourceFilePath: entry.fileDescription.sourceFilePath,
|
|
121
|
+
sourceFilePaths: [entry.fileDescription.sourceFilePath],
|
|
122
|
+
specifier: toPackageSpecifier(bundle.name, `./${entry.fileDescription.targetFilePath}`)
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return publicModuleIndex;
|
|
126
|
+
}
|
|
127
|
+
export function indexPublicModules(bundle) {
|
|
128
|
+
if (isExplicitModuleBundle(bundle)) {
|
|
129
|
+
return indexExplicitPublicModules(bundle);
|
|
130
|
+
}
|
|
131
|
+
if (isImplicitModuleBundle(bundle)) {
|
|
132
|
+
return indexImplicitPublicModules(bundle);
|
|
133
|
+
}
|
|
134
|
+
throw new Error(`Unsupported package surface mode: ${bundle.surface.mode}`);
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=package-surface-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-surface-index.js","sourceRoot":"","sources":["../../../../source/package-surface/package-surface-index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAqC3D,SAAS,8BAA8B;IACnC,OAAO;QACH,yBAAyB,EAAE,IAAI,GAAG,EAAkB;QACpD,yBAAyB,EAAE,IAAI,GAAG,EAAkB;KACvD,CAAC;AACN,CAAC;AAED,SAAS,yBAAyB,CAC9B,iBAA2C,EAC3C,cAAsB,EACtB,kBAA0B;IAE1B,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,yBAAyB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACzF,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACjC,iBAAiB,CAAC,yBAAyB,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;IACxF,CAAC;AACL,CAAC;AAED,SAAS,iCAAiC,CACtC,i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jC,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,qCAAqC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { resolveExplicitPublicModuleSourceFilePath } from "./explicit-specifier-resolve.js";
|
|
3
|
-
import { getImplicitPublicModuleSpecifier } from "./implicit-specifier-build.js";
|
|
4
|
-
import { resolveImplicitPublicModuleSourceFilePath } from "./implicit-specifier-resolve.js";
|
|
1
|
+
import { indexPublicModules } from "./package-surface-index.js";
|
|
5
2
|
export function getPublicModuleSpecifierForSourcePath(bundle, sourceFilePath) {
|
|
6
|
-
|
|
7
|
-
return getExplicitPublicModuleSpecifier(bundle, bundle.surface, sourceFilePath);
|
|
8
|
-
}
|
|
9
|
-
return getImplicitPublicModuleSpecifier(bundle, bundle.surface, sourceFilePath);
|
|
3
|
+
return indexPublicModules(bundle).specifierBySourceFilePath.get(sourceFilePath);
|
|
10
4
|
}
|
|
11
5
|
export function resolvePublicModuleSourceFilePath(bundle, specifier) {
|
|
12
|
-
|
|
13
|
-
return resolveExplicitPublicModuleSourceFilePath(bundle, bundle.surface, specifier);
|
|
14
|
-
}
|
|
15
|
-
return resolveImplicitPublicModuleSourceFilePath(bundle, bundle.surface, specifier);
|
|
6
|
+
return indexPublicModules(bundle).sourceFilePathBySpecifier.get(specifier);
|
|
16
7
|
}
|
|
17
8
|
//# sourceMappingURL=public-specifiers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-specifiers.js","sourceRoot":"","sources":["../../../../source/package-surface/public-specifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"public-specifiers.js","sourceRoot":"","sources":["../../../../source/package-surface/public-specifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,MAAM,UAAU,qCAAqC,CAAC,MAAkB,EAAE,cAAsB;IAC5F,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,iCAAiC,CAAC,MAAkB,EAAE,SAAiB;IACnF,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isImplicitPackageSurface } from "./surface.js";
|
|
2
1
|
export function getRoot(bundle, rootId) {
|
|
3
2
|
const root = bundle.roots[rootId];
|
|
4
3
|
if (root === undefined) {
|
|
@@ -6,30 +5,21 @@ export function getRoot(bundle, rootId) {
|
|
|
6
5
|
}
|
|
7
6
|
return root;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
function collectExplicitPublicRootIds(surface) {
|
|
9
|
+
const publicRootIds = new Set();
|
|
10
|
+
for (const entry of surface.packageInterface.modules ?? []) {
|
|
11
|
+
publicRootIds.add(entry.root);
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function getPublicRootIds(bundle) {
|
|
16
|
-
if (isImplicitPackageSurface(bundle.surface)) {
|
|
17
|
-
return new Set(Object.keys(bundle.roots));
|
|
18
|
-
}
|
|
19
|
-
const rootIds = new Set();
|
|
20
|
-
for (const entry of bundle.surface.packageInterface.modules ?? []) {
|
|
21
|
-
rootIds.add(entry.root);
|
|
13
|
+
for (const entry of surface.packageInterface.bins ?? []) {
|
|
14
|
+
publicRootIds.add(entry.root);
|
|
22
15
|
}
|
|
23
|
-
|
|
24
|
-
rootIds.add(entry.root);
|
|
25
|
-
}
|
|
26
|
-
return rootIds;
|
|
16
|
+
return publicRootIds;
|
|
27
17
|
}
|
|
28
18
|
export function getEntryRootIds(bundle) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return publicRootIds;
|
|
19
|
+
if (bundle.surface.mode === 'implicit') {
|
|
20
|
+
return new Set(Object.keys(bundle.roots));
|
|
32
21
|
}
|
|
22
|
+
const publicRootIds = collectExplicitPublicRootIds(bundle.surface);
|
|
33
23
|
return new Set([...publicRootIds, ...(bundle.surface.packageInterface.privateRoots ?? [])]);
|
|
34
24
|
}
|
|
35
25
|
//# sourceMappingURL=root-registry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-registry.js","sourceRoot":"","sources":["../../../../source/package-surface/root-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"root-registry.js","sourceRoot":"","sources":["../../../../source/package-surface/root-registry.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,OAAO,CAAC,MAA0C,EAAE,MAAc;IAC9E,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,YAAY,MAAM,CAAC,IAAI,8BAA8B,MAAM,GAAG,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,4BAA4B,CAAC,OAAwB;IAC1D,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;IACxC,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,gBAAgB,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC;QACzD,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,gBAAgB,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;QACtD,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,aAAa,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,MAA6C;IACzE,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QACrC,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,aAAa,GAAG,4BAA4B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACnE,OAAO,IAAI,GAAG,CAAC,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAChG,CAAC"}
|
|
@@ -2,23 +2,4 @@ const exportKeyPrefixLength = 2;
|
|
|
2
2
|
export function toPackageSpecifier(packageName, exportKey) {
|
|
3
3
|
return exportKey === '.' ? packageName : `${packageName}/${exportKey.slice(exportKeyPrefixLength)}`;
|
|
4
4
|
}
|
|
5
|
-
export function resolveExplicitExportKey(packageName, specifier) {
|
|
6
|
-
if (specifier === packageName) {
|
|
7
|
-
return '.';
|
|
8
|
-
}
|
|
9
|
-
if (specifier.startsWith(`${packageName}/`)) {
|
|
10
|
-
return `./${specifier.slice(packageName.length + 1)}`;
|
|
11
|
-
}
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
export function resolveImplicitSpecifier(bundleName, specifier) {
|
|
15
|
-
if (specifier === bundleName) {
|
|
16
|
-
return ['root'];
|
|
17
|
-
}
|
|
18
|
-
const prefix = `${bundleName}/`;
|
|
19
|
-
if (!specifier.startsWith(prefix)) {
|
|
20
|
-
return ['private'];
|
|
21
|
-
}
|
|
22
|
-
return ['content', specifier.slice(prefix.length)];
|
|
23
|
-
}
|
|
24
5
|
//# sourceMappingURL=specifier-syntax.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specifier-syntax.js","sourceRoot":"","sources":["../../../../source/package-surface/specifier-syntax.ts"],"names":[],"mappings":"AAAA,MAAM,qBAAqB,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"specifier-syntax.js","sourceRoot":"","sources":["../../../../source/package-surface/specifier-syntax.ts"],"names":[],"mappings":"AAAA,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAM,UAAU,kBAAkB,CAAC,WAAmB,EAAE,SAAiB;IACrE,OAAO,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,SAAS,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC;AACxG,CAAC"}
|
|
@@ -1,62 +1,86 @@
|
|
|
1
|
+
import { isDefined, pickBy } from 'remeda';
|
|
1
2
|
import { toImportTarget } from "./package-shape.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
function collectRootSourceFilePaths(bundle) {
|
|
4
|
+
const rootSourceFilePaths = new Set();
|
|
5
|
+
for (const root of Object.values(bundle.roots)) {
|
|
6
|
+
rootSourceFilePaths.add(root.js.sourceFilePath);
|
|
7
|
+
}
|
|
8
|
+
return rootSourceFilePaths;
|
|
9
|
+
}
|
|
10
|
+
function collectBundleContentLookups(bundle) {
|
|
11
|
+
const contentBySourceFilePath = new Map();
|
|
12
|
+
const targetFilePaths = new Set();
|
|
13
|
+
for (const entry of bundle.contents) {
|
|
14
|
+
const { sourceFilePath, targetFilePath } = entry.fileDescription;
|
|
15
|
+
if (!contentBySourceFilePath.has(sourceFilePath)) {
|
|
16
|
+
contentBySourceFilePath.set(sourceFilePath, entry);
|
|
17
|
+
}
|
|
18
|
+
targetFilePaths.add(targetFilePath);
|
|
19
|
+
}
|
|
20
|
+
return { contentBySourceFilePath, targetFilePaths };
|
|
11
21
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
22
|
+
function createSubstitutionBundleLookups(bundle) {
|
|
23
|
+
const { contentBySourceFilePath, targetFilePaths } = collectBundleContentLookups(bundle);
|
|
24
|
+
return {
|
|
25
|
+
contentBySourceFilePath,
|
|
26
|
+
targetFilePaths,
|
|
27
|
+
rootSourceFilePaths: collectRootSourceFilePaths(bundle)
|
|
28
|
+
};
|
|
14
29
|
}
|
|
15
|
-
function
|
|
16
|
-
const content =
|
|
17
|
-
return entry.fileDescription.sourceFilePath === sourceFilePath;
|
|
18
|
-
});
|
|
30
|
+
function findBundleContent(bundleName, contentBySourceFilePath, sourceFilePath) {
|
|
31
|
+
const content = contentBySourceFilePath.get(sourceFilePath);
|
|
19
32
|
if (content === undefined) {
|
|
20
|
-
throw new Error(`Package "${
|
|
33
|
+
throw new Error(`Package "${bundleName}" is missing content for "${sourceFilePath}"`);
|
|
21
34
|
}
|
|
22
35
|
return content;
|
|
23
36
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
return
|
|
27
|
-
}
|
|
28
|
-
|
|
37
|
+
function declarationCompanionTargetPathFor(rule, targetFilePaths, targetFilePath) {
|
|
38
|
+
if (targetFilePath.endsWith(rule.declarationExtension)) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
if (!targetFilePath.endsWith(rule.jsExtension)) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
const targetPathWithoutExtension = targetFilePath.slice(0, -rule.jsExtension.length);
|
|
45
|
+
const declarationTargetFilePath = `${targetPathWithoutExtension}${rule.declarationExtension}`;
|
|
46
|
+
return targetFilePaths.has(declarationTargetFilePath) ? declarationTargetFilePath : undefined;
|
|
29
47
|
}
|
|
30
|
-
function findDeclarationCompanionTargetPath(
|
|
31
|
-
for (const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
48
|
+
function findDeclarationCompanionTargetPath(targetFilePaths, targetFilePath) {
|
|
49
|
+
for (const rule of [
|
|
50
|
+
{ declarationExtension: '.d.mts', jsExtension: '.mjs' },
|
|
51
|
+
{ declarationExtension: '.d.cts', jsExtension: '.cjs' },
|
|
52
|
+
{ declarationExtension: '.d.ts', jsExtension: '.js' }
|
|
53
|
+
]) {
|
|
54
|
+
const declarationTargetPath = declarationCompanionTargetPathFor(rule, targetFilePaths, targetFilePath);
|
|
55
|
+
if (declarationTargetPath !== undefined) {
|
|
56
|
+
return declarationTargetPath;
|
|
35
57
|
}
|
|
36
58
|
}
|
|
37
59
|
return undefined;
|
|
38
60
|
}
|
|
39
|
-
function buildSubstitutionExportEntry(
|
|
40
|
-
if (
|
|
61
|
+
function buildSubstitutionExportEntry(bundleName, lookups, sourceFilePath) {
|
|
62
|
+
if (lookups.rootSourceFilePaths.has(sourceFilePath)) {
|
|
41
63
|
return undefined;
|
|
42
64
|
}
|
|
43
|
-
const
|
|
44
|
-
|
|
65
|
+
const content = findBundleContent(bundleName, lookups.contentBySourceFilePath, sourceFilePath);
|
|
66
|
+
const jsTargetFilePath = content.fileDescription.targetFilePath;
|
|
67
|
+
const declarationTargetFilePath = findDeclarationCompanionTargetPath(lookups.targetFilePaths, jsTargetFilePath);
|
|
68
|
+
if (declarationTargetFilePath === null) {
|
|
45
69
|
return undefined;
|
|
46
70
|
}
|
|
47
|
-
const declarationTargetFilePath = findDeclarationCompanionTargetPath(bundle, jsTargetFilePath);
|
|
48
71
|
return [
|
|
49
72
|
`./${jsTargetFilePath}`,
|
|
50
|
-
{
|
|
73
|
+
pickBy({
|
|
51
74
|
import: toImportTarget(jsTargetFilePath),
|
|
52
|
-
|
|
53
|
-
}
|
|
75
|
+
types: declarationTargetFilePath === undefined ? undefined : toImportTarget(declarationTargetFilePath)
|
|
76
|
+
}, isDefined)
|
|
54
77
|
];
|
|
55
78
|
}
|
|
56
79
|
export function collectSubstitutionExports(bundle, substitutionPublicModuleSourcePaths) {
|
|
80
|
+
const lookups = createSubstitutionBundleLookups(bundle);
|
|
57
81
|
const substitutionExports = {};
|
|
58
82
|
for (const sourceFilePath of substitutionPublicModuleSourcePaths) {
|
|
59
|
-
const entry = buildSubstitutionExportEntry(bundle, sourceFilePath);
|
|
83
|
+
const entry = buildSubstitutionExportEntry(bundle.name, lookups, sourceFilePath);
|
|
60
84
|
if (entry !== undefined) {
|
|
61
85
|
const [exportKey, exportEntry] = entry;
|
|
62
86
|
substitutionExports[exportKey] = exportEntry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"substitution-exports.js","sourceRoot":"","sources":["../../../../source/package-surface/substitution-exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"substitution-exports.js","sourceRoot":"","sources":["../../../../source/package-surface/substitution-exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAqC,MAAM,oBAAoB,CAAC;AAcvF,SAAS,0BAA0B,CAAC,MAA0B;IAC1D,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE9C,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7C,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,mBAAmB,CAAC;AAC/B,CAAC;AAED,SAAS,2BAA2B,CAAC,MAA0B;IAI3D,MAAM,uBAAuB,GAAG,IAAI,GAAG,EAAyB,CAAC;IACjE,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;IAE1C,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QAClC,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC,eAAe,CAAC;QAEjE,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;YAC/C,uBAAuB,CAAC,GAAG,CAAC,cAAc,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CAAC;SACzG,EACD,SAAS,CACZ;KACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,0BAA0B,CACtC,MAA0B,EAC1B,mCAAwD;IAExD,MAAM,OAAO,GAAG,+BAA+B,CAAC,MAAM,CAAC,CAAC;IACxD,MAAM,mBAAmB,GAAgC,EAAE,CAAC;IAE5D,KAAK,MAAM,cAAc,IAAI,mCAAmC,EAAE,CAAC;QAC/D,MAAM,KAAK,GAAG,4BAA4B,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QACjF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACtB,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC;YACvC,mBAAmB,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;QACjD,CAAC;IACL,CAAC;IAED,OAAO,mBAAmB,CAAC;AAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../../../source/package-surface/surface.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,sBAAsB,CAAC,iBAAyB;IAC5D,OAAO;QACH,IAAI,EAAE,UAAU;QAChB,iBAAiB;KACpB,CAAC;AACN,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,gBAAkC;IACrE,OAAO;QACH,IAAI,EAAE,UAAU;QAChB,gBAAgB;KACnB,CAAC;AACN,CAAC
|
|
1
|
+
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../../../source/package-surface/surface.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,sBAAsB,CAAC,iBAAyB;IAC5D,OAAO;QACH,IAAI,EAAE,UAAU;QAChB,iBAAiB;KACpB,CAAC;AACN,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,gBAAkC;IACrE,OAAO;QACH,IAAI,EAAE,UAAU;QAChB,gBAAgB;KACnB,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"tar-stream": "3.1.8",
|
|
25
25
|
"true-myth": "9.4.0",
|
|
26
26
|
"ts-morph": "27.0.2",
|
|
27
|
+
"ts-pattern": "5.9.0",
|
|
27
28
|
"type-fest": "5.6.0",
|
|
28
29
|
"unix-permissions": "6.0.1",
|
|
29
30
|
"zod": "4.4.3"
|
|
@@ -44,6 +45,9 @@
|
|
|
44
45
|
"import": "./common/clock.js",
|
|
45
46
|
"types": "./common/clock.d.ts"
|
|
46
47
|
},
|
|
48
|
+
"./common/package-layout.js": {
|
|
49
|
+
"import": "./common/package-layout.js"
|
|
50
|
+
},
|
|
47
51
|
"./common/typed-diff.js": {
|
|
48
52
|
"import": "./common/typed-diff.js",
|
|
49
53
|
"types": "./common/typed-diff.d.ts"
|
|
@@ -56,10 +60,17 @@
|
|
|
56
60
|
"./packages/package-processor.composition.js": {
|
|
57
61
|
"import": "./packages/package-processor.composition.js"
|
|
58
62
|
},
|
|
63
|
+
"./packtory/packtory-results.js": {
|
|
64
|
+
"import": "./packtory/packtory-results.js",
|
|
65
|
+
"types": "./packtory/packtory-results.d.ts"
|
|
66
|
+
},
|
|
59
67
|
"./packtory/packtory.js": {
|
|
60
68
|
"import": "./packtory/packtory.js",
|
|
61
69
|
"types": "./packtory/packtory.d.ts"
|
|
62
70
|
},
|
|
71
|
+
"./packtory/partial-result.js": {
|
|
72
|
+
"import": "./packtory/partial-result.js"
|
|
73
|
+
},
|
|
63
74
|
"./packtory/scheduler.js": {
|
|
64
75
|
"import": "./packtory/scheduler.js",
|
|
65
76
|
"types": "./packtory/scheduler.d.ts"
|
|
@@ -67,6 +78,10 @@
|
|
|
67
78
|
"./report/preview/preview-document-diff.js": {
|
|
68
79
|
"import": "./report/preview/preview-document-diff.js",
|
|
69
80
|
"types": "./report/preview/preview-document-diff.d.ts"
|
|
81
|
+
},
|
|
82
|
+
"./report/release-diff/file-set-diff.js": {
|
|
83
|
+
"import": "./report/release-diff/file-set-diff.js",
|
|
84
|
+
"types": "./report/release-diff/file-set-diff.d.ts"
|
|
70
85
|
}
|
|
71
86
|
},
|
|
72
87
|
"keywords": [
|
|
@@ -88,8 +103,6 @@
|
|
|
88
103
|
"url": "git+ssh://git@github.com/enormora/packtory.git"
|
|
89
104
|
},
|
|
90
105
|
"sideEffects": [
|
|
91
|
-
"./bundle-emitter/publish-error/publish-error-messages.js",
|
|
92
|
-
"./bundle-emitter/repository-coherence.js",
|
|
93
106
|
"./config/checks-schema.js",
|
|
94
107
|
"./config/package-schemas.js",
|
|
95
108
|
"./config/packtory-config-without-registry-schema.js",
|
|
@@ -99,9 +112,8 @@
|
|
|
99
112
|
"./dead-code-eliminator/transform/named-declaration-kinds.js",
|
|
100
113
|
"./packages/package-processor.composition.js",
|
|
101
114
|
"./packages/packtory/packtory.entry-point.js",
|
|
102
|
-
"./sbom/sbom-builder.js",
|
|
103
115
|
"./tar/tarball-builder.js"
|
|
104
116
|
],
|
|
105
117
|
"type": "module",
|
|
106
|
-
"version": "0.0.
|
|
118
|
+
"version": "0.0.24"
|
|
107
119
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function dependencyNamesToBundles(dependencyNames,
|
|
3
|
-
const bundlesByName = indexBy(bundles, (bundle) => {
|
|
4
|
-
return bundle.name;
|
|
5
|
-
});
|
|
1
|
+
import { packageNameMap } from "../../common/package-name-map.js";
|
|
2
|
+
function dependencyNamesToBundles(dependencyNames, bundlesByName) {
|
|
6
3
|
return dependencyNames.map((dependencyName) => {
|
|
7
|
-
const matchingBundle = bundlesByName
|
|
4
|
+
const matchingBundle = bundlesByName.get(dependencyName);
|
|
8
5
|
if (matchingBundle === undefined) {
|
|
9
6
|
throw new Error(`Dependent bundle "${dependencyName}" not found`);
|
|
10
7
|
}
|
|
@@ -12,9 +9,10 @@ function dependencyNamesToBundles(dependencyNames, bundles) {
|
|
|
12
9
|
});
|
|
13
10
|
}
|
|
14
11
|
export function resolveBundleDependencies(packageConfig, existingBundles) {
|
|
12
|
+
const bundlesByName = packageNameMap(existingBundles);
|
|
15
13
|
return {
|
|
16
|
-
bundleDependencies: dependencyNamesToBundles(packageConfig.bundleDependencies ?? [],
|
|
17
|
-
bundlePeerDependencies: dependencyNamesToBundles(packageConfig.bundlePeerDependencies ?? [],
|
|
14
|
+
bundleDependencies: dependencyNamesToBundles(packageConfig.bundleDependencies ?? [], bundlesByName),
|
|
15
|
+
bundlePeerDependencies: dependencyNamesToBundles(packageConfig.bundlePeerDependencies ?? [], bundlesByName)
|
|
18
16
|
};
|
|
19
17
|
}
|
|
20
18
|
//# sourceMappingURL=bundle-dependency-resolution.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-dependency-resolution.js","sourceRoot":"","sources":["../../../../../source/packtory/options/bundle-dependency-resolution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundle-dependency-resolution.js","sourceRoot":"","sources":["../../../../../source/packtory/options/bundle-dependency-resolution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,SAAS,wBAAwB,CAC7B,eAAkC,EAClC,aAA2C;IAE3C,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE;QAC1C,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,qBAAqB,cAAc,aAAa,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,cAAc,CAAC;IAC1B,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,yBAAyB,CACrC,aAA4B,EAC5B,eAAmC;IAKnC,MAAM,aAAa,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;IAEtD,OAAO;QACH,kBAAkB,EAAE,wBAAwB,CAAC,aAAa,CAAC,kBAAkB,IAAI,EAAE,EAAE,aAAa,CAAC;QACnG,sBAAsB,EAAE,wBAAwB,CAAC,aAAa,CAAC,sBAAsB,IAAI,EAAE,EAAE,aAAa,CAAC;KAC9G,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-trigger.js","sourceRoot":"","sources":["../../../../../source/packtory/options/version-trigger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version-trigger.js","sourceRoot":"","sources":["../../../../../source/packtory/options/version-trigger.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,qBAAqB,CAAC,cAA6B,EAAE,OAA+B;IAChG,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,cAAc,CAAC,KAAK,CAAC;IAChC,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;QAChC,OAAO,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IACtC,CAAC;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,cAAc,IAAI,OAAO,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,cAA6B,EAAE,OAA+B;IAChG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,OAAO,cAAc,CAAC,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,KAAK,SAAS,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,mBAAmB,CAC/B,cAA6B,EAC7B,OAA+B,EAC/B,OAAgB;IAEhB,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,iBAAiB,CAAC;IAC7B,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;QAChC,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,IAAI,cAAc,CAAC,MAAM,EAAE,CAAC;QACxB,OAAO,iBAAiB,CAAC;IAC7B,CAAC;IACD,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QAClD,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC"}
|