Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): invalid browsers version ranges
Browse files Browse the repository at this point in the history
This issue address the Invalid version: `"15.2-15.3"` range. We previously only handled version ranges for `ios_safari`. Now, we handle such versions for all browsers.

Closes #22606
  • Loading branch information
alan-agius4 authored and dgp1130 committed Jan 31, 2022
1 parent 8c57359 commit ebfdcc6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,12 @@ function transformSupportedBrowsersToTargets(supportedBrowsers: string[]): strin
// browserslist uses the name `ios_saf` for iOS Safari whereas esbuild uses `ios`
if (browserName === 'ios_saf') {
browserName = 'ios';
// browserslist also uses ranges for iOS Safari versions but only the lowest is required
// to perform minimum supported feature checks. esbuild also expects a single version.
[version] = version.split('-');
}

// browserslist uses ranges `15.2-15.3` versions but only the lowest is required
// to perform minimum supported feature checks. esbuild also expects a single version.
[version] = version.split('-');

if (browserName === 'ie') {
transformed.push('edge12');
} else if (esBuildSupportedBrowsers.has(browserName)) {
Expand Down

0 comments on commit ebfdcc6

Please sign in to comment.