### Packages impacted by this PR
- @azure/web-pubsub
### Issues associated with this PR
- https://github.com/Azure/azure-sdk-for-js/issues/31338
### Describe the problem that is addressed by this PR
Using the migration tool, moves @azure/web-pubsub to ESM/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)
---------
Co-authored-by: Harsha Nalluru <sanallur@microsoft.com>
- Add a test util to parse JWT token payload to validate audience
- Add more tests for AAD
- Fix mismatched DTO field when calling generateClientToken
---------
Co-authored-by: tomnguyen <chuongnguyen@microsoft.com>
For packages that have been migrated to ESM, Rolled up dts files are no
longer used but they are still packaged because our `files` field
include an entry of `dist/`. Since they are not used anymore, this PR
stops generating them, instead of more complicated approach of excluding
them from `npm pack`.
- Add SocketIO support for generating Client Access URL
- Add custom sanitizer for test recorder to fix URI mismatched issue
---------
Co-authored-by: tomnguyen <chuongnguyen@microsoft.com>
- add dep to `uglify-js` in dev-tool
- rush update
- replace "uglifyjs" with "dev-tool run vendored yglifyjs"
- remove dependency to "uglifyjs" in sdk packages
***NO_CI***
- apply lint:fix results
- revert fixes that are not related to consistent-type-imports and cases error
- regenerate .api.md files
- format
- update core-comparison diff
also remove dependency on `@microsoft/api-extractor` as we already move to
`dev-tool run extract-api` which calls api-extractor Api instead.
***NO_CI***
***NO_CI***
Currently the rule only handles the case of
```ts
clientMethod(options: MethodOptions) {}
```
but not when the options bag parameter has a default value
```ts
clientMethod(options: MethodOptions = {}) {}
```
This change adds code to handle the latter.
- Add two unit tests
- Update the affected packages to suppress this rule as a warning
- react to the fix
***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/web-pubsub-client-protobuf
### Issues associated with this PR
Fixes build issues associated with #30988
### 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)_
- #30988
### 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
When we run install packages for two samples
(`sdk\web-pubsub\web-pubsub-client\samples\v1-beta\(javascript/typescript`).
We will receive error:
```
npm error code ETARGET
npm error notarget No matching version found for @azure/web-pubsub-client@next.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.
npm error A complete log of this run can be found in: C:\.tools\.npm\_logs\2024-09-04T07_49_59_892Z-debug-0.log
```
Because there is no `next` version of `web-pubsub-client` package. So we
can use `latest` version
[Reference the
version](https://www.npmjs.com/package/@azure/web-pubsub-client?activeTab=versions)
### 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: Duong Phan <dphan@microsoft.com>
- [eslint-plugin] github-source-headers rule should use "MIT License".
This change updates our linter rule and the whole repository to have consistent
license header.
***NO_CI***
- remove "All rights reserved." from header
- "MIT license" => "MIT License"
***NO_CI***
- bump typescript-eslint dependencies version to ~8.2.0
- [eslint-plugin] suppress new linting errors appearing with v8
- [eslint-plugin] react to removed typescript-eslint property
related PR https://github.com/typescript-eslint/typescript-eslint/pull/9025
- [eslint-plugin] turn off @typescript-eslint/no-unused-expressions
as no-unused-expressions is already reported by eslint
- [dev-tool] fix new linting errors
- Remove @typescript-eslint/ban-types that no longer exists
and replace with more specific rules wherever applicable.
- [cosmosdb] combine the test eslint config with the main one
- delete catch expression when caught error is not used
- fix or suppress linting errors in code files
for packages that needs manual fixes
- fix issue in README.md
- suppress redeclare error about Buffer because "buffer" npm package is
used
- suppress redeclare error about WebSocket because "ws" npm package is
used
1. Support to generate MQTT JWT Token for Azure WebPubSub. Essentially
we need to identify if clients want to establish a default WebPubSub
connection or an MQTT connection, then we will generate the Client
Connection URL for them accordingly.
- Example Client URL for:
- Default Connection: `wss://exampleHost.com/client/hubs/exampleHub`
- MQTT Connection: `wss://exampleHost.com/clients/mqtt/hubs/exampleHub`
2. Upgrade API version to '2024-01-01'
3. Add tests to get MQTT Token
---------
Co-authored-by: Chuong Nguyen <chuongnguyen@microsoft.com>
Previously dev-tool has been fixed to generate correct include path in samples
tsconfig.json but samples were not updated.
This PR fixes the samples tsconfig.json in one run; otherwise with the recent
branch protection policy changes, when individual packages re-publish samples,
js-core team would have to approve the tsconfig.json changes.
***NO_CI***
which only extends from tsconfig.json. There might be more customization for
packages in the early days but not any more.
This PR removes it and updates packages to extends tsconfig.json directly
***NO_CI***
Run `rush build` on the repo to ensure the newly added `source` fields
are generated.
This avoids unnecessary noise on PRs that may build tshy packages as
part of their dependency graph (such as #29374)
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/web-pubsub-express`
### Describe the problem that is addressed by this PR
Doing a rebuild of this package leaves `package.json` in a dirty state.
### 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)
### Packages impacted by this PR
@azure/web-pubsub-client
### Issues associated with this PR
### Describe the problem that is addressed by this PR
In the previous RP, we found a bug that if sequenceId == 0, then it
won't be sent to the service. Which means if no message is received from
the service, there won't be a keepalive enabled
### 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
### 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)_
- [x] Added a changelog (if necessary)