8000 Update `@actions/glob` to 0.3.0 · github-vrp/github-script@0a99845 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a99845

Browse files
committed
Update @actions/glob to 0.3.0
1 parent 46a476b commit 0a99845

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

dist/index.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,14 +2833,14 @@ exports.create = create;
28332833
* @param patterns Patterns separated by newlines
28342834
* @param options Glob options
28352835
*/
2836-
function hashFiles(patterns, options) {
2836+
function hashFiles(patterns, options, verbose = false) {
28372837
return __awaiter(this, void 0, void 0, function* () {
28382838
let followSymbolicLinks = true;
28392839
if (options && typeof options.followSymbolicLinks === 'boolean') {
28402840
followSymbolicLinks = options.followSymbolicLinks;
28412841
}
28422842
const globber = yield create(patterns, { followSymbolicLinks });
2843-
return internal_hash_files_1.hashFiles(globber);
2843+
return internal_hash_files_1.hashFiles(globber, verbose);
28442844
});
28452845
}
28462846
exports.hashFiles = hashFiles;
@@ -7571,24 +7571,25 @@ const fs = __importStar(__webpack_require__(747));
75717571
const stream = __importStar(__webpack_require__(413));
75727572
const util = __importStar(__webpack_require__(669));
75737573
const path = __importStar(__webpack_require__(622));
7574-
function hashFiles(globber) {
7574+
function hashFiles(globber, verbose = false) {
75757575
var e_1, _a;
75767576
var _b;
75777577
return __awaiter(this, void 0, void 0, function* () {
7578+
const writeDelegate = verbose ? core.info : core.debug;
75787579
let hasMatch = false;
75797580
const githubWorkspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
75807581
const result = crypto.createHash('sha256');
75817582
let count = 0;
75827583
try {
75837584
for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
75847585
const file = _d.value;
7585-
core.debug(file);
7586+
writeDelegate(file);
75867587
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
7587-
core.debug(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
7588+
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
75887589
continue;
75897590
8000 }
75907591
if (fs.statSync(file).isDirectory()) {
7591-
core.debug(`Skip directory '${file}'.`);
7592+
writeDelegate(`Skip directory '${file}'.`);
75927593
continue;
75937594
}
75947595
const hash = crypto.createHash('sha256');
@@ -7610,11 +7611,11 @@ function hashFiles(globber) {
76107611
}
76117612
result.end();
76127613
if (hasMatch) {
7613-
core.debug(`Found ${count} files to hash.`);
7614+
writeDelegate(`Found ${count} files to hash.`);
76147615
return result.digest('hex');
76157616
}
76167617
else {
7617-
core.debug(`No matches found for glob`);
7618+
writeDelegate(`No matches found for glob`);
76187619
return '';
76197620
}
76207621
});

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@actions/core": "^1.8.1",
3535
"@actions/exec": "^1.1.0",
3636
"@actions/github": "^5.0.0",
37-
"@actions/glob": "^0.2.0",
37+
"@actions/glob": "^0.3.0",
3838
"@actions/io": "^1.1.1",
3939
"@octokit/core": "^3.5.1",
4040
"@octokit/plugin-paginate-rest": "^2.17.0",
@@ -54,4 +54,4 @@
5454
"ts-jest": "^27.0.5",
5555
"typescript": "^4.3.5"
5656
}
57-
}
57+
}

0 commit comments

Comments
 (0)
0