mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-09 14:54:04 +02:00
Merge pull request #21018 from Snuffleupagus/Node-22
[api-minor] Update the minimum supported Node.js version to 22
This commit is contained in:
commit
5aaf30a071
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [20, 22, 24, 25]
|
||||
node-version: [22, 24, 25]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
||||
@ -87,7 +87,7 @@ const ENV_TARGETS = [
|
||||
"Chrome >= 118",
|
||||
"Firefox ESR",
|
||||
"Safari >= 16.4",
|
||||
"Node >= 20",
|
||||
"Node >= 22",
|
||||
"> 1%",
|
||||
"not IE > 0",
|
||||
"not dead",
|
||||
@ -2500,7 +2500,7 @@ function packageJson() {
|
||||
url: `git+${DIST_GIT_URL}`,
|
||||
},
|
||||
engines: {
|
||||
node: ">=20.19.0 || >=22.13.0 || >=24",
|
||||
node: ">=22.13.0 || >=24",
|
||||
},
|
||||
scripts: {},
|
||||
};
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@ -71,7 +71,7 @@
|
||||
"webpack-stream": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0 || >=22.13.0 || >=24"
|
||||
"node": ">=22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
"url": "git://github.com/mozilla/pdf.js.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0 || >=22.13.0 || >=24"
|
||||
"node": ">=22.13.0 || >=24"
|
||||
},
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
|
||||
@ -14,20 +14,7 @@
|
||||
*/
|
||||
|
||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||
// eslint-disable-next-line no-var
|
||||
var compatParams = new Map();
|
||||
if (
|
||||
typeof PDFJSDev !== "undefined" &&
|
||||
PDFJSDev.test("LIB") &&
|
||||
!globalThis.navigator?.language
|
||||
) {
|
||||
globalThis.navigator = {
|
||||
language: "en-US",
|
||||
maxTouchPoints: 1,
|
||||
platform: "",
|
||||
userAgent: "",
|
||||
};
|
||||
}
|
||||
var compatParams = new Map(); // eslint-disable-line no-var
|
||||
const { maxTouchPoints, platform, userAgent } = navigator;
|
||||
|
||||
const isAndroid = /Android/.test(userAgent);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user