Skip to content

Commit

Permalink
Standardize constantPaths for updating package version in automated P…
Browse files Browse the repository at this point in the history
…Rs (Azure#15685)
  • Loading branch information
ramya-rao-a committed Jun 11, 2021
1 parent b4e906c commit 0df2a11
Show file tree
Hide file tree
Showing 31 changed files with 154 additions and 7 deletions.
18 changes: 17 additions & 1 deletion sdk/communication/communication-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"types": "types/communication-chat.d.ts",
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:autorest": "autorest ./swagger/README.md --typescript --version=3.0.6267 --v3 --package-version=1.1.0-beta.1 && rushx format",
"build:autorest": "autorest ./swagger/README.md --typescript --version=3.0.6267 --v3 && rushx format",
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
"build:samples": "echo Obsolete.",
Expand Down Expand Up @@ -124,6 +124,22 @@
"util": "^0.12.1",
"typedoc": "0.15.2"
},
"//metadata": {
"constantPaths": [
{
"path": "src/generated/src/chatApiClientContext.ts",
"prefix": "packageVersion"
},
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
"//sampleConfiguration": {
"productName": "Azure Communication Services - Chat",
"productSlugs": [
Expand Down
1 change: 1 addition & 0 deletions sdk/communication/communication-chat/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use-extension:
azure-arm: false
add-credentials: false
disable-async-iterators: true
package-version: 1.1.0-beta.1
```
### Rename CommunicationError to ChatError
Expand Down
18 changes: 17 additions & 1 deletion sdk/communication/communication-sms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "types/communication-sms.d.ts",
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:autorest": "autorest ./swagger/README.md --typescript --v3 --package-version=1.0.1 && rushx format",
"build:autorest": "autorest ./swagger/README.md --typescript --v3 && rushx format",
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
"build:samples": "dev-tool samples publish --force",
Expand Down Expand Up @@ -122,6 +122,22 @@
"util": "^0.12.1",
"typedoc": "0.15.2"
},
"//metadata": {
"constantPaths": [
{
"path": "src/generated/src/smsApiClientContext.ts",
"prefix": "packageVersion"
},
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
"//sampleConfiguration": {
"productName": "Azure Communication Services - SMS",
"productSlugs": [
Expand Down
1 change: 1 addition & 0 deletions sdk/communication/communication-sms/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ use-extension:
"@autorest/typescript": "6.0.0-dev.20200623.2"
azure-arm: false
add-credentials: false
package-version: 1.0.1
```
4 changes: 4 additions & 0 deletions sdk/containerregistry/container-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions sdk/containerregistry/container-registry/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ hide-clients: true
use-core-v2: true
use-extension:
"@autorest/typescript": "C:/github/autorest.typescript"
package-version: 1.0.0-beta.4
```
16 changes: 16 additions & 0 deletions sdk/digitaltwins/digital-twins-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,22 @@
"@types/uuid": "^8.0.0"
},
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/generated/azureDigitalTwinsAPIContext.ts",
"prefix": "packageVersion"
},
{
"path": "src/digitalTwinsClient.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
"//sampleConfiguration": {
"productName": "Azure Digital Twins",
"productSlugs": [
Expand Down
1 change: 1 addition & 0 deletions sdk/digitaltwins/digital-twins-core/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ license-header: MICROSOFT_MIT_NO_VERSION
input-file: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json
output-folder: ../
source-code-folder-path: ./src/generated
package-version: 1.0.4
```
## Customizations for Track 2 Generator
Expand Down
16 changes: 16 additions & 0 deletions sdk/keyvault/keyvault-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src"
},
"//metadata": {
"constantPaths": [
{
"path": "src/generated/keyVaultClientContext.ts",
"prefix": "packageVersion"
},
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
"//sampleConfiguration": {
"productName": "Azure Key Vault Administration",
"productSlugs": [
Expand Down
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-admin/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ input-file:
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/1e2c9f3ec93078da8078389941531359e274f32a/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.2/backuprestore.json
output-folder: ../
source-code-folder-path: ./src/generated
package-version: 4.0.0-beta.4
```
### Hide LROs
Expand Down
4 changes: 4 additions & 0 deletions sdk/keyvault/keyvault-certificates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-certificates/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/1e2c9f3
output-folder: ../
source-code-folder-path: ./src/generated
hide-clients: true
package-version: 4.2.0-beta.4
```
4 changes: 4 additions & 0 deletions sdk/keyvault/keyvault-keys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-keys/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ disable-async-iterators: true
api-version-parameter: choice
v3: true
hide-clients: true
package-version: 4.2.0-beta.6
```
## Customizations for Track 2 Generator
Expand Down
4 changes: 4 additions & 0 deletions sdk/keyvault/keyvault-secrets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-secrets/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/1e2c9f3
output-folder: ../
source-code-folder-path: ./src/generated
hide-clients: true
package-version: 4.2.0-beta.5
```
4 changes: 4 additions & 0 deletions sdk/metricsadvisor/ai-metrics-advisor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
3 changes: 2 additions & 1 deletion sdk/metricsadvisor/ai-metrics-advisor/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use-extension:
"@autorest/typescript": "6.0.0-dev.20210223.1"
disable-async-iterators: true
hide-clients: true
package-version: 1.0.0
```
## Customizations for Track 2 Generator
Expand Down Expand Up @@ -687,4 +688,4 @@ directive:
}
}
}
```
```
16 changes: 16 additions & 0 deletions sdk/mixedreality/mixedreality-authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@
"util": "^0.12.1",
"typedoc": "0.15.2"
},
"//metadata": {
"constantPaths": [
{
"path": "src/generated/mixedRealityStsRestClientContext.ts",
"prefix": "packageVersion"
},
{
"path": "src/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
"//sampleConfiguration": {
"disableDocsMs": false,
"apiRefLink": "https://docs.microsoft.com/javascript/api/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add-credentials: false
use-extension:
"@autorest/typescript": "6.0.0-dev.20210121.2"
hide-clients: true
package-version: 1.0.0-beta.1
```
## Customizations for Track 2 Generator
Expand Down
8 changes: 8 additions & 0 deletions sdk/monitor/monitor-opentelemetry-exporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,17 @@
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
"//metadata": {
"constantPaths": [
{
"path": "src/generated/applicationInsightsClientContext.ts",
"prefix": "packageVersion"
},
{
"path": "src/utils/constants/applicationinsights.ts",
"prefix": "packageVersion"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ input-file: https://github.com/Azure/azure-rest-api-specs/blob/e47988f3ccaa90681
add-credentials: false
use-extension:
"@autorest/typescript": "6.0.0-dev.20210121.1"
package-version: 1.0.0-beta.4
```
10 changes: 9 additions & 1 deletion sdk/storage/storage-blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:autorest": "autorest ./swagger/README.md --typescript --package-version=12.6.0",
"build:autorest": "autorest ./swagger/README.md --typescript",
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
"build:nodebrowser": "rollup -c 2>&1",
Expand Down Expand Up @@ -95,9 +95,17 @@
"sideEffects": false,
"//metadata": {
"constantPaths": [
{
"path": "src/generated/src/storageClientContext.ts",
"prefix": "packageVersion"
},
{
"path": "src/utils/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/storage-blob/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ disable-async-iterators: true
add-credentials: false
use-extension:
"@autorest/typescript": "6.0.0-dev.20210218.1"
package-version: 12.6.0
```
## Customizations for Track 2 Generator
Expand Down
8 changes: 8 additions & 0 deletions sdk/storage/storage-file-datalake/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,17 @@
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/storage/storage-file-datalake/",
"//metadata": {
"constantPaths": [
{
"path": "src/generated/src/storageClientContext.ts",
"prefix": "packageVersion"
},
{
"path": "src/utils/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/storage-file-datalake/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ disable-async-iterators: true
add-credentials: false
use-extension:
"@autorest/typescript": "6.0.0-dev.20210223.1"
package-version: 12.5.0
```
## Customizations for Track 2 Generator
Expand Down
6 changes: 5 additions & 1 deletion sdk/storage/storage-file-share/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:autorest": "autorest ./swagger/README.md --typescript --package-version=12.6.0",
"build:autorest": "autorest ./swagger/README.md --typescript",
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
"build:nodebrowser": "rollup -c 2>&1",
Expand Down Expand Up @@ -95,6 +95,10 @@
{
"path": "src/utils/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/storage-file-share/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ disable-async-iterators: true
add-credentials: false
use-extension:
"@autorest/typescript": "6.0.0-dev.20210218.1"
package-version: 12.6.0
```
## Customizations for Track 2 Generator
Expand Down
6 changes: 5 additions & 1 deletion sdk/storage/storage-queue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"scripts": {
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:autorest": "autorest ./swagger/README.md --typescript --package-version=12.5.0",
"build:autorest": "autorest ./swagger/README.md --typescript",
"build:nodebrowser": "rollup -c 2>&1",
"build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1",
"build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1",
Expand Down Expand Up @@ -91,6 +91,10 @@
{
"path": "src/utils/constants.ts",
"prefix": "SDK_VERSION"
},
{
"path": "swagger/README.md",
"prefix": "package-version"
}
]
},
Expand Down
Loading

0 comments on commit 0df2a11

Please sign in to comment.