react-native-iap 9.0.0-beta6 → 9.0.0-beta7
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/.prettierignore +6 -0
- package/babel.config.js +6 -4
- package/jest.config.js +8 -12
- package/package.json +7 -3
package/.prettierignore
ADDED
package/babel.config.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
presets: [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
presets: [
|
|
3
|
+
'module:metro-react-native-babel-preset',
|
|
4
|
+
'@babel/preset-typescript',
|
|
5
|
+
'@babel/preset-env',
|
|
6
|
+
'@babel/preset-react',
|
|
7
|
+
],
|
|
6
8
|
plugins: [
|
|
7
9
|
'@babel/plugin-proposal-class-properties',
|
|
8
10
|
'@babel/plugin-proposal-private-methods',
|
package/jest.config.js
CHANGED
|
@@ -21,7 +21,7 @@ module.exports = {
|
|
|
21
21
|
// collectCoverageFrom: undefined,
|
|
22
22
|
|
|
23
23
|
// The directory where Jest should output its coverage files
|
|
24
|
-
coverageDirectory:
|
|
24
|
+
coverageDirectory: 'coverage',
|
|
25
25
|
|
|
26
26
|
// An array of regexp pattern strings used to skip coverage collection
|
|
27
27
|
// coveragePathIgnorePatterns: [
|
|
@@ -64,9 +64,7 @@ module.exports = {
|
|
|
64
64
|
// maxWorkers: "50%",
|
|
65
65
|
|
|
66
66
|
// An array of directory names to be searched recursively up from the requiring module's location
|
|
67
|
-
moduleDirectories: [
|
|
68
|
-
"node_modules","src"
|
|
69
|
-
],
|
|
67
|
+
moduleDirectories: ['node_modules', 'src'],
|
|
70
68
|
|
|
71
69
|
// An array of file extensions your modules use
|
|
72
70
|
// moduleFileExtensions: [
|
|
@@ -82,7 +80,7 @@ module.exports = {
|
|
|
82
80
|
// moduleNameMapper: {},
|
|
83
81
|
|
|
84
82
|
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
|
|
85
|
-
modulePathIgnorePatterns: [
|
|
83
|
+
modulePathIgnorePatterns: ['IapExample'],
|
|
86
84
|
|
|
87
85
|
// Activates notifications for test results
|
|
88
86
|
// notify: false,
|
|
@@ -123,7 +121,7 @@ module.exports = {
|
|
|
123
121
|
// runner: "jest-runner",
|
|
124
122
|
|
|
125
123
|
// The paths to modules that run some code to configure or set up the testing environment before each test
|
|
126
|
-
setupFiles: [
|
|
124
|
+
setupFiles: ['<rootDir>/test/mocks/react-native-modules.js'],
|
|
127
125
|
|
|
128
126
|
// A list of paths to modules that run some code to configure or set up the testing framework before each test
|
|
129
127
|
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
|
|
@@ -170,15 +168,13 @@ module.exports = {
|
|
|
170
168
|
// timers: "real",
|
|
171
169
|
|
|
172
170
|
// A map from regular expressions to paths to transformers
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
transform: {
|
|
172
|
+
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
|
173
|
+
'\\.(ts|tsx)$': 'ts-jest',
|
|
176
174
|
},
|
|
177
175
|
|
|
178
176
|
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
|
179
|
-
transformIgnorePatterns: [
|
|
180
|
-
'node_modules/(?!@react-native|react-native)'
|
|
181
|
-
],
|
|
177
|
+
transformIgnorePatterns: ['node_modules/(?!@react-native|react-native)'],
|
|
182
178
|
|
|
183
179
|
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
|
|
184
180
|
// unmockedModulePathPatterns: undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-iap",
|
|
3
|
-
"version": "9.0.0-
|
|
3
|
+
"version": "9.0.0-beta7",
|
|
4
4
|
"description": "React Native In App Purchase Module.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"test:typescript": "tsc --noEmit",
|
|
16
16
|
"tsc:sync": "npx typesync",
|
|
17
17
|
"tsc": "tsc",
|
|
18
|
-
"validate": "yarn lint && yarn test:typescript && yarn test:flow && yarn test"
|
|
18
|
+
"validate": "yarn lint && yarn test:typescript && yarn test:flow && yarn test",
|
|
19
|
+
"lint:prettier": "prettier --write \"**/*.{md,js,jsx,ts,tsx}\""
|
|
19
20
|
},
|
|
20
21
|
"repository": {
|
|
21
22
|
"type": "git",
|
|
@@ -65,9 +66,12 @@
|
|
|
65
66
|
"jest": "28.1.0",
|
|
66
67
|
"metro-react-native-babel-preset": "0.71.0",
|
|
67
68
|
"monolinter": "1.0.4",
|
|
68
|
-
"prettier": "2.
|
|
69
|
+
"prettier": "2.7.1",
|
|
69
70
|
"react-native": "0.66.4",
|
|
70
71
|
"ts-jest": "28.0.3",
|
|
71
72
|
"typescript": "4.7.2"
|
|
73
|
+
},
|
|
74
|
+
"resolutions": {
|
|
75
|
+
"@react-native-community/eslint-config": "3.0.1"
|
|
72
76
|
}
|
|
73
77
|
}
|