chore: change file structure for split and join commands#2721
chore: change file structure for split and join commands#2721DmitryAnansky wants to merge 3 commits intomainfrom
Conversation
|
602d6af to
074e9fb
Compare
|
e2d4cea to
6af3817
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Unused re-export of
iteratePathItemsfrom index- Removed the unused
iteratePathItemsimport and re-export fromsplit/index.tssince all consumers import it directly from the utils module.
- Removed the unused
Or push these changes by commenting:
@cursor push 3af4bd3de9
Preview (3af4bd3de9)
diff --git a/packages/cli/src/commands/split/index.ts b/packages/cli/src/commands/split/index.ts
--- a/packages/cli/src/commands/split/index.ts
+++ b/packages/cli/src/commands/split/index.ts
@@ -18,7 +18,6 @@
type AnyDefinition,
type SplitArgv,
} from './types.js';
-import { iteratePathItems } from './utils/iterate-path-items.js';
export async function handleSplit({ argv, collectSpecData }: CommandArgs<SplitArgv>) {
const startedAt = performance.now();
@@ -63,4 +62,3 @@
printExecutionTime('split', startedAt, api);
}
-export { iteratePathItems };This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 58005c7. Configure here.
| api: string; | ||
| outDir: string; | ||
| separator: string; | ||
| } & VerifyConfigOptions; |
There was a problem hiding this comment.
Unused re-export of iteratePathItems from index
Low Severity
iteratePathItems is imported and re-exported from index.ts, but no consumer imports it from this path anymore. The only usage in the test file now imports directly from ../utils/iterate-path-items.js, and the only other consumer (split-oas-definition.ts) also imports directly from the utils path. This is dead re-export code left over from the restructuring.
Reviewed by Cursor Bugbot for commit 58005c7. Configure here.



What/Why/How?
Reference
Testing
Screenshots (optional)
Check yourself
Security
Note
Medium Risk
Mostly a structural refactor, but it touches core
split,join, andstatscommand code paths and rewires many imports, so regressions are possible if any module boundaries or constants moved incorrectly.Overview
Refactors the CLI command internals without intended behavior changes. The
splitcommand is broken into spec-specific modules (oas/andasyncapi/) plus sharedutils/, with shared constants moved tosplit/constants.tsand OpenAPI method/component constants moved tosplit/oas/constants.ts.joinis updated to consume the newsplitconstants/utilities (e.g.,COMPONENTS,crawl,startsWithComponents) and its helper imports are renamed/relocated underjoin/utils. Thestatscommand’s output formatting is extracted into a newstats/print-stats/module.Documentation for
splitis updated to reflect support for OpenAPI 3.x and AsyncAPI 2.x/3.x and to describe what gets split for each spec.Reviewed by Cursor Bugbot for commit 58005c7. Bugbot is set up for automated code reviews on this repo. Configure here.