Skip to content

Commit 6e9f4a0

Browse files
authored
Merge branch 'main' into copilot/fix-tagmetadata-generation
2 parents e4b789c + 1d5f379 commit 6e9f4a0

175 files changed

Lines changed: 6555 additions & 2500 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
3+
changeKind: feature
4+
packages:
5+
- "@typespec/http"
6+
---
7+
8+
[API] Operation returning a union of types without status code or content type will be treated as a single response
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
3+
changeKind: fix
4+
packages:
5+
- "@typespec/openapi3"
6+
---
7+
8+
Fix examples when operation return type have union of response mapping to same status code
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
3+
changeKind: feature
4+
packages:
5+
- "@typespec/bundler"
6+
---
7+
8+
Add support for alloy based emitters
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: fix
3+
packages:
4+
- "@typespec/compiler"
5+
---
6+
7+
Fix server crashes caused by undefined symbol declarations: add null checks for `getSymNode()` in hover, completion, type-details, and type-signature handlers, and use fallback name for empty DocumentSymbol names
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@typespec/http"
5+
---
6+
7+
Do not emit deprecated-implicit-optionality on op is
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@typespec/http-client-python"
5+
---
6+
7+
Fix `run_batch.py` passing string `"true"`/`"false"` values to pygen, which caused `keep-setup-py="false"` to be treated as truthy and generate `setup.py` instead of `pyproject.toml` for all regenerated test packages.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: fix
3+
packages:
4+
- typespec-vscode
5+
---
6+
7+
Handle unhandled exceptions in VS Code extension: add custom error handler for server crashes with restart notification, wrap commands with graceful exception handling, and add null guards to prevent extension host errors when LSP client is unavailable
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: fix
3+
packages:
4+
- "@typespec/tspd"
5+
---
6+
7+
Fix broken (404) links to linter rule pages on auto-generated linter reference pages. The links no longer drop the website base path.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
changeKind: feature
3+
packages:
4+
- "@typespec/compiler"
5+
---
6+
7+
Add support for configurable options on linter rules
8+
9+
Linter rules can now define typed options with defaults using `defaultOptions`, and users can pass options when enabling rules in `tspconfig.yaml` or rulesets.
10+
11+
**Defining a rule with options:**
12+
13+
```ts
14+
const myRule = createRule({
15+
name: "no-model-with-name",
16+
severity: "warning",
17+
description: "Bans models with a specific name",
18+
messages: { default: "This model name is not allowed" },
19+
defaultOptions: { bannedName: "Foo" },
20+
create(context) {
21+
return {
22+
model: (target) => {
23+
if (target.name === context.options.bannedName) {
24+
context.reportDiagnostic({ target });
25+
}
26+
},
27+
};
28+
},
29+
});
30+
```
31+
32+
**Configuring options in `tspconfig.yaml`:**
33+
34+
```yaml
35+
linter:
36+
enable:
37+
# Enable with default options
38+
"@typespec/my-lib/no-model-with-name": true
39+
# Enable with custom options
40+
"@typespec/my-lib/no-model-with-name":
41+
bannedName: "Bar"
42+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
changeKind: feature
3+
packages:
4+
- "@typespec/protobuf"
5+
---
6+
7+
Map TypeSpec optionality (`?`) to protobuf `optional` where appropriate.
8+
9+
- `optional` is applied to fields with protobuf scalar types to set explicit presence.
10+
- `optional` is _not_ applied to fields with message types, because they _always_ have explicit presence.
11+
- Attempting to convert a TypeSpec optional property where the type is an array or `Protobuf.Map` instance produces a warning, because protobuf cannot differentiate between "empty" and "unset" `repeated`/`map`-typed fields.

0 commit comments

Comments
 (0)