video-fps-probe 0.4.0 → 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
@@ -4,6 +4,37 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions follo
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.4.2 - 2026-11-01
8
+
9
+ ### Added
10
+
11
+ - A clean console in CI ([console](docs/api.md#console)). In Chromium, Firefox and WebKit the demo e2e, consumer and bundler smoke tests fail on a console warning or error of a page or a worker, any console output traced to the package, a page error, a crash, an unhandled rejection or a failed same-origin script request, unless the test names the noise it causes and why. In Node 24 and 22.12 every server entry, by `import`, by `require()` and from the CommonJS copy, must write nothing to stdout or stderr and emit no warning of its own (Node 22.12 prints its own `ExperimentalWarning` for `require()` of the ESM build, see [CommonJS](docs/api.md#commonjs)). Lint bans console calls in `src/`, and check-dist bans them in `dist/`.
12
+
13
+ ### Fixed
14
+
15
+ - The mediabunny engine no longer lets mediabunny print an error when a log argument has no string form, such as an object without a prototype. The argument shows as its type in the `mediabunny log:` warning, and the mediabunny engine chunk grows by 0.01 KB.
16
+
17
+ ### Changed
18
+
19
+ - The docs name the log levels the mp4box and mediabunny engines set for the whole thread ([engines](docs/api.md#descriptors)), and the one `ExperimentalWarning` Node 22.12 prints for `require()` of the ESM build, which `--disable-warning=ExperimentalWarning` or a newer Node avoids ([CommonJS](docs/api.md#commonjs)).
20
+
21
+ ## 0.4.1 - 2026-11-01
22
+
23
+ ### Added
24
+
25
+ - A bundler matrix in CI ([bundlers](docs/bundlers.md#bundler-matrix)): webpack, Rspack, Next.js with webpack and with Turbopack, Angular, SvelteKit, Nuxt, Parcel and `bun build`, the Vite consumer fixtures installed with pnpm, Yarn Plug'n'Play and Bun, and the seven server entries in the Next.js, SvelteKit and Nuxt routes, in Bun and in Deno. In Chromium, Firefox and WebKit each app must give the Node results, load the probe client lazily, start one own worker per container family and show no error, console warning or failed request. Versions are exact and every fixture with dependencies has a lockfile. A weekly canary runs the latest tools.
26
+
27
+ ### Changed
28
+
29
+ - The bundler docs state what CI verifies. webpack 5, Rspack, Next.js with webpack and with Turbopack, SvelteKit and Nuxt work without configuration, and the sections of the Angular application builder, `bun build` and Parcel show the configuration each needs ([bundlers](docs/bundlers.md#status)). Parcel 2.16.4 also needs `maxParallelRequests: 1`, because a bundle it shares between the classic own workers runs a module before the bundle that registers it is loaded. The package code does not change.
30
+ - The loader table of the CommonJS docs gains Bun, where `require()` takes the CommonJS copy, Deno, where it takes the ESM build, and Node under Yarn Plug'n'Play, where it takes the CommonJS copy ([CommonJS](docs/api.md#commonjs)).
31
+
32
+ ### Known limitations
33
+
34
+ - Without the configuration in [bundlers](docs/bundlers.md#status), `ng build` and `bun build` leave the prebuilt workers out of the output and Parcel 2 does not resolve the subpath exports.
35
+ - `require()` in Bun and in Node under Yarn Plug'n'Play takes the CommonJS copy, a second instance next to `import` ([CommonJS](docs/api.md#commonjs)).
36
+ - The other limitations of [0.4.0](CHANGELOG.md#040---2026-11-01) still hold.
37
+
7
38
  ## 0.4.0 - 2026-11-01
8
39
 
9
40
  ### Summary of 0.4.0
package/README.md CHANGED
@@ -4,6 +4,8 @@ Frame rate, frame count, VFR detection and a rate profile for MP4, MOV, WebM and
4
4
 
5
5
  **[Live demo](https://vbondarets.github.io/video-fps-probe/)** · [API](docs/api.md) · [Bundlers](docs/bundlers.md) · [Benchmarks](docs/benchmarks.md) · [Architecture](docs/architecture.md) · [Changelog](CHANGELOG.md)
6
6
 
7
+ The demo runs every capability on your own files or on its samples, each with a short explanation and code to copy for the browser and for a Node server: the [full analysis](https://vbondarets.github.io/video-fps-probe/) with color, HDR, Dolby Vision and aspect ratio, the [header-only analysis](https://vbondarets.github.io/video-fps-probe/#header) under limits, a file [from a URL](https://vbondarets.github.io/video-fps-probe/#url) through Range requests, [upload rules](https://vbondarets.github.io/video-fps-probe/#check) with the presets, and the [error codes](https://vbondarets.github.io/video-fps-probe/#errors).
8
+
7
9
  ## Install
8
10
 
9
11
  ```
@@ -13,7 +15,7 @@ pnpm add video-fps-probe
13
15
  bun add video-fps-probe
14
16
  ```
15
17
 
16
- The first npm release is 0.2.0, and one publish serves every package manager ([publishing](docs/publishing.md)). npm is the tested package manager: CI installs the packed tarball with npm. Yarn, pnpm and bun are expected to work but are not tested in CI yet (pnpm, Yarn PnP and bun installs join the bundler matrix in 0.4.1). The package has no dependencies. Its peers are optional and no package manager installs them for you: install one yourself, only for the entry you import: `mp4box` for `video-fps-probe/mp4box`, `mediabunny` for `video-fps-probe/mediabunny`, React 18 or 19 for `video-fps-probe/react`.
18
+ The first npm release is 0.2.0, and one publish serves every package manager ([publishing](docs/publishing.md)). CI installs the tarball with npm, pnpm, Yarn PnP and bun, and builds it with Vite, webpack, Rspack, Next.js, Angular, SvelteKit, Nuxt, Parcel and Bun ([bundlers](docs/bundlers.md#status)). The package has no dependencies. Its peers are optional and no package manager installs them for you: install one yourself, only for the entry you import: `mp4box` for `video-fps-probe/mp4box`, `mediabunny` for `video-fps-probe/mediabunny`, React 18 or 19 for `video-fps-probe/react`.
17
19
 
18
20
  For a commit that is not released yet, install a packed tarball. A git dependency gets no code with npm (Yarn, pnpm and bun are not tested): `prepack` builds `dist/`, and npm does not run it for a git install.
19
21
 
@@ -154,7 +156,7 @@ import { defineConfig } from 'vite';
154
156
  export default defineConfig({ worker: { format: 'es' } });
155
157
  ```
156
158
 
157
- Engines cost nothing until imported. Importing a descriptor grows the critical path a little, from 0.67 KB to 0.89 KB with mp4box or mediabunny, 0.77 KB with rVFC and 1.01 KB with all three, and the engine itself loads lazily: mp4box 44.95 KB, mediabunny 54.16 KB, rVFC 2.19 KB. Gzip -9 of production builds from the packed tarball, budgeted in CI. Every configuration is in [docs/benchmarks.md](docs/benchmarks.md#package-size).
159
+ Engines cost nothing until imported. Importing a descriptor grows the critical path a little, from 0.67 KB to 0.89 KB with mp4box or mediabunny, 0.77 KB with rVFC and 1.01 KB with all three, and the engine itself loads lazily: mp4box 44.95 KB, mediabunny 54.18 KB, rVFC 2.19 KB. Gzip -9 of production builds from the packed tarball, budgeted in CI. Every configuration is in [docs/benchmarks.md](docs/benchmarks.md#package-size).
158
160
 
159
161
  `video-fps-probe/react` adds 1.20 KB to the critical path for the provider, `useVideoFps` and its store (React itself not counted), and its first analysis also fetches a 0.43 KB summary module, in parallel with the probe client. `video-fps-probe/check` adds 4.22 KB when imported statically, and nothing lazily. One preset from `video-fps-probe/presets` adds 0.46 KB.
160
162
 
@@ -174,12 +176,12 @@ Of the 168 committed fixtures, 156 are synthetic files made with ffmpeg and 12 a
174
176
 
175
177
  Chrome and Edge 94, Firefox 114, Safari and iOS 15.4: floors derived from the features used, not tested on those versions; CI runs Chromium, Firefox and WebKit. mp4box.js needs Safari 16.4; rVFC needs `requestVideoFrameCallback` (Chrome 83, Firefox 132, Safari 15.4), a visible foreground tab and a playable codec. [Details](docs/benchmarks.md#browser-support).
176
178
 
179
+ The package writes nothing to the console. CI fails a browser test on a console warning or error of a page or a worker, a page error, an unhandled rejection or a failed script request, and a Node test on any output ([console](docs/api.md#console)).
180
+
177
181
  Known limitations: [changelog](CHANGELOG.md#known-limitations), [benchmarks](docs/benchmarks.md#limitations). Development: [demo/README.md](demo/README.md), [scripts](docs/benchmarks.md#reproducing-the-numbers).
178
182
 
179
183
  ## Roadmap
180
184
 
181
- - **0.4.1**: a bundler matrix in CI: webpack 5, Rspack, Next.js, Angular CLI, SvelteKit, Nuxt, Parcel, Bun and Deno, with pnpm, Yarn PnP and bun installs.
182
- - **0.4.2**: a CI guarantee of a clean console: the e2e and consumer smoke tests fail on any console warning or error, page error or unhandled rejection in Chromium, Firefox and WebKit, and a Node test checks that the library writes nothing to stdout or stderr.
183
185
  - **Later in 0.4.x**: HDR10 static metadata (`mdcv`, `clli`, MasteringMetadata) and the color of the AV1 sequence header, which the color entry of 0.4.0 does not read yet.
184
186
  - **0.5.0**: a Node entry (`fromPath`, DOM-free types, a `worker_threads` pool), NestJS validators, a CLI, bitrate, GOP and audio details, cadence detection, framework adapters for Vue, Svelte and Angular, and later MPEG-TS and HLS.
185
187
 
@@ -139,10 +139,19 @@ async function probe(counted, result, opts, t0) {
139
139
  const unhandled = [];
140
140
  const logged = [];
141
141
  Logging.level = LogLevel.Silent;
142
- const unlisten = [
143
- Logging.on('warn', (args) => logged.push(args.map(String).join(' '))),
144
- Logging.on('error', (args) => logged.push(args.map(String).join(' '))),
145
- ];
142
+ const listen = (args) => {
143
+ logged.push(args
144
+ .map((arg) => {
145
+ try {
146
+ return String(arg);
147
+ }
148
+ catch {
149
+ return typeof arg;
150
+ }
151
+ })
152
+ .join(' '));
153
+ };
154
+ const unlisten = [Logging.on('warn', listen), Logging.on('error', listen)];
146
155
  const source = new CustomSource({
147
156
  getSize: () => counted.size,
148
157
  read: async (start, end) => {
@@ -13,7 +13,7 @@ const MDAT_PEEK = 16;
13
13
  const HEADER_PROBE = 32;
14
14
  const logSinks = new Set();
15
15
  let logHooked = false;
16
- // mp4box prints parse errors with console.error and offers no switch to silence them.
16
+ // mp4box prints parse errors to the console through Log.error and offers no switch to silence them.
17
17
  function hookLog() {
18
18
  if (logHooked)
19
19
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "video-fps-probe",
3
3
  "private": false,
4
- "version": "0.4.0",
4
+ "version": "0.4.2",
5
5
  "description": "Video frame rate, frame count and VFR detection from MP4/MOV/WebM/MKV container headers in a Web Worker. Matches ffprobe 8.1.1 on the test corpus (0 mismatches), no decoding.",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -298,6 +298,9 @@
298
298
  "size": "node scripts/size-report.mjs demo/dist",
299
299
  "consumers:setup": "node scripts/consumers.mjs setup",
300
300
  "consumers:build": "node scripts/consumers.mjs build",
301
+ "bundlers:setup": "node scripts/bundlers.mjs setup",
302
+ "bundlers:build": "node scripts/bundlers.mjs build",
303
+ "test:bundlers": "playwright test -c playwright.bundlers.config.ts",
301
304
  "size:matrix": "node scripts/size-matrix.mjs --check",
302
305
  "size:matrix:write": "node scripts/size-matrix.mjs",
303
306
  "bench": "node scripts/bench/run-bench.mjs",