
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@5stones/onix
Advanced tools
A strongly typed library for parsing ONIX feeds.
At a high level, you can pass an XML string into the parse
function which
will return an object of type ONIXMessageRoot
.
import { parse } from '@5stones/onix';
const someONIXMessage = '...';
const parsed = parse(someONIXMessage);
There are also numerous interfaces, enums, and other data that can be used for strong typing and parsing (e.g. BISAC data).
There are also the following helpers for dealing with BISAC:
import {
getBISACLabelsForCode,
getBISACCodeForLabel,
getBISACAncestorForCode,
type BISACNode,
} from '@5stones/onix';
const labels: string[] = getBISACLabelsForCode('...');
const code: string = getBISACCodeForLabel('...');
const ancestor: BISACNode | undefined = getBISACAncestorForCode('...');
If you need to update the BISAC codes/labels and/or the ONIX enums you can use the two scraper scripts that scrape the relevant documentation websites and generate the code:
yarn generate:bisac
yarn generate:onix-enums
The standard release command for this project is:
yarn version [--new-version <newversion> | major | minor | patch ]
This command will:
e.g.
yarn version --new-version 1.2.17
yarn version patch // 1.2.17 -> 1.2.18
FAQs
A strongly typed library for parsing ONIX feeds.
We found that @5stones/onix demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.