Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 540791d

Browse files
authored
[Tables] Fix setting access policy and add test (Azure#15633)
* Re-generate and Custom serialization for ACL * format * update readme * format readme * Update changelog * set swagger package-version * Update format script * Fix test and update changelog * update recorder and recordings * fix test and changelog * use deterministic date for test * update format * fix lint * return await * Update TSDoc samples * Add additional samples to TSDoc
1 parent d82ccb1 commit 540791d

File tree

69 files changed

+1810
-897
lines changed

Some content is hidden

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

69 files changed

+1810
-897
lines changed

sdk/tables/data-tables/CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Release History
22

3-
## 12.0.0 (UNRELEASED)
4-
5-
This release marks the general availability of the `@azure/data-tables` package.
3+
## 12.0.0 (2021-06-09)
64

75
- Added support for generating SAS tokens using an `AzureNamedKeyCredential` [#15564](https://github.com/Azure/azure-sdk-for-js/pull/15564)
86
- Use @azure/core-auth `AzureSASCredendial` [#15564](https://github.com/Azure/azure-sdk-for-js/pull/15564)
97
- Fix submit transaction issue [15403](https://github.com/Azure/azure-sdk-for-js/issues/15403) when sending multiple transactions. [#15493](https://github.com/Azure/azure-sdk-for-js/pull/15493)
8+
- Fix date serialization on `getAccessPolicy` and `setAccessPolicy` Table client methods. [#15633](https://github.com/Azure/azure-sdk-for-js/pull/15633)
109

1110
### Breaking Changes
1211

sdk/tables/data-tables/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Azure Cosmos DB provides a Table API for applications that are written for Azure
2424

2525
Currently supported environments:
2626

27-
- Node.js version 8.x.x or higher
27+
- LTS versions of Node.js
2828
- Latest versions of Safari, Chrome, Edge and Firefox
2929

3030
You must have an [Azure subscription](https://azure.microsoft.com/free/) and a [Storage Account](https://docs.microsoft.com/azure/storage/tables/table-storage-quickstart-portal) or an [Azure CosmosDB database](https://docs.microsoft.com/azure/cosmos-db/create-cosmosdb-resources-portal) to use this package.
@@ -141,13 +141,14 @@ const serviceClient = new TableServiceClient(
141141
Also, You can instantiate a `TableServiceClient` with a shared access signatures (SAS). You can get the SAS token from the Azure Portal.
142142

143143
```javascript
144-
const { TableServiceClient } = require("@azure/data-tables");
144+
const { TableServiceClient, AzureSASCredential } = require("@azure/data-tables");
145145

146146
const account = "<account name>";
147147
const sas = "<service Shared Access Signature Token>";
148148

149149
const serviceClientWithSAS = new TableServiceClient(
150-
`https://${account}.table.core.windows.net${sas}`
150+
`https://${account}.table.core.windows.net`,
151+
new AzureSASCredential(sas)
151152
);
152153
```
153154

@@ -237,13 +238,17 @@ const client = new TableClient(`https://${account}.table.core.windows.net`, tabl
237238
Also, You can instantiate a `TableClient` with a shared access signatures (SAS). You can get the SAS token from the Azure Portal.
238239

239240
```javascript
240-
const { TableClient } = require("@azure/data-tables");
241+
const { TableClient, AzureSASCredential } = require("@azure/data-tables");
241242

242243
const account = "<account name>";
243244
const sas = "<service Shared Access Signature Token>";
244245
const tableName = "<tableName>";
245246

246-
const clientWithSAS = new TableClient(`https://${account}.table.core.windows.net${sas}`, tableName);
247+
const clientWithSAS = new TableClient(
248+
`https://${account}.table.core.windows.net`,
249+
tableName,
250+
new AzureSASCredential(sas)
251+
);
247252
```
248253

249254
#### List Entities in a table

sdk/tables/data-tables/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
"build:test": "tsc -p . && rollup -c 2>&1",
3131
"build:types": "downlevel-dts types/latest types/3.1",
3232
"build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local && npm run build:types",
33-
"check-format": "prettier --list-different \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
33+
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
3434
"clean": "rimraf dist dist-* types *.tgz *.log",
3535
"execute:samples": "dev-tool samples run samples-dev",
3636
"extract-api": "tsc -p . && api-extractor run --local",
37-
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
37+
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
3838
"integration-test:browser": "karma start --single-run",
3939
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 5000000 --full-trace \"dist-esm/test/{,!(browser)/**/}*.spec.js\"",
4040
"integration-test": "npm run integration-test:node && npm run integration-test:browser",

sdk/tables/data-tables/recordings/browsers/access_policy_operations/recording_should_send_a_null_ap.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/tables/data-tables/recordings/browsers/batch_operations_sasconnectionstring/recording_should_handle_sub_request_error.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/tables/data-tables/recordings/browsers/batch_operations_sasconnectionstring/recording_should_send_a_set_of_create_actions_when_using_tabletransaction_helper.json

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)