diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8e08852ab7..6f749caff8 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,51 +1,69 @@ -name: "Code scanning - action" +name: "CodeQL" on: push: + branches: ["main", "release/*"] pull_request: + branches: ["main", "release/*"] schedule: - - cron: "0 19 * * 0" + - cron: "30 3 * * 3" jobs: - CodeQL-Build: - # CodeQL runs on ubuntu-latest and windows-latest - runs-on: ubuntu-latest + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["javascript-typescript"] + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - # Override language selection by uncommenting this and choosing your languages - # with: - # languages: go, javascript, csharp, python, cpp, java + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - #- run: | - # make bootstrap - # make release + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json b/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json deleted file mode 100644 index e8093c1950..0000000000 --- a/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/configuration", - "comment": "rename openapi-to-cadl to openapi-to-typespec", - "type": "patch" - } - ], - "packageName": "@autorest/configuration" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json b/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json deleted file mode 100644 index aaba975ebd..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Add support for custom resource, enhance doc conversion and fix default value issue", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json b/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json deleted file mode 100644 index 875e9bbdfe..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Initial Support for ARM in OpenAPI to TypeSpec Conversion", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} diff --git a/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json b/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json deleted file mode 100644 index 2030593717..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Support Auth", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json b/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json deleted file mode 100644 index 469ff87dda..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Add feature and fix bug for converter.", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json b/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json deleted file mode 100644 index ac5cf8d547..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Fix validation issues for converter", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json b/common/changes/@autorest/openapi-to-typespec/fix_typo_2024-03-11-07-26.json similarity index 75% rename from common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json rename to common/changes/@autorest/openapi-to-typespec/fix_typo_2024-03-11-07-26.json index 59bb86c114..96e9fa0915 100644 --- a/common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json +++ b/common/changes/@autorest/openapi-to-typespec/fix_typo_2024-03-11-07-26.json @@ -2,7 +2,7 @@ "changes": [ { "packageName": "@autorest/openapi-to-typespec", - "comment": "Improve data-plane tspconfig", + "comment": "fix wrong client lib import name", "type": "patch" } ], diff --git a/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json b/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json deleted file mode 100644 index b17c831b29..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "use different base parameter for different resource", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json b/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json deleted file mode 100644 index 9ea72f62cc..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Add a flag to disable conversion feature for backcomp", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json b/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json deleted file mode 100644 index deea80300f..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Support new location resource expression, support new flatten decorator and fix doc escape problem.", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json b/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json deleted file mode 100644 index 87410db5b7..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "migrate `@projectedName` to `@encodedName`", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json b/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json deleted file mode 100644 index 82f8b42ddf..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "fix default value of array and remove default value of duration temporarily", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json b/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json deleted file mode 100644 index fc0023b245..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Change to use raw operation for non-resource operations for ARM", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/packages/apps/autorest/package.json b/packages/apps/autorest/package.json index d118aadb68..bfaa8ea5f7 100644 --- a/packages/apps/autorest/package.json +++ b/packages/apps/autorest/package.json @@ -43,8 +43,8 @@ }, "typings": "./dist/exports.d.ts", "devDependencies": { - "@autorest/configuration": "~1.12.0", - "@autorest/core": "~3.10.1", + "@autorest/configuration": "~1.12.1", + "@autorest/core": "~3.10.2", "@autorest/common": "~1.6.0", "@azure-tools/async-io": "~3.0.0", "@azure-tools/extension": "~3.7.1", diff --git a/packages/extensions/core/CHANGELOG.json b/packages/extensions/core/CHANGELOG.json index a641f5705c..caf3ae66a4 100644 --- a/packages/extensions/core/CHANGELOG.json +++ b/packages/extensions/core/CHANGELOG.json @@ -1,6 +1,29 @@ { "name": "@autorest/core", "entries": [ + { + "version": "3.10.2", + "tag": "@autorest/core_v3.10.2", + "date": "Wed, 28 Feb 2024 18:02:21 GMT", + "comments": { + "patch": [ + { + "comment": "Fix: Crash when deduplication paths" + }, + { + "comment": "Fix: Crash reporting zero exit code when a plugin report a crash but send invalid exception" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/configuration\" from `~1.12.0` to `~1.12.1`" + }, + { + "comment": "Updating dependency \"@azure-tools/deduplication\" from `~3.2.0` to `~3.2.1`" + } + ] + } + }, { "version": "3.10.1", "tag": "@autorest/core_v3.10.1", diff --git a/packages/extensions/core/CHANGELOG.md b/packages/extensions/core/CHANGELOG.md index 22083f6808..6b64278b95 100644 --- a/packages/extensions/core/CHANGELOG.md +++ b/packages/extensions/core/CHANGELOG.md @@ -1,6 +1,14 @@ # Change Log - @autorest/core -This log was last generated on Tue, 28 Nov 2023 19:02:52 GMT and should not be manually modified. +This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified. + +## 3.10.2 +Wed, 28 Feb 2024 18:02:21 GMT + +### Patches + +- Fix: Crash when deduplication paths +- Fix: Crash reporting zero exit code when a plugin report a crash but send invalid exception ## 3.10.1 Tue, 28 Nov 2023 19:02:52 GMT diff --git a/packages/extensions/core/package.json b/packages/extensions/core/package.json index e4bcf9d8d3..c854c9af44 100644 --- a/packages/extensions/core/package.json +++ b/packages/extensions/core/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/core", - "version": "3.10.1", + "version": "3.10.2", "description": "AutoRest Core Module", "engines": { "node": ">=12.0.0" @@ -43,13 +43,13 @@ "typings": "./dist/exports.d.ts", "devDependencies": { "@autorest/common": "~1.6.0", - "@autorest/configuration": "~1.12.0", + "@autorest/configuration": "~1.12.1", "@autorest/schemas": "~1.3.5", "@autorest/test-utils": "~0.6.0", "@azure-tools/async-io": "~3.0.0", "@azure-tools/codegen": "~2.10.0", "@azure-tools/datastore": "~4.8.0", - "@azure-tools/deduplication": "~3.2.0", + "@azure-tools/deduplication": "~3.2.1", "@azure-tools/extension": "~3.7.1", "@azure-tools/json": "~1.3.0", "@azure-tools/jsonschema": "~1.3.0", diff --git a/packages/extensions/core/src/app.ts b/packages/extensions/core/src/app.ts index bed4996c26..693dd41168 100644 --- a/packages/extensions/core/src/app.ts +++ b/packages/extensions/core/src/app.ts @@ -351,7 +351,9 @@ async function main() { // - doing the inversion (instanceof Error) doesn't reliably work since that seems to return false on Errors marshalled from safeEval if (e instanceof Exception) { logger.log({ level: "error", message: e.message }); - exitCode = e.exitCode; + if (e.exitCode) { + exitCode = e.exitCode; + } } if (e !== false) { logger.log({ level: "error", message: `!${e}` }); diff --git a/packages/extensions/openapi-to-typespec/CHANGELOG.json b/packages/extensions/openapi-to-typespec/CHANGELOG.json index e7a6eefe52..fdeea585eb 100644 --- a/packages/extensions/openapi-to-typespec/CHANGELOG.json +++ b/packages/extensions/openapi-to-typespec/CHANGELOG.json @@ -1,6 +1,53 @@ { "name": "@autorest/openapi-to-typespec", "entries": [ + { + "version": "0.7.0", + "tag": "@autorest/openapi-to-typespec_v0.7.0", + "date": "Wed, 28 Feb 2024 18:02:21 GMT", + "comments": { + "minor": [ + { + "comment": "Add support for custom resource, enhance doc conversion and fix default value issue" + }, + { + "comment": "Initial Support for ARM in OpenAPI to TypeSpec Conversion" + }, + { + "comment": "Support Auth" + }, + { + "comment": "Support new location resource expression, support new flatten decorator and fix doc escape problem." + } + ], + "patch": [ + { + "comment": "Add feature and fix bug for converter." + }, + { + "comment": "Fix validation issues for converter" + }, + { + "comment": "use different base parameter for different resource" + }, + { + "comment": "Add a flag to disable conversion feature for backcomp" + }, + { + "comment": "migrate `@projectedName` to `@encodedName`" + }, + { + "comment": "fix default value of array and remove default value of duration temporarily" + }, + { + "comment": "Change to use raw operation for non-resource operations for ARM" + }, + { + "comment": "Improve data-plane tspconfig" + } + ] + } + }, { "version": "0.6.0", "tag": "@autorest/openapi-to-cadl_v0.6.0", diff --git a/packages/extensions/openapi-to-typespec/CHANGELOG.md b/packages/extensions/openapi-to-typespec/CHANGELOG.md index 1561580466..6bc706a73f 100644 --- a/packages/extensions/openapi-to-typespec/CHANGELOG.md +++ b/packages/extensions/openapi-to-typespec/CHANGELOG.md @@ -1,6 +1,27 @@ # Change Log - @autorest/openapi-to-typespec -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified. + +## 0.7.0 +Wed, 28 Feb 2024 18:02:21 GMT + +### Minor changes + +- Add support for custom resource, enhance doc conversion and fix default value issue +- Initial Support for ARM in OpenAPI to TypeSpec Conversion +- Support Auth +- Support new location resource expression, support new flatten decorator and fix doc escape problem. + +### Patches + +- Add feature and fix bug for converter. +- Fix validation issues for converter +- use different base parameter for different resource +- Add a flag to disable conversion feature for backcomp +- migrate `@projectedName` to `@encodedName` +- fix default value of array and remove default value of duration temporarily +- Change to use raw operation for non-resource operations for ARM +- Improve data-plane tspconfig ## 0.6.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index 13fef86712..5ff4049126 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/openapi-to-typespec", - "version": "0.6.0", + "version": "0.7.0", "description": "Autorest plugin to scaffold a Typespec definition from an OpenAPI document", "main": "dist/main.js", "typings": "dist/main.d.ts", diff --git a/packages/libs/configuration/CHANGELOG.json b/packages/libs/configuration/CHANGELOG.json index eb5e92e185..c59c15e6f0 100644 --- a/packages/libs/configuration/CHANGELOG.json +++ b/packages/libs/configuration/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@autorest/configuration", "entries": [ + { + "version": "1.12.1", + "tag": "@autorest/configuration_v1.12.1", + "date": "Wed, 28 Feb 2024 18:02:21 GMT", + "comments": { + "patch": [ + { + "comment": "rename openapi-to-cadl to openapi-to-typespec" + } + ] + } + }, { "version": "1.12.0", "tag": "@autorest/configuration_v1.12.0", diff --git a/packages/libs/configuration/CHANGELOG.md b/packages/libs/configuration/CHANGELOG.md index 5abe32ffff..e8aa610823 100644 --- a/packages/libs/configuration/CHANGELOG.md +++ b/packages/libs/configuration/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/configuration -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified. + +## 1.12.1 +Wed, 28 Feb 2024 18:02:21 GMT + +### Patches + +- rename openapi-to-cadl to openapi-to-typespec ## 1.12.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/libs/configuration/package.json b/packages/libs/configuration/package.json index 1d7bbc0920..e467e23e80 100644 --- a/packages/libs/configuration/package.json +++ b/packages/libs/configuration/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/configuration", - "version": "1.12.0", + "version": "1.12.1", "description": "Autorest configuration", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/packages/libs/deduplication/CHANGELOG.json b/packages/libs/deduplication/CHANGELOG.json index 3412149c3d..70417efe64 100644 --- a/packages/libs/deduplication/CHANGELOG.json +++ b/packages/libs/deduplication/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@azure-tools/deduplication", "entries": [ + { + "version": "3.2.1", + "tag": "@azure-tools/deduplication_v3.2.1", + "date": "Wed, 28 Feb 2024 18:02:21 GMT", + "comments": { + "patch": [ + { + "comment": "Fix: Crash when deduplication paths" + } + ] + } + }, { "version": "3.2.0", "tag": "@azure-tools/deduplication_v3.2.0", diff --git a/packages/libs/deduplication/CHANGELOG.md b/packages/libs/deduplication/CHANGELOG.md index b90b174c28..f7cc6ee19a 100644 --- a/packages/libs/deduplication/CHANGELOG.md +++ b/packages/libs/deduplication/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/deduplication -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified. + +## 3.2.1 +Wed, 28 Feb 2024 18:02:21 GMT + +### Patches + +- Fix: Crash when deduplication paths ## 3.2.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/libs/deduplication/package.json b/packages/libs/deduplication/package.json index b34f749de0..d0c7296d05 100644 --- a/packages/libs/deduplication/package.json +++ b/packages/libs/deduplication/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/deduplication", - "version": "3.2.0", + "version": "3.2.1", "description": "Deduplication of elements in OpenAPI 3 documents", "main": "./dist/main.js", "typings": "./dist/main.d.ts", diff --git a/packages/libs/deduplication/src/main.ts b/packages/libs/deduplication/src/main.ts index 9c0e6c29ec..3af8f88182 100644 --- a/packages/libs/deduplication/src/main.ts +++ b/packages/libs/deduplication/src/main.ts @@ -192,8 +192,7 @@ export class Deduplicator { let filename = path[xMsMetadata].filename; let originalLocations = path[xMsMetadata].originalLocations; const pathFromMetadata = path[xMsMetadata].path; - let profiles = path[xMsMetadata].profiles; - + let profiles = path[xMsMetadata].profiles ?? {}; // extract path properties excluding metadata const { "x-ms-metadata": metadataCurrent, ...filteredPath } = path; @@ -218,7 +217,7 @@ export class Deduplicator { originalLocations = originalLocations.concat(anotherPath[xMsMetadata].originalLocations); profiles = getMergedProfilesMetadata( profiles, - anotherPath[xMsMetadata].profiles, + anotherPath[xMsMetadata].profiles ?? {}, path[xMsMetadata].path, originalLocations, ); diff --git a/packages/testing/test-public-packages/package.json b/packages/testing/test-public-packages/package.json index f1a7efcfe9..0c593bd76f 100644 --- a/packages/testing/test-public-packages/package.json +++ b/packages/testing/test-public-packages/package.json @@ -30,7 +30,7 @@ }, "homepage": "https://github.com/Azure/autorest#readme", "dependencies": { - "@autorest/core": "~3.10.1", + "@autorest/core": "~3.10.2", "autorest": "~3.7.1", "source-map-support": "^0.5.19" },