Skip to content

Commit 5719cbd

Browse files
committed
(#422) yarn preview-upgrade improvements
This adjust the yarn preview-upgrade command to first remove the yarn.lock file in the chosen repository before upgrading choco-theme. By doing this, it ensures all dependencies are upgraded of choco-theme and not just choco-theme itself. This is desired in most cases. Also, the CCM repository has been added to the list of configs, so that is caught when using the --all or --ccm flag on yarn commands.
1 parent 875bbfa commit 5719cbd

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

build/data/preview-config.ts

+8
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ export const folderMapping: FolderMapping = {
2424
isStatiq: true,
2525
isAstro: false
2626
},
27+
'--ccm': {
28+
folder: 'choco-licensed-management-ui',
29+
protocol: 'https',
30+
port: 44302,
31+
isStatiq: false,
32+
isAstro: false,
33+
root: '/src/ChocolateySoftware.ChocolateyManagement.Web.Mvc'
34+
},
2735
'--boxstarter': {
2836
folder: 'boxstarter.org',
2937
port: 5083,

build/preview-upgrade.ts

+7
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ const init = async () => {
5151
return; // Skip to the next folder
5252
}
5353

54+
try {
55+
await fs.rm(`${folderPath}/yarn.lock`, { force: true });
56+
console.log(`✅ ${folderName} yarn.lock removed`);
57+
} catch (error) {
58+
throw new Error(`Error removing yarn.lock: ${error.message}`);
59+
}
60+
5461
try {
5562
const childProcess = spawn(`yarn up choco-theme@${url}`, [], {
5663
// stdio: 'inherit', // Use 'inherit' to directly pipe the output to the parent process

0 commit comments

Comments
 (0)