From 6674a2f91c9c2fc9cedfa62fc90d79ec0a200147 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Wed, 1 Dec 2021 19:07:28 -0500 Subject: [PATCH] [core-client] Prepare release for v1.3.3 out of a hotfix branch (#18856) * Check is value is undefined in appendQueryParams (#18621) * Check is value is undefined in appendQueryParams * Minor change * Response to PR comments * Update sdk/core/core-client/src/urlHelpers.ts Co-authored-by: Jeff Fisher * Minor refactor Co-authored-by: Jeff Fisher * Post release automated changes for core releases (#18358) Post release automated changes for azure-core-client * Remove the word experimental in readmes (#18773) We have the word "Experimental" in the titles in the readme files for our core packages. My guess is that we started with this when we were working on core v2, forgot to remove it when core v2 went GA and all our newer core packages from them did a copy/paste :) @xirzec, @joheredi Am I missing something? * Update Changelog to include query param check (#18851) * Update Changelog to include query param check * Update sdk/core/core-client/CHANGELOG.md Co-authored-by: Deyaaeldeen Almahallawi Co-authored-by: Deyaaeldeen Almahallawi * fix reinstall native dependency (#18582) * Generate absolute path for symlink to reinstall native dependency Co-authored-by: Sarangan Rajamanickam Co-authored-by: Jeff Fisher Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Ramya Rao Co-authored-by: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> --- .../templates/steps/use-node-test-version.yml | 5 +++-- sdk/core/core-client-lro-rest/README.md | 2 +- sdk/core/core-client-paging-rest/README.md | 2 +- sdk/core/core-client-rest/README.md | 2 +- sdk/core/core-client/CHANGELOG.md | 6 ++++++ sdk/core/core-client/README.md | 2 +- sdk/core/core-client/package.json | 2 +- sdk/core/core-client/src/urlHelpers.ts | 11 ++++++++--- sdk/core/core-rest-pipeline/README.md | 2 +- sdk/core/core-xml/README.md | 2 +- 10 files changed, 24 insertions(+), 12 deletions(-) diff --git a/eng/pipelines/templates/steps/use-node-test-version.yml b/eng/pipelines/templates/steps/use-node-test-version.yml index 3d38b86d7e1f..b8c46ca79cbb 100644 --- a/eng/pipelines/templates/steps/use-node-test-version.yml +++ b/eng/pipelines/templates/steps/use-node-test-version.yml @@ -23,7 +23,9 @@ steps: } # Map from the symlink path to the target path (npm has issues installing into symlink dirs) # Example: common/temp/node_modules/.pnpm/keytar@5.6.0/node_modules/keytar - $targetPath = (Get-Item $symlink).Target + $symlinkInfo = Get-Item $symlink + $targetPath = [IO.Path]::Combine($symlinkInfo.Parent, $symlinkInfo.Target) + Write-Host "Target of symlink : $($targetPath)" # Need to run "npm install" at path containing "node_modules" folder # Example: common/temp/node_modules/.pnpm/keytar@5.6.0 @@ -42,7 +44,6 @@ steps: # pnpm v6 replaces '/' in package names with '+' to reduce nesting directory in virtual store so we need to # change it back $packageAtVersion = $packageAtVersion.Replace("+", "/") - # Check if package has org name. for e.g @azure/msal-node-enxtensions # This returns either @azure or .pnpm( if no org is present) $packageParentName = Split-path -Leaf (Split-Path -Parent -Resolve $packageInstallPath) diff --git a/sdk/core/core-client-lro-rest/README.md b/sdk/core/core-client-lro-rest/README.md index 7f8ea52aab7b..97ff534f79bd 100644 --- a/sdk/core/core-client-lro-rest/README.md +++ b/sdk/core/core-client-lro-rest/README.md @@ -1,4 +1,4 @@ -# Azure Rest Core LRO library for JavaScript (Experimental) +# Azure Rest Core LRO library for JavaScript This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript). Specifically for rest level clients, as a helper to handle long running operations. This package implements support for Autorest `x-ms-long-running-operation` specification. diff --git a/sdk/core/core-client-paging-rest/README.md b/sdk/core/core-client-paging-rest/README.md index 9d4e9c57b5e7..52ea1ec51d5c 100644 --- a/sdk/core/core-client-paging-rest/README.md +++ b/sdk/core/core-client-paging-rest/README.md @@ -1,4 +1,4 @@ -# Azure Rest Core Paging library for JavaScript (Experimental) +# Azure Rest Core Paging library for JavaScript This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript). Specifically for rest level clients, as a helper to handle Pageable operations. This package implements support for Autorest `x-ms-pageable` specification. diff --git a/sdk/core/core-client-rest/README.md b/sdk/core/core-client-rest/README.md index 4a095693277f..7ecac6ac4f48 100644 --- a/sdk/core/core-client-rest/README.md +++ b/sdk/core/core-client-rest/README.md @@ -1,4 +1,4 @@ -# Azure Rest Core client library for JavaScript (Experimental) +# Azure Rest Core client library for JavaScript This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript). Specifically for rest level clients diff --git a/sdk/core/core-client/CHANGELOG.md b/sdk/core/core-client/CHANGELOG.md index 9eca13c253d5..fa8ac2bd36de 100644 --- a/sdk/core/core-client/CHANGELOG.md +++ b/sdk/core/core-client/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.3.3 (2021-12-02) + +### Bugs Fixed + +- Added a check to handle undefined value during the parsing of query parameters. Please refer to [PR #18621](https://github.com/Azure/azure-sdk-for-js/pull/18621) for further details. + ## 1.3.2 (2021-10-25) ### Bugs Fixed diff --git a/sdk/core/core-client/README.md b/sdk/core/core-client/README.md index 3cae0857ee55..c29585022cc6 100644 --- a/sdk/core/core-client/README.md +++ b/sdk/core/core-client/README.md @@ -1,4 +1,4 @@ -# Azure Core Service client library for JavaScript (Experimental) +# Azure Core Service client library for JavaScript This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript). diff --git a/sdk/core/core-client/package.json b/sdk/core/core-client/package.json index d89d5469eff5..28a7027c75ec 100644 --- a/sdk/core/core-client/package.json +++ b/sdk/core/core-client/package.json @@ -1,6 +1,6 @@ { "name": "@azure/core-client", - "version": "1.3.2", + "version": "1.3.3", "description": "Core library for interfacing with AutoRest generated code", "sdk-type": "client", "main": "dist/index.js", diff --git a/sdk/core/core-client/src/urlHelpers.ts b/sdk/core/core-client/src/urlHelpers.ts index b46c9e6bfc95..d122304e303b 100644 --- a/sdk/core/core-client/src/urlHelpers.ts +++ b/sdk/core/core-client/src/urlHelpers.ts @@ -215,8 +215,11 @@ function calculateQueryParameters( }; } -function simpleParseQueryParams(queryString: string): Map { - const result: Map = new Map(); +function simpleParseQueryParams(queryString: string): Map { + const result: Map = new Map< + string, + string | string[] | undefined + >(); if (!queryString || queryString[0] !== "?") { return result; } @@ -288,11 +291,13 @@ export function appendQueryParams( for (const [name, value] of combinedParams) { if (typeof value === "string") { searchPieces.push(`${name}=${value}`); - } else { + } else if (Array.isArray(value)) { // QUIRK: If we get an array of values, include multiple key/value pairs for (const subValue of value) { searchPieces.push(`${name}=${subValue}`); } + } else { + searchPieces.push(`${name}=${value}`); } } diff --git a/sdk/core/core-rest-pipeline/README.md b/sdk/core/core-rest-pipeline/README.md index 28e1808b5cf3..69165268d72c 100644 --- a/sdk/core/core-rest-pipeline/README.md +++ b/sdk/core/core-rest-pipeline/README.md @@ -1,4 +1,4 @@ -# Azure Core HTTP client library for JavaScript (Experimental) +# Azure Core HTTP client library for JavaScript This is the core HTTP pipeline for Azure SDK JavaScript libraries which work in the browser and Node.js. This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript). diff --git a/sdk/core/core-xml/README.md b/sdk/core/core-xml/README.md index 902a7dafc21e..89d93ec5cb84 100644 --- a/sdk/core/core-xml/README.md +++ b/sdk/core/core-xml/README.md @@ -1,4 +1,4 @@ -# Azure Core XML client library for JavaScript (Experimental) +# Azure Core XML client library for JavaScript This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript) for APIs that require parsing XML payloads.