Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(database): camelCase the connector name #2228

Merged
merged 1 commit into from Mar 7, 2024
Merged

Conversation

Atinux
Copy link
Member

@Atinux Atinux commented Mar 7, 2024

When using:

export default defineNitroConfig({
  experimental: {
    database: true
  },
  database: {
    default: {
      connector: "cloudflare-d1",
      options: {
        bindingName: "TEST"
      }
    }
  }
});

We had this error:

[nitro 6:40:47 PM]  ERROR  RollupError: Expected ',', got '-' (Note that you need plugins to import files that are not JavaScript)


1: 
2: import cloudflare-d1Connector from "db0/connectors/cloudflare-d1";
                    ^
3: 
4: export const connectionConfigs = {

Using camelCase from scule make sure to ovoid this error :)

Also add a PR to db0 to improve the error message too: unjs/db0#60

@pi0 pi0 merged commit 0e6ba96 into main Mar 7, 2024
5 checks passed
@pi0 pi0 deleted the fix/database-connector branch March 7, 2024 18:16
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.

None yet

2 participants