
Security News
npm v12 Ships With Install Scripts Off by Default, Begins Deprecating 2FA-Bypass Tokens
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.
smartweave-testing
Advanced tools
A testing client for SmartWeave contracts. You can execute any kind of interactWrite input against your contract. It does not require any connection to Arweave.
This enables fast and reliable testing. The new state
of the contract will be stored and by this enabling multi input testing.
yarn add --dev smartweave-testing
import SmartWeaveTester from "smartweave-testing"
import { handle } from [my-contract]
const caller = "..." // -> e.g your Arweave Address
const initialState = {}
const smartweave = new SmartWeaveTester(handle, initialState, caller)
input = { function: "my_function" };
result = await smartweave.execute(input); // -> state of the contract
In case you don't want to update the state of your contract use execute({}, false)
If your contract uses SmartWeave.block.height, the client will make use of it's internal block logic.
Every time you execute an action, the block height will increase by 1. You can use
smartweave.block.height = ... to manually adjust the block height.
import SmartWeaveTester from "smartweave-testing"
import { handle } from [my-contract]
const caller = "..." // -> e.g your Arweave Address
const initialState = {
balances: {}
}
const smartweave = new SmartWeaveTester(handle, initialState, caller)
let input, result;
// the dispense function increases the callers balance by 100
input = { function: "dispense" };
result = await smartweave.execute(input);
if (result.balances[caller] !== 100) throw Error("Dispense does not work")
// be rerunning the action, the old state is preserved and get's updated
input = { function: "dispense" };
result = await smartweave.execute(input);
if (result.balances[caller] !== 200) throw Error("Dispense does not work")
FAQs
A testing client for SmartWeave contracts.
The npm package smartweave-testing receives a total of 4 weekly downloads. As such, smartweave-testing popularity was classified as not popular.
We found that smartweave-testing 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
npm v12 is generally available, turning install scripts off by default and beginning the deprecation of 2FA-bypass publishing tokens.

Research
/Security News
Socket tracks the activity as Operation “Muck and Load”: a threat actor uses commit-farming workflows, public dead drops, and protected archives to stage Windows RAT and infostealer malware.

Security News
pnpm 11.10 hardens registry auth to block token redirection, tightens pack-app and deploy, and makes the Rust port (v12) installable.