Skip to content

Conversation

@diegoazh
Copy link

@diegoazh diegoazh commented Mar 6, 2025

🚨 Important❗️❗️❗️
Change Summary:
I fixed two typo bugs in the configuration validation logic where the 'schema' and 'casing' configuration properties were being incorrectly validated by checking the wrong property (data['logger'] instead of data['schema'] and data['casing']).

Why This Matters:

  1. Schema Validation Fix:

    • Before: The code mistakenly checked typeof data['logger'] when validating the 'schema' property.
    • After: Correctly checks typeof data['schema'] to validate the schema configuration.
  2. Casing Validation Fix:

    • Before: The code checked typeof data['logger'] when validating the 'casing' property.
    • After: Properly checks typeof data['casing'] to validate the casing configuration.

Impact:

  • Ensures the configuration validator works as intended for schema and casing settings.
  • Prevents false negatives/positives where valid configurations might have been rejected or invalid ones accepted due to incorrect property checks.

This change addresses a subtle but critical validation oversight, ensuring the configuration checker accurately reflects the intended structure of the configuration object. It improves code correctness and reliability for schema and casing configuration handling.

@diegoazh diegoazh changed the title fix(drizzle-orm): fix is-config functioin on utils file changing the … fix(drizzle-orm): fix is-config functioin on utils file Mar 6, 2025
@extradosages
Copy link

Thanks for contributing!

Can explain more thoroughly what the problem was and how this set of changes fixes it? Without context this PR does not seem correct?

As a nitpick, I would also suggest cleaning up the PR title is-config -> isConfig functioin -> function.

@diegoazh diegoazh changed the title fix(drizzle-orm): fix is-config functioin on utils file fix(drizzle-orm): fix isConfig function on utils file Mar 7, 2025
@diegoazh
Copy link
Author

diegoazh commented Mar 7, 2025

…repeated logger key when accessing data

Thanks for contributing!

Can explain more thoroughly what the problem was and how this set of changes fixes it? Without context this PR does not seem correct?

As a nitpick, I would also suggest cleaning up the PR title is-config -> isConfig functioin -> function.

Hello, @extradosages, I updated the PR description to give more context about this fix.
I guessed that the fix was easy and easy to understand, but my bad.

@diegoazh diegoazh changed the title fix(drizzle-orm): fix isConfig function on utils file fix(drizzle-orm): fix wrong validation on isConfig function Mar 7, 2025
@diegoazh diegoazh changed the title fix(drizzle-orm): fix wrong validation on isConfig function fix(drizzle-orm): fix configuration validation correct property checks for schema and casing Mar 7, 2025
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