Tsdx: jest occasionally tries to transform json files -- needs better transform regex

Created on 26 Jun 2019  路  6Comments  路  Source: formium/tsdx

Current Behavior

Once in while I get the following warnings when I run 'tsdx test' command:

ts-jest[jest-transformer] (WARN) Got a unknown file type to compile (file: /Users/smashercosmo/Documents/projects/tmp-babel-plugin/node_modules/@babel/core/package.json). To fix this, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match this kind of files anymore.
ts-jest[jest-transformer] (WARN) Got a unknown file type to compile (file: /Users/smashercosmo/Documents/projects/tmp-babel-plugin/node_modules/resolve/lib/core.json). To fix this, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match this kind of files anymore.
ts-jest[jest-transformer] (WARN) Got a unknown file type to compile (file: /Users/smashercosmo/Documents/projects/tmp-babel-plugin/node_modules/globals/globals.json). To fix this, in your Jest config change the `transform` key which value is `ts-jest` so that it does not match this kind of files anymore.

Expected behavior

jest shouldn't try transforming json files

Suggested solution(s)

Probably 'json' should be added to transformIgnorePatterns in jest config

Your environment

| Software | Version(s) |
| ---------------- | ---------- |
| TSDX | 0.7.2
| TypeScript | 3.5.2
| npm | 6.9.0
| Operating System | macOS Sierra 10.12.3

bug

Most helpful comment

Fixed by #513 . It will be out in the next release

All 6 comments

Is this still happening?

I'll check

Still getting this warnings with latest tsdx

I'm still finding this with v0.11.0. This usually occurs on the first run and then not again until the next build.

I am still seeing this issues in v0.12.3

Fixed by #513 . It will be out in the next release

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lpolito picture lpolito  路  6Comments

agentofuser picture agentofuser  路  3Comments

MarceloAlves picture MarceloAlves  路  4Comments

Weffe picture Weffe  路  4Comments

JasonEtco picture JasonEtco  路  6Comments