Skip to content

Commit ff10eaa

Browse files
authored
Chore/dependency updates 2026 02 02 (#38)
* chore: dependency updates * renamed test:unit npm script to test * css migrations, vitest config updates * added version and changelogs * added placeholder test * updated snapshots
1 parent 37aea01 commit ff10eaa

31 files changed

Lines changed: 2015 additions & 1625 deletions

.cursor/agents/reviewer-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ You are a unit test and coverage reviewer for code reviews.
77

88
## When Invoked
99

10-
**IMPORTANT:** Run `yarn test:unit` exactly ONCE. Do NOT re-run the command for any reason (verification, double-checking, etc.). Base your entire report on the single execution.
10+
**IMPORTANT:** Run `yarn test` exactly ONCE. Do NOT re-run the command for any reason (verification, double-checking, etc.). Base your entire report on the single execution.
1111

1212
### Step 1: Run Unit Tests
1313

14-
1. Run `yarn test:unit` once to execute all unit tests
14+
1. Run `yarn test` once to execute all unit tests
1515
2. Analyze the exit code and output from that single run
1616
3. If any tests fail, report them as **Critical Issues**
1717

.cursor/rules/CODE_STYLE.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,5 +317,5 @@ return <div>Content</div>
317317
- Prettier: `yarn format`
318318
- ESLint: `yarn lint`
319319
- Type Check: `yarn build`
320-
- Unit Tests: `yarn test:unit`
320+
- Unit Tests: `yarn test`
321321
- E2E Tests: `yarn test:e2e`

.cursor/rules/TESTING_GUIDELINES.mdc

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ describe('EnvironmentOptions', () => {
2020
describe('getEnvironmentOptions', () => {
2121
it('should return default options when no URL params', () => {
2222
// Arrange
23-
const url = new URL('http://localhost');
23+
const url = new URL('http://localhost')
2424

2525
// Act
26-
const result = getEnvironmentOptions(url);
26+
const result = getEnvironmentOptions(url)
2727

2828
// Assert
29-
expect(result.theme).toBe('dark');
30-
});
31-
});
32-
});
29+
expect(result.theme).toBe('dark')
30+
})
31+
})
32+
})
3333
```
3434

3535
### Test All Exported Functions
@@ -40,22 +40,22 @@ Every exported function should have tests:
4040
// ✅ Good - testing public API
4141
describe('orderFields', () => {
4242
it('should order object fields alphabetically', () => {
43-
const input = { z: 1, a: 2, m: 3 };
44-
const result = orderFields(input);
45-
expect(Object.keys(result)).toEqual(['a', 'm', 'z']);
46-
});
43+
const input = { z: 1, a: 2, m: 3 }
44+
const result = orderFields(input)
45+
expect(Object.keys(result)).toEqual(['a', 'm', 'z'])
46+
})
4747

4848
it('should handle nested objects', () => {
49-
const input = { outer: { z: 1, a: 2 } };
50-
const result = orderFields(input);
51-
expect(Object.keys(result.outer)).toEqual(['a', 'z']);
52-
});
49+
const input = { outer: { z: 1, a: 2 } }
50+
const result = orderFields(input)
51+
expect(Object.keys(result.outer)).toEqual(['a', 'z'])
52+
})
5353

5454
it('should handle empty objects', () => {
55-
const result = orderFields({});
56-
expect(result).toEqual({});
57-
});
58-
});
55+
const result = orderFields({})
56+
expect(result).toEqual({})
57+
})
58+
})
5959
```
6060

6161
### Test Edge Cases
@@ -66,25 +66,25 @@ Test boundary conditions and error scenarios:
6666
// ✅ Good - testing edge cases
6767
describe('parseJson', () => {
6868
it('should handle valid JSON', () => {
69-
const result = parseJson('{"key": "value"}');
70-
expect(result).toEqual({ key: 'value' });
71-
});
69+
const result = parseJson('{"key": "value"}')
70+
expect(result).toEqual({ key: 'value' })
71+
})
7272

7373
it('should handle invalid JSON', () => {
74-
const result = parseJson('invalid');
75-
expect(result).toBeNull();
76-
});
74+
const result = parseJson('invalid')
75+
expect(result).toBeNull()
76+
})
7777

7878
it('should handle empty string', () => {
79-
const result = parseJson('');
80-
expect(result).toBeNull();
81-
});
79+
const result = parseJson('')
80+
expect(result).toBeNull()
81+
})
8282

8383
it('should handle null input', () => {
84-
const result = parseJson(null as unknown as string);
85-
expect(result).toBeNull();
86-
});
87-
});
84+
const result = parseJson(null as unknown as string)
85+
expect(result).toBeNull()
86+
})
87+
})
8888
```
8989

9090
### Avoid False Positive Tests
@@ -95,26 +95,26 @@ Ensure assertions always run:
9595
// ❌ False positive risk - passes if function doesn't throw
9696
it('should throw on error', async () => {
9797
try {
98-
await functionThatShouldThrow();
98+
await functionThatShouldThrow()
9999
} catch (error) {
100-
expect(error).toBeInstanceOf(Error);
100+
expect(error).toBeInstanceOf(Error)
101101
}
102-
});
102+
})
103103

104104
// ✅ Correct - fails if assertions don't run
105105
it('should throw on error', async () => {
106-
expect.assertions(1);
106+
expect.assertions(1)
107107
try {
108-
await functionThatShouldThrow();
108+
await functionThatShouldThrow()
109109
} catch (error) {
110-
expect(error).toBeInstanceOf(Error);
110+
expect(error).toBeInstanceOf(Error)
111111
}
112-
});
112+
})
113113

114114
// ✅ Better - use expect().rejects
115115
it('should throw on error', async () => {
116-
await expect(functionThatShouldThrow()).rejects.toThrow();
117-
});
116+
await expect(functionThatShouldThrow()).rejects.toThrow()
117+
})
118118
```
119119

120120
## E2E Testing with Playwright
@@ -123,58 +123,58 @@ it('should throw on error', async () => {
123123

124124
```typescript
125125
// e2e/page.spec.ts
126-
import { test, expect } from '@playwright/test';
126+
import { test, expect } from '@playwright/test'
127127

128128
test.describe('Home Page', () => {
129129
test.beforeEach(async ({ page }) => {
130-
await page.goto('/');
131-
});
130+
await page.goto('/')
131+
})
132132

133133
test('should display editor', async ({ page }) => {
134-
await expect(page.locator('.monaco-editor')).toBeVisible();
135-
});
134+
await expect(page.locator('.monaco-editor')).toBeVisible()
135+
})
136136

137137
test('should format JSON on button click', async ({ page }) => {
138-
const editor = page.locator('.monaco-editor');
139-
await editor.fill('{"z":1,"a":2}');
140-
141-
await page.click('button:has-text("Format")');
142-
138+
const editor = page.locator('.monaco-editor')
139+
await editor.fill('{"z":1,"a":2}')
140+
141+
await page.click('button:has-text("Format")')
142+
143143
// Verify formatted output
144-
await expect(editor).toContainText('"a": 2');
145-
});
146-
});
144+
await expect(editor).toContainText('"a": 2')
145+
})
146+
})
147147
```
148148

149149
### Visual Regression Testing
150150

151151
```typescript
152152
// ✅ Good - visual snapshot testing
153153
test('should match visual snapshot', async ({ page }) => {
154-
await page.goto('/');
155-
await expect(page).toHaveScreenshot('home-content.png');
156-
});
154+
await page.goto('/')
155+
await expect(page).toHaveScreenshot('home-content.png')
156+
})
157157

158158
test('should match title snapshot', async ({ page }) => {
159-
await page.goto('/');
160-
const title = page.locator('h1');
161-
await expect(title).toHaveScreenshot('title.png');
162-
});
159+
await page.goto('/')
160+
const title = page.locator('h1')
161+
await expect(title).toHaveScreenshot('title.png')
162+
})
163163
```
164164

165165
### Waiting for Elements
166166

167167
```typescript
168168
// ✅ Good - wait for element to be ready
169169
test('should load editor', async ({ page }) => {
170-
await page.goto('/');
171-
170+
await page.goto('/')
171+
172172
// Wait for Monaco editor to initialize
173-
await page.waitForSelector('.monaco-editor', { state: 'visible' });
174-
173+
await page.waitForSelector('.monaco-editor', { state: 'visible' })
174+
175175
// Now interact with the editor
176-
await page.click('.monaco-editor');
177-
});
176+
await page.click('.monaco-editor')
177+
})
178178
```
179179

180180
## Test Coverage
@@ -187,7 +187,7 @@ test('should load editor', async ({ page }) => {
187187

188188
```bash
189189
# Run unit tests with coverage
190-
yarn test:unit --coverage
190+
yarn test --coverage
191191

192192
# Run E2E tests
193193
yarn test:e2e
@@ -199,13 +199,13 @@ yarn test:e2e
199199

200200
```bash
201201
# Unit tests
202-
yarn test:unit
202+
yarn test
203203

204204
# E2E tests
205205
yarn test:e2e
206206

207207
# All tests
208-
yarn test:unit && yarn test:e2e
208+
yarn test && yarn test:e2e
209209
```
210210

211211
## Summary
@@ -231,4 +231,4 @@ yarn test:unit && yarn test:e2e
231231

232232
- Unit Tests: `vitest`
233233
- E2E Tests: `playwright`
234-
- Commands: `yarn test:unit`, `yarn test:e2e`
234+
- Commands: `yarn test`, `yarn test:e2e`

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
env:
2828
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2929
- name: Test
30-
run: yarn test:unit
30+
run: yarn test
3131
- uses: codecov/codecov-action@v5
3232
with:
3333
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: yarn lint
4444

4545
- name: Test
46-
run: yarn test:unit
46+
run: yarn test
4747

4848
- name: Apply release changes
4949
run: yarn applyReleaseChanges
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!-- version-type: patch -->
2+
# frontend
3+
4+
<!--
5+
FORMATTING GUIDE:
6+
7+
### Detailed Entry (appears first when merging)
8+
9+
Use h3 (###) and below for detailed entries with paragraphs, code examples, and lists.
10+
11+
### Simple List Items
12+
13+
- Simple changes can be added as list items
14+
- They are collected together at the bottom of each section
15+
16+
TIP: When multiple changelog drafts are merged, heading-based entries
17+
appear before simple list items within each section.
18+
-->
19+
20+
## ✨ Features
21+
<!-- PLACEHOLDER: Describe your shiny new features (feat:) -->
22+
23+
## 🐛 Bug Fixes
24+
<!-- PLACEHOLDER: Describe the nasty little bugs that has been eradicated (fix:) -->
25+
26+
## 📚 Documentation
27+
<!-- PLACEHOLDER: Describe documentation changes (docs:) -->
28+
29+
## ⚡ Performance
30+
<!-- PLACEHOLDER: Describe performance improvements (perf:) -->
31+
32+
## ♻️ Refactoring
33+
34+
- Migrated inline styles to `css` property in Shades components (`Header`, `Layout`, `JsonSchemaSelector`, `ShareButton`, `ThemeSwitch`, `ComparePage`, `ValidatePage`) - leveraging the new CSS-in-JS API for cleaner styling with pseudo-class support
35+
36+
## 🧪 Tests
37+
<!-- PLACEHOLDER: Describe test changes (test:) -->
38+
39+
## 📦 Build
40+
<!-- PLACEHOLDER: Describe build system changes (build:) -->
41+
42+
## 👷 CI
43+
<!-- PLACEHOLDER: Describe CI configuration changes (ci:) -->
44+
45+
## ⬆️ Dependencies
46+
47+
- Updated `@furystack/shades-common-components` from 10.x to 11.x (with new CSS-in-JS API)
48+
- Updated `@furystack/shades` from 11.0.x to 11.1.x
49+
- Updated other FuryStack packages (`core`, `inject`, `logging`, `rest-client-fetch`, `utils`)
50+
- Updated `monaco-editor` from 0.54.0 to 0.55.1
51+
- Updated `vite` from 7.1.x to 7.3.x and `vitest` from 3.x to 4.x
52+
53+
## 🔧 Chores
54+
<!-- PLACEHOLDER: Describe other changes (chore:) -->

0 commit comments

Comments
 (0)