From 2a3657da8f5ccb312a57429d631355b795154558 Mon Sep 17 00:00:00 2001 From: RomanNikitenko Date: Mon, 30 Dec 2024 16:04:04 +0000 Subject: [PATCH] chore: Add rules for automatic rebasing Signed-off-by: RomanNikitenko --- .../microsoft-authentication/package.json | 5 +++++ .../microsoft-authentication/package.json | 5 +++++ rebase.sh | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 .rebase/add/code/extensions/microsoft-authentication/package.json create mode 100644 .rebase/override/code/extensions/microsoft-authentication/package.json 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/rebase.sh b/rebase.sh index 61ca2203d65..1fb07c695da 100755 --- a/rebase.sh +++ b/rebase.sh @@ -153,6 +153,21 @@ 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..." + + # 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 +393,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