react-native-screenshot-aware 1.0.4 → 1.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/README.md +12 -0
- package/package.json +38 -21
package/README.md
CHANGED
|
@@ -106,6 +106,18 @@ function removeScreenshotListeners() {
|
|
|
106
106
|
}
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
## Jest Mocks
|
|
110
|
+
|
|
111
|
+
```javascript
|
|
112
|
+
jest.mock('react-native-screenshot-aware', () => ({
|
|
113
|
+
useScreenshotAware: jest.fn(),
|
|
114
|
+
addListener: jest.fn().mockReturnValue({
|
|
115
|
+
remove: jest.fn(),
|
|
116
|
+
}),
|
|
117
|
+
removeAllListeners: jest.fn(),
|
|
118
|
+
}));
|
|
119
|
+
```
|
|
120
|
+
|
|
109
121
|
## Contributing
|
|
110
122
|
|
|
111
123
|
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-screenshot-aware",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "React Native module for real-time screenshot detection on Android and iOS",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -59,29 +59,29 @@
|
|
|
59
59
|
"registry": "https://registry.npmjs.org/"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@biomejs/biome": "1.9.
|
|
63
|
-
"@commitlint/cli": "19.
|
|
64
|
-
"@commitlint/config-conventional": "19.
|
|
62
|
+
"@biomejs/biome": "1.9.4",
|
|
63
|
+
"@commitlint/cli": "19.6.1",
|
|
64
|
+
"@commitlint/config-conventional": "19.6.0",
|
|
65
65
|
"@semantic-release/changelog": "6.0.3",
|
|
66
66
|
"@semantic-release/git": "10.0.1",
|
|
67
|
-
"@testing-library/react-native": "12.
|
|
68
|
-
"@types/jest": "29.5.
|
|
69
|
-
"@types/react": "
|
|
70
|
-
"@types/react-test-renderer": "
|
|
71
|
-
"commitlint": "19.
|
|
72
|
-
"del-cli": "
|
|
73
|
-
"husky": "9.1.
|
|
67
|
+
"@testing-library/react-native": "12.9.0",
|
|
68
|
+
"@types/jest": "29.5.14",
|
|
69
|
+
"@types/react": "19.0.7",
|
|
70
|
+
"@types/react-test-renderer": "19.0.0",
|
|
71
|
+
"commitlint": "19.6.1",
|
|
72
|
+
"del-cli": "6.0.0",
|
|
73
|
+
"husky": "9.1.7",
|
|
74
74
|
"jest": "29.7.0",
|
|
75
|
-
"react": "
|
|
76
|
-
"react-native": "0.
|
|
77
|
-
"react-native-builder-bob": "0.
|
|
78
|
-
"react-test-renderer": "
|
|
79
|
-
"semantic-release": "24.1
|
|
80
|
-
"turbo": "2.
|
|
81
|
-
"typescript": "5.
|
|
75
|
+
"react": "19.0.0",
|
|
76
|
+
"react-native": "0.77.0",
|
|
77
|
+
"react-native-builder-bob": "0.35.2",
|
|
78
|
+
"react-test-renderer": "19.0.0",
|
|
79
|
+
"semantic-release": "24.2.1",
|
|
80
|
+
"turbo": "2.3.3",
|
|
81
|
+
"typescript": "5.7.3"
|
|
82
82
|
},
|
|
83
83
|
"resolutions": {
|
|
84
|
-
"@types/react": "
|
|
84
|
+
"@types/react": "19.0.7"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"react": "*",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"workspaces": [
|
|
91
91
|
"example"
|
|
92
92
|
],
|
|
93
|
-
"packageManager": "yarn@4.
|
|
93
|
+
"packageManager": "yarn@4.6.0",
|
|
94
94
|
"jest": {
|
|
95
95
|
"preset": "react-native",
|
|
96
96
|
"modulePathIgnorePatterns": [
|
|
@@ -99,7 +99,24 @@
|
|
|
99
99
|
],
|
|
100
100
|
"setupFilesAfterEnv": [
|
|
101
101
|
"<rootDir>/setupJest.ts"
|
|
102
|
-
]
|
|
102
|
+
],
|
|
103
|
+
"transform": {
|
|
104
|
+
"^.+\\.(js)$": [
|
|
105
|
+
"babel-jest",
|
|
106
|
+
{
|
|
107
|
+
"plugins": [
|
|
108
|
+
"babel-plugin-syntax-hermes-parser"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"collectCoverageFrom": [
|
|
114
|
+
"src/**/*.ts",
|
|
115
|
+
"src/**/*.tsx",
|
|
116
|
+
"!src/types.ts",
|
|
117
|
+
"!src/codegenSpec/**"
|
|
118
|
+
],
|
|
119
|
+
"collectCoverage": true
|
|
103
120
|
},
|
|
104
121
|
"commitlint": {
|
|
105
122
|
"extends": [
|