Skip to content

Commit

Permalink
Do Not Merge - can-reflect (#81)
Browse files Browse the repository at this point in the history
can-reflect
  • Loading branch information
phillipskevin committed Jun 23, 2017
1 parent 7062ef3 commit f092d27
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
14 changes: 4 additions & 10 deletions can-route.js
Expand Up @@ -20,7 +20,8 @@ var types = require('can-types');
var dev = require('can-util/js/dev/dev');
var diff = require('can-util/js/diff/diff');
var diffObject = require('can-util/js/diff-object/diff-object');

var canReflect = require('can-reflect');
var canSymbol = require('can-symbol');

// ## route.js
// `can-route`
Expand Down Expand Up @@ -923,7 +924,7 @@ Object.defineProperty(canRoute,"data", {
}
},
set: function(data) {
if( types.isConstructor( data ) ){
if( canReflect.isConstructorLike(data) ){
data = new data();
}
// if it's a map, we make it always set strings for backwards compat
Expand All @@ -944,13 +945,6 @@ canRoute.attr = function(){
//Allow for overriding of route batching by can.transaction
canRoute.batch = canBatch;

var oldIsCallableForValue = types.isCallableForValue;
types.isCallableForValue = function(obj){
if(obj === canRoute) {
return false;
} else {
return oldIsCallableForValue.call(this, obj);
}
};
canReflect.setKeyValue(canRoute, canSymbol.for("can.isFunctionLike"), false);

module.exports = namespace.route = canRoute;
26 changes: 14 additions & 12 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "can-route",
"version": "3.0.11",
"version": "3.1.0-pre.6",
"description": "",
"homepage": "",
"repository": {
Expand All @@ -15,11 +15,11 @@
"scripts": {
"preversion": "npm test && npm run build",
"version": "git commit -am \"Update dist for release\" && git checkout -b release && git add -f dist/",
"postversion": "git push --tags && git checkout master && git branch -D release && git push",
"postversion": "git push --tags && git checkout can-reflect && git branch -D release && git push origin can-reflect",
"testee": "testee test/test.html --browsers firefox",
"test": "npm run jshint && npm run testee",
"jshint": "jshint ./*.js --config",
"release:pre": "npm version prerelease && npm publish",
"release:pre": "npm version prerelease && npm publish --tag pre",
"release:patch": "npm version patch && npm publish",
"release:minor": "npm version minor && npm publish",
"release:major": "npm version major && npm publish",
Expand All @@ -39,21 +39,23 @@
]
},
"dependencies": {
"can-compute": "^3.0.0",
"can-compute": "^3.1.0-pre.15",
"can-deparam": "^1.0.1",
"can-event": "^3.0.1",
"can-event": "^3.5.0-pre.2",
"can-namespace": "1.0.0",
"can-observation": "^3.0.1",
"can-observation": "^3.2.0-pre.20",
"can-param": "^1.0.1",
"can-simple-map": "^3.0.0",
"can-types": "^1.0.1",
"can-util": "^3.1.1"
"can-reflect": "^1.0.0-pre.3",
"can-simple-map": "^3.2.0-pre.8",
"can-symbol": "^1.0.0-pre.1",
"can-types": "^1.1.0-pre.3",
"can-util": "^3.9.0-pre.7"
},
"devDependencies": {
"bit-docs": "0.0.7",
"can-define": "^1.0.1",
"can-list": "^3.0.1",
"can-map": "^3.0.3",
"can-define": "^1.2.0-pre.7",
"can-list": "^3.1.0-pre.14",
"can-map": "^3.1.0-pre.16",
"done-serve": "^0.2.0",
"donejs-cli": "^0.9.5",
"generator-donejs": "^0.9.0",
Expand Down

0 comments on commit f092d27

Please sign in to comment.