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
1017
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

to
0.0.0-pr-29408-73bb882

2

package.json
{
"name": "@nx/devkit",
"version": "0.0.0-pr-29314-e664f92",
"version": "0.0.0-pr-29408-73bb882",
"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)];

@@ -58,4 +58,8 @@ "use strict";

// Errors are okay for this because we're only running 1 plugin
if (e instanceof devkit_internals_1.ProjectConfigurationsError) {
if ((0, devkit_internals_1.isProjectConfigurationsError)(e)) {
projConfigs = e.partialProjectConfigurationsResult;
// ignore errors from projects with no name
if (!e.errors.every(devkit_internals_1.isProjectsWithNoNameError)) {
throw e;
}
}

@@ -93,4 +97,8 @@ else {

// Errors are okay for this because we're only running 1 plugin
if (e instanceof devkit_internals_1.ProjectConfigurationsError) {
if ((0, devkit_internals_1.isProjectConfigurationsError)(e)) {
projConfigs = e.partialProjectConfigurationsResult;
// ignore errors from projects with no name
if (!e.errors.every(devkit_internals_1.isProjectsWithNoNameError)) {
throw e;
}
}

@@ -135,2 +143,3 @@ else {

let hasChanges = false;
targetCommands.sort((a, b) => b.command.split(/\s/).length - a.command.split(/\s/).length);
for (const targetCommand of targetCommands) {

@@ -202,3 +211,4 @@ const { command, target, configuration } = targetCommand;

// they are the same, replace with the command removing the args
packageJson.scripts[scriptName] = packageJson.scripts[scriptName].replace(match, match.replace(commandRegex, configuration
const script = packageJson.scripts[scriptName];
packageJson.scripts[scriptName] = script.replace(match, match.replace(commandRegex, configuration
? `$1nx ${target} --configuration=${configuration}$4`

@@ -205,0 +215,0 @@ : `$1nx ${target}$4`));

@@ -5,3 +5,4 @@ export interface AsyncPushCallbacks<T> {

error: (err: unknown) => void;
registerCleanup?: (cb: () => void | Promise<void>) => void;
}
export declare function createAsyncIterable<T = unknown>(listener: (ls: AsyncPushCallbacks<T>) => void): AsyncIterable<T>;

@@ -7,2 +7,3 @@ "use strict";

let error = null;
let cleanup;
const pushQueue = [];

@@ -37,2 +38,5 @@ const pullQueue = [];

},
registerCleanup: (cb) => {
cleanup = cb;
},
});

@@ -56,2 +60,8 @@ return {

},
async return() {
if (cleanup) {
await cleanup();
}
return { value: undefined, done: true };
},
};

@@ -58,0 +68,0 @@ },

@@ -194,2 +194,3 @@ "use strict";

'.rip',
'.riv',
'.rlc',

@@ -196,0 +197,0 @@ '.rmf',

@@ -1,1 +0,1 @@

export declare const typescriptVersion = "~5.6.2";
export declare const typescriptVersion = "~5.7.2";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.typescriptVersion = void 0;
exports.typescriptVersion = '~5.6.2';
exports.typescriptVersion = '~5.7.2';

Sorry, the diff of this file is not supported yet