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

@nx/devkit

Package Overview
Dependencies
Maintainers
4
Versions
848
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nx/devkit - npm Package Compare versions

Comparing version 0.0.0-pr-29703-8312c59 to 0.0.0-pr-29705-bc2a0dd

2

package.json
{
"name": "@nx/devkit",
"version": "0.0.0-pr-29703-8312c59",
"version": "0.0.0-pr-29705-bc2a0dd",
"private": false,

@@ -5,0 +5,0 @@ "description": "The Nx Devkit is used to customize Nx for different technologies and use cases. It contains many utility functions for reading and writing files, updating configuration, working with Abstract Syntax Trees(ASTs), and more. Learn more about [extending Nx by leveraging the Nx Devkit](https://nx.dev/extending-nx/intro/getting-started) on our docs.",

@@ -6,3 +6,3 @@ "use strict";

function updateTsConfigsToJs(tree, options) {
let updateConfigPath;
let updateConfigPath = null;
const paths = {

@@ -13,11 +13,2 @@ tsConfig: `${options.projectRoot}/tsconfig.json`,

};
const getProjectType = (tree) => {
if (tree.exists(paths.tsConfigApp)) {
return 'application';
}
if (tree.exists(paths.tsConfigLib)) {
return 'library';
}
throw new Error(`project is missing tsconfig.lib.json or tsconfig.app.json`);
};
(0, devkit_exports_1.updateJson)(tree, paths.tsConfig, (json) => {

@@ -32,19 +23,23 @@ if (json.compilerOptions) {

});
const projectType = getProjectType(tree);
if (projectType === 'library') {
if (tree.exists(paths.tsConfigLib)) {
updateConfigPath = paths.tsConfigLib;
}
if (projectType === 'application') {
if (tree.exists(paths.tsConfigApp)) {
updateConfigPath = paths.tsConfigApp;
}
(0, devkit_exports_1.updateJson)(tree, updateConfigPath, (json) => {
json.include = uniq([...json.include, 'src/**/*.js']);
json.exclude = uniq([
...json.exclude,
'src/**/*.spec.js',
'src/**/*.test.js',
]);
return json;
});
if (updateConfigPath) {
(0, devkit_exports_1.updateJson)(tree, updateConfigPath, (json) => {
json.include = uniq([...json.include, 'src/**/*.js']);
json.exclude = uniq([
...json.exclude,
'src/**/*.spec.js',
'src/**/*.test.js',
]);
return json;
});
}
else {
throw new Error(`project is missing tsconfig.lib.json or tsconfig.app.json`);
}
}
const uniq = (value) => [...new Set(value)];
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