Skip to content

Commit

Permalink
chore(deps): update silverhand configs to v4 (#523)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency @silverhand/eslint-config to v4

* chore: upgrade configs and packages

* chore: fix lint errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gao Sun <gao@silverhand.io>
  • Loading branch information
renovate[bot] and gao-sun committed Jul 8, 2023
1 parent 560a39c commit 58c66c6
Show file tree
Hide file tree
Showing 22 changed files with 538 additions and 639 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
]
},
"pnpm": {
"overrides": {
"eslint-plugin-prettier": "^5.0.0-alpha.2"
},
"peerDependencyRules": {
"allowedVersions": {
"typescript": "^5.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/browser-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"devDependencies": {
"@parcel/core": "^2.9.2",
"@parcel/transformer-sass": "^2.9.2",
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/eslint-config-react": "^3.0.1",
"eslint": "^8.38.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/eslint-config-react": "^4.0.1",
"eslint": "^8.44.0",
"lint-staged": "^13.0.0",
"parcel": "^2.9.2",
"postcss": "^8.4.6",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"stylelint": "^15.0.0",
"typescript": "^5.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
"js-base64": "^3.7.4"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@swc/core": "^1.3.50",
"@swc/jest": "^0.2.24",
"@types/jest": "^29.5.0",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"text-encoder": "^0.0.4",
"typescript": "^5.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@
"jose": "^4.13.2"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@swc/core": "^1.3.50",
"@swc/jest": "^0.2.24",
"@types/jest": "^29.5.0",
"@types/node": "^18.0.0",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"nock": "^13.3.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"text-encoder": "^0.0.4",
"type-fest": "^3.0.0",
"typescript": "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const createAdapters = (withCache = false) =>
generateCodeChallenge,
generateCodeVerifier,
generateState,
} satisfies Partial<Record<keyof LogtoClient['adapter'], unknown>>);
}) satisfies Partial<Record<keyof LogtoClient['adapter'], unknown>>;

export const createClient = (prompt?: Prompt, storage = new MockedStorage(), withCache = false) =>
new LogtoClientWithAccessors(
Expand Down
5 changes: 4 additions & 1 deletion packages/client/src/remote-jwk-set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ function isJwkSetLike(jwkSet: unknown): jwkSet is JSONWebKeySet {
export class CachedRemoteJwkSet {
protected jwkSet?: JSONWebKeySet;

constructor(public readonly url: URL, private readonly adapter: ClientAdapterInstance) {
constructor(
public readonly url: URL,
private readonly adapter: ClientAdapterInstance
) {
if (!adapter.unstable_cache) {
throw new Error(
"No cache found in the client adapter. Use `createRemoteJWKSet()` from 'jose' instead."
Expand Down
8 changes: 4 additions & 4 deletions packages/express-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
"express-session": "^1.17.3"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@types/cookie-parser": "^1.4.3",
"@types/express": "^4.17.13",
"@types/express-session": "^1.17.5",
"@types/node": "^18.6.1",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"lint-staged": "^13.0.0",
"postcss": "^8.4.6",
"postcss-modules": "^6.0.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},
"eslintConfig": {
Expand Down
10 changes: 5 additions & 5 deletions packages/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"@logto/node": "workspace:^2.1.1"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/ts-config-react": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@silverhand/ts-config-react": "^4.0.0",
"@swc/core": "^1.3.50",
"@swc/jest": "^0.2.24",
"@types/cookie-parser": "^1.4.3",
Expand All @@ -46,14 +46,14 @@
"@types/jest": "^29.5.0",
"@types/supertest": "^2.0.12",
"cookie-parser": "^1.4.6",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"express": "^4.18.1",
"express-session": "^1.17.3",
"jest": "^29.5.0",
"jest-location-mock": "^1.0.9",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"supertest": "^6.3.3",
"typescript": "^5.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@
"jose": "^4.13.2"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@swc/core": "^1.3.50",
"@swc/jest": "^0.2.24",
"@types/jest": "^29.5.1",
"@types/node": "^18.0.0",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"nock": "^13.3.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"rollup": "^3.20.2",
"text-encoder": "^0.0.4",
"type-fest": "^3.0.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/js/src/utils/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ export class LogtoRequestError extends Error {
}

export class OidcError {
constructor(public error: string, public errorDescription?: string) {}
constructor(
public error: string,
public errorDescription?: string
) {}
}
12 changes: 6 additions & 6 deletions packages/next-app-dir-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
"server-only": "^0.0.1"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/eslint-config-react": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/ts-config-react": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/eslint-config-react": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@silverhand/ts-config-react": "^4.0.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/react-router-dom": "^5.3.3",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"lint-staged": "^13.0.0",
"postcss": "^8.4.6",
"postcss-modules": "^6.0.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"stylelint": "^15.0.0",
"typescript": "^5.0.0"
},
Expand Down
12 changes: 6 additions & 6 deletions packages/next-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
"swr": "^2.0.0"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/eslint-config-react": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/ts-config-react": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/eslint-config-react": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@silverhand/ts-config-react": "^4.0.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/react-router-dom": "^5.3.3",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"lint-staged": "^13.0.0",
"postcss": "^8.4.6",
"postcss-modules": "^6.0.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"stylelint": "^15.0.0",
"typescript": "^5.0.0"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@
"iron-session": "^6.3.1"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/ts-config-react": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@silverhand/ts-config-react": "^4.0.0",
"@swc/core": "^1.3.50",
"@swc/jest": "^0.2.24",
"@types/jest": "^29.5.0",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest-location-mock": "^1.0.9",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"next": "^13.0.4",
"next-test-api-route-handler": "^3.1.6",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.0.0"
Expand Down
5 changes: 4 additions & 1 deletion packages/next/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import type { Adapters, LogtoNextConfig } from './types';
export default class LogtoNextBaseClient {
protected navigateUrl?: string;
protected storage?: NextStorage;
constructor(protected readonly config: LogtoNextConfig, protected readonly adapters: Adapters) {}
constructor(
protected readonly config: LogtoNextConfig,
protected readonly adapters: Adapters
) {}

protected createNodeClient(session: IronSession) {
this.storage = new NextStorage(session);
Expand Down
8 changes: 4 additions & 4 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@
"node-fetch": "^2.6.7"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@swc/core": "^1.3.7",
"@swc/jest": "^0.2.24",
"@types/jest": "^29.5.0",
"@types/node": "^18.15.11",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest-location-mock": "^1.0.9",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
},
"eslintConfig": {
Expand Down
12 changes: 6 additions & 6 deletions packages/react-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
"devDependencies": {
"@parcel/core": "^2.9.2",
"@parcel/transformer-sass": "^2.9.2",
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/eslint-config-react": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/ts-config-react": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/eslint-config-react": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@silverhand/ts-config-react": "^4.0.0",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@types/react-router-dom": "^5.3.3",
"buffer": "^6.0.3",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"lint-staged": "^13.0.0",
"parcel": "^2.9.2",
"postcss": "^8.4.6",
"postcss-modules": "^6.0.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"process": "^0.11.10",
"stylelint": "^15.0.0",
"typescript": "^5.0.0"
Expand Down
12 changes: 6 additions & 6 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@
"@silverhand/essentials": "^2.6.2"
},
"devDependencies": {
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/eslint-config-react": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/ts-config-react": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/eslint-config-react": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@silverhand/ts-config-react": "^4.0.0",
"@swc/core": "^1.3.50",
"@swc/jest": "^0.2.24",
"@testing-library/react": "^14.0.0",
"@types/jest": "^29.5.0",
"@types/react": "^18.2.0",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"lint-staged": "^13.0.0",
"postcss": "^8.4.6",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"react": "^18.0.2",
"stylelint": "^15.0.0",
"typescript": "^5.0.0"
Expand Down
5 changes: 3 additions & 2 deletions packages/react/src/hooks/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ const appId = 'foo';

const createHookWrapper =
() =>
({ children }: { children?: ReactNode }) =>
<LogtoProvider config={{ endpoint, appId }}>{children}</LogtoProvider>;
({ children }: { children?: ReactNode }) => (
<LogtoProvider config={{ endpoint, appId }}>{children}</LogtoProvider>
);

describe('useLogto', () => {
afterEach(() => {
Expand Down
10 changes: 5 additions & 5 deletions packages/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@remix-run/node": "^1.7.2",
"@silverhand/eslint-config": "^3.0.1",
"@silverhand/ts-config": "^3.0.0",
"@silverhand/ts-config-react": "^3.0.0",
"@silverhand/eslint-config": "^4.0.1",
"@silverhand/ts-config": "^4.0.0",
"@silverhand/ts-config-react": "^4.0.0",
"@swc/core": "^1.3.50",
"@swc/jest": "^0.2.24",
"@tsconfig/recommended": "^1.0.1",
"@types/jest": "^29.1.2",
"@types/node": "^18.8.3",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest-location-mock": "^1.0.9",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.3",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"react": "^18.0.2",
"react-dom": "^18.0.2",
"typescript": "^5.0.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/vue-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"@types/node": "^18.0.0",
"@vitejs/plugin-vue": "^4.1.0",
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.38.0",
"eslint": "^8.44.0",
"eslint-plugin-vue": "^9.10.0",
"lint-staged": "^13.0.0",
"prettier": "^2.8.7",
"prettier": "^3.0.0",
"typescript": "^5.0.0",
"vite": "^4.2.1",
"vue-tsc": "^1.2.0"
Expand Down
Loading

0 comments on commit 58c66c6

Please sign in to comment.