diff --git a/.rebase/CHANGELOG.md b/.rebase/CHANGELOG.md index e452811b84f..755694928f0 100644 --- a/.rebase/CHANGELOG.md +++ b/.rebase/CHANGELOG.md @@ -2,6 +2,12 @@ The file to keep a list of changed files which will potentionaly help to resolve rebase conflicts. +#### @RomanNikitenko +https://github.com/che-incubator/che-code/pull/482 + +- code/extensions/microsoft-authentication/package.json +--- + #### @RomanNikitenko https://github.com/che-incubator/che-code/pull/476 diff --git a/.rebase/add/code/extensions/microsoft-authentication/package.json b/.rebase/add/code/extensions/microsoft-authentication/package.json new file mode 100644 index 00000000000..3ebd64c021e --- /dev/null +++ b/.rebase/add/code/extensions/microsoft-authentication/package.json @@ -0,0 +1,5 @@ +{ + "workspaces": [ + "packageMocks/keytar" + ] +} diff --git a/.rebase/override/code/extensions/microsoft-authentication/package.json b/.rebase/override/code/extensions/microsoft-authentication/package.json new file mode 100644 index 00000000000..a22257160d3 --- /dev/null +++ b/.rebase/override/code/extensions/microsoft-authentication/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "keytar": "workspace:*" + } +} diff --git a/code/extensions/microsoft-authentication/package-lock.json b/code/extensions/microsoft-authentication/package-lock.json index 9f69f13972c..d47ee203d6d 100644 --- a/code/extensions/microsoft-authentication/package-lock.json +++ b/code/extensions/microsoft-authentication/package-lock.json @@ -8,12 +8,15 @@ "name": "microsoft-authentication", "version": "0.0.1", "license": "MIT", + "workspaces": [ + "packageMocks/keytar" + ], "dependencies": { "@azure/ms-rest-azure-env": "^2.0.0", "@azure/msal-node": "^2.16.2", "@azure/msal-node-extensions": "^1.5.0", "@vscode/extension-telemetry": "^0.9.0", - "keytar": "file:./packageMocks/keytar", + "keytar": "workspace:*", "vscode-tas-client": "^0.1.84" }, "devDependencies": { @@ -406,9 +409,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, - "node_modules/packageMocks/keytar": { - "extraneous": true - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", diff --git a/code/extensions/microsoft-authentication/package.json b/code/extensions/microsoft-authentication/package.json index c8ad1c070e2..d946dc7bfb3 100644 --- a/code/extensions/microsoft-authentication/package.json +++ b/code/extensions/microsoft-authentication/package.json @@ -143,11 +143,14 @@ "@azure/msal-node": "^2.16.2", "@azure/msal-node-extensions": "^1.5.0", "@vscode/extension-telemetry": "^0.9.0", - "keytar": "file:./packageMocks/keytar", + "keytar": "workspace:*", "vscode-tas-client": "^0.1.84" }, "repository": { "type": "git", "url": "https://github.com/microsoft/vscode.git" - } + }, + "workspaces": [ + "packageMocks/keytar" + ] } diff --git a/rebase.sh b/rebase.sh index 61ca2203d65..bae9e72d098 100755 --- a/rebase.sh +++ b/rebase.sh @@ -153,6 +153,29 @@ apply_code_extensions_package_lock_changes() { git add code/extensions/package-lock.json > /dev/null 2>&1 } +# Apply changes on code/extensions/microsoft-authentication/package-lock.json file +apply_code_extensions_microsoft_authentication_package_lock_changes() { + + echo " ⚙️ reworking code/extensions/microsoft-authentication/package-lock.json..." + + conflicted_files=$(git diff --name-only --diff-filter=U) + + # Check if code/extensions/microsoft-authentication/package.json is in the list + if echo "$conflicted_files" | grep -q "^code/extensions/microsoft-authentication/package.json$"; then + echo "Conflict for the code/extensions/microsoft-authentication/package.json should be fixed first!" + apply_package_changes_by_path "code/extensions/microsoft-authentication/package.json" + fi + + # reset the file from what is upstream + git checkout --ours code/extensions/microsoft-authentication/package-lock.json > /dev/null 2>&1 + + # update package-lock.json + npm install --ignore-scripts --prefix code/extensions/microsoft-authentication + + # resolve the change + git add code/extensions/microsoft-authentication/package-lock.json > /dev/null 2>&1 +} + # Apply changes on code/remote/package-lock.json file apply_code_remote_package_lock_changes() { @@ -378,6 +401,10 @@ resolve_conflicts() { apply_code_extensions_package_lock_changes elif [[ "$conflictingFile" == "code/product.json" ]]; then apply_code_product_changes + elif [[ "$conflictingFile" == "code/extensions/microsoft-authentication/package.json" ]]; then + apply_package_changes_by_path "$conflictingFile" + elif [[ "$conflictingFile" == "code/extensions/microsoft-authentication/package-lock.json" ]]; then + apply_code_extensions_microsoft_authentication_package_lock_changes elif [[ "$conflictingFile" == "code/build/lib/mangle/index.js" ]]; then apply_mangle_index_js_changes elif [[ "$conflictingFile" == "code/build/lib/mangle/index.ts" ]]; then