Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tsc-hooks

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsc-hooks - npm Package Compare versions

Comparing version 1.1.1-dev.20210905.5 to 1.1.1-dev.20210905.6

19

lib/injection.js

@@ -31,4 +31,21 @@ const fs = require('fs');

// Create TSC Hook API
const ignoredConfigOptions = [ 'save', 'ignore', 'path', 'directory' ];
const api = {
tsconfig: createTSConfigAPI(tsconfig, tsconfigPath)
tsconfig: {
...tsconfig,
save: function() {
const tsconfigCopy = { ...api.tsconfig };
for (const ignoredConfigOption of ignoredConfigOptions) {
eval(`delete tsconfigCopy.${ignoredConfigOption}`);
}
fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfigCopy, null, 2));
},
ignore: function(configOption) {
ignoredConfigOptions.add(configOption);
api.tsconfig.save();
},
path: tsconfigPath,
directory: tsconfigDir
}
};

@@ -35,0 +52,0 @@

2

package.json
{
"name": "tsc-hooks",
"version": "1.1.1-dev.20210905.5",
"version": "1.1.1-dev.20210905.6",
"description": "Add tsc compiler hooks to your TypeScript project",

@@ -5,0 +5,0 @@ "main": "run.js",

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