Skip to content

Commit

Permalink
Add release notes for 0.56.0 (#3294)
Browse files Browse the repository at this point in the history
Fixed up cspell not validating `.chronus` and causing some typo in
release notes

---------

Co-authored-by: Brian Terlson <[email protected]>
  • Loading branch information
timotheeguerin and bterlson authored May 7, 2024
1 parent b1e6a64 commit 21edcb8
Show file tree
Hide file tree
Showing 14 changed files with 177 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .chronus/changes/body-consitency-2024-2-27-18-35-44-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ packages:
- "@typespec/http"
---

Empty model after removing metadata and visibility property result in void always
Empty model after removing metadata and applying visibility always results in "void"
This means the following case have changed from returning `{}` to no body

```tsp
Expand Down
4 changes: 2 additions & 2 deletions .chronus/changes/body-consitency-2024-2-27-18-35-44.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ packages:

`@body` means this is the body

This change makes it that using `@body` will mean exactly this is the body and everything underneath will be included, including metadata properties. It will log a warning explaining that.
This change makes using `@body` mean this is the exact body and everything underneath will be included, including metadata properties. If metadata properties are present on the body, a warning will be logged.

```tsp
op a1(): {@body _: {@header foo: string, other: string} };
^ warning header in a body, it will not be included as a header.
```

Solution use `@bodyRoot` as the goal is only to change where to resolve the body from.
Use `@bodyRoot` if you want to only change where to resolve the body from.

```tsp
op a1(): {@bodyRoot _: {@header foo: string, other: string} };
Expand Down
2 changes: 1 addition & 1 deletion .chronus/changes/body-consitency-2024-3-2-15-21-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ packages:
- "@typespec/rest"
---

Add supoort for new `@bodyRoot` and `@body` distinction
Add support for new `@bodyRoot` and `@body` distinction
2 changes: 1 addition & 1 deletion .chronus/changes/feature-xml-2024-3-8-20-40-16.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ packages:
- "@typespec/compiler"
---

`getEncode` returns the fully equalied enum member name if using a custom enum.
`getEncode` returns the fully qualified enum member name if using a custom enum.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ packages:
- "@typespec/compiler"
---

Model with an optional property should not be satisfy a constraint with that property required. (`{foo?: string}` cannot be assigned to a constraint of `{foo: string}`)
Model with an optional property should not satisfy a constraint with that property required. (`{foo?: string}` cannot be assigned to a constraint of `{foo: string}`)
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ packages:
- "@typespec/compiler"
---

Fix: Model with spread indexer shouldn't validate explicit properites
Fix: Model with spread indexer shouldn't validate explicit properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ packages:
- "@typespec/http"
---

Fix: `@path` property shouldn't be applicableMetadata if the visibility contain `Read`
Fix: `@path` property shouldn't be applicableMetadata if the visibility contains `Read`
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ packages:
- "@typespec/versioning"
---

Fix crash when `@service` inside a versioned namespace
Fix crash when `@service` appears inside a versioned namespace
2 changes: 1 addition & 1 deletion .chronus/changes/spread-source-2024-3-18-18-19-45.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
changeKind: feature
packages:
- "@typespec/compiler"
---
Expand Down
2 changes: 1 addition & 1 deletion .chronus/changes/spread-source-2024-3-18-18-49-3.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
changeKind: feature
packages:
- "@typespec/html-program-viewer"
---
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn.lock merge=binary linguist-generated=true
common/config/rush/repo-state.json merge=binary linguist-generated=true

# docs/spec.html is also generated and not worth resolving line by line or
# reviewing or having its diff uncollpased on GitHub. On conflict, pick either
# reviewing or having its diff uncollapsed on GitHub. On conflict, pick either
# side and rebuild to regenerate.
docs/spec.html merge=binary linguist-generated=true

Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: 🐞 Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug"]
# projects: ["octo-org/1", "octo-org/44"]
body:
- type: markdown
attributes:
Expand Down
8 changes: 8 additions & 0 deletions cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ words:
- xlarge
- xplat
- TCGC
- VITE
- uncollapsed
ignorePaths:
- "**/node_modules/**"
- "**/dist/**"
Expand All @@ -127,8 +129,14 @@ ignorePaths:
- packages/compiler/test/formatter/scenarios/**
- pnpm-lock.yaml
- "**/*.mp4"
- ".git/**"
- ".gitignore"
- ".vscode/**"
- ".editorconfig"
- .github/CODEOWNERS
- packages/samples/test/output/**
useGitignore: true
enableGlobDot: true
enableFiletypes:
- cadl
patterns:
Expand Down
157 changes: 157 additions & 0 deletions docs/release-notes/release-2024-05-07.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
title: 0.56 - May 2024
---

# Release Notes Version 0.56 - May 2024

:::warning
This release contains breaking changes
:::

## Breaking Changes

### @typespec/http

- [#2945](https://github.com/microsoft/typespec/pull/2945) Empty model after removing metadata and applying visibility always results in "void"
This means the following case have changed from returning `{}` to no body

```tsp
op b1(): {};
op b2(): {
@visibility("none") prop: string;
};
op b3(): {
@added(Versions.v2) prop: string;
};
```

Workaround: Use explicit `@body`

```tsp
op b1(): {
@body _: {};
};
op b2(): {
@body _: {
@visibility("none") prop: string;
};
};
op b3(): {
@body _: {
@added(Versions.v2) prop: string;
};
};
```

- [#2945](https://github.com/microsoft/typespec/pull/2945) Implicit status code always 200 except if response is explicitly `void`

```tsp
op c1(): {
@header foo: string;
}; // status code 200 (used to be 204)
```

Solution: Add explicit `@statusCode`

```tsp
op c1(): {
@header foo: string;
@statusCode _: 204;
};
op c1(): {
@header foo: string;
...NoContent;
}; // or spread common model
```

- [#2945](https://github.com/microsoft/typespec/pull/2945) `@body` means this is the body

This change makes using `@body` mean this is the exact body and everything underneath will be included, including metadata properties. If metadata properties are present on the body, a warning will be logged.

```tsp
op a1(): {@body _: {@header foo: string, other: string} };
^ warning header in a body, it will not be included as a header.
```

Use `@bodyRoot` if you want to only change where to resolve the body from.

```tsp
op a1(): {
@bodyRoot _: {
@header foo: string;
other: string;
};
};
```

- [#2945](https://github.com/microsoft/typespec/pull/2945) Properties are not automatically omitted if everything was removed from metadata or visibility

```tsp
op d1(): {
headers: {
@header foo: string;
};
}; // body will be {headers: {}}
```

Solution: use `@bodyIgnore`

```tsp
op d1(): {
@bodyIgnore headers: {
@header foo: string;
};
}; // body will be {headers: {}}
```

## Features

### @typespec/compiler

- [#3035](https://github.com/microsoft/typespec/pull/3035) `getEncode` returns the fully qualified enum member name if using a custom enum.
- [#3183](https://github.com/microsoft/typespec/pull/3183) Show template parameters when hovering on an operation template
- [#3191](https://github.com/microsoft/typespec/pull/3191) [API] Add new `sourceModels` property to model

### @typespec/rest

- [#2945](https://github.com/microsoft/typespec/pull/2945) Add support for new `@bodyRoot` and `@body` distinction

### @typespec/openapi3

- [#2945](https://github.com/microsoft/typespec/pull/2945) Add support for new `@bodyRoot` and `@body` distinction

### @typespec/html-program-viewer

- [#3191](https://github.com/microsoft/typespec/pull/3191) Add `sourceModels` property to model view

## Bug Fixes

### @typespec/compiler

- [#3170](https://github.com/microsoft/typespec/pull/3170) `--nostdlib` flag will now work by only applying to optional standard library types
- [#3212](https://github.com/microsoft/typespec/pull/3212) Fix: augmenting template model property could result in sending invalid argument to decorator
- [#3188](https://github.com/microsoft/typespec/pull/3188) Fix: Do not crash when trying to access member of aliased expressions
- [#3185](https://github.com/microsoft/typespec/pull/3185) Fix tsp init hanging when done due to unclosed connection
- [#3151](https://github.com/microsoft/typespec/pull/3151) IDE: Fix completion of statement keywords
- [#3287](https://github.com/microsoft/typespec/pull/3287) Templated interface extending another templated interface shouldn't run decorator on their operations
- [#3290](https://github.com/microsoft/typespec/pull/3290) Model with an optional property should not satisfy a constraint with that property required. (`{foo?: string}` cannot be assigned to a constraint of `{foo: string}`)
- [#3163](https://github.com/microsoft/typespec/pull/3163) Fix: Model with spread indexer shouldn't validate explicit properties
- [#3227](https://github.com/microsoft/typespec/pull/3227) Stop running decorators on partially instantiated operations(When interface is instantiated but not the operation)
- [#3180](https://github.com/microsoft/typespec/pull/3180) Fix issue where directives were not parsed to the leaf node in multi-segment Namespace segments.
- [#3243](https://github.com/microsoft/typespec/pull/3243) Fix calling `tsp install` on windows due to recent NodeJS breaking change to fix vulnerability.
- [#3216](https://github.com/microsoft/typespec/pull/3216) Fix compiler crash when using an invalid `is` target in an interface operation template
- [#3246](https://github.com/microsoft/typespec/pull/3246) Internals: Use node built-in `fetch` API that is now stable since node `18.13.0`

### @typespec/http

- [#3196](https://github.com/microsoft/typespec/pull/3196) Fix password flow defining `authorizationUrl` instead of `tokenUrl`
- [#3190](https://github.com/microsoft/typespec/pull/3190) Fix `@path` param mapping when spreading a record in operation parameters
- [#3218](https://github.com/microsoft/typespec/pull/3218) Fix: `@path` property shouldn't be applicableMetadata if the visibility contains `Read`

### @typespec/versioning

- [#3264](https://github.com/microsoft/typespec/pull/3264) Fix crash when `@service` appears inside a versioned namespace

### @typespec/openapi3

- [#3218](https://github.com/microsoft/typespec/pull/3218) Fix: `@path` property should be included in unreachable models

0 comments on commit 21edcb8

Please sign in to comment.