@savvy-web/bundler 2.5.4 → 2.6.0
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/config.js +1 -2
- package/index.d.ts +0 -4
- package/og.d.ts +0 -2
- package/og.js +2 -3
- package/package.json +4 -4
- package/run.js +11 -3
package/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defaultManifestTransform } from "@savvy-web/tsdown-plugins";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/config.ts
|
|
4
4
|
/**
|
|
5
5
|
* Normalize + validate a defineBuild config. Pure when imported; self-runs when entry (see run.ts).
|
|
6
6
|
*
|
|
@@ -50,5 +50,4 @@ function parseArgs(argv) {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
//#endregion
|
|
54
53
|
export { defineBuild, parseArgs };
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AmbientDtsEntry, BuildFormat, BuildPlatform, BuildReport, BuildTargetGroupsOptions, CssOptions, ExeConfig, GenerateMetaOptions, Json, JsxConfig, LooseFiles, MetaOptions, MetaResult, NextVersions, OgImageGenerator, OgImageInfo, PublishTargets, RenderedOutput, RunExeBuildOptions, TargetGroupRef, TargetResolution, TsconfigJsx, TsdoctorMetaOptions, defaultManifestTransform, extractAmbientDts } from "@savvy-web/tsdown-plugins";
|
|
2
2
|
import { Plugin, Plugin as Plugin$1 } from "rolldown";
|
|
3
|
-
//#region src/config.d.ts
|
|
4
3
|
/** @public */
|
|
5
4
|
interface BuildEntryOverride {
|
|
6
5
|
/** Export paths to pin to this partition, e.g. "./changesets/markdownlint" (or "." for root). */
|
|
@@ -227,8 +226,6 @@ interface ParsedArgs {
|
|
|
227
226
|
}
|
|
228
227
|
/** Parse the build CLI argv into the normalized target/flags shape. @public */
|
|
229
228
|
export declare function parseArgs(argv: ReadonlyArray<string>): ParsedArgs;
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/run.d.ts
|
|
232
229
|
/** @public */
|
|
233
230
|
interface RunOptions {
|
|
234
231
|
readonly cwd: string;
|
|
@@ -289,6 +286,5 @@ export declare function runBuild(config: BuildConfig, options: RunOptions): Prom
|
|
|
289
286
|
* @public
|
|
290
287
|
*/
|
|
291
288
|
export declare function build(input?: BuildConfigInput, overrides?: Partial<RunOptions>): Promise<void>;
|
|
292
|
-
//#endregion
|
|
293
289
|
export { type AmbientDtsEntry, type BuildConfig, type BuildConfigInput, type BuildEntryOverride, type OgImageGenerator, type OgImageInfo, type OutputConfig, type ParsedArgs, type Plugin, type RunOptions, type TsdoctorMetaOptions, defaultManifestTransform, extractAmbientDts };
|
|
294
290
|
//# sourceMappingURL=index.d.ts.map
|
package/og.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OgImageGenerator } from "@savvy-web/tsdown-plugins";
|
|
2
|
-
//#region src/og.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Colors for the default Open Graph card.
|
|
5
4
|
*
|
|
@@ -38,5 +37,4 @@ export interface SatoriOgOptions {
|
|
|
38
37
|
export declare const ogImage: {
|
|
39
38
|
satori(options?: SatoriOgOptions): OgImageGenerator;
|
|
40
39
|
};
|
|
41
|
-
//#endregion
|
|
42
40
|
//# sourceMappingURL=og.d.ts.map
|
package/og.js
CHANGED
|
@@ -3,7 +3,7 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/og.ts
|
|
7
7
|
/**
|
|
8
8
|
* The bundled Inter SemiBold face (SIL OFL 1.1; see `assets/LICENSE-Inter.txt`). Resolved
|
|
9
9
|
* relative to THIS module: the built `og.js` sits beside `assets/` at the package root, while the
|
|
@@ -121,7 +121,7 @@ const ogImage = { satori(options = {}) {
|
|
|
121
121
|
};
|
|
122
122
|
const cacheSalt = JSON.stringify({
|
|
123
123
|
renderer: "@savvy-web/bundler/og#satori",
|
|
124
|
-
version: "2.
|
|
124
|
+
version: "2.6.0",
|
|
125
125
|
satori: peerVersion("satori"),
|
|
126
126
|
resvg: peerVersion("@resvg/resvg-js"),
|
|
127
127
|
colors
|
|
@@ -147,5 +147,4 @@ const ogImage = { satori(options = {}) {
|
|
|
147
147
|
return Object.assign(render, { cacheSalt });
|
|
148
148
|
} };
|
|
149
149
|
|
|
150
|
-
//#endregion
|
|
151
150
|
export { ogImage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/bundler",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Zero-config tsdown-based bundler for Silk Suite TypeScript packages",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/bundler",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@savvy-web/tsdown-plugins": "2.
|
|
40
|
+
"@savvy-web/tsdown-plugins": "^2.10.0",
|
|
41
41
|
"@tsdown/exe": "^0.23.1",
|
|
42
|
-
"effect": "^4.0.
|
|
43
|
-
"rolldown": "^1.2.
|
|
42
|
+
"effect": "^4.0.6",
|
|
43
|
+
"rolldown": "^1.2.15",
|
|
44
44
|
"tsdown": "^0.23.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
package/run.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineBuild, parseArgs } from "./config.js";
|
|
2
|
-
import { BuildCollector, ConfigValidationError, ConfigValidator, ReportPipeline, assertNoEntryCollisions, buildEmittedManifest, buildTargetGroups, computeExeFileName, createEntryName, deriveExportPaths, extractAmbientDts, normalizeExeOptions, normalizeLooseFiles, packageJsonEntries, readTsconfigJsx, removeDeclarationMaps, renderReport, resolveJsxConfig, resolveTargets, runExeBuild, runMetaPass, writeIssuesArtifact, writeResolvedTsconfig, writeTargetsBinding } from "@savvy-web/tsdown-plugins";
|
|
2
|
+
import { BuildCollector, ConfigValidationError, ConfigValidator, ReportPipeline, assertNoEntryCollisions, buildEmittedManifest, buildTargetGroups, computeExeFileName, createEntryName, deriveExportPaths, extractAmbientDts, normalizeExeOptions, normalizeLooseFiles, packageJsonEntries, readTsconfigJsx, releaseWarnings, removeDeclarationMaps, renderReport, resolveJsxConfig, resolveTargets, runExeBuild, runMetaPass, writeIssuesArtifact, writeResolvedTsconfig, writeTargetsBinding } from "@savvy-web/tsdown-plugins";
|
|
3
3
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { Effect } from "effect";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/run.ts
|
|
8
8
|
/** Reduce a thrown value to the `{ name?, message }` shape the issues artifact stamps on a failed build. */
|
|
9
9
|
function describeFailure(err) {
|
|
10
10
|
if (err instanceof Error) return err.name !== "" ? {
|
|
@@ -226,6 +226,15 @@ async function runBuild(config, options) {
|
|
|
226
226
|
}],
|
|
227
227
|
resolution: void 0
|
|
228
228
|
} : deriveProdGroups(publishTargets, packageName);
|
|
229
|
+
if (resolution !== void 0) {
|
|
230
|
+
const anchor = resolution.groups[0]?.id ?? "npm";
|
|
231
|
+
for (const text of releaseWarnings(resolution)) collector.recordWarning(anchor, {
|
|
232
|
+
source: "config",
|
|
233
|
+
level: "warn",
|
|
234
|
+
code: "targets-no-final-release",
|
|
235
|
+
text
|
|
236
|
+
});
|
|
237
|
+
}
|
|
229
238
|
const explicitFormat = config.output?.format;
|
|
230
239
|
const writeOutput = options.writeOutput ?? ((o) => process.stdout.write(`${o.content}\n`));
|
|
231
240
|
renderAndWrite = async () => {
|
|
@@ -349,5 +358,4 @@ async function build(input = {}, overrides = {}) {
|
|
|
349
358
|
});
|
|
350
359
|
}
|
|
351
360
|
|
|
352
|
-
//#endregion
|
|
353
361
|
export { build, runBuild };
|