Socket
Socket
Sign inDemoInstall

load-tsconfig

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

load-tsconfig - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

14

dist/index.js

@@ -126,7 +126,17 @@ var __create = Object.create;

// src/index.ts
var findUp = (name, startDir, stopDir = import_path.default.parse(startDir).root) => {
let dir = startDir;
while (dir !== stopDir) {
const file = import_path.default.join(dir, name);
if (import_fs.default.existsSync(file))
return file;
dir = import_path.default.dirname(dir);
}
return null;
};
var resolveTsConfig = (cwd, name) => {
if (import_path.default.isAbsolute(name))
return name;
return import_fs.default.existsSync(name) ? name : null;
if (name.startsWith("."))
return import_path.default.join(cwd, name);
return findUp(name, cwd);
const id = require.resolve(name, { paths: [cwd] });

@@ -133,0 +143,0 @@ return id;

6

package.json
{
"name": "load-tsconfig",
"version": "0.1.1",
"version": "0.1.2",
"description": "Load tsconfig.json",

@@ -22,4 +22,4 @@ "publishConfig": {

"@egoist/prettier-config": "1.0.0",
"@types/node": "^14.0.0",
"kanpai": "^0.10.1",
"@types/node": "14.18.9",
"kanpai": "0.10.1",
"prettier": "2.5.1",

@@ -26,0 +26,0 @@ "strip-json-comments": "4.0.0",

@@ -30,4 +30,16 @@ **💛 You can help the author become a full-time open-source maintainer by [sponsoring him on GitHub](https://github.com/sponsors/egoist).**

Full documentation: https://paka.dev/npm/load-tsconfig
By default it loads `./tsconfig.json`, but you can use a custom filename:
```ts
loadTsConfig(".", "./tsconfig.build.json")
```
You can also load a package:
```ts
loadTsConfig(".", "my-tsconfig-package")
```
Full type documentation: https://paka.dev/npm/load-tsconfig
## Sponsors

@@ -34,0 +46,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