Skip to content

Commit 09670c7

Browse files
authored
fix(angular): fix safari tp support and include last 2 chrome version in browserslist in ng-packgr executors (#14902)
1 parent 0281821 commit 09670c7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/angular/src/executors/ng-packagr-lite/ng-packagr-adjustments/styles/stylesheet-processor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class StylesheetProcessor {
7171
// We change the default query to browsers that Angular support.
7272
// https://angular.io/guide/browser-support
7373
(browserslist.defaults as string[]) = [
74-
'last 1 Chrome version',
74+
'last 2 Chrome version',
7575
'last 1 Firefox version',
7676
'last 2 Edge major versions',
7777
'last 2 Safari major versions',
@@ -320,7 +320,7 @@ function transformSupportedBrowsersToTargets(
320320
if (browserName === 'ie') {
321321
transformed.push('edge12');
322322
} else if (esBuildSupportedBrowsers.has(browserName)) {
323-
if (browserName === 'safari' && version === 'TP') {
323+
if (browserName === 'safari' && version === 'tp') {
324324
// esbuild only supports numeric versions so `TP` is converted to a high number (999) since
325325
// a Technology Preview (TP) of Safari is assumed to support all currently known features.
326326
version = '999';

packages/angular/src/executors/package/ng-packagr-adjustments/styles/stylesheet-processor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class StylesheetProcessor {
6464
// We change the default query to browsers that Angular support.
6565
// https://angular.io/guide/browser-support
6666
(browserslist.defaults as string[]) = [
67-
'last 1 Chrome version',
67+
'last 2 Chrome version',
6868
'last 1 Firefox version',
6969
'last 2 Edge major versions',
7070
'last 2 Safari major versions',
@@ -313,7 +313,7 @@ function transformSupportedBrowsersToTargets(
313313
if (browserName === 'ie') {
314314
transformed.push('edge12');
315315
} else if (esBuildSupportedBrowsers.has(browserName)) {
316-
if (browserName === 'safari' && version === 'TP') {
316+
if (browserName === 'safari' && version === 'tp') {
317317
// esbuild only supports numeric versions so `TP` is converted to a high number (999) since
318318
// a Technology Preview (TP) of Safari is assumed to support all currently known features.
319319
version = '999';

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy