Skip to content
Merged
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
34 changes: 17 additions & 17 deletions .bacon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ test_suites:
timeout: '60'
script_name: publish
criteria: MERGE
queue_name: small
queue_name: al2023
- name: lint
script_path: ../okta-auth-js/scripts
sort_order: '2'
timeout: '60'
script_name: lint
criteria: MERGE
queue_name: small
queue_name: al2023
log_files:
- build2/reports/lint/eslint-checkstyle-result.xml

Expand All @@ -22,92 +22,92 @@ test_suites:
timeout: '20'
script_name: unit
criteria: MERGE
queue_name: small
queue_name: al2023
- name: integration
script_path: ../okta-auth-js/scripts
sort_order: '3'
timeout: '10'
script_name: integration
criteria: MERGE
queue_name: small
queue_name: al2023

- name: e2e
script_path: ../okta-auth-js/scripts/e2e
sort_order: '4'
timeout: '20'
script_name: e2e
criteria: MERGE
queue_name: small
queue_name: al2023
- name: e2e-cucumber
script_path: ../okta-auth-js/scripts/e2e
sort_order: '4'
timeout: '20'
script_name: e2e-cucumber
criteria: MERGE
queue_name: small
queue_name: al2023
- name: e2e-mfa
script_path: ../okta-auth-js/scripts/e2e
sort_order: '5'
timeout: '10'
script_name: e2e-mfa
criteria: MERGE
queue_name: small
queue_name: al2023
- name: e2e-dpop
script_path: ../okta-auth-js/scripts/e2e
sort_order: '5'
timeout: '10'
script_name: e2e-dpop
criteria: MERGE
queue_name: small
queue_name: al2023
- name: sample-express-embedded-auth-with-sdk
script_path: ../okta-auth-js/scripts/samples
sort_order: '6'
timeout: '30'
script_name: e2e-express-embedded-auth-with-sdk
criteria: OPTIONAL
queue_name: small
queue_name: al2023
- name: sample-express-web-no-oidc
script_path: ../okta-auth-js/scripts/samples
sort_order: '7'
timeout: '15'
script_name: e2e-express-web-no-oidc
criteria: MERGE
queue_name: small
queue_name: al2023
- name: sample-express-web-with-oidc
script_path: ../okta-auth-js/scripts/samples
sort_order: '8'
timeout: '15'
script_name: e2e-express-web-with-oidc
criteria: MERGE
queue_name: small
queue_name: al2023
- name: sample-static-spa
script_path: ../okta-auth-js/scripts/samples
sort_order: '9'
timeout: '15'
script_name: e2e-static-spa
criteria: MERGE
queue_name: small
queue_name: al2023
- name: sample-webpack-spa
script_path: ../okta-auth-js/scripts/samples
sort_order: '10'
timeout: '15'
script_name: e2e-webpack-spa
criteria: MERGE
queue_name: small
queue_name: al2023
- name: sample-express-embedded-sign-in-widget
script_path: ../okta-auth-js/scripts/samples
sort_order: '11'
timeout: '15'
script_name: e2e-express-embedded-sign-in-widget
criteria: MERGE
queue_name: small
queue_name: al2023
- name: sample-react-embedded-auth-with-sdk
script_path: ../okta-auth-js/scripts/samples
sort_order: '12'
timeout: '20'
script_name: e2e-react-embedded-auth-with-sdk
criteria: MERGE
queue_name: small
queue_name: al2023

- name: verify-registry-install
prereq_test_suite_name: publish
Expand All @@ -116,7 +116,7 @@ test_suites:
timeout: '20'
script_name: verify-registry-install
criteria: MERGE
queue_name: small
queue_name: al2023
# Sauce labs tests are flaky due to the free account we are currently using
# Re-enable this task on bacon once we have an paid account
# - name: e2e-saucelabs
Expand All @@ -125,4 +125,4 @@ test_suites:
# timeout: '60'
# script_name: e2e-saucelabs
# criteria: MERGE
# queue_name: small
# queue_name: al2023
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

# 8.0.0

### Breaking Changes

- [#1607](https://github.com/okta/okta-auth-js/pull/1607) bumps minimum node version to 20

# 7.14.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion babel.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
]],
'plugins': [
'@babel/plugin-transform-typescript',
'@babel/plugin-proposal-class-properties',
// '@babel/plugin-proposal-class-properties',
// https://babeljs.io/docs/en/babel-plugin-transform-runtime#corejs
'@babel/plugin-transform-runtime',
['@babel/plugin-transform-modules-commonjs', {
Expand Down
2 changes: 1 addition & 1 deletion lib/oidc/util/pkce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function dec2hex (dec) {

function getRandomString(length) {
var a = new Uint8Array(Math.ceil(length / 2));
webcrypto.getRandomValues(a);
a = webcrypto.getRandomValues(a);
var str = Array.from(a, dec2hex).join('');
return str.slice(0, length);
}
Expand Down
54 changes: 32 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"name": "@okta/okta-auth-js",
"description": "The Okta Auth SDK",
"version": "7.15.0",
"version": "8.0.0",
"homepage": "https://github.com/okta/okta-auth-js",
"license": "Apache-2.0",
"main": "build/cjs/exports/default.js",
Expand Down Expand Up @@ -145,11 +145,22 @@
"not IE_Mob 11"
],
"engines": {
"node": ">=14.0",
"yarn": "^1.7.0"
"node": ">=20.0"
},
"devEngines": {
"runtime": {
"name": "node",
"version": ">=20.11.0",
"onFail": "warn"
},
"packageManager": {
"name": "yarn",
"version": ">=1.19.0",
"onFail": "warn"
}
},
"dependencies": {
"@babel/runtime": "^7.27.0",
"@babel/runtime": "^7.28.4",
"@peculiar/webcrypto": "^1.4.0",
"Base64": "1.1.0",
"atob": "^2.1.2",
Expand All @@ -166,24 +177,24 @@
"xhr2": "0.1.3"
},
"devDependencies": {
"@babel/cli": "^7.17.0",
"@babel/core": "^7.17.0",
"@babel/cli": "^7.28.3",
"@babel/core": "^7.28.4",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/plugin-transform-typescript": "^7.10.5",
"@babel/preset-env": "^7.8.2",
"@babel/preset-typescript": "^7.10.4",
"@babel/plugin-transform-modules-commonjs": "^7.27.1",
"@babel/plugin-transform-runtime": "^7.28.3",
"@babel/plugin-transform-typescript": "^7.28.0",
"@babel/preset-env": "^7.28.3",
"@babel/preset-typescript": "^7.27.1",
"@okta/okta-signin-widget": "6.0.0",
"@rollup/plugin-alias": "^3.1.8",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-replace": "^3.0.0",
"@types/jest": "^27.5.1",
"@types/jest": "^29.0.0",
"@types/node": "^14.0.3",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"babel-jest": "^27.5.1",
"babel-jest": "^29.7.0",
"babel-loader": "^9.1.2",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-plugin-inline-replace-variables": "^1.3.1",
Expand All @@ -200,11 +211,11 @@
"globby": "^13.2.2",
"husky": ">=6",
"jasmine-ajax": "^4.0.0",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"jest-jasmine2": "^28.1.0",
"jest-junit": "^13.0.0",
"jest-runner": "^28.1.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-jasmine2": "^29.7.0",
"jest-junit": "^16.0.0",
"jest-runner": "^29.7.0",
"json-loader": "0.5.4",
"lodash": "4.17.21",
"rollup": "^2.70.2",
Expand All @@ -213,8 +224,8 @@
"rollup-plugin-multi-input": "^1.3.1",
"rollup-plugin-typescript2": "^0.36.0",
"rollup-plugin-visualizer": "~5.5.4",
"shelljs": "0.8.5",
"ts-jest": "^28.0.2",
"shelljs": "0.10.0",
"ts-jest": "^29.4.4",
"tstyche": "^1.1.0",
"typedoc": "^0.23.19",
"typedoc-plugin-markdown": "^3.13.6",
Expand All @@ -234,8 +245,7 @@
"**/cacheable-request/http-cache-semantics": "^4.0.0",
"**/has-ansi/ansi-regex": "^4.1.1",
"**/strip-ansi/ansi-regex": "^3.0.1",
"**/download/got": "^11.8.5",
"**/@babel/runtime": "^7.27.0"
"**/download/got": "^11.8.5"
},
"workspaces": {
"packages": [
Expand Down
29 changes: 17 additions & 12 deletions samples/test/cucumber.wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

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

import type { ChromeOptions, FirefoxOptions } from '@wdio/types/build/Capabilities';
import type { WebDriverLogTypes } from '@wdio/types/build/Options';

const fs = require('node:fs/promises');
const path = require('path');
const { mergeFiles } = require('junit-report-merger');
Expand All @@ -27,13 +30,13 @@ console.log('SPECS', specs);
const USE_FIREFOX = !!process.env.USE_FIREFOX;
const DEBUG = process.env.DEBUG;
const CI = process.env.CI;
const LOG = process.env.LOG;
const LOG = process.env.LOG as WebDriverLogTypes;
const defaultTimeoutInterval = DEBUG ? (24 * 60 * 60 * 1000) : 15000;
const logLevel = LOG || 'warn';
const chromeOptions = {
args: []
const logLevel: WebDriverLogTypes = LOG || 'warn';
const chromeOptions: ChromeOptions = {
args: []
};
const firefoxOptions = {
const firefoxOptions: FirefoxOptions = {
args: []
};
const maxInstances = process.env.MAX_INSTANCES ? +process.env.MAX_INSTANCES : 1;
Expand All @@ -43,7 +46,7 @@ if (CI) {
if (process.env.CHROME_BINARY) {
chromeOptions.binary = process.env.CHROME_BINARY;
}
chromeOptions.args = chromeOptions.args.concat([
chromeOptions.args = (chromeOptions.args ?? []).concat([
'--headless',
'--disable-gpu',
'--window-size=1600x1200',
Expand All @@ -52,7 +55,7 @@ if (CI) {
'--disable-extensions',
'--verbose'
]);
firefoxOptions.args = firefoxOptions.args.concat([
firefoxOptions.args = (firefoxOptions.args ?? []).concat([
'-headless'
]);
}
Expand Down Expand Up @@ -331,11 +334,13 @@ export const config: WebdriverIO.Config = {
await browser.saveScreenshot(`${process.env.E2E_LOG_DIR}/failure-${failureCount}.png`);
const logs = await browser.getLogs('browser');
let log;
try {
log = JSON.parse(logs, null, 4);
}
catch (err) {
log = logs;
if (typeof logs === 'string') {
try {
log = JSON.parse(logs);
}
catch (err) {
log = logs;
}
}
await fs.writeFile(
`${process.env.E2E_LOG_DIR}/failure-${failureCount}-console.log`,
Expand Down
6 changes: 5 additions & 1 deletion samples/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"yarn": "^1.7.0"
},
"dependencies": {
"@babel/register": "^7.8.2",
"@babel/register": "^7.28.3",
"@okta/okta-sdk-nodejs": "^6.4.0",
"cross-fetch": "^3.1.5",
"cross-spawn-with-kill": "^1.0.0",
Expand All @@ -30,6 +30,7 @@
"@babel/plugin-transform-async-to-generator": "^7.5.0",
"@wdio/cli": "^8.35.1",
"@wdio/cucumber-framework": "^8.35.0",
"@wdio/globals": "^8.35.1",
"@wdio/jasmine-framework": "^8.35.1",
"@wdio/junit-reporter": "^8.32.4",
"@wdio/local-runner": "^8.35.1",
Expand All @@ -39,5 +40,8 @@
"wait-on": "^8.0.1",
"webdriverio": "^8.35.1",
"junit-report-merger": "^3.0.5"
},
"devDependencies": {
"@wdio/types": "^8.32.4"
}
}
Loading