Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ava

Package Overview
Dependencies
Maintainers
2
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ava - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

4

lib/runner.js

@@ -227,4 +227,4 @@ import process from 'node:process';

saveSnapshotState() {
return {touchedFiles: this.snapshots.save()};
async saveSnapshotState() {
return {touchedFiles: await this.snapshots.save()};
}

@@ -231,0 +231,0 @@

@@ -185,4 +185,4 @@ import {Buffer} from 'node:buffer';

function encodeSnapshots(snapshotData) {
const encoded = cbor.encodeOne(snapshotData, {
async function encodeSnapshots(snapshotData) {
const encoded = await cbor.encodeAsync(snapshotData, {
omitUndefinedProperties: true,

@@ -355,3 +355,3 @@ canonical: true,

save() {
async save() {
const {dir, relFile, snapFile, snapPath, reportPath} = this;

@@ -376,11 +376,13 @@

const buffer = encodeSnapshots(snapshots);
const buffer = await encodeSnapshots(snapshots);
const reportBuffer = generateReport(relFile, snapFile, snapshots);
fs.mkdirSync(dir, {recursive: true});
await fs.promises.mkdir(dir, {recursive: true});
const temporaryFiles = [];
const tmpfileCreated = file => temporaryFiles.push(file);
writeFileAtomic.sync(snapPath, buffer, {tmpfileCreated});
writeFileAtomic.sync(reportPath, reportBuffer, {tmpfileCreated});
await Promise.all([
writeFileAtomic(snapPath, buffer, {tmpfileCreated}),
writeFileAtomic(reportPath, reportBuffer, {tmpfileCreated}),
]);
return {

@@ -387,0 +389,0 @@ changedFiles: [snapPath, reportPath],

@@ -84,3 +84,3 @@ import {createRequire} from 'node:module';

try {
const {touchedFiles} = runner.saveSnapshotState();
const {touchedFiles} = await runner.saveSnapshotState();
if (touchedFiles) {

@@ -87,0 +87,0 @@ channel.send({type: 'touched-files', files: touchedFiles});

{
"name": "ava",
"version": "4.0.0",
"version": "4.0.1",
"description": "Node.js test runner that lets you develop with confidence.",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc