New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

snap-shot-core

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snap-shot-core - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0

35

package.json
{
"name": "snap-shot-core",
"description": "Save / load named snapshots, useful for tests",
"version": "7.0.0",
"version": "7.1.0",
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",

@@ -74,8 +74,15 @@ "bugs": "https://github.com/bahmutov/snap-shot-core/issues",

"unit": "mocha src/*-spec.js",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"semantic-release": "semantic-release",
"stop-only": "stop-only --folder src"
},
"release": {
"analyzeCommits": "simple-commit-message",
"generateNotes": "github-post-release",
"analyzeCommits": {
"preset": "angular",
"releaseRules": [
{
"type": "break",
"release": "major"
}
]
},
"verifyRelease": {

@@ -90,3 +97,3 @@ "path": "dont-crack",

"ban-sensitive-files": "1.9.2",
"dependency-check": "3.1.0",
"dependency-check": "3.2.0",
"deps-ok": "1.4.1",

@@ -96,4 +103,3 @@ "disparity": "2.0.0",

"git-issues": "1.3.1",
"github-post-release": "1.13.1",
"license-checker": "20.1.0",
"license-checker": "20.2.0",
"mocha": "5.2.0",

@@ -103,8 +109,8 @@ "next-update-travis": "1.7.1",

"pre-git": "3.17.1",
"semantic-release": "7.0.2",
"simple-commit-message": "3.3.2",
"sinon": "5.1.1",
"snap-shot-it": "5.0.1",
"semantic-release": "15.9.10",
"simple-commit-message": "4.0.3",
"sinon": "6.1.5",
"snap-shot-it": "6.0.1",
"standard": "11.0.1",
"stop-only": "2.1.0"
"stop-only": "2.2.1"
},

@@ -117,8 +123,9 @@ "dependencies": {

"folktale": "2.3.0",
"is-ci": "1.1.0",
"is-ci": "1.2.0",
"jsesc": "2.5.1",
"lazy-ass": "1.6.0",
"mkdirp": "0.5.1",
"pluralize": "7.0.0",
"ramda": "0.25.0"
}
}
}

28

src/file-system.js

@@ -11,2 +11,3 @@ 'use strict'

const escapeQuotes = require('escape-quotes')
const pluralize = require('pluralize')

@@ -72,2 +73,15 @@ const removeExtraNewLines = require('./utils').removeExtraNewLines

function prepareFragments (snapshots) {
const fragments = Object.keys(snapshots).sort().map(testName => {
debug(`snapshot name "${testName}"`)
const value = snapshots[testName]
const escapedName = escapeQuotes(testName)
return is.string(value)
? exportText(escapedName, value)
: exportObject(escapedName, value)
})
return fragments
}
// returns snapshot text

@@ -82,10 +96,5 @@ function saveSnapshots (specFile, snapshots, ext) {

const fragments = Object.keys(snapshots).map(testName => {
debug(`snapshot name "${testName}"`)
const value = snapshots[testName]
const escapedName = escapeQuotes(testName)
return is.string(value)
? exportText(escapedName, value)
: exportObject(escapedName, value)
})
const fragments = prepareFragments(snapshots)
debug('have %s', pluralize('fragment', fragments.length, true))
const s = fragments.join('\n')

@@ -146,3 +155,4 @@ fs.writeFileSync(filename, s, 'utf8')

fileForSpec,
exportText
exportText,
prepareFragments
}
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