Repository navigation
build: configure npm allowScripts and defer puppeteer browser install - #11295
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates package.json to include allowScripts configuration and modifies scripts/storage-emulator-integration/run.sh to ensure the Puppeteer browser is installed before running conformance tests. The reviewer suggests adding a file existence check for the Puppeteer installation script to provide more robust error handling and clearer feedback if the installation fails.
bkendall
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In npm v11.16+ (bundled with Node 26 via npm 11.19+), npm introduced the
allowScriptssecurity model to track and restrict dependency lifecycle scripts (preinstall,install,postinstall). When installing dependencies infirebase-tools, npm currently warns:The 4 packages are:
esbuild: Postinstall binary validation/fallback (needed by Vite for bundling MCP webview apps).re2: Optional native C++ regex compilation forsuperstatic.protobufjs: CosmeticversionSchemecheck; performs no compilation or generation, safe to deny.puppeteer: Downloads a ~200MB Chromium browser on install, but is only used for Cloud Storage emulator conformance tests.This change:
allowScriptstopackage.jsonapprovingesbuildandre2, and denyingprotobufjsandpuppeteer. This silences the warning and prepares for npm v12 strict enforcement.scripts/storage-emulator-integration/run.shto install the Puppeteer browser just-in-time ifPUPPETEER_EXECUTABLE_PATHis not set. If already cached, this check completes in ~0.2s; if missing, it downloads Chromium on-demand so storage emulator conformance tests on CI continue to pass without burdening repository-wide installs.Scenarios Tested
npm run buildsucceeds (Vite compiles MCP apps using esbuild).scripts/storage-emulator-integration/run.shbrowser install logic when cached vs uncached.package.jsonandscripts/storage-emulator-integration/run.sh).npm-shrinkwrap.jsonremains unchanged withnpm@11.9).npm run mocha:fast).Sample Commands
N/A