***NO_CI***
- add one flat config file for perf tests
- update NPM scripts of these packages to use that flat config for perf tests
As eslint v8 still not switched to flat config by default, this change
temporarily uses `cross-env` to set `ESLINT_USE_FLAT_CONFIG=true`
Once we moved to eslint v9 the env var can be removed.
### Packages impacted by this PR
@azure/keyvault-admin
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Migrates keyvault-admin to ESM and tshy
and replacing them with eslint.config.mjs so that both command line
eslint and
the vscode eslint extension can use the same config.
- since vite-plugin-browser-test-map doesn't depend on
eslint-plugin-azure-sdk, add linter dev dependencies and a flat config
to it.
- add an internal flat config to our eslint plugin. use it in added flat
config for test utility packages
### Packages impacted by this PR
- @azure-tools/test-utils-vitest
### Issues associated with this PR
- https://github.com/Azure/azure-sdk-for-js/issues/29287
### Describe the problem that is addressed by this PR
Adding in the tracing support and moving the matrix to a new module
### 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)
---------
Co-authored-by: Jeremy Meng <jeremy.ymeng@gmail.com>
Co-authored-by: Deyaaeldeen Almahallawi <dealmaha@microsoft.com>
### Packages impacted by this PR
@azure-rest/batch
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Add @azure-rest/batch package
### 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
- [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)_
- [ ] Added a changelog (if necessary)
---------
Co-authored-by: NickKouds <nickouds@hotmail.com>
### Packages impacted by this PR
test-credential
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Update the `createTestCredential` to use Azure Pipeline Credential when
in the Dev Ops env
### Packages impacted by this PR
- @azure/core-amqp
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Removes the polyfills for vite and instead injects the given polyfills
for process and Buffer.
### 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/core-sse
### Issues associated with this PR
https://github.com/Azure/azure-sdk-for-js/issues/30414
### Describe the problem that is addressed by this PR
In NodeJS, when the response stream is exhausted and the server closes
the connection, the underlying socket gets set to null. This is
problematic because core-sse is misled by the type of
`http.IncomingMessage.socket` that stipulates the socket is always a
valid object. This PR checks first if the socket is defined before it
closes 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?
N/A
### Are there test cases added in this PR? _(If not, why?)_
Yes!
### Provide a list of related PRs _(if any)_
N/A
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### 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)
so that VS Code prettier extension can import it via the "prettier" key
in most of our packages' package.json:
```
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
```
### Packages impacted by this PR
eslint-plugin-azure-sdk
This allows us to remove usage of the outdated and now archived
`eslint-plugin-node`. This PR
- adds `eslint-plugin-n` and its customization into our `eslint-plugin-azure-sdk`
- updates monitor-opentelemetry* packages to remove dev dependency on the old plugin
### Packages impacted by this PR
- eslint-plugin-azure-sdk
### Packages impacted by this PR
@Azure/communication-chat
### Describe the problem that is addressed by this PR
- Update the dependency @azure/communication-signaling package version
to fix the regressions in real time notification support in React
Native.
-
- Update the dependency @azure/core-rest-pipeline package version to fix
the regressions in client response support in React Native.
### 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/eventhubs-checkpointstore-blob
### Issues associated with this PR
N/A
### Describe the problem that is addressed by this PR
- migrates to use TSHY and vitest
- uses storage endpoint instead of storage connection string in the
tests
- enables browser testing
- updates test-resources.json accordingly
- fixes a behavior where an error is being wrapped in another
Live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4018408&view=results
### 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
### 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
- [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)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
@azure/event-hubs
### Issues associated with this PR
N/A
### Describe the problem that is addressed by this PR
This PR does the following:
- migrates Event Hubs client library to the new world of using TSHY for
building the library and using vitest as the test runner
- consolidates client building in a single module and uses fully
qualified name spaces and token credentials to build clients instead of
using connection strings
- runs mock-hub once instead of in every test module
- disables min/max testing and samples testing because they're not
playing well with TSHY and vitest at the moment. I'll open an issue to
track turning them back on once the testing pipelines have been
upgraded.
Live Tests are passing:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4000037&view=results
### 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
### 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
- [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)_
- [ ] 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
This PR includes the JavaScript/Typescript SDK for health deid service.
It includes:
- tests
- samples
- Readme
### 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)
---------
Co-authored-by: Harsha Nalluru <sanallur@microsoft.com>
There's some behavior change that adds parentheses for nullish coalescing in
ternary. So we will need to re-format our code base.
- remove prettier from packages that don't need them since we run the vendored
version via dev-tool
It helps old JS runtimes that only support ES 5 but we moved to ES 6
long time ago
and now moved to ES2017. Most of our packages don't have this option.
This PR
removes its usage.
### Packages impacted by this PR
@azure/-tools/vite-plugin-browser-test-map
### Issues associated with this PR
N/A
### Describe the problem that is addressed by this PR
The type declaration file wasn't set in package.json and the return type
of the plugin function was too permissive causing type errors when
imported.
### 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
### 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
- [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)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
@azure/monitor-opentelemetry
### Describe the problem that is addressed by this PR
Updates the @microsoft/applicationinsights-web-snippet package to the
latest version.
### 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
1. @azure/eventgrid-namespaces
2. @azure/eventgrid
### Issues associated with this PR
https://github.com/Azure/azure-sdk-for-js/issues/29699
### Describe the problem that is addressed by this PR
This PR has been created to move the eventgrid packages away from Local
Authentication. The migration guide has been used for reference.
### 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?
No special design consideration.
### Are there test cases added in this PR? _(If not, why?)_
NA. Existing test cases are sufficient.
### Provide a list of related PRs _(if any)_
1. https://github.com/Azure/azure-sdk-for-js/issues/29699
2. https://github.com/Azure/azure-sdk-for-js/pull/30209
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### 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)_
- [ ] Added a changelog (if necessary)
Update tsp-location.yaml to point to a commit from main in the spec repo
and regenerate. The previous commit hash was from a branch never merged,
blocking the attempt to release the sdk
After regenerating from latest tsp main, those were the changes
introduced:
* EnvionmentType name was updated to readonly (later fix added on the
typespec)
* PollingHelper and lro packages got updated (updated by code gen). Live
test for the LRO operations was executed and no issue was detected.
Previous PR for current sdk:
https://github.com/Azure/azure-sdk-for-js/pull/29512
APIView: [@azure-rest/developer-devcenter -
apiview.dev](https://apiview.dev/Assemblies/Review/e17096012eb7466a8aab7c74742c6bff?revisionId=b4d2f5f84d98499dacfcc5e7cdd15d52)
---------
Co-authored-by: Mary Gao <yanmeigao1210@gmail.com>
Previously it was checking the existence of .tshy directory. Now that we
removed
all .tshy the code is broken. This PR updates to check the package.json
instead.
### 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/ai-inference
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Initial release of @azure/ai-inference SDK
### 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
- #30160
### Describe the problem that is addressed by this PR
Updates to latest ts-morph package.
### 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
Adds the following:
- Global regex replace for context replacements
- Changes sinon spy to `vi.spyOn`
- Adds node specifiers to node imports
### 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
Fixed the `beforeEach` statements to get rid of the Mocha `Context` and
replace with `vitest` context and fixes the test-recorder creation.
### 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)
to fix broken nightly pipelines where we update `@azure` package
versions to
nightly versions and dependency versions to a range for their nightly
versions.
Versino `^3.0.0` would not get updated because of the following chech in
`set-dev.js` then `rush install` would fail to find matching one and
report error.
9488fe4bd7/eng/tools/versioning/set-dev.js (L80)
### Packages impacted by this PR
@azure-tools/test-credentials
### Issues associated with this PR
### Describe the problem that is addressed by this PR
- Exclude Managed Identity from DAC so that we can run live test
pipeline successfully. The 4 credentials that we try is: Powershell,
Cli, Developer Cli, Environment Credential in listed order. See [the migration
guide](https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/1080/Secret-auth-migration)
- Increase the default timeout for vitest to our default timeout (18000
ms)
Co-authored-by: Harsha Nalluru <sanallur@microsoft.com>
### Packages impacted by this PR
- @azure/dev-tool
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Adds updates for the following:
- Changes assert to only use `vitest` for now and not sure the
`@azure-tools/test-utils`
- Any utility in the `/test` folders will be updated to use `vitest` for
assertions
- Add `beforeEach`, `afterEach`, `vi` and `expect` to any test class
using `sinon` for easy replacement
- Fix pathing issue so that `import { foo } from "..";` is translated to
`import { foo } from "../index.js";`
- Removes `source-map-support` as we're not using Karma.
### 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
Creates a starter migration toolkit for projects to move to ESM and
vitest. This project for dev-tool introduces a tool invoked such as the
following to migrate service-bus
```
dev-tool admin migrate-package --package-name=@azure/service-bus
```
This does the following:
- Changes the package.json for the following:
- Removes chai/mocha/karma
- Adds vitest and tshy
- Modifies the build and test commands
- Renames the mapped files to the proper output type such as
`-browser.mts`
- Changes the tsconfig.json for the following:
- Moves module and moduleResolution to NodeNext
- Removes outDir and declarationDir
- Fixes the source files
- Uses extension for files such as "foo.js" instead of "foo"
- Removes "chai" usage
- Adds vitest usage for spec files
- Fixes api-extractor.json
- Fixes input path for source
- Fixes output trimmed path
- Migrate Testing
- Writes for both browser and node unit tests
- Writes config for building browser bundle
- Removes .nycrc and Karma configuration
### 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)
Sample source structure used to be flat but later nested directories are
supported as well. This PR fix the glob pattern to also include sub
directories.
- also re-publish samples for @azure/service-bus
I didn't update all the other samples as there are no complaints. They
can get new update in their next publish.
### Packages impacted by this PR
@Azure/communication-chat
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Customer escalated the issue:
The issue was introduced from the @azure/communication-chat@1.4.0. Chat
client updated the internal API client by generating the new service
client version with the `endpoint` param to replace the `baseUri` and
kept the dependency version @azure/core-client@1.3.0 and higher. While
the `endpoint` is introduced only in @azure/core-client@1.6.0.
Customer see error "baseUrl is not specified" if the dependency version
not updated.
Update the @azure/core-client version to fix the issue
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### 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
### 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/monitor-opentelemetry
- @azure/monitor-opentelemetry-exporter
- @azure/opentelemetry-instrumentation-azure-sdk
### Issues associated with this PR
- #29972
- #29971
- #29970
- #29969
- #29968
- #29967
- #29966
- #29965
- #29964
- #29963
- #29962
### 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)
---------
Co-authored-by: Jackson Weber <jacksonweber@microsoft.com>
### Packages impacted by this PR
@azure/eventgrid-system-events
### Issues associated with this PR
NA
### Describe the problem that is addressed by this PR
1. Originally, there was one unified package -
[`@azure/eventgrid`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid).
This package was generated from Swagger specification.
2. Earlier in April 2024, some parts of the `@azure/eventgrid` package
were extracted out to create a new package -
[`@azure/eventgrid-namespaces`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/eventgrid-namespaces).
This package was generated from Typespec specification.
3. Now, with this PR, we are looking at the second split of the
`@azure/eventgrid` package. All System Events have been extracted out of
the swagger specification to Typespec specification. This is a new
package named `@azure/eventgrid-system-events`.
### 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?
1. In the Typespec core generator, We have an issue where client name
overrides are not applied to `alias`. I have created an issue
https://github.com/microsoft/typespec/issues/3240 to fix this. In the
meantime, I have handled this issue in the custom code.
2. With the new generator, `Known*` models are not generated. I have
created an issue
https://github.com/Azure/autorest.typescript/issues/2476 to fix this. In
the meantime, I have handled this issue in the custom code.
3. In the previous generator, we had several properties which were
overridden as mandatory parameters. With the new generator, such mass
overrides are not possible. So, we are allowing them to be optional and
close to the Wore specification. This is in parity with the other
language SDKs.
### Are there test cases added in this PR? _(If not, why?)_
No. They are all model objects. No code functionality is involved.
### Provide a list of related PRs _(if any)_
1. https://github.com/microsoft/typespec/issues/3240
2. https://github.com/Azure/autorest.typescript/issues/2476
3. https://github.com/Azure/azure-sdk-for-js/pull/29245
### 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
- [X] 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)
@xirzec @joheredi @lmazuel FYI......
---------
Co-authored-by: Harsha Nalluru <sanallur@microsoft.com>
as packages using tshy has been migrated to ESM and these rules no
longer apply to them.
This PR skip these rules to avoid having to turn them off for individual
packages.
### 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 could remove these rules too. Although it's still nice to have them
before we migrage all packages to ESM with tshy.
### Packages impacted by this PR
@azure/core-amqp, @azure/event-hubs, and
@azure/eventhubs-checkpointstore-blob
### Issues associated with this PR
Gist: https://gist.github.com/conniey/f96d64547efa955a9e763cee6b65d1fc
### Describe the problem that is addressed by this PR
Enable the SDK to communicate with GeoDR-enabled Event Hubs.
### 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?
The PR follows closely what the crew agreed on for now which is changing
the type of `offset`s to be a string but this will be revisited later.
### Are there test cases added in this PR? _(If not, why?)_
Tests will come later.
### Provide a list of related PRs _(if any)_
N/A
### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_
### 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/dev-tool
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Creates a list tool to track our migration to ESM efforts.
### 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)
In an ESLint configuration object, if an `ignores` key is used without any other
keys, then the patterns act as global ignores. I added a `name` in my previous
PR which broke it.
This PR fixes the issue by removing the extraneous name. A pattern of
`*.config.{js,cjs,mjs}` is also add to global ignores because we don't need to
lint them.
Also in this PR
- move app-configuration package to use Flat Config format as a test.
- enable cosmosdb test config that was in legacy config format but missed in migration.
### Packages impacted by this PR
- @azure/web-pubsub-express
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Updates to ESM via `tshy` and moves from Mocha/Chai/Sinon to `vitest`
### 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 reverts commit 11da215483.
Unfortunately, rush does not play well with peerDeps and I am bumping
into https://github.com/microsoft/rushstack/issues/1415
I really wanted this to work but rather than continue going down this
path I think it's safer to revert and find an alternative
given the issues with rush and pnpm
### Packages impacted by this PR
dev-tool
### Issues associated with this PR
### Describe the problem that is addressed by this PR
We run into preflight CORS issue while testing App Config migration to
DAC in the browser. This PR update the relay server to allow
"Content-Type" and other headers to mitigate the issue.
### 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?
The other solution is to use `cors` middleware package to ensure the
preflight request succeeds.
Updates @azure-tools/test-utils to 1.0.2 since 1.0.1 has been published
to NPM already.
Also, run rush update --full to ensure everyone is on the repo-source
version of test-utils until we can fix the NPM version.
### 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-tools/test-utils
### Issues associated with this PR
Resolves#29736
### Describe the problem that is addressed by this PR
When @azure-tools/test-utils moves to `npm` it will no longer default to
the on-disk version of core-tracing. This impacts our `supportsTracing`
test helper as it no longer sets the instrumenter on the same version as
the client package. Imagine this flow:
<img
src="https://github.com/Azure/azure-sdk-for-js/assets/753570/12d52e8e-16c1-44b3-b57d-edd31a1e4627"
width=70% height=70%>
In this case, test-util and app-configuration are not talking to the
same "module global" instrumenter.
This PR fixes this by removing core-tracing from test-utils, setting it
as a peerDependency instead. All packages that test tracing also
implement tracing, and as such are already depending on core-tracing.
This was verified locally, but I'll need to get it out to NPM before
verification can complete
### Alternatives
See #29709 for a few alternatives:
1. Pass the instrumenter through
2. Use mocks
Both require updates to multiple packages and/or adding public API
surface which is unnecessary. We can fallback to those options if we
have to, but this is a promising alternative.
### Packages impacted by this PR
@azure-rest/ai-vision-face
### Issues associated with this PR
### Describe the problem that is addressed by this PR
1. tsp-client update to
60161e2f7d
([commit](2189b834bb))
- Ref: history of face spec
https://github.com/Azure/azure-rest-api-specs/commits/main/specification/ai/Face
2. Refine customization to not set MFD filename when there has already
been one.
([commit](d688279d32))
3. Use the `extraFiles` config to copy sample images.
([commit](389b01dc87))
4. Fix sanitizer issues in tests.
([commit](3354597f01))
5. Update the core-lro to v3 preview version.
([commit](7ac973d218))
- Cherry-picked from
56d85526df
6. tsp-client update to
1d2253d1e2
([commit](9e3a10a519))
### 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)
---------
Co-authored-by: Chung Sheng Fu <Chung.Fu@microsoft.com>
To do:
[x] Regenerate from merged tsp spec
[x] Update tests to use vitest
[x] Record tests
[x] Update samples
[] ~~Update Readme~~
[x] Update Changelog
[x] Update LRO status model fixed in tsp latest api version pr
---------
Co-authored-by: Lei Tian <leti@microsoft.com>
### Packages impacted by this PR
- @azure/core-amqp
### Issues associated with this PR
- #29683
### Describe the problem that is addressed by this PR
Removes esbuild and its polyfills for Node in favor of vite and vite
node plugins.
### 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)
ESLint v9 drops support for legacy .eslintrc style configuration files.
To move to v9 we need to migrate to the new Flat Config files. This PR
adds support for Flat Config file and migrate cosmos and identity-broker
packages to use the flat config. Legacy config files are still
supported.
Some eslint plugins that we use don't support flat config yet so they
are disabled.
Related issue: https://github.com/Azure/azure-sdk-for-js/issues/29750
The breaking change that impacts us is that now `typescript` and `javascript` code blocks in markdown files are maped to virtual files with `.ts` or `.js`, instead of `.typescript` or `.javascript` as previously in v4.
This PR reacts to the change:
- Add an overrides entry for `**/*.md/*.ts` because they now match the files pattern of our first overrides entry. Previously they are not linted because of their old `.typescript` extension. Their `project` is set to `null` as they don't belong to any project. They still are benefited from rules that don't require type checking.
## What's happening?
- [x] Get Scott's test-proxy version from #29471
- [x] Update `recorder 3.5.0` with
- [x] Central Sanitizers
- [x] /removeSanitizers API
- [x] remove fallback sanitizers
- [x] Publish `recorder 3.5.0`
- [x] Update `recorder 4.x` with the `recorder 3.5.0` changes and make
sure they are in sync.
- [x] Update lock file with `rush update --full` to get latest recorder
and test-credential packages
- [x] Test/fix packages
- [x] recorder
- [x] storage
- [x] template
- [x] '@azure-rest/synapse-access-control'
- [x] '@azure/arm-resources'
- [x] arm-links
- [x] arm-resources
- [x] event-grid
- [x] template-dpg
- [x] synpase packages
- [ ] '@azure/identity' (future PR)
- [x] '@azure/arm-eventgrid'
- [x] '@azure/ai-text-analytics'
## Future Work
- [ ] Figure out identity tests/recordings
- [ ] Make sure CI pipelines for each of the services that are not
triggered in this PR get to green by either re-recording or tweaking the
recorder config for the package
---------
Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com>
### Packages impacted by this PR
@azure-rest/ai-vision-face
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Generate and implement Face SDK via TypeSpec.
### 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)
---------
Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: Chung Sheng Fu <Chung.Fu@microsoft.com>
### Packages impacted by this PR
- `@azure-tools/dev-tool`
- `@azure-tools/test-credential`
### Describe the problem that is addressed by this PR
We want to move to user auth and `DefaultAzureCredential` to
authenticate our tests, but `DefaultAzureCredential` does not work in
the browser, blocking this transition.
This PR proposes a solution -- create a short-lived, local-only, server
which can create tokens in Node using DefaultAzureCredential. In the
browser, createTestCredential provides a credential implementation which
calls this server whenever it needs a token, and the server relays the
request to DefaultAzureCredential.
Here's what's changed:
- `test-credential` now returns a credential which requests tokens from
a local web endpoint when running browser tests against a live service.
- `dev-tool` contains an implementation of this web endpoint. The
dev-tool scripts used to run browser tests now start this server
automatically when running browser tests. A separate command to start
the server is also provided for pipelines.
- Update live test pipelines to start the server when running browser
tests.
### Provide a list of related PRs _(if any)_
- Draft version with loads of commits and `/azp run` spam: #29581
- Harsha's earlier PR to enable DefaultAzureCredential:
https://github.com/Azure/azure-sdk-for-js/pull/29577
### Packages impacted by this PR
`@azure-tools/test-credential`
### Describe the problem that is addressed by this PR
Need to move away from client secrets in the dev workflow.
### Breaking Changes
Updates the `createTestCredential` method to consume
`DefaultAzureCredential` instead of `ClientSecretCredential` in order to
offer autonomy to the devs and to move away from clietn secrets in
environment varaibles.
- `NoOpCredential` is offered for playback and `DefaultAzureCredential`
in record/live modes.
- [`User Auth` and `Auth via development
tools`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#authenticate-users)
are preferred in record mode to record the tests.
### TO DO
Hotfix 1.x release with the same change.
---------
Co-authored-by: Timo van Veenendaal <me@timo.nz>
### Packages impacted by this PR
- @azure/core-amqp
### Describe the problem that is addressed by this PR
Moves `@azure/core-amqp` to ESM via `tshy` and unit tests from `mocha`
to `vitest`.
---------
Co-authored-by: Jeff Fisher <jeffish@microsoft.com>
Co-authored-by: Jeremy Meng <jeremy.ymeng@gmail.com>
- fix false positive when there are no comments at all. There may be
some internal cache nodes in the array but they don't hold any comments.
- instead of showing squiggles for whole declaration body, only report
on the id node if its available.
### Packages impacted by this PR
- @azure/template
### Issues associated with this PR
- #29538
### Describe the problem that is addressed by this PR
Adding `loupe` directly to `template` and removing from `test-recorder`.
### 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/eslint-plugin-azure-sdk`
### Issues associated with this PR
https://github.com/Azure/azure-sdk-for-js/issues/22698https://github.com/Azure/azure-sdk-for-js/issues/22699https://github.com/Azure/azure-sdk-for-js/issues/22700https://github.com/Azure/azure-sdk-for-js/issues/22701
### Describe the problem that is addressed by this PR
This moves us from v5 -> v6 of eslint-typescript dependencies. The
current stable is 7 with 8 in early alpha. Since major changes include
breaks, it was easier to do this migration one major version at a time,
hence starting with the upgrade to 6. I am hopeful that 6 -> 7 will be
less messy, but I make no promises.
The major annoyance I ran into is you have to create mock "fixtures"
(dummy files) for any test asset paths (e.g. you tell the linter you are
testing `foo/bar/baz.ts` you need a tsconfig somewhere with that file
listed as included *and* you need that exact directory/file structure on
disk somewhere. eslint-typescript blames typescript for this limitation,
but I'm not familiar enough with the parser APIs to know if they're
correct in their analysis.
Note: I haven't gone through to audit all the rules yet, as some are
still a bit busted or need to be removed, but for the sake of updating
our dependencies, I moved everything forward as-is.
### Packages impacted by this PR
- @azure/opentelemetry-instrumentation-azure-sdk
- @azure/monitor-opentelemetry
- @azure/monitor-opentelemetry-exporter
- @azure/monitor-query
### Issues associated with this PR
- #29486
- #29487
- #29488
- #29489
- #29490
- #29491
- #29492
- #29493
- #29494
- #29495
- #29496
- #29497
### 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
- [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)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
- @azure/dev-tool
- @azure/eslint-plugin-azure-sdk
### Issues associated with this PR
- #29502
### Describe the problem that is addressed by this PR
Moves the `vitest` to use `.mts` for the config to opt in to ESM builds
for `vite`.
### 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?
Updated as per recommendation here
https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated
### 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
- [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)_
- [ ] Added a changelog (if necessary)
### Packages impacted by this PR
- @azure/api-management-custom-widgets-scaffolder
### Issues associated with this PR
- https://github.com/Azure/azure-sdk-for-js/issues/22972
- #24124
- https://github.com/Azure/azure-sdk-for-js/issues/25509
### Describe the problem that is addressed by this PR
Updates `inquirer` which uses ESM only, so this moves to ESM, but also
allows for CJS.
### 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
- [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)_
- [ ] Added a changelog (if necessary)
---------
Co-authored-by: Jeff Fisher <jeffish@microsoft.com>
* allow an override FILE to be honored by test-proxy-tool
* update test-utils to honor proxy override version by default
---------
Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com>
### Packages impacted by this PR
- `@azure/core-client-rest`
### Issues associated with this PR
- Resolves#28971
### Describe the problem that is addressed by this PR
- Major bump of `@azure-rest/core-client` to 2.0.0 due to introduced
behavioral breaking change.
- The expected body shape for `multipart/form-data` is now an array of
`PartDescriptor`, which has the following fields:
- `headers` and `body` representing the multipart request headers and
body
- Convenience fields for MIME header values:
- `contentType`, for the `Content-Type` MIME header
- `name`, `filename`, `dispositionType`, for constructing the
`Content-Disposition` MIME header
- These convenience values take precedence over any existing MIME
information (name and filename) present in the request body (i.e. the
`name` property on `File` and the `type` property on both `File` and
`Blob`)
- If the headers are set explicitly in the `headers` bag, the headers
bag value takes precedence above all.
- Implemented part serialization flowchart more or less as described in
the Loop, with a couple of notable differences (and other less notable
ones):
- `string` values are put directly on the wire regardless of content
type; this allows for customers to pass pre-serialized JSON to the
service
- If no content type is specified, and we cannot infer the content type,
we default to `application/json` (i.e. there is no situation where we
would throw a "cannot encode type" error)
- Added support for `FormData` objects. If a `FormData` object is
encountered, it is passed directly to `core-rest-pipeline` for it to
handle.
### Are there test cases added in this PR? _(If not, why?)_
Yes
### To do
- [ ] Port Core change to ts-http-runtime before merging
This PR extends dev-tool's `admin list packages` to optionally run
custom tasks on each package in the list.
For example,
`npx dev-tool admin list packages --task=/path/to/echo-packages.js` with
a echo-package.js of
```js
const path = require("path");
export default async function EchoPackage(project, paths, cwd, root) {
console.dir({
project,
paths,
cwd,
root,
});
}
```
would output items like
```
{
project: {
packageName: '@azure/arm-springappdiscovery',
projectFolder: 'sdk/springappdiscovery/arm-springappdiscovery',
versionPolicyName: 'management'
},
paths: false,
cwd: '/home/meng/git/jsmain/sdk/tables/data-tables',
root: '/home/meng/git/jsmain'
}
```
while
`npx dev-tool admin list packages
--task=/home/meng/git/jsmain/common/tools/dev-tool/src/commands/admin/list/tasks/update-package.ts`
would perform updates on projects whose package.json satisfies some
condition.
I had to downgrade `strip-json-comments` because v5 is pure ESM which
broke the
`admin list` command.
Updating the recorder to the latest v3.2.0 to consume the latest central
sanitizers through `rush update -full`
Skipping the following unit test pipelines with failures
- storage-file-share (browser unit tests only)
- storage-file-datalake
- text analytics
- ai-language-text
- ai-language-conversations
This is expected and is needed for the spring grove efforts.
Issue to track unskipping
https://github.com/Azure/azure-sdk-for-js/issues/29367
### Packages impacted by this PR
All via dev-tool
### Issues associated with this PR
Contributes to #28617
### Describe the problem that is addressed by this PR
esm is still being required in our test:node-ts-input and I don't
believe it is necessary. I'm removing it, but PLEASE do let me know what I'm missing -
I don't know much about mocha config to be honest.
### Packages impacted by this PR
@azure/core-client
@azure/core-tracing
@azure/template
### Issues associated with this PR
Resolves#28820
### Describe the problem that is addressed by this PR
This PR:
- Updates extract-api to work with both tshy aware packages and subpath
export packages
- Migrates core-client, core-tracing, and template to the extract-api
script
### Packages impacted by this PR
`@azure/template`
### Issues associated with this PR
`@azure/template` being upgraded
- commonJS to esm
- mocha/karma to vite/playwright
- recorder v3 to recorder v4
- test-credential v1 to v2
This would also serve as an example for future migrations.
---------
Co-authored-by: Jeremy Meng <jeremy.ymeng@gmail.com>
We no longer use esm4mocha, instead relying on tsx for our node-js-input
tests.
Now that this has been in place for some time, we can remove esm4mocha
followed by the esm dependency.
Contributes to #28617