mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-25 23:03:36 +01:00
Updated to v1.3.6
This commit is contained in:
13
conf/site/node_modules/mini-create-react-context/README.md
generated
vendored
13
conf/site/node_modules/mini-create-react-context/README.md
generated
vendored
@@ -4,15 +4,15 @@
|
||||
<a href="https://packagephobia.now.sh/result?p=mini-create-react-context">
|
||||
<img alt="npm install size" src="https://packagephobia.now.sh/badge?p=mini-create-react-context">
|
||||
</a>
|
||||
<a href="https://bundlephobia.com/result?p=mini-create-react-context">
|
||||
<img alt="npm bundle size" src="https://img.shields.io/bundlephobia/min/mini-create-react-context.svg?style=flat-square">
|
||||
<a href="https://bundlephobia.com/result?p=mini-create-react-context@latest">
|
||||
<img alt="npm bundle size" src="https://img.shields.io/bundlephobia/min/mini-create-react-context/latest.svg?style=flat-square">
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/mini-create-react-context">
|
||||
<img alt="npm" src="https://img.shields.io/npm/v/mini-create-react-context.svg?style=flat-square">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
> (A smaller) Polyfill for the [proposed React context API](https://github.com/reactjs/rfcs/pull/2)
|
||||
> (A smaller) Polyfill for the [React context API](https://github.com/reactjs/rfcs/pull/2)
|
||||
|
||||
## Install
|
||||
|
||||
@@ -115,3 +115,10 @@ It will throw `A valid React element (or null) must be returned. You may have re
|
||||
</div>
|
||||
</Context.Provider>
|
||||
```
|
||||
|
||||
## Size difference to the original:
|
||||
| | original | **mini**
|
||||
|------------|----------|-----
|
||||
|install size| [**50 kB**](https://packagephobia.now.sh/result?p=create-react-context) | [140 kB](https://packagephobia.now.sh/result?p=mini-create-react-context)
|
||||
|minified | [3.3 kB](https://bundlephobia.com/result?p=create-react-context) | [**2.3kB**](https://bundlephobia.com/result?p=mini-create-react-context)
|
||||
|minzip | 1.3 kB | **1.0kB**
|
||||
|
||||
18
conf/site/node_modules/mini-create-react-context/dist/cjs/index.js
generated
vendored
18
conf/site/node_modules/mini-create-react-context/dist/cjs/index.js
generated
vendored
@@ -1,4 +1,10 @@
|
||||
'use strict';function _interopDefault(e){return(e&&(typeof e==='object')&&'default'in e)?e['default']:e}var React=require('react'),React__default=_interopDefault(React),_inheritsLoose=_interopDefault(require('@babel/runtime/helpers/inheritsLoose')),PropTypes=_interopDefault(require('prop-types')),gud=_interopDefault(require('gud')),warning=_interopDefault(require('tiny-warning'));var MAX_SIGNED_31_BIT_INT = 1073741823;
|
||||
'use strict';function _interopDefault(e){return(e&&(typeof e==='object')&&'default'in e)?e['default']:e}var React=require('react'),React__default=_interopDefault(React),_inheritsLoose=_interopDefault(require('@babel/runtime/helpers/inheritsLoose')),PropTypes=_interopDefault(require('prop-types')),warning=_interopDefault(require('tiny-warning'));var MAX_SIGNED_31_BIT_INT = 1073741823;
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
|
||||
|
||||
function getUniqueId() {
|
||||
var key = '__global_unique_id__';
|
||||
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
||||
}
|
||||
|
||||
function objectIs(x, y) {
|
||||
if (x === y) {
|
||||
@@ -38,11 +44,9 @@ function onlyChild(children) {
|
||||
function createReactContext(defaultValue, calculateChangedBits) {
|
||||
var _Provider$childContex, _Consumer$contextType;
|
||||
|
||||
var contextProp = '__create-react-context-' + gud() + '__';
|
||||
var contextProp = '__create-react-context-' + getUniqueId() + '__';
|
||||
|
||||
var Provider =
|
||||
/*#__PURE__*/
|
||||
function (_Component) {
|
||||
var Provider = /*#__PURE__*/function (_Component) {
|
||||
_inheritsLoose(Provider, _Component);
|
||||
|
||||
function Provider() {
|
||||
@@ -94,9 +98,7 @@ function createReactContext(defaultValue, calculateChangedBits) {
|
||||
|
||||
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
||||
|
||||
var Consumer =
|
||||
/*#__PURE__*/
|
||||
function (_Component2) {
|
||||
var Consumer = /*#__PURE__*/function (_Component2) {
|
||||
_inheritsLoose(Consumer, _Component2);
|
||||
|
||||
function Consumer() {
|
||||
|
||||
2
conf/site/node_modules/mini-create-react-context/dist/cjs/index.min.js
generated
vendored
2
conf/site/node_modules/mini-create-react-context/dist/cjs/index.min.js
generated
vendored
@@ -1 +1 @@
|
||||
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var React=require("react"),React__default=_interopDefault(React),_inheritsLoose=_interopDefault(require("@babel/runtime/helpers/inheritsLoose")),PropTypes=_interopDefault(require("prop-types")),gud=_interopDefault(require("gud")),warning=_interopDefault(require("tiny-warning")),MAX_SIGNED_31_BIT_INT=1073741823;function objectIs(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function createEventEmitter(n){var r=[];return{on:function(t){r.push(t)},off:function(e){r=r.filter(function(t){return t!==e})},get:function(){return n},set:function(t,e){n=t,r.forEach(function(t){return t(n,e)})}}}function onlyChild(t){return Array.isArray(t)?t[0]:t}function createReactContext(r,o){var t,e,i="__create-react-context-"+gud()+"__",n=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).emitter=createEventEmitter(t.props.value),t}_inheritsLoose(t,e);var n=t.prototype;return n.getChildContext=function(){var t;return(t={})[i]=this.emitter,t},n.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e,n=this.props.value,r=t.value;objectIs(n,r)?e=0:(e="function"==typeof o?o(n,r):MAX_SIGNED_31_BIT_INT,"production"!==process.env.NODE_ENV&&warning((e&MAX_SIGNED_31_BIT_INT)===e,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: "+e),0!==(e|=0)&&this.emitter.set(t.value,e))}},n.render=function(){return this.props.children},t}(React.Component);n.childContextTypes=((t={})[i]=PropTypes.object.isRequired,t);var u=function(t){function e(){var n;return(n=t.apply(this,arguments)||this).state={value:n.getValue()},n.onUpdate=function(t,e){0!=((0|n.observedBits)&e)&&n.setState({value:n.getValue()})},n}_inheritsLoose(e,t);var n=e.prototype;return n.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?MAX_SIGNED_31_BIT_INT:e},n.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?MAX_SIGNED_31_BIT_INT:t},n.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},n.getValue=function(){return this.context[i]?this.context[i].get():r},n.render=function(){return onlyChild(this.props.children)(this.state.value)},e}(React.Component);return u.contextTypes=((e={})[i]=PropTypes.object,e),{Provider:n,Consumer:u}}var index=React__default.createContext||createReactContext;module.exports=index;
|
||||
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=require("react"),n=t(e),r=t(require("@babel/runtime/helpers/inheritsLoose")),o=t(require("prop-types")),i=t(require("tiny-warning")),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function s(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var a=n.createContext||function(t,n){var a,c,l,p="__create-react-context-"+(u[l="__global_unique_id__"]=(u[l]||0)+1)+"__",f=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).emitter=s(e.props.value),e}r(e,t);var o=e.prototype;return o.getChildContext=function(){var t;return(t={})[p]=this.emitter,t},o.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e,r=this.props.value,o=t.value;((u=r)===(s=o)?0!==u||1/u==1/s:u!=u&&s!=s)?e=0:(e="function"==typeof n?n(r,o):1073741823,"production"!==process.env.NODE_ENV&&i((1073741823&e)===e,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: "+e),0!==(e|=0)&&this.emitter.set(t.value,e))}var u,s},o.render=function(){return this.props.children},e}(e.Component);f.childContextTypes=((a={})[p]=o.object.isRequired,a);var v=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}r(n,e);var o=n.prototype;return o.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?1073741823:e},o.componentDidMount=function(){this.context[p]&&this.context[p].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?1073741823:t},o.componentWillUnmount=function(){this.context[p]&&this.context[p].off(this.onUpdate)},o.getValue=function(){return this.context[p]?this.context[p].get():t},o.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(e.Component);return v.contextTypes=((c={})[p]=o.object,c),{Provider:f,Consumer:v}};module.exports=a;
|
||||
19
conf/site/node_modules/mini-create-react-context/dist/esm/index.js
generated
vendored
19
conf/site/node_modules/mini-create-react-context/dist/esm/index.js
generated
vendored
@@ -1,10 +1,15 @@
|
||||
import React, { Component } from 'react';
|
||||
import _inheritsLoose from '@babel/runtime/helpers/inheritsLoose';
|
||||
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
|
||||
import PropTypes from 'prop-types';
|
||||
import gud from 'gud';
|
||||
import warning from 'tiny-warning';
|
||||
|
||||
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
|
||||
|
||||
function getUniqueId() {
|
||||
var key = '__global_unique_id__';
|
||||
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
||||
}
|
||||
|
||||
function objectIs(x, y) {
|
||||
if (x === y) {
|
||||
@@ -44,11 +49,9 @@ function onlyChild(children) {
|
||||
function createReactContext(defaultValue, calculateChangedBits) {
|
||||
var _Provider$childContex, _Consumer$contextType;
|
||||
|
||||
var contextProp = '__create-react-context-' + gud() + '__';
|
||||
var contextProp = '__create-react-context-' + getUniqueId() + '__';
|
||||
|
||||
var Provider =
|
||||
/*#__PURE__*/
|
||||
function (_Component) {
|
||||
var Provider = /*#__PURE__*/function (_Component) {
|
||||
_inheritsLoose(Provider, _Component);
|
||||
|
||||
function Provider() {
|
||||
@@ -100,9 +103,7 @@ function createReactContext(defaultValue, calculateChangedBits) {
|
||||
|
||||
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
||||
|
||||
var Consumer =
|
||||
/*#__PURE__*/
|
||||
function (_Component2) {
|
||||
var Consumer = /*#__PURE__*/function (_Component2) {
|
||||
_inheritsLoose(Consumer, _Component2);
|
||||
|
||||
function Consumer() {
|
||||
|
||||
65
conf/site/node_modules/mini-create-react-context/package.json
generated
vendored
65
conf/site/node_modules/mini-create-react-context/package.json
generated
vendored
@@ -1,32 +1,32 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"mini-create-react-context@0.3.2",
|
||||
"/home/henry/Documents/git/Speedtest-checker"
|
||||
"mini-create-react-context@0.4.0",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_from": "mini-create-react-context@0.3.2",
|
||||
"_id": "mini-create-react-context@0.3.2",
|
||||
"_from": "mini-create-react-context@0.4.0",
|
||||
"_id": "mini-create-react-context@0.4.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw==",
|
||||
"_integrity": "sha512-b0TytUgFSbgFJGzJqXPKCFCBWigAjpjo+Fl7Vf7ZbKRDptszpppKxXH6DRXEABZ/gcEQczeb0iZ7JvL8e8jjCA==",
|
||||
"_location": "/mini-create-react-context",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "mini-create-react-context@0.3.2",
|
||||
"raw": "mini-create-react-context@0.4.0",
|
||||
"name": "mini-create-react-context",
|
||||
"escapedName": "mini-create-react-context",
|
||||
"rawSpec": "0.3.2",
|
||||
"rawSpec": "0.4.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.3.2"
|
||||
"fetchSpec": "0.4.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/react-router"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz",
|
||||
"_spec": "0.3.2",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-checker",
|
||||
"_resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.0.tgz",
|
||||
"_spec": "0.4.0",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "StringEpsilon"
|
||||
},
|
||||
@@ -34,35 +34,34 @@
|
||||
"url": "https://github.com/StringEpsilon/mini-create-react-context/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.4.0",
|
||||
"gud": "^1.0.0",
|
||||
"tiny-warning": "^1.0.2"
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"tiny-warning": "^1.0.3"
|
||||
},
|
||||
"description": "Smaller Polyfill for the proposed React context API",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.4.3",
|
||||
"@babel/core": "^7.4.3",
|
||||
"@babel/plugin-proposal-class-properties": "^7.4.0",
|
||||
"@babel/preset-env": "^7.4.3",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/preset-typescript": "^7.3.3",
|
||||
"@types/enzyme": "^3.9.1",
|
||||
"@types/jest": "^24.0.11",
|
||||
"@types/react": "^16.8.13",
|
||||
"@wessberg/rollup-plugin-ts": "^1.1.46",
|
||||
"babel-jest": "^24.7.1",
|
||||
"enzyme": "^3.9.0",
|
||||
"enzyme-adapter-react-16": "^1.11.2",
|
||||
"@babel/core": "^7.8.6",
|
||||
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
||||
"@babel/preset-env": "^7.8.6",
|
||||
"@babel/preset-react": "^7.8.3",
|
||||
"@babel/preset-typescript": "^7.8.3",
|
||||
"@types/enzyme": "^3.10.5",
|
||||
"@types/jest": "^25.1.3",
|
||||
"@types/react": "^16.8.23",
|
||||
"@wessberg/rollup-plugin-ts": "^1.2.19",
|
||||
"babel-jest": "^25.1.0",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.2",
|
||||
"enzyme-to-json": "^3.3.5",
|
||||
"jest": "^24.7.1",
|
||||
"jest": "^25.1.0",
|
||||
"prop-types": "^15.6.0",
|
||||
"raf": "^3.4.1",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"rollup": "^1.10.0",
|
||||
"rollup-plugin-commonjs": "^9.3.4",
|
||||
"rollup-plugin-node-resolve": "^4.2.3",
|
||||
"rollup-plugin-uglify": "^6.0.2"
|
||||
"rollup": "^1.17.0",
|
||||
"rollup-plugin-commonjs": "^10.0.1",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-terser": "^5.2.0",
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"files": [
|
||||
"dist/**"
|
||||
@@ -98,5 +97,5 @@
|
||||
"test": "jest"
|
||||
},
|
||||
"types": "dist/index.d.ts",
|
||||
"version": "0.3.2"
|
||||
"version": "0.4.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user