Commit d1c9b2b
committed
bug #2983 [Map] Allows Bridges JavaScript assets to be installed with
This PR was merged into the 2.x branch.
Discussion
----------
[Map] Allows Bridges JavaScript assets to be installed with `npm` when using `file:vendor/symfony/ux-*-map/assets`
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Docs? | no <!-- required for new features -->
| Issues | Fix #2951, #2737 <!-- 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).
-->
Alternative to #2982.
Moving the `"`@symfony`/ux-map": "workspace:*"` requirements **outside the package.json** allows the Bridges JavaScript assets to be installed with `npm` when ``@symfony`/ux-leaflet-map` (or ``@symfony`/ux-google-map`) is using constraint version `file:vendor/symfony/ux-leaflet-map/assets` (or `file:vendor/symfony/ux-google-map/assets`) in the user application.
This is possible to this super feature from pnpm: [packageExtensions](https://pnpm.io/settings#packageextensions), which allows to override some part of package definitions in file `pnpm-workspace.yaml`:
- this file is read by pnpm and understand that ``@symfony`/ux-map` is a dependency of ``@symfony`/ux-leaflet-map` and ``@symfony`/ux-google-map` 🎉
- this file is totally unknown to npm, no `workspace:*` anymore in any `package.json` 🎉
It is not possible to defines `packageExtensions.devDependencies`, so I used `packageExtensions.dependencies` instead but that's fine. ``@symfony`/ux-map` is not referenced in any `package.json` when running `pnpm pack` in `src/Bridge/*/assets`.
Commits
-------
1667af7 [Map] Allows Bridges JavaScript assets to be installed with `npm` when using `file:vendor/symfony/ux-*-map/assets`npm when using file:vendor/symfony/ux-*-map/assets (Kocal)File tree
5 files changed
+20
-30
lines changed- .github/workflows
- src/Map/src/Bridge
- Google/assets
- Leaflet/assets
5 files changed
+20
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 57 | | |
79 | 58 | | |
80 | 59 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
0 commit comments