
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A browserify transformer to convert ICU bundles into JSON.
npm install icuify
ICUify will use the icu-converter tool to convert your resource bundles into JSON formats. A simple example is:
browserify -t [ icuify --ext=.txt ] strings/en/messages.txt
However you can also directly include the resource bundle in your JS code:
# test.js
var msgs = require('strings/en/messages.txt');
console.log(msgs);
$ browserify -t [ icuify --ext=.txt ] test.js
If you have multiple resource bundles (for example, different languages), then you can use the require-globify transformer to make your life easy.
Say you have a directory structure like this:
strings/en/messages.txt
strings/fr/messages.txt
Using the require-globify tool you can do the following in your js code:
# test.js
var msgs = require('strings/**/*.txt', { expand: 'hash' });
console.log(msgs);
Then run browserify like so:
$ browserify -t [ icuify --ext=.txt ] -t [ require-globify ] test.js > bundle.js
$ node bundle.js
You will then see output similar to:
{
"en/messsages": {
"root": {
"hello": "Hello"
}
},
"fr/messages": {
"root": {
"hello": "Bon Jour"
}
}
}
The JSON that is created can be used on its own, however if you want to use the pluralization/gender/etc features of the ICU format, you'll have to use another tool that will process them. Recommended is the excellent MessageFormat tool available at: https://github.com/messageformat/messageformat.js
There are two basic examples showing single and multi file usage. Both projects are built using Grunt. To run either one do the following:
$ npm install
$ grunt
$ node cli.js
FAQs
Browserify tool to transform ICU resource bundles to JS objects
We found that icuify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.