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***
- bump @azure-tools/test-credential to ^2.0.0
- remove env vars that are no longer used from tests.yml
- update karma.config.js to remove env vars
- remove unused env vars from test utils
- remove unused env vars from sample.env
- bump dev dep `@azure/identity` version to ^4.2.1
- re-publish samples
---------
Co-authored-by: Timo van Veenendaal <timov@microsoft.com>
### Packages impacted by this PR
`@azure-tools/test-perf`
### Describe the problem that is addressed by this PR
Making perf package public for consumption outside this repo.
This marks the initial release of the `@azure-tools/test-perf` library
to npm, providing a robust test utility framework that assists with the
performance testing of Azure SDKs for JS/TS.
### Key Concepts
1. **Introduction of PerfTest**: A test utility designed to execute
performance and stress tests for Azure SDK for JavaScript packages.
2. **Test Execution**: Tests are run asynchronously, influenced by
parameters like duration, iterations, and parallelism.
3. **Command Line Parameters**: Utilizes `minimist` for parsing command
line options into a `PerfOptionDictionary<string>` for test
configuration.
4. **Default Options**: Includes standard parameters such as `help`,
`no-cleanups`, `parallel`, `duration`, `warmup`, `iterations`,
`no-cleanup`, and `milliseconds-to-log`.
5. **Test Lifecycle**: Tests run repeatedly within the specified
`duration` and `iterations`, with a `warmup` period for runtime
optimization.
6. **Setup and Cleanup**: Features `globalSetup`/`globalCleanup` methods
for CPU-level preparation and `setup`/`cleanup` methods for
instance-specific state management.
This change migrates every package to the latest major version of
identity in order to ensure we can catch any regressions earlier in the
development process.
I chose to upgrade the samples' package.json as well - but happy to
revert that if there are objections.
***NO_CI***
***NO_CI***
Latest versions of prettier now correctly formats `tsconfig.json`, which results
in differences with previous version of 3.1.1 in pnpm-lock.yaml. This is failing
the automated rush update pipeline because `check-format` fails with version
3.2.4.
This includes changes of
- bumping prettier version to ^3.2.4
- running `rush format`
***NO_CI***
- remove dev dependency `prettier` from non-tool packages when possible and
update them to run vendored prettier for `check-format` and `format` scripts
- upgrade rest of packages to prettier v3
- run `rush format` for all rush packages
This is a follow-up to https://github.com/Azure/azure-sdk-for-js/pull/28127 to
move the rest of repo to prettier v3.
***NO_CI***
The combination of `nyc` + `esm` is broken in latest versions of
NodeJS (https://github.com/istanbuljs/nyc/issues/1530#issuecomment-1773403365).
Since `esm` package is no longer actively maintained and its repo is archived,
it's less likely that the issue will be fixed soon.
This change switches to use another code coverage tool `c8` which is not
affected. `c8` respects `.nycrc` config files so those are not renamed.
***NO_CI***
- update engine.node to >=16.0.0 in package.json
- update @types/node version to ^16.0.0
- update dev-tool sample's MIN_SUPPORTED_NODE_VERSION to 16
- update eslint-plugin's rules and tests related to engine.node version
- remove TextEncoder and TextDecoder stubs as they are now on global object
- fix tests compiler error due to better typings in v16
- update some README files to not reference version like 14.x.x
- along with it, `@types/mocha` version to `^10.0.0`
- add `esm` dev dependency as they are used, but not explicitly list
- use dev-tool run command for test scripts as much as possible
- fix test issue caused by Mocha behavior change around test name
- move `import "chai/register-should"` to mocha -r command line option for core
http tests
***NO_CI***
***NO_CI***
Most of our packages, if not all, have dev dependency on `ts-node` either
directly (`mocha --require ts-node/register`) or indirectly via dev-tool (`run
test:node-ts-input`). Currently tests are running fine because mocha is able to
resolve ts-node currently. It may fail in other cases though (e.g., after
migrating a package to ESM).
This ensures `ts-node@^10.0.0` and `types/node` are included for our rush
packages.
Some projects are missing `ts-node` dev dependencies even though they
are depending it to run tests in .ts files. They work today probably
because PNPM store dependencies in a way that allows `ts-node` to be
resolved even it's not in the devDependencies list. However, it may not
work in all scenarios. For example, after migrating a packge to ESM.
This PR adds the missing `ts-node` dev dependencie and also make the
version consistent (^10.0.0)
### Packages impacted by this PR
- `@azure/container-registry`
### Describe the problem that is addressed by this PR
The release automation wasn't updating `constants.ts`. This value isn't
exposed in our API but is passed to our telemetry.
### Packages impacted by this PR
- `@azure/container-registry`
### Issues associated with this PR
- Fix#25645
### Describe the problem that is addressed by this PR
Add extra validation to `downloadBlob` and `getManifest`:
- Restrict manifest size to 4 MB
- Throw early if bytes read during `downloadBlob` exceed the value in
the
`Content-Length` header
Based somewhat on the [Java PR for the same
thing](https://github.com/Azure/azure-sdk-for-java/pull/34737), but
without validation of the `Content-Range` header since we are using
optimistic download.
### Packages impacted by this PR
- `@azure/container-registry`
### Describe the problem that is addressed by this PR
Docker manifest upload and download live tests have started failing
recently due to changes in the `library/hello-world` image on Docker
Hub, which we deployed in our test resources. This PR removes the
dependency on the Docker Hub image from our tests so we won't have this
issue any more.
### Packages impacted by this PR
- `@azure/container-registry`
### Issues associated with this PR
- Should fix#25757
### Describe the problem that is addressed by this PR
- As a result of changes introduced in #25592, the properties in
`OciAnnotations` are not being remapped. This PR updates
`OciAnnotations` so that the property names correspond to the
specification.