
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
jest-transform-yaml
Advanced tools
A Jest transformer that allows the import of YAML files
When you store your data in YAML format for your application, you might want to import that data within your Jest tests. By default, Jest does not know how to import YAML files, so you will need to provide a transformer
NOTE: I generally recommend saving exact
dependencies to avoid
accidental/unintentional updates, hence the added flags below.
# NPM
npm install jest-transform-yaml --save-dev
# Yarn
yarn add jest-transform-yaml --dev --exact
# PNPM
pnpm add jest-transform-yaml --save-dev --save-exact
In your jest.config.js
(or jest.config.ts
) file, add
the following:
{
// ... config
transform: {
// ... other transforms
"\\.yaml$": "jest-transform-yaml",
},
"moduleFileExtensions": [/* ... other file extensions ... */, "yaml"],
}
v0.1.1 (Thu Jul 29 2021)
main
FAQs
Transforms for YAML within Jest
The npm package jest-transform-yaml receives a total of 6,967 weekly downloads. As such, jest-transform-yaml popularity was classified as popular.
We found that jest-transform-yaml demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.