Skip to content

[debug, ignore] #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ functions:
set -e
set -x

export NODE_VERSION=16.19.0
export NODE_VERSION=22.15.1
bash .evergreen/install-node.sh
install:
- command: shell.exec
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ name: CI
jobs:
test:
name: Test
timeout-minutes: 10
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [16.x, 18.x, 20.x]
node-version: [20.x, 22.x, 24.x]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# the oidc-provider package we use doesn't list Node.js 20 as supported
# the oidc-provider package we use doesn't list Node.js 20, 22 and 24 as supported
- name: Install Dependencies
run: npm ci --ignore-engines
- name: Test
Expand All @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node-version: [18.x]
node-version: [22.x]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
Expand All @@ -57,10 +57,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Use Node.js 20.x
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x

- name: Install Dependencies
run: npm ci --ignore-engines
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

- uses: actions/checkout@v4

- name: Use Node.js 20.x
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
registry-url: 'https://registry.npmjs.org'

- name: Install Dependencies
Expand Down
6 changes: 6 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is for the version management tool "asdf".
# mms uses it as well.

# This Node.js version matches the one required in
# the "engines" in the package.json and .everygreen.yml
nodejs 22.15.1
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"import": "./dist/.esm-wrapper.mjs"
},
"engines": {
"node": ">= 16.20.1"
"node": ">= 20.19.2"
},
"types": "./index.d.ts",
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion src/plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@
});
});

it('respect user aborts and does not attempt device flow auth', async function () {
it.only('falls back to device auth flow', async function () {

Check failure on line 683 in src/plugin.spec.ts

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, 22.x)

Unexpected exclusive mocha test
const events: [string, unknown][] = [];
for (const event of [
'mongodb-oidc-plugin:auth-attempt-started',
Expand All @@ -689,6 +689,11 @@
]) {
logger.on(event, (data) => events.push([event, data]));
}
const originalEmit = logger.emit.bind(logger);
logger.emit = function (event, ...args) {
console.dir({ event, args }, { depth: 5, colors: true });

Check failure on line 694 in src/plugin.spec.ts

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, 22.x)

Unexpected console statement
return originalEmit(event, ...args);

Check warning on line 695 in src/plugin.spec.ts

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, 22.x)

Unsafe spread of an `any` array type
};
await requestToken(plugin, provider.getMongodbOIDCDBInfo());
expect(events).to.deep.include([
'mongodb-oidc-plugin:auth-attempt-started',
Expand Down
5 changes: 4 additions & 1 deletion test/oidc-test-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@
selector = 'h1'
): Promise<void> {
await browser.waitUntil(async () => {
const actual = (await browser.$(selector).getText()).trim();
const element = await browser.$(selector);
await element.waitForDisplayed();
const actual = (await element.getText()).trim();
console.log({ actual, expected, selector });

Check failure on line 291 in test/oidc-test-provider.ts

View workflow job for this annotation

GitHub Actions / Check (ubuntu-latest, 22.x)

Unexpected console statement
let matches: boolean;
if (typeof expected === 'string') {
matches = actual.toLowerCase() === expected.toLowerCase();
Expand Down
Loading