Skip to content

Commit

Permalink
feat: ts 5.5 (#87)
Browse files Browse the repository at this point in the history
* chore: updates deps & postcss esm config

* chore(ui): update radix ui deps

* chore: updates deps

* configDir stuff

* feat(tsconfig): configDir include/exclude

* fix(marketing): adds paths because vite doesn't support ts configDir yet

* fix(web): nextjs doesn't support configDir yet

* chore: adds a changeset

* feat: typesafe postcss config

* chore(ui): include .storybook folder in tsconfig
  • Loading branch information
ixahmedxi authored Jun 23, 2024
1 parent e786bf3 commit 51c0130
Show file tree
Hide file tree
Showing 44 changed files with 243 additions and 234 deletions.
20 changes: 20 additions & 0 deletions .changeset/afraid-drinks-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'@orbitkit/storybook': patch
'@orbitkit/tailwind': patch
'@orbitkit/tsconfig': patch
'@orbitkit/eslint': patch
'@orbitkit/vite': patch
'@orbitkit/marketing': patch
'@orbitkit/utils': patch
'@orbitkit/auth': patch
'@orbitkit/core': patch
'@orbitkit/api': patch
'@orbitkit/env': patch
'@orbitkit/db': patch
'@orbitkit/ui': patch
'@orbitkit/docs': patch
'@orbitkit/web': patch
'@orbitkit/assets': patch
---

feat: upgrades to TypeScript 5.5
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"ajv": "^8.16.0",
"mintlify": "^4.0.170"
"mintlify": "^4.0.171"
},
"volta": {
"extends": "../../package.json"
Expand Down
6 changes: 3 additions & 3 deletions apps/marketing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"@orbitkit/ui": "workspace:^",
"@t3-oss/env-core": "^0.10.1",
"@total-typescript/ts-reset": "^0.5.1",
"astro": "^4.10.3",
"posthog-js": "^1.139.3",
"astro": "^4.11.0",
"posthog-js": "^1.140.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"zod": "^3.23.8"
Expand All @@ -38,7 +38,7 @@
"@orbitkit/tailwind": "workspace:^",
"@orbitkit/tsconfig": "workspace:^",
"@playwright/test": "^1.44.1",
"@sentry/astro": "^8.10.0",
"@sentry/astro": "^8.11.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"autoprefixer": "^10.4.19",
Expand Down
6 changes: 0 additions & 6 deletions apps/marketing/postcss.config.cjs

This file was deleted.

9 changes: 9 additions & 0 deletions apps/marketing/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

export default config
17 changes: 3 additions & 14 deletions apps/marketing/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
{
"extends": ["astro/tsconfigs/strictest", "@orbitkit/tsconfig/base.json"],
"extends": ["astro/tsconfigs/strictest", "@orbitkit/tsconfig/react.json"],
"compilerOptions": {
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
"@/*": ["src/*"]
}
},
"include": [
"**/*.astro",
"**/*.ts",
"**/*.tsx",
"**/*.js",
"**/*.jsx",
"**/*.mjs",
"**/*.cjs"
],
"exclude": ["node_modules", "dist", "playwright-report", "test-results"]
}
}
4 changes: 2 additions & 2 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@orbitkit/env": "workspace:^",
"@orbitkit/ui": "workspace:^",
"@orbitkit/utils": "workspace:^",
"@sentry/nextjs": "^8.10.0",
"@sentry/nextjs": "^8.11.0",
"@t3-oss/env-nextjs": "^0.10.1",
"@tanstack/react-query": "^5.45.1",
"@total-typescript/ts-reset": "^0.5.1",
Expand All @@ -34,7 +34,7 @@
"geist": "^1.3.0",
"next": "14.2.4",
"next-themes": "^0.3.0",
"posthog-js": "^1.139.3",
"posthog-js": "^1.140.1",
"posthog-node": "^4.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
6 changes: 0 additions & 6 deletions apps/web/postcss.config.cjs

This file was deleted.

9 changes: 9 additions & 0 deletions apps/web/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

export default config
4 changes: 2 additions & 2 deletions apps/web/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const unkey =
rootKey: env.UNKEY_ROOT_KEY,
namespace: env.UNKEY_NAMESPACE,
limit: 10,
duration: '20s',
duration: '5s',
async: true,
})
: undefined
Expand All @@ -37,7 +37,7 @@ export default async function middleware(
const ratelimit = await unkey.limit(ip)

if (!ratelimit.success) {
return NextResponse.redirect(new URL('/blocked'))
return NextResponse.redirect(new URL('/blocked', request.url))
}
}

Expand Down
23 changes: 17 additions & 6 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
{
"extends": ["@orbitkit/tsconfig/next.json"],
"compilerOptions": {
"tsBuildInfoFile": "tsconfig.tsbuildinfo",
"plugins": [
{
"name": "next"
}
],
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
"@/*": ["src/*"]
}
},
"include": [
"next-env.d.ts",
".next/types/**/*.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"**/*.cts",
"**/*.ctsx",
"**/*.mts",
"**/*.mtsx",
"**/*.js",
"**/*.jsx",
"**/*.cjs",
"**/*.mjs"
],
"exclude": ["node_modules", "playwright-report", "test-results"]
"**/*.cjsx",
"**/*.mjs",
"**/*.mjsx"
]
}
Binary file modified bun.lockb
Binary file not shown.
42 changes: 23 additions & 19 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ words:
- acst
- aest
- akst
- Anson
- astro
- astrojs
- autodocs
Expand All @@ -23,9 +24,9 @@ words:
- bvaughn
- Byrom
- callees
- cjsx
- classname
- clsx
- tsup
- cmdk
- codespace
- codespaces
Expand All @@ -35,25 +36,38 @@ words:
- compat
- consts
- crossorigin
- ctsx
- datetime
- dbaeumer
- degit
- dotenv
- dsznajder
- Duarte
- Elsakaan
- Embla
- esbenp
- eslintcache
- hookform
- ianvs
- ixahmedxi
- jiti
- jscoverage
- jspm
- kohler
- lockb
- lucide
- Malyavko
- microbundle
- mikestead
- minimise
- Mintlify
- mjsx
- monorepoing
- mtsx
- neonctl
- neondatabase
- nextjs
- nuxt
- nzst
- onwarn
- optimisations
Expand All @@ -63,17 +77,21 @@ words:
- pacocoursey
- pageview
- peduarte
- pids
- posthog
- quickstart
- Ratelimit
- shadcn
- sslmode
- starterkit
- starterkits
- stylelint
- stylelintcache
- stylesheet
- superjson
- tada
- tailwindcss
- tamasfe
- tanstack
- thollander
- todos
Expand All @@ -84,32 +102,18 @@ words:
- tsbuildinfo
- tsconfigs
- tseslint
- tsup
- Tuite
- turborepo
- typecheck
- typeof
- typesafe
- unifiedjs
- unkey
- uploadthing
- vaul
- viewports
- vuepress
- WITA
- dbaeumer
- mikestead
- dsznajder
- tamasfe
- Anson
- unifiedjs
- kohler
- yoav
- pids
- jscoverage
- wscript
- jspm
- eslintcache
- stylelint
- stylelintcache
- microbundle
- dotenv
- nuxt
- vuepress
- yoav
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
"@playwright/test": "^1.44.1",
"@types/bun": "latest",
"@types/eslint": "^8.56.10",
"@types/node": "^20.14.6",
"@types/node": "^20.14.8",
"@types/yargs": "^17.0.32",
"commitizen": "^4.3.0",
"cspell": "^8.9.0",
"cspell": "^8.9.1",
"eslint": "^9.5.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
Expand All @@ -66,7 +66,7 @@
"prettier-plugin-astro": "^0.14.0",
"prettier-plugin-packagejson": "^2.5.0",
"turbo": "^2.0.4",
"typescript": "^5.4.5",
"typescript": "^5.5.2",
"yargs": "^17.7.2"
},
"packageManager": "[email protected]"
Expand Down
9 changes: 1 addition & 8 deletions packages/api/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"tsBuildInfoFile": "tsconfig.build.tsbuildinfo",
"outDir": "dist",
"rootDir": "src",
"noEmit": false
},
"include": ["src/**/*.ts"]
"extends": ["./tsconfig.json", "@orbitkit/tsconfig/build.json"]
}
6 changes: 1 addition & 5 deletions packages/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"extends": ["@orbitkit/tsconfig/base.json"],
"compilerOptions": {
"tsBuildInfoFile": "tsconfig.tsbuildinfo"
},
"include": ["**/*.ts", "**/*.mjs", "**/*.js", "**/*.cjs"]
"extends": ["@orbitkit/tsconfig/base.json"]
}
9 changes: 1 addition & 8 deletions packages/auth/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"tsBuildInfoFile": "tsconfig.build.tsbuildinfo",
"outDir": "dist",
"rootDir": "src",
"noEmit": false
},
"include": ["src/**/*.ts"]
"extends": ["./tsconfig.json", "@orbitkit/tsconfig/build.json"]
}
7 changes: 1 addition & 6 deletions packages/auth/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"extends": ["@orbitkit/tsconfig/base.json"],
"compilerOptions": {
"tsBuildInfoFile": "tsconfig.tsbuildinfo",
"lib": ["DOM", "DOM.Iterable", "ESNext"]
},
"include": ["**/*.ts", "**/*.mjs", "**/*.js", "**/*.cjs"]
"extends": ["@orbitkit/tsconfig/dom.json"]
}
6 changes: 3 additions & 3 deletions packages/config/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.5.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^48.2.12",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-jsdoc": "^48.2.13",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-playwright": "^1.6.2",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-tailwindcss": "^3.17.3",
"eslint-plugin-tailwindcss": "^3.17.4",
"eslint-plugin-turbo": "^2.0.4",
"globals": "^15.6.0",
"typescript-eslint": "^7.13.1"
Expand Down
7 changes: 1 addition & 6 deletions packages/config/eslint/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"extends": ["@orbitkit/tsconfig/base.json"],
"compilerOptions": {
"tsBuildInfoFile": "tsconfig.tsbuildinfo"
},
"include": ["**/*.ts", "**/*.js"],
"exclude": ["node_modules", "dist"]
"extends": ["@orbitkit/tsconfig/base.json"]
}
Loading

0 comments on commit 51c0130

Please sign in to comment.