uilib-native 5.1.0-snapshot.7685 → 5.1.0
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/android/build.gradle
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
3
|
project.ext {
|
|
4
|
-
buildToolsVersion = rootProject.ext.has("buildToolsVersion") ? rootProject.ext.buildToolsVersion : '
|
|
4
|
+
buildToolsVersion = rootProject.ext.has("buildToolsVersion") ? rootProject.ext.buildToolsVersion : '36.0.0'
|
|
5
5
|
minSdkVersion = rootProject.ext.has("minSdkVersion") ? rootProject.ext.minSdkVersion : 24
|
|
6
|
-
compileSdkVersion = rootProject.ext.has("compileSdkVersion") ? rootProject.ext.compileSdkVersion :
|
|
7
|
-
targetSdkVersion = rootProject.ext.has("targetSdkVersion") ? rootProject.ext.targetSdkVersion :
|
|
6
|
+
compileSdkVersion = rootProject.ext.has("compileSdkVersion") ? rootProject.ext.compileSdkVersion : 36
|
|
7
|
+
targetSdkVersion = rootProject.ext.has("targetSdkVersion") ? rootProject.ext.targetSdkVersion : 36
|
|
8
8
|
supportLibVersion = rootProject.ext.has("supportLibVersion") ? rootProject.ext.supportLibVersion : '28.0.0'
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -33,6 +33,8 @@ export default class KeyboardRegistry {
|
|
|
33
33
|
*/
|
|
34
34
|
static registerKeyboard = (componentID, generator, params = {}) => {
|
|
35
35
|
if (!_isFunction(generator)) {
|
|
36
|
+
// TODO: do we want to add a util for this?
|
|
37
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
36
38
|
console.error(`KeyboardRegistry.registerKeyboard: ${componentID} you must register a generator function`);
|
|
37
39
|
return;
|
|
38
40
|
}
|
|
@@ -50,7 +52,9 @@ export default class KeyboardRegistry {
|
|
|
50
52
|
*/
|
|
51
53
|
static getKeyboard = componentID => {
|
|
52
54
|
const res = KeyboardRegistry.registeredKeyboards[componentID];
|
|
53
|
-
if (!res
|
|
55
|
+
if (!res?.generator) {
|
|
56
|
+
// TODO: do we want to add a util for this?
|
|
57
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
54
58
|
console.error(`KeyboardRegistry.getKeyboard: ${componentID} used but not yet registered`);
|
|
55
59
|
return undefined;
|
|
56
60
|
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
"name": "uilib-native",
|
|
3
|
+
"version": "5.1.0",
|
|
4
|
+
"homepage": "https://github.com/wix/react-native-ui-lib",
|
|
5
|
+
"description": "uilib native components (separated from js components)",
|
|
6
|
+
"main": "components/index",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"releaseNative": ""
|
|
9
|
+
},
|
|
10
|
+
"author": "Ethan Sharabi <ethan.shar@gmail.com>",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"lodash": "4.18.1"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"shell-utils": "^1.0.10"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"react": ">=19.0.0",
|
|
20
|
+
"react-native": ">=0.78.3"
|
|
21
|
+
}
|
|
22
22
|
}
|
package/react-native.config.js
CHANGED
|
@@ -4,7 +4,7 @@ module.exports = {
|
|
|
4
4
|
/* TODO: Once we upgrade to RN69 we should try using podspecPath again, for now I copied ReactNativeUiLib.podspec file to the root - it seems to work
|
|
5
5
|
I copied it, because we need it for both the main uilib and the uilib-native package */
|
|
6
6
|
// ios: {
|
|
7
|
-
// podspecPath: './
|
|
7
|
+
// podspecPath: './uilib-native/ReactNativeUiLib.podspec'
|
|
8
8
|
// },
|
|
9
9
|
android: {
|
|
10
10
|
sourceDir: './android/',
|
package/scripts/releaseNative.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
const exec = require('shell-utils').exec;
|
|
2
|
-
const p = require('path');
|
|
3
|
-
|
|
4
|
-
// Export buildkite variables for Release build
|
|
5
|
-
// We cast toString() because function returns 'object'
|
|
6
|
-
const IS_SNAPSHOT = process.env.BUILDKITE_MESSAGE?.match(/^snapshot$/i);
|
|
7
|
-
const VERSION_TAG = IS_SNAPSHOT ? 'snapshot' : 'latest';
|
|
8
|
-
|
|
9
|
-
function run() {
|
|
10
|
-
if (!validateEnv()) {
|
|
11
|
-
console.log('Do not release native');
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
console.log('Release native');
|
|
16
|
-
const packageJsonVersion = require('../package.json').version;
|
|
17
|
-
const currentPublished = findCurrentPublishedVersion();
|
|
18
|
-
const newVersion = IS_SNAPSHOT
|
|
19
|
-
? `${packageJsonVersion}-snapshot.${process.env.BUILDKITE_BUILD_NUMBER}`
|
|
20
|
-
: packageJsonVersion;
|
|
21
|
-
|
|
22
|
-
if (currentPublished !== packageJsonVersion) {
|
|
23
|
-
createNpmRc();
|
|
24
|
-
versionTagAndPublish(currentPublished, newVersion);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function validateEnv() {
|
|
29
|
-
if (!process.env.CI) {
|
|
30
|
-
throw new Error('releasing is only available from CI');
|
|
31
|
-
}
|
|
32
|
-
return process.env.BUILDKITE_BRANCH === 'master' || process.env.BUILDKITE_MESSAGE === 'snapshot';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function createNpmRc() {
|
|
36
|
-
exec.execSync('rm -f package-lock.json');
|
|
37
|
-
const npmrcPath = p.resolve(`${__dirname}/.npmrc`);
|
|
38
|
-
exec.execSync(`cp -rf ${npmrcPath} .`);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function versionTagAndPublish(currentPublished, newVersion) {
|
|
42
|
-
console.log(`current published version: ${currentPublished}`);
|
|
43
|
-
console.log(`Publishing version: ${newVersion}`);
|
|
44
|
-
tryPublishAndTag(newVersion);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function findCurrentPublishedVersion() {
|
|
48
|
-
return exec.execSyncRead(`npm view ${process.env.npm_package_name} dist-tags.latest`);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function tryPublishAndTag(version) {
|
|
52
|
-
try {
|
|
53
|
-
tagAndPublish(version);
|
|
54
|
-
console.log(`Released ${version}`);
|
|
55
|
-
} catch (err) {
|
|
56
|
-
console.log(`Failed to release ${version}`, err);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function tagAndPublish(newVersion) {
|
|
61
|
-
console.log(`trying to publish ${newVersion}...`);
|
|
62
|
-
if (IS_SNAPSHOT) {
|
|
63
|
-
exec.execSync(`npm --no-git-tag-version version ${newVersion}`);
|
|
64
|
-
}
|
|
65
|
-
exec.execSync(`npm publish --tag ${VERSION_TAG}`);
|
|
66
|
-
if (!IS_SNAPSHOT) {
|
|
67
|
-
exec.execSync(`git tag -a ${newVersion} -m "${newVersion}"`);
|
|
68
|
-
}
|
|
69
|
-
exec.execSyncSilent(`git push deploy ${newVersion} || true`);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
run();
|