Skip to content

build(deps): resolve open dependency PRs — @babel/parser 8 (+compat), supabase-js floor; hold TypeScript 7#1014

Merged
BigSimmo merged 3 commits into
mainfrom
claude/resolve-dependency-prs-rmb9hv
Jul 20, 2026
Merged

build(deps): resolve open dependency PRs — @babel/parser 8 (+compat), supabase-js floor; hold TypeScript 7#1014
BigSimmo merged 3 commits into
mainfrom
claude/resolve-dependency-prs-rmb9hv

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

Triages the three open Dependabot dependency PRs and lands the ones that verify clean without regression, with the smallest safe compatibility changes. One major is deliberately held because it is incompatible with the toolchain.

  • chore(deps-dev): bump @babel/parser from 7.29.7 to 8.0.4 #991@babel/parser ^7.29.7^8.0.4 (dev, major): TAKEN + migrated.

    • Babel 8 models dynamic import(...) as an ESTree-aligned ImportExpression (specifier in source, attributes in options) instead of Babel 7's CallExpression with an Import callee. The architecture-boundaries runtime-graph parser is taught both shapes so dynamic-import edges keep resolving (a [] regression otherwise).
    • Babel 8 parses import attributes by default and removed the standalone "importAttributes" parser plugin (now a type error). Dropped it from the two test parsers; attribute parsing is unchanged.
    • Only @babel/parser is bumped to 8 at the top level; the Babel toolchain's own transitive @babel/parser stays at 7. @babel/parser is a dev-only, test-infra dependency (Next builds with SWC), so no runtime/product surface is touched.
  • chore(deps): bump @supabase/supabase-js from 2.110.2 to 2.110.7 #945@supabase/supabase-js2.110.7 (prod, patch): superseded.

    • 2.110.7 is already the resolved/installed version on main under the old ^2.108.2 range, so this only lifts the declared floor to ^2.110.7 to match reality.
    • PR chore(deps): bump @supabase/supabase-js from 2.110.2 to 2.110.7 #945's scanner rewrite in scripts/check-client-bundle-secrets.mjs is intentionally not taken: main has since evolved that scanner to mask matched values, and its regex (/\bsb_secret_[A-Za-z0-9_-]{20,}\b/) already ignores supabase-js's bare sb_secret_ prefix-check literal (verified: bare-prefix → no match, real key → match). Taking the stale rewrite would regress the newer masking. No source/scanner change is needed here.
  • chore(deps-dev): bump typescript from 6.0.3 to 7.0.2 #990typescript ^6.0.0^7.0.2 (dev, major): HELD (incompatible).

    • TypeScript 7 is the native (Go) port; its typescript package no longer exposes the classic programmatic compiler API (ts.createProgram / ts.transpileModule are undefined).
    • typescript-eslint (via eslint-config-next) needs that API and crashes at lint time: TypeError: Cannot read properties of undefined (reading 'Cjs') in @typescript-eslint/typescript-estree. Native tsc --noEmit alone passes, but lint is hard-broken.
    • This is exactly why the repo already keeps a separate @typescript/typescript6 for compiler-API consumers. Bumping the typescript peer to 7 breaks the type-aware lint toolchain. Kept at ^6.0.0 per the "newest compatible version" rule; revisit once typescript-eslint + eslint-config-next support the native port.

Two CI-driven follow-ups (in this PR)

  • Lockfile regenerated with the repo-pinned npm@11.17.0. An older npm (11.6.2, this session's default) pruned two platform-optional packages (@emnapi/core, @emnapi/runtime — the wasm fallback for unrs-resolver's native binding) when regenerating the lock, which broke CI's strict npm ci (EUSAGE: Missing @emnapi/* from lock file). Regenerating with the pinned npm keeps the optional entries and restores npm ci sync.
  • brace-expansion ReDoS advisory (GHSA-3jxr-9vmj-r5cp) remediated. CI's "Dependency audit (blocking on dependency changes)" step (npm audit --omit=dev --audit-level=high) hard-blocks only when a PR touches the manifest/lockfile — so main carries this pre-existing high-severity advisory ungated, but this dependency PR must clear it. Fixed surgically via per-major overrides (brace-expansion@1 1.1.14 → 1.1.16, brace-expansion@2 2.1.0 → 2.1.2) so each consumer keeps its major and takes only the security patch. npm audit --omit=dev --audit-level=high now reports 0 vulnerabilities.

Verification

Offline gates on the delivered state (Babel 8 + supabase floor + brace-expansion patch, TypeScript pinned at 6):

  • npm run typecheck — pass
  • npm run test (full unit suite) — 3028 passed, no new failures vs. baseline. The single failure (tests/pdf-extraction-budget.test.ts "terminates the Python child tree") is a pre-existing, deterministic sandbox-only failure (process-group kill behaves differently here); it fails identically on unmodified main.
  • npm run lint — pass
  • npm run check:knip (dependency graph) — pass
  • Production build + check:client-bundle-secrets against a real bundle — pass
  • npm@11.17.0 ci --dry-run (lock/manifest sync) — pass
  • npm audit --omit=dev --audit-level=high — 0 vulnerabilities

Risk and rollout

  • Risk: low. Babel 8 change is confined to dev/test tooling with a behavior-preserving AST migration; supabase-js is a floor bump to the already-installed version; brace-expansion is a same-major security patch. No runtime/product code changed.
  • Rollback: revert the two commits, or re-pin @babel/parser to ^7.29.7 / @supabase/supabase-js to ^2.108.2 and drop the brace-expansion overrides in package.json, then regenerate the lockfile.
  • Provider or production effects: None.

Clinical Governance Preflight

Not applicable — no change to ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output. (The one privacy-adjacent file touched, tests/client-secret-surface.test.ts, only had the Babel 8 parser-plugin line updated; the secret scanner logic is unchanged.)

Notes

Summary by CodeRabbit

  • Chores

    • Updated core and development tooling dependencies.
    • Added safeguards for consistent dependency versions.
  • Tests

    • Improved compatibility with the latest parser behavior.
    • Continued validating dynamic imports and client-environment isolation.

@supabase

supabase Bot commented Jul 20, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updates Babel and package dependency versions, removes the obsolete import-attributes parser plugin, and adapts architecture-boundary parsing to support Babel’s current dynamic import AST representations.

Changes

Babel parser compatibility

Layer / File(s) Summary
Parser version and configuration
package.json, tests/architecture-boundaries.test.ts, tests/client-secret-surface.test.ts
Updates dependency overrides and Babel parser versions, while relying on default import-attributes parsing in both test helpers.
Dynamic import AST handling
tests/architecture-boundaries.test.ts
Centralizes dynamic import specifier extraction and supports both ImportExpression and legacy CallExpression import nodes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: dependencies, javascript

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the main dependency updates and the deliberate TypeScript hold, and it is specific enough to understand the change.
Description check ✅ Passed The PR description includes the required sections and provides summary, verification, risk, preflight, and notes details.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/resolve-dependency-prs-rmb9hv

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Safety and config checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #4129 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

…se-js floor

Resolves two open Dependabot dependency PRs.

@babel/parser ^7.29.7 → ^8.0.4 (dev, PR #991)
- Babel 8 models dynamic `import(...)` as an ESTree-aligned ImportExpression
  (specifier in `source`, attributes in `options`) instead of a CallExpression
  whose callee is an `Import` node. Teach the architecture-boundaries import
  graph both shapes so dynamic-import edges keep resolving.
- Babel 8 parses import attributes by default and removed the standalone
  "importAttributes" parser plugin (now a type error). Drop it from the two
  test parsers; attribute parsing behaviour is unchanged.

@supabase/supabase-js ^2.108.2 → ^2.110.7 (prod, supersedes PR #945)
- 2.110.7 is already the resolved/installed version under the old floor; this
  only lifts the declared floor to match reality. The client-bundle secret
  scanner already masks matches and already ignores supabase-js's bare
  `sb_secret_` prefix literal (its regex requires a 20+ char token), so the
  stale scanner rewrite in PR #945 is intentionally not taken — it would
  regress the newer masking on main.

Lockfile is regenerated with the repo-pinned npm@11.17.0 (packageManager) so
platform-optional entries (@emnapi/core, @emnapi/runtime) are preserved; an
older npm prunes them and breaks `npm ci` in CI.

Verification (offline): typecheck, full unit suite (no new failures vs the
pre-existing pdf-extraction-budget sandbox flake), lint, knip, production
build + client-bundle-secrets scan, and `npm@11.17.0 ci --dry-run` all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TVVgc9PtHfj1aUQX387P8y
@BigSimmo
BigSimmo force-pushed the claude/resolve-dependency-prs-rmb9hv branch from efd51e1 to 2f92eed Compare July 20, 2026 23:17
…audit gate

The repo's "Dependency audit (blocking on dependency changes)" CI step runs
`npm audit --omit=dev --audit-level=high` and hard-blocks only when a PR
touches the manifest/lockfile. main carries a pre-existing high-severity
brace-expansion advisory (GHSA-3jxr-9vmj-r5cp, ReDoS) ungated, but any
dependency PR — including this one — must clear it to merge.

Fix surgically via per-major overrides so each consumer keeps its major and
only takes the security patch (no cross-major upgrade, minimal regression
surface):
- brace-expansion@1  1.1.14 -> 1.1.16
- brace-expansion@2  2.1.0  -> 2.1.2

`npm audit --omit=dev --audit-level=high` now reports 0 vulnerabilities.
Lockfile regenerated with the pinned npm@11.17.0 (optional @emnapi/* deps
retained). typecheck and the full unit suite are unchanged (no new failures
vs the pre-existing pdf-extraction-budget sandbox flake).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TVVgc9PtHfj1aUQX387P8y
@BigSimmo
BigSimmo marked this pull request as ready for review July 20, 2026 23:52
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@BigSimmo
BigSimmo merged commit 5f3a50a into main Jul 20, 2026
20 checks passed
@BigSimmo
BigSimmo deleted the claude/resolve-dependency-prs-rmb9hv branch July 20, 2026 23:57

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Around line 205-208: Remove the uuid 11 override from the package dependency
overrides, while retaining the existing brace-expansion overrides at their
patched versions. Do not change the ExcelJS usage in the document extractor or
sample-generation script.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e2aa0eb-1d9b-417b-92c9-416066b5b7f4

📥 Commits

Reviewing files that changed from the base of the PR and between 87815f4 and ace7a47.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json
  • tests/architecture-boundaries.test.ts
  • tests/client-secret-surface.test.ts

Comment thread package.json
Comment on lines +205 to 208
"uuid": "^11.1.1",
"brace-expansion@1": "^1.1.16",
"brace-expansion@2": "^2.1.2"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

npm ls --all brace-expansion uuid
node - <<'NODE'
const fs = require("node:fs");
const lock = JSON.parse(fs.readFileSync("package-lock.json", "utf8"));
for (const [key, value] of Object.entries(lock.packages ?? {})) {
  if (/(^|\/)(brace-expansion|uuid)$/.test(key)) {
    console.log(key, value.version);
  }
}
NODE

Repository: BigSimmo/Database

Length of output: 1106


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== uuid/brac-expansion usages in repo ==\n'
rg -n --hidden --glob '!package-lock.json' --glob '!node_modules' '\buuid\b|brace-expansion' .

printf '\n== package-lock entries ==\n'
node - <<'NODE'
const fs = require("node:fs");
const lock = JSON.parse(fs.readFileSync("package-lock.json", "utf8"));
for (const [key, value] of Object.entries(lock.packages ?? {})) {
  if (/(^|\/)(brace-expansion|uuid)$/.test(key)) {
    console.log(`${key} ${value.version}`);
  }
}
NODE

Repository: BigSimmo/Database

Length of output: 50374


🌐 Web query:

brace-expansion vulnerability patched versions 1.x 2.x 5.x uuid 11 breaking changes older API

💡 Result:

For the brace-expansion library, two primary denial-of-service (DoS) vulnerabilities have been identified: 1. Zero-step sequence vulnerability (CVE-2026-33750): A brace pattern with a zero step value (e.g., {1..2..0}) causes infinite loops and memory exhaustion [1][2][3]. Patched versions include 1.1.13, 2.0.3, 3.0.2, and 5.0.5 [1][2][3]. 2. Exponential-time expansion vulnerability (CVE-2026-13149): Consecutive non-expanding {} brace groups cause exponential CPU consumption [4][5][6]. Patched versions include 1.1.16, 2.1.2, and 5.0.7 [4]. For the uuid library, version 11 introduced significant breaking changes [7][8][9]. Key changes include: - Migration to TypeScript: The library is now written in TypeScript; users should remove @types/uuid from dependencies [10]. - ESM Migration: The codebase transitioned to ECMAScript Modules (ESM) [7][9]. - API Changes: - Default export (v4) is removed [7][9]. - Deep imports (e.g., require('uuid/v4')) are no longer supported [7][9]. - Changes in options handling for v1, v6, and v7: Passing an options argument now explicitly disables internal state utilization for uniqueness, applying defaults instead [11][10]. - Binary UUIDs are now returned as Uint8Array, which may affect callers of parse or stringify [10]. - Support Changes: Support for Node.js versions below 16 and certain older browsers (like IE 11) was dropped [7][8][9]. The minified UMD build was also removed [9].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== direct npm-package uuid references ==\n'
rg -n --hidden --glob '!package-lock.json' --glob '!node_modules' --glob '!supabase/**' \
  'from ["'\'']uuid["'\'']|require\(["'\'']uuid["'\'']\)|uuid/v[0-9]|`@types/uuid`' \
  package.json ./**/*.js ./**/*.jsx ./**/*.ts ./**/*.tsx ./**/*.mjs ./**/*.cjs || true

printf '\n== package.json uuid-related entries ==\n'
node - <<'NODE'
const pkg = JSON.parse(require("node:fs").readFileSync("package.json", "utf8"));
for (const [k, v] of Object.entries({dependencies: pkg.dependencies, devDependencies: pkg.devDependencies, overrides: pkg.overrides})) {
  if (!v) continue;
  for (const [name, ver] of Object.entries(v)) {
    if (name.includes('uuid') || name.includes('brace-expansion')) {
      console.log(k, name, ver);
    }
  }
}
NODE

Repository: BigSimmo/Database

Length of output: 383


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== package-lock uuid consumers ==\n'
node - <<'NODE'
const fs = require('node:fs');
const lock = JSON.parse(fs.readFileSync('package-lock.json', 'utf8'));
for (const [path, pkg] of Object.entries(lock.packages ?? {})) {
  if (path === 'node_modules/exceljs' || /(^|\/)uuid$/.test(path) || /(^|\/)brace-expansion$/.test(path) || /(^|\/)minimatch$/.test(path)) {
    const deps = pkg.dependencies || {};
    console.log(path || '<root>', 'version=' + (pkg.version ?? ''), 'deps=' + JSON.stringify(deps));
  }
}
NODE

printf '\n== source imports of uuid/exceljs ==\n'
git ls-files | rg '\.(js|jsx|ts|tsx|mjs|cjs|json|yml|yaml)$' | xargs rg -n '\b(uuid|exceljs)\b' || true

Repository: BigSimmo/Database

Length of output: 40598


🌐 Web query:

exceljs source uuid usage v4 named import uuid 11 compatibility

💡 Result:

ExcelJS currently pins the uuid dependency to ^8.3.0 in version 4.4.0 [1][2]. While the library uses uuid's v4 method internally via the named CommonJS import const {v4: uuidv4} = require('uuid') [1], it does not natively support or officially bundle uuid 11 or later [2]. Users encountering security advisories or requiring compatibility with newer uuid versions typically address this by using package manager overrides (npm) or resolutions (yarn) to force the transitive dependency to a newer version, such as uuid 14.0.0 [1][3]. Because ExcelJS consumes uuid via a simple, common v4 call, this override is generally compatible and effective without requiring changes to ExcelJS source code [1][3]. If you are using modern Node.js environments, you can apply this override in your package.json to resolve security vulnerabilities or compatibility issues: For npm: "overrides": { "exceljs": { "uuid": "^14.0.0" } } For yarn: "resolutions": { "exceljs/uuid": "^14.0.0" } Note that uuid 11 and later versions are ESM-only, which can cause issues if your environment or older build tools (like older versions of Jest or specific CommonJS setups) expect the older CommonJS structure [3][4]. Using a recent version of Node.js (e.g., 22+) is recommended to avoid module compatibility errors [3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== ExcelJS call sites ==\n'
rg -n 'ExcelJS|exceljs' src scripts tests --glob '!**/node_modules/**' --glob '!package-lock.json' || true

printf '\n== src/lib/extractors/document.ts (selected lines) ==\n'
sed -n '1,220p' src/lib/extractors/document.ts

printf '\n== scripts/generate-sample-documents.ts (selected lines) ==\n'
sed -n '1,220p' scripts/generate-sample-documents.ts

Repository: BigSimmo/Database

Length of output: 18604


Drop the uuid 11 override exceljs@4.4.0 still pulls uuid through a CommonJS require, and the codebase uses ExcelJS in src/lib/extractors/document.ts and scripts/generate-sample-documents.ts. The brace-expansion edges are already on patched releases (1.1.16, 2.1.2, 5.0.7).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` around lines 205 - 208, Remove the uuid 11 override from the
package dependency overrides, while retaining the existing brace-expansion
overrides at their patched versions. Do not change the ExcelJS usage in the
document extractor or sample-generation script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants