Commit 97bbd4e
committed
bug symfony#52119 [AssetMapper] Using ?specifier=* does not match unstable packages on jsdelivr (weaverryan)
This PR was merged into the 6.4 branch.
Discussion
----------
[AssetMapper] Using ?specifier=* does not match unstable packages on jsdelivr
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix symfony#52106
| License | MIT
To find which version of a package to grab, we use this API endpoint - https://data.jsdelivr.com/v1/packages/npm/`@tabler`/core/resolved. If a version constraint is specified (e.g. `importmap:require 'bootstrap@^5'`), we add a `?specifier=5`. If no version is specified, previously we added `?specifier=*`. However, this seems to ignore beta releases (returning `null` for ``@table`/core`, whose only has a 1.0 beta). Omitting `?specifier` seems to grab the latest, no matter what it is.
Also, if for some reason, we still can't find a `version`, we know blow up with a much clearer exception.
Cheers!
Commits
-------
370f6dc [AssetMapper] Using ?specifier=* does not match unstable packages on jsdelivrFile tree
2 files changed
+14
-10
lines changed- src/Symfony/Component/AssetMapper
- ImportMap/Resolver
- Tests/ImportMap/Resolver
2 files changed
+14
-10
lines changedLines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
| |||
49 | 46 | | |
50 | 47 | | |
51 | 48 | | |
52 | | - | |
53 | 49 | | |
54 | 50 | | |
55 | 51 | | |
| |||
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
166 | | - | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
0 commit comments