Skip to content

Commit

Permalink
chore(deps): upgrade TypeScript (logto-io#5141)
Browse files Browse the repository at this point in the history
* chore(deps): upgrade TypeScript

* chore: upgrade configs

* chore: fix tsconfig and add changeset

* chore: upgrade jest-related deps and fix code
  • Loading branch information
gao-sun authored Dec 22, 2023
1 parent 9faa984 commit 9089dbf
Show file tree
Hide file tree
Showing 24 changed files with 1,221 additions and 868 deletions.
51 changes: 51 additions & 0 deletions .changeset/old-turkeys-beg.md
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions packages/app-insights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions packages/connectors/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@
"@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",
"prettier": "^3.0.0",
"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"
Expand Down
2 changes: 1 addition & 1 deletion packages/connectors/templates/preset/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "@silverhand/ts-config/tsconfig.base",
"compilerOptions": {
"moduleResolution": "nodenext",
"module": "esnext",
"module": "nodenext",
"outDir": "lib",
"baseUrl": "."
}
Expand Down
12 changes: 6 additions & 6 deletions packages/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion packages/console/src/consts/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
1 change: 0 additions & 1 deletion packages/console/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@silverhand/ts-config-react/tsconfig.base",
"compilerOptions": {
"moduleResolution": "bundler",
"baseUrl": "./",
"paths": {
"@/*": ["./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 @@ -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",
Expand All @@ -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",
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions packages/demo-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
12 changes: 6 additions & 6 deletions packages/experience/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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"
},
Expand Down
1 change: 0 additions & 1 deletion packages/experience/src/constants/env.ts
Original file line number Diff line number Diff line change
@@ -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) ||
Expand Down
1 change: 0 additions & 1 deletion packages/experience/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@silverhand/ts-config-react/tsconfig.base",
"compilerOptions": {
"moduleResolution": "bundler",
"baseUrl": "./",
"paths": {
"@/*": [
Expand Down
8 changes: 4 additions & 4 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions packages/phrases-experience/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions packages/phrases/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions packages/schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@
"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",
"@types/pluralize": "^0.0.33",
"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",
Expand Down
Loading

0 comments on commit 9089dbf

Please sign in to comment.