json-schema-ref-parser
Advanced tools
Comparing version 5.1.2 to 5.1.3
@@ -12,3 +12,2 @@ 'use strict'; | ||
/\#/g, '%23', | ||
isWindows ? /\\/g : /\//, '/' | ||
]; | ||
@@ -150,7 +149,14 @@ | ||
exports.fromFileSystemPath = function fromFileSystemPath (path) { | ||
// Step 1: Manually encode characters that are not encoded by `encodeURI`. | ||
// Step 1: On Windows, replace backslashes with forward slashes, | ||
// rather than encoding them as "%5C" | ||
if (isWindows) { | ||
path = path.replace(/\\/g, '/'); | ||
} | ||
// Step 2: `encodeURI` will take care of MOST characters | ||
path = encodeURI(path); | ||
// Step 3: Manually encode characters that are not encoded by `encodeURI`. | ||
// This includes characters such as "#" and "?", which have special meaning in URLs, | ||
// but are just normal characters in a filesystem path. | ||
// On Windows, this will also replace backslashes with forward slashes, | ||
// rather than encoding them as special characters. | ||
for (var i = 0; i < urlEncodePatterns.length; i += 2) { | ||
@@ -160,4 +166,3 @@ path = path.replace(urlEncodePatterns[i], urlEncodePatterns[i + 1]); | ||
// Step 2: `encodeURI` will take care of all other characters | ||
return encodeURI(path); | ||
return path; | ||
}; | ||
@@ -164,0 +169,0 @@ |
{ | ||
"name": "json-schema-ref-parser", | ||
"version": "5.1.2", | ||
"version": "5.1.3", | ||
"description": "Parse, Resolve, and Dereference JSON Schema $ref pointers", | ||
@@ -52,3 +52,3 @@ "keywords": [ | ||
"@types/json-schema": "^7.0.0", | ||
"@types/node": "^10.5.4", | ||
"@types/node": "^10.9.1", | ||
"bower": "^1.8.4", | ||
@@ -58,7 +58,7 @@ "chai": "^4.1.2", | ||
"coveralls": "^3.0.2", | ||
"eslint": "^5.2.0", | ||
"eslint": "^5.4.0", | ||
"eslint-config-modular": "^4.1.2", | ||
"http-server": "^0.11.1", | ||
"istanbul": "^0.4.5", | ||
"karma": "^2.0.5", | ||
"karma": "^3.0.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
@@ -75,3 +75,3 @@ "karma-cli": "^1.0.1", | ||
"mocha": "^5.2.0", | ||
"npm-check": "^5.7.1", | ||
"npm-check": "^5.8.0", | ||
"simplifyify": "^4.0.3", | ||
@@ -84,4 +84,4 @@ "version-bump-prompt": "^4.1.0" | ||
"js-yaml": "^3.12.0", | ||
"ono": "^4.0.5" | ||
"ono": "^4.0.6" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2062776
16779
Updatedono@^4.0.6