Repository navigation
chore(deps): update @deepnote packages to their zod 4 releases - #610
Conversation
Move every @deepnote/* dependency to its latest release: blocks 5.0.0, convert 5.0.0, database-integrations 2.0.0, runtime-core 0.8.0, cloud 0.3.0, cloud-sync 0.2.0 and cli 0.11.0. sql-language-server 3.0.1 is already the latest. These releases import the zod 4 API and declare zod ^4.6.7, so the lockfile resolves a single zod 4.6.7 and one copy of each @deepnote package, including under @deepnote/cli, local-runner and reactivity. All nested zod 3.25.76 copies are gone, so the GHSA-mrhx-c7xc-m3w5 exception in .nsprc and osv-scanner.toml no longer matches anything and is removed. Raise the root yaml override from 2.8.3 to 2.9.1: the @deepnote packages declare yaml ^2.9.0, and the old pin held them below that floor. Drop the stale version label from the database-integrations heading in specs/INTEGRATIONS_CREDENTIALS.md.
…e/blocks The federated BigQuery path built its Python from hand-copied @deepnote/blocks helpers. Their escapePythonString only escaped backslash, single quote and LF, so a query containing a carriage return (CRLF line endings) produced an unterminated string literal and the cell failed with a SyntaxError. Upstream has escaped CR and NUL since 4.8.1, and 5.0.0 also escapes tabs, other control characters and U+2028/2029. Call createPythonCodeForSqlBlockWithConnectionJson, which @deepnote/blocks has exported since 4.8.1 and which produces the same code otherwise (byte-identical for queries without control characters). This also validates deepnote_return_variable_type against its allowlist instead of interpolating it into the generated Python, matching the non-federated createPythonCode path. Delete vendoredBlocksHelpers.ts with its tests and the ts-dedent dependency that only it used.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #610 +/- ##
=====================================
- Coverage 38% 38% -1%
=====================================
Files 825 824 -1
Lines 41273 41251 -22
Branches 9087 9079 -8
=====================================
- Hits 15837 15816 -21
- Misses 23348 23350 +2
+ Partials 2088 2085 -3
🚀 New features to boost your workflow:
|
|
@coderabbitai full review |
Action performed
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Summary
Updates every
@deepnote/*dependency to the releases that migrate to the zod 4 API (upstream deepnote/deepnote#597). It also replaces the federated BigQuery path's hand-copied@deepnote/blockshelpers with the upstream function, which fixes generated code for queries with a carriage return.@deepnote/blocks@deepnote/convert@deepnote/database-integrations@deepnote/runtime-core@deepnote/cloud@deepnote/cloud-sync@deepnote/cli(exact pin)@deepnote/sql-language-serverChanges
chore(deps)commitpackage.json,package-lock.json: the bumps above. All packages now declarezod ^4.6.7, so the lockfile resolves a singlezod4.6.7 (the root^4.6.6range already allowed it). It also resolves one copy of each@deepnote/*package, including under@deepnote/cli,local-runnerandreactivity, which used to nest their own older copies. Every nestedzod3.25.76 copy is gone..nsprc,osv-scanner.toml: removed the GHSA-mrhx-c7xc-m3w5 (zod) exception, because nothing in the tree matches it any more.yamloverride raised from2.8.3to2.9.1. The@deepnotepackages declareyaml ^2.9.0, and the old pin held them below that floor (already true for blocks 4.8.1). Every other consumer accepts 2.9.1, andpostcss-load-configkeeps its own nested 1.10.3 override. The only lockfile change isyaml2.8.3 → 2.9.1.specs/INTEGRATIONS_CREDENTIALS.md: dropped the stale "(v1.1.0)" label from the database-integrations heading.fix(integrations)commitfederatedAuthSqlBlockCodeGenerator.node.tsnow returnscreatePythonCodeForSqlBlockWithConnectionJson(sqlBlock, { connectionJson })from@deepnote/blocks(exported since 4.8.1). Before, it assembled the code fromvendoredBlocksHelpers.ts, whoseescapePythonStringescaped only\,'and LF. A query containing a carriage return (CRLF line endings) therefore producedSyntaxError: unterminated string literalin the kernel. Upstream also escapes CR, NUL, tabs, other control characters and U+2028/2029.vendoredBlocksHelpers.ts, its 15 unit tests (the behavior is now upstream's and tested there), and thets-dedentdirect dependency that only that file imported.ts-dedentstays in the tree through@deepnote/blocksand mermaid.parsePythonSingleQuotedtest-helper docstring, which claimed to be the inverse ofescapePythonString.Behavior changes
.deepnoteparse errors and integrations-YAML diagnostics (Problems panel, logs) use zod 4's messages. For example, "Required" is now "Invalid input: expected string, received undefined", and the issue codeinvalid_union_discriminatoris nowinvalid_union. No extension code or test matches on these..deepnoteand integrations YAML files in this repo and in the deepnote/deepnote examples re-save byte-identically. That holds for blocks 4.8.1 vs 5.0.0, and for yaml 2.8.3 vs 2.9.1 under blocks 5.0.0. Input-block metadata defaults, empty image content and minute-precision timestamps parse as before.parseIntegrationsreports the same integrations and issue paths for invalid YAML (wrong types, unknown type, missing fields); only the message text differs.deepnote_return_variable_typein cell metadata now fails the cell with upstream'sInvalidValueError(viahandleFederatedGenerateError) instead of being pasted into the Python unescaped. This matches the non-federatedcreatePythonCodepath..deepnotefile with ~150k invalid blocks now throwsRangeError: Maximum call stack size exceededinstead ofSchemaValidationError. The extension catches it either way.install-skillsis unchanged upstream, and it accepts all four agent names the extension passes (cursor,windsurf,antigravity,github copilot). Upstream's other changes in this range: escaping Python line separators in generated code, cloud-sync messages without CLI flag hints, keeping the live copy of files over 100 MiB on publish, andschedule --remove.Verification
npm run typecheck,lint(0 errors, the same 27 pre-existing warnings),formatandspell-checkpass.npm run esbuild-allsucceeds. The desktop and web bundle metafiles contain onezod(4.x, nov3files) and no nested@deepnotecopies.dist/deepnoteCli.cjsrunsinstall-skillsfor all four agents under Node 20.18.0 and 22.21.1.npx better-npm-audit auditandaudit --productionpass.npm auditgoes from 27 (12 high) to 17 (2 high); the 10 removed entries are the zod advisory through@deepnote/*.npm installleaves the lockfile unchanged (CI's drift check). The lockfile is 1,407,784 bytes, under qlty's 2,098,000-byte limit.codecov/project. Project coverage drops from 38.37% to 38.34% because deletingvendoredBlocksHelpers.tsremoves 22 lines, 21 of them covered.codecov/patchreports 100% of the diff covered.Not verified
@deepnote/cloud-sync. They will need a rebase onto 0.2.0 and the zod 4 schemas.Summary by CodeRabbit