@wordpress/env 5.1.1 → 5.2.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.2.0 (2022-08-16)
6
+
7
+ ### Enhancement
8
+ - Query parameters can now be used in .zip source URLs.
9
+
5
10
  ## 5.1.1 (2022-08-16)
6
11
 
7
12
  ### Bug Fix
@@ -111,7 +111,7 @@ function parseSourceString( sourceString, { workDirectoryPath } ) {
111
111
  }
112
112
 
113
113
  const zipFields = sourceString.match(
114
- /^https?:\/\/([^\s$.?#].[^\s]*)\.zip$/
114
+ /^https?:\/\/([^\s$.?#].[^\s]*)\.zip(\?.+)?$/
115
115
  );
116
116
 
117
117
  if ( zipFields ) {
@@ -526,6 +526,7 @@ describe( 'readConfig', () => {
526
526
  plugins: [
527
527
  'https://www.example.com/test/path/to/gutenberg.zip',
528
528
  'https://www.example.com/test/path/to/gutenberg.8.1.0.zip',
529
+ 'https://www.example.com/test/path/to/gutenberg.8.1.0.zip?auth=thisIsAString&token=secondString',
529
530
  'https://www.example.com/test/path/to/twentytwenty.zip',
530
531
  'https://www.example.com/test/path/to/twentytwenty.1.3.zip',
531
532
  'https://example.com/twentytwenty.1.3.zip',
@@ -550,6 +551,14 @@ describe( 'readConfig', () => {
550
551
  ),
551
552
  basename: 'gutenberg.8.1.0',
552
553
  },
554
+ {
555
+ type: 'zip',
556
+ url: 'https://www.example.com/test/path/to/gutenberg.8.1.0.zip?auth=thisIsAString&token=secondString',
557
+ path: expect.stringMatching(
558
+ /^(\/|\\).*gutenberg.8.1.0$/
559
+ ),
560
+ basename: 'gutenberg.8.1.0',
561
+ },
553
562
  {
554
563
  type: 'zip',
555
564
  url: 'https://www.example.com/test/path/to/twentytwenty.zip',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/env",
3
- "version": "5.1.1",
3
+ "version": "5.2.0",
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",
@@ -51,5 +51,5 @@
51
51
  "scripts": {
52
52
  "test": "echo \"Error: run tests from root\" && exit 1"
53
53
  },
54
- "gitHead": "002058dceb89577290da6139aea3e99459fb2298"
54
+ "gitHead": "e4603f9843063edf33d32d6d43629f2f1c2c530b"
55
55
  }