This PR fixes an error in extra-api command when a package doesn't
enable the docModel generation, we were trying to open an api.md file
that doesn't exists.
### Packages impacted by this PR
ai-inference
### Issues associated with this PR
### Describe the problem that is addressed by this PR
- Added instrumentation to the inference client library.
- Created generated folder that contains the generated code after
linting and formatting.
- lint and format are missing in the package.json. Added it. And apply
lint and format fixed all errors within the inference library included
the code I didn't touch.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
Yes. added the test and recording.
### Provide a list of related PRs _(if any)_
Nothing
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
* don't verify changelog for packages that aren't actively published anymore
---------
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
### Packages impacted by this PR
core
### Issues associated with this PR
N/A
### Describe the problem that is addressed by this PR
As we look to migrate all packages to tshy we want to make sure we are
able to move away from tshy if ever needed. This PR adds a build-package command
that can later be used to consolidate some of the commands and decouple a bit
from tshy
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
We can just call tshy directly, but one of the "selling" points of tshy
is that we can always eject and do what it does manually if we run into issues.
This helps streamline that without having to update 400 package.json files if
needed.
Frankly, I am not 100% sure if this is needed and I admit that `tshy` is
still an entry in packages' json, but I think we can live with the `tshy`
entry longer than we can with a `tshy` tool migration.
### Packages impacted by this PR
- @azure/dev-tool
- @azure/abort-controller
- @azure/core-amqp
- @azure/core-auth
- @azure/core-client
- @azure-rest/core-client
- @azure/core-http-compat
- @azure/core-lro
- @azure/core-paging
- @azure/core-rest-pipeline
- @azure/core-tracing
- @azure/core-util
- @azure/core-xml
- @azure/logger
- @typespec/ts-http-runtime
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Adds snippets extraction to core.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
### Issues associated with this PR
### Describe the problem that is addressed by this PR
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
@azure/openai
### Issues associated with this PR
N/A
### Describe the problem that is addressed by this PR
The browser test files were not being built correctly because of two
things:
- The mts files in the test folder were not being built by TypeScript
- vitest couldn't resolve `@azure/openai/types` import
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
This PR fixes the two issues by adding the mts files under the test
folder to TypeScript context and rewrites the import to
`@azure/openai/types` to the relative path instead.
### Are there test cases added in this PR? _(If not, why?)_
N/A
### Provide a list of related PRs _(if any)_
N/A
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
`
@azure/microsoft-playwright-testing`
### Issues associated with this PR
1. Error message printing twice one for scalable and one for reporting
2. When using PLAYWRIGHT_SERVICE_URL and PLAYWRIGHT_SERVICE_ACCESS_TOKEN
of different workspace, scalable fails as expected but reporting works
### Describe the problem that is addressed by this PR
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
This PR creates a merged api.json file from individual api.json files of
subpath exports. The `ApiModel` type from api-extractor-model already
allows multiple `EntryPoint` but so far only one is added.
With this new file, we can also attach more information to the
`metadata` properties. Even though they are not loaded by `ApiModel`, we
could still read that information from the file directly. This saves us
from having to upload multiple files to ApiView.
### Packages impacted by this PR
@azure/eventgrid-system-events
### Issues associated with this PR
NA
### Describe the problem that is addressed by this PR
- A new property `tierToColdSummary` is added to the
`StorageLifecyclePolicyCompletedEventData` interface.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
There are no specific/complex design scenarios for this task.
### Are there test cases added in this PR? _(If not, why?)_
No. This item is standard and we need not add test cases for every new
events. The existing cases would be sufficient.
### Provide a list of related PRs _(if any)_
https://github.com/Azure/azure-sdk-for-js/pull/29688https://github.com/Azure/azure-sdk-for-js/pull/30627
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
`npx tsp compile client.tsp`
### Checklists
- [X] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [X] Added a changelog (if necessary)
### Packages impacted by this PR
@azure/eventgrid
### Issues associated with this PR
NA
### Describe the problem that is addressed by this PR
This PR consists of the following changes:
- A new property `tierToColdSummary` is added to the
`StorageLifecyclePolicyCompletedEventData` interface.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
There are no specific/complex design scenarios for this task. It is a
straightforward regenerate and some standard changes to the custom layer
of the code.
### Are there test cases added in this PR? _(If not, why?)_
No. This item is standard and we need not add test cases for every new
events. The existing cases would be sufficient.
### Provide a list of related PRs _(if any)_
- https://github.com/Azure/azure-sdk-for-js/pull/28176 (This is the PR
that adds similar events to the SDK in the 5.1.0 release)
- https://github.com/Azure/azure-sdk-for-js/pull/28513 (This is the PR
that adds similar events to the SDK in the 5.2.0 release)
- https://github.com/Azure/azure-sdk-for-js/pull/28891 (This is the PR
that adds similar events to the SDK in the 5.3.0 release)
- https://github.com/Azure/azure-sdk-for-js/pull/29035 (This is the PR
that adds similar events to the SDK in the 5.4.0 release)
- https://github.com/Azure/azure-sdk-for-js/pull/29872 (This is the PR
that adds similar events to the SDK in the 5.5.0 release)
- https://github.com/Azure/azure-sdk-for-js/pull/30811 (This is the PR
that adds similar events to the SDK in the 5.6.0 release)
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
```autorest --typescript swagger\README.md```
### Checklists
- [X] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_
- [X] Added a changelog (if necessary)
### Describe the problem that is addressed by this PR
The current overrides for the browser specific files only replace them
if they are under "src" directory. This PR adds the "test" directory for
test coverage
### Packages impacted by this PR
`
@azure/microsoft-playwright-testing`
### Issues associated with this PR
SDK was passing Default Job Config as Empty Strings instead of null
Added test for clInfoProvider.
### Describe the problem that is addressed by this PR
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
- @azure/dev-tool
### Issues associated with this PR
### Describe the problem that is addressed by this PR
This PR implements a new dev-tool command: `dev-tool run
update-snippets`.
This command looks for code fences in markdown files and JSDoc comments,
and updates them with the contents of test methods in a file named
`snippets.spec.ts`.
For example, the following fence indicates that the contents of a test
named "new_configurationclient" should be used:
````
```js snippet:new_configurationclient
```
````
After running `dev-tool run update-snippets`, the contents of the
snippet will be populated:
````
```js snippet:new_configurationclient
import { ConfigurationClient } from "@azure/template";
import { DefaultAzureCredential } from "@azure/identity";
const client = new ConfigurationClient(
"<app configuration endpoint>",
new DefaultAzureCredential()
);
```
````
To accomplish this, the command uses the TypeScript compiler API to
extract and transpile snippets from `snippets.spec.ts`. Snippets are the
contents of calls to the `it` function. If syntax with the shape
`it(<literal string>, <function with block>)` appears in
`snippets.spec.ts`, it will be considered a snippet that is valid for
injection.
("Function with block" means either a `function () { ... }` expression
or an arrow function with a block on the arrow side (`() => { ... }`).
An arrow function that has an expression on the right hand side (`() =>
(...)`) will not be recognized.)
For example:
```ts
it("new_configurationclient", function () {
// @ts-ignore
const client = new ConfigurationClient(
process.env.ENDPOINT ?? "<app configuration endpoint>",
new DefaultAzureCredential()
);
});
```
The transpiler automatically "cleans" and validates the snippet using
similar techniques as the sample transpiler. As a result, it enforces
the same syntactic rules that the sample transpiler does. In addition to
those, it removes references to `process.env` (if an alternative is
specified), removes compiler pragmas like `// @ts-ignore`, and
automatically inserts imports for symbols that the snippet uses. So in
the above snippet, imports for `ConfigurationClient` and
`DefaultAzureCredential` are required, automatically detected, and
injected into the resulting snippet.
Snippets without `snippet:${name}` tags are _errors_ when using this
command, so a package must be fully migrated to use it.
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
### Are there test cases added in this PR? _(If not, why?)_
### Provide a list of related PRs _(if any)_
- #24536
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
azure/communication-email
### Issues associated with this PR
N/A
### Describe the problem that is addressed by this PR
N/A
### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?
N/A - update to include contentId property for EmailAttachment to
support inline attachments.
### Are there test cases added in this PR? _(If not, why?)_
Yes
### Provide a list of related PRs _(if any)_
[Java SDK PR](https://github.com/Azure/azure-sdk-for-java/pull/41591)
[.NET SDK PR](https://github.com/Azure/azure-sdk-for-net/pull/45360)
[REST API PR
(complete)](https://github.com/Azure/azure-rest-api-specs/pull/29699)
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
Git command?
git push --set-upstream origin
natekimball/update-js-sdk-for-inline-attachments
### Checklists
- [X] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [X] Added a changelog (if necessary)
### Packages impacted by this PR
@azure/core-tracing
@azure/opentelemetry-instrumentation-azure-sdk
@typespec/ts-http-runtime
### Issues associated with this PR
Resolves#31158
### Describe the problem that is addressed by this PR
OpenTelemetry supports adding events to a span, and part of the gen-ai
specification expects events to be added on a span.
This PR adds support for the `addEvent` API in our core-tracing library
as well as our otel-sdk.
Adding a required field is a breaking change, so this is added as
optional. The implementation will need to use the safe-navigation
operator syntax or check for the function's existence before calling it.
In passing, I am updating some of our internal transformations to use
OTel's APIs instead.
***NO_CI***
- replace version to "~5.6.2"
- rush update
- add `"skipLibCheck": true` for several packages that are affected by https://github.com/vitest-dev/vitest/issues/4688
- [formrecognizer] help TypeScript to understand with more explicit type
- [schema-registry-{avro,json}] skip lib check due to lru-cache issue with the Iterator TReturn change
https://github.com/isaacs/node-lru-cache/issues/348
### Packages impacted by this PR
`@azure/data-tables`
### Describe the problem that is addressed by this PR
Adds support for using the correct scope when receiving an auth
challenge via a Cosmos endpoint.
I also fixed a central sanitizer issue that was impacting running the
playback tests.
### Are there test cases added in this PR? _(If not, why?)_
Yes
### Provide a list of related PRs _(if any)_
https://github.com/Azure/azure-sdk-for-net/pull/45934
---------
Co-authored-by: Christopher Scott <chriscott@hotmail.com>