Skip to content

Commit 865b3ab

Browse files
chore: upgrades to node 20 (#1607)
OKTA-1028398 chore: upgrades minimum version to node20
1 parent ff3bacd commit 865b3ab

32 files changed

Lines changed: 2375 additions & 1202 deletions

.bacon.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ test_suites:
55
timeout: '60'
66
script_name: publish
77
criteria: MERGE
8-
queue_name: small
8+
queue_name: al2023
99
- name: lint
1010
script_path: ../okta-auth-js/scripts
1111
sort_order: '2'
1212
timeout: '60'
1313
script_name: lint
1414
criteria: MERGE
15-
queue_name: small
15+
queue_name: al2023
1616
log_files:
1717
- build2/reports/lint/eslint-checkstyle-result.xml
1818

@@ -22,92 +22,92 @@ test_suites:
2222
timeout: '20'
2323
script_name: unit
2424
criteria: MERGE
25-
queue_name: small
25+
queue_name: al2023
2626
- name: integration
2727
script_path: ../okta-auth-js/scripts
2828
sort_order: '3'
2929
timeout: '10'
3030
script_name: integration
3131
criteria: MERGE
32-
queue_name: small
32+
queue_name: al2023
3333

3434
- name: e2e
3535
script_path: ../okta-auth-js/scripts/e2e
3636
sort_order: '4'
3737
timeout: '20'
3838
script_name: e2e
3939
criteria: MERGE
40-
queue_name: small
40+
queue_name: al2023
4141
- name: e2e-cucumber
4242
script_path: ../okta-auth-js/scripts/e2e
4343
sort_order: '4'
4444
timeout: '20'
4545
script_name: e2e-cucumber
4646
criteria: MERGE
47-
queue_name: small
47+
queue_name: al2023
4848
- name: e2e-mfa
4949
script_path: ../okta-auth-js/scripts/e2e
5050
sort_order: '5'
5151
timeout: '10'
5252
script_name: e2e-mfa
5353
criteria: MERGE
54-
queue_name: small
54+
queue_name: al2023
5555
- name: e2e-dpop
5656
script_path: ../okta-auth-js/scripts/e2e
5757
sort_order: '5'
5858
timeout: '10'
5959
script_name: e2e-dpop
6060
criteria: MERGE
61-
queue_name: small
61+
queue_name: al2023
6262
- name: sample-express-embedded-auth-with-sdk
6363
script_path: ../okta-auth-js/scripts/samples
6464
sort_order: '6'
6565
timeout: '30'
6666
script_name: e2e-express-embedded-auth-with-sdk
6767
criteria: OPTIONAL
68-
queue_name: small
68+
queue_name: al2023
6969
- name: sample-express-web-no-oidc
7070
script_path: ../okta-auth-js/scripts/samples
7171
sort_order: '7'
7272
timeout: '15'
7373
script_name: e2e-express-web-no-oidc
7474
criteria: MERGE
75-
queue_name: small
75+
queue_name: al2023
7676
- name: sample-express-web-with-oidc
7777
script_path: ../okta-auth-js/scripts/samples
7878
sort_order: '8'
7979
timeout: '15'
8080
script_name: e2e-express-web-with-oidc
8181
criteria: MERGE
82-
queue_name: small
82+
queue_name: al2023
8383
- name: sample-static-spa
8484
script_path: ../okta-auth-js/scripts/samples
8585
sort_order: '9'
8686
timeout: '15'
8787
script_name: e2e-static-spa
8888
criteria: MERGE
89-
queue_name: small
89+
queue_name: al2023
9090
- name: sample-webpack-spa
9191
script_path: ../okta-auth-js/scripts/samples
9292
sort_order: '10'
9393
timeout: '15'
9494
script_name: e2e-webpack-spa
9595
criteria: MERGE
96-
queue_name: small
96+
queue_name: al2023
9797
- name: sample-express-embedded-sign-in-widget
9898
script_path: ../okta-auth-js/scripts/samples
9999
sort_order: '11'
100100
timeout: '15'
101101
script_name: e2e-express-embedded-sign-in-widget
102102
criteria: MERGE
103-
queue_name: small
103+
queue_name: al2023
104104
- name: sample-react-embedded-auth-with-sdk
105105
script_path: ../okta-auth-js/scripts/samples
106106
sort_order: '12'
107107
timeout: '20'
108108
script_name: e2e-react-embedded-auth-with-sdk
109109
criteria: MERGE
110-
queue_name: small
110+
queue_name: al2023
111111

112112
- name: verify-registry-install
113113
prereq_test_suite_name: publish
@@ -116,7 +116,7 @@ test_suites:
116116
timeout: '20'
117117
script_name: verify-registry-install
118118
criteria: MERGE
119-
queue_name: small
119+
queue_name: al2023
120120
# Sauce labs tests are flaky due to the free account we are currently using
121121
# Re-enable this task on bacon once we have an paid account
122122
# - name: e2e-saucelabs
@@ -125,4 +125,4 @@ test_suites:
125125
# timeout: '60'
126126
# script_name: e2e-saucelabs
127127
# criteria: MERGE
128-
# queue_name: small
128+
# queue_name: al2023

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
# 8.0.0
4+
5+
### Breaking Changes
6+
7+
- [#1607](https://github.com/okta/okta-auth-js/pull/1607) bumps minimum node version to 20
8+
39
# 7.14.0
410

511
### Features

babel.cjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
]],
1414
'plugins': [
1515
'@babel/plugin-transform-typescript',
16-
'@babel/plugin-proposal-class-properties',
16+
// '@babel/plugin-proposal-class-properties',
1717
// https://babeljs.io/docs/en/babel-plugin-transform-runtime#corejs
1818
'@babel/plugin-transform-runtime',
1919
['@babel/plugin-transform-modules-commonjs', {

lib/oidc/util/pkce.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function dec2hex (dec) {
2121

2222
function getRandomString(length) {
2323
var a = new Uint8Array(Math.ceil(length / 2));
24-
webcrypto.getRandomValues(a);
24+
a = webcrypto.getRandomValues(a);
2525
var str = Array.from(a, dec2hex).join('');
2626
return str.slice(0, length);
2727
}

package.json

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"name": "@okta/okta-auth-js",
44
"description": "The Okta Auth SDK",
5-
"version": "7.15.0",
5+
"version": "8.0.0",
66
"homepage": "https://github.com/okta/okta-auth-js",
77
"license": "Apache-2.0",
88
"main": "build/cjs/exports/default.js",
@@ -145,11 +145,22 @@
145145
"not IE_Mob 11"
146146
],
147147
"engines": {
148-
"node": ">=14.0",
149-
"yarn": "^1.7.0"
148+
"node": ">=20.0"
149+
},
150+
"devEngines": {
151+
"runtime": {
152+
"name": "node",
153+
"version": ">=20.11.0",
154+
"onFail": "warn"
155+
},
156+
"packageManager": {
157+
"name": "yarn",
158+
"version": ">=1.19.0",
159+
"onFail": "warn"
160+
}
150161
},
151162
"dependencies": {
152-
"@babel/runtime": "^7.27.0",
163+
"@babel/runtime": "^7.28.4",
153164
"@peculiar/webcrypto": "^1.4.0",
154165
"Base64": "1.1.0",
155166
"atob": "^2.1.2",
@@ -166,24 +177,24 @@
166177
"xhr2": "0.1.3"
167178
},
168179
"devDependencies": {
169-
"@babel/cli": "^7.17.0",
170-
"@babel/core": "^7.17.0",
180+
"@babel/cli": "^7.28.3",
181+
"@babel/core": "^7.28.4",
171182
"@babel/plugin-proposal-class-properties": "^7.10.1",
172183
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
173-
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
174-
"@babel/plugin-transform-runtime": "^7.8.3",
175-
"@babel/plugin-transform-typescript": "^7.10.5",
176-
"@babel/preset-env": "^7.8.2",
177-
"@babel/preset-typescript": "^7.10.4",
184+
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
185+
"@babel/plugin-transform-runtime": "^7.28.3",
186+
"@babel/plugin-transform-typescript": "^7.28.0",
187+
"@babel/preset-env": "^7.28.3",
188+
"@babel/preset-typescript": "^7.27.1",
178189
"@okta/okta-signin-widget": "6.0.0",
179190
"@rollup/plugin-alias": "^3.1.8",
180191
"@rollup/plugin-babel": "^5.3.0",
181192
"@rollup/plugin-replace": "^3.0.0",
182-
"@types/jest": "^27.5.1",
193+
"@types/jest": "^29.0.0",
183194
"@types/node": "^14.0.3",
184195
"@typescript-eslint/eslint-plugin": "^5.18.0",
185196
"@typescript-eslint/parser": "^5.18.0",
186-
"babel-jest": "^27.5.1",
197+
"babel-jest": "^29.7.0",
187198
"babel-loader": "^9.1.2",
188199
"babel-plugin-add-module-exports": "^1.0.2",
189200
"babel-plugin-inline-replace-variables": "^1.3.1",
@@ -200,11 +211,11 @@
200211
"globby": "^13.2.2",
201212
"husky": ">=6",
202213
"jasmine-ajax": "^4.0.0",
203-
"jest": "^28.1.0",
204-
"jest-environment-jsdom": "^28.1.0",
205-
"jest-jasmine2": "^28.1.0",
206-
"jest-junit": "^13.0.0",
207-
"jest-runner": "^28.1.0",
214+
"jest": "^29.7.0",
215+
"jest-environment-jsdom": "^29.7.0",
216+
"jest-jasmine2": "^29.7.0",
217+
"jest-junit": "^16.0.0",
218+
"jest-runner": "^29.7.0",
208219
"json-loader": "0.5.4",
209220
"lodash": "4.17.21",
210221
"rollup": "^2.70.2",
@@ -213,8 +224,8 @@
213224
"rollup-plugin-multi-input": "^1.3.1",
214225
"rollup-plugin-typescript2": "^0.36.0",
215226
"rollup-plugin-visualizer": "~5.5.4",
216-
"shelljs": "0.8.5",
217-
"ts-jest": "^28.0.2",
227+
"shelljs": "0.10.0",
228+
"ts-jest": "^29.4.4",
218229
"tstyche": "^1.1.0",
219230
"typedoc": "^0.23.19",
220231
"typedoc-plugin-markdown": "^3.13.6",
@@ -234,8 +245,7 @@
234245
"**/cacheable-request/http-cache-semantics": "^4.0.0",
235246
"**/has-ansi/ansi-regex": "^4.1.1",
236247
"**/strip-ansi/ansi-regex": "^3.0.1",
237-
"**/download/got": "^11.8.5",
238-
"**/@babel/runtime": "^7.27.0"
248+
"**/download/got": "^11.8.5"
239249
},
240250
"workspaces": {
241251
"packages": [

samples/test/cucumber.wdio.conf.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
/* eslint-disable @typescript-eslint/no-unused-vars */
1414

15+
import type { ChromeOptions, FirefoxOptions } from '@wdio/types/build/Capabilities';
16+
import type { WebDriverLogTypes } from '@wdio/types/build/Options';
17+
1518
const fs = require('node:fs/promises');
1619
const path = require('path');
1720
const { mergeFiles } = require('junit-report-merger');
@@ -27,13 +30,13 @@ console.log('SPECS', specs);
2730
const USE_FIREFOX = !!process.env.USE_FIREFOX;
2831
const DEBUG = process.env.DEBUG;
2932
const CI = process.env.CI;
30-
const LOG = process.env.LOG;
33+
const LOG = process.env.LOG as WebDriverLogTypes;
3134
const defaultTimeoutInterval = DEBUG ? (24 * 60 * 60 * 1000) : 15000;
32-
const logLevel = LOG || 'warn';
33-
const chromeOptions = {
34-
args: []
35+
const logLevel: WebDriverLogTypes = LOG || 'warn';
36+
const chromeOptions: ChromeOptions = {
37+
args: []
3538
};
36-
const firefoxOptions = {
39+
const firefoxOptions: FirefoxOptions = {
3740
args: []
3841
};
3942
const maxInstances = process.env.MAX_INSTANCES ? +process.env.MAX_INSTANCES : 1;
@@ -43,7 +46,7 @@ if (CI) {
4346
if (process.env.CHROME_BINARY) {
4447
chromeOptions.binary = process.env.CHROME_BINARY;
4548
}
46-
chromeOptions.args = chromeOptions.args.concat([
49+
chromeOptions.args = (chromeOptions.args ?? []).concat([
4750
'--headless',
4851
'--disable-gpu',
4952
'--window-size=1600x1200',
@@ -52,7 +55,7 @@ if (CI) {
5255
'--disable-extensions',
5356
'--verbose'
5457
]);
55-
firefoxOptions.args = firefoxOptions.args.concat([
58+
firefoxOptions.args = (firefoxOptions.args ?? []).concat([
5659
'-headless'
5760
]);
5861
}
@@ -331,11 +334,13 @@ export const config: WebdriverIO.Config = {
331334
await browser.saveScreenshot(`${process.env.E2E_LOG_DIR}/failure-${failureCount}.png`);
332335
const logs = await browser.getLogs('browser');
333336
let log;
334-
try {
335-
log = JSON.parse(logs, null, 4);
336-
}
337-
catch (err) {
338-
log = logs;
337+
if (typeof logs === 'string') {
338+
try {
339+
log = JSON.parse(logs);
340+
}
341+
catch (err) {
342+
log = logs;
343+
}
339344
}
340345
await fs.writeFile(
341346
`${process.env.E2E_LOG_DIR}/failure-${failureCount}-console.log`,

samples/test/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"yarn": "^1.7.0"
1919
},
2020
"dependencies": {
21-
"@babel/register": "^7.8.2",
21+
"@babel/register": "^7.28.3",
2222
"@okta/okta-sdk-nodejs": "^6.4.0",
2323
"cross-fetch": "^3.1.5",
2424
"cross-spawn-with-kill": "^1.0.0",
@@ -30,6 +30,7 @@
3030
"@babel/plugin-transform-async-to-generator": "^7.5.0",
3131
"@wdio/cli": "^8.35.1",
3232
"@wdio/cucumber-framework": "^8.35.0",
33+
"@wdio/globals": "^8.35.1",
3334
"@wdio/jasmine-framework": "^8.35.1",
3435
"@wdio/junit-reporter": "^8.32.4",
3536
"@wdio/local-runner": "^8.35.1",
@@ -39,5 +40,8 @@
3940
"wait-on": "^8.0.1",
4041
"webdriverio": "^8.35.1",
4142
"junit-report-merger": "^3.0.5"
43+
},
44+
"devDependencies": {
45+
"@wdio/types": "^8.32.4"
4246
}
4347
}

0 commit comments

Comments
 (0)