Upgrade Chromiun binary and flags to be 133 #2
+115
−51
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.
Copilot Summary
This pull request updates the Chromium integration for AWS Lambda and adds support for newer Node.js runtimes. The main changes include updating Chromium dependencies, improving runtime detection, and refining how environment variables and library paths are set for different Lambda environments.
Dependency and compatibility updates:
@sparticuz/chromiumto version^133.0.0and added@sparticuz/chromium-minfor improved support and compatibility. (package.json)133.0.0to reflect the new Chromium version. (package.json)Runtime environment detection and configuration:
isLambdaRuntimeEnvironmentNode20to detect Node.js 20.x and 22.x Lambda environments, and refactored code to use it for conditional logic. (src/util/isLambdaRuntimeEnvironmentNode20.ts,src/chromium.ts,src/util/getEnvironmentVariables.ts) [1] [2] [3]LD_LIBRARY_PATHenvironment variable, allowing dynamic selection of the base library path depending on the detected Lambda runtime. (src/util/getEnvironmentVariables.ts)Chromium launch and flags improvements:
--use-gl=angle,--use-angle=swiftshader, and--enable-unsafe-swiftshaderfor better compatibility with the updated Chromium version. (src/chromium.ts)src/chromium.ts) [1] [2]Cleanup and refactoring:
src/util/isLambdaRuntimeEnvironment.ts)