@wordpress/env 11.7.0 → 11.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/download-sources.js
CHANGED
|
@@ -6,13 +6,13 @@ const fs = require( 'fs' );
|
|
|
6
6
|
const path = require( 'path' );
|
|
7
7
|
const util = require( 'util' );
|
|
8
8
|
const got = require( 'got' );
|
|
9
|
+
const AdmZip = require( 'adm-zip' );
|
|
9
10
|
const SimpleGit = require( 'simple-git' );
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Promisified dependencies
|
|
13
14
|
*/
|
|
14
15
|
const pipeline = util.promisify( require( 'stream' ).pipeline );
|
|
15
|
-
const extractZip = util.promisify( require( 'extract-zip' ) );
|
|
16
16
|
const { rimraf } = require( 'rimraf' );
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -72,6 +72,7 @@ async function downloadGitSource( source, { onProgress, spinner, debug } ) {
|
|
|
72
72
|
} else {
|
|
73
73
|
await git.clone( source.url, source.clonePath, {
|
|
74
74
|
'--depth': '1',
|
|
75
|
+
'--filter': 'blob:none',
|
|
75
76
|
'--no-single-branch': null,
|
|
76
77
|
} );
|
|
77
78
|
await git.cwd( source.clonePath );
|
|
@@ -118,7 +119,12 @@ async function downloadZipSource( source, { onProgress, spinner, debug } ) {
|
|
|
118
119
|
|
|
119
120
|
log( 'Extracting to temporary directory.' );
|
|
120
121
|
const tempDir = `${ source.path }.temp`;
|
|
121
|
-
|
|
122
|
+
const zip = new AdmZip( zipName );
|
|
123
|
+
await util.promisify( zip.extractAllToAsync.bind( zip ) )(
|
|
124
|
+
tempDir,
|
|
125
|
+
/* overwrite */ true,
|
|
126
|
+
/* keepOriginalPermission */ false
|
|
127
|
+
);
|
|
122
128
|
|
|
123
129
|
const files = (
|
|
124
130
|
await Promise.all( [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/env",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.8.1",
|
|
4
4
|
"description": "A zero-config, self contained local WordPress environment for development and testing.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@inquirer/prompts": "^7.2.0",
|
|
47
47
|
"@wp-playground/cli": "^3.0.48",
|
|
48
|
-
"
|
|
48
|
+
"adm-zip": "^0.5.9",
|
|
49
|
+
"chalk": "^4.1.1",
|
|
49
50
|
"copy-dir": "^1.3.0",
|
|
50
51
|
"cross-spawn": "^7.0.6",
|
|
51
52
|
"docker-compose": "^0.24.3",
|
|
52
|
-
"extract-zip": "^1.6.7",
|
|
53
53
|
"got": "^11.8.5",
|
|
54
54
|
"js-yaml": "^3.13.1",
|
|
55
55
|
"ora": "^4.0.2",
|
|
56
56
|
"rimraf": "^5.0.10",
|
|
57
|
-
"simple-git": "^3.
|
|
57
|
+
"simple-git": "^3.24.0",
|
|
58
58
|
"yargs": "^17.3.0"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "99df7432c5c7cb83ba41146fd1f57f3c19004305"
|
|
67
67
|
}
|