@wordpress/env 10.36.1-next.738bb1424.0 → 10.36.1-next.76cff8c98.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/LICENSE.md
CHANGED
|
@@ -68,12 +68,10 @@ function parseSourceString( sourceString, { cacheDirectoryPath } ) {
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
if ( zipFields ) {
|
|
71
|
-
const
|
|
72
|
-
|
|
71
|
+
const rawBasename = path.basename( zipFields[ 1 ] );
|
|
72
|
+
const basename = encodeURIComponent(
|
|
73
|
+
rawBasename.replace( /\.(\d+\.)*\d+$/, '' )
|
|
73
74
|
);
|
|
74
|
-
const basename = wpOrgFields
|
|
75
|
-
? encodeURIComponent( wpOrgFields[ 1 ] )
|
|
76
|
-
: encodeURIComponent( path.basename( zipFields[ 1 ] ) );
|
|
77
75
|
|
|
78
76
|
return {
|
|
79
77
|
type: 'zip',
|
|
@@ -14,24 +14,24 @@ describe( 'addOrReplacePort', () => {
|
|
|
14
14
|
// Addition
|
|
15
15
|
{ in: 'test', expect: 'test:101' },
|
|
16
16
|
{ in: 'test/test?test#test', expect: 'test:101/test?test#test' },
|
|
17
|
-
{ in: 'http://
|
|
17
|
+
{ in: 'http://example.org', expect: 'http://example.org:101' },
|
|
18
18
|
{
|
|
19
|
-
in: 'http://
|
|
20
|
-
expect: 'http://
|
|
19
|
+
in: 'http://example.org/test?test#test',
|
|
20
|
+
expect: 'http://example.org:101/test?test#test',
|
|
21
21
|
},
|
|
22
|
-
{ in: 'ssh://
|
|
23
|
-
{ in: '
|
|
22
|
+
{ in: 'ssh://example.org', expect: 'ssh://example.org:101' },
|
|
23
|
+
{ in: 'example.org', expect: 'example.org:101' },
|
|
24
24
|
|
|
25
25
|
// Replacement
|
|
26
26
|
{ in: 'test:99', expect: 'test:101' },
|
|
27
27
|
{ in: 'test:99/test?test#test', expect: 'test:101/test?test#test' },
|
|
28
|
-
{ in: 'http://
|
|
28
|
+
{ in: 'http://example.org:99', expect: 'http://example.org:101' },
|
|
29
29
|
{
|
|
30
|
-
in: 'http://
|
|
31
|
-
expect: 'http://
|
|
30
|
+
in: 'http://example.org:99/test?test#test',
|
|
31
|
+
expect: 'http://example.org:101/test?test#test',
|
|
32
32
|
},
|
|
33
|
-
{ in: 'ssh://
|
|
34
|
-
{ in: '
|
|
33
|
+
{ in: 'ssh://example.org:99', expect: 'ssh://example.org:101' },
|
|
34
|
+
{ in: 'example.org:99', expect: 'example.org:101' },
|
|
35
35
|
];
|
|
36
36
|
|
|
37
37
|
for ( const test of testMap ) {
|
|
@@ -85,12 +85,12 @@ describe( 'parseSourceString', () => {
|
|
|
85
85
|
|
|
86
86
|
it( 'should parse other sources', () => {
|
|
87
87
|
expect(
|
|
88
|
-
parseSourceString( 'http://
|
|
88
|
+
parseSourceString( 'http://example.com/testing.zip', options )
|
|
89
89
|
).toEqual( {
|
|
90
90
|
basename: 'testing',
|
|
91
91
|
path: '/test/cache/testing',
|
|
92
92
|
type: 'zip',
|
|
93
|
-
url: 'http://
|
|
93
|
+
url: 'http://example.com/testing.zip',
|
|
94
94
|
} );
|
|
95
95
|
} );
|
|
96
96
|
} );
|
|
@@ -330,10 +330,10 @@ describe( 'validate-config', () => {
|
|
|
330
330
|
|
|
331
331
|
it( 'passes for valid URLs', () => {
|
|
332
332
|
expect( () =>
|
|
333
|
-
checkValidURL( 'test.json', 'test', 'http://
|
|
333
|
+
checkValidURL( 'test.json', 'test', 'http://example.com' )
|
|
334
334
|
).not.toThrow();
|
|
335
335
|
expect( () =>
|
|
336
|
-
checkValidURL( 'test.json', 'test', 'https://
|
|
336
|
+
checkValidURL( 'test.json', 'test', 'https://example.com' )
|
|
337
337
|
).not.toThrow();
|
|
338
338
|
expect( () =>
|
|
339
339
|
checkValidURL( 'test.json', 'test', 'http://test' )
|
|
@@ -346,16 +346,13 @@ describe( 'validate-config', () => {
|
|
|
346
346
|
)
|
|
347
347
|
).not.toThrow();
|
|
348
348
|
expect( () =>
|
|
349
|
-
checkValidURL( 'test.json', 'test', '
|
|
350
|
-
).not.toThrow();
|
|
351
|
-
expect( () =>
|
|
352
|
-
checkValidURL( 'test.json', 'test', 'https://test.co.uk:8888' )
|
|
349
|
+
checkValidURL( 'test.json', 'test', 'https://example.org:8888' )
|
|
353
350
|
).not.toThrow();
|
|
354
351
|
expect( () =>
|
|
355
352
|
checkValidURL(
|
|
356
353
|
'test.json',
|
|
357
354
|
'test',
|
|
358
|
-
'http://
|
|
355
|
+
'http://example.org:8888/test?test=test#test'
|
|
359
356
|
)
|
|
360
357
|
).not.toThrow();
|
|
361
358
|
} );
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/env",
|
|
3
|
-
"version": "10.36.1-next.
|
|
3
|
+
"version": "10.36.1-next.76cff8c98.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",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"scripts": {
|
|
62
62
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "368727f14b858e75179e140967c2d9ec965c8790"
|
|
65
65
|
}
|