@bymax-one/nest-cache 1.0.0 → 1.0.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 +27 -0
  2. package/package.json +24 -8
package/CHANGELOG.md CHANGED
@@ -4,6 +4,33 @@ All notable changes to this project are documented in this file. The format is
4
4
  based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this
5
5
  project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [Unreleased]
8
+
9
+ ## [1.0.1] - 2026-07-29
10
+
11
+ ### Fixed
12
+
13
+ - **CommonJS consumers no longer receive ESM type declarations.** Both subpaths
14
+ now declare `types` per condition, so `require()` resolves to the `.d.cts`
15
+ declarations that match the `.cjs` runtime. Previously a single `types` entry
16
+ pointed at the `.d.ts` files, which — with `"type": "module"` — TypeScript
17
+ reads as ESM, so a project on `moduleResolution: node16` / `nodenext`
18
+ importing from CommonJS got declarations for the wrong module format.
19
+ - Added top-level `main`, `module` and `types` so the root entrypoint also
20
+ resolves under the legacy `moduleResolution: node` algorithm. The `./shared`
21
+ subpath remains unresolvable in that mode, which is inherent to subpath
22
+ exports and not fixable without a directory shim.
23
+ - Exposed `./package.json` through the `exports` map. Reading it previously
24
+ failed with `ERR_PACKAGE_PATH_NOT_EXPORTED`, which breaks tooling that
25
+ inspects an installed package's manifest.
26
+
27
+ ### Added
28
+
29
+ - `pnpm check:exports` (`@arethetypeswrong/cli`) — packs the tarball and
30
+ resolves every entrypoint the way each module resolution mode would. Wired
31
+ into CI and into the release-shape gates, since the type-level API tests
32
+ compile `src` and therefore cannot catch a broken `exports` map.
33
+
7
34
  ## [1.0.0] - 2026-07-29
8
35
 
9
36
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bymax-one/nest-cache",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Typed Redis cache for NestJS based on ioredis 5, with namespace strategy, Pub/Sub and Lua script management.",
5
5
  "author": "Bymax One <support@bymax.one>",
6
6
  "license": "MIT",
@@ -22,16 +22,30 @@
22
22
  ],
23
23
  "exports": {
24
24
  ".": {
25
- "types": "./dist/server/index.d.ts",
26
- "import": "./dist/server/index.mjs",
27
- "require": "./dist/server/index.cjs"
25
+ "import": {
26
+ "types": "./dist/server/index.d.ts",
27
+ "default": "./dist/server/index.mjs"
28
+ },
29
+ "require": {
30
+ "types": "./dist/server/index.d.cts",
31
+ "default": "./dist/server/index.cjs"
32
+ }
28
33
  },
29
34
  "./shared": {
30
- "types": "./dist/shared/index.d.ts",
31
- "import": "./dist/shared/index.mjs",
32
- "require": "./dist/shared/index.cjs"
33
- }
35
+ "import": {
36
+ "types": "./dist/shared/index.d.ts",
37
+ "default": "./dist/shared/index.mjs"
38
+ },
39
+ "require": {
40
+ "types": "./dist/shared/index.d.cts",
41
+ "default": "./dist/shared/index.cjs"
42
+ }
43
+ },
44
+ "./package.json": "./package.json"
34
45
  },
46
+ "main": "./dist/server/index.cjs",
47
+ "module": "./dist/server/index.mjs",
48
+ "types": "./dist/server/index.d.cts",
35
49
  "lint-staged": {
36
50
  "*.{ts,tsx,js,mjs,cjs}": [
37
51
  "eslint --fix",
@@ -49,6 +63,7 @@
49
63
  "reflect-metadata": "^0.2.0"
50
64
  },
51
65
  "devDependencies": {
66
+ "@arethetypeswrong/cli": "^0.18.5",
52
67
  "@commitlint/cli": "^21.2.1",
53
68
  "@commitlint/config-conventional": "^21.2.0",
54
69
  "@eslint/js": "^9.39.4",
@@ -117,6 +132,7 @@
117
132
  "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.server.json",
118
133
  "test:types": "tsc --noEmit -p tsconfig.typetest.json",
119
134
  "size": "node scripts/check-size.mjs",
135
+ "check:exports": "attw --pack . --profile node16",
120
136
  "clean": "rm -rf dist coverage",
121
137
  "release": "pnpm publish --provenance"
122
138
  }