-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't write SRIs when already existing
Refs cdnjs/cdnjs#14080 Bug is reproducible with moment-timezone 0.5.40, given; 1. a minified JS file is already present at `/builds/moment-timezone.min.js` 2. process-version will minify `/moment-timezone.js` and creates `/moment-timezone.min.js` process-version moves both files to the output and causes a conflict. The actual content (compressed with brotli and gzip) has first write wins semantics while the SRI has last write wins. This change makes SRI first write wins too. Note that since we process files concurrently, it's not possible to say what between 1. and 2. happens first. That means sometimes we will use moment-timezone's provided minfied file and other times our minified version. In both cases the compression + SRI steps are consistent.
- Loading branch information
Showing
3 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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