We have a check for when asking for any session, i.e., not providing a
session id), but not receiving a link having a session id. However, the
check is `if (!this._providedSessionId && !receivedSessionId)` which
also evaluates to `true` for session id of empty string, which is valid
session id.
This PR changes it to check for `undefined` so that session id of empty
string doesn't lead to error being thrown.
- 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***
playing with the idea of exposing features under the `./experimental`
subpath and add a dev-tool command to report error if we consume
experimental Apis in a GA package.
[ServiceBus] Add the experimental diagnostic feature omitMessageBody
via an augmented `PeekMessagesOptions` interface under `./experimental`
subpath export.
After migrating to ESM, we no longer use rolled-up dts files thus lose the ability
to trim `@beta` Apis from public type definition files. This PR explores an approach to
expose Apis from the `./experimental` export.
- apply the result of `dev-tool admin migrate-package --package-name
@azure/service-bus`
without removing chai usages in tests because it is causing crash when
running
the command
- work around compilation error from "long" with `"skipLibCheck": true`
- fix assert/chai/etc.
- replace sinon usage with vi
***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
- [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
- replace .eslintrc.json with eslint.config.mjs
- fix linting errors
- URL is in global scope on all of our supported platforms
- we use "buffer" npm package for browsers support so suppressing errors
***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.
Focuses on cleaning up the perf libs folder by removing outdated and
redundant performance tests for various packages under the service-bus
directory. The changes are as follows:
- `azure-sb`
- The package has been deprecated and is no longer in active use.
Therefore, maintaining performance tests for this package is
unnecessary.
- `@azure/service-bus@7.x`
- this version has the perf tests under
`sdk/servicebus/service-bus/perf-tests/` folder
- `@azure/service-bus@1.x`
- this version has seen a significant decline in usage has less than
2.5% of the downloads (in the past 7 days) compared to
`@azure/service-bus@7.x`, making it insignificant to maintain
- `rhea-promise` tests
- `rhea-promise` package are also being removed. However, if there is a
future need to compare benchmarks, we can reintroduce rhea-promise tests
under the `sdk/servicebus/service-bus/perf-tests/` folder.
This helps to streamline our perf tests, reduce maintenance overhead,
and ensure that our focus remains on the most relevant and actively used
packages.
In live test pipeline, our DefaultAzureCredential would succeed in getting a token from MSI
but that token doesn't work with our test resources. This PR works around the issue by passing
a fake Msi client id to DefaultAzureCredential constructor, thus cause token retrieval to fail,
and DefaultAzureCredential can continue to try the next credential type in the chain.
- updating test dev dependencies
- add fully qualified namespace env var
- update atomE2ETests to use token credential
- Update test utils to use createTestCredential
- use SERVICEBUS_FQDN to create clients for test
- use namespace for premium testing too
- add `UseFederatedAuth: true` in tests.yml
- remove usingAadAuth sample
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***
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.
This particular error message was updated in PR #29853 but the test wasn't and since it's a live test, the CI didn't catch it. This PR fixes the test failure by updating the expected error message.
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.
This PR fixes a memory leak in `MessageSession.createRheaLink` where in
error cases we didn't
close the created `rhea-promise` receiver. Eventually this would lead to
client exceeding the quota on maximum allowed links on a connection.
The fix is to close the created receiver before we throw errors.
After upgrading to `@azure/abort-controller` v2, some tests that verify
the
abort error messages have been failing. It turns out that in our async
operations because multiple callbacks are attached to the same abort
signal (for
example, retry logic, delay calls for timeout, authentication, auto
lock-renewing, etc.) and multiple abort errors are thrown reacting to
their
signal being aborted. After upgrading to `@azure/abort-controller` v2,
the order
of `AbortError`s being thrown have changed thus the error we catch in
the test
is now different from the one before upgrading. It is possible that our
previous
`AbortContoller` implementation of parent-children aborter pattern
implies
certain ordering which is different from when manually attaching
callbacks.
However, what's important to the consumer of our APIs in this scenario
is that
the operation is aborted, AbortErrors are thrown, and one of them is
caught,
even a different one than before.
This PR removes verification of the error messages.
I also realize that it is not useful to re-throw the error from delay
for
timeout operation, when the delay operation is aborted either because a
signal
is aborted, or because a operation it is waiting for succeeds. So that
error is
swallowed.
-------
### Packages impacted by this PR
`@azure/service-bus`
Build cache was enabled for most of our commonly built packages in PR
https://github.com/Azure/azure-sdk-for-js/pull/27409.
This PR enables build cache for several more packages that get built in
core -
ci pipelines to further reduce time on packages when they haven't
changed.
### Packages impacted by this PR
`@azure/service-bus`
### Issues associated with this PR
### Describe the problem that is addressed by this PR
Add support to batch-delete messages
---------
Co-authored-by: Jeff Fisher <jeffish@microsoft.com>
Co-authored-by: Deyaaeldeen Almahallawi <dealmaha@microsoft.com>