From 212d8f98f04fcd1c4215e18220c42b578680c7e3 Mon Sep 17 00:00:00 2001 From: RomanNikitenko Date: Wed, 25 Dec 2024 12:17:37 +0000 Subject: [PATCH 1/3] fix: Add peer dependency explicitly to the package.json Signed-off-by: RomanNikitenko --- code/extensions/package-lock.json | 8 ++++++++ code/extensions/package.json | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/extensions/package-lock.json b/code/extensions/package-lock.json index 765f26586a3..2661e4d73ba 100644 --- a/code/extensions/package-lock.json +++ b/code/extensions/package-lock.json @@ -14,6 +14,7 @@ }, "devDependencies": { "@parcel/watcher": "2.1.0", + "crypto": "1.0.1", "esbuild": "0.23.0", "vscode-grammar-updater": "^1.1.0" } @@ -447,6 +448,13 @@ "node": ">=0.8.0" } }, + "node_modules/crypto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", + "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==", + "deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.", + "dev": true + }, "node_modules/cson-parser": { "version": "4.0.9", "resolved": "https://registry.npmjs.org/cson-parser/-/cson-parser-4.0.9.tgz", diff --git a/code/extensions/package.json b/code/extensions/package.json index 1d189197e74..af5e17f664c 100644 --- a/code/extensions/package.json +++ b/code/extensions/package.json @@ -12,7 +12,8 @@ "devDependencies": { "@parcel/watcher": "2.1.0", "esbuild": "0.23.0", - "vscode-grammar-updater": "^1.1.0" + "vscode-grammar-updater": "^1.1.0", + "crypto": "1.0.1" }, "overrides": { "node-gyp-build": "4.8.1", From 312cd2fd4bcf80f5c00af338e1857294eb19f424 Mon Sep 17 00:00:00 2001 From: RomanNikitenko Date: Wed, 25 Dec 2024 12:27:44 +0000 Subject: [PATCH 2/3] chore: Add info related to rebasing against upstream Signed-off-by: RomanNikitenko --- .rebase/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.rebase/CHANGELOG.md b/.rebase/CHANGELOG.md index 112a1555015..206dbfa8213 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/476 + +- code/extensions/package.json +--- + #### @RomanNikitenko https://github.com/che-incubator/che-code/pull/463 From 428caea84a48b8e25bb43f4be6a2a10f0fd6db80 Mon Sep 17 00:00:00 2001 From: Roman Nikitenko Date: Wed, 25 Dec 2024 15:59:20 +0200 Subject: [PATCH 3/3] chore: Add rules for automatic rebasing Signed-off-by: Roman Nikitenko rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED --- .rebase/add/code/extensions/package.json | 5 +++++ rebase.sh | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .rebase/add/code/extensions/package.json diff --git a/.rebase/add/code/extensions/package.json b/.rebase/add/code/extensions/package.json new file mode 100644 index 00000000000..77144bf2652 --- /dev/null +++ b/.rebase/add/code/extensions/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "crypto": "1.0.1" + } +} diff --git a/rebase.sh b/rebase.sh index cf5726bdd2d..61ca2203d65 100755 --- a/rebase.sh +++ b/rebase.sh @@ -138,6 +138,21 @@ apply_package_changes_by_path() { git add $filePath > /dev/null 2>&1 } +# Apply changes on code/extensions/package.json file +apply_code_extensions_package_lock_changes() { + + echo " ⚙️ reworking code/extensions/package-lock.json..." + + # reset the file from what is upstream + git checkout --theirs code/extensions/package-lock.json > /dev/null 2>&1 + + # update package-lock.json + npm install --ignore-scripts --prefix code/extensions + + # resolve the change + git add code/extensions/package-lock.json > /dev/null 2>&1 +} + # Apply changes on code/remote/package-lock.json file apply_code_remote_package_lock_changes() { @@ -357,6 +372,10 @@ resolve_conflicts() { echo " ➡️ Analyzing conflict for $conflictingFile" if [[ "$conflictingFile" == "code/package.json" ]]; then apply_code_package_changes + elif [[ "$conflictingFile" == "code/extensions/package.json" ]]; then + apply_package_changes_by_path "$conflictingFile" + elif [[ "$conflictingFile" == "code/extensions/package-lock.json" ]]; then + apply_code_extensions_package_lock_changes elif [[ "$conflictingFile" == "code/product.json" ]]; then apply_code_product_changes elif [[ "$conflictingFile" == "code/build/lib/mangle/index.js" ]]; then