NPM 12 no longer runs install scripts of dependencies by default anymore
to combat supply chain attacks [1], and warns if they are blocked without
explicit denylisting. For PDF.js this currently results in:
```
npm warn install-scripts 3 packages had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts core-js@3.51.0 (postinstall: node -e "try{require('./postinstall')}catch(e){}")
npm warn install-scripts puppeteer@25.16.0 (postinstall: node install.mjs)
npm warn install-scripts unrs-resolver@1.11.1 (postinstall: napi-postinstall unrs-resolver 1.11.1 check)
```
We don't need any of the install scripts, and this commit thus
explicitly marks them as denied, because:
- `core-js` only uses it to print a sponsor banner [2];
- `puppeteer` only uses it to facilitate browser binary downloading, but
we already switched away from install-time downloads before in favor
of only downloading them when we actually need them for tests [3];
- `unrs-resolver` only uses it to work around bugs in legacy NPM
versions, and this postinstall script recently got removed as well [4].
[1] https://github.blog/changelog/2026-06-09-upcoming-breaking-changes-for-npm-v12
[2] https://github.com/zloirock/core-js/blob/master/packages/core-js/postinstall.js#L25
[3] https://github.com/mozilla/pdf.js/commit/26b4206d879673f8e2cbbb615b59bb211c8ea3fc
[4] https://github.com/unrs/unrs-resolver/pull/225
We only use Vitest for benchmarking, and in this major version the
benchmarking API got rewritten [1] which requires changes on our end.
This means that `bench` is no longer a top-level import, that under
water created a test on its own, but it's now a fixture inside regular
`test()` scopes.
For us this would mean quite a bit of additional boilerplate because
we'd have to wrap every existing benchmark into a separate `test()`
scope [2]. To keep the individual benchmarks small and expressive this
commit introduces a helper wrapper function that takes care of this,
basically mirroring the behavior of Vitest 4.
[1] https://vitest.dev/blog/vitest-5#benchmarking-rewrite
[2] https://vitest.dev/guide/migration/#benchmarking-api-rewrite
Add a vitest-based benchmark suite in test/benchmarks/, covering the
display API (document loading, operator list and text content
extraction) and core components (lexer/parser, Flate and JPEG decoding,
MD5/SHA-256), along with a GitHub Actions workflow running it on
CodSpeed.
Render the four Markdown pages with Marked and Highlight.js, using a
JavaScript template instead of Nunjucks. Preserve their heading IDs and
relative URLs.
Add `lint-docs` to `gulp lint` to check Markdown tokens, front matter
keys, code languages, and remaining root-relative URLs in selected
HTML attributes.
Verified all four pages against the old Metalsmith output: parsed HTML
matches after ignoring whitespace between elements.
Collect Webpack output in memory as Vinyl files and close the compiler
after each run. Log compilation diagnostics and fail the stream on errors.
Remove webpack-stream and its unused dependencies, including memory-fs
and Vinyl 2.
Compute statcmp's two-sided p-values using the regularized incomplete beta
function, removing `ttest` and its three transitive dependencies.
Add Scilab reference tests to `gulp externaltest`, with the script used to
generate the expected values included in the test file.
It was added explicitly when `gulp` 4 depended on an outdated version,
but `gulp` 5 now depends on `gulp-cli` 3.1.0 which is the version we
were using.
It was added in the Babel 7 update (commit b46ec5195) as the helper
library for `@babel/plugin-transform-runtime`. That plugin was removed
in commit 6e3179994, when the Babel `targets`-option was introduced,
but the runtime package itself was left behind. Nothing has used it
since.
Note that the `prettier` update introduces a handful of formatting
changes (see https://prettier.io/blog/2026/06/27/3.9.0).
Moreover, the `tsc-alias` update requires explicitly defining the root
URL in the compiler options now, otherwise it errors with `tsc-alias
error: compilerOptions.rootDir is required with implicit baseUrl` (see
https://github.com/justkey007/tsc-alias/pull/259/changes).
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v66.0.0
doesn't indicate any breaking changes that should impact us.
However, improved rules do require a small number of changes here:
- The `prefer-array-some` rule no longer reports a false positive after
https://github.com/sindresorhus/eslint-plugin-unicorn/issues/3198 got
fixed, so the ignore line that was added in commit 68a5ec1 is removed.
- The `prefer-ternary` rule triggers on more cases now, in particular
`let` declarations with `if` reassignments, so a number of changes are
made to make it pass again.
- The `prefer-at` rule triggers on more cases now, in particular
`substring` calls that just extract a single character, so one change
is made to make it pass again.
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v65.0.0
doesn't indicate any breaking changes that should impact us.
However, there is one false positive, possibly introduced by patch
https://github.com/sindresorhus/eslint-plugin-unicorn/pull/3028:
```
src/core/xfa/factory.js
104:54 error Prefer `.some(…)` over `.find(…)` unicorn/prefer-array-some
```
This is incorrect because on this line we're not dealing with an array
but with a `FontFinder` instance instead (and that doesn't have a
`.some()` method), so we ignore the rule for this line.