@neetru/sdk 2.3.5 → 2.3.6

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ 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.6] - 2026-05-26 — **fix(bundle): webpackIgnore em TODOS os dynamic imports node-only — bug_168368ae [CRITICAL]**
9
+
10
+ ### Corrigido
11
+
12
+ - **bug_168368aedb664edba1ca1f1945b568ac (CRITICAL) — fix 2.3.5 foi parcial: `webpackIgnore` aplicado só em `createSqlClientFromConfig`, mas `createPgPool` + `createDrizzleHandle` (helpers separados no mesmo arquivo) + os 3 dynamic imports em `MockDb.sql()` (`pg-mem`, `drizzle-orm/node-postgres`, `@electric-sql/pglite`, `drizzle-orm/pglite`) ainda estavam sem o magic comment.**
13
+ Resultado: webpack do consumer Next.js seguia o module graph daqueles paths e ainda tentava bundle `pg` → `Module not found: tls/fs` no client.
14
+ Fix 2.3.6: `/* webpackIgnore: true */` em **todos** os 7 spots de `await import('pg' | 'drizzle-orm/node-postgres' | 'pg-mem' | '@electric-sql/pglite' | 'drizzle-orm/pglite')` em `sql-client.ts` + `mocks.ts`.
15
+
16
+ ### Testes (antirregressão atualizado)
17
+
18
+ - **`no-node-deps-in-browser-bundle.regression.test.ts`** expandido: agora pega `import("X")` dynamic SEM `webpackIgnore` (regex negative lookahead). Antes só cobria `from "X"` static. Adicionado 4 patterns: pg, drizzle-orm/node-postgres, pg-mem, @electric-sql/pglite.
19
+
8
20
  ## [2.3.5] - 2026-05-26 — **fix(bundle): node deps fora do browser entry — bug_0f836014 [CRITICAL]**
9
21
 
10
22
  ### Corrigido
package/dist/auth.cjs CHANGED
@@ -450,7 +450,10 @@ function parseLease(raw) {
450
450
  };
451
451
  }
452
452
  async function createPgPool(lease) {
453
- const { Pool } = await import('pg');
453
+ const { Pool } = await import(
454
+ /* webpackIgnore: true */
455
+ 'pg'
456
+ );
454
457
  const ssl = lease.sslca ? {
455
458
  ca: lease.sslca,
456
459
  cert: lease.clientCert ?? void 0,
@@ -470,7 +473,10 @@ async function createPgPool(lease) {
470
473
  });
471
474
  }
472
475
  async function createDrizzleHandle(pool, schema) {
473
- const { drizzle } = await import('drizzle-orm/node-postgres');
476
+ const { drizzle } = await import(
477
+ /* webpackIgnore: true */
478
+ 'drizzle-orm/node-postgres'
479
+ );
474
480
  return drizzle(pool, { schema });
475
481
  }
476
482
  async function createSqlClientWithDeps(deps, options) {