diff options
Diffstat (limited to 'history/es')
-rw-r--r-- | history/es/DOMUtils.js | 7 | ||||
-rw-r--r-- | history/es/ExecutionEnvironment.js | 7 | ||||
-rw-r--r-- | history/es/LocationUtils.js | 7 | ||||
-rw-r--r-- | history/es/PathUtils.js | 7 | ||||
-rw-r--r-- | history/es/createBrowserHistory.js | 7 | ||||
-rw-r--r-- | history/es/createHashHistory.js | 7 | ||||
-rw-r--r-- | history/es/createMemoryHistory.js | 7 | ||||
-rw-r--r-- | history/es/createTransitionManager.js | 7 | ||||
-rw-r--r-- | history/es/warnAboutDeprecatedESMImport.js | 35 |
9 files changed, 91 insertions, 0 deletions
diff --git a/history/es/DOMUtils.js b/history/es/DOMUtils.js new file mode 100644 index 0000000..265a991 --- /dev/null +++ b/history/es/DOMUtils.js @@ -0,0 +1,7 @@ +'use strict'; + +import warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js'; +warnAboutDeprecatedESMImport('DOMUtils'); + +import { DOMUtils } from '../esm/history.js'; +export default DOMUtils; diff --git a/history/es/ExecutionEnvironment.js b/history/es/ExecutionEnvironment.js new file mode 100644 index 0000000..9043609 --- /dev/null +++ b/history/es/ExecutionEnvironment.js @@ -0,0 +1,7 @@ +'use strict'; + +import warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js'; +warnAboutDeprecatedESMImport('ExecutionEnvironment'); + +import { ExecutionEnvironment } from '../esm/history.js'; +export default ExecutionEnvironment; diff --git a/history/es/LocationUtils.js b/history/es/LocationUtils.js new file mode 100644 index 0000000..3dc1816 --- /dev/null +++ b/history/es/LocationUtils.js @@ -0,0 +1,7 @@ +'use strict'; + +import warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js'; +warnAboutDeprecatedESMImport('LocationUtils'); + +import { LocationUtils } from '../esm/history.js'; +export default LocationUtils; diff --git a/history/es/PathUtils.js b/history/es/PathUtils.js new file mode 100644 index 0000000..7414d26 --- /dev/null +++ b/history/es/PathUtils.js @@ -0,0 +1,7 @@ +'use strict'; + +import warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js'; +warnAboutDeprecatedESMImport('PathUtils'); + +import { PathUtils } from '../esm/history.js'; +export default PathUtils; diff --git a/history/es/createBrowserHistory.js b/history/es/createBrowserHistory.js new file mode 100644 index 0000000..c05b105 --- /dev/null +++ b/history/es/createBrowserHistory.js @@ -0,0 +1,7 @@ +'use strict'; + +import warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js'; +warnAboutDeprecatedESMImport('createBrowserHistory'); + +import { createBrowserHistory } from '../esm/history.js'; +export default createBrowserHistory; diff --git a/history/es/createHashHistory.js b/history/es/createHashHistory.js new file mode 100644 index 0000000..ff40c25 --- /dev/null +++ b/history/es/createHashHistory.js @@ -0,0 +1,7 @@ +'use strict'; + +import warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js'; +warnAboutDeprecatedESMImport('createHashHistory'); + +import { createHashHistory } from '../esm/history.js'; +export default createHashHistory; diff --git a/history/es/createMemoryHistory.js b/history/es/createMemoryHistory.js new file mode 100644 index 0000000..1cc4caa --- /dev/null +++ b/history/es/createMemoryHistory.js @@ -0,0 +1,7 @@ +'use strict'; + +import warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js'; +warnAboutDeprecatedESMImport('createMemoryHistory'); + +import { createMemoryHistory } from '../esm/history.js'; +export default createMemoryHistory; diff --git a/history/es/createTransitionManager.js b/history/es/createTransitionManager.js new file mode 100644 index 0000000..37d4540 --- /dev/null +++ b/history/es/createTransitionManager.js @@ -0,0 +1,7 @@ +'use strict'; + +import warnAboutDeprecatedESMImport from './warnAboutDeprecatedESMImport.js'; +warnAboutDeprecatedESMImport('createTransitionManager'); + +import { createTransitionManager } from '../esm/history.js'; +export default createTransitionManager; diff --git a/history/es/warnAboutDeprecatedESMImport.js b/history/es/warnAboutDeprecatedESMImport.js new file mode 100644 index 0000000..8215fb2 --- /dev/null +++ b/history/es/warnAboutDeprecatedESMImport.js @@ -0,0 +1,35 @@ +'use strict'; + +var printWarning = function() {}; + +if (process.env.NODE_ENV !== 'production') { + printWarning = function(format, subs) { + var index = 0; + var message = + 'Warning: ' + + (subs.length > 0 + ? format.replace(/%s/g, function() { + return subs[index++]; + }) + : format); + + if (typeof console !== 'undefined') { + console.error(message); + } + + try { + // --- Welcome to debugging history --- + // This error was thrown as a convenience so that you can use the + // stack trace to find the callsite that triggered this warning. + throw new Error(message); + } catch (e) {} + }; +} + +export default function(member) { + printWarning( + 'Please use `import { %s } from "history"` instead of `import %s from "history/es/%s"`. ' + + 'Support for the latter will be removed in the next major release.', + [member, member] + ); +} |