diff --git a/packages/typespec-client-generator-core/CHANGELOG.md b/packages/typespec-client-generator-core/CHANGELOG.md index 08be7ba01f..36e6f3b764 100644 --- a/packages/typespec-client-generator-core/CHANGELOG.md +++ b/packages/typespec-client-generator-core/CHANGELOG.md @@ -69,6 +69,7 @@ - [#1663](https://github.com/Azure/typespec-azure/pull/1663) Upgrade dependencies + ## 0.47.4 ### Bug Fixes @@ -80,6 +81,7 @@ - [#1772](https://github.com/Azure/typespec-azure/pull/1772) use array instead of set to make the types ordered by typespec definition - [#1762](https://github.com/Azure/typespec-azure/pull/1762) make union/nullable type to be reference type and add usage/access support for them + ## 0.47.3 ### Bug Fixes @@ -87,18 +89,21 @@ - [#1731](https://github.com/Azure/typespec-azure/pull/1731) fix wrong compare target for response body with anonymous model when finding anonymous model context - [#1698](https://github.com/Azure/typespec-azure/pull/1698) have paging respect renames + ## 0.47.2 ### Bug Fixes - [#1606](https://github.com/Azure/typespec-azure/pull/1606) overwrite original value when set multiple value for same decorator + ## 0.47.1 ### Bug Fixes - [#1659](https://github.com/Azure/typespec-azure/pull/1659) remove projection for source model since typespec core has already fixed the issue + ## 0.47.0 ### Bug Fixes @@ -125,14 +130,16 @@ - [#1560](https://github.com/Azure/typespec-azure/pull/1560) Remove `.description` and `.details` from deprecated api surface + ## 0.46.2 ### Bug Fixes - [#1592](https://github.com/Azure/typespec-azure/pull/1592) change example mapping logic to allow operation id with/without renaming - [#1589](https://github.com/Azure/typespec-azure/pull/1589) In `0.46.1` we changed the type of `responses` in `SdkHttpOperation` from `Map` to `SdkHttpResponse[]`, `exceptions` in `SdkHttpOperation` from `Map` to `SdkHttpResponse[]`, - and added a `statusCodes` property to `SdkHttpResponse`. But the `statusCodes` is defined as `number | HttpRange | "*"`, which loses the information that the responses in `responses` property could never have a `*` as its statusCodes. - This PR adds a new type `SdkHttpErrorResponse` with the `statusCodes` of `number | HttpRange | "*"`, and changes the type of `statusCodes` in `SdkHttpResponse` to `number | HttpRange` to be precise. +and added a `statusCodes` property to `SdkHttpResponse`. But the `statusCodes` is defined as `number | HttpRange | "*"`, which loses the information that the responses in `responses` property could never have a `*` as its statusCodes. +This PR adds a new type `SdkHttpErrorResponse` with the `statusCodes` of `number | HttpRange | "*"`, and changes the type of `statusCodes` in `SdkHttpResponse` to `number | HttpRange` to be precise. + ## 0.46.1 @@ -149,8 +156,8 @@ 1. The type of `responses` and `exceptions` in `SdkHttpOperation` changed from `Map` to `SdkHttpResponse[]`. 2. The type of `responses` in `SdkHttpOperationExample` changed from `Map` to `SdkHttpResponseExampleValue[]`. 3. `SdkHttpResponse` adds a new property `statusCodes` to store its corresponding status code or status code range. - Migration hints: - The type changed from map to array, and the key of the map is moved as a new property of the value type. For example, for code like this: + Migration hints: + The type changed from map to array, and the key of the map is moved as a new property of the value type. For example, for code like this: ``` for (const [statusCodes, response] of operation.responses) ``` @@ -172,6 +179,7 @@ 2. no longer use the value of `kind` as `encode` when there is no encode on this type. - [#1541](https://github.com/Azure/typespec-azure/pull/1541) no longer export the `SdkExampleValueBase` interface. This type should have no usage in downstream consumer's code. If there is any usage, please replace it with `SdkExampleValue`. + ## 0.46.0 ### Bug Fixes @@ -209,12 +217,14 @@ - [#1451](https://github.com/Azure/typespec-azure/pull/1451) Have no client parameters appear on method signatures - [#1420](https://github.com/Azure/typespec-azure/pull/1420) clean up deprecation exports of previous version + ## 0.45.4 ### Bug Fixes - [#1392](https://github.com/Azure/typespec-azure/pull/1392) Fix multipart for client customization + ## 0.45.3 ### Bug Fixes @@ -227,6 +237,7 @@ - [#1363](https://github.com/Azure/typespec-azure/pull/1363) URI template support + ## 0.45.2 ### Bug Fixes @@ -235,12 +246,14 @@ - [#1350](https://github.com/Azure/typespec-azure/pull/1350) Bug fix for encode as string on ModelProperty. - [#1343](https://github.com/Azure/typespec-azure/pull/1343) Add generic parameter inputs to `SdkUnionType` to clearly define the union types of `endpoint` and `credential` params + ## 0.45.1 ### Bug Fixes - [#1330](https://github.com/Azure/typespec-azure/pull/1330) Fix collectionFormat for "csv" + ## 0.45.0 ### Bug Fixes @@ -260,6 +273,7 @@ - [#1155](https://github.com/Azure/typespec-azure/pull/1155) Make literal endpoints overridable - [#1148](https://github.com/Azure/typespec-azure/pull/1148) add `@override` decorator that allows authors to explicitly describe their desired client method + ## 0.44.3 ### Bug Fixes @@ -267,6 +281,7 @@ - [#1244](https://github.com/Azure/typespec-azure/pull/1244) The baseType will be undefined if the `SdkBuiltInType`, `SdkDateTimeType`, `SdkDurationType` is a std type - [#1251](https://github.com/Azure/typespec-azure/pull/1251) Change output for `HttpPart[]` + ## 0.44.2 ### Bug Fixes @@ -287,6 +302,7 @@ - [#1015](https://github.com/Azure/typespec-azure/pull/1015) Refactor tcgc build-in types, please refer pr's description for details and migration guides + ## 0.44.1 ### Bug Fixes @@ -298,6 +314,7 @@ - [#1119](https://github.com/Azure/typespec-azure/pull/1119) Report diagnostics on `@clientName` conflicts + ## 0.44.0 ### Bug Fixes @@ -320,6 +337,7 @@ - [#1078](https://github.com/Azure/typespec-azure/pull/1078) remove `experimental_` prefix from `sdkPackage`. Now it's just called `sdkPackage`. + ## 0.43.2 ### Bug Fixes @@ -341,6 +359,7 @@ - [#886](https://github.com/Azure/typespec-azure/pull/886) always spread models and aliases with `...` + ## 0.43.1 ### Bug Fixes @@ -358,6 +377,7 @@ - [#1050](https://github.com/Azure/typespec-azure/pull/1050) Fix SdkContext.arm - [#1066](https://github.com/Azure/typespec-azure/pull/1066) Add linter for empty `@clientName` values + ## 0.43.0 ### Bug Fixes @@ -380,6 +400,7 @@ - [#925](https://github.com/Azure/typespec-azure/pull/925) change default of `.access` on a model or enum to `"public"` instead of `undefined` - [#870](https://github.com/Azure/typespec-azure/pull/870) return nullable types as a new type called `SdkNullableType` + ## 0.42.3 ### Bug Fixes @@ -388,12 +409,14 @@ - [#826](https://github.com/Azure/typespec-azure/pull/826) change from using logical result to final result - [#826](https://github.com/Azure/typespec-azure/pull/826) add union support for templated model naming + ## 0.42.2 ### Bug Fixes - [#818](https://github.com/Azure/typespec-azure/pull/818) Fix: Crash due to using api from next version of the compiler + ## 0.42.1 ### Bug Fixes @@ -405,12 +428,14 @@ - [#801](https://github.com/Azure/typespec-azure/pull/801) `getDefaultApiVersion` and service version enum hornor api version config - [#432](https://github.com/Azure/typespec-azure/pull/432) Add support for values + ## 0.42.0 ### Bug Fixes - [#788](https://github.com/Azure/typespec-azure/pull/788) fix wrong default version for interface from extends + ## 0.41.9 ### Bug Fixes @@ -419,24 +444,28 @@ - [#778](https://github.com/Azure/typespec-azure/pull/778) tie api version information to clients so we can have diff api version information per client - [#780](https://github.com/Azure/typespec-azure/pull/780) fix duplicated content type parameter for rpc lro + ## 0.41.8 ### Bug Fixes - [#753](https://github.com/Azure/typespec-azure/pull/753) fix usage propagation from sub types + ## 0.41.7 ### Bug Fixes - [#748](https://github.com/Azure/typespec-azure/pull/748) add crossLanguageDefinitionId onto method types + ## 0.41.6 ### Bug Fixes - [#741](https://github.com/Azure/typespec-azure/pull/741) use correct default api version when projecting to a specific version + ## 0.41.5 ### Bug Fixes @@ -445,6 +474,7 @@ - [#731](https://github.com/Azure/typespec-azure/pull/731) fix `@clientName` lost after adding versioning support - [#726](https://github.com/Azure/typespec-azure/pull/726) fix additional property union naming problem + ## 0.41.4 ### Bug Fixes @@ -454,6 +484,7 @@ - [#700](https://github.com/Azure/typespec-azure/pull/700) support get common models for specific api version, default to latest api version which may include breaking changes - [#713](https://github.com/Azure/typespec-azure/pull/713) enhance versioning and add tests + ## 0.41.3 ### Bug Fixes @@ -466,6 +497,7 @@ - [#663](https://github.com/Azure/typespec-azure/pull/663) Upgrade dependencies + ## 0.41.2 ### Bug Fixes @@ -480,12 +512,14 @@ - [#655](https://github.com/Azure/typespec-azure/pull/655) fix wire type nullable info - [#630](https://github.com/Azure/typespec-azure/pull/630) use diagnostic system to raise errors and warnings + ## 0.41.1 ### Bug Fixes - [#597](https://github.com/Azure/typespec-azure/pull/597) fix api version and pageable result path issue + ## 0.41.0 ### Bug Fixes @@ -541,6 +575,7 @@ - [#536](https://github.com/Azure/typespec-azure/pull/536) git status - [#515](https://github.com/Azure/typespec-azure/pull/515) change responses from a record to a mapping of status code, range, or default + ## 0.40.0 ### Bug Fixes @@ -572,6 +607,7 @@ - [#295](https://github.com/Azure/typespec-azure/pull/295) Split datetime type into utcDateTime and offsetDateTime to remain in sync with tsp + ## 0.39.2 ### Patch Changes @@ -591,6 +627,7 @@ - 1f1864a: fix incorrect linter error for models not directly used in multipart operations + ## 0.38.0 Wed, 24 Jan 2024 05:47:19 GMT diff --git a/packages/typespec-client-generator-core/test/test-host.ts b/packages/typespec-client-generator-core/test/test-host.ts index 6fffdaec72..1641d294eb 100644 --- a/packages/typespec-client-generator-core/test/test-host.ts +++ b/packages/typespec-client-generator-core/test/test-host.ts @@ -279,7 +279,3 @@ export async function createSdkContextTestHelper< export function hasFlag(value: T, flag: T): boolean { return (value & flag) !== 0; } - -export function hasFlag(value: T, flag: T): boolean { - return (value & flag) !== 0; -}