Skip to content

BREAKING CHANGE: restricting boolean Config types to true and false - #692

Closed
Hadis-Fard wants to merge 8 commits into
tediousjs:masterfrom
Hadis-Fard:config-types
Closed

Hadis-Fard wants to merge 8 commits into
tediousjs:masterfrom
Hadis-Fard:config-types

Conversation

@Hadis-Fard

@Hadis-Fard Hadis-Fard commented Jan 24, 2018 •

Copy link
Copy Markdown
  • Added type checking for boolean config option

  • Changed the default value of enableCursorCloseOnCommit from undefined to false to match the documents and the rest of boolean options

@Hadis-Fard

Copy link
Copy Markdown
Author

#673

Comment thread src/connection.js Outdated
enableArithAbort: false,
enableConcatNullYieldsNull: true,
enableCursorCloseOnCommit: undefined,
enableCursorCloseOnCommit: false,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to revert the changes made for enableCursorCloseOnCommit 😅 More details in #643 & #653

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😝 Sure

@arthurschreiber

Copy link
Copy Markdown
Collaborator

@Hadis-Fard These changes will be backwards incompatible, because we're changing how non-boolean values are treated.

Could you open a separate pull request that deprecated passing non-boolean values first, similar to #695?

@Hadis-Fard Hadis-Fard changed the title Config types BREAKING CHANGE: restricting boolean Config types to true and false Jan 29, 2018
@Hadis-Fard

Hadis-Fard commented Jan 31, 2018 •

Copy link
Copy Markdown
Author

TODO:

Will resume the work after 698 is merged.

@arthurschreiber arthurschreiber left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great! I think this will need to be merged with / rebased on the latest changes from master, but it's looking great otherwise. 👍

Comment thread src/connection.js
};
}

validateBooleanOptions(option, optionName) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you feel about making this a "regular" function instead of a method on Connection? Basically, just like deprecateNonBooleanConfigValue on master.

@arthurschreiber

Copy link
Copy Markdown
Collaborator

Closed in favor of #811.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants