claudex-setup 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/setup.js +44 -0
- package/src/techniques.js +2 -0
package/package.json
CHANGED
package/src/setup.js
CHANGED
|
@@ -95,6 +95,17 @@ function detectDependencies(ctx) {
|
|
|
95
95
|
guidelines.push('- Use Playwright for E2E tests. Keep tests in tests/ or e2e/');
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
// Testing tools
|
|
99
|
+
if (allDeps['msw']) {
|
|
100
|
+
guidelines.push('- Use MSW (Mock Service Worker) for API mocking in tests. Define handlers in __mocks__/');
|
|
101
|
+
}
|
|
102
|
+
if (allDeps['@testing-library/react']) {
|
|
103
|
+
guidelines.push('- Use Testing Library for component tests. Prefer userEvent over fireEvent, query by role/label');
|
|
104
|
+
}
|
|
105
|
+
if (allDeps['@vitest/coverage-v8'] || allDeps['@vitest/coverage-istanbul']) {
|
|
106
|
+
guidelines.push('- Coverage configured. Maintain coverage thresholds. Check reports before merging');
|
|
107
|
+
}
|
|
108
|
+
|
|
98
109
|
// tRPC
|
|
99
110
|
if (allDeps['@trpc/server'] || allDeps['@trpc/client']) {
|
|
100
111
|
guidelines.push('- Use tRPC for type-safe API calls. Define routers in server, use client hooks in components');
|
|
@@ -213,6 +224,23 @@ function detectDependencies(ctx) {
|
|
|
213
224
|
guidelines.push('- Lambda handlers: keep cold start fast, use layers for deps, set appropriate memory/timeout');
|
|
214
225
|
}
|
|
215
226
|
|
|
227
|
+
// Deprecated dependency warnings
|
|
228
|
+
if (allDeps['moment']) {
|
|
229
|
+
guidelines.push('- ⚠️ moment.js is deprecated and heavy (330KB). Migrate to date-fns or dayjs');
|
|
230
|
+
}
|
|
231
|
+
if (allDeps['request']) {
|
|
232
|
+
guidelines.push('- ⚠️ request is deprecated. Use fetch (native) or axios instead');
|
|
233
|
+
}
|
|
234
|
+
if (allDeps['lodash'] && !allDeps['lodash-es']) {
|
|
235
|
+
guidelines.push('- Consider replacing lodash with native JS methods or lodash-es for tree-shaking');
|
|
236
|
+
}
|
|
237
|
+
if (allDeps['node-sass']) {
|
|
238
|
+
guidelines.push('- ⚠️ node-sass is deprecated. Migrate to sass (dart-sass)');
|
|
239
|
+
}
|
|
240
|
+
if (allDeps['tslint']) {
|
|
241
|
+
guidelines.push('- ⚠️ TSLint is deprecated. Migrate to ESLint with @typescript-eslint');
|
|
242
|
+
}
|
|
243
|
+
|
|
216
244
|
return guidelines;
|
|
217
245
|
}
|
|
218
246
|
|
|
@@ -473,6 +501,22 @@ function getFrameworkInstructions(stacks) {
|
|
|
473
501
|
- Organize: cmd/ for entry points, internal/ for private packages, pkg/ for public`);
|
|
474
502
|
}
|
|
475
503
|
|
|
504
|
+
if (stackKeys.includes('cpp')) {
|
|
505
|
+
sections.push(`### C++
|
|
506
|
+
- Follow project coding standards (check .clang-format if present)
|
|
507
|
+
- Use smart pointers (unique_ptr, shared_ptr) over raw pointers
|
|
508
|
+
- Run clang-tidy for static analysis
|
|
509
|
+
- Prefer const references for function parameters
|
|
510
|
+
- Use CMake targets, not raw compiler flags`);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
if (stackKeys.includes('bazel')) {
|
|
514
|
+
sections.push(`### Bazel
|
|
515
|
+
- Define BUILD files per package. Keep targets focused
|
|
516
|
+
- Use visibility carefully — prefer package-private
|
|
517
|
+
- Run buildifier for formatting`);
|
|
518
|
+
}
|
|
519
|
+
|
|
476
520
|
if (stackKeys.includes('terraform')) {
|
|
477
521
|
sections.push(`### Terraform
|
|
478
522
|
- Use modules for reusable infrastructure components
|
package/src/techniques.js
CHANGED
|
@@ -955,6 +955,8 @@ const STACKS = {
|
|
|
955
955
|
swift: { files: ['Package.swift'], content: {}, label: 'Swift' },
|
|
956
956
|
terraform: { files: ['main.tf', 'terraform'], content: {}, label: 'Terraform' },
|
|
957
957
|
kubernetes: { files: ['k8s', 'kubernetes', 'helm'], content: {}, label: 'Kubernetes' },
|
|
958
|
+
cpp: { files: ['CMakeLists.txt', 'Makefile', '.clang-format'], content: {}, label: 'C++' },
|
|
959
|
+
bazel: { files: ['BUILD', 'WORKSPACE', 'BUILD.bazel', 'WORKSPACE.bazel'], content: {}, label: 'Bazel' },
|
|
958
960
|
};
|
|
959
961
|
|
|
960
962
|
module.exports = { TECHNIQUES, STACKS };
|