Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

regedit

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regedit - npm Package Compare versions

Comparing version
2.2.4
to
2.2.5
+41
test/issues.test.js
// TODO need to find a better way to test the 32bit/64bit specific scenarios
var index = require('../index')
var should = require('should')
describe('regedit', function () {
var baseKey = 'HKCU\\software\\ironSource\\regedit\\issues-test\\'
var key
// this test fails with a timeout because putValue callback is never invoked
it('putValue with empty string for value fails silently #8', function (done) {
index.createKey(key, function (err) {
if (err) return done(err)
var values = {}
values[key] = { 'valName': { value: '', type: 'REG_SZ' }}
index.putValue(values, function (err) {
if (err) return done(err)
index.list(key, function(err, results) {
if (err) return done(err)
results.should.have.property(key)
.which.have.property('values')
.which.have.property('valName')
.which.have.property('value', '')
done()
})
})
})
})
beforeEach(function () {
key = baseKey + Date.now()
})
})
+14
-7

@@ -51,3 +51,3 @@ var util = require('util')

if (typeof callback === 'function') {
if (typeof callback === 'function') {
execute(toCommandArgs('regList.wsf', architecture, keys), callback)

@@ -122,4 +122,4 @@ } else {

var values = []
for (var key in map) {
for (var key in map) {
var keyValues = map[key]

@@ -247,3 +247,4 @@

handleErrorsAndClose(child, callback)
handleErrorsAndClose(child, callback)
helper.writeArrayToStream(keys, child.stdin)

@@ -300,2 +301,8 @@ })

case 'REG_SZ':
if (value === '') {
return '\0'
}
return value
default:

@@ -309,8 +316,8 @@ return value

var result = baseCommand(cmd, arch)
if (typeof keys === 'string') {
if (typeof keys === 'string') {
result.push(keys)
} else if (util.isArray(keys)) {
} else if (util.isArray(keys)) {
result = result.concat(keys)
} else {
debug('creating command without using keys %s', keys ? keys : '')
debug('creating command without using keys %s', keys ? keys : '')
}

@@ -317,0 +324,0 @@

@@ -20,3 +20,3 @@ var debug = require('debug')('regedit')

function write(m) {
if (m) {
if (m !== undefined) {
var b = module.exports.encode(m)

@@ -26,2 +26,4 @@ debug(b)

}
return false
}

@@ -28,0 +30,0 @@

{
"name": "regedit",
"version": "2.2.4",
"version": "2.2.5",
"description": "Read, Write, List and do all sorts of funky stuff to the windows registry using node.js and windows script host",

@@ -5,0 +5,0 @@ "keywords": [

var should = require('should')
var index = require('../index')
describe('benchmark test', function (done) {
describe.skip('benchmark test', function (done) {
this.timeout(40000)

@@ -12,3 +12,3 @@

it.only('create', function (done) {
it('create', function (done) {

@@ -15,0 +15,0 @@ console.time('start create')