Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@actions/glob

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@actions/glob - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

lib/internal-hash-file-options.d.ts

8

lib/glob.d.ts
import { Globber } from './internal-globber';
import { GlobOptions } from './internal-glob-options';
import { HashFileOptions } from './internal-hash-file-options';
export { Globber, GlobOptions };

@@ -11,1 +12,8 @@ /**

export declare function create(patterns: string, options?: GlobOptions): Promise<Globber>;
/**
* Computes the sha256 hash of a glob
*
* @param patterns Patterns separated by newlines
* @param options Glob options
*/
export declare function hashFiles(patterns: string, options?: HashFileOptions): Promise<string>;

20

lib/glob.js

@@ -12,4 +12,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.create = void 0;
exports.hashFiles = exports.create = void 0;
const internal_globber_1 = require("./internal-globber");
const internal_hash_files_1 = require("./internal-hash-files");
/**

@@ -27,2 +28,19 @@ * Constructs a globber

exports.create = create;
/**
* Computes the sha256 hash of a glob
*
* @param patterns Patterns separated by newlines
* @param options Glob options
*/
function hashFiles(patterns, options) {
return __awaiter(this, void 0, void 0, function* () {
let followSymbolicLinks = true;
if (options && typeof options.followSymbolicLinks === 'boolean') {
followSymbolicLinks = options.followSymbolicLinks;
}
const globber = yield create(patterns, { followSymbolicLinks });
return internal_hash_files_1.hashFiles(globber);
});
}
exports.hashFiles = hashFiles;
//# sourceMappingURL=glob.js.map

@@ -31,2 +31,3 @@ "use strict";

implicitDescendants: true,
matchDirectories: true,
omitBrokenSymbolicLinks: true

@@ -43,2 +44,6 @@ };

}
if (typeof copy.matchDirectories === 'boolean') {
result.matchDirectories = copy.matchDirectories;
core.debug(`matchDirectories '${result.matchDirectories}'`);
}
if (typeof copy.omitBrokenSymbolicLinks === 'boolean') {

@@ -45,0 +50,0 @@ result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;

@@ -23,2 +23,9 @@ /**

/**
* Indicates whether matching directories should be included in the
* result set.
*
* @default true
*/
matchDirectories?: boolean;
/**
* Indicates whether broken symbolic should be ignored and omitted from the

@@ -25,0 +32,0 @@ * result set. Otherwise an error will be thrown.

2

lib/internal-globber.js

@@ -144,3 +144,3 @@ "use strict";

// Matched
if (match & internal_match_kind_1.MatchKind.Directory) {
if (match & internal_match_kind_1.MatchKind.Directory && options.matchDirectories) {
yield yield __await(item.path);

@@ -147,0 +147,0 @@ }

{
"name": "@actions/glob",
"version": "0.1.2",
"version": "0.2.0",
"preview": true,

@@ -5,0 +5,0 @@ "description": "Actions glob lib",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc