mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-11-30 16:37:18 +01:00
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
72 lines
2.0 KiB
JSON
72 lines
2.0 KiB
JSON
{
|
|
"name": "pdf.js",
|
|
"type": "module",
|
|
"devDependencies": {
|
|
"@babel/core": "^8.1.0",
|
|
"@babel/preset-env": "^8.0.7",
|
|
"@codspeed/vitest-plugin": "^6.1.1",
|
|
"@eslint/json": "^2.1.1",
|
|
"@fluent/bundle": "^0.19.1",
|
|
"@fluent/dom": "^0.10.2",
|
|
"@napi-rs/canvas": "^1.1.0",
|
|
"@types/node": "^26.6.6",
|
|
"autoprefixer": "^10.6.2",
|
|
"babel-loader": "^10.1.1",
|
|
"babel-plugin-istanbul": "^8.0.2",
|
|
"babel-plugin-polyfill-corejs3": "^1.0.0",
|
|
"cached-iterable": "^0.3.0",
|
|
"caniuse-lite": "^1.0.30001823",
|
|
"core-js": "^3.51.0",
|
|
"eslint": "^10.14.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-import-x": "^4.18.0",
|
|
"eslint-plugin-jasmine": "^4.2.2",
|
|
"eslint-plugin-jsdoc": "^65.4.5",
|
|
"eslint-plugin-no-unsanitized": "^4.1.5",
|
|
"eslint-plugin-perfectionist": "^5.13.0",
|
|
"eslint-plugin-prettier": "^5.5.7",
|
|
"eslint-plugin-regexp": "^3.3.3",
|
|
"eslint-plugin-unicorn": "^77.0.0",
|
|
"globals": "^17.14.0",
|
|
"gulp": "^5.0.1",
|
|
"gulp-postcss": "^10.0.0",
|
|
"gulp-rename": "^2.1.0",
|
|
"gulp-zip": "^6.1.0",
|
|
"highlight.js": "^11.12.0",
|
|
"istanbul-lib-coverage": "^3.2.2",
|
|
"istanbul-lib-report": "^3.0.1",
|
|
"istanbul-reports": "^3.2.0",
|
|
"jasmine": "^7.0.0",
|
|
"jsdoc": "^4.0.5",
|
|
"marked": "^18.1.3",
|
|
"ordered-read-streams": "^2.0.0",
|
|
"postcss": "^8.5.32",
|
|
"postcss-discard-comments": "^9.0.8",
|
|
"postcss-values-parser": "^8.0.0",
|
|
"prettier": "^3.9.10",
|
|
"puppeteer": "^25.16.0",
|
|
"stylelint": "^18.0.0",
|
|
"stylelint-prettier": "^5.1.0",
|
|
"svglint": "^4.2.1",
|
|
"terser-webpack-plugin": "^5.6.1",
|
|
"tsc-alias": "^1.9.10",
|
|
"typescript": "^6.0.3",
|
|
"vinyl": "^3.0.1",
|
|
"vitest": "^5.1.0",
|
|
"webpack": "^5.112.2"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git://github.com/mozilla/pdf.js.git"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.22.3 || >=24.15.0 || >=26.0"
|
|
},
|
|
"license": "Apache-2.0",
|
|
"allowScripts": {
|
|
"core-js": false,
|
|
"puppeteer": false,
|
|
"unrs-resolver": false
|
|
}
|
|
}
|