Skip to content

Commit f6fbd82

Browse files
committed
test(emulator): spec node16 for functions, only build on windows
windows did not run the predeploy that built the emulator functions, which led to adding a yarn / yarn build step to main prepare main prepare ruus on vercel deploy which does not have node16, which led to removing engine version from package.json engine version is actually validated on emulator start, which led to emulator startup failure So, only do prepare for windows emulator start, which allows use of engines: node16 without blowing up vercel deploy
1 parent d122266 commit f6fbd82

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/scripts/functions/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"deploy": "firebase deploy --only functions",
99
"logs": "firebase functions:log"
1010
},
11+
"engines": {
12+
"node": "16"
13+
},
1114
"main": "lib/index.js",
1215
"dependencies": {
1316
"firebase-admin": "^10.0.2",

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"scripts": {
55
"version": "node ./scripts/version.js",
6-
"prepare": "yarn run lerna:link && lerna run prepare --parallel && cd .github/workflows/scripts/functions && yarn && yarn build",
6+
"prepare": "yarn run lerna:link && lerna run prepare --parallel",
77
"build:all:clean": "lerna run build:clean",
88
"build:all:build": "lerna run build",
99
"lint": "yarn lint:js && yarn lint:android && yarn lint:ios:check",
@@ -26,9 +26,10 @@
2626
"tests:packager:jet": "cd tests && cross-env REACT_DEBUGGER=\"echo nope\" node_modules/.bin/react-native start --no-interactive",
2727
"tests:packager:jet-ci": "cd tests && cross-env TMPDIR=$HOME/.metro REACT_DEBUGGER=\"echo nope\" node_modules/.bin/react-native start --no-interactive",
2828
"tests:packager:jet-reset-cache": "cd tests && cross-env REACT_DEBUGGER=\"echo nope\" node_modules/.bin/react-native start --reset-cache --no-interactive",
29-
"tests:emulator:start": "cd ./.github/workflows/scripts && ./start-firebase-emulator.sh --no-daemon",
30-
"tests:emulator:start:windows": "cd ./.github/workflows/scripts && ./start-firebase-emulator.bat --no-daemon",
31-
"tests:emulator:start-ci": "cd ./.github/workflows/scripts && ./start-firebase-emulator.sh",
29+
"tests:emulator:prepare": "cd .github/workflows/scripts/functions && yarn && yarn build",
30+
"tests:emulator:start": "yarn tests:emulator:prepare && cd ./.github/workflows/scripts && ./start-firebase-emulator.sh --no-daemon",
31+
"tests:emulator:start:windows": "yarn tests:emulator:prepare && cd ./.github/workflows/scripts && ./start-firebase-emulator.bat --no-daemon",
32+
"tests:emulator:start-ci": "yarn tests:emulator:prepare && cd ./.github/workflows/scripts && ./start-firebase-emulator.sh",
3233
"tests:android:build": "cd tests && cross-env FIREBASE_APP_CHECK_DEBUG_TOKEN=\"698956B2-187B-49C6-9E25-C3F3530EEBAF\" yarn detox build --configuration android.emu.debug",
3334
"tests:android:build:windows": "cd tests && cross-env FIREBASE_APP_CHECK_DEBUG_TOKEN=\"698956B2-187B-49C6-9E25-C3F3530EEBAF\" yarn detox build --configuration android.emu.debug.windows",
3435
"tests:android:build-release": "cd tests && yarn detox build --configuration android.emu.release",

0 commit comments

Comments
 (0)