@enact/core
Advanced tools
Comparing version 3.0.0-alpha.7 to 3.0.0-beta.1
@@ -5,2 +5,12 @@ # Change Log | ||
## [3.0.0-beta.1] - 2019-07-15 | ||
### Removed | ||
- `core/kind` config property `contextTypes` | ||
### Fixed | ||
- `core/platform` logic for webOS detection | ||
## [3.0.0-alpha.7] - 2019-06-24 | ||
@@ -7,0 +17,0 @@ |
@@ -14,4 +14,2 @@ "use strict"; | ||
var _warning = _interopRequireDefault(require("warning")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -143,3 +141,2 @@ | ||
contextType = config.contextType, | ||
contextTypes = config.contextTypes, | ||
defaultProps = config.defaultProps, | ||
@@ -151,3 +148,2 @@ handlers = config.handlers, | ||
cfgStyles = config.styles; | ||
process.env.NODE_ENV !== "production" ? (0, _warning["default"])(!contextTypes, "\"contextTypes\" used by ".concat(name || 'a component', " but is deprecated. Please replace with \"contextType\" instead.")) : void 0; | ||
var renderStyles = cfgStyles ? (0, _styles["default"])(cfgStyles) : false; | ||
@@ -213,3 +209,2 @@ var renderComputed = cfgComputed ? (0, _computed["default"])(cfgComputed) : false; | ||
if (propTypes) Component.propTypes = propTypes; | ||
if (contextTypes) Component.contextTypes = contextTypes; | ||
if (contextType) Component.contextType = contextType; | ||
@@ -216,0 +211,0 @@ if (defaultProps) Component.defaultProps = defaultProps; // Decorate the Component with the computed property object in DEV for easier testability |
{ | ||
"name": "@enact/core", | ||
"version": "3.0.0-alpha.7", | ||
"version": "3.0.0-beta.1", | ||
"description": "Enact is an open source JavaScript framework containing everything you need to create a fast, scalable mobile or web application.", | ||
@@ -38,5 +38,4 @@ "main": "index.js", | ||
"react-is": "^16.8.3", | ||
"recompose": "^0.26.0", | ||
"warning": "^3.0.0" | ||
"recompose": "^0.26.0" | ||
} | ||
} |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.platform = exports.detect = exports["default"] = void 0; | ||
exports.platform = exports.parseUserAgent = exports.detect = exports["default"] = void 0; | ||
@@ -87,19 +87,65 @@ var _uniq = _interopRequireDefault(require("ramda/src/uniq")); | ||
regex: /iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/ | ||
}, // webOS 1 - 3 | ||
}, // LG webOS | ||
{ | ||
platform: 'webos', | ||
regex: /(?:web|hpw)OS\/(\d+)/ | ||
}, // webOS 4 / OpenWebOS | ||
{ | ||
regex: /Web0S;.*Safari\/537.41/, | ||
forceVersion: 1 | ||
}, { | ||
platform: 'webos', | ||
regex: /WebAppManager|Isis|webOS\./, | ||
regex: /Web0S;.*Safari\/538.2/, | ||
forceVersion: 2 | ||
}, { | ||
platform: 'webos', | ||
regex: /Web0S;.*Chrome\/38/, | ||
forceVersion: 3 | ||
}, { | ||
platform: 'webos', | ||
regex: /Web0S;.*Chrome\/53/, | ||
forceVersion: 4 | ||
}, // Open webOS release LuneOS | ||
}, { | ||
platform: 'webos', | ||
regex: /Web0S;.*Chrome\/68/, | ||
forceVersion: 5 | ||
}, // LG webOS of indeterminate version | ||
{ | ||
platform: 'webos', | ||
regex: /Web0S;/, | ||
forceVersion: -1 | ||
}, // LuneOS | ||
{ | ||
platform: 'webos', | ||
regex: /LuneOS/, | ||
forceVersion: 4, | ||
forceVersion: -1, | ||
extra: { | ||
luneos: 1 | ||
} | ||
}, // Palm/HP/Open webOS | ||
{ | ||
platform: 'webos', | ||
regex: /WebAppManager|Isis|webOS\./, | ||
forceVersion: -1, | ||
extra: { | ||
legacy: 4 | ||
} | ||
}, { | ||
platform: 'webos', | ||
regex: /(?:web|hpw)OS\/1/, | ||
forceVersion: -1, | ||
extra: { | ||
legacy: 1 | ||
} | ||
}, { | ||
platform: 'webos', | ||
regex: /(?:web|hpw)OS\/2/, | ||
forceVersion: -1, | ||
extra: { | ||
legacy: 2 | ||
} | ||
}, { | ||
platform: 'webos', | ||
regex: /(?:web|hpw)OS\/3/, | ||
forceVersion: -1, | ||
extra: { | ||
legacy: 3 | ||
} | ||
}, // desktop Safari | ||
@@ -145,2 +191,36 @@ { | ||
var _platform; | ||
var parseUserAgent = function parseUserAgent(userAgent) { | ||
var plat = { | ||
gesture: hasGesture(), | ||
node: false, | ||
touch: hasTouch(), | ||
unknown: true | ||
}; | ||
for (var i = 0, p, m, v; p = platforms[i]; i++) { | ||
m = p.regex.exec(userAgent); | ||
if (m) { | ||
plat.unknown = false; | ||
if ('forceVersion' in p) { | ||
v = p.forceVersion; | ||
} else { | ||
v = Number(m[1]); | ||
} | ||
plat[p.platform] = v; | ||
if (p.extra) { | ||
plat = _objectSpread({}, plat, p.extra); | ||
} | ||
plat.platformName = p.platform; | ||
break; | ||
} | ||
} | ||
return plat; | ||
}; | ||
/** | ||
@@ -168,2 +248,4 @@ * @typedef {Object} PlatformDescription | ||
exports.parseUserAgent = parseUserAgent; | ||
var detect = function detect() { | ||
@@ -183,33 +265,3 @@ if (_platform) { | ||
var userAgent = ua(); | ||
_platform = { | ||
gesture: hasGesture(), | ||
node: false, | ||
touch: hasTouch(), | ||
unknown: true | ||
}; | ||
for (var i = 0, p, m, v; p = platforms[i]; i++) { | ||
m = p.regex.exec(userAgent); | ||
if (m) { | ||
_platform.unknown = false; | ||
if (p.forceVersion) { | ||
v = p.forceVersion; | ||
} else { | ||
v = Number(m[1]); | ||
} | ||
_platform[p.platform] = v; | ||
if (p.extra) { | ||
_platform = _objectSpread({}, _platform, p.extra); | ||
} | ||
_platform.platformName = p.platform; | ||
break; | ||
} | ||
} | ||
return _platform; | ||
return _platform = parseUserAgent(userAgent); | ||
}; | ||
@@ -216,0 +268,0 @@ /** |
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
177746
8
60
4694
7
- Removedwarning@^3.0.0
- Removedwarning@3.0.0(transitive)