@fto-consult/expo-ui 6.21.15 → 6.21.17
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/bin/create-app.js +7 -1
- package/bin/utils.js +1 -14
- package/electron/utils/dependencies.js +10 -0
- package/electron/utils/index.js +15 -0
- package/metro.config.js +15 -18
- package/package.json +8 -7
- /package/{webpack.config.js → webpack.config1.js} +0 -0
package/bin/create-app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const {exec,thowError,copy,writeFile,createDirSync} = require("./utils");
|
|
1
|
+
const {exec,thowError,copy,writeFile,createDirSync,getDependencyVersion} = require("./utils");
|
|
2
2
|
const fs = require("fs"), path = require("path");
|
|
3
3
|
const createAppDir = path.resolve(__dirname,"create-app");
|
|
4
4
|
module.exports = function(parsedArgs,{projectRoot:root}){
|
|
@@ -21,6 +21,8 @@ module.exports = function(parsedArgs,{projectRoot:root}){
|
|
|
21
21
|
...defaultDevDependencies,
|
|
22
22
|
...(devDependencies && typeof devDependencies ==='object'? devDependencies : {}),
|
|
23
23
|
};
|
|
24
|
+
const reactNativeVersion = getDependencyVersion(packageObj,"react-native");
|
|
25
|
+
const expoVersion = getDependencyVersion(packageObj,"expo");
|
|
24
26
|
const euModule = "@fto-consult/expo-ui";
|
|
25
27
|
let hasUpdateDeps = false;
|
|
26
28
|
if(!hasPackage){
|
|
@@ -36,12 +38,16 @@ module.exports = function(parsedArgs,{projectRoot:root}){
|
|
|
36
38
|
},
|
|
37
39
|
"dependencies" : {
|
|
38
40
|
[euModule] : "latest",
|
|
41
|
+
//"expo" : expoVersion,
|
|
42
|
+
//"react-native" : reactNativeVersion,
|
|
39
43
|
},
|
|
40
44
|
devDependencies : devDeps
|
|
41
45
|
}
|
|
42
46
|
} else {
|
|
43
47
|
mainPackage.devDependencies = typeof mainPackage.devDependencies =='object' && mainPackage.devDependencies || {};
|
|
44
48
|
mainPackage.dependencies = typeof mainPackage.dependencies ==="object" && mainPackage.dependencies || {};
|
|
49
|
+
mainPackage.dependencies["react-native"] = reactNativeVersion;
|
|
50
|
+
mainPackage.dependencies["expo"] = expoVersion;
|
|
45
51
|
for(let i in devDeps){
|
|
46
52
|
if(!(i in mainPackage.devDependencies)){
|
|
47
53
|
hasUpdateDeps = true;
|
package/bin/utils.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const fs = require("fs");
|
|
3
|
-
module.exports = {
|
|
4
|
-
createDir : require("../electron/utils/createDir"),
|
|
5
|
-
writeFile : require("../electron/utils/writeFile"),
|
|
6
|
-
copy : require("../electron/utils/copy"),
|
|
7
|
-
electronDir : path.resolve(__dirname, "..","electron"),
|
|
8
|
-
exec : require("../electron/utils/exec"),
|
|
9
|
-
thowError : (...args)=>{
|
|
10
|
-
console.error(...args);
|
|
11
|
-
process.exit(-1);
|
|
12
|
-
},
|
|
13
|
-
createDirSync : require("../electron/utils/createDirSync"),
|
|
14
|
-
}
|
|
1
|
+
module.exports = require("../electron/utils");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
getDependencyVersion : (obj,packageName)=>{
|
|
3
|
+
if(!obj || typeof obj !=='object' || !obj?.dependencies) return "";
|
|
4
|
+
return obj.dependencies[packageName] || "";
|
|
5
|
+
},
|
|
6
|
+
getDevDependencyVersion : (obj,packageName)=>{
|
|
7
|
+
if(!obj || typeof obj !=='object' || !obj?.devDependencies) return "";
|
|
8
|
+
return obj.devDependencies[packageName] || "";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
module.exports = {
|
|
3
|
+
createDir : require("./createDir"),
|
|
4
|
+
writeFile : require("./writeFile"),
|
|
5
|
+
copy : require("./copy"),
|
|
6
|
+
electronDir : path.resolve(__dirname, ".."),
|
|
7
|
+
exec : require("./exec"),
|
|
8
|
+
thowError : (...args)=>{
|
|
9
|
+
console.error(...args);
|
|
10
|
+
process.exit(-1);
|
|
11
|
+
},
|
|
12
|
+
createDirSync : require("./createDirSync"),
|
|
13
|
+
...require("./dependencies"),
|
|
14
|
+
isObj : x=> typeof x =="object" && x && !Array.isArray(x),
|
|
15
|
+
}
|
package/metro.config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const path = require("path");
|
|
2
2
|
const fs = require("fs");
|
|
3
|
-
const writeFile = require("./electron/utils
|
|
3
|
+
const {writeFile,isObj,getDependencyVersion} = require("./electron/utils");
|
|
4
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
4
5
|
module.exports = function(opts){
|
|
5
|
-
const nodeModulePath = `${process.cwd()}/node_modules`;
|
|
6
|
-
const mConfigPath = fs.existsSync(`${nodeModulePath}/@expo/metro-config`) && `${nodeModulePath}/@expo/metro-config` || "@expo/metro-config";
|
|
7
|
-
const { getDefaultConfig } = require(`${mConfigPath}`);
|
|
8
|
-
|
|
6
|
+
//const nodeModulePath = `${process.cwd()}/node_modules`;
|
|
7
|
+
//const mConfigPath = fs.existsSync(`${nodeModulePath}/@expo/metro-config`) && `${nodeModulePath}/@expo/metro-config` || "@expo/metro-config";
|
|
8
|
+
//const { getDefaultConfig } = require(`${mConfigPath}`);
|
|
9
9
|
opts = opts && typeof opts =='object'? opts : {};
|
|
10
10
|
let {assetExts,sourceExts} = opts;
|
|
11
11
|
assetExts = Array.isArray(assetExts)? assetExts: [];
|
|
@@ -22,18 +22,15 @@ module.exports = function(opts){
|
|
|
22
22
|
config.watchFolders.push(localDir);
|
|
23
23
|
}
|
|
24
24
|
config.projectRoot = projectRoot;
|
|
25
|
-
const
|
|
25
|
+
const mainPackagePath = path.resolve(projectRoot,"package.json");
|
|
26
|
+
const mainPackage = fs.existsSync() && require(`${mainPackagePath}`) || null;
|
|
26
27
|
const packageJSON = require("./package.json");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if(!expoJSON?.sdkVersion || typeof expoJSON?.sdkVersion !="string" || sdkVersion && !expoVersion.startsWith(sdkVersion)){
|
|
34
|
-
expoJSON.sdkVersion = sdkVersion;
|
|
35
|
-
writeFile(appJSONPath,JSON.stringify(appJSON,null,2),{overrite:true});
|
|
36
|
-
}
|
|
28
|
+
const expoVersion = null;//getDependencyVersion(packageJSON,"expo");
|
|
29
|
+
if(isObj(mainPackage) && isObj(mainPackage.dependencies)){
|
|
30
|
+
if(expoVersion && mainPackage.dependencies["expo"] !== expoVersion){
|
|
31
|
+
console.log("fix expo dependencies to ",expoVersion);
|
|
32
|
+
mainPackage.dependencies["expo"] = expoVersion;
|
|
33
|
+
writeFile(mainPackagePath,JSON.stringify(mainPackage,null,2),{overrite:true});
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
36
|
config.resolver.assetExts = [
|
|
@@ -49,11 +46,11 @@ module.exports = function(opts){
|
|
|
49
46
|
]
|
|
50
47
|
// Remove all console logs in production...
|
|
51
48
|
config.transformer.minifierConfig.compress.drop_console = false;
|
|
52
|
-
|
|
49
|
+
config.platforms = Array.isArray(config.platforms) && config.platforms || [];
|
|
53
50
|
['ios', 'android', 'windows', 'web',"electron"].map(p=>{
|
|
54
51
|
if(!config.platforms.includes(p)){
|
|
55
52
|
config.platforms.push(p);
|
|
56
53
|
}
|
|
57
|
-
})
|
|
54
|
+
});
|
|
58
55
|
return config;
|
|
59
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "6.21.
|
|
3
|
+
"version": "6.21.17",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"update-app-version": "node ./update-app-version.js",
|
|
41
41
|
"find-licenses": "node ./find-licenses.js",
|
|
42
42
|
"fix-dependencies": "expo-cli doctor --fix-dependencies",
|
|
43
|
+
"expo-fix":"npx expo install --fix",
|
|
43
44
|
"delete-node-modules": "rimraf ./**/node_modules",
|
|
44
45
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
|
|
45
46
|
"update": "npm i expo @emotion/native@latest react-native-big-list@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @gorhom/portal@latest @emotion/native@latest @fto-consult/common@latest react-native-blob-util react-native-gesture-handler@latest react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@latest react-native-safe-area-context@latest react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-native-screens@latest react-virtuoso@latest tippy.js@latest websql@latest xlsx@latest && npx expo install --fix"
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
"@emotion/native": "^11.11.0",
|
|
66
67
|
"@expo/html-elements": "^0.5.1",
|
|
67
68
|
"@expo/vector-icons": "^13.0.0",
|
|
68
|
-
"@fto-consult/common": "^3.
|
|
69
|
+
"@fto-consult/common": "^3.24.0",
|
|
69
70
|
"@gorhom/portal": "^1.0.14",
|
|
70
71
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
|
71
72
|
"@react-native-async-storage/async-storage": "1.18.2",
|
|
@@ -76,9 +77,9 @@
|
|
|
76
77
|
"@react-navigation/native-stack": "^6.9.13",
|
|
77
78
|
"@shopify/flash-list": "1.4.3",
|
|
78
79
|
"apexcharts": "^3.41.1",
|
|
79
|
-
"expo": "^49.0.
|
|
80
|
+
"expo": "^49.0.7",
|
|
80
81
|
"expo-camera": "~13.4.2",
|
|
81
|
-
"expo-clipboard": "~4.3.
|
|
82
|
+
"expo-clipboard": "~4.3.1",
|
|
82
83
|
"expo-font": "~11.4.0",
|
|
83
84
|
"expo-image-picker": "~14.3.2",
|
|
84
85
|
"expo-linking": "~5.0.2",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
"expo-web-browser": "~12.3.2",
|
|
89
90
|
"file-saver": "^2.0.5",
|
|
90
91
|
"fs-extra": "^11.1.1",
|
|
91
|
-
"google-libphonenumber": "^3.2.
|
|
92
|
+
"google-libphonenumber": "^3.2.33",
|
|
92
93
|
"htmlparser2-without-node-native": "^3.9.2",
|
|
93
94
|
"process": "^0.11.10",
|
|
94
95
|
"prop-types": "^15.8.1",
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
"react-native-gesture-handler": "^2.12.1",
|
|
102
103
|
"react-native-iphone-x-helper": "^1.3.1",
|
|
103
104
|
"react-native-mime-types": "^2.4.0",
|
|
104
|
-
"react-native-paper": "^5.10.
|
|
105
|
+
"react-native-paper": "^5.10.1",
|
|
105
106
|
"react-native-paper-dates": "^0.18.13",
|
|
106
107
|
"react-native-reanimated": "~3.3.0",
|
|
107
108
|
"react-native-safe-area-context": "4.6.3",
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
"react-native-svg": "13.9.0",
|
|
110
111
|
"react-native-web": "~0.19.6",
|
|
111
112
|
"react-native-webview": "13.2.2",
|
|
112
|
-
"react-virtuoso": "^4.
|
|
113
|
+
"react-virtuoso": "^4.5.0",
|
|
113
114
|
"sharp-cli": "^4.1.1",
|
|
114
115
|
"tippy.js": "^6.3.7",
|
|
115
116
|
"websql": "^2.0.3",
|
|
File without changes
|