Skip to content

Commit 9dac9a6

Browse files
committed
release v0.3.5
1 parent e4dafdd commit 9dac9a6

File tree

5 files changed

+21
-308
lines changed

5 files changed

+21
-308
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
v0.3.5
2+
Wed, 23 Jul 2014 14:52:30 GMT
3+
4+
0a7298c [removed] browserify.transforms from package.json
5+
ebf54ab [removed] Dependency on react/lib/merge
6+
7+
18
v0.3.4
29
Tue, 22 Jul 2014 21:02:48 GMT
310

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-nested-router",
3-
"version": "0.3.4",
3+
"version": "0.3.5",
44
"homepage": "https://github.com/rpflorence/react-nested-router",
55
"authors": [
66
"Ryan Florence",

dist/react-router.js

Lines changed: 10 additions & 304 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function Router(route) {
1818

1919
module.exports = Router;
2020

21-
},{"react/lib/warning":54}],2:[function(_dereq_,module,exports){
21+
},{"react/lib/warning":50}],2:[function(_dereq_,module,exports){
2222
var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null);
2323
var ActiveState = _dereq_('../mixins/ActiveState');
2424
var withoutProperties = _dereq_('../helpers/withoutProperties');
@@ -625,8 +625,10 @@ function computeHandlerProps(matches, query) {
625625
}
626626

627627
childHandler = function (props, addedProps) {
628-
var children = Array.prototype.slice.call(arguments, 2);
629-
return route.props.handler.apply(null, [ mergeProperties(props, addedProps) ].concat(children));
628+
if (arguments.length > 2 && typeof arguments[2] !== 'undefined')
629+
throw new Error('Passing children to a route handler is not supported');
630+
631+
return route.props.handler(mergeProperties(props, addedProps));
630632
}.bind(this, props);
631633
});
632634

@@ -639,10 +641,10 @@ function reversedArray(array) {
639641

640642
module.exports = Route;
641643

642-
},{"../helpers/Path":4,"../helpers/goBack":6,"../helpers/mergeProperties":9,"../helpers/replaceWith":10,"../helpers/transitionTo":11,"../helpers/withoutProperties":12,"../stores/ActiveStore":15,"../stores/RouteStore":16,"../stores/URLStore":17,"es6-promise":21,"react/lib/ExecutionEnvironment":46,"react/lib/emptyFunction":48,"react/lib/invariant":49,"react/lib/warning":54}],4:[function(_dereq_,module,exports){
644+
},{"../helpers/Path":4,"../helpers/goBack":6,"../helpers/mergeProperties":9,"../helpers/replaceWith":10,"../helpers/transitionTo":11,"../helpers/withoutProperties":12,"../stores/ActiveStore":15,"../stores/RouteStore":16,"../stores/URLStore":17,"es6-promise":21,"react/lib/ExecutionEnvironment":46,"react/lib/emptyFunction":48,"react/lib/invariant":49,"react/lib/warning":50}],4:[function(_dereq_,module,exports){
643645
var invariant = _dereq_('react/lib/invariant');
644-
var merge = _dereq_('react/lib/merge');
645646
var qs = _dereq_('querystring');
647+
var mergeProperties = _dereq_('./mergeProperties');
646648
var URL = _dereq_('./URL');
647649

648650
var paramMatcher = /((?::[a-z_$][a-z0-9_$]*)|\*)/ig;
@@ -759,7 +761,7 @@ var Path = {
759761
var existingQuery = Path.extractQuery(path);
760762

761763
if (existingQuery)
762-
query = query ? merge(existingQuery, query) : existingQuery;
764+
query = query ? mergeProperties(existingQuery, query) : existingQuery;
763765

764766
var queryString = query && qs.stringify(query);
765767

@@ -780,7 +782,7 @@ var Path = {
780782

781783
module.exports = Path;
782784

783-
},{"./URL":5,"querystring":20,"react/lib/invariant":49,"react/lib/merge":51}],5:[function(_dereq_,module,exports){
785+
},{"./URL":5,"./mergeProperties":9,"querystring":20,"react/lib/invariant":49}],5:[function(_dereq_,module,exports){
784786
var urlEncodedSpaceRE = /\+/g;
785787
var encodedSpaceRE = /%20/g;
786788

@@ -1362,7 +1364,7 @@ var URLStore = {
13621364

13631365
module.exports = URLStore;
13641366

1365-
},{"event-emitter":31,"react/lib/ExecutionEnvironment":46,"react/lib/invariant":49,"react/lib/warning":54}],18:[function(_dereq_,module,exports){
1367+
},{"event-emitter":31,"react/lib/ExecutionEnvironment":46,"react/lib/invariant":49,"react/lib/warning":50}],18:[function(_dereq_,module,exports){
13661368
// Copyright Joyent, Inc. and other Node contributors.
13671369
//
13681370
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -2703,302 +2705,6 @@ var invariant = function(condition, format, a, b, c, d, e, f) {
27032705
module.exports = invariant;
27042706

27052707
},{}],50:[function(_dereq_,module,exports){
2706-
/**
2707-
* Copyright 2013-2014 Facebook, Inc.
2708-
*
2709-
* Licensed under the Apache License, Version 2.0 (the "License");
2710-
* you may not use this file except in compliance with the License.
2711-
* You may obtain a copy of the License at
2712-
*
2713-
* http://www.apache.org/licenses/LICENSE-2.0
2714-
*
2715-
* Unless required by applicable law or agreed to in writing, software
2716-
* distributed under the License is distributed on an "AS IS" BASIS,
2717-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2718-
* See the License for the specific language governing permissions and
2719-
* limitations under the License.
2720-
*
2721-
* @providesModule keyMirror
2722-
* @typechecks static-only
2723-
*/
2724-
2725-
"use strict";
2726-
2727-
var invariant = _dereq_("./invariant");
2728-
2729-
/**
2730-
* Constructs an enumeration with keys equal to their value.
2731-
*
2732-
* For example:
2733-
*
2734-
* var COLORS = keyMirror({blue: null, red: null});
2735-
* var myColor = COLORS.blue;
2736-
* var isColorValid = !!COLORS[myColor];
2737-
*
2738-
* The last line could not be performed if the values of the generated enum were
2739-
* not equal to their keys.
2740-
*
2741-
* Input: {key1: val1, key2: val2}
2742-
* Output: {key1: key1, key2: key2}
2743-
*
2744-
* @param {object} obj
2745-
* @return {object}
2746-
*/
2747-
var keyMirror = function(obj) {
2748-
var ret = {};
2749-
var key;
2750-
("production" !== "production" ? invariant(
2751-
obj instanceof Object && !Array.isArray(obj),
2752-
'keyMirror(...): Argument must be an object.'
2753-
) : invariant(obj instanceof Object && !Array.isArray(obj)));
2754-
for (key in obj) {
2755-
if (!obj.hasOwnProperty(key)) {
2756-
continue;
2757-
}
2758-
ret[key] = key;
2759-
}
2760-
return ret;
2761-
};
2762-
2763-
module.exports = keyMirror;
2764-
2765-
},{"./invariant":49}],51:[function(_dereq_,module,exports){
2766-
/**
2767-
* Copyright 2013-2014 Facebook, Inc.
2768-
*
2769-
* Licensed under the Apache License, Version 2.0 (the "License");
2770-
* you may not use this file except in compliance with the License.
2771-
* You may obtain a copy of the License at
2772-
*
2773-
* http://www.apache.org/licenses/LICENSE-2.0
2774-
*
2775-
* Unless required by applicable law or agreed to in writing, software
2776-
* distributed under the License is distributed on an "AS IS" BASIS,
2777-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2778-
* See the License for the specific language governing permissions and
2779-
* limitations under the License.
2780-
*
2781-
* @providesModule merge
2782-
*/
2783-
2784-
"use strict";
2785-
2786-
var mergeInto = _dereq_("./mergeInto");
2787-
2788-
/**
2789-
* Shallow merges two structures into a return value, without mutating either.
2790-
*
2791-
* @param {?object} one Optional object with properties to merge from.
2792-
* @param {?object} two Optional object with properties to merge from.
2793-
* @return {object} The shallow extension of one by two.
2794-
*/
2795-
var merge = function(one, two) {
2796-
var result = {};
2797-
mergeInto(result, one);
2798-
mergeInto(result, two);
2799-
return result;
2800-
};
2801-
2802-
module.exports = merge;
2803-
2804-
},{"./mergeInto":53}],52:[function(_dereq_,module,exports){
2805-
/**
2806-
* Copyright 2013-2014 Facebook, Inc.
2807-
*
2808-
* Licensed under the Apache License, Version 2.0 (the "License");
2809-
* you may not use this file except in compliance with the License.
2810-
* You may obtain a copy of the License at
2811-
*
2812-
* http://www.apache.org/licenses/LICENSE-2.0
2813-
*
2814-
* Unless required by applicable law or agreed to in writing, software
2815-
* distributed under the License is distributed on an "AS IS" BASIS,
2816-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2817-
* See the License for the specific language governing permissions and
2818-
* limitations under the License.
2819-
*
2820-
* @providesModule mergeHelpers
2821-
*
2822-
* requiresPolyfills: Array.isArray
2823-
*/
2824-
2825-
"use strict";
2826-
2827-
var invariant = _dereq_("./invariant");
2828-
var keyMirror = _dereq_("./keyMirror");
2829-
2830-
/**
2831-
* Maximum number of levels to traverse. Will catch circular structures.
2832-
* @const
2833-
*/
2834-
var MAX_MERGE_DEPTH = 36;
2835-
2836-
/**
2837-
* We won't worry about edge cases like new String('x') or new Boolean(true).
2838-
* Functions are considered terminals, and arrays are not.
2839-
* @param {*} o The item/object/value to test.
2840-
* @return {boolean} true iff the argument is a terminal.
2841-
*/
2842-
var isTerminal = function(o) {
2843-
return typeof o !== 'object' || o === null;
2844-
};
2845-
2846-
var mergeHelpers = {
2847-
2848-
MAX_MERGE_DEPTH: MAX_MERGE_DEPTH,
2849-
2850-
isTerminal: isTerminal,
2851-
2852-
/**
2853-
* Converts null/undefined values into empty object.
2854-
*
2855-
* @param {?Object=} arg Argument to be normalized (nullable optional)
2856-
* @return {!Object}
2857-
*/
2858-
normalizeMergeArg: function(arg) {
2859-
return arg === undefined || arg === null ? {} : arg;
2860-
},
2861-
2862-
/**
2863-
* If merging Arrays, a merge strategy *must* be supplied. If not, it is
2864-
* likely the caller's fault. If this function is ever called with anything
2865-
* but `one` and `two` being `Array`s, it is the fault of the merge utilities.
2866-
*
2867-
* @param {*} one Array to merge into.
2868-
* @param {*} two Array to merge from.
2869-
*/
2870-
checkMergeArrayArgs: function(one, two) {
2871-
("production" !== "production" ? invariant(
2872-
Array.isArray(one) && Array.isArray(two),
2873-
'Tried to merge arrays, instead got %s and %s.',
2874-
one,
2875-
two
2876-
) : invariant(Array.isArray(one) && Array.isArray(two)));
2877-
},
2878-
2879-
/**
2880-
* @param {*} one Object to merge into.
2881-
* @param {*} two Object to merge from.
2882-
*/
2883-
checkMergeObjectArgs: function(one, two) {
2884-
mergeHelpers.checkMergeObjectArg(one);
2885-
mergeHelpers.checkMergeObjectArg(two);
2886-
},
2887-
2888-
/**
2889-
* @param {*} arg
2890-
*/
2891-
checkMergeObjectArg: function(arg) {
2892-
("production" !== "production" ? invariant(
2893-
!isTerminal(arg) && !Array.isArray(arg),
2894-
'Tried to merge an object, instead got %s.',
2895-
arg
2896-
) : invariant(!isTerminal(arg) && !Array.isArray(arg)));
2897-
},
2898-
2899-
/**
2900-
* @param {*} arg
2901-
*/
2902-
checkMergeIntoObjectArg: function(arg) {
2903-
("production" !== "production" ? invariant(
2904-
(!isTerminal(arg) || typeof arg === 'function') && !Array.isArray(arg),
2905-
'Tried to merge into an object, instead got %s.',
2906-
arg
2907-
) : invariant((!isTerminal(arg) || typeof arg === 'function') && !Array.isArray(arg)));
2908-
},
2909-
2910-
/**
2911-
* Checks that a merge was not given a circular object or an object that had
2912-
* too great of depth.
2913-
*
2914-
* @param {number} Level of recursion to validate against maximum.
2915-
*/
2916-
checkMergeLevel: function(level) {
2917-
("production" !== "production" ? invariant(
2918-
level < MAX_MERGE_DEPTH,
2919-
'Maximum deep merge depth exceeded. You may be attempting to merge ' +
2920-
'circular structures in an unsupported way.'
2921-
) : invariant(level < MAX_MERGE_DEPTH));
2922-
},
2923-
2924-
/**
2925-
* Checks that the supplied merge strategy is valid.
2926-
*
2927-
* @param {string} Array merge strategy.
2928-
*/
2929-
checkArrayStrategy: function(strategy) {
2930-
("production" !== "production" ? invariant(
2931-
strategy === undefined || strategy in mergeHelpers.ArrayStrategies,
2932-
'You must provide an array strategy to deep merge functions to ' +
2933-
'instruct the deep merge how to resolve merging two arrays.'
2934-
) : invariant(strategy === undefined || strategy in mergeHelpers.ArrayStrategies));
2935-
},
2936-
2937-
/**
2938-
* Set of possible behaviors of merge algorithms when encountering two Arrays
2939-
* that must be merged together.
2940-
* - `clobber`: The left `Array` is ignored.
2941-
* - `indexByIndex`: The result is achieved by recursively deep merging at
2942-
* each index. (not yet supported.)
2943-
*/
2944-
ArrayStrategies: keyMirror({
2945-
Clobber: true,
2946-
IndexByIndex: true
2947-
})
2948-
2949-
};
2950-
2951-
module.exports = mergeHelpers;
2952-
2953-
},{"./invariant":49,"./keyMirror":50}],53:[function(_dereq_,module,exports){
2954-
/**
2955-
* Copyright 2013-2014 Facebook, Inc.
2956-
*
2957-
* Licensed under the Apache License, Version 2.0 (the "License");
2958-
* you may not use this file except in compliance with the License.
2959-
* You may obtain a copy of the License at
2960-
*
2961-
* http://www.apache.org/licenses/LICENSE-2.0
2962-
*
2963-
* Unless required by applicable law or agreed to in writing, software
2964-
* distributed under the License is distributed on an "AS IS" BASIS,
2965-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2966-
* See the License for the specific language governing permissions and
2967-
* limitations under the License.
2968-
*
2969-
* @providesModule mergeInto
2970-
* @typechecks static-only
2971-
*/
2972-
2973-
"use strict";
2974-
2975-
var mergeHelpers = _dereq_("./mergeHelpers");
2976-
2977-
var checkMergeObjectArg = mergeHelpers.checkMergeObjectArg;
2978-
var checkMergeIntoObjectArg = mergeHelpers.checkMergeIntoObjectArg;
2979-
2980-
/**
2981-
* Shallow merges two structures by mutating the first parameter.
2982-
*
2983-
* @param {object|function} one Object to be merged into.
2984-
* @param {?object} two Optional object with properties to merge from.
2985-
*/
2986-
function mergeInto(one, two) {
2987-
checkMergeIntoObjectArg(one);
2988-
if (two != null) {
2989-
checkMergeObjectArg(two);
2990-
for (var key in two) {
2991-
if (!two.hasOwnProperty(key)) {
2992-
continue;
2993-
}
2994-
one[key] = two[key];
2995-
}
2996-
}
2997-
}
2998-
2999-
module.exports = mergeInto;
3000-
3001-
},{"./mergeHelpers":52}],54:[function(_dereq_,module,exports){
30022708
/**
30032709
* Copyright 2014 Facebook, Inc.
30042710
*

dist/react-router.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-nested-router",
3-
"version": "0.3.4",
3+
"version": "0.3.5",
44
"description": "A complete routing library for React.js",
55
"tags": [
66
"react",

0 commit comments

Comments
 (0)