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
13 changes: 13 additions & 0 deletions .changeset/sixty-toys-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@asgardeo/tanstack-router': patch
'@asgardeo/react-router': patch
'@asgardeo/browser': patch
'@asgardeo/express': patch
'@asgardeo/nextjs': patch
'@asgardeo/react': patch
'@asgardeo/i18n': patch
'@asgardeo/node': patch
'@asgardeo/vue': patch
---

Fix failures in the CI
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"devDependencies": {
"@changesets/changelog-github": "0.5.1",
"@changesets/cli": "2.29.4",
"@changesets/cli": "2.29.8",
"@wso2/eslint-plugin": "catalog:",
"@wso2/prettier-config": "catalog:",
"eslint": "8.57.0",
Expand All @@ -46,7 +46,18 @@
"test-exclude>glob": "10.5.0",
"js-beautify>glob": "10.5.0",
"@types/react": "19.1.5",
"@types/react-dom": "19.1.5"
"@types/react-dom": "19.1.5",
"js-yaml": "4.1.1",
"read-yaml-file": "2.1.0",
"brace-expansion": "2.0.2",
"@eslint/plugin-kit": "0.3.4",
"tmp": "0.2.4",
"min-document": "2.19.1",
"lodash": "4.17.23",
"tar": "7.5.4",
"seroval": "1.4.1",
"qs": "6.14.1",
"@vitejs/plugin-vue>vite": "7.1.12"
}
},
"publishConfig": {
Expand Down
1 change: 1 addition & 0 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"esbuild-plugin-inline-worker": "0.1.1",
"esbuild-plugins-node-modules-polyfill": "1.7.0",
"eslint": "8.57.0",
"jsdom": "^27.4.0",
"playwright": "1.55.1",
"prettier": "2.6.2",
"rimraf": "6.1.0",
Expand Down
8 changes: 5 additions & 3 deletions packages/browser/src/utils/__tests__/navigate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
* under the License.
*/

import {vi} from 'vitest';
/**
* @vitest-environment jsdom
*/

import {vi, describe, it, expect, beforeEach, afterEach} from 'vitest';
import navigate from '../navigate';

describe('navigate', () => {
Expand All @@ -28,8 +32,6 @@ describe('navigate', () => {
// @ts-ignore
window.dispatchEvent = vi.fn();
// @ts-ignore
window.location.assign = vi.fn();
// @ts-ignore
delete window.location;
// @ts-ignore
window.location = {
Expand Down
9 changes: 3 additions & 6 deletions packages/browser/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ import {defineConfig} from 'vitest/config';

export default defineConfig({
test: {
browser: {
enabled: true,
headless: true,
instances: [{browser: 'chromium'}],
provider: 'playwright',
},
environment: 'jsdom',
globals: true,
testTimeout: 10000,
hookTimeout: 10000,
},
});
3 changes: 2 additions & 1 deletion packages/express/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/dist
/build
/node_modules
/coverage
/coverage
/src/__legacy__
4 changes: 2 additions & 2 deletions packages/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"clean": "rimraf dist",
"fix:lint": "eslint . --ext .js,.jsx,.ts,.tsx,.cjs,.mjs",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.cjs,.mjs",
"test": "vitest",
"test": "vitest --passWithNoTests",
"typecheck": "tsc -p tsconfig.lib.json"
},
"devDependencies": {
Expand All @@ -46,7 +46,7 @@
"@wso2/prettier-config": "catalog:",
"esbuild": "0.25.9",
"eslint": "8.57.0",
"express": "5.1.0",
"express": "5.2.1",
"prettier": "2.6.2",
"rimraf": "6.1.0",
"typescript": "5.7.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/express/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.com) All Rights Reserved.
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 Inc. licenses this file to you under the Apache License,
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -16,7 +16,7 @@
* under the License.
*/

export * from "./__legacy__/models";
export * from "./__legacy__/client";
export * from './__legacy__/models';
export * from './__legacy__/client';

export * from '@asgardeo/node';
1 change: 1 addition & 0 deletions packages/express/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* under the License.
*/

// eslint-disable-next-line import/no-extraneous-dependencies
import {defineConfig} from 'vitest/config';

export default defineConfig({
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/translations/hi-IN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

/* eslint-disable sort-keys */
/* eslint-disable @typescript-eslint/naming-convention */

import {I18nTranslations, I18nMetadata, I18nBundle} from '../models/i18n';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/

import {describe, expect, it} from 'vitest';
import getDefaultI18nBundles from '../getDefaultI18nBundles';
import TranslationBundleConstants from '../../constants/TranslationBundleConstants';
import type {I18nBundle} from '../../models/i18n';
import {en_US} from '../../translations';
import getDefaultI18nBundles from '../getDefaultI18nBundles';

describe('getDefaultI18nBundles', (): void => {
it('should return a collection of i18n bundles', (): void => {
Expand Down Expand Up @@ -86,7 +86,7 @@ describe('getDefaultI18nBundles', (): void => {
const bundles: Record<string, I18nBundle> = getDefaultI18nBundles();

Object.values(bundles).forEach((bundle: I18nBundle) => {
const translations = bundle.translations;
const {translations} = bundle;

expect(translations).toHaveProperty('elements.buttons.signin.text');
expect(translations).toHaveProperty('elements.buttons.signout.text');
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* under the License.
*/

// eslint-disable-next-line import/no-extraneous-dependencies
import {defineConfig} from 'vitest/config';

export default defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"esbuild": "0.25.9",
"esbuild-plugin-preserve-directives": "0.0.11",
"eslint": "8.57.0",
"next": "15.3.8",
"next": "15.4.10",
"prettier": "2.6.2",
"react": "19.1.4",
"rimraf": "6.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"clean": "rimraf dist",
"fix:lint": "eslint . --ext .js,.jsx,.ts,.tsx,.cjs,.mjs",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.cjs,.mjs",
"test": "vitest",
"test": "vitest --passWithNoTests",
"typecheck": "tsc -p tsconfig.lib.json"
},
"devDependencies": {
Expand Down
37 changes: 19 additions & 18 deletions packages/node/src/__legacy__/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) {{year}}, WSO2 LLC. (https://www.wso2.com).
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -37,7 +37,7 @@ import {AuthURLCallback} from './models';
* @class AsgardeoNodeClient
*/
export class AsgardeoNodeClient<T> {
private _authCore: AsgardeoNodeCore<T>;
private authCore: AsgardeoNodeCore<T>;

/**
* This is the constructor method that returns an instance of the `AsgardeoNodeClient` class.
Expand All @@ -60,10 +60,11 @@ export class AsgardeoNodeClient<T> {
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#constructor
* @preserve
*/
// eslint-disable-next-line @typescript-eslint/no-empty-function
constructor() {}

public async initialize(config: AuthClientConfig<T>, store?: Storage): Promise<boolean> {
this._authCore = new AsgardeoNodeCore(config, store);
this.authCore = new AsgardeoNodeCore(config, store);

return Promise.resolve(true);
}
Expand Down Expand Up @@ -108,7 +109,7 @@ export class AsgardeoNodeClient<T> {
state?: string,
signInConfig?: Record<string, string | boolean>,
): Promise<TokenResponse> {
return this._authCore.signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig);
return this.authCore.signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig);
}

/**
Expand All @@ -117,7 +118,7 @@ export class AsgardeoNodeClient<T> {
* @returns {Promise<AuthClientConfig<Config>>} - A promise that resolves with the configuration data.
*/
public async getConfigData(): Promise<AuthClientConfig<T>> {
return this._authCore.getConfigData();
return this.authCore.getConfigData();
}

/**
Expand All @@ -138,7 +139,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async signOut(userId: string): Promise<string> {
return this._authCore.signOut(userId);
return this.authCore.signOut(userId);
}

/**
Expand All @@ -159,7 +160,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async isSignedIn(userId: string): Promise<boolean> {
return this._authCore.isSignedIn(userId);
return this.authCore.isSignedIn(userId);
}

/**
Expand All @@ -180,7 +181,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async getIdToken(userId: string): Promise<string> {
return this._authCore.getIdToken(userId);
return this.authCore.getIdToken(userId);
}

/**
Expand All @@ -202,7 +203,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async getUser(userId: string): Promise<User> {
return this._authCore.getUser(userId);
return this.authCore.getUser(userId);
}

/**
Expand All @@ -221,7 +222,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async getOpenIDProviderEndpoints(): Promise<OIDCEndpoints> {
return this._authCore.getOpenIDProviderEndpoints();
return this.authCore.getOpenIDProviderEndpoints();
}

/**
Expand All @@ -243,7 +244,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async getDecodedIdToken(userId?: string, idToken?: string): Promise<IdToken> {
return this._authCore.getDecodedIdToken(userId, idToken);
return this.authCore.getDecodedIdToken(userId, idToken);
}

/**
Expand All @@ -265,7 +266,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async getAccessToken(userId?: string): Promise<string> {
return this._authCore.getAccessToken(userId);
return this.authCore.getAccessToken(userId);
}

/**
Expand Down Expand Up @@ -309,7 +310,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async exchangeToken(config: TokenExchangeRequestConfig, userId?: string): Promise<TokenResponse | Response> {
return this._authCore.exchangeToken(config, userId);
return this.authCore.exchangeToken(config, userId);
}

/**
Expand All @@ -332,11 +333,11 @@ export class AsgardeoNodeClient<T> {
*
*/
public async reInitialize(config: Partial<AuthClientConfig<T>>): Promise<void> {
return this._authCore.reInitialize(config);
return this.authCore.reInitialize(config);
}

public async getSignInUrl(requestConfig?: ExtendedAuthorizeRequestUrlParams, userId?: string): Promise<string> {
return this._authCore.getAuthURL(userId, requestConfig);
return this.authCore.getAuthURL(userId, requestConfig);
}

/**
Expand All @@ -357,7 +358,7 @@ export class AsgardeoNodeClient<T> {
*
*/
public async revokeAccessToken(userId?: string): Promise<Response> {
return this._authCore.revokeAccessToken(userId);
return this.authCore.revokeAccessToken(userId);
}

/**
Expand All @@ -379,7 +380,7 @@ export class AsgardeoNodeClient<T> {
* @memberof AsgardeoNodeClient
*/
public refreshAccessToken(userId?: string): Promise<TokenResponse> {
return this._authCore.refreshAccessToken(userId);
return this.authCore.refreshAccessToken(userId);
}

/**
Expand Down Expand Up @@ -425,6 +426,6 @@ export class AsgardeoNodeClient<T> {
}

public async getStorageManager(): Promise<StorageManager<T>> {
return this._authCore.getStorageManager();
return this.authCore.getStorageManager();
}
}
36 changes: 18 additions & 18 deletions packages/node/src/__legacy__/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/**
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.com) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export * from "./uuid-config";
export * from "./logger-config";
export * from './uuid-config';
export * from './logger-config';
Loading
Loading