Socket
Socket
Sign inDemoInstall

pkg-types

Package Overview
Dependencies
2
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.2 to 0.2.3

CHANGELOG.md

27

dist/index.d.ts

@@ -161,2 +161,27 @@ import { CompilerOptions, TypeAcquisition } from 'typescript';

interface FindNearestFileOptions {
/**
* The starting directory for the search.
* @default . (same as `process.cwd()`)
*/
startingFrom?: string;
/**
* A pattern to match a path segment above which you don't want to ascend
* @default /^node_modules$/
*/
rootPattern?: RegExp;
/**
* A matcher that can evaluate whether the given path is a valid file (for example,
* by testing whether the file path exists.
*
* @default fs.statSync(path).isFile()
*/
test?: (filePath: string) => boolean | null | Promise<boolean | null>;
}
declare function findNearestFile(filename: string, _options?: FindNearestFileOptions): Promise<string | null>;
declare function findNearestPackageJSON(id?: string): Promise<string | null>;
declare function findNearestTSConfig(id?: string): Promise<string | null>;
declare function readNearestPackageJSON(id?: string): Promise<PackageJson | null>;
declare function readNearestTSConfig(id?: string): Promise<TSConfig | null>;
declare function definePackageJSON(pkg: PackageJson): PackageJson;

@@ -169,2 +194,2 @@ declare function defineTSConfig(tsconfig: TSConfig): TSConfig;

export { PackageJson, PackageJsonPerson, StripEnums, TSConfig, definePackageJSON, defineTSConfig, readPackageJSON, readTSConfig, writePackageJSON, writeTSConfig };
export { FindNearestFileOptions, PackageJson, PackageJsonPerson, StripEnums, TSConfig, definePackageJSON, defineTSConfig, findNearestFile, findNearestPackageJSON, findNearestTSConfig, readNearestPackageJSON, readNearestTSConfig, readPackageJSON, readTSConfig, writePackageJSON, writeTSConfig };

2

package.json
{
"name": "pkg-types",
"version": "0.2.2",
"version": "0.2.3",
"description": "Node.js utilities and TypeScript definitions for `package.json` and `tsconfig.json`",

@@ -5,0 +5,0 @@ "license": "MIT",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc