New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cli-helpers

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-helpers - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

9

dist/file.d.ts
/**
* @description look for the file from the current or parent directory recursively
* @description look for the file from the given directory or parent directory recursively
* @example
* ```
* let file = resolveFile('package.json')
* let file = resolveFile({ dir: __dirname, filename: 'package.json' })
* let pkg = readJSONFile(file)
* ```
*/
export declare function resolveFile(filename: string): string;
export declare function resolveFile(args: {
dir: string;
filename: string;
}): string;
/**

@@ -11,0 +14,0 @@ * @description read file as json data

@@ -10,11 +10,11 @@ "use strict";

/**
* @description look for the file from the current or parent directory recursively
* @description look for the file from the given directory or parent directory recursively
* @example
* ```
* let file = resolveFile('package.json')
* let file = resolveFile({ dir: __dirname, filename: 'package.json' })
* let pkg = readJSONFile(file)
* ```
*/
function resolveFile(filename) {
let dir = __dirname;
function resolveFile(args) {
let { dir, filename } = args;
for (;;) {

@@ -21,0 +21,0 @@ let file = (0, path_1.join)(dir, filename);

{
"name": "cli-helpers",
"version": "1.1.0",
"version": "1.1.1",
"description": "Helper library for building cli applications",

@@ -5,0 +5,0 @@ "keywords": [

@@ -69,10 +69,10 @@ # cli-helpers

/**
* @description look for the file from the current or parent directory recursively
* @description look for the file from the given directory or parent directory recursively
* @example
* ```
* let file = resolveFile('package.json')
* let file = resolveFile({ dir: __dirname, filename: 'package.json' })
* let pkg = readJSONFile(file)
* ```
*/
export function resolveFile(filename: string): string
export function resolveFile(args: { dir: string; filename: string }): string

@@ -79,0 +79,0 @@ /**

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