Skip to content

Commit 04f7c6f

Browse files
authored
(WIP) Upgrade RN to 0.75 (#196)
2 parents 8fcb68e + 65c6849 commit 04f7c6f

File tree

116 files changed

+6286
-1481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+6286
-1481
lines changed
Lines changed: 353 additions & 344 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ enableGlobalCache: false
1111

1212
nodeLinker: node-modules
1313

14-
yarnPath: .yarn/releases/yarn-4.4.0.cjs
14+
yarnPath: .yarn/releases/yarn-4.5.1.cjs

align-deps.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
const fs = require("fs");
2+
const path = require("path");
3+
4+
// Read root package.json
5+
const rootPackageJsonPath = path.join(process.cwd(), "package.json");
6+
const rootPackageJson = require(rootPackageJsonPath);
7+
8+
// Get list of all dependencies in root package.json
9+
const rootDeps = Object.assign(
10+
{},
11+
rootPackageJson.dependencies,
12+
rootPackageJson.devDependencies,
13+
rootPackageJson.resolutions || {}
14+
);
15+
16+
// Define the path to the packages directory
17+
const packagesPath = path.join(process.cwd(), "packages/pluggableWidgets");
18+
19+
// Set dry-run flag to true to print changes instead of making them
20+
const dryRun = false;
21+
22+
// Find all sub-projects under packages/pluggableWidgets
23+
const projects = fs.readdirSync(packagesPath).filter(file => {
24+
const filePath = path.join(packagesPath, file);
25+
return fs.lstatSync(filePath).isDirectory() && fs.existsSync(path.join(filePath, "package.json"));
26+
});
27+
28+
projects.forEach(projectPath => {
29+
const packageJsonPath = path.join(packagesPath, projectPath, "package.json");
30+
31+
// Read package.json of current package
32+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
33+
34+
// Get list of all dependencies in current package.json
35+
const pkgDeps = Object.assign({}, packageJson.dependencies, packageJson.devDependencies);
36+
37+
// Loop through all dependencies in current package.json
38+
Object.keys(pkgDeps).forEach(depName => {
39+
// If dependency exists in root package.json, check if version needs to be updated
40+
if (rootDeps[depName]) {
41+
if (pkgDeps[depName] !== rootDeps[depName]) {
42+
if (!dryRun) {
43+
if (packageJson.dependencies[depName]) {
44+
packageJson.dependencies[depName] = rootDeps[depName];
45+
} else if (packageJson.devDependencies[depName]) {
46+
packageJson.devDependencies[depName] = rootDeps[depName];
47+
}
48+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
49+
console.log(`Updated ${packageJsonPath}`);
50+
} else {
51+
console.log(
52+
`Would update ${packageJsonPath} dependency ${depName} from ${pkgDeps[depName]} to ${rootDeps[depName]}`
53+
);
54+
}
55+
}
56+
}
57+
});
58+
});

configs/e2e/native_dependencies.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"react-native-maps": "0.31.1",
33
"react-native-geocoder": "0.5.0",
4-
"react-native-device-info": "11.1.0",
4+
"react-native-device-info": "13.0.0",
55
"react-native-action-button": "2.8.5",
66
"react-native-material-menu": "1.2.0",
77
"react-native-linear-gradient": "2.5.6",
88
"@react-native-community/netinfo": "5.9.7",
9-
"react-native-svg": "12.1.0",
9+
"react-native-svg": "15.7.1",
1010
"react-native-system-navigation-bar": "2.6.3",
1111
"react-native-video": "5.2.1",
12-
"@react-native-community/async-storage": "1.12.1",
12+
"@react-native-async-storage/async-storage": "2.0.0",
1313
"react-native-camera": "3.40.0",
1414
"react-native-view-shot": "3.1.2",
1515
"react-native-blob-util": "0.16.2",
1616
"react-native-file-viewer": "2.1.5",
17-
"react-native-localize": "1.4.2",
17+
"react-native-localize": "3.2.1",
1818
"react-native-image-picker": "5.0.1",
1919
"react-native-permissions": "4.1.5",
2020
"react-native-webview": "11.26.1"

package.json

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,45 +42,49 @@
4242
]
4343
},
4444
"devDependencies": {
45-
"@commitlint/cli": "^15.0.0",
46-
"@commitlint/config-conventional": "^15.0.0",
47-
"@rollup/plugin-node-resolve": "^13.0.6",
48-
"@testing-library/jest-native": "^5.4.1",
49-
"@testing-library/react": "^16.0.0",
50-
"@testing-library/react-native": "^11.5.1",
51-
"@types/big.js": "^6.0.2",
45+
"@commitlint/cli": "^18.6.1",
46+
"@commitlint/config-conventional": "^18.6.3",
47+
"@react-native/babel-preset": "0.75.4",
48+
"@rollup/plugin-node-resolve": "^13.3.0",
49+
"@rollup/plugin-typescript": "^8.5.0",
50+
"@testing-library/jest-native": "^5.4.3",
51+
"@testing-library/react": "^16.0.1",
52+
"@testing-library/react-native": "^11.5.4",
53+
"@types/big.js": "^6.2.2",
5254
"@types/concurrently": "^6.3.0",
53-
"@types/enzyme": "^3.10.8",
54-
"@types/jasmine": "^3.6.0",
55-
"@types/jest": "^29.0.0",
56-
"@types/jest-image-snapshot": "^6.1.0",
55+
"@types/enzyme": "^3.10.18",
56+
"@types/jasmine": "^3.10.18",
57+
"@types/jest": "^29.5.13",
58+
"@types/jest-image-snapshot": "^6.4.0",
5759
"@types/mime": "^2.0.3",
58-
"@types/node": "^16.11.19",
59-
"@types/react": "~18.0.0",
60-
"@types/react-dom": "~18.0.0",
61-
"@types/react-native-vector-icons": "^6.4.9",
62-
"@types/react-test-renderer": "~18.0.0",
63-
"@types/shelljs": "^0.8.9",
64-
"@types/xml2js": "^0.4.5",
65-
"cross-env": "^7.0.2",
66-
"deepmerge": "^4.2.2",
60+
"@types/node": "^20.16.14",
61+
"@types/react": "~18.0.38",
62+
"@types/react-dom": "~18.0.11",
63+
"@types/react-native-vector-icons": "6.4.12",
64+
"@types/react-test-renderer": "~18.0.7",
65+
"@types/shelljs": "^0.8.15",
66+
"@types/xml2js": "^0.4.14",
67+
"cross-env": "^7.0.3",
68+
"deepmerge": "^4.3.1",
6769
"detox": "^19.13.0",
68-
"eslint": "^7.20.0",
70+
"eslint": "^7.32.0",
6971
"eslint-plugin-prettier": "4.2.1",
70-
"husky": "^8.0.0",
72+
"husky": "^8.0.3",
7173
"identity-obj-proxy": "^3.0.0",
72-
"image-js": "^0.33.0",
73-
"jest-canvas-mock": "^2.3.0",
74-
"jest-environment-jsdom": "^29.4.1",
75-
"jest-image-snapshot": "^6.1.0",
76-
"lint-staged": "^10.5.0",
74+
"image-js": "^0.35.6",
75+
"jest": "^29.4.1",
76+
"jest-canvas-mock": "^2.5.2",
77+
"jest-environment-jsdom": "^29.7.0",
78+
"jest-image-snapshot": "^6.4.0",
79+
"lint-staged": "^10.5.4",
7780
"mendix-client": "^7.15.8",
7881
"patch-package": "^8.0.0",
79-
"prettier": "^2.5.1",
80-
"pretty-quick": "^3.1.0",
81-
"recursive-copy": "^2.0.11",
82-
"rollup": "^2.68.0",
83-
"ts-node": "^10.9.1"
82+
"prettier": "^2.8.8",
83+
"pretty-quick": "^3.3.1",
84+
"react-dom": "18.2.0",
85+
"recursive-copy": "^2.0.14",
86+
"rollup": "^2.79.2",
87+
"ts-node": "^10.9.2"
8488
},
8589
"commitlint": {
8690
"extends": [
@@ -91,14 +95,14 @@
9195
"node": ">=20"
9296
},
9397
"resolutions": {
94-
"@mendix/pluggable-widgets-tools": "9.24.1",
98+
"@mendix/pluggable-widgets-tools": "10.15.0",
99+
"mendix": "10.15.46408",
95100
"@types/react": "^18",
96101
"react": "18.2.0",
97102
"react-dom": "18.2.0",
98-
"react-native": "0.73.8",
99-
"typescript": "^4.9.5",
100-
"ts-node": "^10.9.1",
101-
"@prettier/plugin-xml": "2.2.0"
103+
"react-native": "0.75.4",
104+
"@prettier/plugin-xml": "2.2.0",
105+
"@types/react-native": "0.73.0"
102106
},
103-
"packageManager": "yarn@4.4.0"
107+
"packageManager": "yarn@4.5.1"
104108
}

packages/jsActions/mobile-resources-native/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
"fbjs": "3.0.4",
3333
"mime": "3.0.0",
3434
"react-native-blob-util": "0.16.2",
35-
"react-native-device-info": "11.1.0",
35+
"react-native-device-info": "13.0.0",
3636
"react-native-file-viewer": "2.1.5",
3737
"react-native-image-picker": "5.0.1",
3838
"react-native-inappbrowser-reborn": "3.4.0",
39-
"react-native-localize": "1.4.2",
39+
"react-native-localize": "3.2.1",
4040
"react-native-permissions": "4.1.5",
4141
"react-native-push-notification": "8.1.1",
4242
"react-native-schedule-exact-alarm-permission": "^0.1.3",
@@ -45,12 +45,13 @@
4545
"url-parse": "^1.4.7"
4646
},
4747
"devDependencies": {
48-
"@mendix/pluggable-widgets-tools": "^9.0.0",
48+
"@mendix/pluggable-widgets-tools": "^10.0.1",
4949
"@types/querystringify": "^2.0.0",
5050
"@types/react-native-push-notification": "8.1.1",
5151
"@types/url-parse": "^1.4.3",
52-
"eslint": "^7.20.0",
53-
"rimraf": "^2.7.1",
54-
"rollup": "^2.68.0"
52+
"eslint": "^7.32.0",
53+
"mendix": "~10.0.9976",
54+
"rimraf": "^4.4.1",
55+
"rollup": "^2.79.2"
5556
}
5657
}

packages/jsActions/nanoflow-actions-native/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@
2424
"release:marketplace": "node ../../../scripts/release/marketplaceRelease.js"
2525
},
2626
"dependencies": {
27-
"@react-native-community/async-storage": "1.12.1",
27+
"@react-native-async-storage/async-storage": "2.0.0",
2828
"@react-native-community/geolocation": "2.0.2",
2929
"invariant": "^2.2.4",
3030
"js-base64": "~3.7.2",
3131
"react-native-geocoder": "0.5.0",
3232
"react-native-geolocation-service": "5.2.0"
3333
},
3434
"devDependencies": {
35-
"@mendix/pluggable-widgets-tools": "^9.0.0",
36-
"eslint": "^7.20.0",
37-
"rollup": "^2.68.0"
35+
"@mendix/pluggable-widgets-tools": "^10.0.1",
36+
"eslint": "^7.32.0",
37+
"mendix": "~10.0.9976",
38+
"rollup": "^2.79.2"
3839
}
3940
}

packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8-
import AsyncStorage from "@react-native-community/async-storage";
8+
import AsyncStorage from "@react-native-async-storage/async-storage";
99
import { StorageValue } from "../../typings/StorageValue";
1010

1111
// BEGIN EXTRA CODE

packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemObjectList.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8-
import AsyncStorage from "@react-native-community/async-storage";
8+
import AsyncStorage from "@react-native-async-storage/async-storage";
99
import { StorageValue } from "../../typings/StorageValue";
1010

1111
// BEGIN EXTRA CODE

packages/jsActions/nanoflow-actions-native/src/local-storage/GetStorageItemString.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8-
import AsyncStorage from "@react-native-community/async-storage";
8+
import AsyncStorage from "@react-native-async-storage/async-storage";
99

1010
// BEGIN EXTRA CODE
1111
// END EXTRA CODE

0 commit comments

Comments
 (0)