@savvy-web/bundler 2.6.3 → 2.7.1
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/og.js +1 -1
- package/package.json +5 -4
- package/run.js +3 -2
- package/runtime-env.js +20 -0
- package/tsdoc-metadata.json +1 -1
package/og.js
CHANGED
|
@@ -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.7.1",
|
|
125
125
|
satori: peerVersion("satori"),
|
|
126
126
|
resvg: peerVersion("@resvg/resvg-js"),
|
|
127
127
|
colors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/bundler",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
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,9 +37,10 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@
|
|
40
|
+
"@effected/env": "^0.7.0",
|
|
41
|
+
"@savvy-web/tsdown-plugins": "^2.11.3",
|
|
41
42
|
"@tsdown/exe": "^0.23.2",
|
|
42
|
-
"effect": "^4.0.
|
|
43
|
+
"effect": "^4.0.7",
|
|
43
44
|
"rolldown": "^1.2.15",
|
|
44
45
|
"tsdown": "^0.23.2"
|
|
45
46
|
},
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"@types/react-dom": "^19.3.0",
|
|
51
52
|
"react": "^19.3.0",
|
|
52
53
|
"react-dom": "^19.3.0",
|
|
53
|
-
"satori": "^0.
|
|
54
|
+
"satori": "^0.63.2",
|
|
54
55
|
"typescript": "7.1.0-beta"
|
|
55
56
|
},
|
|
56
57
|
"peerDependenciesMeta": {
|
package/run.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineBuild, parseArgs } from "./config.js";
|
|
2
|
+
import { isCi, reportNoColor } from "./runtime-env.js";
|
|
2
3
|
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
4
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
5
|
import { dirname, join } from "node:path";
|
|
@@ -241,7 +242,7 @@ async function runBuild(config, options) {
|
|
|
241
242
|
const rendered = await Effect.runPromise(renderReport(collector.snapshot(packageName), {
|
|
242
243
|
...explicitFormat !== void 0 ? { explicitFormat } : {},
|
|
243
244
|
verbose,
|
|
244
|
-
noColor:
|
|
245
|
+
noColor: reportNoColor()
|
|
245
246
|
}).pipe(Effect.provide(ReportPipeline)));
|
|
246
247
|
for (const output of rendered) writeOutput(output);
|
|
247
248
|
};
|
|
@@ -274,7 +275,7 @@ async function runBuild(config, options) {
|
|
|
274
275
|
});
|
|
275
276
|
if (target === "prod" && resolution !== void 0) writeBinding(cwd, resolution);
|
|
276
277
|
if (target === "prod" && config.meta !== false && config.emitDts !== false && (config.exe === void 0 || hasJsEntries)) {
|
|
277
|
-
const ci =
|
|
278
|
+
const ci = isCi();
|
|
278
279
|
await runMetaPass({
|
|
279
280
|
cwd,
|
|
280
281
|
packageName,
|
package/runtime-env.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Option } from "effect";
|
|
2
|
+
import { RuntimeEnv, TerminalEnv } from "@effected/env";
|
|
3
|
+
|
|
4
|
+
// src/runtime-env.ts
|
|
5
|
+
/**
|
|
6
|
+
* Whether the build runs under CI, by `@effected/env`'s one rule (a known provider's marker, or a truthy `CI` /
|
|
7
|
+
* `CONTINUOUS_INTEGRATION`) — the same rule `@savvy-web/tsdown-plugins` and `@savvy-web/github-action-builder` use.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
const isCi = (env = process.env) => Option.isSome(RuntimeEnv.fromRecord(env).ci);
|
|
12
|
+
/**
|
|
13
|
+
* Whether the build report must be painted without colour: `@effected/env`'s colour level for stdout is `none`.
|
|
14
|
+
* `FORCE_COLOR` decides alone when set, then a non-TTY stdout, `NO_COLOR` / `TERM=dumb`, and the terminal table.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
const reportNoColor = (env = process.env, isTTY = process.stdout.isTTY === true) => TerminalEnv.colorLevelFrom(env, isTTY) === "none";
|
|
19
|
+
|
|
20
|
+
export { isCi, reportNoColor };
|