normalize-glob
Advanced tools
Comparing version
@@ -27,3 +27,3 @@ "use strict"; | ||
| parts = [...cwd.substr(root.length).split(/[/\\]+/g), ...pattern.split(/\/+/g)]; | ||
| root = root.replace(/\\$/, '/'); | ||
| root = ensureTrailingSlash(root.replace(/\\$/, '')); | ||
| } | ||
@@ -59,10 +59,5 @@ if (ing.negated) | ||
| } | ||
| const joined = join(prefix, result.join('/')); | ||
| const joined = prefix + result.join('/'); | ||
| yield trailingSlash ? ensureTrailingSlash(joined) : joined; | ||
| } | ||
| function join(prefix, suffix) { | ||
| if (!suffix) | ||
| return prefix; | ||
| return ensureTrailingSlash(prefix) + suffix; | ||
| } | ||
| function ensureTrailingSlash(p) { | ||
@@ -69,0 +64,0 @@ return p.endsWith('/') ? p : p + '/'; |
| { | ||
| "name": "normalize-glob", | ||
| "version": "0.0.1", | ||
| "version": "0.0.2", | ||
| "description": "Normalize a glob pattern by expanding braces, making it absolute and resolving parent directories '..'", | ||
@@ -11,4 +11,4 @@ "main": "dist/index", | ||
| "compile": "tsc -p .", | ||
| "test": "ava dist/test", | ||
| "test-coverage": "nyc yarn test", | ||
| "test": "ava", | ||
| "test-coverage": "nyc run-s test", | ||
| "lint": "run-p lint:*", | ||
@@ -38,8 +38,8 @@ "lint:valtyr": "wotan -m @fimbul/valtyr", | ||
| "devDependencies": { | ||
| "@fimbul/valtyr": "^0.14.0", | ||
| "@fimbul/wotan": "^0.14.0", | ||
| "@fimbul/valtyr": "^0.20.0", | ||
| "@fimbul/wotan": "^0.20.0", | ||
| "@types/brace-expansion": "^1.1.0", | ||
| "@types/is-negated-glob": "^1.0.0", | ||
| "@types/node": "^10.9.4", | ||
| "ava": "^0.25.0", | ||
| "ava": "^2.0.0", | ||
| "codecov": "^3.1.0", | ||
@@ -50,3 +50,3 @@ "npm-run-all": "^4.1.3", | ||
| "tslint-consistent-codestyle": "^1.13.3", | ||
| "typescript": "~3.1.0" | ||
| "typescript": "~3.5.0" | ||
| }, | ||
@@ -53,0 +53,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
7861
-3.09%68
-6.85%1
Infinity%