
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
@aivenio/tsc-output-parser
Advanced tools
Parses errors from tsc output to a structured JSON format.
Converts tsc output:
src/actions.ts(691,20): error TS7006: Parameter 'error' implicitly has an 'any' type.
to JSON:
[
{
"type": "Item",
"value": {
"path": {
"type": "Path",
"value": "src/actions.ts"
},
"cursor": {
"type": "Cursor",
"value": {
"line": 691,
"col": 20
}
},
"tsError": {
"type": "TsError",
"value": {
"type": "error",
"errorString": "TS7006"
}
},
"message": {
"type": "Message",
"value": " Parameter 'error' implicitly has an 'any' type.\n"
}
}
}
]
Install with npm i -g @aivenio/tsc-output-parser.
Via temporary file:
tsc --strict --noEmit > ts.out
tsc-output-parser ts.out > errors.json
By piping:
tsc --strict --noEmit | tsc-output-parser
import { parse } from '@aivenio/tsc-output-parser';
const input = `
src/actions.ts(691,20): error TS7006: Parameter 'error' implicitly has an 'any' type.
`;
const errors = parse(input);
To convert the real.txt test example, clone the repo and run:
npm install
npm run peg
./node_modules/.bin/ts-node src/cli.ts test/inputs/real.txt
To migrate our code base to TypeScript using strict types, we built tooling to track our progress. The parsing could've been done in many (probably easier) ways, but it serves as a good example of using PEG.js to parse text.
FAQs
Parses errors from tsc output to a structured JSON format.
The npm package @aivenio/tsc-output-parser receives a total of 31,465 weekly downloads. As such, @aivenio/tsc-output-parser popularity was classified as popular.
We found that @aivenio/tsc-output-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.