bitwarden / clients

Bitwarden client apps (web, browser extension, desktop, and cli).
https://bitwarden.com
Other
9.36k stars 1.26k forks source link

[PM-14485] Remove manifest and index.html logic from gulp #12033

Closed Hinton closed 6 days ago

Hinton commented 1 week ago

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/PM-14485

๐Ÿ“” Objective

Refactor the remaining logic from gulp.

Differences compared to #11861, escaped the arguments for apps/browser/scripts/package-safari.ps1, since it's not done automatically by PowerShell.

Part of the browser build script refactor effort. bitwarden.atlassian.net/browse/PM-6683

Webpack is now responsible for performing most of the operations previously done by gulp. This includes:

The package.json is modified to include browser specific commands for build, build:prod, build:watch and dist.

Manifests

Manifests now uses the copy-webpack-plugin transform feature. The logic is located in apps/browser/webpack/manifest.js. It reads a template, which supports some basic operations primarily overriding with browser specific fields using __browser__.

The manifest.json for both regular and mv3 builds are identical to our existing manifests except:

Safari build

Safari requires additional packaging commands. This is implemented as a powershell script due to the cross-platform nature, and since we generally require powershell in our distribution pipelines.

An alternative would be to write it in bash, but bash is less powerful and would require some additional commands like jq. Another alternative is to write it using js, but that would require additional dependencies.

โฐ Reminders before review

๐Ÿฆฎ Reviewer guidelines

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 33.46%. Comparing base (33f7643) to head (596885a). Report is 2 commits behind head on main.

:white_check_mark: All tests successful. No failed tests found.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #12033 +/- ## ========================================== - Coverage 33.47% 33.46% -0.01% ========================================== Files 2854 2854 Lines 89335 89335 Branches 17012 17012 ========================================== - Hits 29907 29900 -7 - Misses 57072 57079 +7 Partials 2356 2356 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


๐Ÿšจ Try these New Features:

github-actions[bot] commented 1 week ago

Logo Checkmarx One โ€“ Scan Summary & Details โ€“ 8892f9c5-0fc7-4e36-a28f-a1591b0e31b1

New Issues

Severity Issue Source File / Package Checkmarx Insight
LOW Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 40 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
LOW Unpinned Actions Full Length Commit SHA /build-browser.yml: 436 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...
LOW Unpinned Actions Full Length Commit SHA /build-browser.yml: 392 Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps...

Fixed Issues

Severity Issue Source File / Package
LOW Unpinned Actions Full Length Commit SHA /build-browser.yml: 416
LOW Unpinned Actions Full Length Commit SHA /crowdin-pull.yml: 47
LOW Unpinned Actions Full Length Commit SHA /build-browser.yml: 372