
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
fixture-riveter
Advanced tools
fixture-riveter is a fixtures replacement library based on thoughtbot's excellent ruby library factory_bot, with some ideas adapted from factory-girl, another javascript library inspired by factory_bot. It's written in Typescript, is fully async, and implements nearly all of factory_bot's features.
It was built for a knex/objection.js codebase and thus the integration with that ORM is the best. It has support for other ORMs through the use of adapters, but some of the features don't work as well or at all with them.
Node.js:
npm install --save-dev fixture-riveter
A complete guide to using fixture-riveter can be found in the guide. For those interested in code first, here is a simple demonstration:
import {fr, ObjectionAdapter} from "fixture-riveter";
fr.setAdapter(new ObjectionAdapter());
fr.fixture(User, (f) => {
f.name(() => "Noah");
f.age(() => 32);
f.sequence("email", (n) => `test${n}@example.com`);
});
const user = await fr.create(User, {name: "Bogart"});
expect(user).to.be.an.instanceof(User);
expect(user.id).to.exist;
expect(user.name).to.equal("Bogart");
expect(user.age).to.equal(32);
expect(user.email).to.equal("test1@example.com");
As this is a very young library, there will be plenty of places it could be improved. No PR is too small, no issue is too weird or out of bounds. Please adhere to our Code of Conduct when participating with this project.
Copyright © 2021 Noah Bogart and Batterii, distributed under the license in LICENSE.
FAQs
Fixture replacement library for Typescript
We found that fixture-riveter 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.