Fix CI type error - #446
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency ReviewThe following issues were found:
|
There was a problem hiding this comment.
Pull Request Overview
This PR streamlines the project's npm scripts and updates the .cache directory handling strategy. The main goal is to remove unused e2e testing scripts while ensuring that generated type definitions and placeholder data remain version-controlled for development consistency.
- Removed 13 unused or redundant e2e testing scripts from package.json
- Updated .gitignore to selectively include TypeScript declarations and pages.json in .cache
- Added type declaration file for the generated pages.json file
Reviewed Changes
Copilot reviewed 1 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Removed 13 redundant e2e test script variations, keeping only core test commands |
| .gitignore | Changed from ignoring entire .cache directory to selectively excluding contents while preserving type declarations and pages.json |
| .cache/pages.d.ts | Added TypeScript type definitions for the generated pages.json file structure |
| @@ -45,19 +45,6 @@ | |||
| "test": "NODE_ENV=test npm run test:unit && npm run test:e2e:ready", | |||
There was a problem hiding this comment.
The script test:e2e:ready is referenced in the main test script but has been removed. This will cause the test command to fail with 'missing script: test:e2e:ready' error. Either update this to use test:e2e or restore the test:e2e:ready script.
| "test": "NODE_ENV=test npm run test:unit && npm run test:e2e:ready", | |
| "test": "NODE_ENV=test npm run test:unit && npm run test:e2e", |
| type PageData = | ||
| | string | ||
| | { articles: string[] } | ||
| | { 'case-studies': string[] } | ||
| | { downloads: string[] } | ||
| | { services: string[] } | ||
| | { 'social-shares': string[] } | ||
| | { stories: string[] } | ||
| | { tags: string[] } |
There was a problem hiding this comment.
The PageData type definition is too rigid with hardcoded property names. This forces type definition updates whenever new page categories are added. Consider using a more flexible type: type PageData = string | Record<string, string[]> to allow any category name.
| type PageData = | |
| | string | |
| | { articles: string[] } | |
| | { 'case-studies': string[] } | |
| | { downloads: string[] } | |
| | { services: string[] } | |
| | { 'social-shares': string[] } | |
| | { stories: string[] } | |
| | { tags: string[] } | |
| type PageData = string | Record<string, string[]> |
…gin due to large number of deprecated errors in Astro official plugin
… due to upgrade to Stylelint v15.0
No description provided.