vanilla-builder 0.1.0 → 0.3.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/CHANGELOG.md +41 -0
- package/README.es.md +553 -107
- package/README.md +545 -101
- package/bin/builder.js +432 -46
- package/package.json +21 -4
- package/src/browsers.js +128 -0
- package/src/budgets.js +77 -0
- package/src/builder.js +612 -165
- package/src/compress.js +44 -0
- package/src/config.js +280 -190
- package/src/deps.js +70 -6
- package/src/files.js +19 -7
- package/src/html.js +10 -3
- package/src/i18n.js +33 -0
- package/src/images.js +61 -0
- package/src/js.js +123 -74
- package/src/jsimports.js +54 -0
- package/src/jsinfo.js +81 -6
- package/src/obfuscate.js +8 -4
- package/src/optional.js +7 -3
- package/src/output.js +37 -9
- package/src/plugins.js +126 -0
- package/src/pool.js +343 -0
- package/src/report.js +23 -22
- package/src/server.js +8 -4
- package/src/tersercore.js +33 -0
- package/src/urls.js +3 -0
- package/src/util.js +5 -1
- package/src/verify.js +37 -27
- package/src/worker.js +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [0.3.0] - 2026-11-09
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **English messages** by default, Spanish when the system is in Spanish; choose with `--lang en|es` or `BUILDER_LANG`. `--json` field names and `perf.phases` names are always English.
|
|
10
|
+
- **Target browsers** from `browserslist` (`.browserslistrc` or `package.json`), the new `browsers` option or `--browsers`: vendor prefixes, flattened CSS nesting and lowered JS syntax. Optional peer `browserslist`.
|
|
11
|
+
- **Image optimization** (`images`, `--images`, `--image-quality`): PNG recompressed losslessly and checked pixel by pixel; JPEG/WebP re-encoded at a chosen quality, keeping metadata. Optional peer `sharp`.
|
|
12
|
+
- **Size budgets** (`budgets`, `--budget pattern=size`): per pattern or total, by size, gzip or brotli; going over fails the build before touching `dist/`.
|
|
13
|
+
- **Plugins** with `transform` (on the source, before processing), `buildStart` and `buildEnd`; as objects in `builder.config.mjs` or package names in JSON.
|
|
14
|
+
- **GitHub Action** (`uses: MarioACo/vanilla-builder@v0.3.0`): cached builds, size summary, self-updating PR comment, outputs.
|
|
15
|
+
- `builder dev` reloads only the stylesheets when only CSS changed, keeping page state.
|
|
16
|
+
- Runnable `examples/` (classic site, TypeScript, protected app), checked by the test suite.
|
|
17
|
+
- `bench/compare`: reproducible comparison with Parcel and Vite (correctness in Chromium, time, size).
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Unknown command-line options are now errors with a suggestion, instead of being ignored.
|
|
22
|
+
- Classic scripts transpiled for older browsers keep esbuild's temporary variables under a per-file prefix, instead of falling back to the untranspiled code.
|
|
23
|
+
- Cache keys include the message language and, for images, the `sharp` version.
|
|
24
|
+
|
|
25
|
+
## [0.2.0] - 2026-11-09
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **TypeScript**: `.ts`, `.mts` and `.cts` files are transpiled with esbuild (using `tsconfig.json`) and published as `.js`; the HTML is rewritten to the output. Extensionless, directory and `.ts` imports, and `new URL('./worker.ts', import.meta.url)`, keep working even without bundling. `.d.ts` and `*.test.ts` are not published.
|
|
30
|
+
- **`builder deps`**: lists which JS files are third-party libraries (and why) and which are yours; `builder deps add|own|reset <pattern…>` edits `builder.config.json` safely.
|
|
31
|
+
- Mark dependencies without config: `data-builder="dependency|own"` on a `<script>`, or `/* @builder-dependency */` / `/* @builder-own */` at the top of the file.
|
|
32
|
+
- New detection signals: UMD/AMD wrappers and files named like a package in `package.json` `dependencies`.
|
|
33
|
+
- **Worker threads** for obfuscation, terser and the final syntax check (`workers`, `--workers`), with the main thread helping while they start.
|
|
34
|
+
- **Persistent cache** of slow results by content (`cache`, `--no-cache`, `BUILDER_CACHE_DIR`); output is byte-identical with or without it.
|
|
35
|
+
- `perf` in the result and in `--json`: tasks, threads, cache hits and milliseconds per phase.
|
|
36
|
+
- `npm run bench`: reproducible benchmark on a generated site.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- Independent files (classic scripts, standalone files, CSS, module outputs, compression) are processed concurrently and registered in the original order.
|
|
41
|
+
- gzip/brotli sizes for the report are computed asynchronously, once, and shared with `--compress`.
|
|
42
|
+
- The ES level of each file is computed only when needed; global-variable checks use a single parse.
|
|
43
|
+
|
|
5
44
|
## [0.1.0] - 2026-11-08
|
|
6
45
|
|
|
7
46
|
First public release.
|
|
@@ -18,4 +57,6 @@ First public release.
|
|
|
18
57
|
- Projects opened through a symlink or junction (e.g. macOS `/tmp`) now build; the root is resolved to its real path.
|
|
19
58
|
- MIT license, CI on Node 16–24 (Linux, Windows, macOS) and browser equivalence tests in Chrome.
|
|
20
59
|
|
|
60
|
+
[0.3.0]: https://github.com/MarioACo/vanilla-builder/releases/tag/v0.3.0
|
|
61
|
+
[0.2.0]: https://github.com/MarioACo/vanilla-builder/releases/tag/v0.2.0
|
|
21
62
|
[0.1.0]: https://github.com/MarioACo/vanilla-builder/releases/tag/v0.1.0
|