vaadin / vaadin-usage-statistics Goto Github PK
View Code? Open in Web Editor NEWDevelopment-time usage statistics collector.
License: Apache License 2.0
Development-time usage statistics collector.
License: Apache License 2.0
Child of vaadin/vaadin-core#186
Note: it might make sense to create vaadin-usage-statistics.d.ts
manually.
Hello,
When installing a project with npm install --ignore-script
, the usageStatistics
method is not exported in the vaadin-usage-statistics.js
file. This is the actual content:
import './vaadin-usage-statistics-collect.js';
Thus, making it unusable as soon as you want to build a project using a vaadin component.
A solution could be to change the default content to the following:
export { usageStatistics } from './vaadin-usage-statistics-collect.js';
What do you think ?
I'd tried to make a PR myself, but I'm a little lost on how/which file I should modify to commit the changes. How vaadin-usage-statistics-collect.html
is transpiled into vaadin-usage-statistics-collect.js
?
Thanks for reading my issue and keep up the good work !
We should not convert this repo using modulizer.
Currently, when executing following command:
yarn add @vaadin/vaadin-usage-statistics
The output looks like this:
success Saved 3 new dependencies.
info Direct dependencies
└─ @vaadin/[email protected]
info All dependencies
├─ @polymer/[email protected]
├─ @vaadin/[email protected]
└─ @webcomponents/[email protected]
Related to vaadin/router#32
With the latest Flow, that uses shrinkwrap packages, you see the info message three times during npm install
> @vaadin/[email protected] postinstall .../node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics
> node check.js
Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
npm explore @vaadin/vaadin-usage-statistics -- npm run disable
to store disable statistics for the machine, or add
"vaadin": { "disableUsageStatistics": true }
to the project package.json and re-run npm install to disable statistics for the project.
For more details, see https://github.com/vaadin/vaadin-usage-statistics
> @vaadin/[email protected] postinstall .../node_modules/@vaadin/vaadin-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics
> node check.js
Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
npm explore @vaadin/vaadin-usage-statistics -- npm run disable
to store disable statistics for the machine, or add
"vaadin": { "disableUsageStatistics": true }
to the project package.json and re-run npm install to disable statistics for the project.
For more details, see https://github.com/vaadin/vaadin-usage-statistics
> @vaadin/[email protected] postinstall .../node_modules/@vaadin/vaadin-usage-statistics
> node check.js
Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
npm explore @vaadin/vaadin-usage-statistics -- npm run disable
to store disable statistics for the machine, or add
"vaadin": { "disableUsageStatistics": true }
to the project package.json and re-run npm install to disable statistics for the project.
For more details, see https://github.com/vaadin/vaadin-usage-statistics
It seems Bower with --force-latest
has problems to use the optout
branch, even when we define the commit hash in resolutions
.
Excerpt from bower.json
:
{
"dependencies": {
"vaadin-grid": "vaadin/vaadin-grid#5.0.4",
"vaadin-usage-statistics": "vaadin/vaadin-usage-statistics#optout"
},
"resolutions": {
"vaadin-usage-statistics": "e-tag:61ea340"
}
}
It's somehow misleading if 1.0.5 is released but the package.json is still 1.0.1
There is no way that this can work if you list Vaadin elements to check for. The list is already outdated / missing elements.
It would be nice to have an option in the package.json file to avoid using the vaadin-stats module instead of running a command.
Exemple: package.json
{
...
anonymousStatistics: false // or vaadinStats: false
...
}
Per the instructions on how to opt-out, the vaadin-usage-statistics.js
file is indeed empty:
$ cat ./node_modules/@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js
export const usageStatistics = function() {
/* do nothing */
};
However, in the browser, the window.localStorage
object continues to have usage statistics inserted. Running the following code in the console reveals the violation:
for (let i = 0; i < localStorage.length; i++) {
console.log(i, localStorage.key(i));
}
Console output:
0 vaadin.statistics.firstuse
1 vaadin.statistics.basket
Statistics aren't being gathered properly (since V12 platform)
In npm package version 2.1.1 there is no disable script in package.json. As a result, opting out via command npm explore @vaadin/vaadin-usage-statistics -- npm run disable
fails with error missing script: disable
There should be instructions in the README about how to opt out when using npm. Preferrably with a method similar to the one for Bower and for Flow
Hi,
While running:
npm install --production
npm explore @vaadin/vaadin-usage-statistics -- npm run disable
polymer build
...
�[31merror�[39m: Promise rejection: Error: Could not load @vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js (imported by node_modules/%40vaadin/vaadin-element-mixin/vaadin-element-mixin.js): ENOENT: no such file or directory, open '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js'
�[31merror�[39m: Error: Could not load @vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js (imported by node_modules/%40vaadin/vaadin-element-mixin/vaadin-element-mixin.js): ENOENT: no such file or directory, open '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js'
If I enable the stats again, the build works
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.