Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow to build che-code using cachito system #482

Merged
merged 3 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .rebase/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"workspaces": [
"packageMocks/keytar"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"keytar": "workspace:*"
}
}
8 changes: 4 additions & 4 deletions code/extensions/microsoft-authentication/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions code/extensions/microsoft-authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
27 changes: 27 additions & 0 deletions rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down Expand Up @@ -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
Expand Down
Loading