Hi Maxmind team,
Our NodeJS application is using @maxmind/minfraud-api-node": "4.5.0, which depends on node-maxmind.
We noticed that our Jest unit tests started failing since three days ago.
And it seems is due to the tiny-lru lib upgrade in node-maxmind
08:44:44 Jest encountered an unexpected token
08:44:44
08:44:44 This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
08:44:44
08:44:44 By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
08:44:44
08:44:44 Here's what you can do:
08:44:44 • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
08:44:44 • If you need a custom transformation specify a "transform" option in your config.
08:44:44 • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
08:44:44
08:44:44 You'll find more details and examples of these config options in the docs:
08:44:44 https://jestjs.io/docs/en/configuration.html
08:44:44
08:44:44 Details:
08:44:44
08:44:44 /var/jenkins_home/workspace/test-code@3/.repo/<our repo>/node_modules/tiny-lru/dist/tiny-lru.js:178
08:44:44 }export{lru};
08:44:44 ^^^^^^
08:44:44
08:44:44 SyntaxError: Unexpected token 'export'
08:44:44
08:44:44 at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
08:44:44 at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
08:44:44 at Object.<anonymous> (node_modules/maxmind/src/index.ts:3:1)
We currently just pinned the tiny-lru version to 10.4.1, in case it would cause real impact to our application.
Please let us know if this issue could be addressed from your side.
Thanks.
Hi Maxmind team,
Our NodeJS application is using
@maxmind/minfraud-api-node": "4.5.0, which depends onnode-maxmind.We noticed that our Jest unit tests started failing since three days ago.
And it seems is due to the tiny-lru lib upgrade in node-maxmind
We currently just pinned the
tiny-lruversion to10.4.1, in case it would cause real impact to our application.Please let us know if this issue could be addressed from your side.
Thanks.