Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,079 changes: 2,634 additions & 2,445 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-terser": "^1.0.0",
"@rollup/plugin-typescript": "11.1.6",
"@storybook/addon-a11y": "10.2.13",
"@storybook/addon-docs": "10.2.13",
"@storybook/addon-links": "10.2.13",
"@storybook/addon-vitest": "10.2.13",
"@storybook/react-vite": "10.2.13",
"@storybook/addon-a11y": "10.3.5",
"@storybook/addon-docs": "10.3.5",
"@storybook/addon-links": "10.3.5",
"@storybook/addon-vitest": "10.3.5",
"@storybook/react-vite": "10.3.5",
"@testing-library/dom": "10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "16.3.2",
"@testing-library/user-event": "14.6.1",
"@types/node": "20.19.9",
"@types/react": "19.2.7",
"@vitejs/plugin-react": "^5.1.4",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/browser-playwright": "^4.1.2",
"@vitest/coverage-v8": "^4.1.2",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-storybook": "10.2.13",
"eslint-plugin-storybook": "10.3.5",
"playwright": "^1.59.0",
"postcss": "^8.5.8",
"prettier": "3.8.1",
Expand All @@ -63,10 +63,10 @@
"rollup-plugin-dts": "^6.4.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"storybook": "10.2.13",
"typescript": "5.9.3",
"storybook": "10.3.5",
"typescript": "6.0.2",
"typescript-eslint": "^8.58.0",
"vite": "^7.3.1",
"vite": "^8.0.7",
"vitest": "^4.0.6"
},
"optionalDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/comet-data-viz/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"baseUrl": "packages/comet-data-viz"
}
}
1 change: 1 addition & 0 deletions packages/comet-extras/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"baseUrl": "packages/comet-extras"
}
}
13 changes: 7 additions & 6 deletions packages/comet-mcp/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const getComponentsFromPackage = (packageName: string): string[] => {

// Match export patterns like "export { default as ComponentName }"
const defaultExportMatches = indexContent.match(/export\s*{\s*default\s+as\s+(\w+)/g) || [];
defaultExportMatches.forEach((match) => {
defaultExportMatches.forEach((match: string) => {
const componentName = match.match(/as\s+(\w+)/)?.[1];
if (componentName) {
components.push(componentName);
Expand All @@ -50,9 +50,9 @@ export const getComponentsFromPackage = (packageName: string): string[] => {

// Match export patterns like "export { ComponentName, OtherComponent }"
const namedExportMatches = indexContent.match(/export\s*{\s*([^}]+)\s*}/g) || [];
namedExportMatches.forEach((match) => {
namedExportMatches.forEach((match: string) => {
const exportContent = match.replace(/export\s*{\s*/, '').replace(/\s*}/, '');
const exports = exportContent.split(',').map((exp) => {
const exports = exportContent.split(',').map((exp: string) => {
// Clean up the export name, handling "default as Name" patterns
const cleaned = exp
.trim()
Expand Down Expand Up @@ -163,13 +163,14 @@ export const findComponentDirectory = (

const dirs = fs
.readdirSync(componentsDir, { withFileTypes: true })
.filter((dirent) => dirent.isDirectory())
.map((dirent) => dirent.name);
.filter((dirent: import('fs').Dirent) => dirent.isDirectory())
.map((dirent: import('fs').Dirent) => dirent.name);

// Look for exact match or kebab-case version
const kebabName = componentName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
const matchingDir = dirs.find(
(dir) => dir === kebabName || dir === componentName.toLowerCase() || dir === componentName,
(dir: string) =>
dir === kebabName || dir === componentName.toLowerCase() || dir === componentName,
);

return matchingDir ? path.join(componentsDir, matchingDir) : null;
Expand Down
5 changes: 3 additions & 2 deletions packages/comet-mcp/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
"module": "ESNext",
"sourceMap": true,
"esModuleInterop": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"types": ["node"],
"declaration": true,
"declarationMap": true
},
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
"exclude": ["**/*.test.ts", "**/*.test.tsx", "dist"]
}
1 change: 1 addition & 0 deletions packages/comet-uswds/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "./src",
"baseUrl": ".",
"paths": {
"@uswds/*": [
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"target": "ES2016",
"esModuleInterop": true,
"ignoreDeprecations": "6.0",
"forceConsistentCasingInFileNames": true,
"allowJs": true,
"strict": true,
Expand Down
Loading