canjs / can-component

Custom elements and widgets
https://canjs.com/doc/can-component.html
MIT License
8 stars 8 forks source link

An in-range update of can-stache is breaking the build 🚨 #316

Closed greenkeeper[bot] closed 6 years ago

greenkeeper[bot] commented 6 years ago

The dependency can-stache was updated from 4.15.9 to 4.15.11.

🚨 View failing branch.

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

can-stache 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](https://travis-ci.org/canjs/can-component/builds/461508712?utm_source=github_status&utm_medium=notification)).

Release Notes for fix for scope change in case when inside an #each

#640

Commits

The new version differs by 11 commits.

  • 866b77e 4.15.11
  • 75b11e3 fix for scope change in case when inside an #each (#640)
  • 71caa38 4.15.10
  • c85384f Merge pull request #639 from canjs/491-scope-change-in-partial
  • b33ceba Fix issue with scope being overwritten within partial rather than added to
  • 9194d66 cleans up unhelpful comments
  • fbf4961 Merge pull request #632 from canjs/lazy-and
  • f02bd6f linting
  • 8a038ed upgrading to can-view-stache
  • c795763 additional cleanup
  • 883e921 and can be lazily evaluated

See the full diff

FAQ and help There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).

Your Greenkeeper Bot :palm_tree:

greenkeeper[bot] commented 6 years ago

After pinning to 4.15.9 your tests are passing again. Downgrade this dependency 📌.

greenkeeper[bot] commented 6 years ago

Your tests are still failing with this version. Compare changes

Commits

The new version differs by 2 commits.

  • 945d700 4.15.12
  • b2aea5e Issue with ordering of for/let/converters causing tests to fail (#643)

See the full diff

justinbmeyer commented 6 years ago

This test is breaking:

QUnit.test("wrapped in a conditional", function (assert) {
    var done = assert.async();

    var ComponentConstructor = Component.extend({
        tag: "component-in-stache",
        view: "Hello {{message}}",
        ViewModel: {
            message: "string"
        }
    });

    var componentInstance = new ComponentConstructor();
    var templateVM = new SimpleMap({
        componentInstance: componentInstance,
        showComponent: false
    });
    var componentVM = componentInstance.viewModel;

    var fragment = stache("<div>{{#if(showComponent)}}{{{componentInstance}}}{{/if}}</div>")(templateVM);

    // Template starts off empty
    assert.equal(fragment.textContent, "", "fragment starts off without content");

    // Show the component
    templateVM.set("showComponent", true);
    assert.equal(fragment.textContent, "Hello ", "fragment updates to include the component");

    // Updating the componentVM should update the element
    componentVM.message = "world";
    assert.equal(fragment.textContent, "Hello world", "fragment has correct text content after updating componentVM");

    // Listen for when the viewmodel is bound; need to make sure it isn’t at the end
    canReflect.onInstanceBoundChange(ComponentConstructor.ViewModel, function(instance, isBound) {
        assert.equal(isBound, false, "view model is no longer bound");
        done();
    });

    // Hide the component
    templateVM.set("showComponent", false);
    assert.equal(fragment.textContent, "", "fragment ends without content");
});