Code Monkey home page Code Monkey logo

can-observation's Introduction

can-observation's People

Contributors

andrejewski avatar aosanders avatar bigab avatar bmomberger-bitovi avatar chasenlehara avatar cherifgsoul avatar christopherjbaker avatar daffl avatar greenkeeper[bot] avatar greenkeeperio-bot avatar imaustink avatar justinbmeyer avatar m-mujica avatar matthewp avatar nlundquist avatar phillipskevin avatar sinjhin avatar thomaswilburn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

can-observation's Issues

3.3.0 removed reader.js

Hi there - I see that reader/reader.js was removed in version 3.3.0 - since this is breaking backwrads compatibility, this should have a 4.0.0 release.

An in-range update of can-event-queue is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye πŸ‘‹ and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The dependency can-event-queue was updated from 1.1.7 to 1.1.8.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

can-event-queue is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 4 commits ahead by 4, behind by 1.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of can-reflect is breaking the build 🚨

The dependency can-reflect was updated from 1.17.9 to 1.17.10.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

can-reflect is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 12 commits.

  • c4e1514 Update dist for release
  • f2f3aa5 Merge pull request #164 from canjs/special-case-dates
  • aec565d Add a sanity check for dates to date test
  • c03d172 Add a dates test
  • 7e07a84 Make a special case for Dates when sorting keys in objects
  • 7cfa06a Upgrade Sauce Labs Appium version (#161)
  • 6b8c65a regenerated travis deploy key
  • 2632be5 Merge pull request #156 from canjs/greenkeeper/testee-0.9.0
  • 09dba37 Merge pull request #157 from canjs/landscaper/update-default-repos
  • 59d314a Update README.md
  • 21ff285 Update README generated by DoneJS
  • a69bda1 chore(package): update testee to version 0.9.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

updateChildrenAndSelf may throw when dereferencing observation.deriveQueue.isEnqueued

updateChildrenAndSelf attempts to flush a pending update to ensure the returned value is up to date.

Observation.updateChildrenAndSelf = function(observation){
// If the observable has an `update` method and it's enqueued, flush that task immediately so
// the value is right.
// > NOTE: This only works for `Observation` right now. We need a way of knowing how
// > to find what an observable might have in the `deriveQueue`.
if(observation.update !== undefined && observation.deriveQueue.isEnqueued( observation.update ) === true) {
// TODO: In the future, we should be able to send log information
// to explain why this needed to be updated.
observation.deriveQueue.flushQueuedTask(observation.update);
return true;
}

I have noticed this failing where observation is a ResolverObservable (from can-simple-observable/resolver/resolver) because it defines an update function, but does not have a deriveQueue property.

For Observation itself, that property is simply aliasing canQueues.deriveQueue.
Wouldn't it be safe to simply also add it to ResolverObservable ?

Moreover; shouldn't it - for both these types - actually be a property of their protoype rather than a per-instance property?

An in-range update of can-observation-recorder is breaking the build 🚨

The dependency can-observation-recorder was updated from 1.3.0 to 1.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

can-observation-recorder is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 10 commits.

  • 6961505 1.3.1
  • ebb3e7a Merge pull request #17 from canjs/landscaper/qunit2
  • a4d490a Fix tests for QUnit 2
  • bb2b60b Add @package so the GitHub & npm badges show up in the docs (#13)
  • 1c5052e Landscaper: QUnit2 upgrade
  • 88dfe03 Merge pull request #15 from canjs/greenkeeper/initial
  • 2f651ca chore(package): update dependencies
  • be11538 Merge pull request #14 from canjs/landscaper/update-default-repos
  • b024012 Update README.md
  • 7b8d644 Update README generated by DoneJS

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of can-cid is breaking the build 🚨

The devDependency can-cid was updated from 1.3.0 to 1.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

can-cid is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 7 commits.

  • b7bcbc1 Update dist for release
  • 00cb9b9 Merge pull request #43 from canjs/landscaper/qunit2
  • caa8d5d Merge branch 'master' into landscaper/qunit2
  • bd45bfc Upgrade Sauce Labs Appium version (#44)
  • 282dbfd Upgrade testee
  • 29f67c7 Landscaper: QUnit2 upgrade
  • 462ee7b Update README generated by DoneJS (#41)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of can-util is breaking the build 🚨

Version 3.3.2 of can-util just got published.

Branch Build failing 🚨
Dependency can-util
Current Version 3.3.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As can-util is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Commits

The new version differs by 8 commits .

  • 3bd0e68 Update dist for release
  • 4405fb1 Merge pull request #202 from canjs/cid-set-undefined
  • 613f73e handling calling CIDMap.prototype.get with a value not in the map
  • cffc4fc Merge pull request #200 from canjs/travis-firefox
  • fa7ab36 Update .travis.yml
  • 5acc56f Merge pull request #197 from canjs/overview
  • 5bb1fe8 change camel case to delimiter-separated
  • 0a41a72 draft of overview

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of can-util is breaking the build 🚨

Version 3.1.1 of can-util just got published.

Branch Build failing 🚨
Dependency can-util
Current Version 3.1.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As can-util is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Commits

The new version differs by 11 commits .

  • fbd3b3a Update dist for release
  • 0b2620d Merge pull request #170 from canjs/update-build-script
  • e5a8020 updating build script to work with steal-tools 1.0
  • 2bcea7d Merge pull request #169 from canjs/cid-types-1.0
  • 0cc9045 using can-types implementation of isPromise
  • 39dffe6 removing dependency on can-event
  • 9f24705 using lates can-cid, can-types
  • c4368d1 Merge pull request #163 from canjs/missed-namespace
  • 002e28d Merge pull request #161 from canjs/greenkeeper/steal-tools-1.0.0
  • 2a64ec8 changing a missed reference to can-util/namespace
  • d90860d chore(package): update steal-tools to version 1.0.0

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of can-log is breaking the build 🚨

The dependency can-log was updated from 1.0.0 to 1.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

can-log is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 14 commits ahead by 14, behind by 1.

  • 8c5ac1d 1.0.1
  • 38abe96 Update version number
  • 4022341 Merge pull request #17 from canjs/landscaper/qunit2
  • 01556ad Fix tests for QUnit 2
  • 53ff5d9 Landscaper: QUnit2 upgrade
  • 43d8181 Merge pull request #13 from canjs/greenkeeper/initial
  • ddbb6b5 chore(package): update dependencies
  • 22e3f41 Merge pull request #12 from canjs/landscaper/update-default-repos
  • 7b5d4a7 Update README.md
  • 21482ef Update README generated by DoneJS
  • df0c219 Merge pull request #10 from canjs/landscaper/4217-use-strict
  • 1b43d65 Merge pull request #11 from canjs/fix-webpack-debug-style
  • 66d2087 fix dev code for webpack compatibility
  • 47c04be Adds use strict. Fixes canjs/canjs#4217

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

create deferred observation

A way to execute an obsvervation, asynchronously, via external start/stop methods.

var obs = new Observation();
obs.startDeferred();
obs.stopDeferred();

An in-range update of can-event is breaking the build 🚨

Version 3.1.1 of can-event just got published.

Branch Build failing 🚨
Dependency can-event
Current Version 3.1.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As can-event is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes Using can-util/js/log/log instead of console.log

#36

Commits

The new version differs by 4 commits .

  • 34d685f Update dist for release
  • 7b0b865 Merge pull request #37 from canjs/console-logs
  • 63afce6 firefox 51.0
  • ad76ea6 using can-util/js/log/log

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of can-define is breaking the build 🚨

Version 1.2.0 of can-define just got published.

Branch Build failing 🚨
Dependency can-define
Current Version 1.0.26
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As can-define is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 13 commits.

  • 26d4b30 Update dist for release
  • 3fdaa23 fixing postversion script
  • 1707547 getting tests to pass with reflect apis (#165)
  • 826461d Merge pull request #212 from canjs/fix-qunit-ok
  • 4d07c86 Merge pull request #189 from canjs/dont-redefine-data
  • 34f0854 Replaced QUnit.ok with QUnit.equal
  • 34b8f5c Fixing the incorrect use of QUnit.ok
  • 18531dd Merge remote-tracking branch 'origin/master' into dont-redefine-data
  • e3c3858 Make tests work on all supported platforms, including unrelated IE issue
  • fbf76d1 fix jshint error
  • b2c10a8 fix jshint error
  • 9715a88 Add test to show that sealed objects are still not extensible
  • f023cbc Don't attempt to redefine _data or _computed on DefineMaps if they're already defined

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of can-map is breaking the build 🚨

Version 3.0.6 of can-map just got published.

Branch Build failing 🚨
Dependency can-map
Current Version 3.0.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As can-map is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes Using can-util/js/log/log instead of console.log

#32

Commits

The new version differs by 4 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of steal-tools is breaking the build 🚨

Version 1.2.0 of steal-tools just got published.

Branch Build failing 🚨
Dependency steal-tools
Current Version 1.1.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As steal-tools is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes 1.2.0

This release adds the development bundles feature. You can learn more about the development bundle feature in the Steal 1.3.0 release notes.

Issues

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of steal is breaking the build 🚨

Version 1.3.0 of steal just got published.

Branch Build failing 🚨
Dependency steal
Current Version 1.2.11
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As steal is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Pull out "stack and updater" part of can-observation

can-observation-stack

var observationStack = require("can-observation-stack");

var observation = new Observation();

observationStack.push(observation);

// do stuff ....
observationStack.add( x, "event" );
// ....

observationStack.pop();

observation.updateBindings()

An observation would need something like:

{
  // can have traps if the stack is available
  traps: [{obj, event, name}]
  //
  newObserved: Object<name, {obj,event}>
}

Another alternative is that .pop() returns the newObserved object:

var observationStack = require("can-observation-stack");

var observation = new Observation();

observationStack.push(observation);

// do stuff ....
observationStack.add( x, "event" );
// ....

observation.updateBindings( observationStack.pop() )

Handle observations being left on the stack

It is possible for an observation to be left on the observationStack here, for instance if a compute throws:

var c = compute(function(){
    throw new Error('oh noes!');
});

try {
    c.bind('change', function(){});
} catch(e) {
    Observation.isRecording(); // !!false
}

This can cause strange behavior because all computes will act as if they are bound. For example, in the code below resolve will be defined in the asynchronous getter for foo even though nothing is binding on foo:

var M = CanMap.extend({
    define: {
        foo: {
            get: function(set, resolve) {
                if (resolve) {
                    resolve('bar');
                }
            }
        }
    }
});

var m = new M();

m.attr('foo'); // 'bar'

We should consider warning people when this happens so that they can either:

  1. handle thrown errors within their computes
  2. use something like compute.safe(function(){...}) which we could provide to wrap the function call in a try/catch

We can tell if this happens by polling Observation.isRecording() with a setTimeout. If it is ever true, it means that something was not popped off the stack.

Add API for getting the value of an observation

Right now you can use can-reflect to get the value of an observation, but it’d be nice if there was a more simple API for doing that. Related, some observables build on top of can-observation and make it possible to set values; a consistent, friendly API for both getting and setting values would be nice.

Two options stick out to me:

  1. Document get() and suggest that other observables implement a set() method. That would look something like:
import Observation from "can-observation";
import keyObservable from "can-simple-observable/key/key";

const observation = new Observation(() => 15);
observation.get(); // -> 15

const observable = keyObservable(/* ... */);
observable.set(22);
observable.get(); // -> 22
  1. Create a configurable value property on observations:
import Observation from "can-observation";
import keyObservable from "can-simple-observable/key/key";

const observation = new Observation(() => 15);
observation.value; // -> 15

const observable = keyObservable(/* ... */);
observable.value = 22;
observable.value; // -> 22

Move state to can-observation-stack

I think we should create a can-observation-stack that exports:

.stack
.add()
.trap()
.trapsCount()
.ignore()

This will expose the truly stateful part of can-observation, allowing different can-observation versions. This is important because can-observation changes a decent amount, and it's very hard to make those changes and get the right version into all projects that use can-observation.

can-observation-stack would be much less likely to change.

API changes

Playing on the theme that this library is about manipulating a stack of observations.

  • module: can-observation
  • ObserveInfo.observe(obj, event) -> Observation.add(obj, event)
  • ObserveInfo.observes(observes) -> Observation.addAll(observations)
  • ObserveInfo.notObserve(fn) -> Observation.ignore(fn)
  • Keep .trap() named the same (can't think of a better name here).

An in-range update of can-key-tree is breaking the build 🚨

The dependency can-key-tree was updated from 1.2.0 to 1.2.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

can-key-tree is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 11 commits ahead by 11, behind by 1.

  • c757b7f 1.2.1
  • 584ecad Update version number
  • 037402a Merge pull request #19 from canjs/landscaper/qunit2
  • c307bb7 Fix tests for QUnit 2
  • 2048e55 Add @package so the GitHub & npm badges show up in the docs (#13)
  • 5fcc697 Landscaper: QUnit2 upgrade
  • 38a5cda Merge pull request #15 from canjs/greenkeeper/initial
  • 5c853fa chore(package): update dependencies
  • b6864de Merge pull request #14 from canjs/landscaper/update-default-repos
  • df0a59f Update README.md
  • 3fec41f Update README generated by DoneJS

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of can-event is breaking the build 🚨

Version 3.5.0 of can-event just got published.

Branch Build failing 🚨
Dependency can-event
Current Version 3.4.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

can-event is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 3 commits.

  • 8a37dd8 Update dist for release
  • d4f5f74 fixing postversion script
  • 7c28fce Do Not Merge - can-reflect (#56)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Expose a way to start/stop listening observable reads outside of a function

To solve the problem where, the reads that need to be observed are not encapsulated in a function calls.

This will probably require changing observation to allow not providing a function as the first argument:

var observation = new Observation(null, null, function(newVal, oldVal, batchNum){
    console.log("callback", newVal, oldVal, batchNum);
    this.reRender()
})

So that we can observe the operation asynchronously and update in some callback

  componentWillUpdate() {
    observation.pushToStack()
  }
  componentDidUpdate() {
    observation.popFromStack()
  }

An in-range update of can-compute is breaking the build 🚨

Version 3.0.7 of can-compute just got published.

Branch Build failing 🚨
Dependency can-compute
Current Version 3.0.6
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As can-compute is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes Using can-util/js/log/log instead of console.log

#63

Commits

The new version differs by 4 commits .

  • 6e0b479 Update dist for release
  • e2924a9 Merge pull request #65 from canjs/console-logs
  • 1d13e39 firefox 51.0
  • 99fe8ca using can-util/js/log/log

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of can-queues is breaking the build 🚨

The dependency can-queues was updated from 1.2.1 to 1.2.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

can-queues is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 9 commits.

  • 692ed09 1.2.2
  • dd5a328 Merge pull request #28 from canjs/landscaper/qunit2
  • 240831b Fix tests for QUnit 2
  • 49f4a43 Upgrade testee
  • 6b06c92 Add @package so the GitHub & npm badges show up in the docs (#25)
  • d0d2d8f Landscaper: QUnit2 upgrade
  • 9373a37 Merge pull request #26 from canjs/landscaper/update-default-repos
  • f2cce2c Update README.md
  • 6b249b6 Update README generated by DoneJS

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Order observation updates by their depth automatically

tldr; Observations created inside other observations should always be entered in the queue after the outer observation. If the outer observation is updated, the child observation should be "stopped" (all handlers unbound and stops listening on its dependencies).

This might eliminate one of the core abilities of nodeLists - the need to recursively unbinding child nodelists!

Background

Take some example stache code like:

{{#if show}}
    <div>{{foo}}</div>
{{/if}}

This gets compiled into the following pseudo observations:

First, an ifBlock with a nested LOGIC block. The LOGIC observation is created
so ifBlock is not rerun over and over if show were to change from 1 to 2 to 3, etc.

var ifBlock = new Observation( () => {
    var LOGIC = new Observation(() => { return !!vm.show })
    
    if(LOGIC.get()) {
        return  options.fn()
    } else {
        return options.inverse();
    }
})

Second, options.fn (and options.inverse) are compiled to something like:

option.fn = function(){
    
    foo = new Observation(() => vm.foo , {canRecordObservation: false});
    return frag("<div/>", live.text(textNode, foo))
}

Note the canRecordObservation on the foo observation. This is used to prevent ifBlock from re-running if foo changes. If foo changes, live.text handles updating the DOM itself. There's no need to rerun ifBlock.

Proposal

The idea is to:

  1. make an observation see any observables created within its function and to be able to tear them down automatically when the function returns.
  2. schedule any child observations "after" the parent observation, allowing the parent to run first.

In the example above, if ifBlock were to re-run its function, both LOGIC and foo should be torn down.

By torn down we mean all activity should stop. Any handlers listening to those observables should be removed (watch out for handlers bound with .listenTo()). Also those observables should not be binding on their dependencies. Currently, I believe can-event-queues/value supports calling .off() without arguments to tear down any handlers. This should probably be formalized, possibly as a canReflect.stop() (which could also work for Map and List types).

Finally, the child-parent relationship needs to be established. I think part of this can happen with expansion of can-observation-recorder. An observation record could contain a set of createdDependencies:

createdDependencies: new Set()

I think child observables can register themselves with:

ObservationRecorder.created( observable )

When can-observation updates its value, it can go through createdDependencies and call canReflect.stop(observable) on each observable.

Other

  • As observation's will take on their "parent's" priority + 1, Infinity + 1 is still Infinity. This might mean resuming the default priority of 0.

An in-range update of can-define is breaking the build 🚨

Version 1.0.17 of can-define just got published.

Branch Build failing 🚨
Dependency can-define
Current Version 1.0.16
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As can-define is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
Release Notes Using can-util/js/log/log instead of console.log

#159

Commits

The new version differs by 6 commits .

  • 97ceb28 Update dist for release
  • 9fe3fe4 Merge pull request #160 from canjs/console-logs
  • 8af1867 firefox 51.0
  • c4b107c using can-util/js/log/log
  • 86d7a3e Merge pull request #151 from canjs/add-issue-and-pr-templates
  • 4307ce1 Add issue & pull request templates

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of can-event-queue is breaking the build 🚨

The dependency can-event-queue was updated from 1.1.5 to 1.1.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

can-event-queue is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 6 commits ahead by 6, behind by 1.

  • faf15fe 1.1.6
  • 30eb5c3 Update version number
  • d2a3325 Merge pull request #31 from canjs/landscaper/qunit2
  • 71c1628 Fix tests for QUnit 2
  • 91bd90b Add @package so the GitHub & npm badges show up in the docs (#24)
  • 0d79210 Landscaper: QUnit2 upgrade

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Tests don't work with Steal 0.16

Because the namespace test was changed to look for err.message, it will throw if run with Steal 0.16 (like in the canjs test suite).

An in-range update of can-compute is breaking the build 🚨

Version 3.2.0 of can-compute just got published.

Branch Build failing 🚨
Dependency can-compute
Current Version 3.0.11
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As can-compute is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 3 commits.

  • a8ecbe2 Update dist for release
  • a9278b4 changing postversion script back
  • d0d529f implements much of the reflected API for can-compute (not ready) (#69)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

Deep computes that would have been updated by something that hasn't been updated, don't know if they can be updated.

If there's a computeA that depends on another computeB. If computeB has a dependency change, but comptueA is read, it's possible that computeA will not provide the correct value.

The fix will be making sure that any child compute is not also ready to be updated. If it is, we will have to update it, possibly notify any parents.

Or at least, somehow be able to tell that a change has happened ... and update the parent chain.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.