A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/cli/commit/ab175238dd885e2aa6cf2be21796055c629ec1e5 below:

supports-color@10.0.0 · npm/cli@ab17523 · GitHub

File tree Expand file treeCollapse file tree 5 files changed

+48

-27

lines changed

Filter options

Expand file treeCollapse file tree 5 files changed

+48

-27

lines changed Original file line number Diff line number Diff line change

@@ -1,14 +1,19 @@

1 1

/* eslint-env browser */

2 +

/* eslint-disable n/no-unsupported-features/node-builtins */

2 3 3 4

const level = (() => {

4 -

if (navigator.userAgentData) {

5 +

if (!('navigator' in globalThis)) {

6 +

return 0;

7 +

}

8 + 9 +

if (globalThis.navigator.userAgentData) {

5 10

const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');

6 11

if (brand?.version > 93) {

7 12

return 3;

8 13

}

9 14

}

10 15 11 -

if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) {

16 +

if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) {

12 17

return 1;

13 18

}

14 19 Original file line number Diff line number Diff line change

@@ -31,17 +31,29 @@ if (

31 31

}

32 32 33 33

function envForceColor() {

34 -

if ('FORCE_COLOR' in env) {

35 -

if (env.FORCE_COLOR === 'true') {

36 -

return 1;

37 -

}

34 +

if (!('FORCE_COLOR' in env)) {

35 +

return;

36 +

}

38 37 39 -

if (env.FORCE_COLOR === 'false') {

40 -

return 0;

41 -

}

38 +

if (env.FORCE_COLOR === 'true') {

39 +

return 1;

40 +

}

41 + 42 +

if (env.FORCE_COLOR === 'false') {

43 +

return 0;

44 +

}

42 45 43 -

return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);

46 +

if (env.FORCE_COLOR.length === 0) {

47 +

return 1;

44 48

}

49 + 50 +

const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);

51 + 52 +

if (![0, 1, 2, 3].includes(level)) {

53 +

return;

54 +

}

55 + 56 +

return level;

45 57

}

46 58 47 59

function translateLevel(level) {

@@ -112,11 +124,11 @@ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {

112 124

}

113 125 114 126

if ('CI' in env) {

115 -

if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) {

127 +

if (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {

116 128

return 3;

117 129

}

118 130 119 -

if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {

131 +

if (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {

120 132

return 1;

121 133

}

122 134 Original file line number Diff line number Diff line change

@@ -1,6 +1,6 @@

1 1

{

2 2

"name": "supports-color",

3 -

"version": "9.4.0",

3 +

"version": "10.0.0",

4 4

"description": "Detect whether a terminal supports color",

5 5

"license": "MIT",

6 6

"repository": "chalk/supports-color",

@@ -12,15 +12,16 @@

12 12

},

13 13

"type": "module",

14 14

"exports": {

15 +

"types": "./index.d.ts",

15 16

"node": "./index.js",

16 17

"default": "./browser.js"

17 18

},

19 +

"sideEffects": false,

18 20

"engines": {

19 -

"node": ">=12"

21 +

"node": ">=18"

20 22

},

21 23

"scripts": {

22 -

"//test": "xo && ava && tsd",

23 -

"test": "tsd"

24 +

"test": "xo && ava && tsd"

24 25

},

25 26

"files": [

26 27

"index.js",

@@ -51,10 +52,13 @@

51 52

"16m"

52 53

],

53 54

"devDependencies": {

54 -

"@types/node": "^20.3.2",

55 -

"ava": "^5.3.1",

56 -

"import-fresh": "^3.3.0",

57 -

"tsd": "^0.18.0",

58 -

"xo": "^0.54.2"

55 +

"@types/node": "^22.10.2",

56 +

"ava": "^6.2.0",

57 +

"tsd": "^0.31.2",

58 +

"xo": "^0.60.0"

59 +

},

60 +

"ava": {

61 +

"serial": true,

62 +

"workerThreads": false

59 63

}

60 64

}

Original file line number Diff line number Diff line change

@@ -143,7 +143,7 @@

143 143

"semver": "^7.7.1",

144 144

"spdx-expression-parse": "^4.0.0",

145 145

"ssri": "^12.0.0",

146 -

"supports-color": "^9.4.0",

146 +

"supports-color": "^10.0.0",

147 147

"tar": "^6.2.1",

148 148

"text-table": "~0.2.0",

149 149

"tiny-relative-date": "^1.3.0",

@@ -15129,13 +15129,13 @@

15129 15129

}

15130 15130

},

15131 15131

"node_modules/supports-color": {

15132 -

"version": "9.4.0",

15133 -

"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz",

15134 -

"integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==",

15132 +

"version": "10.0.0",

15133 +

"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.0.0.tgz",

15134 +

"integrity": "sha512-HRVVSbCCMbj7/kdWF9Q+bbckjBHLtHMEoJWlkmYzzdwhYMkjkOwubLM6t7NbWKjgKamGDrWL1++KrjUO1t9oAQ==",

15135 15135

"inBundle": true,

15136 15136

"license": "MIT",

15137 15137

"engines": {

15138 -

"node": ">=12"

15138 +

"node": ">=18"

15139 15139

},

15140 15140

"funding": {

15141 15141

"url": "https://github.com/chalk/supports-color?sponsor=1"

Original file line number Diff line number Diff line change

@@ -110,7 +110,7 @@

110 110

"semver": "^7.7.1",

111 111

"spdx-expression-parse": "^4.0.0",

112 112

"ssri": "^12.0.0",

113 -

"supports-color": "^9.4.0",

113 +

"supports-color": "^10.0.0",

114 114

"tar": "^6.2.1",

115 115

"text-table": "~0.2.0",

116 116

"tiny-relative-date": "^1.3.0",

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4