Skip to content

Commit 272e511

Browse files
vamsimanoharclaude
andauthored
fix: resolve npm vulnerabilities and flaky Performance test (opensearch-project#93)
- Update docs dependencies to fix npm audit vulnerabilities - Fix flaky property-based test: alt text generator could produce empty strings after sanitizing special characters (e.g. "<>&" → ""), causing `expect(altText).toBeTruthy()` to fail non-deterministically Signed-off-by: Vamsi Manohar <reddyvam@amazon.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2cd60a1 commit 272e511

4 files changed

Lines changed: 34 additions & 36 deletions

File tree

docs/package-lock.json

Lines changed: 19 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
"shiki": "^3.21.0",
3030
"tailwindcss": "^4.1.18"
3131
},
32+
"overrides": {
33+
"yauzl": "^3.2.1",
34+
"undici": "^7.24.0"
35+
},
3236
"devDependencies": {
3337
"@testing-library/jest-dom": "^6.9.1",
3438
"@testing-library/react": "^16.3.2",

docs/src/components/Performance.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('Performance - Property 6: Below-fold images are lazy-loaded', () => {
4040
fc.webUrl({ validSchemes: ['https'] })
4141
),
4242
alt: fc.string({ minLength: 3, maxLength: 100 })
43-
.map(s => s.replace(/[<>"'&]/g, '')), // Sanitize
43+
.map(s => s.replace(/[<>"'&]/g, '') || 'image description'), // Sanitize with fallback
4444
isBelowFold: fc.boolean(),
4545
width: fc.option(fc.integer({ min: 50, max: 1000 })),
4646
height: fc.option(fc.integer({ min: 50, max: 1000 }))

docs/starlight-docs/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)