vite-plugin-sri4 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -0
  2. package/package.json +12 -11
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # vite-plugin-sri4
2
2
 
3
+ ![NPM Version](https://img.shields.io/npm/v/vite-plugin-sri4)
4
+ [![codecov](https://codecov.io/gh/7a6163/vite-plugin-sri4/branch/main/graph/badge.svg)](https://codecov.io/gh/7a6163/vite-plugin-sri4)
5
+
3
6
  A Vite plugin to generate Subresource Integrity (SRI) hashes for your assets during the build process. This plugin computes SRI hashes for JavaScript and CSS files and injects them as `integrity` and `crossorigin="anonymous"` attributes into your HTML, ensuring your resources have not been tampered with when loaded by browsers.
4
7
 
5
8
  ## Features
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "vite-plugin-sri4",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "A Vite plugin to generate Subresource Integrity (SRI) hashes for output files.",
5
5
  "type": "module",
6
- "main": "dist/index.cjs",
7
- "module": "dist/index.js",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
8
  "exports": {
9
9
  ".": {
10
10
  "import": "./dist/index.js",
@@ -19,21 +19,22 @@
19
19
  "dev": "rollup -c -w",
20
20
  "test": "vitest run",
21
21
  "test:watch": "vitest",
22
- "test:coverage": "vitest run --coverage"
22
+ "test:coverage": "vitest run --coverage",
23
+ "prepublishOnly": "npm run build"
23
24
  },
24
25
  "dependencies": {
25
- "node-fetch": "^3.3.0"
26
+ "node-fetch": "^3.3.2"
26
27
  },
27
28
  "peerDependencies": {
28
29
  "vite": "^4.0.0 || ^5.0.0 || ^6.0.0"
29
30
  },
30
31
  "devDependencies": {
31
- "@rollup/plugin-commonjs": "^25.0.8",
32
- "@rollup/plugin-node-resolve": "^15.3.1",
33
- "@vitest/coverage-v8": "^3.0.5",
34
- "rollup": "^4.0.0",
35
- "vite": "^6.1.0",
36
- "vitest": "^3.0.5"
32
+ "@rollup/plugin-commonjs": "^25.0.7",
33
+ "@rollup/plugin-node-resolve": "^15.2.3",
34
+ "@vitest/coverage-v8": "^1.2.2",
35
+ "rollup": "^4.9.6",
36
+ "vite": "^5.0.12",
37
+ "vitest": "^1.2.2"
37
38
  },
38
39
  "keywords": [
39
40
  "vite",