chalk 5.4.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -289,6 +289,8 @@ If absolute package size is important to you, I also maintain [yoctocolors](http
|
|
|
289
289
|
- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
|
|
290
290
|
- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
|
|
291
291
|
|
|
292
|
+
*(Not accepting additional entries)*
|
|
293
|
+
|
|
292
294
|
## Maintainers
|
|
293
295
|
|
|
294
296
|
- [Sindre Sorhus](https://github.com/sindresorhus)
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
/* eslint-env browser */
|
|
2
2
|
|
|
3
3
|
const level = (() => {
|
|
4
|
-
if (navigator
|
|
4
|
+
if (!('navigator' in globalThis)) {
|
|
5
|
+
return 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (globalThis.navigator.userAgentData) {
|
|
5
9
|
const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');
|
|
6
10
|
if (brand && brand.version > 93) {
|
|
7
11
|
return 3;
|
|
8
12
|
}
|
|
9
13
|
}
|
|
10
14
|
|
|
11
|
-
if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) {
|
|
15
|
+
if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) {
|
|
12
16
|
return 1;
|
|
13
17
|
}
|
|
14
18
|
|