Skip to content

Commit

Permalink
chore: upgrade pacakges
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun authored and charIeszhao committed Sep 9, 2022
1 parent edb831d commit dfc8277
Show file tree
Hide file tree
Showing 22 changed files with 1,066 additions and 927 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@commitlint/types": "^17.0.0",
"husky": "^8.0.0",
"lerna": "^5.0.0",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"workspaces": {
"packages": [
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 @@ -14,19 +14,19 @@
"@logto/browser": "^1.0.0-beta.3"
},
"devDependencies": {
"@parcel/core": "^2.6.2",
"@parcel/transformer-sass": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/transformer-sass": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/eslint-config-react": "^1.0.0",
"buffer": "^6.0.3",
"eslint": "^8.23.0",
"lint-staged": "^13.0.0",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"postcss": "^8.4.6",
"prettier": "^2.7.1",
"process": "^0.11.10",
"stylelint": "^14.11.0",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"eslintConfig": {
"extends": "@silverhand",
Expand Down
10 changes: 5 additions & 5 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@parcel/core": "^2.6.2",
"@parcel/packager-ts": "^2.6.2",
"@parcel/transformer-typescript-types": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
"@types/jest": "^27.4.0",
Expand All @@ -47,11 +47,11 @@
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"node-fetch": "^2.6.7",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"prettier": "^2.7.1",
"text-encoder": "^0.0.4",
"ts-jest": "^27.0.4",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
10 changes: 5 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@parcel/core": "^2.6.2",
"@parcel/packager-ts": "^2.6.2",
"@parcel/transformer-typescript-types": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
"@types/jest": "^27.4.1",
Expand All @@ -53,12 +53,12 @@
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"nock": "^13.1.3",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"prettier": "^2.7.1",
"text-encoder": "^0.0.4",
"ts-jest": "^27.0.4",
"type-fest": "^2.10.0",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Nullable } from '@silverhand/essentials';

export type StorageKey = 'idToken' | 'refreshToken' | 'accessToken' | 'signInSession';

export interface Storage {
export type Storage = {
getItem(key: StorageKey): Promise<Nullable<string>>;
setItem(key: StorageKey, value: string): Promise<void>;
removeItem(key: StorageKey): Promise<void>;
}
};

export type Navigate = (url: string) => void;

Expand Down
2 changes: 1 addition & 1 deletion packages/express-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"postcss-modules": "^4.3.0",
"prettier": "^2.7.1",
"ts-node": "^10.9.1",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
10 changes: 5 additions & 5 deletions packages/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@parcel/core": "^2.6.2",
"@parcel/packager-ts": "^2.6.2",
"@parcel/transformer-typescript-types": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
"@silverhand/ts-config-react": "^1.0.0",
Expand All @@ -52,11 +52,11 @@
"jest-location-mock": "^1.0.9",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"prettier": "^2.7.1",
"supertest": "^6.2.4",
"ts-jest": "^27.0.4",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"peerDependencies": {
"express": ">=4"
Expand Down
2 changes: 2 additions & 0 deletions packages/express/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { LogtoConfig } from '@logto/node';

declare module 'http' {
// Honor module definition
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface IncomingMessage {
session: Record<string, string | undefined>;
}
Expand Down
10 changes: 5 additions & 5 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@parcel/core": "^2.6.2",
"@parcel/packager-ts": "^2.6.2",
"@parcel/transformer-typescript-types": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
"@types/jest": "^27.4.1",
Expand All @@ -50,12 +50,12 @@
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"nock": "^13.1.3",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"prettier": "^2.7.1",
"text-encoder": "^0.0.4",
"ts-jest": "^27.0.4",
"type-fest": "^2.10.0",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
8 changes: 1 addition & 7 deletions packages/js/src/utils/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,5 @@ export class LogtoRequestError extends Error {
}

export class OidcError {
error: string;
errorDescription?: string;

constructor(error: string, errorDescription?: string) {
this.error = error;
this.errorDescription = errorDescription;
}
constructor(public error: string, public errorDescription?: string) {}
}
2 changes: 1 addition & 1 deletion packages/next-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"postcss-modules": "^4.3.0",
"prettier": "^2.7.1",
"stylelint": "^14.11.0",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"stylelint": {
"extends": "@silverhand/eslint-config-react/.stylelintrc"
Expand Down
10 changes: 5 additions & 5 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@parcel/core": "^2.6.2",
"@parcel/packager-ts": "^2.6.2",
"@parcel/transformer-typescript-types": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
"@silverhand/ts-config-react": "^1.0.0",
Expand All @@ -48,12 +48,12 @@
"lint-staged": "^13.0.0",
"next": "^12.2.2",
"next-test-api-route-handler": "^3.1.6",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"prettier": "^2.7.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"ts-jest": "^27.0.4",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"peerDependencies": {
"next": ">=12"
Expand Down
2 changes: 2 additions & 0 deletions packages/next/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { NextApiRequest } from 'next';
export type NextRequestWithIronSession = NextApiRequest & { session: IronSession };

declare module 'iron-session' {
// Honor module definition
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface IronSessionData {
accessToken?: string;
idToken?: string;
Expand Down
10 changes: 5 additions & 5 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@parcel/core": "^2.6.2",
"@parcel/packager-ts": "^2.6.2",
"@parcel/transformer-typescript-types": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
"@types/jest": "^27.4.0",
Expand All @@ -47,10 +47,10 @@
"jest-location-mock": "^1.0.9",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^13.0.0",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"prettier": "^2.7.1",
"ts-jest": "^27.0.4",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"eslintConfig": {
"extends": "@silverhand"
Expand Down
2 changes: 2 additions & 0 deletions packages/node/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { IdTokenClaims } from '@logto/client';

declare module 'http' {
// Honor module definition
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface IncomingMessage {
user: LogtoContext;
}
Expand Down
8 changes: 4 additions & 4 deletions packages/react-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"react-router-dom": "^6.2.2"
},
"devDependencies": {
"@parcel/core": "^2.6.2",
"@parcel/transformer-sass": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/transformer-sass": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/eslint-config-react": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
Expand All @@ -29,12 +29,12 @@
"@types/react-router-dom": "^5.3.3",
"eslint": "^8.23.0",
"lint-staged": "^13.0.0",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"postcss": "^8.4.6",
"postcss-modules": "^4.3.0",
"prettier": "^2.7.1",
"stylelint": "^14.11.0",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"eslintConfig": {
"extends": "@silverhand/react"
Expand Down
10 changes: 5 additions & 5 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@parcel/core": "^2.6.2",
"@parcel/packager-ts": "^2.6.2",
"@parcel/transformer-typescript-types": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/eslint-config-react": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
Expand All @@ -47,13 +47,13 @@
"eslint": "^8.23.0",
"jest": "^27.5.1",
"lint-staged": "^13.0.0",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"postcss": "^8.4.6",
"prettier": "^2.7.1",
"react": "^17.0.2",
"stylelint": "^14.11.0",
"ts-jest": "^27.0.4",
"typescript": "^4.8.2"
"typescript": "4.7.4"
},
"peerDependencies": {
"react": ">=16.8.0"
Expand Down
8 changes: 5 additions & 3 deletions packages/react/src/hooks/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-empty-function */
import LogtoClient from '@logto/browser';
import { renderHook, act } from '@testing-library/react-hooks';
import { ComponentType } from 'react';
Expand All @@ -7,7 +8,7 @@ import { LogtoProvider } from '../provider';

const isAuthenticated = jest.fn(() => false);
const isSignInRedirected = jest.fn(() => false);
const handleSignInCallback = jest.fn(async () => Promise.resolve());
const handleSignInCallback = jest.fn(async () => 0);
const getAccessToken = jest.fn(() => {
throw new Error('not authenticated');
});
Expand All @@ -19,8 +20,8 @@ jest.mock('@logto/browser', () => {
isSignInRedirected,
handleSignInCallback,
getAccessToken,
signIn: jest.fn(async () => Promise.resolve()),
signOut: jest.fn(async () => Promise.resolve()),
signIn: jest.fn(async () => {}),
signOut: jest.fn(async () => {}),
};
});
});
Expand Down Expand Up @@ -110,3 +111,4 @@ describe('useLogto', () => {
});
});
});
/* eslint-enable @typescript-eslint/no-empty-function */
2 changes: 1 addition & 1 deletion packages/vue-sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"eslint-plugin-vue": "^9.1.1",
"lint-staged": "^13.0.0",
"prettier": "^2.7.1",
"typescript": "^4.8.2",
"typescript": "4.7.4",
"vite": "^3.0.0",
"vue-tsc": "^0.40.0"
}
Expand Down
10 changes: 5 additions & 5 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@parcel/core": "^2.6.2",
"@parcel/packager-ts": "^2.6.2",
"@parcel/transformer-typescript-types": "^2.6.2",
"@parcel/core": "^2.7.0",
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@silverhand/eslint-config": "^1.0.0",
"@silverhand/ts-config": "^1.0.0",
"@types/jest": "^27.4.1",
"eslint": "^8.23.0",
"jest": "^27.5.1",
"lint-staged": "^13.0.0",
"parcel": "^2.6.2",
"parcel": "^2.7.0",
"postcss": "^8.4.6",
"prettier": "^2.7.1",
"stylelint": "^14.11.0",
"ts-jest": "^27.0.4",
"typescript": "^4.8.2",
"typescript": "4.7.4",
"vue": "^3.2.35"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit dfc8277

Please sign in to comment.