Skip to content

fix: adjust import path to account for function specific directory#8221

Merged
pieh merged 2 commits intomainfrom
fix/drizzle-function-template-schema-import-path
Apr 29, 2026
Merged

fix: adjust import path to account for function specific directory#8221
pieh merged 2 commits intomainfrom
fix/drizzle-function-template-schema-import-path

Conversation

@pieh
Copy link
Copy Markdown
Contributor

@pieh pieh commented Apr 28, 2026

🎉 Thanks for submitting a pull request! 🎉

Summary

Function handler module when using functions:create is put in netlify/functions/database-drizzle/database-drizzle.mts and not directly in netlify/functions

Which currently cause

✘ [ERROR] Could not resolve "../../db/schema"

    netlify/functions/database-drizzle/database-drizzle.mts:3:24:
      3 │ import { planets } from '../../db/schema'
        ╵                         ~~~~~~~~~~~~~~~~~

⬥ Failed to load function database-drizzle: Build failed with 1 error:
netlify/functions/database-drizzle/database-drizzle.mts:3:24: ERROR: Could not resolve "../../db/schema"

For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: de110039-bb4a-4a28-b115-3a5d8273a845

📥 Commits

Reviewing files that changed from the base of the PR and between 3ececcd and 2b92810.

📒 Files selected for processing (1)
  • functions-templates/typescript/database-drizzle/{{name}}.mts

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated internal module dependencies for improved code organization.

Walkthrough

The import path for the planets schema dependency in a database template file is corrected from ../../db/schema to ../../../db/schema. This is a single-line import path adjustment with no changes to logic, control flow, or runtime behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adjusting the import path in the template file to account for the function-specific directory structure.
Description check ✅ Passed The description clearly explains the problem (incorrect relative import causing build errors) and the solution (updating the import path in the template).
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/drizzle-function-template-schema-import-path

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

📊 Benchmark results

Comparing with f3257a5

  • Dependency count: 1,061 (no change)
  • Package size: 355 MB (no change)
  • Number of ts-expect-error directives: 355 (no change)

@pieh pieh marked this pull request as ready for review April 28, 2026 14:03
@pieh pieh requested a review from a team as a code owner April 28, 2026 14:03
@pieh pieh merged commit e439393 into main Apr 29, 2026
40 checks passed
@pieh pieh deleted the fix/drizzle-function-template-schema-import-path branch April 29, 2026 05:23
pieh pushed a commit that referenced this pull request May 5, 2026
🤖 I have created a release *beep* *boop*
---


## [26.0.1](v26.0.0...v26.0.1)
(2026-05-04)


### Bug Fixes

* adjust import path to account for function specific directory
([#8221](#8221))
([e439393](e439393))
* **deps:** update dependency @fastify/static to v9.1.1 [security]
([#8165](#8165))
([c3ffebf](c3ffebf))
* don't use inquirer for non-interactive variant of "database migrations
new" command ([#8232](#8232))
([41fc777](41fc777))
* filter out more user error messages
([#8230](#8230))
([c94f4b7](c94f4b7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
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