Comments (4)
Ah, that makes sense. I've got a patch for this and am meditating on how I want to test it, so it should land soonish. =)
from gauge.
Fixed in [email protected]! =)
from gauge.
Having more than one gauge at a time is pretty weird. What's your use case for that?
Currently the way it's written the expectation is that the onExit handler should exist as long as the gauge object does. As we have no way of knowing when a gauge object goes away, we have to hold on to it and it's going to be eternal.
I'm up for patching it so that it only keeps the onExit active as long as the gauge is enabled. This'd have the advantage of allowing disabled gauges to be garbage collected. Besides, having more than one gauge
object enabled at a time is almost certainly an error as they'll write over each other. (If you have need of multiple gauges updating at once you're should be using gauge/plumbing
and doing the screen updates yourself.)
from gauge.
@iarna Thanks for looking at this. :) Proposed patch sounds perfect.
It's not technically necessary to have them at the same time, which would be epilepsy-inducing, but merely instantiated in the same process over time. I encountered this in a CLI app that watches files and re-processes them, showing a new gauge each time. Upon the tenth file change it threw the above exit
error. At no point was there more than one gauge visible, but their global event listeners were essentially leaking.
from gauge.
Related Issues (20)
- New line before progress bar? HOT 6
- Disable if running in CI HOT 1
- Misspelling in Description, should be "gauge"
- Progress bar theme set to 'fallback' regardless of unicode locale on Fedora Linux HOT 5
- Make new release HOT 2
- npm does not store tarball URL in lockfile
- [BUG] Cannot find module 'object-assign' HOT 2
- [FEATURE] Dependencies should be updated to dedupe the tree for npm HOT 2
- [Question] Upgrade Dependencies to fix Vulnerability HOT 16
- [BUG] Themes no longer work from require
- Reporting a vulnerability HOT 1
- Image in readme is out of date!! HOT 1
- Help me bikeshed the gauge look HOT 15
- every time I use it, I expect show to pulse too HOT 1
- Display corruption on node 0.10/0.12 on Windows
- Progress bar not color with invert ansi/vt100 code in cmd.exe
- Temporary files on npm release HOT 4
- Am I using gauge wrong?
- TypeError: Object.keys called on non-object HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gauge.