These are chat archives for canjs/canjs

9th
Jan 2019
Piyush Sharma
@Piyush5767
Jan 09 00:01
ok it return {page: "customers", section: "merchandizing"} before route.attr where as it had not been called after route.attr
for starting it called twice... first one {} and second: {page: "customers", section: "merchandizing"}
but not after route.attr been called
Chasen Le Hara
@chasenlehara
Jan 09 00:03
Ok. The fact that it doesn’t get called after the route.attr is a problem… we’ve made some progress.
Instead of calling route.attr with an object, what happens if you replace that call with just route.attr('action', 'create')?
Piyush Sharma
@Piyush5767
Jan 09 00:04
let me try that
no it didn't call even i use route.attr('action', 'create')
where as page change but same url in browser still same
Chasen Le Hara
@chasenlehara
Jan 09 00:36
We figured it out; this was a DoneJS app with done-autorender, which automatically calls route.start()
Removed the call and it worked 🎉
Piyush Sharma
@Piyush5767
Jan 09 00:40
yep, thanks!
apsignifi
@apsignifi
Jan 09 18:12
can3->can4 : is there a way to simultaneously upgrade all npm libraries to a compatible version when moving to can4 from can3 ?
I have already tried 'donejs upgrade', and getting conflicts because of two versions of a package 'can-dom-data-state' - the error asks to check dependencies.
Ivo Pinheiro
@ivospinheiro
Jan 09 18:20
I have upgraded an application from can 3 to can 4 recently
My experience is that you can upgrade to the latest version of all dependencies, besides can-connect and can-set if I'm not wrong
can-jquery should be replaced by jquery or can-ajax
and can-util/dom usages should be avoided and replaced by the alternative library
Justin Meyer
@justinbmeyer
Jan 09 18:38
@apsignifi I will answer in 5 min
apsignifi
@apsignifi
Jan 09 18:47
@ivospinheiro : Thanks. will try latest.
@justinbmeyer : okk, thanks.
Justin Meyer
@justinbmeyer
Jan 09 20:24
@apsignifi I'm going to write up a forum post
apsignifi
@apsignifi
Jan 09 20:24
@justinbmeyer : Thanks.
question: I have multiple apps using different canjs versions ( 2.3, 3 & 4). is there a way to use a different donejs version for each (as needed).
for example, use donejs v0.9 with can2.3, donejs v1.x with can3.x && donejs2.x with can4.x
?
Justin Meyer
@justinbmeyer
Jan 09 20:26
when you say use donejs you mean its CLI?
apsignifi
@apsignifi
Jan 09 20:26
yes
Justin Meyer
@justinbmeyer
Jan 09 20:26
the donejs CLI is a mask already, so it should work
by mask, I mean that it calls to code in the local project and does very little on its own
apsignifi
@apsignifi
Jan 09 20:27
ok, let me try. Thanks.
Justin Meyer
@justinbmeyer
Jan 09 20:27
so having the latest donejs should be fine
so donejs add component should generate a different component code in each version
apsignifi
@apsignifi
Jan 09 20:28
okk. thanks.
not an automated process, but should be pretty straightforward