Repository: deno
Issue: `npm:google-auth-library` causes unresolved top-level await
Labels: node compat

Version: Deno 2.1.6

If the Google Auth library fails to lookup googleapis.com, that error is apparently impossible to `catch` from Deno scripts.

# Reproduction

1. Download the password-protected service account file from the bottom of the first comment of [this issue](https://github.com/denoland/deno/issues/27384) and unzip `service-account-key-deno-firestore-dns-bug.json`.
2. Save the following Deno script as `deno-fail.ts`:

    ```ts
    import { GoogleAuth } from 'npm:google-auth-library';
    
    export async function getOAuthToken() {
        try {
            // Ensure this call succeeds by using the valid service account JSON file extracted earlier
            const auth = new GoogleAuth({
                keyFilename: 'service-account-key-deno-firestore-dns-bug.json',
            });
    
            // Ensure this call succeeds by using the valid service account JSON file extracted earlier
            const client = await auth.getClient();
            console.log('---- Before .getAccessToken() call');
            // await fetch('https://pleasedontregisterthisdomainnam.e');  // this IS caught in both Deno and Node
            await client.getAccessToken();  // this will throw if offline
            console.log('---- execution correctly never reaches this point');
        } catch (e) {
            console.log('🦕🦕🦕🦕 Why does execution not reach this point in Deno but does in Node?', (e as Error).message);
        }
    }
    
    const token = await getOAuthToken();

    Deno.test('access token', async () => {
        console.log(token);
    });
    ```

3. Go offline
4. Run the test:
```
$ deno test -A deno-fail.ts 
------- pre-test output -------
---- Before .getAccessToken() call
Uncaught error from ./deno-fail.ts FAILED
Uncaught error from ./deno-fail.ts FAILED

 ERRORS 

./deno-fail.ts (uncaught error)
error: Top-level await promise never resolved
const token = await getOAuthToken();
              ^
    at <anonymous> (file:///home/dandv/deno-bugs/deno-fail.ts:23:15)
This error was not caught from a test and caused the test runner to fail on the referenced module.
It most likely originated from a dangling promise, event/timeout handler or top-level code.

 FAILURES 

./deno-fail.ts (uncaught error)

FAILED | 0 passed | 2 failed (0ms)

error: Test failed
```

Also note that the error reason (`getaddrinfo EAI_AGAIN www.googleapis.com`) was not output.

# Node version

The node version of the script behaves as expected. Here is `node-works.ts`:

```ts
import test from 'node:test';
import { GoogleAuth } from 'google-auth-library';

export async function getOAuthToken() {
    try {
        // Ensure this call succeeds by using the valid service account JSON file extracted earlier
        const auth = new GoogleAuth({
            keyFilename: '../../service-account-key-cfsh.json',
        });

        // Ensure this call succeeds by using the valid service account JSON file extracted earlier
        const client = await auth.getClient();
        console.log('---- Before .getAccessToken() call');
        // await fetch('https://pleasedontregisterthisdomainnam.e');  // this IS caught in both Deno and Node
        await client.getAccessToken();  // this will throw if offline
        console.log('---- execution correctly never reaches this point');
    } catch (e) {
        debugger;
        console.log('🦕🦕🦕🦕 Why does execution not reach this point in Deno but does in Node?', (e as Error).message);
    }
}

const token = await getOAuthToken();

test('access token', async () => {
    console.log(token);
});
```

When run with node, the script correctly prints the dinos line.

```
$ node --experimental-strip-types node-works.ts 
(node:1523620) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1523620) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
---- Before .getAccessToken() call
🦕🦕🦕🦕 Why does execution not reach this point in Deno but does in Node? request to https://www.googleapis.com/oauth2/v4/token failed, reason: getaddrinfo EAI_AGAIN www.googleapis.com
undefined
✔ access token (1.308108ms)
```