@codesweets/core
Advanced tools
Comparing version 1.0.17 to 1.0.18
{ | ||
"name": "@codesweets/core", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "Core components that define tasks.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -60,3 +60,3 @@ import {EventEmitter} from "events"; | ||
case "glob": | ||
return globby.sync(pathOrPattern, { | ||
return globby.sync(pathOrPattern.startsWith("/") ? `.${pathOrPattern}` : pathOrPattern, { | ||
absolute: true, | ||
@@ -63,0 +63,0 @@ cwd: "/", |
@@ -20,6 +20,14 @@ "use strict"; | ||
assert_1.default.deepEqual(root.fsMatch("/dir/**", "glob"), ["/dir/test/file.txt"]); | ||
assert_1.default.deepEqual(root.fsMatch("/*.txt", "glob"), [ | ||
"/test1.txt", | ||
"/test2.txt" | ||
]); | ||
assert_1.default.deepEqual(root.fsMatch("1", "regex"), ["/test1.txt"]); | ||
assert_1.default.deepEqual(root.fsMatch(".*file.*", "regex"), ["/dir/test/file.txt"]); | ||
assert_1.default.deepEqual(root.fsMatch("/dir", "regex"), ["/dir/test/file.txt"]); | ||
assert_1.default.deepEqual(root.fsMatch("^/[^\\/]*\\.txt", "regex"), [ | ||
"/test1.txt", | ||
"/test2.txt" | ||
]); | ||
})(); | ||
//# sourceMappingURL=test.js.map |
@@ -17,5 +17,13 @@ import {TaskRoot} from "@codesweets/core"; | ||
assert.deepEqual(root.fsMatch("/dir/**", "glob"), ["/dir/test/file.txt"]); | ||
assert.deepEqual(root.fsMatch("/*.txt", "glob"), [ | ||
"/test1.txt", | ||
"/test2.txt" | ||
]); | ||
assert.deepEqual(root.fsMatch("1", "regex"), ["/test1.txt"]); | ||
assert.deepEqual(root.fsMatch(".*file.*", "regex"), ["/dir/test/file.txt"]); | ||
assert.deepEqual(root.fsMatch("/dir", "regex"), ["/dir/test/file.txt"]); | ||
assert.deepEqual(root.fsMatch("^/[^\\/]*\\.txt", "regex"), [ | ||
"/test1.txt", | ||
"/test2.txt" | ||
]); | ||
})(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
696002
2727