Граф коммитов

246 Коммитов

Автор SHA1 Сообщение Дата
Matthew Podwysocki 93ad213554
[web pubsub] Move @azure/web-pubsub to ESM/vitest (#31844)
### 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>
2024-11-20 10:18:40 -05:00
cqnguy23 4dafd34fcc
Fix client type issues and improve tests (#31617)
- 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>
2024-11-20 11:48:28 +07:00
Jeremy Meng ae84780ce1
[dev-tool] stop rolling up types for ESM (#31720)
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`.
2024-11-13 10:01:13 -08:00
Azure SDK Bot e3c92ad497
Post release automated changes for web-pubsub releases (#31264)
Post release automated changes for azure-arm-webpubsub
2024-11-06 09:11:31 -08:00
Jeremy Meng a28e8f0795 [EngSys] move to vendored version of cross-env via dev-tool
***NO_CI***

- apply the transformation

- update samples' README
2024-11-02 00:48:06 +00:00
cqnguy23 2404c52da2
Add SocketIO support for client access url (#31574)
- 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>
2024-11-01 10:08:32 +07:00
Jeremy Meng 980f3cbb89 [EngSys] move `uglify-js` to dev-tool vendored
- 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***
2024-10-30 18:01:20 +00:00
Jeremy Meng 6a2c7300eb [eslint-plugin] add rule "@typescript-eslint/consistent-type-imports": "warn"
- 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
2024-10-30 15:48:52 +00:00
Jeremy Meng 1cae9db8e1 [EngSys] remove "audit" NPM script and it's related file
as we no longer use it and rely on GitHub security features.

***NO_CI***
2024-10-25 19:28:06 +00:00
Jeremy Meng 59bb0809ba [EngSys] use vendored version of `mkdirp` and `rimraf` from dev-tool
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***
2024-10-23 17:53:07 +00:00
Wes Haggard 1c50b6ac49
Switch to TME test subscription (#31329) 2024-10-14 18:19:12 -07:00
Jeremy Meng 652a7ffa89 [eslint-plugin] fix ts-naming-options rule issue
***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
2024-10-02 16:40:01 +00:00
cqnguy23 377c46bac6
Add support for MQTT event handler (#31072)
Add support for MQTT event handler

---------

Co-authored-by: chuongnguyen <chuongnguyen@microsoft.com>
2024-10-01 14:12:14 +07:00
ZiWei Chen 6aa0c9bbe5
[mgmt] webpubsub release (#31073)
https://github.com/Azure/sdk-release-request/issues/5448
breaking caused by
https://github.com/Azure/azure-rest-api-specs/pull/29086
2024-09-30 14:06:01 +08:00
Matthew Podwysocki 61c8b9aae4 [EngSys] Add update-snippets to all package.json files ***NO_CI*** 2024-09-26 17:59:37 +00:00
Maor Leger 64c72d5dda [engsys] Move all packages to build-package script ***NO_CI*** 2024-09-25 18:52:35 +00:00
Jeremy Meng a7b3656a05 [EngSys] upgrade dev dependency `typescript` version to `~5.6.2`
***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
2024-09-19 18:07:31 -07:00
Matthew Podwysocki 370f60bba5
[web pub sub] update protobuf to ESM (#31044)
### 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)
2024-09-11 12:50:57 -04:00
Phan Thai Duong df703d7ed9
[web-pubsub-client's sample] Update package.json dependency from 'next' to 'latest' for azure/web-pubsub-client (#30988)
### 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>
2024-09-09 19:17:24 -07:00
ZiWei Chen 928149383a
[mgmt] add Sanitized rule and update changelog template to fix ci fai… (#30226) 2024-09-06 17:10:40 +08:00
Jeremy Meng d5f6d677ec [EngSys] standardize OSS copyright header
- [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"
2024-08-27 13:01:38 -07:00
Jeremy Meng 5adb09d715 [engsys] upgrade dev dependency eslint to v9
***NO_CI***

- bump eslint version to ^9.9.0
- [eslint-plugin] remove eslint-plugin-import for now. Will re-visit until it supports eslint v9
2024-08-23 16:37:40 -07:00
Jeremy Meng 2ce3c5feb4 [eslint-plugin] upgrade typescript-eslint to v8
***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
2024-08-23 10:19:23 -07:00
Deyaaeldeen Almahallawi 75a2375598
[Web PubSub] Migrate to Bicep (#30854)
And update API version

Live tests run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4070188&view=results
2024-08-22 20:41:21 -07:00
Jeremy Meng 4ab6590ffe Apply automated migration to eslint flat config 2024-08-22 11:43:19 -07:00
Jeremy Meng b88ba2ea93
[eslint] move web-pubsub-client to flat config (#30825)
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
2024-08-21 16:04:06 +08:00
Deyaaeldeen Almahallawi 04e383e6f9
Upgrade tshy to v2 (#30747)
And in some cases downgrade from v3 to v2 (in event hubs and in
core-sse).
2024-08-13 16:01:59 -07:00
Deyaaeldeen Almahallawi 8637d50849
[clients] Upgrade vitest to v2 (#30730)
CI failure is unrelated, see
https://dev.azure.com/azure-sdk/public/_build/results?buildId=4046824&view=logs&j=58292cae-3c74-5729-4cfd-9ceee65fe129&t=5e44d412-b571-5a43-3bb4-5c5145c0a5aa.
2024-08-13 13:48:01 -07:00
Jeremy Meng 78671335a4
[EngSys] upgrade dev dependency `puppeteer` to ^23.0.2 (#30727)
- replace v22 version with v23 version
- run `rush update`
2024-08-13 12:05:49 -07:00
Azure SDK Bot 078a665983
Post release automated changes for web-pubsub releases (#30711)
Post release automated changes for azure-web-pubsub
2024-08-12 14:23:27 +08:00
cqnguy23 1aba4ddd8a
Release Azure WebPubsub (#30695)
Release Azure WebPubsub

Co-authored-by: Chuong Nguyen <chuongnguyen@microsoft.com>
2024-08-12 11:26:30 +08:00
Jeremy Meng 6606511f23
[webpubsub,fr,ta] upgrade dependency @azure/abort-controller to v2 (#30632)
and fix code

-------

### Packages impacted by this PR
ai-form-recognizer, ai-text-analytics, web-pubsub-client
2024-08-06 12:40:47 -07:00
cqnguy23 65faad76f8
Add client type field in GenerateClientTokenOptions interface (#30137)
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>
2024-08-01 09:52:52 +07:00
Jeremy Meng 3a68e456b2 [Samples] update "src/**.ts" to "src/**/*.ts" in tsconfig.json
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***
2024-07-24 13:53:00 +00:00
cqnguy23 ee2c251b2c
Migrate secret auth WebPubSub (#30471)
- Migrate tests away from secret based authentication

---------

Co-authored-by: chuongnguyen <chuongnguyen@microsoft.com>
2024-07-23 09:07:13 -07:00
Jeremy Meng b93b62368b [EngSys] remove tsconfig.package.json
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***
2024-07-16 13:27:25 +00:00
Jeremy Meng 1a09f43108 [EngSys] upgrade dev dependency `typescript` version to `~5.5.3`
***NO_CI***

- also include *.api.md updates due to the following TypeScript 5.5 change

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-5.html#simplified-reference-directive-declaration-emit
2024-07-03 22:24:35 +00:00
Matthew Podwysocki c8aa2f8fdf [EngSys] Update version of tshy ***NO_CI*** 2024-07-03 18:40:06 +00:00
Jeremy Meng 1c9a68133b [EngSys] ignore and remove .tshy directories
We currently don't have a use for them and they are safe to ignore based on the
answer in https://github.com/isaacs/tshy/issues/78#issuecomment-2203955286

***NO_CI***
2024-07-03 16:46:35 +00:00
Jeremy Meng e7312b346e [EngSys] commit file changes caused by tshy upgrades
this is a result of `rush build` on latest main.

***NO_CI***
2024-07-02 16:52:37 +00:00
Jeremy Meng 74dfa883b9 [EngSys] upgrade dep dependency `nyc` to ^17.0.0
***NO_CI***
2024-06-28 17:57:40 +00:00
Maor Leger d1149283dd
[engSys] Run rush build (#30129)
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)
2024-06-20 12:15:33 -07:00
Maor Leger 2e040fae8a Bump @azure/identity to 4.2.1 in samples ***NO_CI*** 2024-06-11 14:01:31 -07:00
Jeremy Meng f0fb922dda
[eslint-plugin] skip some package json linting for packages using tshy (#29912)
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.
2024-06-06 15:54:19 -07:00
Jeff Fisher fab92571a8
[webpubsub] missing changes from build (#29892)
### 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.
2024-06-04 19:03:58 +00:00
Matthew Podwysocki 6cb2dd46d9
[web pub sub] update express to ESM (#29862)
### 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)
2024-06-03 20:46:15 +00:00
Matthew Podwysocki c709b137c5
[web pub sub] upgrade protobufjs (#29752)
### Packages impacted by this PR

- @azure/web-pubsub-client-protobuf

### Issues associated with this PR

- #29684
2024-05-17 14:56:55 -07:00
Matthew Podwysocki cd3cf2e03e [EngSys] Update version of @azure-tools/test-utils ***NO_CI*** 2024-05-08 11:54:46 -07:00
Chenyang Liu 25942d3d85
[webpubsubclient] Fix a bug that 0 sequenceId won't be sent to service (#29474)
### 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)
2024-05-07 13:01:42 -05:00
Jeremy Meng bd4ccb16c2
[EngSys] shorten `-no-test-proxy=true` test option (#29466)
The "=true" part is no longer needed after PR #28978
2024-04-26 19:33:31 +00:00