Skip to content

Releases: microsoft/typespec

@typespec/http-client-js@0.15.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 03 Jul 19:12
d9d9ab6

Manual release due to dependencies upgrade.

@typespec/emitter-framework@0.18.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 19 Jun 18:23
388eecc

Features

  • #10372 [csharp] Export new utilities from @typespec/emitter-framework/csharp: getDocComments, getNullableUnionInnerType, efRefkey, and declarationRefkeys
  • #10372 [csharp] EnumDeclaration now emits the doc comments of the TypeSpec enum

typespec-stable@1.13.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 09 Jun 21:00
212a9ed

@typespec/compiler

Deprecations

  • #10876 Deprecated deepClone utility in favor of structuredClone. All internal usages have been replaced with the native structuredClone API.

Features

  • #10897 ApplyCodeFixExpect.toEqual now accepts Record<string, string> to assert on multiple files after a code fix is applied. This enables testing code fixes that write to a different file (e.g., adding augment decorators to a client.tsp).

    await ruleTester
      .expect({
        "main.tsp": `import "./client.tsp";\nmodel Foo { name: string; }`,
        "client.tsp": ``,
      })
      .applyCodeFix("add-client-override")
      .toEqual({
        "client.tsp": `@@override(Foo.name, "clientName");\n`,
      });
  • #10548 Add kind: project and entrypoint support to tspconfig.yaml for defining project boundaries and entrypoint resolution. See Project Configuration for more details.

    kind: project
    entrypoint: src/service.tsp
    emit:
      - "@typespec/openapi3"
  • #10694 Added support for accessing late-bound members on models that use template spreads or is bases.

    Previously, accessing a member that was introduced via a template instantiation would fail with an invalid-ref error:

    model Template<T> {
      ...T;
    }
    model User is Template<{name: string}>;
    
    alias UserName = User.name; // ❌ previously: "Model doesn't have member name"

    Now, the compiler will force-evaluate the container type when a member lookup fails on a model with unknown members (from template spreads or is), making late-bound members accessible:

    model Template<T> {
      ...T;
    }
    model User is Template<{name: string}>;
    
    alias UserName = User.name; // ✅ now resolves correctly

    This also works with:

    • Forward references to the template definition
    • Spread-based patterns (model A { ...Template<{x: int32}> })
    • Members added by augment decorators
    • Circular references between models with late-bound members
  • #10855 The internal modifier is no longer experimental. Using internal will no longer emit an experimental-feature warning, and #suppress "experimental-feature" directives are no longer needed.

  • #10826 Add project-scoped compiler feature flags to tspconfig.yaml. Compiler feature definitions
    are tracked internally with descriptions and can be listed with tsp info features.

    kind: project
    features:
      - function-declarations
  • #9868 Enabled resolution of member properties and metaproperties through template parameters based on constraints.

    model Resource {
      id: string;
    }
    
    model Read<R extends Resource> {
      id: R.id;
    }

Bug Fixes

  • #10692 Fix spurious circular-base-type diagnostics after invalid 'model is' declarations.
  • #10684 Fixed the compiler to correctly detect circular model spread chains while preserving support for recursive model-expression aliases.
  • #10687 Fix wrongly detected circular reference with alias and model properties
  • #10643 Completion in the middle of an identifier now replaces the full token instead of inserting and leaving trailing characters
  • #10827 Language server fatal errors now write pending logs and the fatal stack trace directly to stderr so crash details remain visible.
  • #10773 Report an error when a function is declared in the $functions map in a JS file but has no corresponding extern fn declaration in TypeSpec. Previously this would silently have no effect.
  • #10847 [Language Server] Wrapped LSP server handlers with wrapUnhandledError to preserve server-side stack traces in error messages forwarded to the client. Previously, the JSON-RPC layer discarded the original stack trace, making unhandled errors in telemetry opaque.
  • #10880 Validate function rest arguments and report function call argument count diagnostics at call sites.

@typespec/http

No changes, version bump only.

@typespec/openapi

Features

  • #10769 Add summary and kind fields to @tagMetadata decorator.

    For OpenAPI 3.2, these fields are emitted as native tag object fields. For OpenAPI 3.0/3.1, they are emitted as x-oai-summary and x-oai-kind extensions. The OpenAPI converter also supports importing x-oai-summary, x-oai-kind (from 3.0/3.1) and native summary, kind (from 3.2) back to TypeSpec.

    @tagMetadata("foo", #{ summary: "all operations that allow doing Foo", kind: "FooGroup" })
  • #10770 Add array form for @tagMetadata decorator to allow explicit control of tag declaration order.

    @service
    @tagMetadata(#[
      #{ name: "First Tag", description: "First tag description" },
      #{ name: "Second Tag", description: "Second tag description" },
    ])
    namespace PetStore {}

    Using @tagMetadata(#[...]) and @tagMetadata("name", #{...}) on the same namespace is a diagnostic error.

  • #10555 Added a warning diagnostic when @defaultResponse is used on a model that already has a @statusCode property or is marked with @error.

Bug Fixes

  • #10919 Reject duplicate tag names in @tagMetadata array form.
  • #10776 Fix tagMetadata extension diagnostic targets

@typespec/openapi3

Features

  • #10769 Add summary and kind fields to @tagMetadata decorator.

    For OpenAPI 3.2, these fields are emitted as native tag object fields. For OpenAPI 3.0/3.1, they are emitted as x-oai-summary and x-oai-kind extensions. The OpenAPI converter also supports importing x-oai-summary, x-oai-kind (from 3.0/3.1) and native summary, kind (from 3.2) back to TypeSpec.

    @tagMetadata("foo", #{ summary: "all operations that allow doing Foo", kind: "FooGroup" })
  • #10770 Add array form for @tagMetadata decorator to allow explicit control of tag declaration order.

    @service
    @tagMetadata(#[
      #{ name: "First Tag", description: "First tag description" },
      #{ name: "Second Tag", description: "Second tag description" },
    ])
    namespace PetStore {}

    Using @tagMetadata(#[...]) and @tagMetadata("name", #{...}) on the same namespace is a diagnostic error.

Bug Fixes

  • #10786 Mark models as @error when imported from 4xx/5xx response body schema references.

  • #10901 Fix import of deprecated: true on OpenAPI3 operations to generate #deprecated "deprecated" directive in converted TypeSpec output.

  • #10677 Fix custom auth scheme models leaking into components.schemas when declared inside the service namespace. They are now emitted only under components.securitySchemes as expected.

  • #10656 Propagate @JsonSchema.uniqueItems to query, path and header parameter schemas. The decorator was only applied to body model property schemas; for HTTP parameter schemas (which go through applyIntrinsicDecorators) it was silently dropped, so arrays declared on operation parameters never emitted uniqueItems: true even when the decorator was present.

    op listUsers(
      @query
      @JsonSchema.uniqueItems
      $select?: ("id" | "displayName")[],
    ): User[];

@typespec/json-schema

No changes, version bump only.

typespec-vscode

Bug Fixes

  • #10847 Improved telemetry instrumentation for install-global-compiler-cli, preview-openapi3, start-server, and server-path-changed events by adding missing lastStep tracking and error detail logging. Added actionable error message when compiler is found but neither node nor tsp is available on PATH, guiding users to fix common nvm/fnm/volta configuration issues.

@typespec/prettier-plugin-typespec

No changes, version bump only.

@typespec/xml@0.83.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 09 Jun 21:00
212a9ed

No changes, version bump only.

@typespec/versioning@0.83.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 09 Jun 21:00
212a9ed

No changes, version bump only.

@typespec/tspd@0.75.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 09 Jun 21:00
212a9ed

Features

  • #10640 Improve render of complex emitter options
  • #10640 Render documentation for sub exports

Bug Fixes

  • #10880 Render function type signatures with arrow syntax and avoid internal compiler imports.

@typespec/streams@0.83.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 09 Jun 21:00
212a9ed

No changes, version bump only.

@typespec/sse@0.83.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 09 Jun 21:00
212a9ed

No changes, version bump only.

@typespec/rest@0.83.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 09 Jun 21:00
212a9ed

No changes, version bump only.

@typespec/protobuf@0.83.0

Choose a tag to compare

@azure-sdk-automation azure-sdk-automation released this 09 Jun 21:00
212a9ed

No changes, version bump only.