@gasket/utils
Advanced tools
Comparing version 6.34.6 to 6.35.2
@@ -14,4 +14,6 @@ | ||
~~[applyEnvironmentOverrides(gasketConfig, config, \[localFile\])]~~ | Normalize the config by applying any environment or local overrides | ||
[requireWithInstall(dependency, gasket)] | requireWithInstall - load devDependency programmatically when needed | ||
[runShellCommand(cmd, \[argv\], \[options\], \[debug\])] | Promise friendly wrapper to running a shell command (eg: git, npm, ls) which passes back any { stdout, stderr } to the error thrown. | ||
[tryRequire(path)] | Tries to require a module, but ignores if it is not found. If not found, result will be null. | ||
[tryResolve(modulePath, options)] | | ||
@@ -169,2 +171,15 @@ | ||
## requireWithInstall(dependency, gasket) | ||
requireWithInstall - load devDependency programmatically when needed | ||
**Kind**: global function | ||
**Returns**: `object` - module | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| dependency | `string` | The require'ed dep needed | | ||
| gasket | `Gasket` | Gasket instance | | ||
## runShellCommand(cmd, \[argv\], \[options\], \[debug\]) | ||
@@ -237,2 +252,13 @@ | ||
``` | ||
## tryResolve(modulePath, options) | ||
**Kind**: global function | ||
**Returns**: `string` - module path | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| modulePath | `string` | Module to import | | ||
| options | `object` | Paths to search for the module | | ||
<!-- LINKS --> | ||
@@ -244,4 +270,6 @@ | ||
[applyEnvironmentOverrides(gasketConfig, config, \[localFile\])]:#applyenvironmentoverridesgasketconfig-config-localfile | ||
[requireWithInstall(dependency, gasket)]:#requirewithinstalldependency-gasket | ||
[runShellCommand(cmd, \[argv\], \[options\], \[debug\])]:#runshellcommandcmd-argv-options-debug | ||
[tryRequire(path)]:#tryrequirepath | ||
[tryResolve(modulePath, options)]:#tryresolvemodulepath-options | ||
[new PackageManager(options)]:#new-packagemanageroptions | ||
@@ -248,0 +276,0 @@ [.exec(cmd, args)]:#packagemanagerexeccmd-args |
const tryRequire = require('./try-require'); | ||
const { tryResolve } = require('./try-resolve'); | ||
const applyConfigOverrides = require('./apply-config-overrides'); | ||
@@ -6,9 +7,12 @@ const applyEnvironmentOverrides = require('./apply-env-overrides'); | ||
const PackageManager = require('./package-manager'); | ||
const requireWithInstall = require('./require-with-install'); | ||
module.exports = { | ||
tryRequire, | ||
tryResolve, | ||
applyConfigOverrides, | ||
applyEnvironmentOverrides, | ||
runShellCommand, | ||
PackageManager | ||
PackageManager, | ||
requireWithInstall | ||
}; |
{ | ||
"name": "@gasket/utils", | ||
"version": "6.34.6", | ||
"version": "6.35.2", | ||
"description": "Reusable utilities for Gasket internals", | ||
@@ -77,3 +77,3 @@ "main": "lib", | ||
], | ||
"gitHead": "17feccb81b98aa7c521ee220484086c495d8d7dd" | ||
"gitHead": "6c8c8a3cf21d602545ba6d24e5ab2270f6cff919" | ||
} |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
30155
13
528
8