Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Update substring filter to match spec #5

Merged
merged 5 commits into from
Jun 30, 2023
Merged

Update substring filter to match spec #5

merged 5 commits into from
Jun 30, 2023

Conversation

simon-kolkmann
Copy link

This PR closes #4

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

Thank you for taking this on. It is really appreciated.

My initial feedback won't really work as line comments, so I'm going to do it in this top-level post.

We are going to need to deprecate the subX fields in the same manner as:

filter/lib/index.js

Lines 24 to 30 in e70a7cb

/**
* @deprecated 2022-06-26 Use `parseString` instead.
*/
parse: (string) => {
deprecations.emit('LDAP_FILTER_DEP_001')
return parseString(string)
},

That's not the best example to follow because it isn't tested. So take a look at the following links for what we should really do:

After factoring in that pattern to this change, we'll review any other items.

@simon-kolkmann
Copy link
Author

Thanks for your feedback! I have added and tested the deprecation messages.

lib/deprecations.js Outdated Show resolved Hide resolved
lib/filters/substring.js Outdated Show resolved Hide resolved
Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Thank you. Thankfully we won't need to keep this patch around too long since Node.js 16 is EOL this September.

@jsumners jsumners merged commit 42b146c into ldapjs:main Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update substring filter to match spec
2 participants