Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
A simple set of tools for comparing given and expected results. It is meant to be semantically clear and concise, returning a simple truthy response. This is ideal for testing.
To use jdg throughout your project:
$ npm install --save jdg
To only use jdg for testing, add jdg to your devDependencies and:
$ npm install jdg
A testing example using mocha and shouldjs:
var jdg = require('jdg');
var should = require('should');
describe('GET /users', function() {
it('should include Bob', function() {
var users = someRequest('/users');
jdg.isInArray(users, {name: 'Bob', id: 4}).should.equal(true);
});
});
And an example using jdg outside of your testing suite:
var jdg = require('jdg');
function updateUser(user, attrs, opts) {
attrs.forEach(function(attr) {
if (jdg.isInArray(user.baseAttrs, attr)) {
// do something
}
});
}
Jdg's underlying helpers is
and get
are also exposed for use:
function updateUser(user, attrs, opts) {
if (jdg.is.missing(user)) {
// throw some error
} else {
var userAttrs = judge.get.keys(user);
// do something
}
}
If you're using jdg and find a problem, feel free to report the issue here on Github. This helps determine if an issue has already been reported and if there is a fix already in progress.
FAQs
A set of helpers to compare results and expected results during testing.
We found that jdg 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.