@jk2908/solas 0.4.1 → 0.4.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2 - 2026-05-22
4
+
5
+ - Changed `precompress` to default to `false`, so Solas no longer emits precompressed build output unless you opt in.
6
+ - Narrowed precompression to browser-served client assets and full prerendered HTML, so enabling `precompress` no longer writes `.br` files for internal `.solas` support artifacts.
7
+
3
8
  ## 0.4.1 - 2026-05-22
4
9
 
5
10
  - Fixed redirect recovery during prerender and production HTML rendering, so redirecting routes now resolve as redirects instead of failing as generic Server Components render errors.
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import { postbuild } from './internal/postbuild.js';
16
16
  import { collect as collectPublicFiles } from './internal/public-files.js';
17
17
  import { Solas } from './solas.js';
18
18
  const DEFAULT_CONFIG = {
19
- precompress: true,
19
+ precompress: false,
20
20
  prerender: false,
21
21
  trustedOrigins: [],
22
22
  trailingSlash: 'never',
@@ -77,17 +77,6 @@ export async function postbuild(cwd = process.cwd()) {
77
77
  ? ['metadata', 'prelude', 'postponed']
78
78
  : ['metadata', 'prelude'],
79
79
  };
80
- logger.info('[prerender:artifacts]', JSON.stringify({
81
- route,
82
- prelude: artifact.html,
83
- postponed: artifact.postponed ?? null,
84
- metadata: {
85
- schema: artifact.schema,
86
- route: artifact.route,
87
- createdAt: artifact.createdAt,
88
- mode: artifact.mode,
89
- },
90
- }));
91
80
  logger.info('[prerender]', `${route} (ppr)`);
92
81
  return;
93
82
  }
@@ -137,7 +126,23 @@ export async function postbuild(cwd = process.cwd()) {
137
126
  if (manifest.precompress) {
138
127
  logger.info('[precompress]', 'compressing assets...');
139
128
  for await (const { input, compressed } of Compress.run(outDir, {
140
- filter: f => /\.(js|css|html|svg|json|txt)$/.test(f),
129
+ filter: filePath => {
130
+ const relativePath = path.relative(outDir, filePath);
131
+ if (relativePath.length === 0 ||
132
+ relativePath.startsWith('..') ||
133
+ path.isAbsolute(relativePath)) {
134
+ return false;
135
+ }
136
+ const normalisedPath = relativePath.split(path.sep).join('/');
137
+ // only browser-served client/public files benefit from generic precompression
138
+ if (normalisedPath.startsWith('client/')) {
139
+ return /\.(js|css|html|svg|json|txt)$/.test(normalisedPath);
140
+ }
141
+ // full prerendered html is served straight from disk, but internal ppr
142
+ // support files like prelude/metadata/postponed are read by the server
143
+ return (normalisedPath.startsWith(`${Solas.Config.GENERATED_DIR}/ppr/`) &&
144
+ normalisedPath.endsWith(`/${Prerender.Artifact.FULL_PRERENDER_FILENAME}`));
145
+ },
141
146
  })) {
142
147
  await Bun.write(`${input}.br`, compressed);
143
148
  logger.info('[precompress]', `${path.basename(input)}.br`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jk2908/solas",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "A Vite + React meta-framework exploring streaming, Server Components, and partial prerendering. Designed for simplicity and lightness",
5
5
  "keywords": [
6
6
  "framework",