Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
ea01999
fix: lint issues
miguelvelezsa Nov 19, 2025
74cfd77
chore: upgrade checkout and setup node actions
miguelvelezsa Nov 19, 2025
11d2e4b
fix: test
miguelvelezsa Nov 19, 2025
1d85ab8
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Nov 19, 2025
670f127
build: add skipLibCheck in tsconfig
miguelvelezsa Nov 19, 2025
e3ac4ec
feat!: support node 18
miguelvelezsa Nov 19, 2025
449e9ea
fix: joi version
miguelvelezsa Nov 19, 2025
c14432e
chore: upgrade linkinator
miguelvelezsa Nov 19, 2025
6bf336c
fix: joi version
miguelvelezsa Nov 19, 2025
72238d7
chore: upgrade compodoc
miguelvelezsa Nov 19, 2025
b355a6b
chore: upgrade compodoc
miguelvelezsa Nov 20, 2025
c122b07
chore: upgrade compodoc
miguelvelezsa Nov 20, 2025
77ed758
chore: use node 18 in ci
miguelvelezsa Nov 20, 2025
f440c80
chore: remove override
miguelvelezsa Nov 20, 2025
3bffeda
chore: upgrade compodoc
miguelvelezsa Nov 20, 2025
c591856
chore: upgrade compodoc
miguelvelezsa Nov 20, 2025
d99e571
chore: upgrade compodoc
miguelvelezsa Nov 20, 2025
c300e03
chore: overidde undici
miguelvelezsa Nov 20, 2025
058d10e
chore: upgrade compodoc
miguelvelezsa Nov 20, 2025
ff365f0
build: disable docs steps in ci
miguelvelezsa Nov 20, 2025
392b6cf
chore: remove not needed actions
miguelvelezsa Nov 20, 2025
575d8b4
chore: remove skipLibCheck
miguelvelezsa Nov 20, 2025
cc016ec
chore: update kokoro config files to node 18
miguelvelezsa Nov 20, 2025
429d36f
Update package.json
miguelvelezsa Nov 20, 2025
122814b
Update package.json
miguelvelezsa Nov 20, 2025
482e19d
chore: update dependencies
miguelvelezsa Nov 20, 2025
b024edc
chore: rmeove uuid types dep
miguelvelezsa Nov 20, 2025
001519f
chore: add types uuid
miguelvelezsa Nov 20, 2025
3f05c10
fix: lint
miguelvelezsa Nov 20, 2025
3fb3654
chore: update cfg to node 18
miguelvelezsa Nov 21, 2025
344e786
fix: system-test
miguelvelezsa Nov 21, 2025
7b3cc44
Update sync-repo-settings.yaml
miguelvelezsa Nov 21, 2025
88852ef
Update ci.yaml
miguelvelezsa Nov 21, 2025
3b7defd
chore: update dependencies
miguelvelezsa Nov 21, 2025
f1244ad
chore: audit fix
miguelvelezsa Nov 21, 2025
7afb4dd
Update package.json
miguelvelezsa Nov 21, 2025
55de39b
Update package.json
miguelvelezsa Nov 24, 2025
6a8fa5f
chore: pin compodoc
miguelvelezsa Nov 24, 2025
2afa0a5
chore: pin dependencies
miguelvelezsa Nov 24, 2025
f446283
chore: upgrade restify
miguelvelezsa Nov 24, 2025
959605b
chore: upgrade restify
miguelvelezsa Nov 24, 2025
719801c
chore: upgrade restify
miguelvelezsa Nov 24, 2025
935bfd4
chore: update system-test
miguelvelezsa Nov 24, 2025
589dc48
chore: fix system-test
miguelvelezsa Nov 24, 2025
d89c7cc
chore: undo changes in system-test
miguelvelezsa Nov 24, 2025
ac00b08
chore: fix lint
miguelvelezsa Nov 24, 2025
78b949e
chore: remove system test install test
miguelvelezsa Nov 24, 2025
d215255
chore: fix lint issues
miguelvelezsa Nov 24, 2025
4e3cbeb
chore: use pack-n-play for test-install
miguelvelezsa Nov 25, 2025
ead05b6
chore: use pack-n-play in test-install
miguelvelezsa Nov 25, 2025
09e2c3e
chore: fix test-install
miguelvelezsa Nov 25, 2025
d69a632
chore: update koa version in test-install
miguelvelezsa Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ branchProtectionRules:
requiredStatusCheckContexts:
- "ci/kokoro: Samples test"
- "ci/kokoro: System test"
- docs
- lint
- test (14)
- test (16)
- test (18)
- test (20)
- test (22)
- test (24)
- cla/google
- windows
- OwlBot Post Processor
Expand Down
43 changes: 22 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18, 20]
node: [18, 20, 22, 24]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: node --version
Expand All @@ -29,32 +29,33 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm test
env:
MOCHA_THROW_DEPRECATION: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
- run: npm install
- run: npm run lint
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- run: npm install
- run: npm run docs
- uses: JustinBeckwith/linkinator-action@v1
with:
paths: docs/
# TODO(https://github.com/googleapis/nodejs-error-reporting/issues/777): enable docs
# docs:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v5
# - uses: actions/setup-node@v4
# with:
# node-version: 18
# - run: npm install
# - run: npm run docs
# - uses: JustinBeckwith/linkinator-action@v1
# with:
# paths: docs/
2 changes: 1 addition & 1 deletion .kokoro/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/continuous/node14/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/node14/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/release/docs-devsite.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/release/docs.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/release/publish.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/samples-test.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/system-test.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/test.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/test.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 30 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
"node": ">=14.0.0"
"node": ">=18"
},
"repository": "googleapis/nodejs-error-reporting",
"main": "./build/src/index.js",
Expand All @@ -31,39 +31,42 @@
"precompile": "gts clean"
},
"dependencies": {
"@google-cloud/common": "^5.0.0",
"@google-cloud/common": "^6.0.0",
"console-log-level": "^1.4.1"
},
"devDependencies": {
"@compodoc/compodoc": "1.1.23",
"@hapi/hapi": "^21.0.0",
"@types/boom": "^7.2.1",
"@compodoc/compodoc": "1.1.25",
"@hapi/hapi": "^21.4.4",
"@types/boom": "^7.3.5",
"@types/console-log-level": "^1.4.0",
"@types/express": "^4.17.0",
"@types/hapi__hapi": "^20.0.5",
"@types/json-stable-stringify": "^1.0.32",
"@types/koa": "^2.0.48",
"@types/mocha": "^9.0.0",
"@types/node": "^20.4.9",
"@types/once": "^1.4.0",
"@types/proxyquire": "^1.3.28",
"@types/express": "^4.17.21",
"@types/json-stable-stringify": "^1.2.0",
"@types/koa": "^3.0.1",
"@types/mocha": "^10.0.10",
"@types/node": "^24.10.1",
"@types/once": "^1.4.5",
"@types/proxyquire": "^1.3.31",
"@types/restify": "^8.0.0",
"@types/uuid": "^9.0.0",
"boom": "^7.3.0",
"c8": "^9.0.0",
"codecov": "^3.5.0",
"@types/uuid": "^8.3.0",
"boom": "^7.2.0",
"c8": "^10.1.3",
"codecov": "^3.6.2",
"express": "^4.17.1",
"gts": "^5.0.0",
"gts": "^6.0.2",
"joi": "^17.0.0",
"js-green-licenses": "^4.0.0",
"json-stable-stringify": "^1.0.1",
"koa": "^2.7.0",
"linkinator": "^4.0.0",
"mocha": "^9.2.2",
"nock": "^13.0.0",
"post-install-check": "0.0.1",
"proxyquire": "^2.1.0",
"json-stable-stringify": "^1.3.0",
"koa": "^3.1.1",
"linkinator": "^6.1.2",
"mocha": "^11.7.5",
"nock": "^14.0.10",
"pack-n-play": "^2.0.0",
"proxyquire": "^2.1.3",
"restify": "^11.0.0",
"typescript": "^5.1.6",
"uuid": "^10.0.0"
"typescript": "^5.9.3",
"uuid": "^8.3.2"
},
"overrides": {
"undici": "5.28.4"
}
}
8 changes: 4 additions & 4 deletions src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export class Configuration {
if (!isReportModeValid) {
throw new Error(
'config.reportMode must a string that is one ' +
'of "production", "always", or "never".'
'of "production", "always", or "never".',
);
}

Expand All @@ -316,15 +316,15 @@ export class Configuration {
if (hasEnvCheck) {
this._logger.warn(
'The "ignoreEnvironmentCheck" config option is deprecated. ' +
'Use the "reportMode" config option instead.'
'Use the "reportMode" config option instead.',
);
}
if (hasEnvCheck && hasReportMode) {
this._logger.warn(
[
'Both the "ignoreEnvironmentCheck" and "reportMode" configuration options',
'have been specified. The "reportMode" option will take precedence.',
].join(' ')
].join(' '),
);
this._determineReportMode();
} else if (hasEnvCheck) {
Expand All @@ -349,7 +349,7 @@ export class Configuration {
'if and only if the NODE_ENV environment variable is set to "production".',
'Errors will not be reported. To have errors always reported, regardless of the',
'value of NODE_ENV, set the reportMode configuration option to "always".',
].join(' ')
].join(' '),
);
}

Expand Down
24 changes: 12 additions & 12 deletions src/google-apis/auth-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ export class RequestHandler extends Service {
scopes: SCOPES,
projectIdRequired: true,
},
serviceOptions
serviceOptions,
);
this._config = config;
this._logger = logger;

if (!this._config.getShouldReportErrorsToAPI()) {
this._logger.info(
'Not configured to send errors to the API; skipping Google Cloud API Authentication.'
'Not configured to send errors to the API; skipping Google Cloud API Authentication.',
);
} else if (tryAuthenticate) {
this.authClient.getAccessToken().then(
Expand All @@ -123,9 +123,9 @@ export class RequestHandler extends Service {
'Unable to find credential information on instance. This library',
'will be unable to communicate with the Google Cloud API to save',
'errors. Message: ' + err.message,
].join(' ')
].join(' '),
);
}
},
);
} else {
this.request(
Expand All @@ -147,10 +147,10 @@ export class RequestHandler extends Service {
'Encountered an error while attempting to validate the provided',
'API key',
].join(' '),
err
err,
);
}
}
},
);
this._logger.info('API key provided; skipping OAuth2 token request.');
}
Expand All @@ -172,8 +172,8 @@ export class RequestHandler extends Service {
userCb?: (
err: Error | null,
response: http.ServerResponse | null,
body: {}
) => void
body: {},
) => void,
) {
const cb: Function = (
typeof userCb === 'function' ? userCb : RequestHandler.noOp
Expand All @@ -197,11 +197,11 @@ export class RequestHandler extends Service {
'Encountered an error while attempting to transmit an error to',
'the Error Reporting API.',
].join(' '),
err
err,
);
}
cb(err, response, body);
}
},
);
} else {
cb(
Expand All @@ -211,10 +211,10 @@ export class RequestHandler extends Service {
'if and only if the NODE_ENV environment variable is set to "production".',
'Errors will not be reported. To have errors always reported, regardless of the',
'value of NODE_ENV, set the reportMode configuration option to "always".',
].join(' ')
].join(' '),
),
null,
null
null,
);
}
}
Expand Down
Loading
Loading