@savvy-web/tsdown-plugins 2.11.3 → 2.11.5
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/build/sync-public.js +1 -1
- package/config-validation/ConfigValidator.js +1 -1
- package/index.js +23 -23
- package/manifest/transform.js +1 -1
- package/meta/api-extractor.js +21 -4
- package/meta/og-image.js +2 -1
- package/meta/run-pass.js +3 -3
- package/package.json +16 -16
- package/tsdoc-metadata.json +1 -1
package/build/sync-public.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigValidationError } from "../errors.js";
|
|
2
1
|
import { findRelativeSpecifiers } from "../dts/relative-imports.js";
|
|
2
|
+
import { ConfigValidationError } from "../errors.js";
|
|
3
3
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from "node:fs";
|
|
4
4
|
import { dirname, join, resolve } from "node:path";
|
|
5
5
|
import { Result } from "effect";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigValidationError } from "../errors.js";
|
|
2
1
|
import { normalizeLooseFiles } from "../build/loose-files.js";
|
|
2
|
+
import { ConfigValidationError } from "../errors.js";
|
|
3
3
|
import { normalizeExeOptions } from "../exe/config.js";
|
|
4
4
|
import { resolveTargets } from "../targets/resolve-targets.js";
|
|
5
5
|
import { existsSync, statSync } from "node:fs";
|
package/index.js
CHANGED
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { buildResolvedTsconfig, writeDtsEmitTsconfig, writeResolvedTsconfig } from "./dts/resolved-tsconfig.js";
|
|
3
|
-
import { ConfigValidationError, MetaGenerationError, TsdoctorEmitError } from "./errors.js";
|
|
4
|
-
import { createEntryName, extractEntries } from "./entry/extract.js";
|
|
5
|
-
import { ambientOutName, assertNoEntryCollisions, classifyDtsExport, declarationExt, extractAmbientDts, mixedDtsExportError } from "./entry/ambient-dts.js";
|
|
6
|
-
import { resolveManifest } from "./catalog/resolve-catalogs.js";
|
|
7
|
-
import { defaultManifestTransform, normalizeBinPaths, transformBin, transformExports, transformManifest } from "./manifest/transform.js";
|
|
8
|
-
import { buildEmittedManifest, emitManifest } from "./manifest/emit-manifest.js";
|
|
9
|
-
import { buildMetricsPlugin } from "./report/metrics-plugin.js";
|
|
10
|
-
import { createTimer, formatTime } from "./report/timer.js";
|
|
11
|
-
import { createTsdownLogger } from "./report/tsdown-logger.js";
|
|
1
|
+
import { buildTargetGroups } from "./build/build-target-groups.js";
|
|
12
2
|
import { cjsDefaultInterop } from "./build/cjs-default-interop.js";
|
|
3
|
+
import { normalizeLooseFiles } from "./build/loose-files.js";
|
|
13
4
|
import { nodeBuiltinDefaultInterop } from "./build/node-builtin-default-interop.js";
|
|
14
|
-
import {
|
|
5
|
+
import { removeDeclarationMaps } from "./build/strip-maps.js";
|
|
15
6
|
import { copyAmbientDts, copyPublicDir } from "./build/sync-public.js";
|
|
16
7
|
import { deriveTargetGroupOptions, dtsPassDtsOptions } from "./build/target-groups.js";
|
|
17
|
-
import {
|
|
18
|
-
import { normalizeLooseFiles } from "./build/loose-files.js";
|
|
19
|
-
import { removeDeclarationMaps } from "./build/strip-maps.js";
|
|
8
|
+
import { resolveManifest } from "./catalog/resolve-catalogs.js";
|
|
20
9
|
import { resolveNextVersions } from "./changesets/next-versions.js";
|
|
21
|
-
import { DEFAULT_EXE_NODE_VERSION, normalizeExeOptions } from "./exe/config.js";
|
|
22
|
-
import { RELEASE_CHANNELS, isTargetObject } from "./targets/config.js";
|
|
23
|
-
import { releaseWarnings, resolveTargets } from "./targets/resolve-targets.js";
|
|
24
10
|
import { ConfigValidator } from "./config-validation/ConfigValidator.js";
|
|
11
|
+
import { analyzeReexportBarrel, collectExportNames, renderReexportStub } from "./dts/reexport-stub.js";
|
|
12
|
+
import { findRelativeSpecifiers } from "./dts/relative-imports.js";
|
|
13
|
+
import { buildResolvedTsconfig, writeDtsEmitTsconfig, writeResolvedTsconfig } from "./dts/resolved-tsconfig.js";
|
|
14
|
+
import { ambientOutName, assertNoEntryCollisions, classifyDtsExport, declarationExt, extractAmbientDts, mixedDtsExportError } from "./entry/ambient-dts.js";
|
|
15
|
+
import { createEntryName, extractEntries } from "./entry/extract.js";
|
|
25
16
|
import { packageJsonEntries } from "./entry/package-json-entries.js";
|
|
17
|
+
import { ConfigValidationError, MetaGenerationError, TsdoctorEmitError } from "./errors.js";
|
|
26
18
|
import { runExeBuild } from "./exe/build.js";
|
|
19
|
+
import { DEFAULT_EXE_NODE_VERSION, normalizeExeOptions } from "./exe/config.js";
|
|
27
20
|
import { computeExeFileName } from "./exe/filename.js";
|
|
28
21
|
import { readTsconfigJsx, resolveJsxConfig } from "./jsx/config.js";
|
|
22
|
+
import { buildEmittedManifest, emitManifest } from "./manifest/emit-manifest.js";
|
|
23
|
+
import { defaultManifestTransform, normalizeBinPaths, transformBin, transformExports, transformManifest } from "./manifest/transform.js";
|
|
29
24
|
import { normalizeMetaOptions } from "./meta/config.js";
|
|
25
|
+
import { generateMeta } from "./meta/generate.js";
|
|
30
26
|
import { OgGenerateError, resolveOgCacheSalt, writeGeneratedOgImage } from "./meta/og-image.js";
|
|
27
|
+
import { rewriteMetaVersions } from "./meta/optimistic.js";
|
|
28
|
+
import { applySubdirMetaEntries, deriveExportPaths, runMetaPass } from "./meta/run-pass.js";
|
|
31
29
|
import { resolvePortableTsconfig } from "./meta/tsconfig-resolver.js";
|
|
32
30
|
import { composeTsdoctorManifest, githubOwnerRepo, ogImageInfoOf, registriesFromTargets } from "./meta/tsdoctor-manifest.js";
|
|
33
|
-
import { generateMeta } from "./meta/generate.js";
|
|
34
|
-
import { rewriteMetaVersions } from "./meta/optimistic.js";
|
|
35
31
|
import { TsdoctorSourceError, loadTsdoctorSources } from "./meta/tsdoctor-source.js";
|
|
36
|
-
import { applySubdirMetaEntries, deriveExportPaths, runMetaPass } from "./meta/run-pass.js";
|
|
37
|
-
import { BuildReport, ReportTimings, TargetGroupReport } from "./report/schema.js";
|
|
38
32
|
import { BuildCollector, BuildCollectorTag } from "./report/collector.js";
|
|
39
33
|
import { CiAnnotationsFormatter } from "./report/formatters/ci-annotations.js";
|
|
40
34
|
import { JsonFormatter } from "./report/formatters/json.js";
|
|
@@ -42,12 +36,18 @@ import { MarkdownFormatter } from "./report/formatters/markdown.js";
|
|
|
42
36
|
import { SilentFormatter } from "./report/formatters/silent.js";
|
|
43
37
|
import { TerminalFormatter } from "./report/formatters/terminal.js";
|
|
44
38
|
import { flattenIssues, serializeIssues, writeIssuesArtifact } from "./report/issues-artifact.js";
|
|
39
|
+
import { buildMetricsPlugin } from "./report/metrics-plugin.js";
|
|
40
|
+
import { ReportPipeline, renderReport } from "./report/pipeline.js";
|
|
41
|
+
import { BuildReport, ReportTimings, TargetGroupReport } from "./report/schema.js";
|
|
45
42
|
import { EnvironmentDetector } from "./report/services/EnvironmentDetector.js";
|
|
46
43
|
import { ExecutorResolver } from "./report/services/ExecutorResolver.js";
|
|
47
44
|
import { FormatSelector } from "./report/services/FormatSelector.js";
|
|
48
45
|
import { OutputRenderer } from "./report/services/OutputRenderer.js";
|
|
49
|
-
import {
|
|
46
|
+
import { createTimer, formatTime } from "./report/timer.js";
|
|
47
|
+
import { createTsdownLogger } from "./report/tsdown-logger.js";
|
|
50
48
|
import { writeTargetsBinding } from "./targets/binding.js";
|
|
49
|
+
import { RELEASE_CHANNELS, isTargetObject } from "./targets/config.js";
|
|
50
|
+
import { releaseWarnings, resolveTargets } from "./targets/resolve-targets.js";
|
|
51
51
|
import { CatalogAssemblyError, DependencyResolutionError, ManifestDecodeError, UnresolvedDependencyError } from "@effected/npm";
|
|
52
52
|
|
|
53
53
|
export { BuildCollector, BuildCollectorTag, BuildReport as BuildReportSchema, CatalogAssemblyError, CiAnnotationsFormatter, ConfigValidationError, ConfigValidator, DEFAULT_EXE_NODE_VERSION, DependencyResolutionError, EnvironmentDetector, ExecutorResolver, FormatSelector, JsonFormatter, ManifestDecodeError, MarkdownFormatter, MetaGenerationError, OgGenerateError, OutputRenderer, RELEASE_CHANNELS, ReportPipeline, ReportTimings, SilentFormatter, TargetGroupReport as TargetGroupReportSchema, TerminalFormatter, TsdoctorEmitError, TsdoctorSourceError, UnresolvedDependencyError, ambientOutName, analyzeReexportBarrel, applySubdirMetaEntries, assertNoEntryCollisions, buildEmittedManifest, buildMetricsPlugin, buildResolvedTsconfig, buildTargetGroups, cjsDefaultInterop, classifyDtsExport, collectExportNames, composeTsdoctorManifest, computeExeFileName, copyAmbientDts, copyPublicDir, createEntryName, createTimer, createTsdownLogger, declarationExt, defaultManifestTransform, deriveExportPaths, deriveTargetGroupOptions, dtsPassDtsOptions, emitManifest, extractAmbientDts, extractEntries, findRelativeSpecifiers, flattenIssues, formatTime, generateMeta, githubOwnerRepo, isTargetObject, loadTsdoctorSources, mixedDtsExportError, nodeBuiltinDefaultInterop, normalizeBinPaths, normalizeExeOptions, normalizeLooseFiles, normalizeMetaOptions, ogImageInfoOf, packageJsonEntries, readTsconfigJsx, registriesFromTargets, releaseWarnings, removeDeclarationMaps, renderReexportStub, renderReport, resolveJsxConfig, resolveManifest, resolveNextVersions, resolveOgCacheSalt, resolvePortableTsconfig, resolveTargets, rewriteMetaVersions, runExeBuild, runMetaPass, serializeIssues, transformBin, transformExports, transformManifest, writeDtsEmitTsconfig, writeGeneratedOgImage, writeIssuesArtifact, writeResolvedTsconfig, writeTargetsBinding };
|
package/manifest/transform.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createEntryName } from "../entry/extract.js";
|
|
2
1
|
import { ambientOutName, classifyDtsExport, mixedDtsExportError } from "../entry/ambient-dts.js";
|
|
2
|
+
import { createEntryName } from "../entry/extract.js";
|
|
3
3
|
import { PackageJsonFormat } from "@effected/package-json";
|
|
4
4
|
|
|
5
5
|
// src/manifest/transform.ts
|
package/meta/api-extractor.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { MetaGenerationError } from "../errors.js";
|
|
2
|
+
import { tsconfigSyncOptions } from "../tsconfig/sync-options.js";
|
|
2
3
|
import { createMessageSuppressor } from "./message-suppressor.js";
|
|
3
|
-
import { existsSync,
|
|
4
|
+
import { existsSync, writeFileSync } from "node:fs";
|
|
4
5
|
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
5
6
|
import { tmpdir } from "node:os";
|
|
7
|
+
import { TsconfigLoaderSync } from "@effected/tsconfig-json";
|
|
6
8
|
import { createHash } from "node:crypto";
|
|
7
9
|
import { Extractor, ExtractorConfig, ExtractorLogLevel } from "@microsoft/api-extractor";
|
|
8
10
|
import { TSDocConfigFile } from "@microsoft/tsdoc-config";
|
|
@@ -54,14 +56,29 @@ function writeApiExtractorTsconfig(options) {
|
|
|
54
56
|
writeFileSync(path, `${JSON.stringify(cfg, null, " ")}\n`, "utf-8");
|
|
55
57
|
return path;
|
|
56
58
|
}
|
|
57
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* The base tsconfig's effective `compilerOptions.paths`, with every relative target made absolute.
|
|
61
|
+
*
|
|
62
|
+
* A `compilerOptions.paths` in the derived config replaces the inherited one wholesale, so the base's
|
|
63
|
+
* mappings must be re-emitted, and they must keep resolving where they did. TypeScript resolves a
|
|
64
|
+
* relative target against `baseUrl` when one is in effect, and otherwise against the directory of the
|
|
65
|
+
* config that declared `paths`. Re-emitted verbatim from the derived config in the tmpdir, a target such
|
|
66
|
+
* as `./src/*` would resolve under the tmpdir instead. The chain is resolved with the same tsc-parity
|
|
67
|
+
* loader the portable-tsconfig resolver uses (`extends`, JSONC, an absolutized `baseUrl`, `pathsBase`),
|
|
68
|
+
* so `paths` inherited from further up the chain are kept too. Best-effort: a base that cannot be
|
|
69
|
+
* resolved contributes no paths.
|
|
70
|
+
*/
|
|
58
71
|
function readBasePaths(absBase) {
|
|
72
|
+
let resolved;
|
|
59
73
|
try {
|
|
60
|
-
|
|
61
|
-
return typeof paths === "object" && paths !== null && !Array.isArray(paths) ? paths : {};
|
|
74
|
+
resolved = TsconfigLoaderSync.resolve(absBase, tsconfigSyncOptions);
|
|
62
75
|
} catch {
|
|
63
76
|
return {};
|
|
64
77
|
}
|
|
78
|
+
const paths = resolved.compilerOptions.paths;
|
|
79
|
+
if (paths === void 0) return {};
|
|
80
|
+
const anchor = resolved.compilerOptions.baseUrl ?? resolved.pathsBase ?? dirname(absBase);
|
|
81
|
+
return Object.fromEntries(Object.entries(paths).map(([key, targets]) => [key, targets.map((target) => isAbsolute(target) ? target : resolve(anchor, target))]));
|
|
65
82
|
}
|
|
66
83
|
/**
|
|
67
84
|
* Map an API Extractor message to a collector DiagnosticInput, or undefined if not warn/error.
|
package/meta/og-image.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { Data, Effect, Layer, Option, Result, Schema } from "effect";
|
|
4
|
+
import * as NodeCrypto from "@effect/platform-node/NodeCrypto";
|
|
4
5
|
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
5
6
|
import { ImageBackend, ImageCache, ImageCacheKey } from "@effected/images/cache";
|
|
6
7
|
|
|
@@ -79,7 +80,7 @@ async function writeGeneratedOgImage(options) {
|
|
|
79
80
|
try: () => options.generate(options.info),
|
|
80
81
|
catch: (cause) => cause
|
|
81
82
|
}), { accept: ACCEPT });
|
|
82
|
-
}).pipe(Effect.provide(ImageCache.layer.pipe(Layer.provide(backend), Layer.provideMerge(NodeServices.layer))), Effect.result, Effect.runPromise);
|
|
83
|
+
}).pipe(Effect.provide(ImageCache.layer.pipe(Layer.provide(backend), Layer.provideMerge(Layer.merge(NodeServices.layer, NodeCrypto.layerDigest)))), Effect.result, Effect.runPromise);
|
|
83
84
|
if (Result.isFailure(result)) throw new OgGenerateError({
|
|
84
85
|
packageName,
|
|
85
86
|
cause: result.failure
|
package/meta/run-pass.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TsdoctorEmitError } from "../errors.js";
|
|
2
|
-
import { createEntryName } from "../entry/extract.js";
|
|
3
1
|
import { declarationsDirFor } from "../build/target-groups.js";
|
|
4
2
|
import { resolveNextVersions } from "../changesets/next-versions.js";
|
|
3
|
+
import { createEntryName } from "../entry/extract.js";
|
|
4
|
+
import { TsdoctorEmitError } from "../errors.js";
|
|
5
5
|
import { normalizeMetaOptions } from "./config.js";
|
|
6
|
-
import { OgGenerateError } from "./og-image.js";
|
|
7
6
|
import { generateMeta } from "./generate.js";
|
|
7
|
+
import { OgGenerateError } from "./og-image.js";
|
|
8
8
|
import { rewriteMetaVersions } from "./optimistic.js";
|
|
9
9
|
import { TsdoctorSourceError, loadTsdoctorSources } from "./tsdoctor-source.js";
|
|
10
10
|
import { join } from "node:path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/tsdown-plugins",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Interface-only tsdown/rolldown plugin pack powering @savvy-web/bundler",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/tsdown-plugins",
|
|
@@ -30,25 +30,25 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@changesets/get-release-plan": "^5.0.2",
|
|
33
|
-
"@effect/platform-node": "
|
|
34
|
-
"@effected/env": "^0.
|
|
35
|
-
"@effected/glob": "^0.
|
|
36
|
-
"@effected/images": "^0.
|
|
37
|
-
"@effected/jsonc": "^0.
|
|
38
|
-
"@effected/npm": "^0.
|
|
39
|
-
"@effected/package-json": "^0.
|
|
40
|
-
"@effected/semver": "^0.
|
|
41
|
-
"@effected/tsconfig-json": "^0.
|
|
42
|
-
"@effected/walker": "^0.
|
|
43
|
-
"@effected/workspaces": "^0.
|
|
33
|
+
"@effect/platform-node": "~4.1.1",
|
|
34
|
+
"@effected/env": "^0.9.0",
|
|
35
|
+
"@effected/glob": "^0.17.0",
|
|
36
|
+
"@effected/images": "^0.8.0",
|
|
37
|
+
"@effected/jsonc": "^0.22.0",
|
|
38
|
+
"@effected/npm": "^0.29.0",
|
|
39
|
+
"@effected/package-json": "^0.28.0",
|
|
40
|
+
"@effected/semver": "^0.20.0",
|
|
41
|
+
"@effected/tsconfig-json": "^0.19.0",
|
|
42
|
+
"@effected/walker": "^0.24.0",
|
|
43
|
+
"@effected/workspaces": "^0.41.0",
|
|
44
44
|
"@jridgewell/sourcemap-codec": "^1.6.0",
|
|
45
|
-
"@microsoft/api-extractor": "^7.
|
|
45
|
+
"@microsoft/api-extractor": "^7.60.1",
|
|
46
46
|
"@microsoft/tsdoc": "~0.17.1",
|
|
47
47
|
"@microsoft/tsdoc-config": "~0.18.3",
|
|
48
|
-
"@tsdoctor/manifest": "^0.
|
|
49
|
-
"effect": "
|
|
48
|
+
"@tsdoctor/manifest": "^0.3.0",
|
|
49
|
+
"effect": "~4.1.1",
|
|
50
50
|
"picocolors": "^1.1.1",
|
|
51
|
-
"tsdown": "^0.23.
|
|
51
|
+
"tsdown": "^0.23.4",
|
|
52
52
|
"typescript": "7.1.0-beta"
|
|
53
53
|
}
|
|
54
54
|
}
|