Skip to content

feat(deepnote-file-schema): update to include block and export zod schema - #71

Merged
saltenasl merged 4 commits into
mainfrom
ls/update-deepnote-file-schema
Oct 30, 2025
Merged

saltenasl merged 4 commits into
mainfrom
ls/update-deepnote-file-schema

Conversation

@saltenasl

@saltenasl saltenasl commented Oct 30, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Adjusted internal schema validation to be more permissive.
    • Added a new package export (internal API surface expanded).
    • Updated test/coverage configuration to exclude an internal index file.
    • Changed a package dependency to an earlier release.

No user-facing behavior or public API signatures were changed.

@saltenasl
saltenasl requested a review from a team as a code owner October 30, 2025 15:47
@coderabbitai

coderabbitai Bot commented Oct 30, 2025 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

deepnoteBlockSchema was added to the package public exports and its internal metadata field in packages/blocks/src/deserialize-file/deepnote-file-schema.ts changed from z.record(z.string(), z.any()) to z.record(z.any()). package coverage ignore list in codecov.yml now includes packages/blocks/index.ts. packages/blocks/package.json pins/downgrades zod from ^4.1.12 to 3.25.76. No other API signature changes were introduced.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Consumer
  participant blocks/index.ts as "packages/blocks/index.ts"
  participant deepnoteFile as "deserialize-file/deepnote-file-schema"

  Note over deepnoteFile: deepnoteBlockSchema definition\n(metadata: z.record(z.any()))
  Consumer->>blocks/index.ts: import { deepnoteBlockSchema }
  blocks/index.ts->>deepnoteFile: re-export deepnoteBlockSchema
  deepnoteFile-->>blocks/index.ts: exported schema
  blocks/index.ts-->>Consumer: provides deepnoteBlockSchema
Loading

Possibly related PRs

Suggested reviewers

  • jamesbhobbs
  • Artmann

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title captures the core changes: exporting the deepnote-file-schema and the schema being zod-related. However, the title omits the significant zod dependency downgrade from v4 to v3, which is a material change. The phrase "update to include block" is somewhat vague about what's being updated, though contextually understandable. The title is partially related to the changeset—it addresses real aspects (schema export and modification) but doesn't cover all significant changes.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1815525 and 8fca1ee.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • codecov.yml (1 hunks)
  • packages/blocks/package.json (1 hunks)
  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
packages/*/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.{ts,tsx}: Use strict type checking and prefer type safety over convenience
Use const for immutable values
Avoid any; use proper type definitions and type guards

Files:

  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow Biome's lint rules as configured in biome.json
Use literal keys (dot notation) instead of bracket notation when possible
Prefer single quotes for strings (except when avoiding escapes)

Files:

  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts
packages/*/src/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Place source code under packages/*/src/

Files:

  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts
packages/blocks/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/blocks/src/**/*.{ts,tsx}: In @deepnote/blocks, use ts-dedent for clean multiline template strings
In @deepnote/blocks, use escapePythonString() when embedding strings in generated Python code

Files:

  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts
**/*.{md,yml,yaml}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Prettier formatting for Markdown and YAML files

Files:

  • codecov.yml
🔇 Additional comments (3)
packages/blocks/src/deserialize-file/deepnote-file-schema.ts (1)

8-8: Correct for Zod v3.

z.record(z.any()) is valid in Zod v3 (defaults keys to strings). Functionally equivalent to the v4 two-argument form.

codecov.yml (1)

14-14: LGTM.

Index files typically contain only exports and don't need coverage.

packages/blocks/package.json (1)

37-37: Version 3.25.76 is secure; no updates needed.

The only known vulnerability (ReDoS) was fixed in version 3.22.3, so 3.25.76 is well above the patched threshold. No additional advisories found for v3. Zod 3 requires minimum 3.25.0 and continues receiving bug fixes, confirming 3.25.76 is the current stable v3 release.


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

@saltenasl saltenasl changed the title feat(deepnote-file-schema): update to include notebooks and export zod schema feat(deepnote-file-schema): update to include block and export zod schema Oct 30, 2025
@codecov

codecov Bot commented Oct 30, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.76%. Comparing base (b08def4) to head (8fca1ee).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/blocks/src/index.ts 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #71      +/-   ##
==========================================
- Coverage   92.88%   92.76%   -0.13%     
==========================================
  Files          23       23              
  Lines         773      774       +1     
  Branches      221      221              
==========================================
  Hits          718      718              
- Misses         55       56       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c19d0da and 1815525.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts (1 hunks)
  • packages/blocks/src/index.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
packages/*/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/**/*.{ts,tsx}: Use strict type checking and prefer type safety over convenience
Use const for immutable values
Avoid any; use proper type definitions and type guards

Files:

  • packages/blocks/src/index.ts
  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Follow Biome's lint rules as configured in biome.json
Use literal keys (dot notation) instead of bracket notation when possible
Prefer single quotes for strings (except when avoiding escapes)

Files:

  • packages/blocks/src/index.ts
  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts
packages/*/src/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Place source code under packages/*/src/

Files:

  • packages/blocks/src/index.ts
  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts
packages/blocks/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/blocks/src/**/*.{ts,tsx}: In @deepnote/blocks, use ts-dedent for clean multiline template strings
In @deepnote/blocks, use escapePythonString() when embedding strings in generated Python code

Files:

  • packages/blocks/src/index.ts
  • packages/blocks/src/deserialize-file/deepnote-file-schema.ts
🪛 GitHub Actions: CI
packages/blocks/src/deserialize-file/deepnote-file-schema.ts

[error] 47-47: TS2554: Expected 2-3 arguments, but got 1.

🪛 GitHub Check: Typecheck
packages/blocks/src/deserialize-file/deepnote-file-schema.ts

[failure] 47-47:
Expected 2-3 arguments, but got 1.

🔇 Additional comments (1)
packages/blocks/src/index.ts (1)

3-3: LGTM—clean public API expansion.

@saltenasl

Copy link
Copy Markdown
Contributor Author

@coderabbitai resolve

@coderabbitai

coderabbitai Bot commented Oct 30, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Comments resolved and changes approved.

@saltenasl
saltenasl merged commit 57f55c1 into main Oct 30, 2025
@saltenasl
saltenasl deleted the ls/update-deepnote-file-schema branch October 30, 2025 16:13
@coderabbitai coderabbitai Bot mentioned this pull request Nov 3, 2025
1 task
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