Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@allthings/react-intl-extract-messages
Advanced tools
[![Build Status](https://travis-ci.org/allthings/react-intl-extract-messages.svg?branch=master)](https://travis-ci.org/allthings/react-intl-extract-messages)
Extracts all react-intl
related messages in typescript based projects.
yarn add @allthings/react-intl-extract-messages
Returns an array of messages gathered by babel-plugin-react-intl
.
Type: string
Can be absolute or relative path to the tsconfig file, all information how to build the project is taken from there.
// <projectRoot>/bin/extract-messages.js:
import extractMessages from '@allthings/react-intl-extract-messages'
const messages = extractMessages('../tsconfig.json')
console.log(messages)
// [
// {
// id: 'authorized-clients-list.revoke',
// description: 'Revoke',
// defaultMessage: 'Revoke',
// },
// {
// id: 'authorized-clients-list.terms-of-use',
// description: 'Terms of use',
// defaultMessage: 'Terms of use',
// },
// // ...
// ]
react-intl-extract-messages --tsconfig tsconfig.json --out messages.json
If --out
is omitted, the output will be written to stdout.
Bascially it uses typescript to compile all the files to JS and then uses babel-plugin-react-intl
to extract the messages.
Run tests with yarn run test
.
This will extract messages from a fixture project and check it against a snapshot.
FAQs
Extracts all `react-intl` related messages in typescript based projects.
The npm package @allthings/react-intl-extract-messages receives a total of 210 weekly downloads. As such, @allthings/react-intl-extract-messages popularity was classified as not popular.
We found that @allthings/react-intl-extract-messages demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.