Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[AssetMapper] Add--dry-run
option onimportmap:require
command#59464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[AssetMapper] Add--dry-run
option onimportmap:require
command#59464
Uh oh!
There was an error while loading.Please reload this page.
Conversation
b4ec116
toed6a4d2
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please add an entry in the UPGRADE-7.3 file also
src/Symfony/Component/AssetMapper/Command/ImportMapRequireCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ed6a4d2
to97354d5
Comparesrc/Symfony/Component/AssetMapper/Command/ImportMapRequireCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/AssetMapper/Command/ImportMapRequireCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
467ac15
to4ca59ff
CompareStatus: Needs Review |
4062322
toe834020
CompareI cannot see the images in the PR header |
chadyred commentedFeb 3, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@OskarStark thanks, it is ok now, it was a copy / paste from a private repository. I take note about that and the images ^^' |
e834020
to4ce815f
Compare4ce815f
to8537fff
CompareAnything here to be added@chalasr ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/AssetMapper/Command/ImportMapRequireCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/AssetMapper/Command/ImportMapRequireCommand.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
8537fff
to337c465
CompareThank you@chadyred. |
c11abf2
intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
We are working with@smnandre on several ideas toimprove AssetMapper DX, focusing here on the
importmap:require
command.Currently, there is no way to know in advance which dependent packages will be downloaded too, and the final output display lacks clarity.
This PR aims to solve both issues by adding a new
--dry-run
flag and reworking the command output (with-v
verbosity)Console output
New
--dry-run
optionThis flag allows developers to simulate the installation process, without any alteration:
importmap.php
file;assets
andpublic
directories.The
--dry-run
flag allows developers to:bootrap
instead ofbootstrap
, orjquery
);bootstrap
will also install@popperjs/core
);The console will display a line at start and end of execution to signal the dry-run mode.
Console output
php bin/console importmap:require bootstrap --dry-run[DRY-RUN] No changes will apply to the importmap configuration. [OK] 3 new items (bootstrap, @popperjs/core, bootstrap/dist/css/bootstrap.min.css) added to the importmap.php! [DRY-RUN] No changes applied to the importmap configuration.
New
-v
verbose outputThis PR also reworks the output for the
-v
(verbose) flag to provide more clarity when running the command with additional verbosity.All feedback welcome!
Footnotes
AssetMapper recursively extracts the dependencies of JavaScript modules. Even with the
--dry-run
option, theimportmap:require
command requires a workingHttpClient
to download metadata and JavaScript files from various registries/repositories (mainly JSDelivr for now).↩