Skip to content
Open
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
14 changes: 6 additions & 8 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ module.exports = {
],
globals: {
'PACKAGE': packageInfo,
'AUTH_JS': { minSupportedVersion: '5.3.1' },
'ts-jest': {
diagnostics: {
warnOnly: true
}
}
'AUTH_JS': { minSupportedVersion: '5.3.1' }
},
restoreMocks: true,
moduleFileExtensions: [
Expand All @@ -37,10 +32,13 @@ module.exports = {
'**/test/specs/**/*.spec.[jt]s?(x)'
],
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.tsx?$': ['ts-jest', { diagnostics: { warnOnly: true } }],
'^.+\\.m?jsx?$': 'babel-jest',
'.*\\.(vue)$': '@vue/vue3-jest'
},
transformIgnorePatterns: [
'/node_modules/(?!(nostics)/)'
],
testEnvironment: 'jsdom',
setupFilesAfterEnv: [
'./test/jest.setup.js'
Expand Down
64 changes: 34 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "yarn lint && yarn test:unit",
"test:e2e": "yarn workspace @okta/test.e2e-wdio test",
"test:unit": "jest",
"bundle": "rollup -c rollup.config.js",
"bundle": "rollup -c rollup.config.js --bundleConfigAsCjs",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did rollup stop working without this flag?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah the flag is required by the rollup bump.
otherwise it fails with "require is not defined in ES module scope" (because rollup v4 changed how js config files are loaded, now as native ESM where "require" doesn't exist)

"dev": "yarn bundle --watch"
},
"repository": {
Expand All @@ -38,59 +38,60 @@
"homepage": "https://github.com/okta/okta-vue#readme",
"dependencies": {
"@babel/runtime": "^7.12.5",
"compare-versions": "^4.1.2"
"compare-versions": "^6.1.1"
},
"devDependencies": {
"@babel/core": "^7.21.3",
"@babel/eslint-parser": "^7.25.9",
"@babel/plugin-transform-runtime": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@okta/okta-auth-js": "^7.9.0",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-replace": "^2.3.4",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"@okta/okta-auth-js": "^8.0.1",
"@rollup/plugin-babel": "^7.1.0",
"@rollup/plugin-commonjs": "^29.0.3",
"@rollup/plugin-replace": "^6.0.3",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vue/compiler-sfc": "^3.2.31",
"@vue/eslint-config-typescript": "^5.0.2",
"@vue/eslint-config-typescript": "^8.0.0",
"@vue/test-utils": "^2.0.0-beta.14",
"@vue/vue3-jest": "^29.2.4",
"babel-jest": "^27.5.1",
"babel-jest": "^30.4.1",
"chalk": "2.4.2",
"eslint": "^7.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-html": "^3.0.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-import-resolver-typescript": "^4.4.5",
"eslint-plugin-html": "^8.1.4",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^21.15.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^7.2.0",
"eslint-plugin-promise": "^7.3.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-vue": "^9.33.0",
"globby": "^11.0.1",
"jest": "^27.5.1",
"jest-junit": "^13.0.0",
"rimraf": "^2.6.2",
"rollup": "^2.33.1",
"jest": "^30.4.2",
"jest-environment-jsdom": "^30.4.1",
"jest-junit": "^17.0.0",
"rimraf": "^6.1.3",
"rollup": "^4.62.4",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.29.0",
"rollup-plugin-typescript2": "^0.37.0",
"rollup-plugin-vue": "^6.0.0-beta.11",
"shelljs": "0.8.5",
"ts-jest": "^27.1.4",
"typescript": "^4.1.2",
"shelljs": "^0.10.0",
"ts-jest": "^29.4.12",
"typescript": "^5.9.3",
"vue": "^3.2.31",
"vue-eslint-parser": "^7.3.0",
"vue-router": "^4.0.14",
"vue-eslint-parser": "^9.4.3",
"vue-router": "^5.2.0",
"vue-template-compiler": "^2.6.12",
"wait-for-expect": "^3.0.0",
"wait-for-expect": "^4.0.0",
"webdriver-manager": "^12.1.9"
},
"peerDependencies": {
"@okta/okta-auth-js": "^5.8.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
"vue": "^3.0.0",
"vue-router": "^4.0.3"
"vue-router": "^4.0.3 || ^5.0.0"
},
"resolutions": {
"core-js": "^3.39.0",
Expand All @@ -99,7 +100,10 @@
"glob-parent": "^6.0.2",
"**/lighthouse-logger/debug": "^3.1.0",
"**/babel-traverse/debug": "^3.1.0",
"**/axios": "^1.15.0"
"**/axios": "^1.15.0",
"picomatch": "2.3.1",
"node-releases": "2.0.44",
"selenium-standalone": "8.2.1"
},
"jest-junit": {
"outputDirectory": "./test-reports/unit/",
Expand All @@ -126,4 +130,4 @@
"**/@wdio/**"
]
}
}
}
8 changes: 6 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { terser } from 'rollup-plugin-terser'
import cleanup from 'rollup-plugin-cleanup'
import typescript from 'rollup-plugin-typescript2'
import commonjs from '@rollup/plugin-commonjs'
import pkg from './package.json'
import pkg from './package.json' with { type: 'json' }

const packageInfo = {
name: pkg.name,
Expand Down Expand Up @@ -35,7 +35,11 @@ const commonPlugins = [
minSupportedVersion: '5.3.1'
})
},
preventAssignment: true
preventAssignment: true,
// default delimiters (as of v5+) exclude matches followed by `.`, but PACKAGE/AUTH_JS
// are only ever referenced via property access (e.g. PACKAGE.name), so that guard
// must be dropped or these replacements never fire.
delimiters: ['(?<![_$a-zA-Z0-9\\xA0-\\uFFFF])', '(?![_$a-zA-Z0-9\\xA0-\\uFFFF])']
}),
cleanup()
]
Expand Down
5 changes: 4 additions & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ if ! ci-append-sha; then
fi

npm config set @okta:registry ${REGISTRY}
if ! npm publish --registry ${REGISTRY}; then
# newer npm (bundled with Node 24) requires an explicit --tag for prerelease-looking
# versions (e.g. the SHA-suffixed version ci-append-sha produces); pass "latest" to
# match npm's old implicit default so publish behavior is unchanged.
if ! npm publish --registry ${REGISTRY} --tag latest; then
echo "npm publish failed! Exiting..."
exit ${PUBLISH_ARTIFACTORY_FAILURE}
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export AUTHJS_VERSION=""

# Install required node version
export NVM_DIR="/root/.nvm"
setup_service node v16.20.2
setup_service node v24.11.0

# Install yarn
# Use the cacert bundled with centos as okta root CA is self-signed and cause issues downloading from yarn
Expand Down
2 changes: 1 addition & 1 deletion src/components/LoginCallback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { h, ref, onBeforeMount, Slot } from 'vue'
import { useAuth } from '../okta-vue'

export default {
setup(_props: {}, { slots }: { slots: { error?: Slot } }) {
setup(_props: Record<string, never>, { slots }: { slots: { error?: Slot } }) {
const error = ref<string | null>(null);
const $auth = useAuth();
onBeforeMount(async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/okta-vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/

import { App, shallowRef, triggerRef, version } from 'vue'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused variable, called out by linter

import { App, shallowRef, triggerRef } from 'vue'
import { Router, RouteLocationNormalized } from 'vue-router'
import { AuthSdkError, OktaAuth, AuthState, toRelativeUrl } from '@okta/okta-auth-js'
import { compare } from 'compare-versions';
Expand Down
3 changes: 3 additions & 0 deletions test/apps/test-harness/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ module.exports = {
'eslint:recommended',
'@vue/typescript/recommended'
],
rules: {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disabling a new ESLint rule that flagged single-word component names

'vue/multi-word-component-names': 'off'
},
overrides: [
{
files: ['vue.config.js'],
Expand Down
5 changes: 4 additions & 1 deletion test/components/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ module.exports = {
'plugin:vue/essential',
'eslint:recommended',
'@vue/typescript/recommended'
]
],
rules: {
'vue/multi-word-component-names': 'off'
}
};
Loading