You've already forked setup-dotnet
							
							
				mirror of
				https://github.com/actions/setup-dotnet.git
				synced 2025-11-04 17:06:35 +07:00 
			
		
		
		
	Bump @actions/glob from 0.4.0 to 0.5.0 (#594)
* Bump @actions/glob from 0.4.0 to 0.5.0 Bumps [@actions/glob](https://github.com/actions/toolkit/tree/HEAD/packages/glob) from 0.4.0 to 0.5.0. - [Changelog](https://github.com/actions/toolkit/blob/main/packages/glob/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/glob) --- updated-dependencies: - dependency-name: "@actions/glob" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Fix CI failures --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
This commit is contained in:
		@ -1,6 +1,6 @@
 | 
			
		||||
---
 | 
			
		||||
name: "@actions/glob"
 | 
			
		||||
version: 0.4.0
 | 
			
		||||
version: 0.5.0
 | 
			
		||||
type: npm
 | 
			
		||||
summary: Actions glob lib
 | 
			
		||||
homepage: https://github.com/actions/toolkit/tree/main/packages/glob
 | 
			
		||||
							
								
								
									
										133
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										133
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							@ -7964,7 +7964,7 @@ function hashFiles(patterns, currentWorkspace = '', options, verbose = false) {
 | 
			
		||||
            followSymbolicLinks = options.followSymbolicLinks;
 | 
			
		||||
        }
 | 
			
		||||
        const globber = yield create(patterns, { followSymbolicLinks });
 | 
			
		||||
        return internal_hash_files_1.hashFiles(globber, currentWorkspace, verbose);
 | 
			
		||||
        return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose);
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
exports.hashFiles = hashFiles;
 | 
			
		||||
@ -7979,7 +7979,11 @@ exports.hashFiles = hashFiles;
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@ -7992,7 +7996,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@ -8007,7 +8011,8 @@ function getOptions(copy) {
 | 
			
		||||
        followSymbolicLinks: true,
 | 
			
		||||
        implicitDescendants: true,
 | 
			
		||||
        matchDirectories: true,
 | 
			
		||||
        omitBrokenSymbolicLinks: true
 | 
			
		||||
        omitBrokenSymbolicLinks: true,
 | 
			
		||||
        excludeHiddenFiles: false
 | 
			
		||||
    };
 | 
			
		||||
    if (copy) {
 | 
			
		||||
        if (typeof copy.followSymbolicLinks === 'boolean') {
 | 
			
		||||
@ -8026,6 +8031,10 @@ function getOptions(copy) {
 | 
			
		||||
            result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
 | 
			
		||||
            core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
 | 
			
		||||
        }
 | 
			
		||||
        if (typeof copy.excludeHiddenFiles === 'boolean') {
 | 
			
		||||
            result.excludeHiddenFiles = copy.excludeHiddenFiles;
 | 
			
		||||
            core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return result;
 | 
			
		||||
}
 | 
			
		||||
@ -8041,7 +8050,11 @@ exports.getOptions = getOptions;
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@ -8054,7 +8067,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@ -8108,19 +8121,21 @@ class DefaultGlobber {
 | 
			
		||||
        return this.searchPaths.slice();
 | 
			
		||||
    }
 | 
			
		||||
    glob() {
 | 
			
		||||
        var e_1, _a;
 | 
			
		||||
        var _a, e_1, _b, _c;
 | 
			
		||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
            const result = [];
 | 
			
		||||
            try {
 | 
			
		||||
                for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
 | 
			
		||||
                    const itemPath = _c.value;
 | 
			
		||||
                for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
 | 
			
		||||
                    _c = _f.value;
 | 
			
		||||
                    _d = false;
 | 
			
		||||
                    const itemPath = _c;
 | 
			
		||||
                    result.push(itemPath);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
 | 
			
		||||
            finally {
 | 
			
		||||
                try {
 | 
			
		||||
                    if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
 | 
			
		||||
                    if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
 | 
			
		||||
                }
 | 
			
		||||
                finally { if (e_1) throw e_1.error; }
 | 
			
		||||
            }
 | 
			
		||||
@ -8178,6 +8193,10 @@ class DefaultGlobber {
 | 
			
		||||
                if (!stats) {
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
                // Hidden file or directory?
 | 
			
		||||
                if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
                // Directory
 | 
			
		||||
                if (stats.isDirectory()) {
 | 
			
		||||
                    // Matched
 | 
			
		||||
@ -8283,7 +8302,11 @@ exports.DefaultGlobber = DefaultGlobber;
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@ -8296,7 +8319,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@ -8325,19 +8348,21 @@ const stream = __importStar(__nccwpck_require__(2781));
 | 
			
		||||
const util = __importStar(__nccwpck_require__(3837));
 | 
			
		||||
const path = __importStar(__nccwpck_require__(1017));
 | 
			
		||||
function hashFiles(globber, currentWorkspace, verbose = false) {
 | 
			
		||||
    var e_1, _a;
 | 
			
		||||
    var _b;
 | 
			
		||||
    var _a, e_1, _b, _c;
 | 
			
		||||
    var _d;
 | 
			
		||||
    return __awaiter(this, void 0, void 0, function* () {
 | 
			
		||||
        const writeDelegate = verbose ? core.info : core.debug;
 | 
			
		||||
        let hasMatch = false;
 | 
			
		||||
        const githubWorkspace = currentWorkspace
 | 
			
		||||
            ? currentWorkspace
 | 
			
		||||
            : (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
 | 
			
		||||
            : (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd();
 | 
			
		||||
        const result = crypto.createHash('sha256');
 | 
			
		||||
        let count = 0;
 | 
			
		||||
        try {
 | 
			
		||||
            for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
 | 
			
		||||
                const file = _d.value;
 | 
			
		||||
            for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
 | 
			
		||||
                _c = _g.value;
 | 
			
		||||
                _e = false;
 | 
			
		||||
                const file = _c;
 | 
			
		||||
                writeDelegate(file);
 | 
			
		||||
                if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
 | 
			
		||||
                    writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
 | 
			
		||||
@ -8360,7 +8385,7 @@ function hashFiles(globber, currentWorkspace, verbose = false) {
 | 
			
		||||
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
 | 
			
		||||
        finally {
 | 
			
		||||
            try {
 | 
			
		||||
                if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);
 | 
			
		||||
                if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
 | 
			
		||||
            }
 | 
			
		||||
            finally { if (e_1) throw e_1.error; }
 | 
			
		||||
        }
 | 
			
		||||
@ -8400,7 +8425,7 @@ var MatchKind;
 | 
			
		||||
    MatchKind[MatchKind["File"] = 2] = "File";
 | 
			
		||||
    /** Matched */
 | 
			
		||||
    MatchKind[MatchKind["All"] = 3] = "All";
 | 
			
		||||
})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));
 | 
			
		||||
})(MatchKind || (exports.MatchKind = MatchKind = {}));
 | 
			
		||||
//# sourceMappingURL=internal-match-kind.js.map
 | 
			
		||||
 | 
			
		||||
/***/ }),
 | 
			
		||||
@ -8412,7 +8437,11 @@ var MatchKind;
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@ -8425,7 +8454,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@ -8475,8 +8504,8 @@ exports.dirname = dirname;
 | 
			
		||||
 * or `C:` are expanded based on the current working directory.
 | 
			
		||||
 */
 | 
			
		||||
function ensureAbsoluteRoot(root, itemPath) {
 | 
			
		||||
    assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
 | 
			
		||||
    assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
 | 
			
		||||
    (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
 | 
			
		||||
    (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
 | 
			
		||||
    // Already rooted
 | 
			
		||||
    if (hasAbsoluteRoot(itemPath)) {
 | 
			
		||||
        return itemPath;
 | 
			
		||||
@ -8486,7 +8515,7 @@ function ensureAbsoluteRoot(root, itemPath) {
 | 
			
		||||
        // Check for itemPath like C: or C:foo
 | 
			
		||||
        if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) {
 | 
			
		||||
            let cwd = process.cwd();
 | 
			
		||||
            assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
 | 
			
		||||
            (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
 | 
			
		||||
            // Drive letter matches cwd? Expand to cwd
 | 
			
		||||
            if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {
 | 
			
		||||
                // Drive only, e.g. C:
 | 
			
		||||
@ -8511,11 +8540,11 @@ function ensureAbsoluteRoot(root, itemPath) {
 | 
			
		||||
        // Check for itemPath like \ or \foo
 | 
			
		||||
        else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) {
 | 
			
		||||
            const cwd = process.cwd();
 | 
			
		||||
            assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
 | 
			
		||||
            (0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
 | 
			
		||||
            return `${cwd[0]}:\\${itemPath.substr(1)}`;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
 | 
			
		||||
    (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
 | 
			
		||||
    // Otherwise ensure root ends with a separator
 | 
			
		||||
    if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) {
 | 
			
		||||
        // Intentionally empty
 | 
			
		||||
@ -8532,7 +8561,7 @@ exports.ensureAbsoluteRoot = ensureAbsoluteRoot;
 | 
			
		||||
 * `\\hello\share` and `C:\hello` (and using alternate separator).
 | 
			
		||||
 */
 | 
			
		||||
function hasAbsoluteRoot(itemPath) {
 | 
			
		||||
    assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
 | 
			
		||||
    (0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
 | 
			
		||||
    // Normalize separators
 | 
			
		||||
    itemPath = normalizeSeparators(itemPath);
 | 
			
		||||
    // Windows
 | 
			
		||||
@ -8549,7 +8578,7 @@ exports.hasAbsoluteRoot = hasAbsoluteRoot;
 | 
			
		||||
 * `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator).
 | 
			
		||||
 */
 | 
			
		||||
function hasRoot(itemPath) {
 | 
			
		||||
    assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);
 | 
			
		||||
    (0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`);
 | 
			
		||||
    // Normalize separators
 | 
			
		||||
    itemPath = normalizeSeparators(itemPath);
 | 
			
		||||
    // Windows
 | 
			
		||||
@ -8617,7 +8646,11 @@ exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@ -8630,7 +8663,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@ -8655,7 +8688,7 @@ class Path {
 | 
			
		||||
        this.segments = [];
 | 
			
		||||
        // String
 | 
			
		||||
        if (typeof itemPath === 'string') {
 | 
			
		||||
            assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);
 | 
			
		||||
            (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`);
 | 
			
		||||
            // Normalize slashes and trim unnecessary trailing slash
 | 
			
		||||
            itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
 | 
			
		||||
            // Not rooted
 | 
			
		||||
@ -8682,24 +8715,24 @@ class Path {
 | 
			
		||||
        // Array
 | 
			
		||||
        else {
 | 
			
		||||
            // Must not be empty
 | 
			
		||||
            assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
 | 
			
		||||
            (0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
 | 
			
		||||
            // Each segment
 | 
			
		||||
            for (let i = 0; i < itemPath.length; i++) {
 | 
			
		||||
                let segment = itemPath[i];
 | 
			
		||||
                // Must not be empty
 | 
			
		||||
                assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);
 | 
			
		||||
                (0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`);
 | 
			
		||||
                // Normalize slashes
 | 
			
		||||
                segment = pathHelper.normalizeSeparators(itemPath[i]);
 | 
			
		||||
                // Root segment
 | 
			
		||||
                if (i === 0 && pathHelper.hasRoot(segment)) {
 | 
			
		||||
                    segment = pathHelper.safeTrimTrailingSeparator(segment);
 | 
			
		||||
                    assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
 | 
			
		||||
                    (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
 | 
			
		||||
                    this.segments.push(segment);
 | 
			
		||||
                }
 | 
			
		||||
                // All other segments
 | 
			
		||||
                else {
 | 
			
		||||
                    // Must not contain slash
 | 
			
		||||
                    assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
 | 
			
		||||
                    (0, assert_1.default)(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
 | 
			
		||||
                    this.segments.push(segment);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
@ -8737,7 +8770,11 @@ exports.Path = Path;
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@ -8750,7 +8787,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@ -8838,7 +8875,11 @@ exports.partialMatch = partialMatch;
 | 
			
		||||
 | 
			
		||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
			
		||||
    var desc = Object.getOwnPropertyDescriptor(m, k);
 | 
			
		||||
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
 | 
			
		||||
      desc = { enumerable: true, get: function() { return m[k]; } };
 | 
			
		||||
    }
 | 
			
		||||
    Object.defineProperty(o, k2, desc);
 | 
			
		||||
}) : (function(o, m, k, k2) {
 | 
			
		||||
    if (k2 === undefined) k2 = k;
 | 
			
		||||
    o[k2] = m[k];
 | 
			
		||||
@ -8851,7 +8892,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
 | 
			
		||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
			
		||||
    if (mod && mod.__esModule) return mod;
 | 
			
		||||
    var result = {};
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
			
		||||
    __setModuleDefault(result, mod);
 | 
			
		||||
    return result;
 | 
			
		||||
};
 | 
			
		||||
@ -8883,9 +8924,9 @@ class Pattern {
 | 
			
		||||
        else {
 | 
			
		||||
            // Convert to pattern
 | 
			
		||||
            segments = segments || [];
 | 
			
		||||
            assert_1.default(segments.length, `Parameter 'segments' must not empty`);
 | 
			
		||||
            (0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`);
 | 
			
		||||
            const root = Pattern.getLiteral(segments[0]);
 | 
			
		||||
            assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
 | 
			
		||||
            (0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
 | 
			
		||||
            pattern = new internal_path_1.Path(segments).toString().trim();
 | 
			
		||||
            if (patternOrNegate) {
 | 
			
		||||
                pattern = `!${pattern}`;
 | 
			
		||||
@ -8979,13 +9020,13 @@ class Pattern {
 | 
			
		||||
     */
 | 
			
		||||
    static fixupPattern(pattern, homedir) {
 | 
			
		||||
        // Empty
 | 
			
		||||
        assert_1.default(pattern, 'pattern cannot be empty');
 | 
			
		||||
        (0, assert_1.default)(pattern, 'pattern cannot be empty');
 | 
			
		||||
        // Must not contain `.` segment, unless first segment
 | 
			
		||||
        // Must not contain `..` segment
 | 
			
		||||
        const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));
 | 
			
		||||
        assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
 | 
			
		||||
        (0, assert_1.default)(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
 | 
			
		||||
        // Must not contain globs in root, e.g. Windows UNC path \\foo\b*r
 | 
			
		||||
        assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
 | 
			
		||||
        (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
 | 
			
		||||
        // Normalize slashes
 | 
			
		||||
        pattern = pathHelper.normalizeSeparators(pattern);
 | 
			
		||||
        // Replace leading `.` segment
 | 
			
		||||
@ -8995,8 +9036,8 @@ class Pattern {
 | 
			
		||||
        // Replace leading `~` segment
 | 
			
		||||
        else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {
 | 
			
		||||
            homedir = homedir || os.homedir();
 | 
			
		||||
            assert_1.default(homedir, 'Unable to determine HOME directory');
 | 
			
		||||
            assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
 | 
			
		||||
            (0, assert_1.default)(homedir, 'Unable to determine HOME directory');
 | 
			
		||||
            (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
 | 
			
		||||
            pattern = Pattern.globEscape(homedir) + pattern.substr(1);
 | 
			
		||||
        }
 | 
			
		||||
        // Replace relative drive root, e.g. pattern is C: or C:foo
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -13,7 +13,7 @@
 | 
			
		||||
        "@actions/core": "^1.10.0",
 | 
			
		||||
        "@actions/exec": "^1.1.1",
 | 
			
		||||
        "@actions/github": "^6.0.0",
 | 
			
		||||
        "@actions/glob": "^0.4.0",
 | 
			
		||||
        "@actions/glob": "^0.5.0",
 | 
			
		||||
        "@actions/http-client": "^2.2.3",
 | 
			
		||||
        "@actions/io": "^1.0.2",
 | 
			
		||||
        "fast-xml-parser": "^4.4.1",
 | 
			
		||||
@ -115,9 +115,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@actions/glob": {
 | 
			
		||||
      "version": "0.4.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.4.0.tgz",
 | 
			
		||||
      "integrity": "sha512-+eKIGFhsFa4EBwaf/GMyzCdWrXWymGXfFmZU3FHQvYS8mPcHtTtZONbkcqqUMzw9mJ/pImEBFET1JNifhqGsAQ==",
 | 
			
		||||
      "version": "0.5.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.5.0.tgz",
 | 
			
		||||
      "integrity": "sha512-tST2rjPvJLRZLuT9NMUtyBjvj9Yo0MiJS3ow004slMvm8GFM+Zv9HvMJ7HWzfUyJnGrJvDsYkWBaaG3YKXRtCw==",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@actions/core": "^1.9.1",
 | 
			
		||||
        "minimatch": "^3.0.4"
 | 
			
		||||
 | 
			
		||||
@ -30,7 +30,7 @@
 | 
			
		||||
    "@actions/core": "^1.10.0",
 | 
			
		||||
    "@actions/exec": "^1.1.1",
 | 
			
		||||
    "@actions/github": "^6.0.0",
 | 
			
		||||
    "@actions/glob": "^0.4.0",
 | 
			
		||||
    "@actions/glob": "^0.5.0",
 | 
			
		||||
    "@actions/http-client": "^2.2.3",
 | 
			
		||||
    "@actions/io": "^1.0.2",
 | 
			
		||||
    "fast-xml-parser": "^4.4.1",
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user