@neetru/sdk 2.3.0 → 2.3.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 +9 -0
  2. package/package.json +12 -4
package/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to `@neetru/sdk` will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.3.1] - 2026-05-26 — **fix(deps): drizzle-orm + pg como peerDependencies — bug_42ae9f80 [CRITICAL]**
9
+
10
+ ### Corrigido
11
+
12
+ - **bug_42ae9f80b2884bd583c5246771f7730c (CRITICAL) — `drizzle-orm` em `dependencies` causava type collision com versão do consumer.**
13
+ Quando o projeto consumer instalava `drizzle-orm` direto e tentava `client.db.sql(schema)`, o TypeScript via 2 cópias diferentes (uma nested em `node_modules/@neetru/sdk/node_modules/drizzle-orm`, outra no consumer) e reclamava: `'Property config is protected but type Column<...> is not a class derived from Column<...>'` + `'shouldInlineParams private'`. Bloqueava Fases 2-8 da migração pdv-agiliza pra `vm-postgres-single`.
14
+ Fix: movidas `drizzle-orm` e `pg` de `dependencies` pra `peerDependencies` (com `peerDependenciesMeta.optional: true`). Consumer instala 1 versão, todos os tipos convergem. Devkit mantém `drizzle-orm` + `pg` em `devDependencies` pra build/test internos.
15
+ **Breaking expected on consumer side:** se o projeto consumer NÃO tinha `drizzle-orm` em deps mas usava `client.db.sql()`, agora precisa `npm install drizzle-orm pg`. Consumers que só usam transport REST/Firestore não são afetados (peerDeps optional).
16
+
8
17
  ## [2.3.0] - 2026-05-25 — **feat(db-config): renomeia engine→transport com deprecation — bug_ed9da7fd [HIGH]**
9
18
 
10
19
  Fix do bug `bug_ed9da7fd11194eac87f0eb9c75e5fad9` (HIGH) — colisão de terminologia: `engine` no SDK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neetru/sdk",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Neetru SDK 1.1 — biblioteca runtime estável para consumir o ecossistema Neetru (auth OIDC, catalog, entitlements, telemetry, usage metering, support tickets, datastore, checkout).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -84,9 +84,17 @@
84
84
  }
85
85
  },
86
86
  "peerDependencies": {
87
+ "drizzle-orm": "^0.43.0 || ^0.44.0 || ^0.45.0",
88
+ "pg": "^8.0.0",
87
89
  "react": "^18.0.0 || ^19.0.0"
88
90
  },
89
91
  "peerDependenciesMeta": {
92
+ "drizzle-orm": {
93
+ "optional": true
94
+ },
95
+ "pg": {
96
+ "optional": true
97
+ },
90
98
  "react": {
91
99
  "optional": true
92
100
  }
@@ -115,8 +123,10 @@
115
123
  "@types/react": "^19.2.15",
116
124
  "@types/react-dom": "^19.2.3",
117
125
  "@vitest/browser": "^4.1.7",
126
+ "drizzle-orm": "^0.43.1",
118
127
  "fake-indexeddb": "^6.2.5",
119
128
  "jsdom": "^29.1.1",
129
+ "pg": "^8.15.6",
120
130
  "react": "^19.2.6",
121
131
  "react-dom": "^19.2.6",
122
132
  "tsup": "^8.3.5",
@@ -126,9 +136,7 @@
126
136
  },
127
137
  "dependencies": {
128
138
  "@neetru/realtime-protocol": "file:../neetru_libs/packages/realtime-protocol",
129
- "drizzle-orm": "^0.43.1",
130
139
  "idb": "^8.0.3",
131
- "jose": "^6.2.3",
132
- "pg": "^8.15.6"
140
+ "jose": "^6.2.3"
133
141
  }
134
142
  }