Skip to content

Commit 7dac540

Browse files
committed
refactor: remove Volta integration and related configurations from project
1 parent 29bc14c commit 7dac540

File tree

6 files changed

+7
-73
lines changed

6 files changed

+7
-73
lines changed

booster/.ddev/commands/web/volta

Lines changed: 0 additions & 7 deletions
This file was deleted.

booster/.ddev/config.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,18 @@ database:
1414
use_dns_when_possible: true
1515
composer_version: "2"
1616
web_environment: []
17-
corepack_enable: false
17+
nodejs_version: "22.18.0"
18+
corepack_enable: true
1819
router_http_port: "6666"
1920
timezone: Europe/Berlin
2021
hooks:
2122
pre-start:
2223
- exec-host: python3 .ddev/php/pre-start.py
23-
- exec-host: |
24-
set -x
25-
if [ -f package.json ]; then
26-
cp package.json .ddev/web-build/package.json
27-
fi
2824
post-start:
2925
- exec: bash ./tools/git-hooks/setup.sh
3026
- exec: composer install --prefer-dist --no-progress --no-interaction
3127
- exec: python3 .phpstorm/update_xdebug_config.py
3228
- exec: python3 .ddev/php/post-start.py
33-
- exec-host: |
34-
set -x
35-
if [ -f .ddev/web-build/package.json ]; then
36-
rm -f .ddev/web-build/package.json
37-
fi
38-
3929
# Key features of DDEV's config.yaml:
4030

4131
# name: <projectname> # Name of the project, automatically provides

booster/.ddev/web-build/Dockerfile.1.volta.Dockerfile

Lines changed: 0 additions & 39 deletions
This file was deleted.

booster/.ddev/web-build/volta.bashrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

booster/integrate_booster.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ function check_dependencies() {
5757
command -v ddev >/dev/null 2>&1 || missing_deps+=("ddev")
5858
else
5959
command -v composer >/dev/null 2>&1 || missing_deps+=("composer")
60-
command -v volta >/dev/null 2>&1 || missing_deps+=("volta")
6160
command -v pnpm >/dev/null 2>&1 || missing_deps+=("pnpm")
6261
fi
6362

@@ -208,20 +207,19 @@ function update_package_json() {
208207
cp "$booster_pkg" "$project_pkg" || error "Failed to copy booster package.json."
209208
success "package.json copied from booster."
210209
else
211-
log "'$project_pkg' already exists. Merging scripts, devDependencies, and volta sections..."
210+
log "'$project_pkg' already exists. Merging scripts, devDependencies, and sections..."
212211
# Merge using jq: project + booster (booster overwrites simple keys, merges objects)
213-
# This merges top-level objects like scripts, devDependencies, volta
212+
# This merges top-level objects like scripts, devDependencies
214213
jq -s '
215214
.[0] as $proj | .[1] as $booster |
216215
$proj * {
217216
scripts: (($proj.scripts // {}) + ($booster.scripts // {})),
218-
devDependencies: (($proj.devDependencies // {}) + ($booster.devDependencies // {})),
219-
volta: (($proj.volta // {}) + ($booster.volta // {}))
217+
devDependencies: (($proj.devDependencies // {}) + ($booster.devDependencies // {}))
220218
}
221219
' "$project_pkg" "$booster_pkg" >"$tmp_pkg" || error "Failed to merge package.json using jq."
222220

223221
mv "$tmp_pkg" "$project_pkg"
224-
success "package.json updated with merged scripts, devDependencies, and volta info."
222+
success "package.json updated with merged scripts and devDependencies."
225223
fi
226224

227225
# Copy commitlint config regardless
@@ -521,7 +519,7 @@ function add_code_quality_tools() {
521519
local section="$2" # "require" or "require-dev"
522520

523521
log " Checking if package '$package' is present in section '$section'..."
524-
522+
525523
# Check if package is declared in the appropriate section of composer.json
526524
if [ "$section" = "require" ]; then
527525
if jq -e --arg pkg "$package" '.require[$pkg] != null' "$project_composer" >/dev/null 2>&1; then
@@ -807,7 +805,6 @@ function main() {
807805

808806
add_code_quality_tools # Merges composer scripts & installs deps
809807
success "Integration process completed."
810-
log "Ensure you are using Volta for Node.js version management and PNPM as the package manager inside the DDEV container."
811808

812809
if [ $IS_DDEV_PROJECT -eq 1 ]; then
813810
success "Please run 'ddev restart' to apply the DDEV configuration changes."

booster/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,5 @@
1616
"@redocly/cli": "^2.0.2",
1717
"husky": "^9.1.7"
1818
},
19-
"volta": {
20-
"node": "22.18.0"
21-
},
2219
"packageManager": "pnpm@10.14.0"
2320
}

0 commit comments

Comments
 (0)