as-test 1.0.0 → 1.0.3

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,119 @@
1
1
  # Change Log
2
2
 
3
+ ## 2026-03-27 - 1.0.3
4
+
5
+ ### Parallel Execution
6
+
7
+ - perf: add persistent build workers for parallel `ast run` and `ast test` so AssemblyScript modules stay warm across file builds instead of spawning a fresh compiler process per build.
8
+ - perf: route normal and single-build-worker builds through the same persistent compiler-worker path so serial `ast test`, `ast run`, and `ast fuzz` runs also reuse the AssemblyScript API instead of spawning a fresh `asc` process per file.
9
+ - perf: make each queue worker own one file through all selected modes before releasing its slot, which removes mid-file mode interleaving across workers.
10
+ - feat: add `--parallel` with an automatic worker heuristic that stays in the 2-4 worker range for typical suites and only grows past that when there are substantially more files to process.
11
+ - fix: keep parallel mixed-mode builds correct by isolating long-lived compiler workers by build signature so WASI and bindings state does not leak between builds.
12
+ - fix: make `--jobs`, `--build-jobs`, and `--run-jobs` cooperate with ordered queue reporting while still emitting final per-file results as each file completes.
13
+
14
+ ### Docs
15
+
16
+ - docs: refresh the README and external docs set for the current explicit-import workflow, `ast init`, `--parallel`, the split snapshot flags, and the current fuzzing/runtime guidance.
17
+
18
+ ## 2026-03-25 - v1.0.2
19
+
20
+ ### Explicit Imports, Typings & Reporting
21
+
22
+ - feat: export the public fuzz option and fuzzer types directly from `assembly/index.ts` so runtime exports and package typings stay aligned.
23
+ - fix: remove the experimental side-effect `import "as-test"` path and return the package to explicit imports only in the transform, typings, examples, tests, and README.
24
+ - fix: remove the temporary declaration-file build path and return the package to a simpler no-`.d.ts` setup.
25
+ - fix: keep fuzzing green while leaving the in-repo AssemblyScript `IntegerOptions` ergonomics issue for a later API change.
26
+ - fix: align summary output columns for `failed`, `skipped`, and `total` across test/run/fuzz totals.
27
+ - fix: make `ast test --fuzz` print fuzz file results before the final combined summary, with one merged totals block that includes `Fuzz` alongside the normal test totals.
28
+
29
+ ### Assertions & Serialization
30
+
31
+ - feat: split equality matchers into `toBe`, `toEqual`, and `toStrictEqual` with explicit semantics:
32
+ - `toBe` uses identity / exact primitive equality
33
+ - `toEqual` uses deep equality
34
+ - `toStrictEqual` uses deep equality plus runtime-type matching for managed values.
35
+ - feat: support method-based class equality via `__as_test_equals(other, strict)`, with compile-time errors for unsupported managed classes instead of silent fallback behavior.
36
+ - feat: support method-based managed-value JSON serialization via `__as_test_json()`, with `__as_test_json_value()` exported for nested field serialization.
37
+
38
+ ### Runtime & Tooling
39
+
40
+ - refactor: replace the handwritten JS WIPC channel implementation with the `wipc-js` dependency.
41
+ - chore: switch CLI TypeScript module resolution to `Bundler` so package export maps resolve correctly.
42
+ - chore: run linting in the main test workflow in addition to the existing release workflow.
43
+ - chore: update `prettier` to `3.8.1` and `assemblyscript-prettier` to `3.0.4`.
44
+ - perf: trim WIPC traffic so passing expectations are not reported in realtime, while warnings and `log()` output now use structured events.
45
+
46
+ ### Config & Environment
47
+
48
+ - feat: allow `env` config values to come from a `.env` path, `KEY=value` array, or object map.
49
+ - feat: support merged env overrides at the top level, `buildOptions`, `runOptions`, and per-mode build/run config.
50
+ - feat: disable coverage by default and add `coverage.include` / `coverage.exclude` glob filters so projects can opt in and scope reports explicitly.
51
+
52
+ ### Web Runner
53
+
54
+ - feat: add a `web` target that runs bindings-style artifacts in a browser over a WebSocket-backed WIPC bridge.
55
+ - feat: scaffold `.as-test/runners/default.web.js` and a `web-headless` mode during `ast init --target web`.
56
+ - feat: prompt to install Chromium with Playwright when a web run starts without an available browser.
57
+ - fix: remove per-file web runner startup noise from normal test output.
58
+
59
+ ### Docs
60
+
61
+ - docs: remove outdated `run()` calls from README usage snippets where they are no longer needed.
62
+ - docs: add a `docs/` directory with focused guides for setup, tests, fuzzing, mocking, snapshots, coverage, reporters, assertions, config, CLI usage, and diagnostics.
63
+ - docs: link the new docs index from the main README.
64
+ - docs: reorder the README to follow the beginner workflow from installation through tests, mocking, snapshots, fuzzing, and runtimes.
65
+ - docs: simplify the main README and replace stale examples with snippets that reflect the current config shape and working APIs.
66
+ - docs: update snapshot CLI examples to use `--create-snapshots`.
67
+
68
+ ### CI
69
+
70
+ - fix: add a dedicated `test:ci` script and `as-test.ci.config.json` so CI stays on the Wasmtime/WASI path instead of fanning out into `web-headless`.
71
+ - fix: remove the baked-in `web-headless` mode from the repo's default config so the project defaults stay on the Wasmtime/WASI runner.
72
+ - feat: add a dedicated `examples.yml` workflow that runs the standalone examples individually on push.
73
+ - feat: install Chromium through Playwright for the `07-web` example job and pass its executable through `BROWSER`.
74
+ - feat: add local `act` defaults and package scripts so GitHub Actions workflows can be exercised before pushing.
75
+
76
+ ### Init & Examples
77
+
78
+ - feat: `ast init` can scaffold a basic fuzzer example and now writes `assembly/tsconfig.json` for editor-friendly AssemblyScript setup.
79
+ - feat: update the generated `.gitignore` block to keep the `.as-test/` root while excluding runners and snapshots.
80
+ - feat: add more standalone fuzzing examples and a dedicated `07-web` example project.
81
+ - fix: rename `05-mocking-and-import-snapshots` to `05-mocking-and-imports` and align its file/test labels with the new name.
82
+ - docs: update examples to use side-effect `import "as-test"` style where possible.
83
+
84
+ ### Fuzzing
85
+
86
+ - feat: add `ast fuzz` to build and run dedicated `*.fuzz.ts` bindings targets.
87
+ - feat: add `ast test --fuzz` to run fuzz targets after the normal spec pass and print a combined console summary.
88
+ - feat: add an AssemblyScript-first fuzz API via `fuzz("name", callback).generate((seed, run) => ...)`.
89
+ - feat: add built-in `FuzzSeed` generators for booleans, numbers, bytes, strings, arrays, and picks.
90
+ - feat: treat failed expectations and `false` returns as fuzz failures, while traps and throws are reported as crashes.
91
+ - feat: add top-level `fuzz` config for fuzz target discovery and default driver settings.
92
+ - feat: add `xfuzz(...)` for skipped fuzz targets and report fuzz results through the built-in reporters, including TAP output.
93
+ - feat: store fuzz and runtime crash artifacts as stable `.as-test/crashes/<entry>.json` and `.as-test/crashes/<entry>.log` files.
94
+ - fix: fail `ast fuzz` and `ast test --fuzz` on logical fuzz failures, not only crashes.
95
+ - fix: disambiguate duplicate fuzz basenames using the selected input set so same-named fuzz files do not overwrite one another.
96
+ - fix: auto-inject `run()` correctly for fuzz files without being confused by generator-local `run(...)` parameters.
97
+ - fix: make `try-as` opt-in even when the package is installed; it now only runs when explicitly enabled.
98
+
99
+ ### Snapshots & Logs
100
+
101
+ - feat: switch text snapshots to readable `.snap` files with path-preserving output under `.as-test/snapshots/`.
102
+ - feat: add comment support in `.snap` files and use clearer snapshot IDs like `Suite > test`, `Suite > test [name]`, and `Suite > test #2`.
103
+ - feat: add readable per-file `.log` artifacts with mode, build command, run command, snapshot summary, suite/test totals, and failure details.
104
+ - feat: split snapshot write flags into `--create-snapshots` and `--overwrite-snapshots`.
105
+ - fix: preserve existing snapshot file preambles/comments on rewrite and only generate the default snapshot header when a new `.snap` file is first created.
106
+ - fix: canonicalize legacy snapshot IDs on load/assert/write so old `::0` and `::name` variants collapse into the new readable IDs.
107
+
108
+ ### Mocking & Runtime API
109
+
110
+ - fix: remove `snapshotImport(...)` and `restoreImport(...)` from the active runtime API in favor of the simpler mocking surface.
111
+ - fix: escape control bytes and invalid surrogate code units consistently in runtime JSON serialization, including WIPC event frames and fuzz failure payloads.
112
+
113
+ ## 2026-03-11 - v1.0.1
114
+
115
+ - patch: automatically tokenize buildOptions.args so that `["--enable simd"]` becomes `["--enable", "simd"]`
116
+
3
117
  ## 2026-03-11 - v1.0.0
4
118
 
5
119
  ### Docs
@@ -12,7 +126,8 @@
12
126
  - feat: reject unknown config keys with nearest-key suggestions.
13
127
  - feat: show structured validation diagnostics with JSON paths and fix hints.
14
128
  - feat: fail fast on invalid config JSON with parser error details.
15
- -
129
+ -
130
+
16
131
  ### Release Readiness
17
132
 
18
133
  - fix: resolve `@assemblyscript/wasi-shim` and `try-as` with package resolution instead of assuming a local `./node_modules` folder, so nested example projects and other valid installs run correctly.