Repository navigation
Make emitter-framework language-specific Alloy peers optional #12495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
5
commits into
main
Choose a base branch
from
copilot/make-alloy-peer-dependencies-optional
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+49
−26
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8bc542e
Initial plan
Copilot 346825c
fix(emitter-framework): make language-specific Alloy peers optional
Copilot 68fca68
docs(emitter-framework): add optional Alloy peers changelog
Copilot 25a0fce
fix(emitter-framework): isolate TypeScript override prop types
timotheeguerin 8aa28d8
Merge branch 'main' into copilot/make-alloy-peer-dependencies-optional
timotheeguerin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...onus/changes/copilot-make-alloy-peer-dependencies-optional-2026-10-4-20-9-29.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| changeKind: fix | ||
| packages: | ||
| - "@typespec/emitter-framework" | ||
| --- | ||
|
|
||
| Make language-specific Alloy peer dependencies optional so emitters only need to install the language packages they use, while keeping Alloy core and the TypeSpec compiler required. The TypeScript-specific `Experimental_CustomTypeToProps` type is exported from the TypeScript entry point rather than the root entry point. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/emitter-framework/src/typescript/component-overrides.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import type { ObjectPropertyProps, VarDeclarationProps } from "@alloy-js/typescript"; | ||
| import type { | ||
| Enum, | ||
| EnumMember, | ||
| Model, | ||
| ModelProperty, | ||
| Scalar, | ||
| Type, | ||
| Union, | ||
| UnionVariant, | ||
| } from "@typespec/compiler"; | ||
|
|
||
| /** Maps TypeSpec shapes to the corresponding TypeScript declaration props. */ | ||
| export type Experimental_CustomTypeToProps<TCustomType extends Type> = | ||
| TCustomType extends ModelProperty | ||
| ? ObjectPropertyProps | ||
| : TCustomType extends EnumMember | ||
| ? {} | ||
| : TCustomType extends UnionVariant | ||
| ? {} | ||
|
Comment on lines
+18
to
+20
|
||
| : TCustomType extends Model | Scalar | Union | Enum | ||
| ? VarDeclarationProps | ||
| : VarDeclarationProps | ObjectPropertyProps; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| export * from "./component-overrides.js"; | ||
| export * from "./components/index.js"; | ||
| export * from "./utils/index.js"; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot looks like we might need to reorganize somethings to make this work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved
Experimental_CustomTypeToPropsto the TypeScript entry point, keeping the root declarations independent of@alloy-js/typescript. Verified with commit25a0fce7.