K-Phoen / backstage-plugin-opsgenie

OpsGenie plugin for Backstage
MIT License
35 stars 37 forks source link

Recharts dependency fails tests in backstage app #108

Open s-diez opened 1 year ago

s-diez commented 1 year ago

Similiar to the problems with recharts reported here. Running the tests in a backstage app which uses this plugin will fail with the following error.

● Test suite failed to run

      x Expected ':', got ')'
       ,-[/home/sdiez/projects/gitlab.breuni.de/backstage/backstage/node_modules/d3-scale/node_modules/d3-array/src/cumsum.js:5:5]
     5 | : v => (sum += +valueof(v, index++, values) || 0));
       :                                                  ^
       `----

    Caused by:
        0: failed to process input file
        1: Syntax Error

      at Compiler.transformSync (../../../node_modules/@swc/core/index.js:241:29)
      at transformSync (../../../node_modules/@swc/core/index.js:348:21)
      at Object.process (../../../node_modules/@swc/jest/index.js:72:45)
      at Object.process (../../../node_modules/@backstage/cli/config/jestSwcTransform.js:27:27)
      at ScriptTransformer.transformSource (../../../node_modules/@jest/transform/build/ScriptTransformer.js:619:31)
      at ScriptTransformer._transformAndBuildScript (../../../node_modules/@jest/transform/build/ScriptTransformer.js:765:40)
      at ScriptTransformer.transform (../../../node_modules/@jest/transform/build/ScriptTransformer.js:822:19)

Downgrading to recharts version 2.1.12 seems to solve the issue.