@vaadin/vaadin-element-mixin
Advanced tools
Comparing version 1.1.2 to 2.0.0-beta1
@@ -12,3 +12,3 @@ { | ||
"name": "@vaadin/vaadin-element-mixin", | ||
"version": "1.1.2", | ||
"version": "2.0.0-beta1", | ||
"main": "vaadin-element-mixin.js", | ||
@@ -28,4 +28,4 @@ "author": "Vaadin Ltd", | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/vaadin-usage-statistics": "^1.1.0-beta1", | ||
"@vaadin/vaadin-development-mode-detector": "^1.1.0-beta1" | ||
"@vaadin/vaadin-usage-statistics": "^2.0.0-beta2", | ||
"@vaadin/vaadin-development-mode-detector": "^2.0.0-beta1" | ||
}, | ||
@@ -32,0 +32,0 @@ "devDependencies": { |
@@ -1,4 +0,20 @@ | ||
import '@vaadin/vaadin-development-mode-detector/vaadin-development-mode-detector.js'; | ||
import { usageStatistics } from '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js'; | ||
if (!window.Vaadin) { | ||
window['Vaadin'] = {}; | ||
} | ||
/** | ||
* Array of Vaadin custom element classes that have been finalized. | ||
*/ | ||
window['Vaadin'].registrations = window.Vaadin.registrations || []; | ||
// Use the hack to prevent polymer-modulizer from converting to exports | ||
window['Vaadin'].developmentModeCallback = window.Vaadin.developmentModeCallback || {}; | ||
window['Vaadin'].developmentModeCallback['vaadin-usage-statistics'] = function() { | ||
if (usageStatistics) { | ||
usageStatistics(); | ||
} | ||
}; | ||
/** | ||
* @polymerMixin | ||
@@ -9,9 +25,18 @@ */ | ||
return class VaadinElementMixin extends superClass { | ||
/** @protected */ | ||
static _finalizeClass() { | ||
super._finalizeClass(); | ||
// Registers a class prototype for telemetry purposes. | ||
if (this.is) { | ||
window.Vaadin.registrations.push(this); | ||
} | ||
} | ||
}; | ||
} finally { | ||
// This is run every time a new class is declared, not every time an instance is created | ||
if (window.Vaadin.runIfDevelopmentMode) { | ||
window.Vaadin.runIfDevelopmentMode('vaadin-usage-statistics'); | ||
if (window.Vaadin.developmentModeCallback) { | ||
window.Vaadin.developmentModeCallback['vaadin-usage-statistics'](); | ||
} | ||
} | ||
}; |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
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
12991
37
1
+ Added@vaadin/vaadin-development-mode-detector@2.0.7(transitive)
+ Added@vaadin/vaadin-usage-statistics@2.1.3(transitive)
- Removed@vaadin/vaadin-development-mode-detector@1.1.0(transitive)
- Removed@vaadin/vaadin-usage-statistics@1.1.0(transitive)
Updated@vaadin/vaadin-development-mode-detector@^2.0.0-beta1