Skip to content

Remove tests for removed API in spacebars, fix #369#370

Merged
denihs merged 6 commits intorelease-2.6.1from
fix/remove-old-tests
Apr 20, 2022
Merged

Remove tests for removed API in spacebars, fix #369#370
denihs merged 6 commits intorelease-2.6.1from
fix/remove-old-tests

Conversation

@StorytellerCZ
Copy link
Copy Markdown
Collaborator

As describe in #369 old tests for old templates API that has been remove in v2.6 have not been removed. As far as I have searched this should be the only thing that needs to be removed.

@StorytellerCZ
Copy link
Copy Markdown
Collaborator Author

Together with #366 it could be made part of Blaze 2.6.1. Thoughts?

@jankapunkt
Copy link
Copy Markdown
Collaborator

Just a question for understanding, shouldn't they have thrown errors after backwards compatibility has been removed? Is there maybe still old code?

@harryadel
Copy link
Copy Markdown
Contributor

harryadel commented Apr 14, 2022

Why remove files entirely? Why not keep the tests but change the APIs used? Also Template.__define__ got removed entirely!! This is a breaking change for no reason. It's ok to remove UI.body and the likes since they've alternatives but not the rest! I think we should add it back.

@StorytellerCZ
Copy link
Copy Markdown
Collaborator Author

This is the code for Template.__define__:

// XXX COMPAT WITH 0.8.3
Template.__define__ = function (name, renderFunc) {
  Template.__checkName(name);
  Template[name] = new Template("Template." + name, renderFunc);
  // Exempt packages built pre-0.9.0 from warnings about using old
  // helper syntax, because we can.  It's not very useful to get a
  // warning about someone else's code (like a package on Atmosphere),
  // and this should at least put a bit of a dent in number of warnings
  // that come from packages that haven't been updated lately.
  Template[name]._NOWARN_OLDSTYLE_HELPERS = true;
};

I'm fine with putting it back, but I would probably make a change and show some sort of a warning at the very least.

@harryadel
Copy link
Copy Markdown
Contributor

Great work 👏

@StorytellerCZ StorytellerCZ changed the base branch from master to release-2.6.1 April 19, 2022 20:46
@StorytellerCZ
Copy link
Copy Markdown
Collaborator Author

@fredmaiaarantes @denihs this is also ready to be included in Blaze 2.6.1

@StorytellerCZ StorytellerCZ added this to the Blaze 2.6.1 milestone Apr 19, 2022
@denihs denihs merged commit a2123a4 into release-2.6.1 Apr 20, 2022
@denihs
Copy link
Copy Markdown
Contributor

denihs commented Apr 20, 2022

Hey @StorytellerCZ, published in the new version 2.6.1-rc.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants