Skip to content

Releases: microsoft/typespec

@typespec/bundler@0.1.4

13 Jun 23:40
9c701cc
Compare
Choose a tag to compare

Bump dependencies

  • #3401 Update dependencies - May 2024

typespec@0.56.0

08 May 01:17
dec5043
Compare
Choose a tag to compare

@typespec/compiler

Bug Fixes

  • #3170 --nostdlib flag will now work by only applying to optional standard library types
  • #3212 Fix: augmenting template model property could result in sending invalid argument to decorator
  • #3188 Fix: Do not crash when trying to access member of aliased expressions
  • #3185 Fix tsp init hanging when done due to unclosed connection
  • #3151 IDE: Fix completion of statement keywords
  • #3287 Templated interface extending another templated interface shouldn't run decorator on their operations
  • #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 Fix: Model with spread indexer shouldn't validate explicit properties
  • #3227 Stop running decorators on partially instantiated operations(When interface is instantiated but not the operation)
  • #3180 Fix issue where directives were not parsed to the leaf node in multi-segment Namespace segments.
  • #3243 Fix calling tsp install on windows due to recent NodeJS breaking change to fix vulnerability.
  • #3216 Fix compiler crash when using an invalid is target in an interface operation template
  • #3246 Internals: Use node built-in fetch API that is now stable since node 18.13.0

Bump dependencies

  • #3169 Update dependencies

Features

  • #3035 getEncode returns the fully qualified enum member name if using a custom enum.
  • #3183 Show template parameters when hovering on an operation template
  • #3191 [API] Add new sourceModels property to model

@typespec/http

Bug Fixes

  • #3196 Fix password flow defining authorizationUrl instead of tokenUrl
  • #3190 Fix @path param mapping when spreading a record in operation parameters
  • #3218 Fix: @path property shouldn't be applicableMetadata if the visibility contains Read

Bump dependencies

  • #3169 Update dependencies

Breaking Changes

  • #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

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

    Workaround: Use explicit @body

    op b1(): {@body _: {}};
    op b2(): {@body _: {@visibility("none") prop: string}};
    op b3(): {@body _: {@added(Versions.v2) prop: string}};
  • #2945 Implicit status code always 200 except if response is explicitly void

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

    Solution: Add explicit @statusCode

    op c1(): {@header foo: string, @statusCode _: 204};
    op c1(): {@header foo: string, ...NoContent}; // or spread common model
  • #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.

    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.

    op a1(): {@bodyRoot _: {@header foo: string, other: string} };
  • #2945 Properties are not automatically omitted if everything was removed from metadata or visibility

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

    Solution: use @bodyIgnore

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

@typespec/versioning

Bug Fixes

  • #3264 Fix crash when @service appears inside a versioned namespace

Bump dependencies

  • #3169 Update dependencies

@typespec/rest

Bump dependencies

  • #3169 Update dependencies

Features

  • #2945 Add support for new @bodyRoot and @body distinction

@typespec/openapi

Bump dependencies

  • #3169 Update dependencies

@typespec/openapi3

Bug Fixes

  • #3218 Fix: @path property should be included in unreachable models

Bump dependencies

  • #3169 Update dependencies

Features

  • #2945 Add support for new @bodyRoot and @body distinction

@typespec/protobuf

Bump dependencies

  • #3169 Update dependencies

@typespec/prettier-plugin-typespec

Bump dependencies

  • #3169 Update dependencies

@typespec/eslint-plugin

Bump dependencies

  • #3169 Update dependencies

@typespec/html-program-viewer

Bump dependencies

  • #3169 Update dependencies

Features

  • #3191 Add sourceModels property to model view

@typespec/json-schema

Bump dependencies

  • #3169 Update dependencies

@typespec/internal-build-utils

Bump dependencies

  • #3169 Update dependencies

typespec-vs

No changes, version bump only.

typespec-vscode

Bump dependencies

  • #3169 Update dependencies

@typespec/library-linter

Bump dependencies

  • #3169 Update dependencies

tmlanguage-generator@0.5.5

08 May 01:17
dec5043
Compare
Choose a tag to compare

Bump dependencies

  • #3169 Update dependencies

@typespec/xml@0.56.0

08 May 01:17
dec5043
Compare
Choose a tag to compare

Bump dependencies

  • #3169 Update dependencies

@typespec/playground@0.2.2

08 May 01:17
dec5043
Compare
Choose a tag to compare

Bug Fixes

  • #3170 Add support for new intrinsic vs std lib split in the compiler.
  • #3151 Fix completion of keywords

Bump dependencies

  • #3169 Update dependencies

@typespec/bundler@0.1.3

08 May 01:17
dec5043
Compare
Choose a tag to compare

Bump dependencies

  • #3169 Update dependencies

typespec@0.55.0

02 Apr 22:34
2f53533
Compare
Choose a tag to compare

@typespec/compiler

Bug Fixes

  • #3018 Grammar: Fix comments in template params not tokenized
  • #3052 Fix: Union template declaration were incorrectly being finished in projection
  • #2983 Warnings converted to error with warn-as-error do not prevent compilation from moving to the next stage like regular warnings
  • #3041 Improve relability of application of codefixes in IDE, often it would not do anything
  • #3069 TmLanguage: Fix tokenization of escaped identifiers, enums and unions

Bump dependencies

  • #3027 Update dependencies

Features

  • #2992 Enable the use of @encode for model properties that have a union type. This supports cases like @encode("rfc3339") prop: utcDateTime | null
  • #3053 Experimental projection: Add support for scalars

Deprecations

  • #3094 Deprecate @knownValues decorator. Use a named union of string literal with a string variant to achieve the same result without a decorator

Example:

-enum FooKV { a, b, c}
-@knownValues(FooKV)
-scalar foo extends string;
+union Foo { "a", "b", "c", string }
  • #2910 Deprecate @projectedName decorator. @encodedName should be used instead.

Example:

-@projectedName("json", "exp")
+@encodedName("application/json", "exp")

@typespec/http

Bump dependencies

  • #3027 Update dependencies

@typespec/versioning

Bump dependencies

  • #3027 Update dependencies

Features

  • #3053 Add support for versioning of scalars(Added, removed, renamed)

@typespec/rest

Bump dependencies

  • #3027 Update dependencies

@typespec/openapi

Bump dependencies

  • #3027 Update dependencies

@typespec/openapi3

Bug Fixes

  • #3077 Do not crash if using an unsupported intrinsic type
  • #2967 Fix crash: emit {nullable: true} when trying to emit null in openapi3
  • #3013 Fix: OpenAPI3 not marking part of bytes or something else as format: binary
  • #3090 Fix: Literal unions with the same variants keep adding duplicate entries
  • #3049 Fix visibility naming conflict when a model used with extends was used in different visibility.

Bump dependencies

  • #3027 Update dependencies

@typespec/protobuf

Bump dependencies

  • #3027 Update dependencies

@typespec/prettier-plugin-typespec

Bump dependencies

  • #3027 Update dependencies

@typespec/eslint-config-typespec

Bug Fixes

  • #2122 Ignore generated-defs folder

Bump dependencies

  • #3027 Update dependencies

@typespec/eslint-plugin

Bump dependencies

  • #3027 Update dependencies

@typespec/html-program-viewer

Bump dependencies

  • #3027 Update dependencies

@typespec/json-schema

Bump dependencies

  • #3027 Update dependencies

@typespec/internal-build-utils

Bump dependencies

  • #3027 Update dependencies

typespec-vs

No changes, version bump only.

typespec-vscode

Bump dependencies

  • #3027 Update dependencies

@typespec/library-linter

Bump dependencies

  • #3027 Update dependencies

typespec@0.54.0

06 Mar 00:05
9881002
Compare
Choose a tag to compare

@typespec/compiler

Bug Fixes

  • #2932 Report error when having a circular template constraint e.g. model Example<T extends T>
  • #2955 [Formatter] Formatting file with only comments would reorder the first line.
  • #2934 [IDE] Fix issue when deleting an open file outside the IDE that would crash the language server
  • #2959 Decorators that have missing arguments will not run. This is inline with passing invalid argument to a decorator that would prevent it from running.
  • #2976 [IDE] Fix type documentation shown twice when hovering symbols or in completion details.
  • #2929 [API] Add Scalar to TS TemplatedType type
  • #2978 [IDE] Go to imports
  • #2936 [IDE] Autocompleting file or folder with non alpha numeric charachter completes correctly
  • #2936 [IDE] Fix crashing when trying to autocomplete an invalid folder
  • #2951 Wrap string in quotes in errors
  • #2886 Fix: tsp compile --watch was missing coloring and error previews

Bump dependencies

  • #2900 Update dependencies

Features

  • #2888 Add support for codefixes
  • #2920 Add support for ...Record<T> to define the type of remaining properties
  • #2968 Any subtype of an error(marked with @error) is now an error.

Deprecations

  • #2919 [API] Create a new export @typespec/compiler/utils exports. Deprecate export from @typespec/compiler of utils like DuplicateTracker, Queue, createTwoKeyMap, etc.
  • #2902 Deprecate @service version property. If wanting to describe a service versioning you can use the @typespec/versioning library. If wanting to describe the project version you can use the package.json version. For OpenAPI generation. the @OpenAPI.info nows decorator allows providing the document version.

Breaking Changes

  • #2920 Intersecting Record with incompatible properties will now emit an error

@typespec/http

Bug Fixes

  • #2948 Fix don't emit shared route error when verb don't match

Bump dependencies

  • #2900 Update dependencies

Features

  • #2901 Add ability to sepcify authentication and different scopes per operation
  • #2958 Validate that only one @useAuth decorator is applied to a type.

@typespec/versioning

Bump dependencies

  • #2900 Update dependencies

Features

  • #2950 Export the VersionProjections interface.

@typespec/rest

Bump dependencies

  • #2900 Update dependencies

@typespec/openapi

Bump dependencies

  • #2900 Update dependencies

Features

  • #2902 Add support for all properties of openapi info object on the @info decorator

@typespec/openapi3

Bump dependencies

  • #2900 Update dependencies

Features

  • #2902 Add support for all properties of openapi info object on the @info decorator
  • #2950 Add getOpenAPI3 function that takes a TypeSpec program and returns the emitted OpenAPI as an object. Useful for other emitters and tools that want to work with emitted OpenAPI directly without writing it to disk.
  • #2933 Add a new option safeint-strategy that can be set to double-int to emit type: integer, format: double-int instead of type: integer, format: int64 when using the safeint scalar.

@typespec/protobuf

Bump dependencies

  • #2900 Update dependencies

@typespec/prettier-plugin-typespec

Bump dependencies

  • #2900 Update dependencies

Breaking Changes

  • #2956 Drop support for prettier 2.0

@typespec/eslint-config-typespec

Bug Fixes

  • #2919 Exclude temp folder

Bump dependencies

  • #2900 Update dependencies

@typespec/eslint-plugin

Bump dependencies

  • #2900 Update dependencies

@typespec/html-program-viewer

Bug Fixes

  • #2941 Fix: Program Viewer crash when using unnamed union variants

Bump dependencies

  • #2900 Update dependencies

@typespec/json-schema

Bug Fixes

  • #2977 Respect compiler noEmit flag

Bump dependencies

  • #2900 Update dependencies

@typespec/internal-build-utils

Bug Fixes

  • #2914 Bumping PR version will also update the dependencies to be an open range

Bump dependencies

  • #2900 Update dependencies

typespec-vs

Bump dependencies

  • #2900 Update dependencies

typespec-vscode

Bump dependencies

  • #2900 Update dependencies

@typespec/library-linter

Bump dependencies

  • #2900 Update dependencies

typespec@0.53.0

05 Mar 19:10
abba29c
Compare
Choose a tag to compare

@typespec/compiler

Minor Changes

  • 15f6dbe: Added an optional validation message to the @pattern decorator.
  • 9726b3d: Emitter framework: ObjectBuilder will keep track when built using a Placeholder allowing data to be carried over when chaining ObjectBuilder

Patch Changes

  • cc2723a: Template instantiated with ErrorType will get the arg changed to unknown
  • fd4fdfb: Fix: Error out when using properties in array model

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/http

Patch Changes

  • 8ed1d82: Fix: OpenIDConnect types not exposed on the TypeScript types

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/versioning

Patch Changes

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/rest

Patch Changes

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/openapi

Patch Changes

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/openapi3

Patch Changes

  • 9726b3d: Fix issues with nullable properties used in a cycle being wrapped in allOf when not needed
  • 05c8597: Fix circular reference would not always inline array properties
  • 8ed1d82: Add support for OpenIdConnect auth scheme

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/protobuf

Minor Changes

  • a3d6acf: Added support for template name expansion to the protobuf emitter.

Patch Changes

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/prettier-plugin-typespec

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/eslint-config-typespec

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/eslint-plugin

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/html-program-viewer

Patch Changes

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/json-schema

Patch Changes

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/internal-build-utils

Minor Changes

  • 4329c78: Change prerelease version bump logic to work with pnpm instead of rush

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

typespec-vs

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

typespec-vscode

Patch Changes

  • ba02533: Added icons to the extensions

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.

@typespec/library-linter

Patch Changes

This log was last generated on Wed, 24 Jan 2024 05:46:53 GMT and should not be manually modified.