
Product
Go Support Is Now Generally Available
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.
@omgovich/firebase-yarn-workspaces
Advanced tools
Copies and links local yarn workspaces into Firebase projects for deployment
Yarn workspaces + Firebase deployments made easy.
Firebase functions does not support deployment of dependencies from a monorepo structure. To use dependencies which are not published to a registry, dependency code must be copied into the functions
directory & referenced accordingly, prior to running firebase deploy --functions
.
npx firebase-yarn-workspaces --scope <FIREBASE_FUNCTIONS_WORKSPACE_NAME>
This command, run at the root of your monorepo:
package.json
.firebase-yarn-workspaces
tmp folder inside your firebase functions workspacepackage.json
in firebase functions workspace and in all nested dependencies to point to file:
referencesNOTE: Rollback of package.json changes is still TODO. Recommended use is currently only in an ephemeral environment, such as CI or in a pruned Turborepo 'out' folder (see examples)
Flag | Alias | Default | Required? | Description |
---|---|---|---|---|
--scope | -s | - | ✅ | Firebase functions workspace name. Example: --scope functions |
--dir | -d | process.cwd() | ❌ | Path to workspace root Example: --dir ./out |
--tmpDir | -t | .firebase-yarn-workspaces | ❌ | Custom tmp directory folder where dependency packages will be placed Example: --tmpDir custom-tmp-folder |
A simple shell script, which:
/out
dir#!/bin/sh
cd $PATH_TO_TURBOREPO_ROOT
echo 'Creating a pruned Turborepo'
yarn turbo prune --scope=$FUNCTIONS_PACKAGE_NAME
echo 'Copying Firebase config'
cp ./{.firebaserc,firebase.json} ./out
cd ./out
echo 'Installing dependencies'
yarn
echo 'Running Turbo build'
yarn turbo run build --scope=$FUNCTIONS_PACKAGE_NAME --include-dependencies --no-deps --no-cache
echo 'Running firebase-yarn-workspaces'
npx firebase-yarn-workspaces --scope=$FUNCTIONS_PACKAGE_NAME
echo 'Deploying'
firebase deploy --force --only functions
echo 'Cleaning up ./out folder'
rm -Rf ../out
FAQs
Copies and links local yarn workspaces into Firebase projects for deployment
The npm package @omgovich/firebase-yarn-workspaces receives a total of 282 weekly downloads. As such, @omgovich/firebase-yarn-workspaces popularity was classified as not popular.
We found that @omgovich/firebase-yarn-workspaces demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.
Security News
vlt adds real-time security selectors powered by Socket, enabling developers to query and analyze package risks directly in their dependency graph.
Security News
CISA extended MITRE’s CVE contract by 11 months, avoiding a shutdown but leaving long-term governance and coordination issues unresolved.