0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

chore(deps): upgrade TypeScript (#5141)

* chore(deps): upgrade TypeScript

* chore: upgrade configs

* chore: fix tsconfig and add changeset

* chore: upgrade jest-related deps and fix code
This commit is contained in:
Gao Sun 2023-12-22 15:16:49 +08:00 committed by GitHub
parent 9faa9841c5
commit 9089dbf845
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1223 additions and 870 deletions

View file

@ -0,0 +1,51 @@
---
"@logto/connector-kit": patch
"@logto/language-kit": patch
"@logto/phrases-experience": patch
"@logto/integration-tests": patch
"@logto/core-kit": patch
"@logto/app-insights": patch
"@logto/experience": patch
"@logto/demo-app": patch
"@logto/console": patch
"@logto/phrases": patch
"@logto/schemas": patch
"@logto/shared": patch
"@logto/core": patch
"@logto/cli": patch
"@logto/connector-alipay-native": patch
"@logto/connector-alipay-web": patch
"@logto/connector-aliyun-dm": patch
"@logto/connector-aliyun-sms": patch
"@logto/connector-apple": patch
"@logto/connector-aws-ses": patch
"@logto/connector-azuread": patch
"@logto/connector-discord": patch
"@logto/connector-facebook": patch
"@logto/connector-feishu-web": patch
"@logto/connector-github": patch
"@logto/connector-google": patch
"@logto/connector-kakao": patch
"@logto/connector-logto-email": patch
"@logto/connector-logto-sms": patch
"@logto/connector-logto-social-demo": patch
"@logto/connector-mailgun": patch
"@logto/connector-mock-email": patch
"@logto/connector-mock-standard-email": patch
"@logto/connector-mock-sms": patch
"@logto/connector-mock-social": patch
"@logto/connector-naver": patch
"@logto/connector-oauth": patch
"@logto/connector-oidc": patch
"@logto/connector-saml": patch
"@logto/connector-sendgrid-email": patch
"@logto/connector-smsaero": patch
"@logto/connector-smtp": patch
"@logto/connector-tencent-sms": patch
"@logto/connector-twilio-sms": patch
"@logto/connector-wechat-native": patch
"@logto/connector-wechat-web": patch
"@logto/create": patch
---
upgrade TypeScript to 5.3.3

View file

@ -33,21 +33,21 @@
"prepack": "pnpm build"
},
"devDependencies": {
"@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",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/eslint-config-react": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@silverhand/ts-config-react": "5.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"@types/react": "^18.0.31",
"eslint": "^8.44.0",
"history": "^5.3.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"react": "^18.0.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"engines": {
"node": "^20.9.0"

View file

@ -69,13 +69,13 @@
"slonik-interceptor-preset": "^1.2.10",
"slonik-sql-tag-raw": "^1.1.4",
"tar": "^6.1.11",
"typescript": "^5.0.0",
"typescript": "^5.3.3",
"yargs": "^17.6.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@silverhand/eslint-config": "4.0.1",
"@silverhand/ts-config": "4.0.0",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@withtyped/server": "^0.12.9",
"@types/inquirer": "^9.0.0",
"@types/jest": "^29.4.0",
@ -85,7 +85,7 @@
"@types/tar": "^6.1.2",
"@types/yargs": "^17.0.13",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"sinon": "^17.0.0"

View file

@ -34,13 +34,13 @@
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-typescript": "^11.0.0",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/ts-config": "4.0.0",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"@types/supertest": "^2.0.11",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"jest-matcher-specific-error": "^1.0.0",
"lint-staged": "^15.0.0",
"nock": "^13.2.2",
@ -48,7 +48,7 @@
"rollup": "^4.0.0",
"rollup-plugin-summary": "^2.0.0",
"supertest": "^6.2.2",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"engines": {
"node": "^20.9.0"

View file

@ -2,7 +2,7 @@
"extends": "@silverhand/ts-config/tsconfig.base",
"compilerOptions": {
"moduleResolution": "nodenext",
"module": "esnext",
"module": "nodenext",
"outDir": "lib",
"baseUrl": "."
}

View file

@ -42,11 +42,11 @@
"@parcel/transformer-mdx": "2.9.3",
"@parcel/transformer-sass": "2.9.3",
"@parcel/transformer-svg-react": "2.9.3",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/eslint-config-react": "4.0.1",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/eslint-config-react": "5.0.0",
"@silverhand/essentials": "^2.8.4",
"@silverhand/ts-config": "4.0.0",
"@silverhand/ts-config-react": "4.0.0",
"@silverhand/ts-config": "5.0.0",
"@silverhand/ts-config-react": "5.0.0",
"@swc/core": "^1.3.52",
"@swc/jest": "^0.2.26",
"@testing-library/react": "^14.0.0",
@ -76,7 +76,7 @@
"i18next": "^22.4.15",
"i18next-browser-languagedetector": "^7.0.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.0.0",
"jest-transform-stub": "^2.0.0",
"jest-transformer-svg": "^2.0.0",
@ -118,7 +118,7 @@
"swr": "^2.2.0",
"titleize": "^4.0.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"typescript": "^5.3.3",
"zod": "^3.22.4"
},
"engines": {

View file

@ -4,6 +4,5 @@ import { yes } from '@silverhand/essentials';
export const isProduction = process.env.NODE_ENV === 'production';
export const isCloud = yes(process.env.IS_CLOUD);
export const adminEndpoint = process.env.ADMIN_ENDPOINT;
// eslint-disable-next-line unicorn/prevent-abbreviations -- we love dev
export const isDevFeaturesEnabled =
!isProduction || yes(process.env.DEV_FEATURES_ENABLED) || yes(process.env.INTEGRATION_TEST);

View file

@ -1,7 +1,6 @@
{
"extends": "@silverhand/ts-config-react/tsconfig.base",
"compilerOptions": {
"moduleResolution": "bundler",
"baseUrl": "./",
"paths": {
"@/*": ["./src/*"],

View file

@ -94,8 +94,8 @@
},
"devDependencies": {
"@logto/cloud": "0.2.5-5deb133",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/ts-config": "4.0.0",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@types/debug": "^4.1.7",
"@types/etag": "^1.8.1",
"@types/jest": "^29.4.0",
@ -114,7 +114,7 @@
"@types/sinon": "^10.0.13",
"@types/supertest": "^2.0.11",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"jest-matcher-specific-error": "^1.0.0",
"jsonc-eslint-parser": "^2.4.0",
"lint-staged": "^15.0.0",
@ -124,7 +124,7 @@
"prettier": "^3.0.0",
"sinon": "^17.0.0",
"supertest": "^6.2.2",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"engines": {
"node": "^20.9.0"

View file

@ -142,9 +142,7 @@ async function handleSubmitRegister(
// Create tenant organization and assign the admin user to it.
// This is only for Cloud integration tests and data alignment, OSS still uses the legacy Management API user role.
const organizationId = getTenantOrganizationId(defaultTenantId);
// @ts-expect-error this notation should be no more needed after we upgrade TypeScript
await queries.organizations.relations.users.insert([organizationId, id]);
// @ts-expect-error this notation should be no more needed after we upgrade TypeScript
await queries.organizations.relations.rolesUsers.insert([
organizationId,
getTenantRole(TenantRole.Owner).id,

View file

@ -26,10 +26,10 @@
"@logto/schemas": "workspace:^1.2.3",
"@parcel/core": "2.9.3",
"@parcel/transformer-sass": "2.9.3",
"@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",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/eslint-config-react": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@silverhand/ts-config-react": "5.0.0",
"@types/react": "^18.0.31",
"@types/react-dom": "^18.0.0",
"buffer": "^5.7.1",
@ -45,7 +45,7 @@
"react-dom": "^18.0.0",
"react-i18next": "^12.3.1",
"stylelint": "^15.0.0",
"typescript": "^5.0.0",
"typescript": "^5.3.3",
"zod": "^3.22.4"
},
"engines": {

View file

@ -35,11 +35,11 @@
"@parcel/transformer-svg-react": "2.9.3",
"@react-spring/shared": "^9.6.1",
"@react-spring/web": "^9.6.1",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/eslint-config-react": "4.0.1",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/eslint-config-react": "5.0.0",
"@silverhand/essentials": "^2.8.4",
"@silverhand/ts-config": "4.0.0",
"@silverhand/ts-config-react": "4.0.0",
"@silverhand/ts-config": "5.0.0",
"@silverhand/ts-config-react": "5.0.0",
"@simplewebauthn/browser": "^8.3.1",
"@simplewebauthn/typescript-types": "^8.0.0",
"@swc/core": "^1.3.52",
@ -61,7 +61,7 @@
"i18next": "^22.4.15",
"i18next-browser-languagedetector": "^7.0.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.0.0",
"jest-transform-stub": "^2.0.0",
"jest-transformer-svg": "^2.0.0",
@ -88,7 +88,7 @@
"stylelint": "^15.0.0",
"superstruct": "^1.0.3",
"tiny-cookie": "^2.4.1",
"typescript": "^5.0.0",
"typescript": "^5.3.3",
"use-debounced-loader": "^0.1.1",
"zod": "^3.22.4"
},

View file

@ -1,6 +1,5 @@
import { yes } from '@silverhand/essentials';
// eslint-disable-next-line unicorn/prevent-abbreviations -- keep the same as in other packages
export const isDevFeaturesEnabled =
process.env.NODE_ENV !== 'production' ||
yes(process.env.DEV_FEATURES_ENABLED) ||

View file

@ -1,7 +1,6 @@
{
"extends": "@silverhand/ts-config-react/tsconfig.base",
"compilerOptions": {
"moduleResolution": "bundler",
"baseUrl": "./",
"paths": {
"@/*": [

View file

@ -30,16 +30,16 @@
"@logto/node": "^2.2.0",
"@logto/schemas": "workspace:^1.12.0",
"@logto/shared": "workspace:^3.0.0",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/essentials": "^2.8.4",
"@silverhand/ts-config": "4.0.0",
"@silverhand/ts-config": "5.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"dotenv": "^16.0.0",
"eslint": "^8.44.0",
"expect-puppeteer": "^9.0.0",
"got": "^13.0.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"jest-matcher-specific-error": "^1.0.0",
"jest-puppeteer": "^9.0.0",
"jose": "^5.0.0",
@ -49,7 +49,7 @@
"prettier": "^3.0.0",
"puppeteer": "^21.0.0",
"text-encoder": "^0.0.4",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"engines": {
"node": "^20.9.0"

View file

@ -41,13 +41,13 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@silverhand/eslint-config": "4.0.1",
"@silverhand/ts-config": "4.0.0",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"buffer": "^5.7.1",
"eslint": "^8.44.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"engines": {
"node": "^20.9.0"

View file

@ -40,12 +40,12 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@silverhand/eslint-config": "4.0.1",
"@silverhand/ts-config": "4.0.0",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"eslint": "^8.44.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": "@silverhand",

View file

@ -40,9 +40,9 @@
"node": "^20.9.0"
},
"devDependencies": {
"@silverhand/eslint-config": "4.0.1",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/essentials": "^2.8.4",
"@silverhand/ts-config": "4.0.0",
"@silverhand/ts-config": "5.0.0",
"@types/inquirer": "^9.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
@ -50,14 +50,14 @@
"camelcase": "^8.0.0",
"chalk": "^5.0.0",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"pluralize": "^8.0.0",
"prettier": "^3.0.0",
"roarr": "^7.11.0",
"slonik": "^30.0.0",
"slonik-sql-tag-raw": "^1.1.4",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": "@silverhand",

View file

@ -39,15 +39,15 @@
},
"devDependencies": {
"@logto/connector-kit": "workspace:^2.0.0",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/ts-config": "4.0.0",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"engines": {
"node": "^20.9.0"

View file

@ -46,16 +46,16 @@
},
"devDependencies": {
"@jest/types": "^29.0.3",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/ts-config": "4.0.0",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"engines": {
"node": "^20.9.0"

View file

@ -52,22 +52,22 @@
},
"devDependencies": {
"@jest/types": "^29.0.3",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/essentials": "^2.8.4",
"@silverhand/ts-config": "4.0.0",
"@silverhand/ts-config-react": "4.0.0",
"@silverhand/ts-config": "5.0.0",
"@silverhand/ts-config-react": "5.0.0",
"@types/color": "^3.0.3",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"@types/react": "^18.0.31",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"postcss": "^8.4.31",
"prettier": "^3.0.0",
"stylelint": "^15.0.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": "@silverhand"

View file

@ -1,3 +1,5 @@
import { type webcrypto } from 'node:crypto';
import { type DeepPartial } from '@silverhand/essentials';
import { z } from 'zod';
@ -149,7 +151,7 @@ export class PasswordPolicyChecker {
constructor(
policy: DeepPartial<PasswordPolicy>,
/** The Web Crypto API to use. By default, the global `crypto.subtle` will be used. */
protected readonly subtle: SubtleCrypto = crypto.subtle
protected readonly subtle: webcrypto.SubtleCrypto | SubtleCrypto = crypto.subtle
) {
this.policy = passwordPolicyGuard.parse(policy);
}

View file

@ -39,16 +39,16 @@
},
"devDependencies": {
"@jest/types": "^29.0.3",
"@silverhand/eslint-config": "4.0.1",
"@silverhand/ts-config": "4.0.0",
"@silverhand/eslint-config": "5.0.0",
"@silverhand/ts-config": "5.0.0",
"@types/jest": "^29.4.0",
"@types/node": "^20.9.5",
"eslint": "^8.44.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"lint-staged": "^15.0.0",
"prettier": "^3.0.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0"
"typescript": "^5.3.3"
},
"eslintConfig": {
"extends": "@silverhand"

File diff suppressed because it is too large Load diff