@ornikar/jest-config-react-native 7.4.1 → 7.4.3

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 CHANGED
@@ -3,6 +3,28 @@
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
+ ## [7.4.3](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react-native@7.4.2...@ornikar/jest-config-react-native@7.4.3) (2023-03-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * use sucrase for most cases in custom transformers [no issue] ([#880](https://github.com/ornikar/shared-configs/issues/880)) ([e070b4a](https://github.com/ornikar/shared-configs/commit/e070b4ad4c9f543a06bebffdea0c49a4a51a6b28))
12
+
13
+
14
+
15
+
16
+
17
+ ## [7.4.2](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react-native@7.4.1...@ornikar/jest-config-react-native@7.4.2) (2023-03-23)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * update jest 29 [no issue] ([#878](https://github.com/ornikar/shared-configs/issues/878)) ([61a0f26](https://github.com/ornikar/shared-configs/commit/61a0f26136d961bdca04b137c44ec756365d9339))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [7.4.1](https://github.com/ornikar/shared-configs/compare/@ornikar/jest-config-react-native@7.4.0...@ornikar/jest-config-react-native@7.4.1) (2023-03-16)
7
29
 
8
30
 
@@ -6,15 +6,30 @@
6
6
 
7
7
  exports.customTransforms = {
8
8
  // compilation of problematic node_modules has a simpler babel config
9
- 'node_modules/(react-native-(calendars|reanimated)|native-base|@react-native-community/netinfo)/.*\\.(js|jsx|ts|tsx)$':
9
+ 'node_modules/(react-native-(calendars|reanimated)|@react-native-community/netinfo)/.*\\.(js|jsx|ts|tsx)$':
10
10
  require.resolve('./transformers/babel-transformer-node-modules.js'),
11
11
 
12
12
  // dont transform node_modules when already compiled
13
- 'node_modules/.*/(commonjs|dist/(cjs|vendor))/.*\\.js$': require.resolve('./transformers/identity-transformer.js'),
13
+ 'node_modules/.*/(commonjs|dist/(cjs|vendor)|build/)/.*\\.js$': require.resolve(
14
+ './transformers/identity-transformer.js',
15
+ ),
14
16
 
15
- // compilation of most node_modules with sucrase for faster setup
16
- 'node_modules/(@?react-native.*|@?expo.*|@?react-navigation.*)/.*\\.(js|jsx|ts|tsx)$': '@sucrase/jest-plugin',
17
+ // compilation of react-native with sucrase fails since expo 48 update
18
+ 'node_modules/react-native/.*\\.(js|jsx|ts|tsx)$': require.resolve(
19
+ './transformers/babel-transformer-node-modules.js',
20
+ ),
17
21
 
18
- // compilation of rest node_modules has a simpler babel config (might be additional transformIgnorePatterns)
19
- 'node_modules.*\\.(js|jsx|ts|tsx)$': require.resolve('./transformers/babel-transformer-node-modules.js'),
22
+ // https://github.com/expo/expo/blob/d5d454eb585bdd8fb1a07e2910ba99dca8fd8786/packages/@expo/metro-config/src/transformer/createMultiRuleTransformer.ts#L207
23
+ 'node_modules/(expo-processing|@expo/vector-icons)/.*\\.(js|jsx|ts|tsx)$': [
24
+ '@sucrase/jest-plugin',
25
+ { transforms: ['jsx', 'imports'] },
26
+ ],
27
+ 'node_modules/(expo-assets-utils)/.*\\.(js|jsx|ts|tsx)$': [
28
+ '@sucrase/jest-plugin',
29
+ { transforms: ['flow', 'imports'] },
30
+ ],
31
+ 'node_modules/(@?(use-)?expo.*)/.*\\.(js|jsx|ts|tsx)$': ['@sucrase/jest-plugin', { transforms: ['imports'] }],
32
+
33
+ // compilation of rest node_modules with sucrase
34
+ 'node_modules.*\\.(js|jsx|ts|tsx)$': '@sucrase/jest-plugin',
20
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornikar/jest-config-react-native",
3
- "version": "7.4.1",
3
+ "version": "7.4.3",
4
4
  "description": "✅⚛️📱 jest config for react-native",
5
5
  "repository": {
6
6
  "directory": "@ornikar/jest-config-react-native",
@@ -19,8 +19,8 @@
19
19
  "@testing-library/react": "^11.2.5 || ^12.0.0",
20
20
  "@testing-library/react-hooks": "^7.0.0",
21
21
  "@testing-library/react-native": "^7.2.0 || ^8.0.0 || ^9.0.0",
22
- "jest": "^29.4.1",
23
- "jest-environment-jsdom": "29.4.1",
22
+ "jest": "^29.5.0",
23
+ "jest-environment-jsdom": "^29.5.0",
24
24
  "jest-expo": "^41.0.0 || ^42.0.0 || ^43.0.0 || ^44.0.0 || ^45.0.0 || ^46.0.0 || ^47.0.0",
25
25
  "react": "^17.0.0",
26
26
  "react-dom": "^17.0.0",
@@ -33,12 +33,15 @@
33
33
  "jest-environment-jsdom": {
34
34
  "optional": true
35
35
  },
36
+ "react-dom": {
37
+ "optional": true
38
+ },
36
39
  "react-native": {
37
40
  "optional": true
38
41
  }
39
42
  },
40
43
  "dependencies": {
41
- "@ornikar/jest-config-react": "^10.4.0",
44
+ "@ornikar/jest-config-react": "^10.4.1",
42
45
  "@sucrase/jest-plugin": "^2.2.1"
43
46
  },
44
47
  "devDependencies": {
@@ -51,5 +54,5 @@
51
54
  "scripts": {
52
55
  "lint:eslint": "yarn ../.. eslint --report-unused-disable-directives --quiet @ornikar/jest-config-react-native"
53
56
  },
54
- "gitHead": "3db121475fb362c7d118489c2118176e14b49a47"
57
+ "gitHead": "1a1dfedb4906851ac13ad37df7badbd80231a87f"
55
58
  }