@parcel/utils
Advanced tools
Comparing version 2.0.0-nightly.165 to 2.0.0-nightly.166
@@ -7,2 +7,3 @@ "use strict"; | ||
exports.normalizeSeparators = normalizeSeparators; | ||
exports.relatifyPath = relatifyPath; | ||
@@ -23,2 +24,12 @@ var _path = _interopRequireDefault(require("path")); | ||
return ret; | ||
} | ||
function relatifyPath(from, to) { | ||
let filename = _path.default.relative(from, to); | ||
if (filename[0] !== '.') { | ||
filename = './' + filename; | ||
} | ||
return filename.replace(/\\+/g, '/'); | ||
} |
@@ -6,2 +6,3 @@ "use strict"; | ||
}); | ||
exports.fuzzySearch = fuzzySearch; | ||
exports.default = void 0; | ||
@@ -8,0 +9,0 @@ |
{ | ||
"name": "@parcel/utils", | ||
"version": "2.0.0-nightly.165+161837f7", | ||
"version": "2.0.0-nightly.166+76c5ac6c", | ||
"description": "Blazing fast, zero configuration web application bundler", | ||
@@ -20,6 +20,6 @@ "license": "MIT", | ||
"@iarna/toml": "^2.2.0", | ||
"@parcel/codeframe": "2.0.0-nightly.165+161837f7", | ||
"@parcel/diagnostic": "2.0.0-nightly.165+161837f7", | ||
"@parcel/logger": "2.0.0-nightly.165+161837f7", | ||
"@parcel/markdown-ansi": "2.0.0-nightly.165+161837f7", | ||
"@parcel/codeframe": "2.0.0-nightly.166+76c5ac6c", | ||
"@parcel/diagnostic": "2.0.0-nightly.166+76c5ac6c", | ||
"@parcel/logger": "2.0.0-nightly.166+76c5ac6c", | ||
"@parcel/markdown-ansi": "2.0.0-nightly.166+76c5ac6c", | ||
"ansi-html": "^0.0.7", | ||
@@ -44,3 +44,3 @@ "chalk": "^2.4.2", | ||
}, | ||
"gitHead": "161837f71682f13d2b16e7396e82eb620fe06e4e" | ||
"gitHead": "76c5ac6c8dad3158dd0bd6f2a7879a73a80b1979" | ||
} |
@@ -17,1 +17,9 @@ // @flow strict-local | ||
} | ||
export function relatifyPath(from: string, to: string) { | ||
let filename = path.relative(from, to); | ||
if (filename[0] !== '.') { | ||
filename = './' + filename; | ||
} | ||
return filename.replace(/\\+/g, '/'); | ||
} |
@@ -342,3 +342,6 @@ // @flow strict-local | ||
function fuzzySearch(expectedValues: Array<string>, actualValue: string) { | ||
export function fuzzySearch( | ||
expectedValues: Array<string>, | ||
actualValue: string, | ||
): Array<string> { | ||
let result = expectedValues | ||
@@ -345,0 +348,0 @@ .map(exp => [exp, levenshteinDistance(exp, actualValue)]) |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
130953
4088