
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Library to parse TypeScript config info from a Visual Studio Project file
Queries a Visual Studio project file (.csproj, .vbproj, .njsproj, etc.) for TypeScript configuration information. Will also find default config in a Microsoft.TypeScript.Default.props
file, if referenced by the project.
Visual Studio TypeScript settings are documented on the TypeScript wiki here.
Tested with latest project configuration settings in TypeScript 2.7.
To install, run npm install csproj2ts
.
This module only collects the information. What you do with it after is up to you.
var csproj2ts = require('csproj2ts');
var vsProjInfo = {
ProjectFileName: "path/to/my/project.csproj", // the name and path to the project file
ActiveConfiguration: "Release" // the MSBuild config to query
}
csproj2ts.getTypeScriptSettings(vsProjInfo).then(function (settings) {
console.log(settings.files); // will output the array of files
console.log(settings.RemoveComments); // will output true or false.
console.log(settings.OutDir); // will output the OutDir string or undefined.
console.log(settings); // will output all identified configuration.
});
You must run npm install
to fetch dependencies prior to developing or testing csproj2ts.
To build, run grunt
.
To build and run tests with nodeunit, run grunt test
.
To build, run tests, and launch the demo script, run grunt demo
. (You can also run node demo.js
directly (assumes csproj2ts.csproj
in current folder).)
grunt test
comes back clean.package.json
with the new version number.master
on GitHub.npm publish
.Install Node Inspector via npm:
npm install -g node-inspector
Example command-line to debug a particular test ("test_run_at_all") on Windows:
node-debug --debug-brk "./node_modules/grunt-contrib-nodeunit/node_modules/nodeunit/bin/nodeunit" "tests/tests.js" -t "tests_run_at_all"
Set breakpoints in the Chrome dev tools, or use debugger;
where needed.
The main function of csproj2ts, getTypeScriptSettings(), returns a promise.
In the then() result of the promise, the returned settings object has the following documented properties:
The returned settings object also has the following properties that correspond to the TypeScript configuration settings found in the project file:
FAQs
Library to parse TypeScript config info from a Visual Studio Project file
The npm package csproj2ts receives a total of 17,887 weekly downloads. As such, csproj2ts popularity was classified as popular.
We found that csproj2ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.