expo-module-scripts 3.0.5 → 3.0.6
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 +6 -0
- package/README.md +2 -2
- package/babel.config.plugin.js +6 -0
- package/createJestPreset.js +8 -8
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 3.0.6 — 2023-02-03
|
|
14
|
+
|
|
15
|
+
### 📚 3rd party library updates
|
|
16
|
+
|
|
17
|
+
- Upgrade jest to v29. ([#20832](https://github.com/expo/expo/pull/20832) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
13
19
|
## 3.0.5 — 2022-12-30
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ Besides, running `yarn prepare` script will also synchronize optional files from
|
|
|
71
71
|
|
|
72
72
|
### 🔌 Config Plugin
|
|
73
73
|
|
|
74
|
-
To create a [config plugin](https://github.com/expo/expo
|
|
74
|
+
To create a [config plugin](https://github.com/expo/expo/blob/main/packages/@expo/config-plugins/README.md) that automatically configures your native code, you have two options:
|
|
75
75
|
|
|
76
76
|
1. Create a `plugin` folder and write your plugin in TypeScript (recommended).
|
|
77
77
|
2. Create an `app.plugin.js` file in the project root and write the plugin in pure Node.js-compliant JavaScript.
|
|
@@ -144,7 +144,7 @@ Use the following scripts to interact with the plugin:
|
|
|
144
144
|
|
|
145
145
|
### 🤡 Jest
|
|
146
146
|
|
|
147
|
-
The Jest preset extends [`jest-expo`](https://github.com/expo/expo/tree/main/packages/jest-expo)
|
|
147
|
+
The Jest preset extends [`jest-expo`](https://github.com/expo/expo/tree/main/packages/jest-expo) and adds proper TypeScript support and type declarations to the presets.
|
|
148
148
|
|
|
149
149
|
**For unit testing API-based modules:**
|
|
150
150
|
|
package/createJestPreset.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const findYarnWorkspaceRoot = require('find-yarn-workspace-root');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const path = require('path');
|
|
6
|
-
const { jsWithBabel: tsJestPreset } = require('ts-jest/presets');
|
|
7
6
|
|
|
8
7
|
module.exports = function(basePreset) {
|
|
9
8
|
// Explicitly catch and log errors since Jest sometimes suppresses error messages
|
|
@@ -22,15 +21,16 @@ function _createJestPreset(basePreset) {
|
|
|
22
21
|
clearMocks: true,
|
|
23
22
|
roots: ['<rootDir>/src'],
|
|
24
23
|
transform: {
|
|
25
|
-
|
|
24
|
+
'^.+\\.jsx?$': 'babel-jest',
|
|
25
|
+
'^.+\\.tsx?$': [
|
|
26
|
+
'ts-jest',
|
|
27
|
+
{
|
|
28
|
+
tsconfig: _createTypeScriptConfiguration(),
|
|
29
|
+
babelConfig: _createBabelConfiguration(),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
26
32
|
...basePreset.transform,
|
|
27
33
|
},
|
|
28
|
-
globals: {
|
|
29
|
-
'ts-jest': {
|
|
30
|
-
tsConfig: _createTypeScriptConfiguration(),
|
|
31
|
-
babelConfig: _createBabelConfiguration(),
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-module-scripts",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "A private package for various tasks for Expo module packages like compiling and testing",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"@expo/npm-proofread": "^1.0.1",
|
|
31
31
|
"@testing-library/react-hooks": "^7.0.1",
|
|
32
32
|
"@tsconfig/node14": "^1.0.3",
|
|
33
|
-
"@types/jest": "^
|
|
34
|
-
"babel-preset-expo": "~9.
|
|
33
|
+
"@types/jest": "^29.2.1",
|
|
34
|
+
"babel-preset-expo": "~9.3.0",
|
|
35
35
|
"commander": "^2.19.0",
|
|
36
36
|
"eslint-config-universe": "^11.1.1",
|
|
37
37
|
"find-yarn-workspace-root": "^2.0.0",
|
|
38
38
|
"glob": "^7.1.7",
|
|
39
|
-
"jest-expo": "~
|
|
40
|
-
"jest-watch-typeahead": "
|
|
41
|
-
"ts-jest": "~
|
|
39
|
+
"jest-expo": "~48.0.0",
|
|
40
|
+
"jest-watch-typeahead": "2.2.1",
|
|
41
|
+
"ts-jest": "~29.0.4",
|
|
42
42
|
"typescript": "^4.9.4"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "1815e2eaad8c753588c7b1eb74420174a28e01f4"
|
|
45
45
|
}
|