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
21 changes: 0 additions & 21 deletions .github/workflows/app-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,6 @@ jobs:
working-directory: test_apps/encore-app
dependency-versions: highest

- name: Manually replacing "workspace:*" references
run: |
# npm does not support "workspace:*" references, so we need to replace them with the actual package path
for PACKAGE_DATA in $(pnpm ls -r --json --depth -1 | jq 'map(select(.private != true))' | jq -c '.[]'); do
PACKAGE=$(echo $PACKAGE_DATA | jq -r '.name')
PACKAGE_PATH=$(echo $PACKAGE_DATA | jq -r '.path')

echo "🔍 Searching for \"workspace:*\" references in $PACKAGE_PATH/package.json"

# Manually replace "workspace:" constraints with the actual package version, it ensure packages can be installed with npm
jq -rc '[(.dependencies // {}) + (.devDependencies // {}) | to_entries[] | select(.value == "workspace:*") | .key][]' "$PACKAGE_PATH/package.json" | while read -r PACKAGE_FROM_WORKSPACE ; do
echo "ℹ️ Found \"$PACKAGE_FROM_WORKSPACE\" with \"workspace:*\""

PACKAGE_FROM_WORKSPACE_PATH=$(pnpm ls --filter $PACKAGE_FROM_WORKSPACE --json --depth -1 | jq -r '.[].path')
echo "ℹ️ The package \"$PACKAGE_FROM_WORKSPACE\" is located in \"$PACKAGE_FROM_WORKSPACE_PATH\" directory"

echo "⚒️ Replacing \"$PACKAGE_FROM_WORKSPACE\" with \"file:$PACKAGE_FROM_WORKSPACE_PATH\" in $PACKAGE_PATH/package.json"
sed -i "s|\"$PACKAGE_FROM_WORKSPACE\": \"workspace:\*\"|\"$PACKAGE_FROM_WORKSPACE\": \"file:$PACKAGE_FROM_WORKSPACE_PATH\"|g" "$PACKAGE_PATH/package.json"
done;
done

Comment on lines -57 to -77
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed anymore :)

- working-directory: test_apps/encore-app
run: npm install --install-links

Expand Down
18 changes: 11 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ overrides:
'@swup/plugin>prettier': link:node_modules/.ignored
'@swup/plugin>shelljs': link:node_modules/.ignored
'@swup/plugin>shelljs-live': link:node_modules/.ignored

packageExtensions:
'@symfony/ux-google-map':
dependencies:
'@symfony/ux-map': 'workspace:*'

'@symfony/ux-leaflet-map':
dependencies:
'@symfony/ux-map': 'workspace:*'
1 change: 0 additions & 1 deletion src/Map/src/Bridge/Google/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"devDependencies": {
"@googlemaps/js-api-loader": "^1.16.6",
"@hotwired/stimulus": "^3.0.0",
"@symfony/ux-map": "workspace:*",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/user-event": "^14.6.1",
Expand Down
1 change: 0 additions & 1 deletion src/Map/src/Bridge/Leaflet/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
},
"devDependencies": {
"@hotwired/stimulus": "^3.0.0",
"@symfony/ux-map": "workspace:*",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/user-event": "^14.6.1",
Expand Down
Loading