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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
# We test against different OSes, because the build toolchain has OS-specific dependencies.
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
os: ["ubuntu-latest", "windows-latest"]
node-version: ["22.x", "24.x"]
steps:
- uses: actions/checkout@v7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
import "./.next/types/root-params.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
1 change: 0 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { join } from "node:path";

// Jest 30 loads .ts config files as ESM via Node's native TypeScript support,
// so `require` is not available. Use createRequire for require.resolve calls.
// @ts-expect-error: import.meta.url is valid at runtime (ESM), but tsconfig targets CJS.
const esmRequire = createRequire(import.meta.url);

type ArrayElement<MyArray> = MyArray extends Array<infer T> ? T : never;
Expand Down
6 changes: 4 additions & 2 deletions 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 @@ -78,7 +78,7 @@
"ts-node": "^10.9.2",
"typedoc": "^0.28.20",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.9.3"
"typescript": "^6.0.3"
},
"optionalDependencies": {
"@nx/nx-win32-x64-msvc": "^23.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/ClientAuthentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
removeOpenIdParams,
} from "@inrupt/solid-client-authn-core";
import { normalizeCallbackUrl } from "@inrupt/oidc-client-ext";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";

/**
* Checks if a client's registration has expired.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import { jest, it, describe, expect } from "@jest/globals";
import {
jest,
it,
describe,
expect,
beforeEach,
afterEach,
} from "@jest/globals";
import { mockStorageUtility } from "@inrupt/solid-client-authn-core";
import IssuerConfigFetcher from "./IssuerConfigFetcher";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
saveSessionInfoToStorage,
} from "@inrupt/solid-client-authn-core";
import { getTokens } from "@inrupt/oidc-client-ext";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";

/**
* @hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import type {
ISessionInfo,
} from "@inrupt/solid-client-authn-core";
import { EVENTS } from "@inrupt/solid-client-authn-core";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";

import { getUnauthenticatedSession } from "../../../sessionInfo/SessionInfoManager";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
EVENTS,
} from "@inrupt/solid-client-authn-core";
import { refresh } from "@inrupt/oidc-client-ext";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";

// Some identifiers are not in camelcase on purpose, as they are named using the
// official names from the OIDC/OAuth2 specifications.
Expand Down
4 changes: 3 additions & 1 deletion packages/browser/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

"compilerOptions": {
"lib": ["es2022", "dom"],
"outDir": "./dist"
"rootDir": "./src",
"outDir": "./dist",
"types": ["node"]
},

"include": ["src/**/*"],
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs"
},
"./mocks": {
"types": "./dist/mocks.d.ts",
"require": "./dist/mocks.js",
"import": "./dist/mocks.mjs",
"types": "./dist/mocks.d.ts"
"import": "./dist/mocks.mjs"
}
},
"typesVersions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/SessionEventListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import type { EVENTS } from "./constant";
import type { KeyPair } from "./authenticatedFetch/dpopUtils";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/authenticatedFetch/fetchFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import { REFRESH_BEFORE_EXPIRATION_SECONDS, EVENTS } from "../constant";
import type { ITokenRefresher } from "../login/oidc/refresh/ITokenRefresher";
import type { KeyPair } from "./dpopUtils";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/login/ILoginOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @packageDocumentation
*/

import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import type ILoginInputOptions from "../ILoginInputOptions";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/login/oidc/IIncomingRedirectHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @packageDocumentation
*/

import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import type IHandleable from "../../util/handlerPattern/IHandleable";
import type { ISessionInfo } from "../../sessionInfo/ISessionInfo";
import type { IRpLogoutOptions } from "../../logout/ILogoutHandler";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/login/oidc/IOidcOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* Defines how OIDC login should proceed
*/
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import type { IIssuerConfig } from "./IIssuerConfig";
import type { IClient } from "./IClient";
import { DEFAULT_SCOPES } from "../../constant";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import { jest } from "@jest/globals";

import type IIncomingRedirectHandler from "../IIncomingRedirectHandler";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/login/oidc/refresh/ITokenRefresher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import type { KeyPair } from "../../../authenticatedFetch/dpopUtils";

/**
Expand Down
4 changes: 3 additions & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

"compilerOptions": {
"lib": ["es2022", "dom"],
"outDir": "./dist"
"rootDir": "./src",
"outDir": "./dist",
"types": ["node"]
},

"include": ["src/**/*"],
Expand Down
4 changes: 2 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/ClientAuthentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import type {
ISessionInternalInfo,
AuthorizationRequestState,
} from "@inrupt/solid-client-authn-core";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";

/**
* @hidden
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/Session.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import type { ISessionInfo } from "@inrupt/solid-client-authn-core";
import { EVENTS } from "@inrupt/solid-client-authn-core";
// eslint-disable-next-line import/no-unresolved
import { mockStorage } from "@inrupt/solid-client-authn-core/mocks";
import type EventEmitter from "events";
import type EventEmitter from "node:events";
import type { SessionTokenSet } from "core";
import { mockClientAuthentication } from "./__mocks__/ClientAuthentication";
import type ClientAuthentication from "./ClientAuthentication";
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
getWebidFromTokenPayload,
} from "@inrupt/solid-client-authn-core";
import { v4 } from "uuid";
import EventEmitter from "events";
import EventEmitter from "node:events";
import { exportJWK } from "jose";
import type ClientAuthentication from "./ClientAuthentication";
import { getClientAuthenticationWithDependencies } from "./dependencies";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import type {
SessionConfig,
} from "@inrupt/solid-client-authn-core";
import { AggregateHandler } from "@inrupt/solid-client-authn-core";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";

/**
* @hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {

import { URL } from "url";
import { Issuer } from "openid-client";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import { configToIssuerMetadata } from "../IssuerConfigFetcher";
import { asDPoPInput } from "../../../util/dpopInput";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import {
} from "@inrupt/solid-client-authn-core";
import type { JWK, CryptoKey as JoseCryptoKey } from "jose";
import { importJWK } from "jose";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";

function validateOptions(
oidcLoginOptions: IOidcOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/login/oidc/refresh/TokenRefresher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
} from "@inrupt/solid-client-authn-core";
import type { IssuerMetadata, TokenSet } from "openid-client";
import { Issuer } from "openid-client";
import type { EventEmitter } from "events";
import type { EventEmitter } from "node:events";
import { configToIssuerMetadata } from "../IssuerConfigFetcher";
import { negotiateClientSigningAlg } from "../ClientRegistrar";
import { asDPoPInput } from "../../../util/dpopInput";
Expand Down
4 changes: 3 additions & 1 deletion packages/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

"compilerOptions": {
"lib": ["es2022"],
"outDir": "./dist"
"rootDir": "./src",
"outDir": "./dist",
"types": ["node"]
},

"include": ["src/**/*"],
Expand Down
6 changes: 4 additions & 2 deletions packages/oidc-browser/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

"compilerOptions": {
"lib": ["es2022", "dom"],
"outDir": "./dist"
"rootDir": "./src",
"outDir": "./dist",
"types": ["node"]
},

"typedocOptions": {
Expand All @@ -13,5 +15,5 @@
},

"include": ["src/**/*"],
"exclude": ["*.spec.ts"]
"exclude": ["src/**/*.spec.ts", "**/__mocks__/*"]
}
7 changes: 5 additions & 2 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
"./jest.config.ts"
],
"compilerOptions": {
"module": "commonjs",
"module": "preserve",
"strict": true,
"declaration": true,
"noImplicitAny": true,
"esModuleInterop": true,
"target": "es2022",
"sourceMap": true,
"lib": ["es2022", "dom"],
"moduleResolution": "node",
// "bundler" resolution matches how the Rollup build resolves modules, and
// "module": "preserve" leave module syntax untouched for the bundler to
// handle. See https://aka.ms/ts6.
"moduleResolution": "bundler",
"resolveJsonModule": true,
"outDir": "./dist",
// This is required to transform native ESM from our dependencies using ts-jest.
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"extends": "./tsconfig.build.json",

"compilerOptions": {
"baseUrl": "./packages",
"paths": {
"*": ["*/src"]
"*": ["./packages/*/src"]
}
}
}
Loading