db0 icon indicating copy to clipboard operation
db0 copied to clipboard

fix(connectors): update import to work with esm

Open amandesai01 opened this issue 1 year ago โ€ข 9 comments

๐Ÿ”— Linked issue

Resolves #62

โ“ Type of change

  • [ ] ๐Ÿ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • [x] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • [ ] โœจ New feature (a non-breaking change that adds functionality)
  • [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

Updated import statement for "pg" so that is works well with *.mjs files.

๐Ÿ“ Checklist

  • [x] I have linked an issue or discussion.
  • [ ] I have updated the documentation accordingly.

amandesai01 avatar Mar 12 '24 21:03 amandesai01

May I ask when this PR is going to get merged?

fsyntax avatar Apr 06 '24 12:04 fsyntax

can we merge this? need this in a project.

amandesai01 avatar Apr 24 '24 16:04 amandesai01

sorry for delay but i need further testing to see either prefer this or import * as syntax (i understand it fixes nitro builds)

in the meantime i suggest to use pnpm patch.

pi0 avatar Apr 24 '24 19:04 pi0

pi0 you have any updates or timeline for when you will look into this?

BlueBazze avatar May 14 '24 12:05 BlueBazze

arg - sorry for accidental click

danielroe avatar Jun 07 '24 15:06 danielroe

Hey what are the plans to release this ?

rafaelmagalhaes avatar Jul 06 '24 16:07 rafaelmagalhaes

@pi0 what about merge it ?

CrazyWords1 avatar Aug 03 '24 02:08 CrazyWords1

Any updates on this? Currently having issues with using pg in a nuxt3 project on the nitro side of thingsโ€”same failure to import: "The requested module 'pg' does not provide an export named 'Client'"

joerosenthal avatar Aug 12 '24 01:08 joerosenthal

Any updates on this? Currently having issues with using pg in a nuxt3 project on the nitro side of thingsโ€”same failure to import: "The requested module 'pg' does not provide an export named 'Client'"

Based on what I've seen and read. Yes, pg is unusable until this is fixed. But keep in mind that it is an experimental feature, so it probably has a low priority. Especially since they are in the middle of releasing nitro 3.0, and nuxt is working on nuxt 4.0 Nitro 3.0 was planned for the middle of june or july, so pi0 is likely working that.

BlueBazze avatar Aug 13 '24 09:08 BlueBazze

I also wanted to use db0 with postgres, but this is blocking me. @pi0 can you help a fellow Passionate Person ๐Ÿ˜‰

TimvdEijnden avatar Sep 10 '24 17:09 TimvdEijnden

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (main@903e1a0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/connectors/postgresql.ts 66.66% 1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage        ?   29.90%           
=======================================
  Files           ?       15           
  Lines           ?      515           
  Branches        ?       43           
=======================================
  Hits            ?      154           
  Misses          ?      354           
  Partials        ?        7           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 09 '24 18:10 codecov[bot]

Thanks for fix PR and sorry it got this delayed. db0 was experimental and took less priority. it will get better attention.

pi0 avatar Oct 09 '24 18:10 pi0