Repository navigation
Description
Description
We have approval from the codeowners of diff and cli.
More details here:
asyncapi/diff#226
#2251
We are proceeding with the merger.
Migrate @asyncapi/diff into asyncapi/cli as packages/diff/.
We will assess whether any changes are needed so the library fits the CLI repo. If a breaking change is needed, we will bump the major version. We did this for @asyncapi/optimizer when it moved into CLI, so it could align with how the CLI works.
Action items
- Move code into
cli(packages/diff/) - Update
turbo.json/ monorepo wiring for the new package - Point root CLI dependency at the workspace package (today
"@asyncapi/diff": "^0.5.0") - Update repo-related details in the diff
package.json(repository URL and other related fields as needed) - Merge CODEOWNERS into
cli - Add a spec for
diff(see below) - Update other relevant files as needed, such as the README and architecture docs
- Sanity check the
diffrepo and its code. Explore it and note anything else we should be aware of before/during the move - Assess and identify any changes needed so
diffaligns with the CLI repo. If a breaking change is needed, bump the major version (same as optimizer) - Update the CLI
diffcommand and server-api/diffso they use the workspace package after the move - Update the test pipeline so the
diffpackage tests run incli, and check that existing CLIdiffand server-api tests still pass - Sort out releases so
@asyncapi/diffpublishes fromcli(update the release pipeline so it can releasediff) - Make the npm changes: update relevant fields, add/update the trusted publisher in NPM, and check NPM portal settings
- Test the release
Out of scope: Archiving the diff repo.
Spec
The reason we are consolidating these repos and the broader community goal of auditing, is to improve repo health and maintainability, bring on more maintainers, and eventually reduce maintainer burnout.
As part of that, we are adding specs in these repos. Specs act as a source of truth for contributors, and more importantly give AI context about the package. That should help anyone developing here, whatever approach they follow: pure vibe coding, pure spec-driven, or a mix of both.
Notes on references inside cli
What does need updating: root package.json currently has "@asyncapi/diff": "^0.5.0" (npm). After migration it should use the local workspace package, so builds/tests resolve to packages/diff instead of registry.npmjs.org.
The CLI diff command currently imports from @asyncapi/diff/lib/asyncapidiff. After the move, use the normal package export instead.
cli/openapi.yaml is the API spec for the CLI's server-api (it documents a /diff endpoint). It currently links to the standalone asyncapi/diff GitHub repo. Update that link, and other docs/README links, to the monorepo path.
Check Docker and the GitHub Action image. If they need changes for diff.
The CLI has a shared output / error-code convention. Assess how diff (the library and the asyncapi diff command) should follow that, same as we did for optimizer.
References
- https://github.com/asyncapi/diff
- https://github.com/asyncapi/cli
- Prior art: [Community Goal 2026] [S1] Move optimizer into the CLI optimizer#306
- Prior art: [Community Goal 2026] [S1] Migrate
@asyncapi/openapi-schema-parserinto theparser-jsopenapi-schema-parser#326
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsCompleted
- StatusShow more project fieldsDone
Activity
princerajpoot20 commentedon Sep 20, 2026
I will be working on this.
princerajpoot20 commentedon Sep 20, 2026
Reason for the Advanced Classification
The Advanced Classification is required because of the following list of work that needs to be completed in order to resolve this issue:
diffpackage tests run incli, and check that existing CLIdiffand server-api tests still pass.cli(update the release pipeline so it can releasediff), and make the NPM changes (trusted publisher and portal settings).package.json.diff.aeworxet commentedon Sep 21, 2026
This GitHub issue has been submitted for participation in the Microgrant Program with the
AdvancedComplexity Level.To carry out the community pre-moderation, please independently assess whether this issue has been classified correctly according to the reasoning outlined in #2303 (comment).
@AceTheCreator
aeworxet commentedon Sep 21, 2026
Microgrant Issue's service comment
Text labels:
microgrant/2026-10,microgrant/advanced,microgrant/codingAssignment to regular contributors after: 2026-09-25 00:00:00 UTC+12:00
End Of Life after: 2026-10-31 23:59:59 UTC-12:00
@asyncapi/microgrant_team
The Microgrant Program is not a Mentorship Program. The accepted level of Microgrant Program Participants is Middle/Senior.
Regular contributors should explain in clear terms how they will approach the resolution process when expressing interest in working on this Microgrant Issue.
References: Microgrant Program 101, Microgrant Program Rules
aeworxet commentedon Sep 21, 2026
Following the expression of interest in working on this Microgrant Issue, @princerajpoot20 (
githubID: 44585452) is an AsyncAPI Maintainer specified in the file https://github.com/asyncapi/community/blob/master/MAINTAINERS.yaml, so they fall under the first category in the prioritization list.Shurtu-gal commentedon Sep 22, 2026
Before we start migration of diff. Some stuff would need to be addressed first:
princerajpoot20 commentedon Sep 22, 2026
@aayushmau5, @magicmatatjahu, and @derberg, as this is a change in where the code resides, not in the responsibility. I am also willing to help as a code owner if that helps.neoandmatrix commentedon Sep 27, 2026
Sorry for the delayed response. Here are the proposed codes.
INTERNAL_ERROR: 1,
ASYNCAPI_DOCUMENT_INVALID: 10,
DOCUMENT_PARSE_FAILED: 10,
DOCUMENT_SYNTAX_INVALID: 10,
SCHEMA_VALIDATION_FAILED: 11,
GOVERNANCE_VALIDATION_FAILED: 11,
REFERENCE_RESOLUTION_FAILED: 12,
REMOTE_REFERENCE_INVALID: 12,
DOCUMENT_FORMAT_UNSUPPORTED: 13,
DOCUMENT_ALREADY_IN_TARGET_FORMAT: 13,
DOCUMENT_VERSION_UNSUPPORTED: 14,
CONVERSION_DOWNGRADE_UNSUPPORTED: 14,
DIFF_VERSION_MISMATCH: 14,
DIAGNOSTICS_FORMAT_INVALID: 15,
DIAGNOSTICS_EXTENSION_MISMATCH: 15,
DIFF_OVERRIDE_INVALID: 16,
BREAKING_CHANGES_DETECTED: 17,
TEMPLATE_NOT_FOUND: 20,
GENERATION_FAILED: 21,
MODEL_GENERATION_FAILED: 21,
TEMPLATE_COPY_FAILED: 21,
GENERATION_LANGUAGE_UNSUPPORTED: 22,
TEMPLATE_DOCUMENT_VERSION_UNSUPPORTED: 23,
GENERATOR_PARAMETER_INVALID: 24,
GENERATOR_HOOK_INVALID: 24,
GENERATOR_BASE_URL_MAPPING_INVALID: 24,
GENERATION_OUTPUT_UNSAFE: 25,
GENERATOR_REGISTRY_INVALID: 26,
GENERATED_REFERENCE_READ_FAILED: 27,
FILE_NOT_FOUND: 30,
SPEC_FILE_NOT_FOUND: 30,
OVERRIDE_FILE_NOT_FOUND: 30,
FILE_PERMISSION_DENIED: 31,
FILE_ALREADY_EXISTS: 32,
DIRECTORY_ALREADY_EXISTS: 32,
CONTEXT_ALREADY_EXISTS: 32,
FILE_EXTENSION_UNSUPPORTED: 33,
FILE_READ_FAILED: 34,
FILE_WRITE_FAILED: 35,
DIRECTORY_CREATE_FAILED: 35,
FILE_SERIALIZATION_FAILED: 36,
TEMP_DIRECTORY_FAILED: 37,
CONNECTION_FAILED: 40,
URL_FETCH_FAILED: 40,
REGISTRY_UNREACHABLE: 40,
NETWORK_TIMEOUT: 41,
REGISTRY_TIMEOUT: 41,
PROXY_ERROR: 42,
PROXY_CONFIGURATION_INVALID: 42,
HTTP_RESPONSE_ERROR: 43,
REMOTE_REFERENCE_FETCH_FAILED: 44,
GITHUB_DOWNLOAD_URL_MISSING: 44,
REGISTRY_AUTH_REQUIRED: 45,
REGISTRY_AUTH_FAILED: 45,
STUDIO_INSTALL_DOWNLOAD_FAILED: 46,
CLI_ARGUMENT_REQUIRED: 50,
CLI_INPUT_REQUIRED: 50,
CLI_FLAG_INVALID: 51,
CLI_FLAG_VALUE_INVALID: 51,
CLI_INTEGER_INVALID: 51,
CLI_OPTIONS_CONFLICT: 52,
CONTEXT_FILE_NOT_FOUND: 53,
CONFIG_FILE_NOT_FOUND: 53,
CONTEXT_FILE_INVALID: 54,
CONTEXT_FILE_EMPTY: 54,
CONFIG_FILE_INVALID: 54,
CONTEXT_NOT_FOUND: 55,
CURRENT_CONTEXT_NOT_SET: 56,
CONFIG_READ_FAILED: 57,
CONFIG_WRITE_FAILED: 58,
STUDIO_INSTALL_DECLINED: 59,
SERVER_PORT_IN_USE: 60,
SERVER_START_FAILED: 61,
STUDIO_RUNTIME_UNAVAILABLE: 62,
STUDIO_NOT_INSTALLED: 62,
PREVIEW_BUNDLE_FAILED: 63,
WATCH_SOURCE_REMOVED: 64,
WATCH_REGENERATION_FAILED: 64,
WEBSOCKET_PROTOCOL_ERROR: 65,
DEPENDENCY_ERROR: 90,
INTERNAL_STATE_ERROR: 91,
INTERNAL_CONFIGURATION_ERROR: 92,
COMMAND_NOT_FOUND: 127,
INTERRUPTED: 130
I also have raised a PR it still needs some cleanup. Will be done soon.
aeworxet commentedon Oct 2, 2026
Microgrant Issue's Assigned Timeline
Please note that the dates given represent deadlines, not specific dates; so if the goal is reached sooner, it's better.
Keep in mind the responsibility for violations of the Timeline.
Assignee: @princerajpoot20 (
githubID: 44585452)princerajpoot20 commentedon Oct 4, 2026
PR ready for review: #2310
princerajpoot20 commentedon Oct 14, 2026
The npm release workflow failed earlier, it’s green now: https://github.com/asyncapi/cli/actions/runs/38197559549/job/115875266136.
Upon analyzing the issue, I found that it was related to the trusted publisher settings. I had already made the required changes, but the reason the release failed was that npm’s trusted publisher settings have a time interval within which you need to make a new release from the new source.
I updated those settings well before the release, so the trusted publisher configuration expired. I re-added it, and now it’s working fine.
For reference, this is the time interval in the npm settings I’m referring to.
princerajpoot20 commentedon Oct 14, 2026
Verification
New versions of diff (0.6.0) have been successfully published to npm.
https://www.npmjs.com/package/@asyncapi/diff
princerajpoot20 commentedon Oct 14, 2026
@aeworxet This microgrant issue has been completed.
aeworxet commentedon Oct 15, 2026
Microgrant Issue Is Completed 🎉
@princerajpoot20 (
githubID: 44585452), please go to the dedicated AsyncAPI Microgrant Program2026-10page on Open Collective and submit an invoice forUSD 400.00(button 'ACTIONS', dropdown option 'Submit expense') with the full URL of this Microgrant Issue as the item description, the invoice titleMicrogrant cli#2303, and the tagmicrogrant.After submitting the invoice, please post the link to it in this Microgrant Issue as a separate comment to verify the invoice's authorship.
princerajpoot20 commentedon Nov 1, 2026
Here is the invoice: https://opencollective.com/asyncapi/projects/asyncapi-microgrant-program/expenses/352895
cc: @aeworxet
aeworxet commentedon Nov 2, 2026
princerajpoot20https://opencollective.com/asyncapi/projects/asyncapi-microgrant-program/expenses/352895✅
The invoice https://opencollective.com/asyncapi/projects/asyncapi-microgrant-program/expenses/352895 was submitted by @princerajpoot20 (
githubID: 44585452), who was the AsyncAPI Microgrant Program2026-10Participant and completed the Microgrant Issuecli#2303.