You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #3090 Refactor "test_package.sh" to its original purpose, add multiples checks for packages definition (Kocal)
This PR was merged into the 2.x branch.
Discussion
----------
Refactor "test_package.sh" to its original purpose, add multiples checks for packages definition
| Q | A
| -------------- | ---
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md -->
| Documentation? | no <!-- required for new features, or documentation updates -->
| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- For new features, provide some code snippets to help understand usage.
- Features and deprecations must be submitted against branch main.
- Update/add documentation as required (we can help!)
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
- Never break backward compatibility (see https://symfony.com/bc).
-->
Following the minor changes from #3086
Commits
-------
4949e62 Refactor "test_package.sh" to its original purpose, add multiples checks for packages definition
peerDependencyVersion=$(jq -r --arg dep "$peerDependency" '.peerDependencies[$dep]' "$file")
116
+
importmapVersion=$(jq -r ".symfony.importmap.\"$peerDependency\" | if type == \"string\" then . else .version end" "$file")
117
+
118
+
if [ "$importmapVersion" == null ]; then
119
+
echo "File $file does not have the peerDependency '$peerDependency' in its symfony.importmap, skipping version check";
120
+
continue
121
+
fi
122
+
123
+
if [ "$peerDependencyVersion" != "$importmapVersion" ]; then
124
+
echo "File $file has a mismatch for $peerDependency: peerDependency version is '$peerDependencyVersion' but symfony.importmap version is '$importmapVersion'";
125
+
exit 1;
126
+
fi
127
+
done
128
+
done
129
+
22
130
coding-style-js:
23
131
name: JavaScript Coding Style
24
132
runs-on: ubuntu-latest
@@ -68,7 +176,7 @@ jobs:
68
176
69
177
# TODO: Only Turbo has PHPStan configuration, let's improve this later :)
0 commit comments