Summary
@paypal/accelerated-checkout-loader@1.2.1 lists typescript under dependencies, but TypeScript is a build-time tool only. It is already (correctly) present under devDependencies, so the runtime entry is a packaging mistake. This pulls a full typescript@^4.6.4 install into the dependency tree of every consumer that has no need for it at runtime.
Note: this package's npm metadata has no repository/bugs field and there is no dedicated public repo for the loader, so filing here as the documented catch-all for PayPal JS SDK issues.
Affected versions
1.2.1 (current latest)
2.0.0-beta.4 (prerelease) — same issue still present
Evidence
From the published package.json:
Confirmed via npm view @paypal/accelerated-checkout-loader@1.2.1 dependencies and @2.0.0-beta.4.
I also verified the published runtime does not use TypeScript at all:
dist/loader.umd.js (the main entry), dist/loader.esm.js, and src/ contain no require('typescript') / import ... from 'typescript' references (nor tslib).
- The only TS artifacts shipped are passive
.d.ts declaration files, which do not require the typescript package at runtime.
Impact
- Installs an unnecessary, large
typescript package into consumers' node_modules and lockfiles.
- Adds noise/bloat to dependency trees and audit/supply-chain surface for a package not used at runtime.
Suggested fix
Remove typescript from dependencies (it remains in devDependencies):
"dependencies": {
"@braintree/asset-loader": "2.0.0",
- "envify": "^4.1.0",
- "typescript": "^4.6.4"
+ "envify": "^4.1.0"
},
Environment
@paypal/accelerated-checkout-loader: 1.2.1
- Installed via npm
Summary
@paypal/accelerated-checkout-loader@1.2.1liststypescriptunderdependencies, but TypeScript is a build-time tool only. It is already (correctly) present underdevDependencies, so the runtime entry is a packaging mistake. This pulls a fulltypescript@^4.6.4install into the dependency tree of every consumer that has no need for it at runtime.Note: this package's npm metadata has no
repository/bugsfield and there is no dedicated public repo for the loader, so filing here as the documented catch-all for PayPal JS SDK issues.Affected versions
1.2.1(currentlatest)2.0.0-beta.4(prerelease) — same issue still presentEvidence
From the published
package.json:Confirmed via
npm view @paypal/accelerated-checkout-loader@1.2.1 dependenciesand@2.0.0-beta.4.I also verified the published runtime does not use TypeScript at all:
dist/loader.umd.js(themainentry),dist/loader.esm.js, andsrc/contain norequire('typescript')/import ... from 'typescript'references (nortslib)..d.tsdeclaration files, which do not require thetypescriptpackage at runtime.Impact
typescriptpackage into consumers'node_modulesand lockfiles.Suggested fix
Remove
typescriptfromdependencies(it remains indevDependencies):"dependencies": { "@braintree/asset-loader": "2.0.0", - "envify": "^4.1.0", - "typescript": "^4.6.4" + "envify": "^4.1.0" },Environment
@paypal/accelerated-checkout-loader:1.2.1