shadow-score 1.0.3 → 1.1.1

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/CHANGELOG.md +12 -0
  2. package/package.json +25 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.1
4
+
5
+ - Fixed TypeScript types for CommonJS consumers: `require` now resolves `dist/index.d.cts` instead of the ESM declarations ("masquerading as ESM" under `node16`/`nodenext`).
6
+ - Exposed `./package.json` in the exports map.
7
+
8
+ ## 1.1.0
9
+
10
+ - Upgraded Sharp to 0.35.5.
11
+ - Raised the minimum supported Node.js version to 20.9 (Node 18 is end-of-life).
12
+ - Upgraded dev tooling (Vitest 5, TypeScript 5.9, tsup 8.5) and resolved all audit advisories.
13
+ - CI now tests on Node 22 and 24 and smoke-tests the packed package on Node 20.
14
+
3
15
  ## 1.0.3
4
16
 
5
17
  - Upgraded Sharp to include current security fixes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadow-score",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "Detect and quantify harsh directional shadows in documents and photos using Otsu bimodal luminance segmentation and spatial illumination gradient analysis with Sharp.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -8,10 +8,16 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs"
14
- }
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ },
20
+ "./package.json": "./package.json"
15
21
  },
16
22
  "files": [
17
23
  "dist",
@@ -25,7 +31,7 @@
25
31
  "test": "vitest run",
26
32
  "test:watch": "vitest",
27
33
  "typecheck": "tsc --noEmit",
28
- "prepublishOnly": "npm run build && npm test"
34
+ "prepublishOnly": "npm run typecheck && npm run build && npm test"
29
35
  },
30
36
  "keywords": [
31
37
  "shadow",
@@ -51,15 +57,22 @@
51
57
  "homepage": "https://github.com/vjymisal0/shadow-score#readme",
52
58
  "license": "MIT",
53
59
  "dependencies": {
54
- "sharp": "0.35.4"
60
+ "sharp": "0.35.5"
55
61
  },
56
62
  "devDependencies": {
57
- "@types/node": "^22.10.2",
58
- "tsup": "^8.3.5",
59
- "typescript": "^5.7.2",
60
- "vitest": "^2.1.8"
63
+ "@types/node": "^26.6.4",
64
+ "tsup": "^8.5.1",
65
+ "typescript": "~5.9.3",
66
+ "vitest": "^5.0.3"
61
67
  },
62
68
  "engines": {
63
- "node": ">=18.0.0"
69
+ "node": ">=20.9.0"
70
+ },
71
+ "overrides": {
72
+ "esbuild": "^0.28.2"
73
+ },
74
+ "sideEffects": false,
75
+ "publishConfig": {
76
+ "access": "public"
64
77
  }
65
78
  }