Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump typescript from 5.2.2 to 5.6.2 #667

Merged
merged 8 commits into from
Oct 1, 2024
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
4 changes: 2 additions & 2 deletions apps/studio/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ const LoginStateDecorator: Decorator<Args> = (story, { parameters }) => {

const setHasLoginStateFlag = useCallback(() => {
setLoginStateFlag(true)
}, [setLoginStateFlag])
}, [])

const removeLoginStateFlag = useCallback(() => {
setLoginStateFlag(false)
}, [setLoginStateFlag])
}, [])

return (
<LoginStateContext.Provider
Expand Down
3 changes: 0 additions & 3 deletions apps/studio/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// @ts-expect-error typescript somehow cannot find types
import baseConfig, { restrictEnvAccess } from "@isomer/eslint-config/base"
// @ts-expect-error typescript somehow cannot find types
import nextjsConfig from "@isomer/eslint-config/nextjs"
// @ts-expect-error typescript somehow cannot find types
import reactConfig from "@isomer/eslint-config/react"

/** @type {import('typescript-eslint').Config} */
Expand Down
4 changes: 2 additions & 2 deletions apps/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
"@storybook/react": "8.3.3",
"@storybook/test": "8.3.3",
"@types/lodash": "^4.17.7",
"@types/node": "^20.14.5",
"@types/node": "^22.5.5",
"@types/pg": "^8.11.6",
"@types/react": "^18.3.3",
"@types/validator": "^13.11.7",
Expand All @@ -181,7 +181,7 @@
"storybook": "8.3.3",
"tailwindcss": "^3.4.4",
"tsx": "^4.16.0",
"typescript": "5.2.2",
"typescript": "5.6.2",
"vite": "^5.3.3",
"vitest": "^2.1.1",
"webpack-cli": "^5.1.4",
Expand Down
2 changes: 1 addition & 1 deletion apps/studio/prisma/generate.cts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const HEADER = [
ts.addSyntheticLeadingComment(
KYSELY_IMPORT,
ts.SyntaxKind.SingleLineCommentTrivia,
"THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT MANUALLY.",
" THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT MANUALLY.",
karrui marked this conversation as resolved.
Show resolved Hide resolved
true,
),
GENERATED_IMPORT,
Expand Down
2 changes: 1 addition & 1 deletion apps/studio/prisma/generated/selectableTypes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT MANUALLY.
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT MANUALLY.
import { type Selectable } from "kysely"

import type * as T from "./generatedTypes"
Expand Down
75 changes: 39 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"tailwindcss": "^3.4.4",
"tsc-alias": "^1.8.10",
"tslib": "^2.6.3",
"typescript": "5.2.2",
"typescript": "5.6.2",
"vite": "^5.3.3"
},
"main": "dist/cjs/index.js",
Expand Down Expand Up @@ -95,7 +95,7 @@
"@govtechsg/sgds": "^2.3.3",
"@govtechsg/sgds-react": "^2.5.1",
"@headlessui/react": "^2.1.2",
"@sinclair/typebox": "^0.32.34",
"@sinclair/typebox": "^0.33.12",
"interweave": "^13.1.0",
"interweave-ssr": "^2.0.0",
"isomorphic-dompurify": "^2.12.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ export const getAvailableFilters = (

items.forEach(({ category, variant, lastUpdated }) => {
// Step 1: Get all available categories
if (category in categories) {
if (categories[category]) {
categories[category] += 1
} else {
categories[category] = 1
}

// Step 2: Get all available variants
if (variant in variants) {
if (variants[variant]) {
variants[variant] += 1
} else {
variants[variant] = 1
Expand All @@ -26,7 +26,7 @@ export const getAvailableFilters = (
// Step 3: Get all available years
if (lastUpdated) {
const year = new Date(lastUpdated).getFullYear().toString()
if (year in years) {
if (years[year]) {
years[year] += 1
} else {
years[year] = 1
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/types/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const LinkRefSchema = Type.Object(
},
)

export const IsomerPageSchema = Type.Intersect([
export const IsomerPageSchema = Type.Composite([
BaseItemSchema,
Type.Union([
ArticlePageSchema,
Expand Down
22 changes: 10 additions & 12 deletions tooling/eslint/nextjs.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { fixupPluginRules } from "@eslint/compat"
import nextPlugin from "@next/eslint-plugin-next"
import tseslint from "typescript-eslint"

/** @type {import('typescript-eslint').Config} */
export default [
{
files: ["**/*.ts", "**/*.tsx"],
plugins: {
"@next/next": fixupPluginRules(nextPlugin),
},
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs["core-web-vitals"].rules,
},
export default tseslint.config({
files: ["**/*.ts", "**/*.tsx"],
plugins: {
"@next/next": fixupPluginRules(nextPlugin),
},
]
rules: {
...nextPlugin.configs.recommended.rules,
...nextPlugin.configs["core-web-vitals"].rules,
},
})
2 changes: 1 addition & 1 deletion tooling/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-react-hooks": "beta",
"prettier": "^3.3.3",
"typescript": "5.2.2",
"typescript": "5.6.2",
"typescript-eslint": "^8.6.0"
},
"prettier": "@isomer/prettier-config",
Expand Down
32 changes: 15 additions & 17 deletions tooling/eslint/react.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import reactPlugin from "eslint-plugin-react"
import hooksPlugin from "eslint-plugin-react-hooks"
import tseslint from "typescript-eslint"

/** @type {import('typescript-eslint').Config} */
export default [
{
files: ["**/*.ts", "**/*.tsx"],
plugins: {
react: reactPlugin,
"react-hooks": hooksPlugin,
},
rules: {
...reactPlugin.configs["jsx-runtime"].rules,
...hooksPlugin.configs.recommended.rules,
},
languageOptions: {
globals: {
React: "writable",
},
export default tseslint.config({
files: ["**/*.ts", "**/*.tsx"],
plugins: {
react: reactPlugin,
"react-hooks": hooksPlugin,
},
rules: {
...reactPlugin.configs["jsx-runtime"].rules,
...hooksPlugin.configs.recommended.rules,
},
languageOptions: {
globals: {
React: "writable",
},
},
]
})
2 changes: 1 addition & 1 deletion tooling/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@isomer/tsconfig": "*",
"typescript": "5.2.2"
"typescript": "5.6.2"
},
"prettier": "@isomer/prettier-config"
}
2 changes: 1 addition & 1 deletion tooling/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"@isomer/tsconfig": "*",
"eslint": "^9.10.0",
"prettier": "^3.3.3",
"typescript": "5.2.2"
"typescript": "5.6.2"
}
}
3 changes: 0 additions & 3 deletions tooling/template/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// @ts-expect-error typescript somehow cannot find types
import baseConfig from "@isomer/eslint-config/base"
// @ts-expect-error typescript somehow cannot find types
import nextjsConfig from "@isomer/eslint-config/nextjs"
// @ts-expect-error typescript somehow cannot find types
import reactConfig from "@isomer/eslint-config/react"

/** @type {import('typescript-eslint').Config} */
Expand Down
4 changes: 2 additions & 2 deletions tooling/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"next": "^14.2.13",
"postcss": "^8.4.39",
"tailwindcss": "^3.4.4",
"typescript": "5.2.2"
"typescript": "5.6.2"
},
"devDependencies": {
"@isomer/eslint-config": "*",
"@isomer/prettier-config": "*",
"@isomer/tsconfig": "*",
"@types/node": "^20.14.5"
"@types/node": "^22.5.5"
},
"prettier": "@isomer/prettier-config"
}
Loading