Skip to content

Commit

Permalink
Merge branch 'main' of github.com:googleapis/google-auth-library-node…
Browse files Browse the repository at this point in the history
…js into owl-bot-update-lock-8060aba1f6d5617d08091767141ab2a99ea1ccbd9371fd42ffc208c5329caa73
  • Loading branch information
d-goog committed Oct 24, 2024
2 parents 9fd514b + a65d8a1 commit 5476c9d
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 93 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
matrix:
node: [18, 20, 22]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
Expand All @@ -29,7 +29,7 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
Expand All @@ -40,7 +40,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: actions/setup-node@v4
with:
node-version: 18
Expand Down
2 changes: 1 addition & 1 deletion .jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'src',
'build/src',
],
includePattern: '\\.js$'
},
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

[1]: https://www.npmjs.com/package/google-auth-library?activeTab=versions

## [9.14.2](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.14.1...v9.14.2) (2024-10-09)


### Bug Fixes

* Disable Universe Domain Check ([#1878](https://github.com/googleapis/google-auth-library-nodejs/issues/1878)) ([8adb44c](https://github.com/googleapis/google-auth-library-nodejs/commit/8adb44c738b88bfc44e57b0694c3815d138a40e5))

## [9.14.1](https://github.com/googleapis/google-auth-library-nodejs/compare/v9.14.0...v9.14.1) (2024-08-30)


Expand Down
1 change: 1 addition & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
node.owlbot_main(
templates_excludes=[
".github/workflows/ci.yaml",
".github/ISSUE_TEMPLATE/bug_report.yml"
],
)
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-auth-library",
"version": "9.14.1",
"version": "9.14.2",
"author": "Google Inc.",
"description": "Google APIs Authentication Client Library for Node.js",
"engines": {
Expand All @@ -25,7 +25,6 @@
"jws": "^4.0.0"
},
"devDependencies": {
"@compodoc/compodoc": "1.1.23",
"@types/base64-js": "^1.2.5",
"@types/chai": "^4.1.7",
"@types/jws": "^3.1.0",
Expand All @@ -42,6 +41,9 @@
"execa": "^5.0.0",
"gts": "^5.0.0",
"is-docker": "^2.0.0",
"jsdoc": "^4.0.0",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"karma": "^6.0.0",
"karma-chrome-launcher": "^3.0.0",
"karma-coverage": "^2.0.0",
Expand All @@ -56,6 +58,7 @@
"ncp": "^2.0.0",
"nock": "^13.0.0",
"null-loader": "^4.0.0",
"pdfmake": "0.2.12",
"puppeteer": "^21.0.0",
"sinon": "^18.0.0",
"ts-loader": "^8.0.0",
Expand All @@ -75,7 +78,7 @@
"compile": "tsc -p .",
"fix": "gts fix",
"pretest": "npm run compile -- --sourceMap",
"docs": "compodoc src/",
"docs": "jsdoc -c .jsdoc.json",
"samples-setup": "cd samples/ && npm link ../ && npm run setup && cd ../",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"system-test": "mocha build/system-test --timeout 60000",
Expand Down
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@google-cloud/language": "^6.5.0",
"@google-cloud/storage": "^7.0.0",
"@googleapis/iam": "^21.0.0",
"google-auth-library": "^9.14.1",
"google-auth-library": "^9.14.2",
"node-fetch": "^2.3.0",
"open": "^9.0.0",
"server-destroy": "^1.0.1"
Expand Down
6 changes: 0 additions & 6 deletions src/auth/googleauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,6 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {

// Determine if we're running on GCE.
if (await this._checkIsGCE()) {
// set universe domain for Compute client
if (!originalOrCamelOptions(options).get('universe_domain')) {
options.universeDomain =
await this.getUniverseDomainFromMetadataServer();
}

(options as ComputeOptions).scopes = this.getAnyScopes();
return await this.#prepareAndCacheClient(new Compute(options));
}
Expand Down
12 changes: 1 addition & 11 deletions test/test.googleauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1149,9 +1149,8 @@ describe('googleauth', () => {

it('getCredentials should get metadata from the server when running on GCE', async () => {
const clientEmail = '[email protected]';
const universeDomain = 'my-amazing-universe.com';
const scopes = [
nockIsGCE({universeDomain}),
nockIsGCE(),
createGetProjectIdNock(),
nock(host).get(svcAccountPath).reply(200, clientEmail, HEADERS),
];
Expand All @@ -1160,7 +1159,6 @@ describe('googleauth', () => {
const body = await auth.getCredentials();
assert.ok(body);
assert.strictEqual(body.client_email, clientEmail);
assert.strictEqual(body.universe_domain, universeDomain);
assert.strictEqual(body.private_key, undefined);
scopes.forEach(s => s.done());
});
Expand Down Expand Up @@ -1644,14 +1642,6 @@ describe('googleauth', () => {
assert.notEqual(universe_domain, DEFAULT_UNIVERSE);
assert.equal(await auth.getUniverseDomain(), universe_domain);
});

it('should use the metadata service if on GCP', async () => {
const universeDomain = 'my.universe.com';
const scope = nockIsGCE({universeDomain});

assert.equal(await auth.getUniverseDomain(), universeDomain);
await scope.done();
});
});

function mockApplicationDefaultCredentials(path: string) {
Expand Down

0 comments on commit 5476c9d

Please sign in to comment.