Skip to content

Commit 3cb3be7

Browse files
authored
chore: upgraded example app to 0.76 and expo 52 (#43)
1 parent fe12866 commit 3cb3be7

40 files changed

+8028
-8192
lines changed

.husky/commit-msg

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,57 @@
11
#!/bin/sh
22

3+
if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then
4+
set -x
5+
fi
6+
37
if [ "$LEFTHOOK" = "0" ]; then
48
exit 0
59
fi
610

711
call_lefthook()
812
{
9-
dir="$(git rev-parse --show-toplevel)"
10-
osArch=$(echo "$(uname)" | tr '[:upper:]' '[:lower:]')
11-
cpuArch=$(echo "$(uname -m)" | sed 's/aarch64/arm64/')
12-
13-
if lefthook -h >/dev/null 2>&1
14-
then
15-
eval lefthook $@
16-
elif test -f "$dir/node_modules/lefthook/bin/index.js"
17-
then
18-
eval "\"$dir/node_modules/lefthook/bin/index.js\" $@"
19-
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
20-
then
21-
eval "\"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
22-
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
23-
then
24-
eval "\"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
25-
elif bundle exec lefthook -h >/dev/null 2>&1
26-
then
27-
bundle exec lefthook $@
28-
elif yarn lefthook -h >/dev/null 2>&1
29-
then
30-
yarn lefthook $@
31-
elif pnpm lefthook -h >/dev/null 2>&1
13+
if test -n "$LEFTHOOK_BIN"
3214
then
33-
pnpm lefthook $@
34-
elif npx @evilmartians/lefthook -h >/dev/null 2>&1
15+
"$LEFTHOOK_BIN" "$@"
16+
elif lefthook -h >/dev/null 2>&1
3517
then
36-
npx @evilmartians/lefthook $@
18+
lefthook "$@"
3719
else
38-
echo "Can't find lefthook in PATH"
20+
dir="$(git rev-parse --show-toplevel)"
21+
osArch=$(uname | tr '[:upper:]' '[:lower:]')
22+
cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
23+
if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook"
24+
then
25+
"$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@"
26+
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook"
27+
then
28+
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@"
29+
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook"
30+
then
31+
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@"
32+
elif test -f "$dir/node_modules/lefthook/bin/index.js"
33+
then
34+
"$dir/node_modules/lefthook/bin/index.js" "$@"
35+
36+
elif bundle exec lefthook -h >/dev/null 2>&1
37+
then
38+
bundle exec lefthook "$@"
39+
elif yarn lefthook -h >/dev/null 2>&1
40+
then
41+
yarn lefthook "$@"
42+
elif pnpm lefthook -h >/dev/null 2>&1
43+
then
44+
pnpm lefthook "$@"
45+
elif swift package plugin lefthook >/dev/null 2>&1
46+
then
47+
swift package --disable-sandbox plugin lefthook "$@"
48+
elif command -v mint >/dev/null 2>&1
49+
then
50+
mint run csjones/lefthook-plugin "$@"
51+
else
52+
echo "Can't find lefthook in PATH"
53+
fi
3954
fi
4055
}
4156

42-
call_lefthook "run commit-msg $@"
57+
call_lefthook run "commit-msg" "$@"

.husky/pre-commit

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,57 @@
11
#!/bin/sh
22

3+
if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then
4+
set -x
5+
fi
6+
37
if [ "$LEFTHOOK" = "0" ]; then
48
exit 0
59
fi
610

711
call_lefthook()
812
{
9-
dir="$(git rev-parse --show-toplevel)"
10-
osArch=$(echo "$(uname)" | tr '[:upper:]' '[:lower:]')
11-
cpuArch=$(echo "$(uname -m)" | sed 's/aarch64/arm64/')
12-
13-
if lefthook -h >/dev/null 2>&1
14-
then
15-
eval lefthook $@
16-
elif test -f "$dir/node_modules/lefthook/bin/index.js"
17-
then
18-
eval "\"$dir/node_modules/lefthook/bin/index.js\" $@"
19-
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
20-
then
21-
eval "\"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
22-
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
23-
then
24-
eval "\"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
25-
elif bundle exec lefthook -h >/dev/null 2>&1
26-
then
27-
bundle exec lefthook $@
28-
elif yarn lefthook -h >/dev/null 2>&1
29-
then
30-
yarn lefthook $@
31-
elif pnpm lefthook -h >/dev/null 2>&1
13+
if test -n "$LEFTHOOK_BIN"
3214
then
33-
pnpm lefthook $@
34-
elif npx @evilmartians/lefthook -h >/dev/null 2>&1
15+
"$LEFTHOOK_BIN" "$@"
16+
elif lefthook -h >/dev/null 2>&1
3517
then
36-
npx @evilmartians/lefthook $@
18+
lefthook "$@"
3719
else
38-
echo "Can't find lefthook in PATH"
20+
dir="$(git rev-parse --show-toplevel)"
21+
osArch=$(uname | tr '[:upper:]' '[:lower:]')
22+
cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
23+
if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook"
24+
then
25+
"$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@"
26+
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook"
27+
then
28+
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@"
29+
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook"
30+
then
31+
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@"
32+
elif test -f "$dir/node_modules/lefthook/bin/index.js"
33+
then
34+
"$dir/node_modules/lefthook/bin/index.js" "$@"
35+
36+
elif bundle exec lefthook -h >/dev/null 2>&1
37+
then
38+
bundle exec lefthook "$@"
39+
elif yarn lefthook -h >/dev/null 2>&1
40+
then
41+
yarn lefthook "$@"
42+
elif pnpm lefthook -h >/dev/null 2>&1
43+
then
44+
pnpm lefthook "$@"
45+
elif swift package plugin lefthook >/dev/null 2>&1
46+
then
47+
swift package --disable-sandbox plugin lefthook "$@"
48+
elif command -v mint >/dev/null 2>&1
49+
then
50+
mint run csjones/lefthook-plugin "$@"
51+
else
52+
echo "Can't find lefthook in PATH"
53+
fi
3954
fi
4055
}
4156

42-
call_lefthook "run pre-commit $@"
57+
call_lefthook run "pre-commit" "$@"

.husky/prepare-commit-msg

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,57 @@
11
#!/bin/sh
22

3+
if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then
4+
set -x
5+
fi
6+
37
if [ "$LEFTHOOK" = "0" ]; then
48
exit 0
59
fi
610

711
call_lefthook()
812
{
9-
dir="$(git rev-parse --show-toplevel)"
10-
osArch=$(echo "$(uname)" | tr '[:upper:]' '[:lower:]')
11-
cpuArch=$(echo "$(uname -m)" | sed 's/aarch64/arm64/')
12-
13-
if lefthook -h >/dev/null 2>&1
14-
then
15-
eval lefthook $@
16-
elif test -f "$dir/node_modules/lefthook/bin/index.js"
17-
then
18-
eval "\"$dir/node_modules/lefthook/bin/index.js\" $@"
19-
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
20-
then
21-
eval "\"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
22-
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
23-
then
24-
eval "\"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
25-
elif bundle exec lefthook -h >/dev/null 2>&1
26-
then
27-
bundle exec lefthook $@
28-
elif yarn lefthook -h >/dev/null 2>&1
29-
then
30-
yarn lefthook $@
31-
elif pnpm lefthook -h >/dev/null 2>&1
13+
if test -n "$LEFTHOOK_BIN"
3214
then
33-
pnpm lefthook $@
34-
elif npx @evilmartians/lefthook -h >/dev/null 2>&1
15+
"$LEFTHOOK_BIN" "$@"
16+
elif lefthook -h >/dev/null 2>&1
3517
then
36-
npx @evilmartians/lefthook $@
18+
lefthook "$@"
3719
else
38-
echo "Can't find lefthook in PATH"
20+
dir="$(git rev-parse --show-toplevel)"
21+
osArch=$(uname | tr '[:upper:]' '[:lower:]')
22+
cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
23+
if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook"
24+
then
25+
"$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@"
26+
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook"
27+
then
28+
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@"
29+
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook"
30+
then
31+
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@"
32+
elif test -f "$dir/node_modules/lefthook/bin/index.js"
33+
then
34+
"$dir/node_modules/lefthook/bin/index.js" "$@"
35+
36+
elif bundle exec lefthook -h >/dev/null 2>&1
37+
then
38+
bundle exec lefthook "$@"
39+
elif yarn lefthook -h >/dev/null 2>&1
40+
then
41+
yarn lefthook "$@"
42+
elif pnpm lefthook -h >/dev/null 2>&1
43+
then
44+
pnpm lefthook "$@"
45+
elif swift package plugin lefthook >/dev/null 2>&1
46+
then
47+
swift package --disable-sandbox plugin lefthook "$@"
48+
elif command -v mint >/dev/null 2>&1
49+
then
50+
mint run csjones/lefthook-plugin "$@"
51+
else
52+
echo "Can't find lefthook in PATH"
53+
fi
3954
fi
4055
}
4156

42-
call_lefthook "run prepare-commit-msg $@"
57+
call_lefthook run "prepare-commit-msg" "$@"

example/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ build/
1010
local.properties
1111
*.iml
1212
*.hprof
13+
.cxx/
1314

1415
# Bundle artifacts
1516
*.jsbundle

0 commit comments

Comments
 (0)