react-github-corner
Advanced tools
Comparing version 0.2.0 to 0.3.0
'use strict'; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,2 +7,4 @@ value: true | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _react = require('react'); | ||
@@ -118,2 +118,3 @@ | ||
GithubCorner.defaultProps = { | ||
@@ -120,0 +121,0 @@ href: '/', |
@@ -0,6 +1,57 @@ | ||
## [v2.1.0] | ||
- Deprecate usage of `<base href>` as an automatic substitute for `basename` | ||
in `useBasename`. They have subtly different semantics ([#94]) | ||
[v2.1.0]: https://github.com/mjackson/history/compare/v2.0.2...v2.1.0 | ||
[#94]: https://github.com/mjackson/history/issues/94 | ||
## [v2.0.2] | ||
> Apr 14, 2016 | ||
- **Bugfix:** Fix usage of `hasOwnProperty` (thanks @taion) | ||
- **Bugfix:** Fix handling of `<base>` without `href` ([#262] thanks @taion) | ||
- **Bugfix:** Fix security error when frontend URL !== backend URL ([#267] thanks @slorber) | ||
[v2.0.2]: https://github.com/mjackson/history/compare/v2.0.1...v2.0.2 | ||
[#262]: https://github.com/mjackson/history/pull/262 | ||
[#267]: https://github.com/mjackson/history/pull/267 | ||
## [v2.0.1] | ||
> Mar 2, 2016 | ||
- **Bugfix:** Fix stack size growth with every `listenBefore` listener ([#225] thanks @threepointone, @taion) | ||
- Remove docs from npm package | ||
[v2.0.1]: https://github.com/mjackson/history/compare/v2.0.0...v2.0.1 | ||
[#225]: https://github.com/mjackson/history/issues/225 | ||
## [v2.0.0] | ||
> Feb 4, 2016 | ||
- **Bugfix:** Fix search base logic with an empty query ([#221]) | ||
- **Bugfix:** Fail gracefully when Safari 5 security settings prevent access to window.sessionStorage ([#223]) | ||
[v2.0.0]: https://github.com/mjackson/history/compare/v2.0.0-rc3...v2.0.0 | ||
[#221]: https://github.com/mjackson/history/issues/221 | ||
[#223]: https://github.com/mjackson/history/pull/223 | ||
## [v2.0.0-rc3] | ||
> Feb 3, 2016 | ||
- **Bugfix:** Don't convert same-path `PUSH` to `REPLACE` when `location.state` changes ([#179]) | ||
- **Bugfix:** Re-enable browser history on Chrome iOS ([#208]) | ||
- **Bugfix:** Properly support location descriptors in `history.createLocation` ([#200]) | ||
[v2.0.0-rc3]: https://github.com/mjackson/history/compare/v2.0.0-rc2...v2.0.0-rc3 | ||
[#179]: https://github.com/mjackson/history/pull/179 | ||
[#208]: https://github.com/mjackson/history/pull/208 | ||
[#200]: https://github.com/mjackson/history/pull/200 | ||
## [v2.0.0-rc2] | ||
> Jan 9, 2016 | ||
- Add back deprecation warnings | ||
[v2.0.0-rc2]: https://github.com/rackt/history/compare/v2.0.0-rc1...v2.0.0-rc2 | ||
[v2.0.0-rc2]: https://github.com/mjackson/history/compare/v2.0.0-rc1...v2.0.0-rc2 | ||
@@ -12,4 +63,4 @@ ## [v2.0.0-rc1] | ||
[v2.0.0-rc1]: https://github.com/rackt/history/compare/v1.17.0...v2.0.0-rc1 | ||
[#177]: https://github.com/rackt/history/pull/177 | ||
[v2.0.0-rc1]: https://github.com/mjackson/history/compare/v1.17.0...v2.0.0-rc1 | ||
[#177]: https://github.com/mjackson/history/pull/177 | ||
@@ -22,5 +73,5 @@ ## [v1.17.0] | ||
[v1.17.0]: https://github.com/rackt/history/compare/v1.16.0...v1.17.0 | ||
[#170]: https://github.com/rackt/history/pull/170 | ||
[#189]: https://github.com/rackt/history/pull/189 | ||
[v1.17.0]: https://github.com/mjackson/history/compare/v1.16.0...v1.17.0 | ||
[#170]: https://github.com/mjackson/history/pull/170 | ||
[#189]: https://github.com/mjackson/history/pull/189 | ||
@@ -30,8 +81,8 @@ ## [v1.16.0] | ||
- **Bugfix:** Silence all warnings that were introduced since 1.13 (see [rackt/react-router#2682]) | ||
- **Bugfix:** Silence all warnings that were introduced since 1.13 (see [mjackson/react-router#2682]) | ||
- **Deprecation:** Deprecate the `createLocation` method in the top-level exports | ||
- **Deprecation:** Deprecate the `state` arg to `history.createLocation` | ||
[v1.16.0]: https://github.com/rackt/history/compare/v1.15.0...v1.16.0 | ||
[rackt/react-router#2682]: https://github.com/rackt/react-router/issues/2682 | ||
[v1.16.0]: https://github.com/mjackson/history/compare/v1.15.0...v1.16.0 | ||
[mjackson/react-router#2682]: https://github.com/mjackson/react-router/issues/2682 | ||
@@ -44,4 +95,4 @@ ## [v1.15.0] | ||
[v1.15.0]: https://github.com/rackt/history/compare/v1.14.0...v1.15.0 | ||
[#173]: https://github.com/rackt/history/pull/173 | ||
[v1.15.0]: https://github.com/mjackson/history/compare/v1.14.0...v1.15.0 | ||
[#173]: https://github.com/mjackson/history/pull/173 | ||
@@ -58,9 +109,9 @@ ## [v1.14.0] | ||
[v1.14.0]: https://github.com/rackt/history/compare/v1.13.1...v1.14.0 | ||
[#121]: https://github.com/rackt/history/issues/121 | ||
[#141]: https://github.com/rackt/history/pull/141 | ||
[#146]: https://github.com/rackt/history/pull/146 | ||
[#152]: https://github.com/rackt/history/pull/152 | ||
[#167]: https://github.com/rackt/history/pull/167 | ||
[#168]: https://github.com/rackt/history/pull/168 | ||
[v1.14.0]: https://github.com/mjackson/history/compare/v1.13.1...v1.14.0 | ||
[#121]: https://github.com/mjackson/history/issues/121 | ||
[#141]: https://github.com/mjackson/history/pull/141 | ||
[#146]: https://github.com/mjackson/history/pull/146 | ||
[#152]: https://github.com/mjackson/history/pull/152 | ||
[#167]: https://github.com/mjackson/history/pull/167 | ||
[#168]: https://github.com/mjackson/history/pull/168 | ||
@@ -74,5 +125,5 @@ ## [v1.13.1] | ||
[v1.13.1]: https://github.com/rackt/history/compare/v1.13.0...v1.13.1 | ||
[#43]: https://github.com/rackt/history/pull/43 | ||
[#139]: https://github.com/rackt/history/pull/139 | ||
[v1.13.1]: https://github.com/mjackson/history/compare/v1.13.0...v1.13.1 | ||
[#43]: https://github.com/mjackson/history/pull/43 | ||
[#139]: https://github.com/mjackson/history/pull/139 | ||
@@ -86,5 +137,5 @@ ## [v1.13.0] | ||
[v1.13.0]: https://github.com/rackt/history/compare/v1.12.6...v1.13.0 | ||
[#108]: https://github.com/rackt/history/pull/108 | ||
[#94]: https://github.com/rackt/history/issues/94 | ||
[v1.13.0]: https://github.com/mjackson/history/compare/v1.12.6...v1.13.0 | ||
[#108]: https://github.com/mjackson/history/pull/108 | ||
[#94]: https://github.com/mjackson/history/issues/94 | ||
@@ -97,4 +148,4 @@ ## [v1.12.6] | ||
[v1.12.6]: https://github.com/rackt/history/compare/v1.12.5...v1.12.6 | ||
[#95]: https://github.com/rackt/history/issues/95 | ||
[v1.12.6]: https://github.com/mjackson/history/compare/v1.12.5...v1.12.6 | ||
[#95]: https://github.com/mjackson/history/issues/95 | ||
@@ -109,4 +160,4 @@ ## [v1.12.5] | ||
[v1.12.5]: https://github.com/rackt/history/compare/v1.12.4...v1.12.5 | ||
[#93]: https://github.com/rackt/history/issues/93 | ||
[v1.12.5]: https://github.com/mjackson/history/compare/v1.12.4...v1.12.5 | ||
[#93]: https://github.com/mjackson/history/issues/93 | ||
@@ -118,4 +169,4 @@ ## [v1.12.4] | ||
[v1.12.4]: https://github.com/rackt/history/compare/v1.12.3...v1.12.4 | ||
[#62]: https://github.com/rackt/history/issues/62 | ||
[v1.12.4]: https://github.com/mjackson/history/compare/v1.12.3...v1.12.4 | ||
[#62]: https://github.com/mjackson/history/issues/62 | ||
@@ -128,5 +179,5 @@ ## [v1.12.3] | ||
[v1.12.3]: https://github.com/rackt/history/compare/v1.12.2...v1.12.3 | ||
[#71]: https://github.com/rackt/history/issues/71 | ||
[#42]: https://github.com/rackt/history/issues/42 | ||
[v1.12.3]: https://github.com/mjackson/history/compare/v1.12.2...v1.12.3 | ||
[#71]: https://github.com/mjackson/history/issues/71 | ||
[#42]: https://github.com/mjackson/history/issues/42 | ||
@@ -138,4 +189,4 @@ ## [v1.12.2] | ||
[v1.12.2]: https://github.com/rackt/history/compare/v1.12.1...v1.12.2 | ||
[#51-comments]: https://github.com/rackt/history/pull/51#issuecomment-143189672 | ||
[v1.12.2]: https://github.com/mjackson/history/compare/v1.12.1...v1.12.2 | ||
[#51-comments]: https://github.com/mjackson/history/pull/51#issuecomment-143189672 | ||
@@ -148,3 +199,3 @@ ## [v1.12.1] | ||
[v1.12.1]: https://github.com/rackt/history/compare/v1.12.0...v1.12.1 | ||
[v1.12.1]: https://github.com/mjackson/history/compare/v1.12.0...v1.12.1 | ||
@@ -157,3 +208,3 @@ ## [v1.12.0] | ||
[v1.12.0]: https://github.com/rackt/history/compare/v1.11.1...v1.12.0 | ||
[v1.12.0]: https://github.com/mjackson/history/compare/v1.11.1...v1.12.0 | ||
@@ -166,4 +217,4 @@ ## [v1.11.1] | ||
[v1.11.1]: https://github.com/rackt/history/compare/v1.11.0...v1.11.1 | ||
[#68]: https://github.com/rackt/history/issues/68 | ||
[v1.11.1]: https://github.com/mjackson/history/compare/v1.11.0...v1.11.1 | ||
[#68]: https://github.com/mjackson/history/issues/68 | ||
@@ -180,2 +231,2 @@ ## [v1.11.0] | ||
[v1.11.0]: https://github.com/rackt/history/compare/v1.10.2...v1.11.0 | ||
[v1.11.0]: https://github.com/mjackson/history/compare/v1.10.2...v1.11.0 |
"use strict"; | ||
var _slice = Array.prototype.slice; | ||
export { loopAsync }; | ||
function loopAsync(turns, work, callback) { | ||
var currentTurn = 0; | ||
var isDone = false; | ||
var currentTurn = 0, | ||
isDone = false; | ||
var sync = false, | ||
hasNext = false, | ||
doneArgs = undefined; | ||
function done() { | ||
isDone = true; | ||
if (sync) { | ||
// Iterate instead of recursing if possible. | ||
doneArgs = [].concat(_slice.call(arguments)); | ||
return; | ||
} | ||
callback.apply(this, arguments); | ||
@@ -15,9 +25,31 @@ } | ||
function next() { | ||
if (isDone) return; | ||
if (isDone) { | ||
return; | ||
} | ||
if (currentTurn < turns) { | ||
hasNext = true; | ||
if (sync) { | ||
// Iterate instead of recursing if possible. | ||
return; | ||
} | ||
sync = true; | ||
while (!isDone && currentTurn < turns && hasNext) { | ||
hasNext = false; | ||
work.call(this, currentTurn++, next, done); | ||
} else { | ||
done.apply(this, arguments); | ||
} | ||
sync = false; | ||
if (isDone) { | ||
// This means the loop finished synchronously. | ||
callback.apply(this, doneArgs); | ||
return; | ||
} | ||
if (currentTurn >= turns && hasNext) { | ||
isDone = true; | ||
callback(); | ||
} | ||
} | ||
@@ -24,0 +56,0 @@ |
@@ -7,2 +7,3 @@ 'use strict'; | ||
import { PUSH, POP } from './Actions'; | ||
import { parsePath } from './PathUtils'; | ||
import { canUseDOM } from './ExecutionEnvironment'; | ||
@@ -12,3 +13,2 @@ import { addEventListener, removeEventListener, getWindowPath, supportsHistory } from './DOMUtils'; | ||
import createDOMHistory from './createDOMHistory'; | ||
import parsePath from './parsePath'; | ||
@@ -48,3 +48,3 @@ /** | ||
if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path); | ||
if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null); | ||
} | ||
@@ -51,0 +51,0 @@ |
@@ -8,2 +8,3 @@ 'use strict'; | ||
import { PUSH, POP } from './Actions'; | ||
import { parsePath } from './PathUtils'; | ||
import { canUseDOM } from './ExecutionEnvironment'; | ||
@@ -13,3 +14,2 @@ import { addEventListener, removeEventListener, getHashPath, replaceHashPath, supportsGoWithoutReloadUsingHash } from './DOMUtils'; | ||
import createDOMHistory from './createDOMHistory'; | ||
import parsePath from './parsePath'; | ||
@@ -16,0 +16,0 @@ function isAbsolutePath(path) { |
@@ -7,2 +7,3 @@ 'use strict'; | ||
import deepEqual from 'deep-equal'; | ||
import { parsePath } from './PathUtils'; | ||
import { loopAsync } from './AsyncUtils'; | ||
@@ -12,3 +13,2 @@ import { PUSH, REPLACE, POP } from './Actions'; | ||
import runTransitionHook from './runTransitionHook'; | ||
import parsePath from './parsePath'; | ||
import deprecate from './deprecate'; | ||
@@ -34,4 +34,4 @@ | ||
var go = options.go; | ||
var getUserConfirmation = options.getUserConfirmation; | ||
var keyLength = options.keyLength; | ||
var getUserConfirmation = options.getUserConfirmation; | ||
@@ -136,3 +136,3 @@ if (typeof keyLength !== 'number') keyLength = DefaultKeyLength; | ||
if (nextPath === prevPath) nextLocation.action = REPLACE; | ||
if (nextPath === prevPath && deepEqual(location.state, nextLocation.state)) nextLocation.action = REPLACE; | ||
} | ||
@@ -139,0 +139,0 @@ |
@@ -7,3 +7,3 @@ 'use strict'; | ||
import { POP } from './Actions'; | ||
import parsePath from './parsePath'; | ||
import { parsePath } from './PathUtils'; | ||
@@ -10,0 +10,0 @@ function createLocation() { |
@@ -7,5 +7,5 @@ 'use strict'; | ||
import invariant from 'invariant'; | ||
import { parsePath } from './PathUtils'; | ||
import { PUSH, REPLACE, POP } from './Actions'; | ||
import createHistory from './createHistory'; | ||
import parsePath from './parsePath'; | ||
@@ -75,3 +75,2 @@ function createStateStorage(entries) { | ||
var entry = entries[current]; | ||
var key = entry.key; | ||
var basename = entry.basename; | ||
@@ -83,8 +82,10 @@ var pathname = entry.pathname; | ||
var state = undefined; | ||
if (key) { | ||
var key = undefined, | ||
state = undefined; | ||
if (entry.key) { | ||
key = entry.key; | ||
state = readState(key); | ||
} else { | ||
key = history.createKey(); | ||
state = null; | ||
key = history.createKey(); | ||
entry.key = key; | ||
@@ -91,0 +92,0 @@ } |
@@ -9,3 +9,4 @@ /*eslint-disable no-empty */ | ||
var KeyPrefix = '@@History/'; | ||
var QuotaExceededError = 'QuotaExceededError'; | ||
var QuotaExceededErrors = ['QuotaExceededError', 'QUOTA_EXCEEDED_ERR']; | ||
var SecurityError = 'SecurityError'; | ||
@@ -33,3 +34,3 @@ | ||
if (error.name === QuotaExceededError && window.sessionStorage.length === 0) { | ||
if (QuotaExceededErrors.indexOf(error.name) >= 0 && window.sessionStorage.length === 0) { | ||
// Safari "private mode" throws QuotaExceededError. | ||
@@ -36,0 +37,0 @@ process.env.NODE_ENV !== 'production' ? warning(false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : undefined; |
@@ -64,7 +64,2 @@ 'use strict'; | ||
} | ||
// FIXME: Work around our browser history not working correctly on Chrome | ||
// iOS: https://github.com/rackt/react-router/issues/2565 | ||
if (ua.indexOf('CriOS') !== -1) { | ||
return false; | ||
} | ||
return window.history && 'pushState' in window.history; | ||
@@ -71,0 +66,0 @@ } |
@@ -5,8 +5,6 @@ 'use strict'; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
import warning from 'warning'; | ||
import { canUseDOM } from './ExecutionEnvironment'; | ||
import { parsePath } from './PathUtils'; | ||
import runTransitionHook from './runTransitionHook'; | ||
import extractPath from './extractPath'; | ||
import parsePath from './parsePath'; | ||
import deprecate from './deprecate'; | ||
@@ -17,17 +15,33 @@ | ||
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var history = createHistory(options); | ||
var basename = options.basename; | ||
var historyOptions = _objectWithoutProperties(options, ['basename']); | ||
var checkedBaseHref = false; | ||
var history = createHistory(historyOptions); | ||
function checkBaseHref() { | ||
if (checkedBaseHref) { | ||
return; | ||
} | ||
// Automatically use the value of <base href> in HTML | ||
// documents as basename if it's not explicitly given. | ||
if (basename == null && canUseDOM) { | ||
var base = document.getElementsByTagName('base')[0]; | ||
// Automatically use the value of <base href> in HTML | ||
// documents as basename if it's not explicitly given. | ||
if (basename == null && canUseDOM) { | ||
var base = document.getElementsByTagName('base')[0]; | ||
var baseHref = base && base.getAttribute('href'); | ||
if (base) basename = extractPath(base.href); | ||
if (baseHref != null) { | ||
basename = baseHref; | ||
process.env.NODE_ENV !== 'production' ? warning(false, 'Automatically setting basename using <base href> is deprecated and will ' + 'be removed in the next major release. The semantics of <base href> are ' + 'subtly different from basename. Please pass the basename explicitly in ' + 'the options to createHistory') : undefined; | ||
} | ||
} | ||
checkedBaseHref = true; | ||
} | ||
function addBasename(location) { | ||
checkBaseHref(); | ||
if (basename && location.basename == null) { | ||
@@ -48,2 +62,4 @@ if (location.pathname.indexOf(basename) === 0) { | ||
function prependBasename(location) { | ||
checkBaseHref(); | ||
if (!basename) return location; | ||
@@ -93,4 +109,8 @@ | ||
function createLocation() { | ||
return addBasename(history.createLocation.apply(history, arguments)); | ||
function createLocation(location) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args))); | ||
} | ||
@@ -97,0 +117,0 @@ |
@@ -5,8 +5,6 @@ 'use strict'; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
import warning from 'warning'; | ||
import { parse, stringify } from 'query-string'; | ||
import runTransitionHook from './runTransitionHook'; | ||
import parsePath from './parsePath'; | ||
import { parsePath } from './PathUtils'; | ||
import deprecate from './deprecate'; | ||
@@ -24,3 +22,3 @@ | ||
for (var p in object) { | ||
if (object.hasOwnProperty(p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true; | ||
if (Object.prototype.hasOwnProperty.call(object, p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true; | ||
}return false; | ||
@@ -36,9 +34,8 @@ } | ||
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var history = createHistory(options); | ||
var stringifyQuery = options.stringifyQuery; | ||
var parseQueryString = options.parseQueryString; | ||
var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']); | ||
var history = createHistory(historyOptions); | ||
if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; | ||
@@ -65,4 +62,7 @@ | ||
var queryString = undefined; | ||
if (!query || (queryString = stringifyQuery(query)) === '') return location; | ||
var searchBaseSpec = location[SEARCH_BASE_KEY]; | ||
var queryString = query ? stringifyQuery(query) : ''; | ||
if (!searchBaseSpec && !queryString) { | ||
return location; | ||
} | ||
@@ -73,3 +73,2 @@ process.env.NODE_ENV !== 'production' ? warning(stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined; | ||
var searchBaseSpec = location[SEARCH_BASE_KEY]; | ||
var searchBase = undefined; | ||
@@ -82,3 +81,6 @@ if (searchBaseSpec && location.search === searchBaseSpec.search) { | ||
var search = searchBase + (searchBase ? '&' : '?') + queryString; | ||
var search = searchBase; | ||
if (queryString) { | ||
search += (search ? '&' : '?') + queryString; | ||
} | ||
@@ -124,4 +126,12 @@ return _extends({}, location, (_extends2 = { | ||
function createLocation() { | ||
return addQuery(history.createLocation.apply(history, arguments)); | ||
function createLocation(location) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args)); | ||
if (location.query) { | ||
fullLocation.query = location.query; | ||
} | ||
return addQuery(fullLocation); | ||
} | ||
@@ -128,0 +138,0 @@ |
"use strict"; | ||
exports.__esModule = true; | ||
var _slice = Array.prototype.slice; | ||
exports.loopAsync = loopAsync; | ||
function loopAsync(turns, work, callback) { | ||
var currentTurn = 0; | ||
var isDone = false; | ||
var currentTurn = 0, | ||
isDone = false; | ||
var sync = false, | ||
hasNext = false, | ||
doneArgs = undefined; | ||
function done() { | ||
isDone = true; | ||
if (sync) { | ||
// Iterate instead of recursing if possible. | ||
doneArgs = [].concat(_slice.call(arguments)); | ||
return; | ||
} | ||
callback.apply(this, arguments); | ||
@@ -16,9 +26,31 @@ } | ||
function next() { | ||
if (isDone) return; | ||
if (isDone) { | ||
return; | ||
} | ||
if (currentTurn < turns) { | ||
hasNext = true; | ||
if (sync) { | ||
// Iterate instead of recursing if possible. | ||
return; | ||
} | ||
sync = true; | ||
while (!isDone && currentTurn < turns && hasNext) { | ||
hasNext = false; | ||
work.call(this, currentTurn++, next, done); | ||
} else { | ||
done.apply(this, arguments); | ||
} | ||
sync = false; | ||
if (isDone) { | ||
// This means the loop finished synchronously. | ||
callback.apply(this, doneArgs); | ||
return; | ||
} | ||
if (currentTurn >= turns && hasNext) { | ||
isDone = true; | ||
callback(); | ||
} | ||
} | ||
@@ -25,0 +57,0 @@ |
@@ -15,2 +15,4 @@ 'use strict'; | ||
var _PathUtils = require('./PathUtils'); | ||
var _ExecutionEnvironment = require('./ExecutionEnvironment'); | ||
@@ -26,6 +28,2 @@ | ||
var _parsePath = require('./parsePath'); | ||
var _parsePath2 = _interopRequireDefault(_parsePath); | ||
/** | ||
@@ -64,6 +62,6 @@ * Creates and returns a history object that uses HTML5's history API | ||
if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path); | ||
if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null); | ||
} | ||
var location = _parsePath2['default'](path); | ||
var location = _PathUtils.parsePath(path); | ||
@@ -70,0 +68,0 @@ return history.createLocation(_extends({}, location, { state: state }), undefined, key); |
@@ -19,2 +19,4 @@ 'use strict'; | ||
var _PathUtils = require('./PathUtils'); | ||
var _ExecutionEnvironment = require('./ExecutionEnvironment'); | ||
@@ -30,6 +32,2 @@ | ||
var _parsePath = require('./parsePath'); | ||
var _parsePath2 = _interopRequireDefault(_parsePath); | ||
function isAbsolutePath(path) { | ||
@@ -93,3 +91,3 @@ return typeof path === 'string' && path.charAt(0) === '/'; | ||
var location = _parsePath2['default'](path); | ||
var location = _PathUtils.parsePath(path); | ||
@@ -96,0 +94,0 @@ return history.createLocation(_extends({}, location, { state: state }), undefined, key); |
@@ -17,2 +17,4 @@ 'use strict'; | ||
var _PathUtils = require('./PathUtils'); | ||
var _AsyncUtils = require('./AsyncUtils'); | ||
@@ -30,6 +32,2 @@ | ||
var _parsePath = require('./parsePath'); | ||
var _parsePath2 = _interopRequireDefault(_parsePath); | ||
var _deprecate = require('./deprecate'); | ||
@@ -57,4 +55,4 @@ | ||
var go = options.go; | ||
var getUserConfirmation = options.getUserConfirmation; | ||
var keyLength = options.keyLength; | ||
var getUserConfirmation = options.getUserConfirmation; | ||
@@ -159,3 +157,3 @@ if (typeof keyLength !== 'number') keyLength = DefaultKeyLength; | ||
if (nextPath === prevPath) nextLocation.action = _Actions.REPLACE; | ||
if (nextPath === prevPath && _deepEqual2['default'](location.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE; | ||
} | ||
@@ -219,3 +217,3 @@ | ||
if (typeof location === 'string') location = _parsePath2['default'](location); | ||
if (typeof location === 'string') location = _PathUtils.parsePath(location); | ||
@@ -260,3 +258,3 @@ location = _extends({}, location, { state: action }); | ||
function pushState(state, path) { | ||
if (typeof path === 'string') path = _parsePath2['default'](path); | ||
if (typeof path === 'string') path = _PathUtils.parsePath(path); | ||
@@ -268,3 +266,3 @@ push(_extends({ state: state }, path)); | ||
function replaceState(state, path) { | ||
if (typeof path === 'string') path = _parsePath2['default'](path); | ||
if (typeof path === 'string') path = _PathUtils.parsePath(path); | ||
@@ -271,0 +269,0 @@ replace(_extends({ state: state }, path)); |
@@ -15,6 +15,4 @@ 'use strict'; | ||
var _parsePath = require('./parsePath'); | ||
var _PathUtils = require('./PathUtils'); | ||
var _parsePath2 = _interopRequireDefault(_parsePath); | ||
function createLocation() { | ||
@@ -27,3 +25,3 @@ var location = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0]; | ||
if (typeof location === 'string') location = _parsePath2['default'](location); | ||
if (typeof location === 'string') location = _PathUtils.parsePath(location); | ||
@@ -30,0 +28,0 @@ if (typeof action === 'object') { |
@@ -17,2 +17,4 @@ 'use strict'; | ||
var _PathUtils = require('./PathUtils'); | ||
var _Actions = require('./Actions'); | ||
@@ -24,6 +26,2 @@ | ||
var _parsePath = require('./parsePath'); | ||
var _parsePath2 = _interopRequireDefault(_parsePath); | ||
function createStateStorage(entries) { | ||
@@ -92,3 +90,2 @@ return entries.filter(function (entry) { | ||
var entry = entries[current]; | ||
var key = entry.key; | ||
var basename = entry.basename; | ||
@@ -100,12 +97,14 @@ var pathname = entry.pathname; | ||
var state = undefined; | ||
if (key) { | ||
var key = undefined, | ||
state = undefined; | ||
if (entry.key) { | ||
key = entry.key; | ||
state = readState(key); | ||
} else { | ||
key = history.createKey(); | ||
state = null; | ||
key = history.createKey(); | ||
entry.key = key; | ||
} | ||
var location = _parsePath2['default'](path); | ||
var location = _PathUtils.parsePath(path); | ||
@@ -112,0 +111,0 @@ return history.createLocation(_extends({}, location, { state: state }), undefined, key); |
@@ -15,3 +15,4 @@ /*eslint-disable no-empty */ | ||
var KeyPrefix = '@@History/'; | ||
var QuotaExceededError = 'QuotaExceededError'; | ||
var QuotaExceededErrors = ['QuotaExceededError', 'QUOTA_EXCEEDED_ERR']; | ||
var SecurityError = 'SecurityError'; | ||
@@ -39,3 +40,3 @@ | ||
if (error.name === QuotaExceededError && window.sessionStorage.length === 0) { | ||
if (QuotaExceededErrors.indexOf(error.name) >= 0 && window.sessionStorage.length === 0) { | ||
// Safari "private mode" throws QuotaExceededError. | ||
@@ -42,0 +43,0 @@ process.env.NODE_ENV !== 'production' ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : undefined; |
@@ -65,7 +65,2 @@ 'use strict'; | ||
} | ||
// FIXME: Work around our browser history not working correctly on Chrome | ||
// iOS: https://github.com/rackt/react-router/issues/2565 | ||
if (ua.indexOf('CriOS') !== -1) { | ||
return false; | ||
} | ||
return window.history && 'pushState' in window.history; | ||
@@ -72,0 +67,0 @@ } |
@@ -9,6 +9,10 @@ 'use strict'; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var _warning = require('warning'); | ||
var _warning2 = _interopRequireDefault(_warning); | ||
var _ExecutionEnvironment = require('./ExecutionEnvironment'); | ||
var _PathUtils = require('./PathUtils'); | ||
var _runTransitionHook = require('./runTransitionHook'); | ||
@@ -18,10 +22,2 @@ | ||
var _extractPath = require('./extractPath'); | ||
var _extractPath2 = _interopRequireDefault(_extractPath); | ||
var _parsePath = require('./parsePath'); | ||
var _parsePath2 = _interopRequireDefault(_parsePath); | ||
var _deprecate = require('./deprecate'); | ||
@@ -34,17 +30,33 @@ | ||
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var history = createHistory(options); | ||
var basename = options.basename; | ||
var historyOptions = _objectWithoutProperties(options, ['basename']); | ||
var checkedBaseHref = false; | ||
var history = createHistory(historyOptions); | ||
function checkBaseHref() { | ||
if (checkedBaseHref) { | ||
return; | ||
} | ||
// Automatically use the value of <base href> in HTML | ||
// documents as basename if it's not explicitly given. | ||
if (basename == null && _ExecutionEnvironment.canUseDOM) { | ||
var base = document.getElementsByTagName('base')[0]; | ||
// Automatically use the value of <base href> in HTML | ||
// documents as basename if it's not explicitly given. | ||
if (basename == null && _ExecutionEnvironment.canUseDOM) { | ||
var base = document.getElementsByTagName('base')[0]; | ||
var baseHref = base && base.getAttribute('href'); | ||
if (base) basename = _extractPath2['default'](base.href); | ||
if (baseHref != null) { | ||
basename = baseHref; | ||
process.env.NODE_ENV !== 'production' ? _warning2['default'](false, 'Automatically setting basename using <base href> is deprecated and will ' + 'be removed in the next major release. The semantics of <base href> are ' + 'subtly different from basename. Please pass the basename explicitly in ' + 'the options to createHistory') : undefined; | ||
} | ||
} | ||
checkedBaseHref = true; | ||
} | ||
function addBasename(location) { | ||
checkBaseHref(); | ||
if (basename && location.basename == null) { | ||
@@ -65,5 +77,7 @@ if (location.pathname.indexOf(basename) === 0) { | ||
function prependBasename(location) { | ||
checkBaseHref(); | ||
if (!basename) return location; | ||
if (typeof location === 'string') location = _parsePath2['default'](location); | ||
if (typeof location === 'string') location = _PathUtils.parsePath(location); | ||
@@ -110,4 +124,8 @@ var pname = location.pathname; | ||
function createLocation() { | ||
return addBasename(history.createLocation.apply(history, arguments)); | ||
function createLocation(location) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args))); | ||
} | ||
@@ -117,3 +135,3 @@ | ||
function pushState(state, path) { | ||
if (typeof path === 'string') path = _parsePath2['default'](path); | ||
if (typeof path === 'string') path = _PathUtils.parsePath(path); | ||
@@ -125,3 +143,3 @@ push(_extends({ state: state }, path)); | ||
function replaceState(state, path) { | ||
if (typeof path === 'string') path = _parsePath2['default'](path); | ||
if (typeof path === 'string') path = _PathUtils.parsePath(path); | ||
@@ -128,0 +146,0 @@ replace(_extends({ state: state }, path)); |
@@ -9,4 +9,2 @@ 'use strict'; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var _warning = require('warning'); | ||
@@ -22,6 +20,4 @@ | ||
var _parsePath = require('./parsePath'); | ||
var _PathUtils = require('./PathUtils'); | ||
var _parsePath2 = _interopRequireDefault(_parsePath); | ||
var _deprecate = require('./deprecate'); | ||
@@ -41,3 +37,3 @@ | ||
for (var p in object) { | ||
if (object.hasOwnProperty(p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true; | ||
if (Object.prototype.hasOwnProperty.call(object, p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true; | ||
}return false; | ||
@@ -53,9 +49,8 @@ } | ||
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var history = createHistory(options); | ||
var stringifyQuery = options.stringifyQuery; | ||
var parseQueryString = options.parseQueryString; | ||
var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']); | ||
var history = createHistory(historyOptions); | ||
if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; | ||
@@ -82,10 +77,12 @@ | ||
var queryString = undefined; | ||
if (!query || (queryString = stringifyQuery(query)) === '') return location; | ||
var searchBaseSpec = location[SEARCH_BASE_KEY]; | ||
var queryString = query ? stringifyQuery(query) : ''; | ||
if (!searchBaseSpec && !queryString) { | ||
return location; | ||
} | ||
process.env.NODE_ENV !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined; | ||
if (typeof location === 'string') location = _parsePath2['default'](location); | ||
if (typeof location === 'string') location = _PathUtils.parsePath(location); | ||
var searchBaseSpec = location[SEARCH_BASE_KEY]; | ||
var searchBase = undefined; | ||
@@ -98,3 +95,6 @@ if (searchBaseSpec && location.search === searchBaseSpec.search) { | ||
var search = searchBase + (searchBase ? '&' : '?') + queryString; | ||
var search = searchBase; | ||
if (queryString) { | ||
search += (search ? '&' : '?') + queryString; | ||
} | ||
@@ -140,4 +140,12 @@ return _extends({}, location, (_extends2 = { | ||
function createLocation() { | ||
return addQuery(history.createLocation.apply(history, arguments)); | ||
function createLocation(location) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args)); | ||
if (location.query) { | ||
fullLocation.query = location.query; | ||
} | ||
return addQuery(fullLocation); | ||
} | ||
@@ -147,3 +155,3 @@ | ||
function pushState(state, path, query) { | ||
if (typeof path === 'string') path = _parsePath2['default'](path); | ||
if (typeof path === 'string') path = _PathUtils.parsePath(path); | ||
@@ -155,3 +163,3 @@ push(_extends({ state: state }, path, { query: query })); | ||
function replaceState(state, path, query) { | ||
if (typeof path === 'string') path = _parsePath2['default'](path); | ||
if (typeof path === 'string') path = _PathUtils.parsePath(path); | ||
@@ -158,0 +166,0 @@ replace(_extends({ state: state }, path, { query: query })); |
The MIT License (MIT) | ||
Copyright (c) 2015 Michael Jackson | ||
Copyright (c) 2015-2016 Michael Jackson | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
{ | ||
"_args": [ | ||
[ | ||
"history@^2.0.0-rc2", | ||
"history@^2.1.1", | ||
"/Users/jas/Projects/git/react-github-corner" | ||
] | ||
], | ||
"_from": "history@>=2.0.0-rc2 <3.0.0", | ||
"_id": "history@2.0.0-rc2", | ||
"_from": "history@>=2.1.1 <3.0.0", | ||
"_id": "history@2.1.1", | ||
"_inCache": true, | ||
"_installable": true, | ||
"_location": "/history", | ||
"_nodeVersion": "5.3.0", | ||
"_nodeVersion": "5.9.1", | ||
"_npmOperationalInternal": { | ||
"host": "packages-12-west.internal.npmjs.com", | ||
"tmp": "tmp/history-2.1.1.tgz_1461769275780_0.1540935467928648" | ||
}, | ||
"_npmUser": { | ||
@@ -18,19 +22,20 @@ "email": "mjijackson@gmail.com", | ||
}, | ||
"_npmVersion": "3.3.12", | ||
"_npmVersion": "3.7.3", | ||
"_phantomChildren": {}, | ||
"_requested": { | ||
"name": "history", | ||
"raw": "history@^2.0.0-rc2", | ||
"rawSpec": "^2.0.0-rc2", | ||
"raw": "history@^2.1.1", | ||
"rawSpec": "^2.1.1", | ||
"scope": null, | ||
"spec": ">=2.0.0-rc2 <3.0.0", | ||
"spec": ">=2.1.1 <3.0.0", | ||
"type": "range" | ||
}, | ||
"_requiredBy": [ | ||
"#DEV:/" | ||
"#DEV:/", | ||
"/react-router" | ||
], | ||
"_resolved": "https://registry.npmjs.org/history/-/history-2.0.0-rc2.tgz", | ||
"_shasum": "71cc5575bf9afe3e8b06a21f5f8e013c6094325a", | ||
"_resolved": "https://registry.npmjs.org/history/-/history-2.1.1.tgz", | ||
"_shasum": "7490ff80c9d42e5b27f46898fcfc7311c6f685e3", | ||
"_shrinkwrap": null, | ||
"_spec": "history@^2.0.0-rc2", | ||
"_spec": "history@^2.1.1", | ||
"_where": "/Users/jas/Projects/git/react-github-corner", | ||
@@ -41,3 +46,3 @@ "authors": [ | ||
"bugs": { | ||
"url": "https://github.com/rackt/history/issues" | ||
"url": "https://github.com/mjackson/history/issues" | ||
}, | ||
@@ -50,21 +55,18 @@ "dependencies": { | ||
}, | ||
"description": "A minimal, functional history implementation for JavaScript", | ||
"description": "Manage browser history with JavaScript", | ||
"devDependencies": { | ||
"assert": "1.3.0", | ||
"babel": "^5.4.7", | ||
"babel-core": "^5.4.7", | ||
"babel-eslint": "^3.1.23", | ||
"babel-loader": "^5.0.0", | ||
"babel": "^5.8.35", | ||
"babel-core": "^5.8.35", | ||
"babel-eslint": "^4.1.8", | ||
"babel-loader": "^5.4.0", | ||
"babel-plugin-dev-expression": "^0.1.0", | ||
"eslint": "1.4.1", | ||
"eslint-config-rackt": "1.0.0", | ||
"eslint-plugin-react": "3.3.2", | ||
"eslint": "^1.10.3", | ||
"eslint-config-rackt": "^1.1.1", | ||
"eslint-plugin-react": "^3.16.1", | ||
"expect": "^1.12.0", | ||
"gzip-size": "^3.0.0", | ||
"isparta-loader": "^1.0.0", | ||
"karma": "^0.13.3", | ||
"karma-browserstack-launcher": "^0.1.3", | ||
"karma-chrome-launcher": "^0.2.0", | ||
"karma-coverage": "^0.5.3", | ||
"karma-coveralls": "^1.1.2", | ||
"karma-mocha": "^0.2.0", | ||
@@ -75,3 +77,4 @@ "karma-mocha-reporter": "^1.0.4", | ||
"mocha": "^2.0.1", | ||
"pretty-bytes": "^2.0.1", | ||
"pretty-bytes": "^3.0.1", | ||
"readline-sync": "^1.4.1", | ||
"rimraf": "^2.4.2", | ||
@@ -83,15 +86,14 @@ "webpack": "^1.4.13", | ||
"dist": { | ||
"shasum": "71cc5575bf9afe3e8b06a21f5f8e013c6094325a", | ||
"tarball": "http://registry.npmjs.org/history/-/history-2.0.0-rc2.tgz" | ||
"shasum": "7490ff80c9d42e5b27f46898fcfc7311c6f685e3", | ||
"tarball": "https://registry.npmjs.org/history/-/history-2.1.1.tgz" | ||
}, | ||
"files": [ | ||
"*.md", | ||
"docs", | ||
"es6", | ||
"lib", | ||
"npm-scripts", | ||
"modules/*.js", | ||
"umd" | ||
], | ||
"gitHead": "fa638bc7e95d933430374de8c398243843312e6b", | ||
"homepage": "https://github.com/rackt/history#readme", | ||
"gitHead": "909088007d64b88823341d485347c24deca4e1f0", | ||
"homepage": "https://github.com/mjackson/history#readme", | ||
"jsnext:main": "es6/index", | ||
"keywords": [ | ||
@@ -105,4 +107,4 @@ "history", | ||
{ | ||
"name": "mjackson", | ||
"email": "mjijackson@gmail.com" | ||
"email": "mjijackson@gmail.com", | ||
"name": "mjackson" | ||
} | ||
@@ -115,6 +117,6 @@ ], | ||
"type": "git", | ||
"url": "git+https://github.com/rackt/history.git" | ||
"url": "git+https://github.com/mjackson/history.git" | ||
}, | ||
"scripts": { | ||
"build": "npm run build-cjs && npm run build-es6", | ||
"build": "node ./scripts/build.js", | ||
"build-cjs": "rimraf lib && babel ./modules --stage 0 --loose all --plugins dev-expression -d lib --ignore '__tests__'", | ||
@@ -125,3 +127,4 @@ "build-es6": "rimraf es6 && babel ./modules --stage 0 --loose all --plugins dev-expression -d es6 --blacklist=es6.modules --ignore '__tests__'", | ||
"lint": "eslint modules", | ||
"postinstall": "node ./npm-scripts/postinstall.js", | ||
"prepublish": "npm run build", | ||
"release": "node ./scripts/release.js", | ||
"start": "webpack-dev-server -d --content-base ./ --history-api-fallback --inline modules/index.js", | ||
@@ -134,3 +137,3 @@ "test": "npm run lint && karma start" | ||
], | ||
"version": "2.0.0-rc2" | ||
"version": "2.1.1" | ||
} |
# history [![Travis][build-badge]][build] [![npm package][npm-badge]][npm] | ||
[build-badge]: https://img.shields.io/travis/mjackson/history/master.svg?style=flat-square | ||
[build]: https://travis-ci.org/mjackson/history | ||
[npm-badge]: https://img.shields.io/npm/v/history.svg?style=flat-square | ||
[npm]: https://www.npmjs.org/package/history | ||
[`history`](https://www.npmjs.com/package/history) is a JavaScript library that lets you easily manage session history in browsers, testing environments, and (soon, via [React Native](https://facebook.github.io/react-native/)) native devices. `history` abstracts away the differences in these different platforms and provides a minimal API that lets you manage the history stack, navigate, confirm navigation, and persist state between sessions. `history` is library-agnostic and may easily be included in any JavaScript project. | ||
[![Coveralls][coveralls-badge]][coveralls] | ||
[![Discord][discord-badge]][discord] | ||
## Docs & Help | ||
@@ -20,3 +23,3 @@ | ||
$ npm install history | ||
$ npm install --save history | ||
@@ -48,7 +51,7 @@ Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else: | ||
let history = createHistory() | ||
const history = createHistory() | ||
// Listen for changes to the current location. The | ||
// listener is called once immediately. | ||
let unlisten = history.listen(location => { | ||
const unlisten = history.listen(location => { | ||
console.log(location.pathname) | ||
@@ -67,3 +70,3 @@ }) | ||
You can find many more examples [in the documentation](https://github.com/rackt/history/tree/master/docs)! | ||
You can find many more examples [in the documentation](https://github.com/mjackson/history/tree/master/docs)! | ||
@@ -75,13 +78,1 @@ ## Thanks | ||
Also, thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to run our build in real browsers. | ||
[build-badge]: https://img.shields.io/travis/rackt/history/master.svg?style=flat-square | ||
[build]: https://travis-ci.org/rackt/history | ||
[npm-badge]: https://img.shields.io/npm/v/history.svg?style=flat-square | ||
[npm]: https://www.npmjs.org/package/history | ||
[coveralls-badge]: https://img.shields.io/coveralls/rackt/history/master.svg?style=flat-square | ||
[coveralls]: https://coveralls.io/github/rackt/history | ||
[discord-badge]: https://img.shields.io/badge/Discord-join%20chat%20%E2%86%92-738bd7.svg?style=flat-square | ||
[discord]: https://discord.gg/0ZcbPKXt5bYaNQ46 |
{ | ||
"name": "react-github-corner", | ||
"description": "Add a Github banner to your project page. A React version of: https://github.com/tholman/github-corners", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/skratchdot/react-github-corner/", | ||
@@ -27,23 +27,23 @@ "main": "./lib/GithubCorner.js", | ||
"peerDependencies": { | ||
"react": ">=0.14.0" | ||
"react": ">=0.14.0 || >=15.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.4.0", | ||
"babel-eslint": "^5.0.0-beta6", | ||
"babel-loader": "^6.2.1", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-preset-react": "^6.3.13", | ||
"babel-core": "^6.8.0", | ||
"babel-eslint": "^6.0.4", | ||
"babel-loader": "^6.2.4", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-react": "^6.5.0", | ||
"bootstrap": "^3.3.6", | ||
"brfs": "^1.4.2", | ||
"copy-webpack-plugin": "^0.3.3", | ||
"brfs": "^1.4.3", | ||
"copy-webpack-plugin": "^2.1.3", | ||
"css-loader": "^0.23.1", | ||
"eslint": "^1.10.3", | ||
"eslint-plugin-react": "^3.15.0", | ||
"eslint": "^2.9.0", | ||
"eslint-plugin-react": "^5.1.1", | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"file-loader": "^0.8.5", | ||
"gulp": "^3.9.0", | ||
"gulp-babel": "^6.1.1", | ||
"gulp": "^3.9.1", | ||
"gulp-babel": "^6.1.2", | ||
"gulp-concat": "^2.6.0", | ||
"gulp-eslint": "^1.1.1", | ||
"gulp-istanbul": "^0.10.3", | ||
"gulp-eslint": "^2.0.0", | ||
"gulp-istanbul": "^0.10.4", | ||
"gulp-mocha": "^2.2.0", | ||
@@ -53,22 +53,22 @@ "gulp-rimraf": "^0.2.0", | ||
"gulp-util": "^3.0.7", | ||
"history": "^2.0.0-rc2", | ||
"history": "^2.1.1", | ||
"isparta": "^4.0.0", | ||
"json-loader": "^0.5.4", | ||
"less": "^2.5.3", | ||
"less-loader": "^2.2.2", | ||
"less": "^2.7.1", | ||
"less-loader": "^2.2.3", | ||
"marked": "^0.3.5", | ||
"object-path-get": "0.0.3", | ||
"react-bootstrap": "^0.28.2", | ||
"react-dom": "^0.14.6", | ||
"react-bootstrap": "^0.29.3", | ||
"react-dom": "^15.0.2", | ||
"react-hot-loader": "^1.3.0", | ||
"react-redux": "^4.0.6", | ||
"react-router": "^1.0.3", | ||
"redux": "^3.0.5", | ||
"redux-devtools": "^3.0.1", | ||
"redux-router": "^1.0.0-beta7", | ||
"redux-thunk": "^1.0.3", | ||
"style-loader": "^0.13.0", | ||
"react-redux": "^4.4.5", | ||
"react-router": "^2.4.0", | ||
"redux": "^3.5.2", | ||
"redux-devtools": "^3.3.1", | ||
"redux-router": "^1.0.0-beta8", | ||
"redux-thunk": "^2.0.1", | ||
"style-loader": "^0.13.1", | ||
"transform-loader": "^0.2.3", | ||
"url-loader": "^0.5.7", | ||
"webpack": "^1.12.11", | ||
"webpack": "^1.13.0", | ||
"webpack-dev-server": "^1.14.1" | ||
@@ -75,0 +75,0 @@ }, |
@@ -22,3 +22,3 @@ import React, { Component } from 'react'; | ||
<p> | ||
<Link to={`/react-github-corner/about`} className="btn btn-primary"> | ||
<Link to={'/react-github-corner/about'} className="btn btn-primary"> | ||
About Page | ||
@@ -25,0 +25,0 @@ </Link> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
602821
104
6318
0
1
51