588 Commits
Author SHA1 Message Date
Tim van der Meij b61069cbf7 Update JavaScript dependencies to the most recent versions 2026-11-15 13:09:07 +01:00
Tim van der Meij 108697d334 Deny install scripts of dependencies in package.json
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
2026-11-08 18:51:32 +01:00
Tim van der Meij 4067701be4 Upgrade stylelint to version 18.0.0
This is a major version bump, but the changelog at
https://github.com/stylelint/stylelint/releases/tag/18.0.0
doesn't indicate any breaking changes that should impact us.
2026-11-08 16:29:42 +01:00
Tim van der Meij 2d79bbf02c Update dependencies to the most recent versions 2026-11-08 16:24:46 +01:00
Tim van der Meij a6a4d03bee Update dependencies to the most recent versions 2026-10-24 20:17:28 +02:00
Tim van der Meij aa6ebe3b7d Upgrade Vitest to version 5
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
2026-10-24 18:44:54 +02:00
dependabot[bot] 66322f12d2 Bump @vitest/mocker and vitest
Bumps [@vitest/mocker](https://github.com/vitest-dev/vitest/tree/HEAD/packages/mocker) to 4.1.12 and updates ancestor dependency [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest). These dependencies need to be updated together.


Updates `@vitest/mocker` from 4.1.11 to 4.1.12
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.12/packages/mocker)

Updates `vitest` from 4.1.11 to 4.1.12
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.12/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/mocker"
  dependency-version: 4.1.12
  dependency-type: indirect
- dependency-name: vitest
  dependency-version: 4.1.12
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-22 01:39:06 +00:00
Tim van der Meij 3a8f6dcbc8 Update dependencies to the most recent versions 2026-10-18 15:49:34 +02:00
CodSpeed Bot 79aa808cb3 Add CodSpeed performance benchmarks
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.
2026-10-14 17:26:40 +00:00
calixteman 92d28ab31b Replace Metalsmith with a docs gulp task
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.
2026-10-05 20:50:29 +02:00
calixteman c38cf7b4b5 Replace webpack-stream with the Webpack API
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.
2026-10-05 19:29:15 +02:00
calixteman fa9d36e52a Merge pull request #22075 from calixteman/rm-ttest
Replace `ttest` with a local Welch's t-test
2026-10-05 19:09:27 +02:00
calixteman 8e5fb32458 Merge pull request #22077 from calixteman/rm-gulp-cli
Remove the explicit `gulp-cli` dependency
2026-10-05 18:05:00 +02:00
calixteman fba07f3834 Replace ttest with a local Welch's t-test
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.
2026-10-05 16:28:19 +02:00
calixteman 9fa33fc48e Remove the explicit gulp-cli dependency
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.
2026-10-05 10:43:32 +02:00
calixteman 360def183c Replace gulp-replace with transform for the Chromium manifest 2026-10-05 10:26:33 +02:00
Tim van der Meij e987c74cd6 Upgrade eslint-plugin-unicorn to version 77.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v77.0.0
doesn't indicate any breaking changes that should impact us.

Note that it does require a number of code changes due to improvements
that were made for the `unicorn/prefer-logical-operator-over-ternary`
(allowing us to remove previously added ignore lines; see
https://github.com/sindresorhus/eslint-plugin-unicorn/issues/3766)
and `unicorn/prefer-ternary` (to detect a new case) rules.
2026-10-03 16:27:45 +02:00
Tim van der Meij bf5f6ea4b1 Upgrade eslint-plugin-jsdoc to version 65.0.2
This is a major version bump, but the changelogs at
https://github.com/gajus/eslint-plugin-jsdoc/releases
don't indicate any breaking changes that should impact us.
2026-10-03 16:27:44 +02:00
Tim van der Meij 7dc3cf0421 Update dependencies to the most recent versions 2026-10-03 16:27:44 +02:00
Tim van der Meij b655985b1d Upgrade eslint-plugin-unicorn to version 76.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v75.0.0 and
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v76.0.0
doesn't indicate any breaking changes that should impact us.

Note that it does require a number of code changes due to improvements
that were made for the `unicorn/prefer-logical-operator-over-ternary`
and `unicorn/prefer-ternary` rules to detect more cases.
2026-09-19 19:17:01 +02:00
Tim van der Meij a6434ddf4a Update dependencies to the most recent versions 2026-09-19 19:17:01 +02:00
Tim van der Meij 2887ad3cef Update dependencies to the most recent versions
Note that ESLint 10.10.0's `new-cap` rule became a bit stricter in
https://github.com/eslint/eslint/commit/c6cc6c592f30901345d94ef75e0d42c1894fae6c
and now flags `new {this,<variable>}.prototype.constructor()` usage, so
we exclude this pattern in `eslint.config.mjs` since we intend to use
it like this.
2026-09-12 16:21:41 +02:00
Tim van der Meij 94256acb3f Merge pull request #21896 from calixteman/rm-pngjs
Use `@napi-rs/canvas` for PNG decoding in integration tests
2026-09-06 20:06:45 +02:00
Tim van der Meij 351c4d74ce Merge pull request #21895 from calixteman/kleur-to-styletext
Replace `kleur` with `util.styleText`
2026-09-06 19:29:46 +02:00
calixteman f9fa28c9b9 Use @napi-rs/canvas for PNG decoding in integration tests
This removes the `pngjs` dependency.
2026-09-06 19:02:30 +02:00
calixteman c5af039649 Replace kleur with util.styleText
All supported Node.js versions provide `util.styleText`. Preserve the existing color-enabling rules and the styles used by the build and test output.
2026-09-06 18:24:18 +02:00
calixteman 9cb1f0014d Remove the unused @babel/runtime dependency
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.
2026-09-06 17:46:27 +02:00
Calixte Denizet 26341dcdbd Add JSDoc linting
Enable rules that validate existing JSDoc comments and fix the reported issues.
2026-08-31 11:57:30 +02:00
Tim van der Meij 356cfddf03 Upgrade jasmine to version 7.0.0
This is a major version bump, and the changelog at
https://github.com/jasmine/jasmine-npm/blob/main/release_notes/7.0.0.md
and the migration guide at
https://jasmine.github.io/upgrade-guides/7.0#browser-boot-changes
indicate two breaking changes that impact us:

- Jasmine's `loadConfig()` method is now async, so we need to await it.
- The browser boot process has been simplified to remove boilerplate, so
  since we have custom boot files we need to update them according to
  https://github.com/jasmine/jasmine/blob/v7.0.0/lib/jasmine-core/boot.js,
  which means we no longer used the removed `jasmineRequire` global.
  More context about the redesigned boot process can be found at
  https://github.com/jasmine/jasmine/issues/2094.
2026-08-29 18:19:46 +02:00
Tim van der Meij 21b00b95e5 Upgrade postcss-discard-comments to version 9.0.0
This is a major version bump, but the changelog at
https://github.com/cssnano/cssnano/blob/main/packages/postcss-discard-comments/CHANGELOG.md
and the migration guide at
https://cssnano.github.io/cssnano/blog/cssnano-9-migration-guide
don't indicate any breaking changes that should impact us.

Note that the new major version does require more recent Node.js
versions, so we bump the development versions for PDF.js accordingly.
2026-08-29 18:18:53 +02:00
Tim van der Meij 0ccb4ad9a8 Upgrade eslint-plugin-unicorn to version 74.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v74.0.0
doesn't indicate any breaking changes that should impact us.
2026-08-29 15:11:53 +02:00
Tim van der Meij 7001143fae Update dependencies to the most recent versions 2026-08-29 15:10:59 +02:00
Tim van der Meij f1bf09f7f0 Upgrade eslint-plugin-unicorn to version 73.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v73.0.0
doesn't indicate any breaking changes that should impact us.
2026-08-15 15:40:48 +02:00
Tim van der Meij 2cb6d3685a Update dependencies to the most recent versions 2026-08-15 15:36:42 +02:00
Tim van der Meij 09ad726a3f Update dependencies to the most recent versions 2026-08-02 13:22:33 +02:00
Tim van der Meij f7578565ef Update dependencies to the most recent versions 2026-07-26 14:30:13 +02:00
Tim van der Meij a3a0d5d9a0 Upgrade eslint-plugin-unicorn to version 72.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v72.0.0
doesn't indicate any breaking changes that should impact us.
2026-07-19 18:53:34 +02:00
Tim van der Meij 299624a2d3 Update dependencies to the most recent versions 2026-07-19 18:52:20 +02:00
Tim van der Meij abae23d6aa Upgrade eslint-plugin-unicorn to version 71.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v71.0.0
doesn't indicate any breaking changes that should impact us.
2026-07-12 16:19:58 +02:00
Tim van der Meij 3435fb0da0 Update dependencies to the most recent versions 2026-07-12 16:19:30 +02:00
Tim van der Meij 86dad16df3 Upgrade eslint-plugin-unicorn to version 70.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v69.0.0 and
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v70.0.0
doesn't indicate any breaking changes that should impact us.
2026-07-04 14:51:22 +02:00
Tim van der Meij 4fd232a124 Update dependencies to the most recent versions
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).
2026-07-04 14:49:36 +02:00
Nicolò Ribaudo b9609d0365 Update to Babel 8 2026-06-30 10:45:15 +02:00
Tim van der Meij 048331b09a Upgrade @types/node to version 26.0.0
This is a major version bump, but the patch at
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/75025
doesn't indicate any breaking changes that should impact us as it mainly
includes support for Node.js 26.
2026-06-23 20:50:02 +02:00
Tim van der Meij 56843f9b42 Upgrade eslint-plugin-unicorn to version 68.0.0
This is a major version bump, but the changelog at
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v67.0.0 and
https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v68.0.0
doesn't indicate any breaking changes that should impact us.
2026-06-23 20:50:02 +02:00
Tim van der Meij 7818ab1b9d Update dependencies to the most recent versions 2026-06-23 20:50:02 +02:00
Tim van der Meij 0ea67ed96f Upgrade eslint-plugin-unicorn to version 66.0.0
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.
2026-06-14 20:20:34 +02:00
Tim van der Meij 68a5ec1403 Upgrade eslint-plugin-unicorn to version 65.0.1
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.
2026-06-13 19:33:50 +02:00
Tim van der Meij 827ddf6e09 Update dependencies to the most recent versions 2026-06-13 19:12:35 +02:00
Tim van der Meij 4112c2953b Upgrade @eslint/json to version 2.0.0
This is a major version bump, but the changelog at
https://github.com/eslint/json/releases/json-v2.0.0
doesn't indicate any breaking changes that should impact us.
2026-06-07 16:14:37 +02:00