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

generify

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generify - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

test/fixtures/init-expected/__init__.py

13

generify.js

@@ -17,2 +17,8 @@ #!/usr/bin/env node

var keys = Object.keys(data)
var copyFilesAsNamed = data.copyAsNamed
if (copyFilesAsNamed) {
delete data.copyAsNamed
} else {
copyFilesAsNamed = []
}

@@ -31,3 +37,8 @@ // needed for the path replacing to work

.on('file', function (file) {
var relativePath = path.relative(source, file).replace(/^__/, '.')
var relativePath
if (copyFilesAsNamed.includes(path.basename(file))) {
relativePath = path.relative(source, file)
} else {
relativePath = path.relative(source, file).replace(/^__/, '.')
}
var destFile = path.join(dest, relativePath)

@@ -34,0 +45,0 @@

6

package.json
{
"name": "generify",
"version": "2.1.0",
"version": "3.0.0",
"description": "A reusable project generator",

@@ -33,3 +33,3 @@ "main": "generify.js",

"standard": "^11.0.0",
"tap": "^11.1.1"
"tap": "^12.0.0"
},

@@ -39,5 +39,5 @@ "dependencies": {

"pump": "^3.0.0",
"split2": "^0.2.1",
"split2": "^2.0.0",
"walker": "^1.0.6"
}
}

@@ -49,2 +49,7 @@ # generify  [![Build Status](https://travis-ci.org/mcollina/generify.svg?branch=master)](https://travis-ci.org/mcollina/generify)

If the supplied `data` has a key `copyAsNamed`, with an array of names, then
the filenames in that list will not be processed through this rule. Each file
name in the list should not include a path,
e.g. `['__do-not-replace-underscores.js']`.
## Executable

@@ -51,0 +56,0 @@

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

if (fixture === 'init') {
data.copyAsNamed = ['__init__.py']
}
var expectedSet = new Set(Object.keys(expected).map(f => f.replace(/^\//, '')))

@@ -67,0 +71,0 @@

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

if (fixture === 'init') {
data.copyAsNamed = ['__init__.py']
}
generify(path.join(base, fixture), dest, data, function (err) {

@@ -67,0 +71,0 @@ t.notOk(err, 'no error')

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