Socket
Socket
Sign inDemoInstall

synp

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

synp - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

.gitattributes

4

index.js

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

const lockfile = require('@yarnpkg/lockfile')
const eol = require('eol')
const nmtree = require('nmtree')

@@ -16,3 +17,4 @@ const { buildYarnTree, buildNpmTree } = require('./lib/tree')

)
const yarnObject = lockfile.parse(yarnLock).object
const yarnLockNormalized = eol.auto(yarnLock)
const yarnObject = lockfile.parse(yarnLockNormalized).object
const nodeModulesTree = nmtree(packageDir)

@@ -19,0 +21,0 @@ const dependencies = buildNpmTree(nodeModulesTree, yarnObject)

{
"name": "synp",
"version": "1.1.0",
"version": "1.2.0",
"description": "Convert yarn.lock to package-lock.json and vice versa",

@@ -33,2 +33,3 @@ "keywords": [

"commander": "^2.11.0",
"eol": "^0.9.1",
"nmtree": "^1.0.3"

@@ -35,0 +36,0 @@ },

@@ -217,2 +217,19 @@ 'use strict'

test('translate yarn.lock to package-lock with crlf line ending', async t => {
try {
t.plan(1)
const path = `${__dirname}/fixtures/yarn-crlf`
const packageLock = fs.readFileSync(`${path}/.package-lock-snapshot.json`, 'utf-8')
const res = yarnToNpm(path)
t.deepEquals(
JSON.parse(res),
JSON.parse(packageLock),
'result is equal to package-lock.json snapshot'
)
} catch (e) {
t.fail(e.stack)
t.end()
}
})
test('translate corrupted package-lock to yarn.lock', async t => {

@@ -219,0 +236,0 @@ try {

Sorry, the diff of this file is not supported yet

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