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

@nx-dotnet/utils

Package Overview
Dependencies
Maintainers
1
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nx-dotnet/utils - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2-dev.1

2

package.json

@@ -9,3 +9,3 @@ {

},
"version": "0.1.1"
"version": "0.1.2-dev.1"
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getProjectFileForNxProjectSync = exports.getProjectFileForNxProject = void 0;
exports.getDependantProjectsForNxProject = exports.getProjectFileForNxProjectSync = exports.getProjectFileForNxProject = void 0;
const tslib_1 = require("tslib");
const glob_1 = require("./glob");
const fs_1 = require("fs");
const xmldoc_1 = require("xmldoc");
const path_1 = require("path");
function getProjectFileForNxProject(project) {

@@ -18,2 +21,29 @@ return tslib_1.__awaiter(this, void 0, void 0, function* () {

exports.getProjectFileForNxProjectSync = getProjectFileForNxProjectSync;
function getDependantProjectsForNxProject(targetProject, workspaceConfiguration, forEachCallback) {
const projectRoots = {};
const dependantProjects = {};
Object.entries(workspaceConfiguration.projects).forEach(([name, project]) => {
projectRoots[name] = path_1.resolve(project.root);
});
const netProjectFilePath = getProjectFileForNxProjectSync(workspaceConfiguration.projects[targetProject]);
const xml = new xmldoc_1.XmlDocument(fs_1.readFileSync(netProjectFilePath).toString());
xml.childrenNamed('ItemGroup').forEach((itemGroup) => itemGroup.childrenNamed('ProjectReference').forEach((x) => {
const includeFilePath = x.attr['Include'];
let absoluteFilePath;
if (path_1.isAbsolute(includeFilePath)) {
absoluteFilePath = includeFilePath;
}
else {
absoluteFilePath = path_1.resolve(netProjectFilePath.split('/').slice(0, -1).join('/'), includeFilePath);
}
Object.entries(projectRoots).forEach(([dependency, path]) => {
if (absoluteFilePath.startsWith(path)) {
forEachCallback(workspaceConfiguration.projects[dependency], dependency);
dependantProjects[dependency] = workspaceConfiguration.projects[dependency];
}
});
}));
return dependantProjects;
}
exports.getDependantProjectsForNxProject = getDependantProjectsForNxProject;
//# sourceMappingURL=workspace.js.map

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