-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Env: Add support for ZIP URL sources. #20426
Conversation
Size Change: 0 B Total Size: 865 kB ℹ️ View Unchanged
|
Why do we extract the zip to a temporary directory before copying the files to the final destination? Does extracting the zip straight to the final destination not work? |
No, because you get a nested folder. |
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.
Very cool! Works like a charm. Can't wait to use it during the 5.4 release process when it's time to test the generated build.
I left some comments but they're all minor—address them if you want, up to you 🙂
All addressed, thanks for the review! |
Hi @epiqueras should this PR be backported into WordPress 5.4? If yes, feel free to add the label backport to wp core. |
Yes |
"inquirer": "^7.0.4", | ||
"js-yaml": "^3.13.1", | ||
"nodegit": "^0.26.2", | ||
"ora": "^4.0.2", | ||
"request": "^2.88.2", |
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.
Noting that request
is deprecated, even at the time it was introduced here:
https://www.npmjs.com/package/request
request/request#3142
Which isn't necessarily to say that a deprecation is bad, but we can't expect any future maintenance (which could become problematic for security issues and the like). Another option like got
, bent
(from the author of request
), or just straight https
may be a more reliable long-term dependency. For the specific needs of progress events, the first of these alternatives does have the most compatible API for how we're using it here, though a combination of an https
response Content-Length
header plus an incrementing value in a stream iteration may suffice as well.
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.
Thanks for the heads up. Created an issue here: #21336
Advances #20325
Description
This PR adds support for ZIP URL sources to
wp-env
.How has this been tested?
It was verified that using ZIP URL sources like "https://wordpress.org/wordpress-5.4-beta2.zip" for core, works as expected.
Types of Changes
New Feature: URLs for ZIP files are now supported as core, plugin, and theme sources in
wp-env
.Checklist: