@invisionapp/studio-api
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -10,2 +10,7 @@ # Changelog | ||
## 3.2.0 - 2019-05-02 | ||
## Added | ||
- Added `React` as a global libraries that is exposed to plugins to facilitate | ||
React hooks. | ||
## 3.1.0 - 2019-04-09 | ||
@@ -12,0 +17,0 @@ ## Added |
16
index.js
// API major version | ||
const APIversion = 0; | ||
// Global key | ||
const key = 'invision@external'; | ||
// Global keys | ||
const GLOBAL_API_KEY = 'invision@external'; | ||
const GLOBAL_REACT_KEY = 'invision@react'; | ||
const getApi = ((typeof global !== 'undefined') && (typeof global[key] === 'function')) | ||
? global[key] | ||
: () => { return null; }; | ||
const getApi = | ||
typeof global !== 'undefined' && typeof global[GLOBAL_API_KEY] === 'function' | ||
? global[GLOBAL_API_KEY] : () => { return null; }; | ||
const getReact = | ||
typeof global !== 'undefined' && typeof global[GLOBAL_REACT_KEY] === 'function' | ||
? global[GLOBAL_REACT_KEY] : null; | ||
const context = { version: APIversion }; | ||
@@ -18,1 +23,2 @@ | ||
module.exports = getApi(context); | ||
module.exports.React = getReact(); |
{ | ||
"name": "@invisionapp/studio-api", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
19311
471
1