can-map-define
Advanced tools
Comparing version 4.1.1 to 4.2.0
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var stealTools = require("steal-tools"); | ||
@@ -2,0 +3,0 @@ |
/* jshint asi: false */ | ||
var QUnit = require('steal-qunit'); | ||
var string = require('can-util/js/string/string'); | ||
var sub = require('can-key/sub/sub'); | ||
var CanMap = require('can-map'); | ||
@@ -877,5 +877,5 @@ var List = require('can-list'); | ||
}; | ||
equal(newVal, expectedNewVal, string.sub(message, subs)); | ||
equal(newVal, expectedNewVal, sub(message, subs)); | ||
subs.prop = 'oldVal'; | ||
equal(oldVal, expectedOldVal, string.sub(message, subs)); | ||
equal(oldVal, expectedOldVal, sub(message, subs)); | ||
}; | ||
@@ -882,0 +882,0 @@ }; |
@@ -1,4 +0,5 @@ | ||
var dev = require('can-util/js/dev/dev'); | ||
var extend = require('can-util/js/assign/assign'); | ||
var isPlainObject = require('can-util/js/is-plain-object/is-plain-object'); | ||
"use strict"; | ||
var dev = require('can-log/dev/dev'); | ||
var extend = require('can-assign'); | ||
var mapEventsMixin = require('can-event-queue/map/map'); | ||
@@ -40,5 +41,7 @@ var queues = require('can-queues'); | ||
//!steal-remove-start | ||
if (Map.define) { | ||
dev.warn("The define property should be on the map's prototype properties, " + | ||
"not the static properties."); | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (Map.define) { | ||
dev.warn("The define property should be on the map's prototype properties, " + | ||
"not the static properties."); | ||
} | ||
} | ||
@@ -132,3 +135,5 @@ //!steal-remove-end | ||
//!steal-remove-start | ||
clearTimeout(asyncTimer); | ||
if (process.env.NODE_ENV !== 'production') { | ||
clearTimeout(asyncTimer); | ||
} | ||
//!steal-remove-end | ||
@@ -166,3 +171,5 @@ | ||
//!steal-remove-start | ||
clearTimeout(asyncTimer); | ||
if (process.env.NODE_ENV !== 'production') { | ||
clearTimeout(asyncTimer); | ||
} | ||
//!steal-remove-end | ||
@@ -183,5 +190,7 @@ }, errorCallback, getter ? this._computedAttrs[prop].compute.computeInstance.lastSetValue.get() : current); | ||
//!steal-remove-start | ||
asyncTimer = setTimeout(function() { | ||
dev.warn('can/map/define: Setter "' + prop + '" did not return a value or call the setter callback.'); | ||
}, dev.warnTimeout); | ||
if (process.env.NODE_ENV !== 'production') { | ||
asyncTimer = setTimeout(function() { | ||
dev.warn('can/map/define: Setter "' + prop + '" did not return a value or call the setter callback.'); | ||
}, dev.warnTimeout); | ||
} | ||
//!steal-remove-end | ||
@@ -291,3 +300,3 @@ queues.batch.stop(); | ||
// If we pass in a object with define | ||
else if (isPlainObject(newValue) && newValue.define) { | ||
else if (canReflect.isPlainObject(newValue) && newValue.define) { | ||
newValue = CanMap.extend(newValue); | ||
@@ -294,0 +303,0 @@ newValue = new newValue(); |
{ | ||
"name": "can-map-define", | ||
"version": "4.1.1", | ||
"version": "4.2.0", | ||
"description": "Define rich attribute behavior", | ||
@@ -38,3 +38,5 @@ "homepage": "https://canjs.com", | ||
"dependencies": { | ||
"can-assign": "^1.1.1", | ||
"can-compute": "^4.0.3", | ||
"can-log": "^1.0.0", | ||
"can-event-queue": "^1.0.1", | ||
@@ -44,4 +46,3 @@ "can-list": "^4.0.0", | ||
"can-queues": "^1.0.1", | ||
"can-reflect": "^1.15.2", | ||
"can-util": "^3.9.0" | ||
"can-reflect": "^1.15.2" | ||
}, | ||
@@ -51,2 +52,3 @@ "devDependencies": { | ||
"can-component": "^4.0.4", | ||
"can-key": "<2.0.0", | ||
"can-route": "^4.1.1", | ||
@@ -60,4 +62,4 @@ "can-stache": "^4.1.3", | ||
"steal-tools": "^1.1.2", | ||
"testee": "^0.7.0" | ||
"testee": "^0.8.0" | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
80882
1667
8
12
4
1
+ Addedcan-assign@^1.1.1
+ Addedcan-log@^1.0.0
- Removedcan-util@^3.9.0
- Removedcan-ajax@1.4.1(transitive)
- Removedcan-deparam@1.2.3(transitive)
- Removedcan-dom-data-state@0.2.0(transitive)
- Removedcan-event-dom-enter@1.0.4(transitive)
- Removedcan-event-dom-radiochange@1.0.5(transitive)
- Removedcan-param@1.2.0(transitive)
- Removedcan-parse-uri@1.2.2(transitive)
- Removedcan-util@3.14.0(transitive)