{"_id":"@adobe/rollup-plugin-checksum","_rev":"6-5ffabb1e59c93ef29bfe5d8ab8d151b3","name":"@adobe/rollup-plugin-checksum","dist-tags":{"latest":"1.2.0"},"versions":{"1.2.0":{"name":"@adobe/rollup-plugin-checksum","version":"1.2.0","author":{"url":"https://github.com/andipaetzold","name":"Andi Pätzold","email":"github@andipaetzold.com"},"license":"MIT","_id":"@adobe/rollup-plugin-checksum@1.2.0","maintainers":[{"name":"marbec","email":"mabecker@adobe.com"},{"name":"tripod","email":"tripod@bocanegra.ch"},{"name":"garthdb","email":"garthdb@gmail.com"},{"name":"lazd","email":"lazdnet@gmail.com"},{"name":"adobe-admin","email":"grp-opensourceoffice@adobe.com"},{"name":"patrickfulton","email":"patrickfulton@gmail.com"},{"name":"trieloff","email":"lars@trieloff.net"},{"name":"shazron","email":"shazron@gmail.com"},{"name":"krisnye","email":"krisnye@gmail.com"},{"name":"dcpfsdk","email":"dcpfsdk@adobe.com"},{"name":"natebaldwin","email":"natebaldwindesign@gmail.com"},{"name":"devongovett","email":"devongovett@gmail.com"},{"name":"aspro83","email":"danniintheus@gmail.com"},{"name":"symanovi","email":"symanovi@adobe.com"},{"name":"dpfister","email":"dominique.pfister@gmail.com"},{"name":"stefan-guggisberg","email":"sg@adobe.com"},{"name":"rofe","email":"npm@rofe.com"},{"name":"kptdobe","email":"kptdobe@gmail.com"},{"name":"adobehalls","email":"halls@adobe.com"},{"name":"fullcolorcoder","email":"bradjohn@adobe.com"},{"name":"djaeggi","email":"djaeggi@adobe.com"},{"name":"dylandepass","email":"dylandepass@gmail.com"},{"name":"mhaack","email":"mhaack@adobe.com"},{"name":"amol-anand","email":"amol@adobe.com"},{"name":"stopp-adobe","email":"stopp@adobe.com"},{"name":"doten","email":"doten@adobe.com"},{"name":"duh_schmidt","email":"schmidt@adobe.com"},{"name":"asthabh23","email":"astha.bhargava23@gmail.com"},{"name":"zdahbi","email":"zouhir.dahbi@outlook.com"},{"name":"tuicu","email":"tuicu@adobe.com"}],"homepage":"https://github.com/adobe/rollup-plugin-checksum#readme","bugs":{"url":"https://github.com/adobe/rollup-plugin-checksum/issues"},"dist":{"shasum":"c865ca3a5289a951c8f72e5ba2b07e99a7a631ce","tarball":"https://registry.npmjs.org/@adobe/rollup-plugin-checksum/-/rollup-plugin-checksum-1.2.0.tgz","fileCount":5,"integrity":"sha512-SUf9DwCHot6pLLqH1N2U0pPCQfsSzqdyZJ1rCaXcLo6PKT4Ur3XRpfy5G2jclUM55xELN8t2TIqUkkSM9+LWZA==","signatures":[{"sig":"MEUCIQCSPyELUWg5AUbALvYHTiCW2ZoMuqfk/l7p/nEDEIyEigIgcQaT0dZq+IfxqXnlBUN2c6QIawVtE9EaqUyTR6pd5Mw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9261},"main":"lib/index.js","types":"./lib/index.d.ts","module":"lib/index.es.js","gitHead":"99f20547d35b1ddac8c756227109a38baa39c01e","scripts":{"test":"rollup --config test/rollup.config.js","build":"tsc","test:sri":"rollup --config test/rollup.config.sri.js","verify:sri":"npm run test:sri && node ./scripts/verify-sri.js","test:sri:multi":"rollup --config test/rollup.config.sri-multi.js","semantic-release":"semantic-release"},"_npmUser":{"name":"trieloff","email":"lars@trieloff.net"},"repository":{"url":"git+https://github.com/adobe/rollup-plugin-checksum.git","type":"git"},"_npmVersion":"10.9.2","description":"Rollup plugin that emits a file containing the checksum of all emitted chunks and assets.","directories":{},"_nodeVersion":"23.9.0","dependencies":{"@types/node":"~14.14.41"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^7.1.7","rollup":"2.43.0","typescript":"4.2.3","@tsconfig/node12":"1.0.7","semantic-release":"17.4.2","@semantic-release/git":"9.0.0","@semantic-release/npm":"^7.1.0","@semantic-release/github":"^7.2.0","@semantic-release/changelog":"5.0.1","@semantic-release/commit-analyzer":"^8.0.1","@semantic-release/release-notes-generator":"^9.0.2"},"peerDependencies":{"rollup":">=1.26.0"},"_npmOperationalInternal":{"tmp":"tmp/rollup-plugin-checksum_1.2.0_1747820201209_0.8553720217345251","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-05-21T09:36:41.087Z","modified":"2026-07-08T08:14:10.899Z","1.2.0":"2025-05-21T09:36:41.438Z"},"bugs":{"url":"https://github.com/adobe/rollup-plugin-checksum/issues"},"author":{"url":"https://github.com/andipaetzold","name":"Andi Pätzold","email":"github@andipaetzold.com"},"license":"MIT","homepage":"https://github.com/adobe/rollup-plugin-checksum#readme","repository":{"url":"git+https://github.com/adobe/rollup-plugin-checksum.git","type":"git"},"description":"Rollup plugin that emits a file containing the checksum of all emitted chunks and assets.","maintainers":[{"email":"mabecker@adobe.com","name":"marbec"},{"email":"tripod@bocanegra.ch","name":"tripod"},{"email":"garthdb@gmail.com","name":"garthdb"},{"email":"lazdnet@gmail.com","name":"lazd"},{"email":"grp-opensourceoffice@adobe.com","name":"adobe-admin"},{"email":"patrickfulton@gmail.com","name":"patrickfulton"},{"email":"lars@trieloff.net","name":"trieloff"},{"email":"krisnye@gmail.com","name":"krisnye"},{"email":"dcpfsdk@adobe.com","name":"dcpfsdk"},{"email":"natebaldwindesign@gmail.com","name":"natebaldwin"},{"email":"devongovett@gmail.com","name":"devongovett"},{"email":"danniintheus@gmail.com","name":"aspro83"},{"email":"symanovi@adobe.com","name":"symanovi"},{"email":"dominique.pfister@gmail.com","name":"dpfister"},{"email":"sg@adobe.com","name":"stefan-guggisberg"},{"email":"npm@rofe.com","name":"rofe"},{"email":"kptdobe@gmail.com","name":"kptdobe"},{"email":"halls@adobe.com","name":"adobehalls"},{"email":"bradjohn@adobe.com","name":"fullcolorcoder"},{"email":"djaeggi@adobe.com","name":"djaeggi"},{"email":"dylandepass@gmail.com","name":"dylandepass"},{"email":"mhaack@adobe.com","name":"mhaack"},{"email":"amol@adobe.com","name":"amol-anand"},{"email":"stopp@adobe.com","name":"stopp-adobe"},{"email":"namarora@adobe.com","name":"namarora"},{"email":"doten@adobe.com","name":"doten"},{"email":"schmidt@adobe.com","name":"duh_schmidt"},{"email":"astha.bhargava23@gmail.com","name":"asthabh23"},{"email":"zouhir.dahbi@outlook.com","name":"zdahbi"},{"email":"tuicu@adobe.com","name":"tuicu"},{"email":"fmeschbe@adobe.com","name":"fmeschbe"}],"readme":"# rollup-plugin-checksum\n\nRollup plugin that emits a file containing the checksum of all emitted chunks and assets.\n\n## Installation\n\n```\nnpm install @adobe/rollup-plugin-checksum --save-dev\n```\n\nor\n\n```\nyarn add @adobe/rollup-plugin-checksum --dev\n```\n\n## Usage\n\nThe plugin must be added as last plugin.\n\n```javascript\n// rollup.config.js\nimport checksum from '@adobe/rollup-plugin-checksum';\n\nexport default {\n\tinput: './index.js',\n\tplugins: [\n\t\t// other plugins\n\t\tchecksum(/* options */)\n\t]\n}\n```\n\n## Testing and Verification\n\nFor the SRI hash functionality, this plugin includes a verification script that compares the generated hashes with those produced by OpenSSL and Node.js crypto, ensuring correctness:\n\n```bash\n# Run the SRI verification\nnpm run verify:sri\n```\n\nThis script:\n1. Generates SRI hashes using the plugin\n2. Calculates the same hashes using OpenSSL (using `openssl dgst -sha384 -binary | openssl base64 -A`)\n3. Calculates the hashes using Node.js crypto module\n4. Compares all methods to ensure they produce identical results\n\nThe verification runs automatically on each commit in the CI pipeline to ensure the SRI hash implementation remains correct.\n\n## Options\n\n* `filename`: `\"filename\"`\n\n  Name of the emitted file that contains the checksum\n\n* `includeAssets`: `true`\n\n  Whether or not to include assets when calculating the checksum\n\n* `sri`: `undefined` (default) or `\"sha256\"`, `\"sha384\"`, or `\"sha512\"`\n\n  When set to a valid hash algorithm (`\"sha256\"`, `\"sha384\"`, or `\"sha512\"`), the plugin will generate a Subresource Integrity (SRI) hash for a chunk instead of a single MD5 checksum. The SRI hash is calculated using only the chunk code (content), not the filename, and assets are never included in SRI hash calculation.\n  \n  **Important**: When using SRI mode, the plugin requires exactly one chunk in the bundle. If there are multiple chunks, the plugin will throw an error. Configure your Rollup output to produce a single chunk when using this option.\n  \n  When using SRI mode, the output file will be named `<filename>.sri` and will contain a single SRI hash in the format: `algorithm-base64Hash`.\n\n  Example:\n  ```javascript\n  checksum({ sri: \"sha384\" })\n  ```\n\n  This will generate a file with content like:\n  ```\n  sha384-AbCdEfGhIjKlMnOpQrStUvWxYz1234567890AbCdEfGhIjKlMnOpQrStUvWxYz123\n  ```\n  \n  This hash can be used in HTML `integrity` attributes for scripts and stylesheets.","readmeFilename":"README.md"}