Skip to content

Commit

Permalink
feat(app-builder): add separate php and js upgrade commands
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Aug 7, 2024
1 parent b0907fe commit 6070597
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 4 additions & 0 deletions apps/app-builder/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export const COMMAND_TRANSLATIONS_NAME = 'translations';

export const COMMAND_UPGRADE_NAME = 'upgrade';

export const COMMAND_UPGRADE_PHP_NAME = 'upgrade-php';

export const COMMAND_UPGRADE_JS_NAME = 'upgrade-js';

export const COMMAND_UPGRADE_ALL_NAME = 'upgrade-all';

export const COMMAND_UPGRADE_SELF_NAME = 'upgrade-self';
Expand Down
20 changes: 18 additions & 2 deletions apps/app-builder/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ import {
COMMAND_TRANSFORM_NAME,
COMMAND_TRANSLATIONS_NAME,
COMMAND_UPGRADE_ALL_NAME,
COMMAND_UPGRADE_JS_NAME,
COMMAND_UPGRADE_NAME,
COMMAND_UPGRADE_PHP_NAME,
COMMAND_UPGRADE_SELF_NAME,
COMMAND_ZIP_NAME,
COMMIT_TYPE_AUTO,
Expand Down Expand Up @@ -115,6 +117,18 @@ export const buildBulkCommand = defineBulkCommand({
commands: [cleanCommand, scopePhpCommand, ...CORE_COMMANDS],
});

export const upgradePhpBulkCommand = defineBulkCommand({
name: COMMAND_UPGRADE_PHP_NAME,
description: 'Upgrade php pdk dependencies.',
commands: [[upgradeCommand, {arguments: [MYPARCEL_PDK_PACKAGIST_NAME]}]],
});

export const upgradeJsBulkCommand = defineBulkCommand({
name: COMMAND_UPGRADE_JS_NAME,
description: 'Upgrade js pdk dependencies.',
commands: [[upgradeCommand, {arguments: [MYPARCEL_PDK_NPM_GLOB]}]],
});

export const upgradeAllBulkCommand = defineBulkCommand({
name: COMMAND_UPGRADE_ALL_NAME,
description: 'Upgrade all pdk dependencies.',
Expand Down Expand Up @@ -168,8 +182,10 @@ export const ALL_COMMANDS: readonly CommandDefinition[] = Object.freeze([

export const ALL_BULK_COMMANDS: readonly BulkCommandDefinition[] = Object.freeze([
buildBulkCommand,
upgradeSelfCommand,
upgradeAllBulkCommand,
preReleaseBulkCommand,
releaseBulkCommand,
upgradeAllBulkCommand,
upgradeJsBulkCommand,
upgradePhpBulkCommand,
upgradeSelfCommand,
]);

0 comments on commit 6070597

Please sign in to comment.