@ornikar/jest-config-react-native 12.0.1-canary.b1f5caef05abf3c6d5aa78e166f9f855344c4bba.0 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -3
- package/customTransforms.js +20 -1
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [12.0.1
|
|
6
|
+
## [12.0.1](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react-native@12.0.0...@ornikar/jest-config-react-native@12.0.1) (2024-10-09)
|
|
7
7
|
|
|
8
|
+
**Note:** Version bump only for package @ornikar/jest-config-react-native
|
|
8
9
|
|
|
9
|
-
### Features
|
|
10
10
|
|
|
11
|
-
* trying new jest config ([b1f5cae](https://github.com/ornikar/shared-configs/commit/b1f5caef05abf3c6d5aa78e166f9f855344c4bba))
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
|
package/customTransforms.js
CHANGED
|
@@ -10,11 +10,30 @@ exports.customTransforms = {
|
|
|
10
10
|
'./transformers/babel-transformer-ornikar-packages.js',
|
|
11
11
|
),
|
|
12
12
|
|
|
13
|
+
// compilation of problematic node_modules has a simpler babel config
|
|
14
|
+
'node_modules/(react-native-(calendars|reanimated)|@react-native-community/netinfo|@react-native/virtualized-lists)/.*\\.(js|jsx|ts|tsx)$':
|
|
15
|
+
require.resolve('./transformers/babel-transformer-node-modules.js'),
|
|
16
|
+
|
|
13
17
|
// dont transform node_modules when already compiled
|
|
14
18
|
'node_modules/.*/(commonjs|dist/(cjs|vendor)|build/)/.*\\.js$': require.resolve(
|
|
15
19
|
'./transformers/identity-transformer.js',
|
|
16
20
|
),
|
|
17
21
|
|
|
22
|
+
// compilation of react-native with sucrase fails since expo 48 update
|
|
23
|
+
'node_modules/react-native/.*\\.(js|jsx|ts|tsx)$': require.resolve(
|
|
24
|
+
'./transformers/babel-transformer-node-modules.js',
|
|
25
|
+
),
|
|
26
|
+
|
|
27
|
+
// https://github.com/expo/expo/blob/d5d454eb585bdd8fb1a07e2910ba99dca8fd8786/packages/@expo/metro-config/src/transformer/createMultiRuleTransformer.ts#L207
|
|
28
|
+
'node_modules/(expo-processing|@expo/vector-icons)/.*\\.(js|jsx|ts|tsx)$': [
|
|
29
|
+
'@sucrase/jest-plugin',
|
|
30
|
+
{ transforms: ['jsx', 'imports'] },
|
|
31
|
+
],
|
|
32
|
+
'node_modules/(expo-assets-utils)/.*\\.(js|jsx|ts|tsx)$': [
|
|
33
|
+
'@sucrase/jest-plugin',
|
|
34
|
+
{ transforms: ['flow', 'imports'] },
|
|
35
|
+
],
|
|
36
|
+
|
|
18
37
|
// compilation of rest node_modules with sucrase
|
|
19
|
-
'node_modules.*\\.(js|jsx|ts|tsx)$':
|
|
38
|
+
'node_modules.*\\.(js|jsx|ts|tsx)$': '@sucrase/jest-plugin',
|
|
20
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornikar/jest-config-react-native",
|
|
3
|
-
"version": "12.0.1
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "✅⚛️📱 jest config for react-native",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "@ornikar/jest-config-react-native",
|
|
@@ -43,10 +43,12 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@ornikar/jest-config-react": "14.0.0"
|
|
46
|
+
"@ornikar/jest-config-react": "14.0.0",
|
|
47
|
+
"@sucrase/jest-plugin": "^3.0.0",
|
|
48
|
+
"sucrase": "^3.34.0"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
|
-
"@testing-library/react-native": "12.
|
|
51
|
+
"@testing-library/react-native": "12.7.2",
|
|
50
52
|
"jest-expo": "50.0.3",
|
|
51
53
|
"react": "18.2.0",
|
|
52
54
|
"react-test-renderer": "18.2.0"
|