fix(angular): fix safari tp support and include last 2 chrome version in browserslist in ng-packgr executors (#14902)

This commit is contained in:
Leosvel Pérez Espinosa 2023-02-10 09:03:55 +00:00 committed by GitHub
parent 0281821fcf
commit 09670c7c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -71,7 +71,7 @@ export class StylesheetProcessor {
// We change the default query to browsers that Angular support.
// https://angular.io/guide/browser-support
(browserslist.defaults as string[]) = [
'last 1 Chrome version',
'last 2 Chrome version',
'last 1 Firefox version',
'last 2 Edge major versions',
'last 2 Safari major versions',
@ -320,7 +320,7 @@ function transformSupportedBrowsersToTargets(
if (browserName === 'ie') {
transformed.push('edge12');
} else if (esBuildSupportedBrowsers.has(browserName)) {
if (browserName === 'safari' && version === 'TP') {
if (browserName === 'safari' && version === 'tp') {
// esbuild only supports numeric versions so `TP` is converted to a high number (999) since
// a Technology Preview (TP) of Safari is assumed to support all currently known features.
version = '999';

View File

@ -64,7 +64,7 @@ export class StylesheetProcessor {
// We change the default query to browsers that Angular support.
// https://angular.io/guide/browser-support
(browserslist.defaults as string[]) = [
'last 1 Chrome version',
'last 2 Chrome version',
'last 1 Firefox version',
'last 2 Edge major versions',
'last 2 Safari major versions',
@ -313,7 +313,7 @@ function transformSupportedBrowsersToTargets(
if (browserName === 'ie') {
transformed.push('edge12');
} else if (esBuildSupportedBrowsers.has(browserName)) {
if (browserName === 'safari' && version === 'TP') {
if (browserName === 'safari' && version === 'tp') {
// esbuild only supports numeric versions so `TP` is converted to a high number (999) since
// a Technology Preview (TP) of Safari is assumed to support all currently known features.
version = '999';