supertest-session
Advanced tools
Comparing version 1.0.0 to 1.0.1
20
index.js
var cookie = require('cookie'), | ||
methods = require('methods'), | ||
request = require('supertest'); | ||
request = require('supertest'), | ||
util = require('util'); | ||
@@ -25,2 +26,11 @@ // A/V pairs defined for Set-Cookie in RFC-6265 | ||
function assignEnvs (envs) { | ||
Object.keys(envs).forEach(function(e) { | ||
process.env[e] = envs[e]; | ||
}); | ||
} | ||
var deprecatedAssignEnvs = util.deprecate(assignEnvs, | ||
'supertest-session env configuration is deprecated and will be removed in next version.'); | ||
module.exports = function (config) { | ||
@@ -34,5 +44,3 @@ | ||
if (config.envs && (config.envs instanceof Object)) { | ||
Object.keys(config.envs).forEach(function(e) { | ||
process.env[e] = config.envs[e]; | ||
}); | ||
deprecatedAssignEnvs(config.envs); | ||
} | ||
@@ -85,4 +93,4 @@ } | ||
// Back-compatibility only; will be removed in future version bump. | ||
Session.prototype.del = Session.prototype.delete; | ||
Session.prototype.del = util.deprecate(Session.prototype.delete, | ||
'Session.del is deprecated; please use Session.delete'); | ||
@@ -89,0 +97,0 @@ if (config.helpers instanceof Object) { |
{ | ||
"name": "supertest-session", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Cookie-based session persistence for Supertest", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "./node_modules/jshint/bin/jshint .", | ||
"test": "npm run lint && ./node_modules/jasmine-node/bin/jasmine-node test", | ||
"cover": "./node_modules/istanbul/lib/cli.js cover ./node_modules/jasmine-node/bin/jasmine-node ./spec/ && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" | ||
"lint": "jshint .", | ||
"pretest": "npm run lint", | ||
"test": "jasmine-node test", | ||
"cover": "istanbul cover jasmine-node test" | ||
}, | ||
@@ -43,5 +44,4 @@ "repository": { | ||
"jasmine-node": "^1.14.5", | ||
"jshint": "^2.5.10", | ||
"through": "^2.3.6" | ||
"jshint": "^2.5.10" | ||
} | ||
} |
@@ -1,3 +0,2 @@ | ||
var tr = require('through'), | ||
assert = require('assert'), | ||
var assert = require('assert'), | ||
app = require('./app'), | ||
@@ -4,0 +3,0 @@ session = require('../index'); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11062
7
14
189