Compare commits

...

4 Commits

Author SHA1 Message Date
Ryan Ghadimi 0af4e806e9 Merge remote-tracking branch 'origin' into ghadimir/globber_log_hidden 2025-05-07 10:59:41 +00:00
Ryan Ghadimi a89208769e lint 2025-05-06 18:25:16 +00:00
Ryan Ghadimi 4cce91d01c release prep 2025-05-06 18:16:43 +00:00
Ryan Ghadimi 0a7ac702c0 log ignored files 2025-05-06 18:10:37 +00:00
4 changed files with 12 additions and 3 deletions
+3
View File
@@ -1,5 +1,8 @@
# @actions/glob Releases
### 0.5.1
- When using the `excludeHiddenFiles` option, log any ignored files with `core.info()` [#2040](https://github.com/actions/toolkit/pull/2040)
### 0.5.0
- Added `excludeHiddenFiles` option, which is disabled by default to preserve existing behavior [#1791: Add glob option to ignore hidden files](https://github.com/actions/toolkit/pull/1791)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/glob",
"version": "0.5.0",
"version": "0.5.1",
"lockfileVersion": 3,
"requires": true,
"description": "Actions glob lib",
@@ -21,7 +21,7 @@
"packages": {
"": {
"name": "@actions/glob",
"version": "0.5.0",
"version": "0.5.1",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.9.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@actions/glob",
"version": "0.5.0",
"version": "0.5.1",
"preview": true,
"description": "Actions glob lib",
"keywords": [
+6
View File
@@ -104,6 +104,7 @@ export class DefaultGlobber implements Globber {
// Search
const traversalChain: string[] = [] // used to detect cycles
let loggedFirstHiddenMessage = false // if printing hidden, is this the first one
while (stack.length) {
// Pop
const item = stack.pop() as SearchState
@@ -130,6 +131,11 @@ export class DefaultGlobber implements Globber {
// Hidden file or directory?
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
if (!loggedFirstHiddenMessage) {
core.info(`Ignoring the following hidden files and directories`)
loggedFirstHiddenMessage = true
}
core.info(`- ${item.path}`)
continue
}