Skip to content

Commit 30e22c9

Browse files
authored
Merge pull request #40 from sectsect/feature/jan2025-update-dependencies
chore(deps): update dependencies
2 parents 6555b41 + dfe8f35 commit 30e22c9

24 files changed

Lines changed: 6877 additions & 8042 deletions

.changeset/kind-lions-begin.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@sect/solid-hiding-header": patch
3+
---
4+
5+
.
6+
7+
- chore(deps): update dependencies
8+
- fix: resolve test failures after dependency updates
9+
- fix(e2e): remove playwright test from library package
10+
- test: expand test suites to achieve full coverage
11+
- chore(deps): update dependencies
12+
- fix(lint): update eslint-plugin-solid to resolve TSAsExpression error
13+
- chore(deps): update dependencies
14+
- chore: update tailwindcss config before migrate to v4
15+
- chore(deps): migrate to tailwindcss v4
16+
- fix(deps): downgrade msw to 2.3.1 for vite 6 compatibility
17+
- fix: resolve TypeScript module resolution errors

apps/solidjs-boilerplate/.eslintrc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@
139139
]
140140
},
141141
// Configuration for e2e testing (Cypress)
142-
{
143-
"files": ["**/*.cy.ts"],
144-
"plugins": ["cypress"],
145-
"extends": ["plugin:cypress/recommended"],
146-
"parserOptions": {
147-
"project": "./cypress/tsconfig.json"
148-
}
149-
},
150-
// Configuration for e2e testing (Cypress)
142+
// {
143+
// "files": ["**/*.cy.ts"],
144+
// "plugins": ["cypress"],
145+
// "extends": ["plugin:cypress/recommended"],
146+
// "parserOptions": {
147+
// "project": "./cypress/tsconfig.json"
148+
// }
149+
// },
150+
// Configuration for e2e testing (Playwright)
151151
{
152152
"files": ["e2e/**/*.test.ts", "e2e/**/*.spec.ts"],
153153
"extends": ["plugin:playwright/playwright-test"]

apps/solidjs-boilerplate/package.json

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.5.1",
44
"private": true,
55
"description": "",
6+
"type": "module",
67
"scripts": {
78
"dev": "vite",
89
"build": "vite build",
@@ -20,82 +21,80 @@
2021
},
2122
"license": "MIT",
2223
"devDependencies": {
23-
"@commitlint/cli": "^18.4.4",
24-
"@commitlint/config-conventional": "^18.4.4",
25-
"@playwright/test": "^1.41.1",
26-
"@secretlint/secretlint-rule-preset-recommend": "^8.1.0",
27-
"@solidjs/testing-library": "^0.8.5",
28-
"@tailwindcss/forms": "^0.5.7",
29-
"@tailwindcss/line-clamp": "^0.4.4",
30-
"@testing-library/dom": "^9.3.4",
31-
"@testing-library/jest-dom": "^6.2.0",
32-
"@testing-library/user-event": "^14.5.2",
33-
"@types/node": "^20.11.5",
34-
"@types/testing-library__jest-dom": "^5.14.9",
24+
"@commitlint/cli": "^19.8.1",
25+
"@commitlint/config-conventional": "^19.8.1",
26+
"@playwright/test": "^1.53.1",
27+
"@secretlint/secretlint-rule-preset-recommend": "^10.1.0",
28+
"@solidjs/testing-library": "^0.8.10",
29+
"@testing-library/dom": "^10.4.0",
30+
"@testing-library/jest-dom": "^6.6.3",
31+
"@testing-library/user-event": "^14.6.1",
32+
"@types/node": "^24.0.3",
33+
"@types/testing-library__jest-dom": "^6.0.0",
3534
"@typescript-eslint/eslint-plugin": "^6.19.0",
3635
"@typescript-eslint/parser": "^6.19.0",
37-
"@vitest/coverage-v8": "^2.0.5",
38-
"babel-preset-solid": "^1.8.9",
36+
"@vitest/coverage-v8": "^3.2.4",
37+
"babel-preset-solid": "^1.9.6",
3938
"eslint": "8.56.0",
4039
"eslint-config-airbnb-base": "^15.0.0",
4140
"eslint-config-airbnb-typescript": "^17.1.0",
42-
"eslint-config-prettier": "^9.1.0",
43-
"eslint-import-resolver-typescript": "^3.6.1",
44-
"eslint-plugin-cypress": "^2.15.1",
45-
"eslint-plugin-deprecation": "^2.0.0",
46-
"eslint-plugin-import": "^2.29.1",
47-
"eslint-plugin-jest": "^27.6.3",
48-
"eslint-plugin-jest-dom": "^5.1.0",
41+
"eslint-config-prettier": "^10.1.5",
42+
"eslint-import-resolver-typescript": "^4.4.3",
43+
"eslint-plugin-deprecation": "^3.0.0",
44+
"eslint-plugin-import": "^2.31.0",
45+
"eslint-plugin-jest": "^29.0.1",
46+
"eslint-plugin-jest-dom": "^5.5.0",
4947
"eslint-plugin-jest-formatting": "^3.1.0",
50-
"eslint-plugin-jsx-a11y": "^6.8.0",
51-
"eslint-plugin-playwright": "^0.22.1",
52-
"eslint-plugin-prettier": "^5.1.3",
53-
"eslint-plugin-react": "^7.33.2",
54-
"eslint-plugin-react-hooks": "^4.6.0",
55-
"eslint-plugin-solid": "^0.13.1",
56-
"eslint-plugin-tailwindcss": "^3.14.0",
57-
"eslint-plugin-testing-library": "^6.2.0",
58-
"eslint-plugin-tsdoc": "^0.2.17",
59-
"eslint-plugin-unused-imports": "^3.0.0",
60-
"eslint-plugin-vitest": "^0.3.20",
61-
"husky": "^8.0.3",
62-
"jsdom": "^24.0.0",
63-
"lint-staged": "^15.2.0",
48+
"eslint-plugin-jsx-a11y": "^6.10.2",
49+
"eslint-plugin-playwright": "^2.2.0",
50+
"eslint-plugin-prettier": "^5.5.0",
51+
"eslint-plugin-react": "^7.37.5",
52+
"eslint-plugin-react-hooks": "^5.2.0",
53+
"eslint-plugin-solid": "^0.14.5",
54+
"eslint-plugin-tailwindcss": "^3.18.0",
55+
"eslint-plugin-testing-library": "^7.5.3",
56+
"eslint-plugin-tsdoc": "^0.4.0",
57+
"eslint-plugin-unused-imports": "^4.1.4",
58+
"eslint-plugin-vitest": "^0.5.4",
59+
"husky": "^9.1.7",
60+
"jsdom": "^26.1.0",
61+
"lint-staged": "^16.1.2",
6462
"msw": "^2.3.1",
65-
"postcss": "^8.4.33",
66-
"postcss-calc": "^9.0.1",
63+
"postcss": "^8.5.6",
64+
"postcss-calc": "^10.1.1",
6765
"postcss-combine-duplicated-selectors": "^10.0.3",
6866
"postcss-flexbugs-fixes": "^5.0.2",
6967
"postcss-hexrgba": "^2.1.0",
70-
"postcss-import": "^16.0.0",
71-
"postcss-nesting": "^12.1.4",
72-
"postcss-preset-env": "^9.3.0",
68+
"postcss-import": "^16.1.1",
69+
"postcss-nesting": "^13.0.2",
70+
"postcss-preset-env": "^10.2.3",
7371
"postcss-pseudo-is": "^0.3.0",
7472
"postcss-pxtorem": "^6.1.0",
7573
"postcss-reporter": "^7.1.0",
7674
"postcss-sort-media-queries": "^5.2.0",
77-
"prettier": "^3.2.4",
78-
"secretlint": "^8.1.0",
79-
"stylelint": "^16.2.0",
80-
"stylelint-config-recess-order": "^4.4.0",
81-
"stylelint-config-standard": "^36.0.0",
82-
"stylelint-prettier": "^5.0.0",
83-
"tailwindcss": "^3.4.1",
84-
"typescript": "^5.3.3",
85-
"vite": "^5.3.0",
86-
"vite-plugin-solid": "^2.8.0",
87-
"vite-tsconfig-paths": "^4.3.2",
88-
"vitest": "^2.0.5"
75+
"prettier": "^3.5.3",
76+
"secretlint": "^10.1.0",
77+
"stylelint": "^16.21.0",
78+
"stylelint-config-recess-order": "^7.1.0",
79+
"stylelint-config-standard": "^38.0.0",
80+
"stylelint-prettier": "^5.0.3",
81+
"tailwindcss": "^4.1.10",
82+
"typescript": "^5.8.3",
83+
"vite": "^6.3.5",
84+
"vite-plugin-solid": "^2.11.6",
85+
"vite-tsconfig-paths": "^5.1.4",
86+
"vitest": "^3.2.4"
8987
},
9088
"dependencies": {
9189
"@sect/solid-hiding-header": "workspace:*",
92-
"@solidjs/meta": "^0.29.3",
93-
"@solidjs/router": "^0.13.3",
94-
"@tanstack/solid-query": "^5.17.19",
90+
"@solidjs/meta": "^0.29.4",
91+
"@solidjs/router": "^0.15.3",
92+
"@tailwindcss/vite": "^4.1.10",
93+
"@tanstack/solid-query": "^5.80.10",
9594
"escape-goat": "^4.0.0",
96-
"isomorphic-dompurify": "^2.2.0",
97-
"solid-devtools": "^0.29.3",
98-
"solid-js": "^1.8.11",
95+
"isomorphic-dompurify": "^2.25.0",
96+
"solid-devtools": "^0.34.2",
97+
"solid-js": "^1.9.7",
9998
"solid-toast": "^0.5.0",
10099
"striptags": "^3.2.0",
101100
"truncate": "^3.0.0"

apps/solidjs-boilerplate/postcss.config.js

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["postcss-import", "postcss-nesting", "@tailwindcss/postcss"]
3+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import { render } from '@solidjs/testing-library';
2+
import { expect, describe, test, vi } from 'vitest';
3+
import { MetaProvider } from '@solidjs/meta';
4+
import type { JSX } from 'solid-js';
5+
import Head from './Head';
6+
7+
// Mock the AppConfig to avoid import issues
8+
vi.mock('@/constants/AppConfig', () => ({
9+
AppConfig: {
10+
title: 'Test Site',
11+
description: 'Test description',
12+
og: {
13+
image: {
14+
url: 'https://example.com/default-og-image.jpg'
15+
}
16+
}
17+
}
18+
}));
19+
20+
describe('Head component', () => {
21+
const renderWithMeta = (component: () => JSX.Element) => {
22+
return render(() => (
23+
<MetaProvider>
24+
{component()}
25+
</MetaProvider>
26+
));
27+
};
28+
29+
test('should render with default title and description', () => {
30+
const { unmount } = renderWithMeta(() => <Head />);
31+
32+
// Check if document head contains the expected meta tags
33+
expect(document.title).toBe('Test Site');
34+
35+
const metaDescription = document.querySelector('meta[name="description"]');
36+
expect(metaDescription?.getAttribute('content')).toBe('Test description');
37+
38+
unmount();
39+
});
40+
41+
test('should render with custom title and description', () => {
42+
const customTitle = 'Custom Page';
43+
const customDescription = 'Custom page description';
44+
45+
const { unmount } = renderWithMeta(() => (
46+
<Head title={customTitle} description={customDescription} />
47+
));
48+
49+
expect(document.title).toBe('Custom Page | Test Site');
50+
51+
const metaDescription = document.querySelector('meta[name="description"]');
52+
expect(metaDescription?.getAttribute('content')).toBe(customDescription);
53+
54+
unmount();
55+
});
56+
57+
test('should use website type when canonical is undefined', () => {
58+
const { unmount } = renderWithMeta(() => <Head />);
59+
60+
const ogType = document.querySelector('meta[property="og:type"]');
61+
expect(ogType?.getAttribute('content')).toBe('website');
62+
63+
unmount();
64+
});
65+
66+
test('should use article type when canonical is provided', () => {
67+
const { unmount } = renderWithMeta(() => <Head canonical="/test" />);
68+
69+
const ogType = document.querySelector('meta[property="og:type"]');
70+
expect(ogType?.getAttribute('content')).toBe('article');
71+
72+
unmount();
73+
});
74+
75+
test('should use custom OG image when provided', () => {
76+
const customOgImage = {
77+
og: {
78+
image: {
79+
url: '/custom-image.jpg'
80+
}
81+
}
82+
};
83+
84+
const { unmount } = renderWithMeta(() => <Head {...customOgImage} />);
85+
86+
const ogImage = document.querySelector('meta[property="og:image"]');
87+
// The actual implementation prepends siteUrl, but since siteUrl is empty in test, it just returns the path
88+
expect(ogImage?.getAttribute('content')).toContain('custom-image.jpg');
89+
90+
unmount();
91+
});
92+
93+
test('should use default OG image when custom image is not provided', () => {
94+
const { unmount } = renderWithMeta(() => <Head />);
95+
96+
const ogImage = document.querySelector('meta[property="og:image"]');
97+
expect(ogImage?.getAttribute('content')).toBe('https://example.com/default-og-image.jpg');
98+
99+
unmount();
100+
});
101+
});

apps/solidjs-boilerplate/src/hooks/useFetchPost.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { CreateQueryResult } from '@tanstack/solid-query';
21
import { createQuery } from '@tanstack/solid-query';
32

43
import type { Post } from '@/types/api/post.interface';
@@ -16,7 +15,7 @@ const useFetchPost = (id: string) => {
1615
// queryFn: fetchData,
1716
// }));
1817

19-
const query: CreateQueryResult<Post, Error> = createQuery(() => ({
18+
const query = createQuery(() => ({
2019
// Array Keys with variables
2120
// @ https://tanstack.com/query/v4/docs/react/guides/query-keys?from=reactQueryV3&original=https%3A%2F%2Freact-query-v3.tanstack.com%2Fguides%2Fquery-keys#array-keys-with-variables
2221
queryKey: [`/posts/`, id],

apps/solidjs-boilerplate/src/hooks/useFetchPostList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { CreateQueryResult } from '@tanstack/solid-query';
21
import { createQuery } from '@tanstack/solid-query';
32

43
import type { Post } from '@/types/api/post.interface';
@@ -16,7 +15,7 @@ const useFetchPostList = () => {
1615
// queryFn: fetchData,
1716
// }));
1817

19-
const query: CreateQueryResult<Post[], Error> = createQuery(() => ({
18+
const query = createQuery(() => ({
2019
queryKey: ['/posts'],
2120
queryFn: async () => {
2221
const result = await fetch(`${apiEndpointUrl}/posts`);

0 commit comments

Comments
 (0)