Socket
Socket
Sign inDemoInstall

config-file-ts

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

config-file-ts - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

2

dist/compileUtil.d.ts

@@ -23,2 +23,2 @@ /** Return true if any files need compiling */

*/
export declare function compileConfigIfNecessary(tsFile: string, outDir: string): string | undefined;
export declare function compileConfigIfNecessary(tsFile: string, outDir: string, strict?: boolean): string | undefined;

@@ -161,3 +161,3 @@ 'use strict';

*/
function compileConfigIfNecessary(tsFile, outDir) {
function compileConfigIfNecessary(tsFile, outDir, strict = false) {
if (!fs__default['default'].existsSync(tsFile)) {

@@ -167,3 +167,3 @@ console.error("config file:", tsFile, " not found");

}
const success = compileIfNecessary([tsFile], outDir);
const success = compileIfNecessary([tsFile], outDir, strict);
if (!success) {

@@ -170,0 +170,0 @@ return undefined;

{
"name": "config-file-ts",
"version": "0.2.2",
"version": "0.2.3",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -141,3 +141,4 @@ import glob from "glob";

tsFile: string,
outDir: string
outDir: string,
strict = true
): string | undefined {

@@ -149,3 +150,3 @@ if (!fs.existsSync(tsFile)) {

const success = compileIfNecessary([tsFile], outDir);
const success = compileIfNecessary([tsFile], outDir, strict);
if (!success) {

@@ -152,0 +153,0 @@ return undefined;

@@ -14,6 +14,7 @@ import { compileConfigIfNecessary } from "./compileUtil";

tsFile: string,
outDir?: string
outDir?: string,
strict = true
): T | undefined {
const realOutDir = outDir || defaultOutDir(tsFile, "config-file-ts");
const jsConfig = compileConfigIfNecessary(tsFile, realOutDir);
const jsConfig = compileConfigIfNecessary(tsFile, realOutDir, strict);
if (!jsConfig) {

@@ -20,0 +21,0 @@ return undefined;

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