Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

npm watch.js is out of date, silently breaks on examples #54

Open
mikemaccana opened this issue Aug 16, 2013 · 3 comments
Open

npm watch.js is out of date, silently breaks on examples #54

mikemaccana opened this issue Aug 16, 2013 · 3 comments

Comments

@mikemaccana
Copy link
Contributor

The following example is taken directly from the current watch.js docs:

var WatchJS = require("watchjs")

//defining our object no matter which way we want
var ex = {
  l1a: "bla bla",
  l1b: {
    l2a: "lo lo",
    l2b: "hey hey"
  }
};

WatchJS.watch(ex, function (prop, action, difference, oldvalue){
  console.log("prop: "+prop+"\n action: "+action+"\n difference: "+JSON.stringify(difference)+"\n old: "+JSON.stringify(oldvalue)+"\n ... and the context: "+JSON.stringify(this));
}, 0, true);


ex.l1b.l2c = "new attr"; //it is not instantaneous, you may wait 50 miliseconds

setTimeout(function(){
  ex.l1b.l2c = "other value";
}, 100);

This will silently fail on watch.js as implemented on npm. Replacing node_modules/src/watch.js with the current one from github will fix the issue.

I can reproduce this on demand if needed BTW.

@melanke
Copy link
Owner

melanke commented Sep 11, 2013

well the WatchJS of the npm is outdated, someone else is the maintaner and I have no control =/
I've already asked to be added as mainteiner, do you know how I could fix this?

@gdude2002
Copy link

Both the version on NPM and the version in this repo are silently failing on Node for me, using the above example.

I'm using Node v0.10.26.

@mikemaccana
Copy link
Contributor Author

The 'watchjs' uploaded to npm is maintained by Matt Bell (@mappum) - Matt could you please transfer the package to Gil (@melanke) ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants