photon
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -0,2 +1,7 @@ | ||
2.0.1 / 2017-11-08 | ||
================== | ||
* Update to support Node.js version 7+ due to changes in `url.format` (#6, @DanReyLop) | ||
* Update dependencies | ||
2.0.0 / 2016-02-02 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -68,3 +68,4 @@ | ||
} | ||
params.pathname = url.format( parsedUrl ).substring(1); | ||
var formattedUrl = url.format( parsedUrl ); | ||
params.pathname = 0 === formattedUrl.indexOf( '//' ) ? formattedUrl.substring(1) : formattedUrl; | ||
params.hostname = serverFromPathname( params.pathname ); | ||
@@ -71,0 +72,0 @@ if ( wasSecure ) { |
{ | ||
"name": "photon", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "JavaScript library for the WordPress.com Photon image manipulation service", | ||
@@ -35,9 +35,9 @@ "main": "index.js", | ||
"crc32": "0.2.2", | ||
"debug": "2", | ||
"debug": "3.1.0", | ||
"seed-random": "2.2.0" | ||
}, | ||
"devDependencies": { | ||
"browserify": "8.1.1", | ||
"mocha": "2.4.5" | ||
"browserify": "14.5.0", | ||
"mocha": "3.5.3" | ||
} | ||
} |
@@ -67,3 +67,3 @@ # photon.js | ||
MIT – Copyright 2014 Automattic | ||
MIT – Copyright 2014-2017 Automattic | ||
@@ -70,0 +70,0 @@ [Node.js]: http://nodejs.org |
@@ -82,2 +82,10 @@ | ||
it('should handle blob: URLs', function() { | ||
var url = 'blob:http://example.com/ddd1d6b0-f31b-4937-ae9e-97f1d660cf71'; | ||
var photonedUrl = photon(url); | ||
assertHostedOnPhoton( photonedUrl ); | ||
assertPathname(photonedUrl, '/http//example.com/ddd1d6b0-f31b-4937-ae9e-97f1d660cf71'); | ||
}); | ||
it('should strip existing size params from photoned URLs', function () { | ||
@@ -84,0 +92,0 @@ var url = 'https://i0.wp.com/www.gravatar.com/avatar/693307b4e0cb9366f34862c9dfacd7fc?resize=120'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
89040
2496
9
4
1
+ Addeddebug@3.1.0(transitive)
- Removeddebug@2.6.9(transitive)
Updateddebug@3.1.0