babel-plugin-lodash
babel-plugin-lodash copied to clipboard
[fix]Migrate deprecated `isModuleDeclaration` method to recommended replacements
Resolves #259
The isModuleDeclaration
method was recently deprecated in https://github.com/babel/babel/pull/15266 which causes deprecation notices akin to the following:
Trace: `isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`.
at isModuleDeclaration (/path/to/example/node_modules/@babel/types/lib/validators/generated/index.js:3939:11)
at PluginPass.Program (/path/to/example/node_modules/babel-plugin-example/lib/index.js:102:44)
at newFn (/path/to/example/node_modules/@babel/traverse/lib/visitors.js:148:21)
at NodePath._call (/path/to/example/node_modules/@babel/traverse/lib/path/context.js:45:20)
at NodePath.call (/path/to/example/node_modules/@babel/traverse/lib/path/context.js:35:17)
at NodePath.visit (/path/to/example/node_modules/@babel/traverse/lib/path/context.js:80:31)
at TraversalContext.visitQueue (/path/to/example/node_modules/@babel/traverse/lib/context.js:86:16)
at TraversalContext.visitSingle (/path/to/example/node_modules/@babel/traverse/lib/context.js:65:19)
at TraversalContext.visit (/path/to/example/node_modules/@babel/traverse/lib/context.js:109:19)
at traverseNode (/path/to/example/node_modules/@babel/traverse/lib/traverse-node.js:18:17)
According to the migration guide, babel plugins are recommended to replace the method with either isImportOrExportDeclaration
in the case where backward compatibility is not essential. Or, if backward compatibility is an issue, a combination of isImportDeclaration
and isExportDeclaration
. This PR applies the latter.
The recommendation mentioned above can be found in the "Migration guide (for plugin authors)" section of https://github.com/babel/babel/pull/15266.
Relates to #260 – I didn't have permission to update that PR and it hasn't had any movement from the PR author for a while.
Can we please get some movement on this?
@munteanuic Do you have the ability to merge this?
@Pearce-Ropion i do not
@megawac @jdalton can you please take a look?
Any updates on movement here?
@munteanuic you approved the changes nearly 2 months ago - what is the next step?
@megawac @jdalton
Probably easier to just make a separate fork at this point. Project seems unresponsive.
As mentioned in previous comments, is this expected to be approved and merged at all?
For anyone following this thread, I've just published @sigmacomputing/babel-plugin-lodash
(npm) (github) which has this fix applied.
It can be used the same way, but requires switching out instances of babel-plugin-lodash
with @sigmacomputing/babel-plugin-lodash
in your babel config files.
I don't really plan on taking over maintenance of this project, but my team was getting frustrated enough with this warning to take the time to get the fix up.
Thank you so much @Pearce-Ropion!
Let's try one final tag to the whole team: @lodash @veksen @falsyvalues @zackhall @bnjmnt4n @mathiasbynens @jdalton
The organisation should have more people with maintainer level access honestly.
@jdalton can you please take a look here? Maybe add @Pearce-Ropion to the repository?
@wesleybl i already mention him @jdalton in twitter, but the creator still didnt replay yet
Thank you @Pearce-Ropion!
I'll be using your publication instead because of the delay merging this pull request.