Skip to content

Commit

Permalink
cleanup deps
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Nov 29, 2024
1 parent af1ba7c commit 3c78a3b
Show file tree
Hide file tree
Showing 10 changed files with 1,713 additions and 1,621 deletions.
3 changes: 1 addition & 2 deletions components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/testing-library__jest-dom": "^6.0.0",
"@vanilla-extract/css": "^1.16.0",
"@vanilla-extract/dynamic": "^2.1.2",
"@vanilla-extract/recipes": "^0.5.5",
Expand All @@ -61,7 +60,7 @@
"jsdom": "^25.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vite": "^5.4.10",
"vite": "^6.0.1",
"vite-plugin-dts": "^4.3.0",
"vite-tsconfig-paths": "^5.1.0",
"vitest": "^2.1.4"
Expand Down
9 changes: 3 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,33 @@
"lodash": "^4.17.21",
"next": "14.2.7",
"next-mdx-remote": "^3.0.6",
"nookies": "^2.5.2",
"prism-react-renderer": "^1.2.1",
"prism-theme-vars": "^0.2.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-element-to-jsx-string": "^14.3.4",
"react-live": "3.1.1",
"react-transition-state": "^2.1.2",
"ts-pattern": "^4.3.0"
"ts-pattern": "^5.5.0"
},
"devDependencies": {
"@mdx-js/loader": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"@next/mdx": "^12.0.1",
"@svgr/webpack": "^6.3.1",
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.176",
"@types/mdx-js__react": "^1.5.5",
"@types/node": "^22.2.0",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@types/webpack-env": "^1.18.5",
"@vanilla-extract/css": "^1.13.0",
"babel-loader": "^8.2.4",
"css-loader": "^6.8.1",
"fs-extra": "^10.0.0",
"mini-css-extract-plugin": "^2.7.6",
"react-docgen-typescript": "^2.1.1",
"style-loader": "^3.3.3",
"stylelint-webpack-plugin": "^3.3.0",
"typescript": "^4.6.2",
"typescript": "^5.7.2",
"utility-types": "^3.10.0"
}
}
2 changes: 1 addition & 1 deletion docs/src/pages/components/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
InferGetStaticPropsType,
NextPageWithLayout,
} from 'next'
import fs from 'fs-extra'
import fs from 'node:fs'
import type { MDXRemoteSerializeResult } from 'next-mdx-remote'
import { MDXRemote } from 'next-mdx-remote'
import { serialize } from 'next-mdx-remote/serialize'
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/guides/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
InferGetStaticPropsType,
NextPageWithLayout,
} from 'next'
import fs from 'fs-extra'
import fs from 'node:fs'
import type { MDXRemoteSerializeResult } from 'next-mdx-remote'
import { MDXRemote } from 'next-mdx-remote'
import { serialize } from 'next-mdx-remote/serialize'
Expand Down
41 changes: 19 additions & 22 deletions docs/src/playroom/snippets.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
import flatten from 'lodash/flatten'
import reactElementToJSXString from 'react-element-to-jsx-string'

import capitalize from 'lodash/capitalize'

import type { Snippet } from './types'

const req = (require as any).context(
const req = require.context(
'../reference/snippets',
true,
/\.snippets\.tsx$/,
)

const snippets = flatten(
req.keys().map((filename: string) => {
const matches = filename.match(
/([a-zA-Z-]+)\/([a-zA-Z-]+)\.snippets\.tsx?$/,
)
if (!matches) return []
const snippets = req.keys().map((filename: string) => {
const matches = filename.match(
/([a-zA-Z-]+)\/([a-zA-Z-]+)\.snippets\.tsx?$/,
)
if (!matches) return []

const snippets = req(filename).snippets as Snippet[]
const snippets = req(filename).snippets as Snippet[]

return snippets.map((snippet) => {
const groupName = capitalize(matches[1])
const displayName = matches[2]
const code
return snippets.map((snippet) => {
const groupName = capitalize(matches[1])
const displayName = matches[2]
const code
= typeof snippet.code === 'string'
? snippet.code
: reactElementToJSXString(snippet.code)

return {
...snippet,
name: groupName,
group: snippet.group || displayName,
code,
}
})
}),
)
return {
...snippet,
name: groupName,
group: snippet.group || displayName,
code,
}
})
}).flat()

export default snippets
22 changes: 0 additions & 22 deletions docs/src/utils/cookies.ts

This file was deleted.

2 changes: 1 addition & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"isolatedModules": true,
"types": ["node"]
"types": ["node", "webpack-env"]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": []
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@
"@eslint/compat": "^1.2.2",
"@eslint/js": "^9.14.0",
"@next/eslint-plugin-next": "^14.2.17",
"@size-limit/preset-big-lib": "^6.0.4",
"@size-limit/preset-big-lib": "^11.1.6",
"@stylistic/eslint-plugin": "^2.10.1",
"@stylistic/stylelint-config": "^2.0.0",
"@types/dedent": "^0.7.2",
"@vitest/coverage-v8": "^2.1.4",
"change-case": "^4.1.2",
"dedent": "^0.7.0",
"dedent": "^1.5.3",
"eslint": "^9.14.0",
"globals": "^15.12.0",
"husky": "^7.0.4",
Expand All @@ -51,10 +50,10 @@
"prompt": "^1.3.0",
"react-docgen-typescript": "^2.2.2",
"react-hook-form": "^7.53.1",
"size-limit": "^6.0.4",
"size-limit": "^11.1.6",
"stylelint": "^16.10.0",
"stylelint-config-recommended": "^14.0.1",
"typescript": "5.5.4",
"typescript": "5.7.2",
"typescript-eslint": "^8.13.0",
"utility-types": "^3.11.0"
},
Expand Down
Loading

0 comments on commit 3c78a3b

Please sign in to comment.