Commit 2d2e0a3
committed
fix: ensure data is sent to analytics on preuninstall
CLI's analytics process is a detached one, so during `preuninstall` command, CLI just sends information to the detached process what should be tracked and finishes CLI's execution. After that `npm` starts removing the CLI package and its `node_modules`.
At this point the analytics process may still work and trying to send data, but as it relies on components in node_modules, which npm currently deletes, it fails to send information to Google Analytics.
To ensure correct data is send to Analytics, ensure tracking is finished before ending the preuninstall command.1 parent 7f18de6 commit 2d2e0a3
File tree
2 files changed
+10
-1
lines changed- lib/common
- commands
- test/unit-tests
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| 102 | + | |
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
| |||
0 commit comments