ractivejs/rvc

Template versions with ractive 0.8.12

Closed this issue · 8 comments

Hello i used the rvc require compoenent loader plugin with ractive@0.8.12

It gave an error about TEMPLATE_VERSION was 4 and not the expected 3. (The latest version of the rvc was made in 2015 and is probably made for ractive@0.7.3)

I changed the "var TEMPLATE_VERSION = 3;" to a "var TEMPLATE_VERSION = 4;" in the rvc.js file(line 353) and it seems to work correctly. Do you think it can cause any issues or side effects?

The problem is that rvc has not been updated lately. It uses an older version of rcu, which expects 0.7.3. Newer rcu actually uses 0.8.0. So in the meantime, you can fork rvc, update the rcu dependency and see if it checks out. Then use your fork in the meantime.

The related PR to the version 4 bump should be ractivejs/ractive#2369. A quick glance on the test hints that it's got to do with the new decorator (as-*) and transitions (*-in, *-out, *-in-out) among other things.

There are plans to update the plugins and tools, that is, if we get the time to work on it. 🤞

p3k commented

Any update on this?

I'll look into this later today.

@p3k Can you point rvc to the edge branch to check? May I also know if you use Bower or npm. I have not published the build to npm yet, in case you're wondering.

p3k commented

Downloaded rvc.js from the dist directory in the edge branch – works so far without any issue. Thanks! 👍

(Are all those changes necessary just to bump the template version?)

Oh, and I am using npm (yarn).

Are all those changes necessary just to bump the template version?

Sort of. Was actually a cascade of sorts.

  • A template version bump means the AST generated by Ractive.parse() is no longer structurally similar to previous versions and may cause your tool to break.
  • rvc depends on rcu, which in turn depends on Ractive. An older rcu means your tool expects an older Ractive to go with it. The warning happens when either one (usually the tool) is outdated.
  • rcu no longer does a default export and instead, exports per function. * as rcu was probably the least invasive fix.
  • The other changes were for tooling, ensuring the build and tests still run.

I don't have access to npm to publish this yet, hence the edge branch. I also only have the existing tests as my guards, I have no real app to test this against. Will probably let it soak a week or two before publishing and tagging this as a new release.

p3k commented

Oh wow, there’s quite some levels involved…

Anyway, thanks for your help – if you would add another comment here whenever the npm package is ready, I would appreciate it.

Finally had time to get to this. Repo and npm should now be updated.