Skip to content

fix(build): resolve TypeScript 6 + ai v7 compatibility — CI green#6

Merged
ferhimedamine merged 2 commits into
mainfrom
fix/ci-ts6-node-types-ai-v7
Jul 2, 2026
Merged

fix(build): resolve TypeScript 6 + ai v7 compatibility — CI green#6
ferhimedamine merged 2 commits into
mainfrom
fix/ci-ts6-node-types-ai-v7

Conversation

@ferhimedamine

Copy link
Copy Markdown
Contributor

Root Cause

Dependabot merged TypeScript 5.9→6.0 (PR #4). In TypeScript 6, global process type is no longer injected automatically — you must explicitly list "node" in tsconfig.compilerOptions.types.

Additionally, tsup v8 internally sets baseUrl: "." in DTS builds, which TypeScript 6 now flags as a deprecation error unless ignoreDeprecations: "6.0" is set.

Changes

  • tsconfig.json: add "types": ["node"] → fixes TS2591 Cannot find name 'process'
  • tsconfig.json: add "ignoreDeprecations": "6.0" → silences tsup's baseUrl deprecation in DTS build
  • package.json: bump ai devDep ^6.0.0^7.0.0 to align CI "latest" matrix with actual locked version; peerDep stays >=6.0.0
  • package-lock.json: updated to ai 7.0.12

Verification (local)

npm ci && npm run typecheck && npm test && npm run build && npm audit --audit-level=high

All pass: typecheck ✅ tests 11/11 ✅ build (CJS+ESM+DTS) ✅ audit (no HIGH) ✅

Closes

Resolves DAK-7289.

- tsconfig: add "types":["node"] so process.env resolves under TS 6.0
  (TypeScript 6 dropped implicit node type injection — DAK-7289 root cause)
- tsconfig: add "ignoreDeprecations":"6.0" to suppress tsup's internally-set
  baseUrl deprecation warning that errors in TS 6 DTS builds
- package.json: bump ai devDep 6→7 so CI "latest" matrix and lock file align;
  peerDep remains ">=6.0.0" for broad consumer compatibility
- package-lock.json: updated to ai 7.0.12

Closes #5 (ai 6→7 dependabot bump superseded by this change on main)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ferhimedamine ferhimedamine added the auto-merge CTO auto-merges when CI is green label Jul 2, 2026
Mirrors the pattern from dakera-js — triggers on release:published,
builds and publishes @dakera-ai/ai-sdk to npm with --access=public.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ferhimedamine

Copy link
Copy Markdown
Contributor Author

🤖 [Agent: CTO] Code Review — APPROVED

Classification: type:fix — build/CI compatibility fix. No bench gate needed.

Review:

  • tsconfig.json: "types": ["node"] correctly fixes TS6 TS2591 global process regression. "ignoreDeprecations": "6.0" is the standard tsup/baseUrl migration pattern.
  • package.json: ai devDep ^6→^7 aligns CI matrix with lockfile. peerDep >=6.0.0 preserved — backward compatible.
  • release.yml: Clean npm publish workflow — minimal permissions (contents: read), correct trigger (release: [published]), Node 22, --access=public. Matches dakera-js pattern.
  • package-lock.json: Standard lockfile update, no unexpected transitive deps.
  • ✅ CI: Node 20 + Node 22 both green (11/11 tests, CJS+ESM+DTS build, audit clean).
  • ✅ No security concerns.

Merge: Squash-merging now. This also fixes the current main branch CI failure.

@ferhimedamine ferhimedamine added the agent/cto Reviewed/merged by CTO agent label Jul 2, 2026
@ferhimedamine ferhimedamine merged commit 27b480d into main Jul 2, 2026
2 checks passed
@ferhimedamine ferhimedamine deleted the fix/ci-ts6-node-types-ai-v7 branch July 2, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/cto Reviewed/merged by CTO agent auto-merge CTO auto-merges when CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant