Skip to content

Commit 314f55a

Browse files
authored
Merge branch 'main' into owl-bot-update-lock-d0befde9bb710526253d1badc2d5b02884b466acc99db4e26ce8e71e69072ea0
2 parents cfebc4e + c5d42ca commit 314f55a

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"gax": "4.6.0",
33
"tools": "1.0.1",
4-
"logging-utils": "1.1.0"
4+
"logging-utils": "1.1.1"
55
}

logging-utils/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [1.1.1](https://github.com/googleapis/gax-nodejs/compare/google-logging-utils-v1.1.0...google-logging-utils-v1.1.1) (2025-03-08)
4+
5+
6+
### Bug Fixes
7+
8+
* bypass colour checks when in browsers (or other non-Node-compatible runtimes) ([#1725](https://github.com/googleapis/gax-nodejs/issues/1725)) ([be7811d](https://github.com/googleapis/gax-nodejs/commit/be7811dc7bde121a64923549dfcaf665b742c924))
9+
310
## [1.1.0](https://github.com/googleapis/gax-nodejs/compare/google-logging-utils-v1.0.1...google-logging-utils-v1.1.0) (2025-03-06)
411

512

logging-utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "google-logging-utils",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "A debug logger package for other Google libraries",
55
"main": "build/src/index.js",
66
"files": [

logging-utils/samples/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"node": ">=14"
2727
},
2828
"dependencies": {
29-
"google-logging-utils": "^1.1.0"
29+
"google-logging-utils": "^1.1.1"
3030
},
3131
"devDependencies": {
3232
"@google-cloud/typeless-sample-bot": "^2.1.0",

logging-utils/src/colours.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export class Colours {
4949
*/
5050
static isEnabled(stream: tty.WriteStream): boolean {
5151
return (
52+
stream && // May happen in browsers.
5253
stream.isTTY &&
5354
(typeof stream.getColorDepth === 'function'
5455
? stream.getColorDepth() > 2
@@ -57,7 +58,7 @@ export class Colours {
5758
}
5859

5960
static refresh(): void {
60-
Colours.enabled = Colours.isEnabled(process.stderr);
61+
Colours.enabled = Colours.isEnabled(process?.stderr);
6162
if (!this.enabled) {
6263
Colours.reset = '';
6364
Colours.bright = '';

0 commit comments

Comments
 (0)