-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unable to define settings.handlers
with non-structuredClone-able values
#77
Comments
Hi Shawn! I’m not sure that you should use the
This doesn’t do anything in a
Indeed, functions should be supported. Kinda sad that they aren’t! |
Released in 11.2.1! I noticed this in |
Thank you so much for the prompt help, Titus! Using I see that this exists in a few places, so I've done my best to try and open some PRs in those repos to add this change 😅
|
@stern-shawn in each of those examples, the there is a version range, no update is needed upstream for you to get the fix
|
Ah, sorry for the confusion there on the PRs then, thank you @ChristianMurphy ! |
Initial checklist
Affected packages and versions
[email protected], remark-lint
Link to runnable example
No response
Steps to reproduce
remark-lint
, configured using aremarkrc.js
file.settings.handlers
and provide the expected key-value pairs for nodes such as text, paragraph, etctext
, try to take advantage of search and replace support fromremark-stringify
by defining some regex + replace values:Expected behavior
Running eslint should run without errors and correctly highlight instances where the find and replace rules apply in targeted markdown/mdx files. This configuration previously worked when we were on MDX v2 (and
[email protected]
), but now that we're updating plugins to work with MDX v3 andunified@11.*
this has come up.Actual behavior
We get an unexpected error:
Looking at the source for
configuration.js
at that line, I see that this change was made in v11.2: 65da801#diff-c47540330d377e9cd0e6b633a168ffa74b2781e7a7f14ab6a8e934bd39576e22L265I think this stylistic change may have unintentionally broken this element of support for
settings.handlers
, as functions cannot be cloned.If this is the case and it would not break anything, I would be happy to open a PR to revert back to normal
Object.assign
or another object merge method that would still preserve functions.Affected runtime and version
[email protected]
Affected package manager and version
[email protected]
Affected OS and version
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: