Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 49373aa

Browse files
committed
Remove unused hooks and update package dependencies
Unused hooks 'use-isomorphic-layout-effect' and 'use-origin' were removed from the hooks package. Several package dependencies across multiple project sections were also updated to their latest versions for better performance and security.
1 parent a1e269b commit 49373aa

File tree

13 files changed

+600
-597
lines changed

13 files changed

+600
-597
lines changed

apps/docs/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@codefixlabs/lib": "workspace:*",
1616
"@codefixlabs/ui": "workspace:*",
1717
"@faker-js/faker": "^8.3.1",
18-
"@hookform/resolvers": "^3.3.2",
18+
"@hookform/resolvers": "^3.3.3",
1919
"@storybook/addon-a11y": "^7.6.6",
2020
"@storybook/addon-essentials": "^7.6.6",
2121
"@storybook/addon-interactions": "^7.6.6",
@@ -30,7 +30,7 @@
3030
"@tanstack/react-table": "^8.11.2",
3131
"class-variance-authority": "^0.7.0",
3232
"date-fns": "^3.0.6",
33-
"lucide-react": "^0.302.0",
33+
"lucide-react": "^0.303.0",
3434
"next": "^14.0.4",
3535
"react": "^18.2.0",
3636
"react-day-picker": "^8.10.0",
@@ -44,8 +44,8 @@
4444
"@codefixlabs/tailwindcss": "workspace:*",
4545
"@codefixlabs/tsconfig": "workspace:*",
4646
"@next/eslint-plugin-next": "^14.0.4",
47-
"@types/node": "^20.10.5",
48-
"@types/react": "^18.2.45",
47+
"@types/node": "^20.10.6",
48+
"@types/react": "^18.2.46",
4949
"@types/react-dom": "^18.2.18",
5050
"autoprefixer": "^10.4.16",
5151
"chromatic": "^10.2.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"eslint": "^8.56.0",
5454
"lint-staged": "^15.2.0",
5555
"prettier": "^3.1.1",
56-
"prettier-plugin-tailwindcss": "^0.5.9",
56+
"prettier-plugin-tailwindcss": "^0.5.10",
5757
"simple-git-hooks": "^2.9.0",
5858
"turbo": "^1.11.2"
5959
},

packages/hooks/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @codefixlabs/hooks
22

3+
## 0.1.30
4+
5+
### Patch Changes
6+
7+
- Remove unused hooks and update package dependencies
8+
39
## 0.1.29
410

511
### Patch Changes

packages/hooks/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codefixlabs/hooks",
3-
"version": "0.1.29",
3+
"version": "0.1.30",
44
"license": "MIT",
55
"sideEffects": false,
66
"exports": {
@@ -40,7 +40,7 @@
4040
},
4141
"devDependencies": {
4242
"@codefixlabs/tsconfig": "workspace:*",
43-
"@types/react": "^18.2.45",
43+
"@types/react": "^18.2.46",
4444
"eslint-config-codefixlabs": "workspace:*",
4545
"tsup": "^8.0.1",
4646
"typescript": "^5.3.3"

packages/hooks/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
export * from '@/use-countries';
2-
export * from '@/use-isomorphic-layout-effect';
32
export * from '@/use-modal';
43
export * from '@/use-mounted';
5-
export * from '@/use-origin';
64
export * from '@/use-previous';

packages/hooks/src/use-isomorphic-layout-effect.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

packages/hooks/src/use-origin.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/lib/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @codefixlabs/lib
22

3+
## 0.1.32
4+
5+
### Patch Changes
6+
7+
- Remove unused hooks and update package dependencies
8+
39
## 0.1.31
410

511
### Patch Changes

packages/lib/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codefixlabs/lib",
3-
"version": "0.1.31",
3+
"version": "0.1.32",
44
"license": "MIT",
55
"sideEffects": false,
66
"exports": {
@@ -34,7 +34,7 @@
3434
]
3535
},
3636
"dependencies": {
37-
"libphonenumber-js": "^1.10.52",
37+
"libphonenumber-js": "^1.10.53",
3838
"react": "^18.2.0",
3939
"rehype-format": "^5.0.0",
4040
"rehype-parse": "^9.0.0",
@@ -49,7 +49,7 @@
4949
},
5050
"devDependencies": {
5151
"@codefixlabs/tsconfig": "workspace:*",
52-
"@types/react": "^18.2.45",
52+
"@types/react": "^18.2.46",
5353
"eslint-config-codefixlabs": "workspace:*",
5454
"tsup": "^8.0.1",
5555
"typescript": "^5.3.3"

packages/lib/src/editor-parser.ts

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,40 @@ import remarkRehype from 'remark-rehype';
99
import remarkStringify from 'remark-stringify';
1010
import { unified } from 'unified';
1111

12-
const markdownToHTMLProcessor = unified()
12+
const convertMarkdownToHtmlProcess = unified()
1313
.use(remarkParse)
1414
.use(remarkRehype, { allowDangerousHtml: true })
1515
.use(rehypeRaw)
1616
.use(rehypeFormat)
1717
.use(rehypeSanitize)
1818
.use(rehypeStringify);
1919

20-
const htmlToMarkdownProcessor = unified()
20+
const convertHtmlToMarkdownProcess = unified()
2121
.use(rehypeParse)
2222
.use(rehypeRemark)
2323
.use(remarkStringify);
2424

25-
export function markdownToHTML(
26-
markdown: string | number | null | undefined,
27-
): string {
28-
if (!markdown) {
25+
type UnifiedProcessor =
26+
| typeof convertMarkdownToHtmlProcess
27+
| typeof convertHtmlToMarkdownProcess;
28+
29+
const processConversion = (
30+
processor: UnifiedProcessor,
31+
content: string,
32+
): string => {
33+
if (!content) {
2934
return '';
3035
}
3136

32-
const result = markdownToHTMLProcessor.processSync(markdown.toString());
37+
const result = processor.processSync(content.toString());
3338

3439
return result.toString();
35-
}
40+
};
3641

37-
export function htmlToMarkdown(
38-
html: string | number | null | undefined,
39-
): string {
40-
if (!html) {
41-
return '';
42-
}
43-
44-
const result = htmlToMarkdownProcessor.processSync(html.toString());
42+
export function markdownToHTML(markdown: string): string {
43+
return processConversion(convertMarkdownToHtmlProcess, markdown);
44+
}
4545

46-
return result.toString();
46+
export function htmlToMarkdown(html: string): string {
47+
return processConversion(convertHtmlToMarkdownProcess, html);
4748
}

packages/ui/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @codefixlabs/ui
22

3+
## 0.1.84
4+
5+
### Patch Changes
6+
7+
- Remove unused hooks and update package dependencies
8+
- Updated dependencies
9+
- @codefixlabs/hooks@0.1.30
10+
- @codefixlabs/lib@0.1.32
11+
312
## 0.1.83
413

514
### Patch Changes

packages/ui/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codefixlabs/ui",
3-
"version": "0.1.83",
3+
"version": "0.1.84",
44
"license": "MIT",
55
"sideEffects": false,
66
"exports": {
@@ -81,10 +81,10 @@
8181
"@tiptap/react": "^2.1.13",
8282
"@tiptap/starter-kit": "^2.1.13",
8383
"class-variance-authority": "^0.7.0",
84-
"clsx": "^2.0.0",
84+
"clsx": "^2.1.0",
8585
"cmdk": "^0.2.0",
8686
"date-fns": "^3.0.6",
87-
"lucide-react": "^0.302.0",
87+
"lucide-react": "^0.303.0",
8888
"pluralize": "^8.0.0",
8989
"react": "^18.2.0",
9090
"react-day-picker": "^8.10.0",
@@ -95,9 +95,9 @@
9595
"devDependencies": {
9696
"@codefixlabs/tailwindcss": "workspace:*",
9797
"@codefixlabs/tsconfig": "workspace:*",
98-
"@types/node": "^20.10.5",
98+
"@types/node": "^20.10.6",
9999
"@types/pluralize": "^0.0.33",
100-
"@types/react": "^18.2.45",
100+
"@types/react": "^18.2.46",
101101
"autoprefixer": "^10.4.16",
102102
"eslint-config-codefixlabs": "workspace:*",
103103
"postcss": "^8.4.32",

0 commit comments

Comments
 (0)