speedskater / babel-plugin-rewire

A babel plugin adding the ability to rewire module dependencies. This enables to mock modules for testing purposes.
843 stars 90 forks source link

Add support of optional chaining #241

Closed BF-man closed 1 year ago

BF-man commented 1 year ago

when starting citimaBackend with the plugin enabled:

=> Errors prevented startup:                  

   While building for web.browser:
   imports/api/external/zendesk/methods.admin.js: /home/artem-bubnov/work/citima/citimaBackend/imports/api/external/zendesk/methods.admin.js: Property property of OptionalMemberExpression expected node to be of
   a type ["Identifier"] but instead got "CallExpression"
   imports/ui/pages/Admin/Database/Modals/Utils.js: /home/artem-bubnov/work/citima/citimaBackend/imports/ui/pages/Admin/Database/Modals/Utils.js: Property id of FunctionDeclaration expected node to be of a type
   ["Identifier"] but instead got "CallExpression"

   While building for web.browser.legacy:
   imports/api/external/zendesk/methods.admin.js: /home/artem-bubnov/work/citima/citimaBackend/imports/api/external/zendesk/methods.admin.js: Property property of OptionalMemberExpression expected node to be of
   a type ["Identifier"] but instead got "CallExpression"
   imports/ui/pages/Admin/Database/Modals/Utils.js: /home/artem-bubnov/work/citima/citimaBackend/imports/ui/pages/Admin/Database/Modals/Utils.js: Property id of FunctionDeclaration expected node to be of a type
   ["Identifier"] but instead got "CallExpression"

   While building for os.linux.x86_64:
   imports/api/external/zendesk/methods.admin.js: /home/artem-bubnov/work/citima/citimaBackend/imports/api/external/zendesk/methods.admin.js: Property property of OptionalMemberExpression expected node to be of
   a type ["Identifier"] but instead got "CallExpression"

see also https://github.com/speedskater/babel-plugin-rewire/compare/master...guilhermehto:babel-plugin-rewire:master