Skip to content

Commit 7cb9053

Browse files
authored
servicebus-track2-ga (Azure#19316)
1 parent a8e7c4d commit 7cb9053

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+7077
-4601
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 1541 additions & 1202 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
11
# Release History
2+
3+
## 5.0.0 (2021-12-14)
24

3-
## 5.0.0-beta.2 (Unreleased)
5+
The package of @azure/arm-servicebus is using our next generation design principles since version 5.0.0-beta.2, which contains breaking changes.
46

5-
### Features Added
7+
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
68

7-
### Breaking Changes
9+
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
810

9-
### Bugs Fixed
10-
11-
### Other Changes
12-
13-
## 5.0.0-beta.1 (2021-10-09)
14-
15-
This is the first preview for the new version of the `@azure/arm-servicebus` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
16-
17-
While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
18-
19-
Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
20-
21-
**Noteworthy changes and features**
22-
- Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
23-
- Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
24-
- List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
25-
- Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
26-
- The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
11+
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).

sdk/servicebus/arm-servicebus/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ServiceBusManagement client.
44

5-
Azure Service Bus client for managing Namespace, IPFilter Rules, VirtualNetworkRules and Zone Redundant
5+
Azure Service Bus client for managing Namespace
66

77
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicebus/arm-servicebus) |
88
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-servicebus) |
@@ -33,9 +33,9 @@ npm install @azure/arm-servicebus
3333
To create a client object to access the Azure ServiceBusManagement API, you will need the `endpoint` of your Azure ServiceBusManagement resource and a `credential`. The Azure ServiceBusManagement client can use Azure Active Directory credentials to authenticate.
3434
You can find the endpoint for your Azure ServiceBusManagement resource in the [Azure Portal][azure_portal].
3535

36-
#### Using an Azure Active Directory Credential
36+
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
3737

38-
You can authenticate with Azure Active Directory using the [Azure Identity library][azure_identity]. To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
38+
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
3939

4040
```bash
4141
npm install @azure/identity
@@ -45,13 +45,18 @@ You will also need to **register a new AAD application and grant access to Azure
4545
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
4646

4747
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
48+
4849
```javascript
4950
const { ServiceBusManagementClient } = require("@azure/arm-servicebus");
5051
const { DefaultAzureCredential } = require("@azure/identity");
5152
const subscriptionId = "00000000-0000-0000-0000-000000000000";
5253
const client = new ServiceBusManagementClient(new DefaultAzureCredential(), subscriptionId);
5354
```
5455

56+
57+
### JavaScript Bundle
58+
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
59+
5560
## Key concepts
5661

5762
### ServiceBusManagementClient
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"commit": "92b58eb71fd5eb2ce5600e9233541074ecabf851",
2+
"commit": "6654157972dbf54b187150e389237494f35145f4",
33
"readme": "specification/servicebus/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/servicebus/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.12",
4+
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/servicebus/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211207.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"use": "@autorest/typescript@6.0.0-beta.12"
6+
"use": "@autorest/typescript@6.0.0-alpha.16.20211207.1"
77
}

sdk/servicebus/arm-servicebus/api-extractor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3-
"mainEntryPointFilePath": "./dist-esm/index.d.ts",
3+
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
44
"docModel": { "enabled": true },
55
"apiReport": { "enabled": true, "reportFolder": "./review" },
66
"dtsRollup": {

sdk/servicebus/arm-servicebus/package.json

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,21 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for ServiceBusManagementClient.",
6-
"version": "5.0.0-beta.2",
7-
"engines": {
8-
"node": ">=12.0.0"
9-
},
6+
"version": "5.0.0",
7+
"engines": { "node": ">=12.0.0" },
108
"dependencies": {
119
"@azure/core-lro": "^2.2.0",
1210
"@azure/abort-controller": "^1.0.0",
13-
"@azure/core-paging": "^1.1.1",
11+
"@azure/core-paging": "^1.2.0",
1412
"@azure/core-client": "^1.0.0",
1513
"@azure/core-auth": "^1.3.0",
1614
"@azure/core-rest-pipeline": "^1.1.0",
1715
"tslib": "^2.2.0"
1816
},
19-
"keywords": [
20-
"node",
21-
"azure",
22-
"typescript",
23-
"browser",
24-
"isomorphic"
25-
],
17+
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
2618
"license": "MIT",
2719
"main": "./dist/index.js",
28-
"module": "./dist-esm/index.js",
20+
"module": "./dist-esm/src/index.js",
2921
"types": "./types/arm-servicebus.d.ts",
3022
"devDependencies": {
3123
"@microsoft/api-extractor": "^7.18.11",
@@ -37,16 +29,19 @@
3729
"rollup": "^1.16.3",
3830
"rollup-plugin-sourcemaps": "^0.4.2",
3931
"typescript": "~4.2.0",
40-
"uglify-js": "^3.4.9"
32+
"uglify-js": "^3.4.9",
33+
"rimraf": "^3.0.0",
34+
"@azure/identity": "^2.0.1",
35+
"@azure-tools/test-recorder": "^1.0.0",
36+
"mocha": "^7.1.1",
37+
"cross-env": "^7.0.2"
4138
},
4239
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/servicebus/arm-servicebus",
4340
"repository": {
4441
"type": "git",
4542
"url": "https://github.com/Azure/azure-sdk-for-js.git"
4643
},
47-
"bugs": {
48-
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
49-
},
44+
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
5045
"files": [
5146
"dist/**/*.js",
5247
"dist/**/*.js.map",
@@ -66,31 +61,30 @@
6661
"types/*"
6762
],
6863
"scripts": {
69-
"build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
64+
"build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
7065
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
7166
"prepack": "npm run build",
7267
"pack": "npm pack 2>&1",
7368
"extract-api": "api-extractor run --local",
7469
"lint": "echo skipped",
7570
"audit": "echo skipped",
76-
"clean": "echo skipped",
71+
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
7772
"build:node": "echo skipped",
7873
"build:browser": "echo skipped",
7974
"build:test": "echo skipped",
8075
"build:samples": "echo skipped.",
8176
"check-format": "echo skipped",
8277
"execute:samples": "echo skipped",
8378
"format": "echo skipped",
84-
"test": "echo skipped",
85-
"prebuild": "echo skipped",
79+
"test": "npm run integration-test",
8680
"test:node": "echo skipped",
8781
"test:browser": "echo skipped",
88-
"unit-test": "echo skipped",
89-
"unit-test:node": "echo skipped",
82+
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
83+
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
9084
"unit-test:browser": "echo skipped",
85+
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
86+
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
9187
"integration-test:browser": "echo skipped",
92-
"integration-test:node": "echo skipped",
93-
"integration-test": "echo skipped",
9488
"docs": "echo skipped"
9589
},
9690
"sideEffects": false,

0 commit comments

Comments
 (0)