Skip to content
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
6 changes: 4 additions & 2 deletions .github/workflows/test-turbo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- run: corepack enable

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -75,7 +77,7 @@ jobs:

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: yarn-cache
Expand All @@ -87,7 +89,7 @@ jobs:

- name: Install JavaScript dependencies
working-directory: src/Turbo/tests/app
run: yarn install
run: touch yarn.lock && yarn install --mode update-lockfile && yarn install

- name: Build JavaScript
working-directory: src/Turbo/tests/app
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- run: yarn --immutable
- run: yarn check-lint
- run: yarn check-format

Expand All @@ -35,17 +36,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile && yarn build
- run: yarn --immutable && yarn build
- name: Check if js dist files are current
id: changes
run: |
Expand Down Expand Up @@ -132,9 +134,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
Expand Down
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
.doctor-rst.cache
.php-cs-fixer.cache
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

node_modules
yarn-error.log

.doctor-rst.cache
.php-cs-fixer.cache
/composer.lock
/vendor
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
16 changes: 9 additions & 7 deletions bin/run-vitest-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi

runTestSuite() {
echo -e "Running tests for $workspace...\n"
yarn workspace $workspace run vitest --run || { all_tests_passed=false; }
yarn workspace $workspace run -T vitest --run || { all_tests_passed=false; }
}

processWorkspace() {
Expand Down Expand Up @@ -48,19 +48,21 @@ processWorkspace() {
fi
}

# Get all workspace names
workspaces_info=$(yarn -s workspaces info)

# Iterate over each workspace using process substitution
while IFS= read -r workspace_info; do
# Split the workspace_info into workspace and location
workspace=$(echo "$workspace_info" | awk '{print $1}')
location=$(echo "$workspace_info" | awk '{print $2}')
workspace=$(echo "$workspace_info" | jq -r '.name')
location=$(echo "$workspace_info" | jq -r '.location')

# Skip the root workspace
if [ $workspace == "null" ]; then
continue
fi

# Call the function to process the workspace
processWorkspace "$workspace" "$location"

done < <(echo "$workspaces_info" | jq -r 'to_entries[0:] | .[] | "\(.key) \(.value.location)"')
done < <(yarn workspaces list --json)

# Check the flag at the end and exit with code 1 if any test failed
if [ "$all_tests_passed" = false ]; then
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"src/*/src/Bridge/*/assets/src/**",
"src/*/src/Bridge/*/assets/test/**"
],
"ignore": ["**/composer.json", "**/vendor", "**/node_modules"]
"ignore": ["**/composer.json", "**/vendor", "**/package.json", "**/node_modules"]
},
"linter": {
"rules": {
Expand Down
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"private": true,
"workspaces": ["src/*/assets", "src/*/src/Bridge/*/assets"],
"packageManager": "[email protected]",
"workspaces": [
"src/*/assets",
"src/*/src/Bridge/*/assets"
],
"scripts": {
"build": "node bin/build_javascript.js && node bin/build_styles.js",
"test": "bin/run-vitest-all.sh",
Expand Down Expand Up @@ -28,12 +32,11 @@
"vitest": "^2.1.1"
},
"resolutions": {
"@swup/prettier-config": "link:node_modules/.cache/null",
"@swup/browserslist-config": "link:node_modules/.cache/null",
"microbundle": "link:node_modules/.cache/null",
"prettier": "link:node_modules/.cache/null",
"shelljs": "link:node_modules/.cache/null",
"shelljs-live": "link:node_modules/.cache/null"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"@swup/plugin/@swup/prettier-config": "link:node_modules/.cache/null",
"@swup/plugin/@swup/browserslist-config": "link:node_modules/.cache/null",
"@swup/plugin/microbundle": "link:node_modules/.cache/null",
"@swup/plugin/prettier": "link:node_modules/.cache/null",
"@swup/plugin/shelljs": "link:node_modules/.cache/null",
"@swup/plugin/shelljs-live": "link:node_modules/.cache/null"
}
}
8 changes: 4 additions & 4 deletions src/Cropperjs/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
}
},
"peerDependencies": {
"cropperjs": "^1.5.9",
"@hotwired/stimulus": "^3.0.0"
"@hotwired/stimulus": "^3.0.0",
"cropperjs": "^1.5.9"
},
"devDependencies": {
"cropperjs": "^1.5.9",
"@hotwired/stimulus": "^3.0.0"
"@hotwired/stimulus": "^3.0.0",
"cropperjs": "^1.5.9"
}
}
16 changes: 8 additions & 8 deletions src/Swup/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@
}
},
"peerDependencies": {
"@hotwired/stimulus": "^3.0.0",
"@swup/debug-plugin": "^3.0",
"@swup/fade-theme": "^1.0",
"@swup/slide-theme": "^1.0",
"@swup/forms-plugin": "^2.0",
"@swup/debug-plugin": "^3.0",
"swup": "^3.0",
"@hotwired/stimulus": "^3.0.0"
"@swup/slide-theme": "^1.0",
"swup": "^3.0"
},
"devDependencies": {
"@hotwired/stimulus": "^3.0.0",
"@swup/debug-plugin": "^3.0",
"@swup/fade-theme": "^1.0",
"@swup/slide-theme": "^1.0",
"@swup/forms-plugin": "^2.0",
"@swup/debug-plugin": "^3.0",
"swup": "^3.0",
"@hotwired/stimulus": "^3.0.0"
"@swup/slide-theme": "^1.0",
"swup": "^3.0"
}
}
8 changes: 4 additions & 4 deletions src/Turbo/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
}
},
"peerDependencies": {
"@hotwired/turbo": "^7.1.1 || ^8.0",
"@hotwired/stimulus": "^3.0.0"
"@hotwired/stimulus": "^3.0.0",
"@hotwired/turbo": "^7.1.1 || ^8.0"
},
"devDependencies": {
"@hotwired/turbo": "^7.1.0 || ^8.0",
"@hotwired/stimulus": "^3.0.0"
"@hotwired/stimulus": "^3.0.0",
"@hotwired/turbo": "^7.1.0 || ^8.0"
}
}
1 change: 1 addition & 0 deletions src/Turbo/tests/app/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"packageManager": "[email protected]",
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
Expand Down
8 changes: 4 additions & 4 deletions src/Typed/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
}
},
"peerDependencies": {
"typed.js": "^2.0",
"@hotwired/stimulus": "^3.0.0"
"@hotwired/stimulus": "^3.0.0",
"typed.js": "^2.0"
},
"devDependencies": {
"typed.js": "^2.0",
"@hotwired/stimulus": "^3.0.0"
"@hotwired/stimulus": "^3.0.0",
"typed.js": "^2.0"
}
}
Loading
Loading