Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:17

    greenkeeper[bot] on webpack-4.41.3

    (compare)

  • 10:13

    greenkeeper[bot] on webpack-4.41.3

    chore(package): update webpack … (compare)

  • Dec 14 20:01
    greenkeeper[bot] labeled #5450
  • Dec 14 20:01
    greenkeeper[bot] opened #5450
  • Dec 14 20:00

    greenkeeper[bot] on semver-7.0.0

    chore(package): update semver t… (compare)

  • Dec 14 16:58
    millette starred canjs/canjs
  • Dec 14 00:14
    greenkeeper[bot] labeled #5449
  • Dec 14 00:14
    greenkeeper[bot] opened #5449
  • Dec 14 00:14

    greenkeeper[bot] on can-super-model-2.0.0

    fix(package): update can-super-… (compare)

  • Dec 14 00:13
    greenkeeper[bot] labeled #5448
  • Dec 14 00:13
    greenkeeper[bot] opened #5448
  • Dec 14 00:13

    greenkeeper[bot] on can-define-rest-model-2.0.0

    fix(package): update can-define… (compare)

  • Dec 14 00:12
    greenkeeper[bot] labeled #5447
  • Dec 14 00:12
    greenkeeper[bot] opened #5447
  • Dec 14 00:12

    greenkeeper[bot] on can-define-realtime-rest-model-2.0.0

    fix(package): update can-define… (compare)

  • Dec 14 00:07
    greenkeeper[bot] labeled #5446
  • Dec 14 00:07
    greenkeeper[bot] opened #5446
  • Dec 14 00:07

    greenkeeper[bot] on can-connect-ndjson-2.0.0

    fix(package): update can-connec… (compare)

  • Dec 13 21:27

    greenkeeper[bot] on @octokit

    (compare)

  • Dec 13 21:25

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

Frank Lemanschik
@frank-dspeed
and you will have a much better understanding and overview about the options and whats used
if you have any questions that this don't solves plz tell it here so some one can write something about that
Kevin Phillips
@phillipskevin
@roemhildtg can-map-define is the same as what you’re talking about from 2.3
Frank Lemanschik
@frank-dspeed
@phillipskevin but the name changed a bit var DefineMap = require("can-define/map/map");
Kevin Phillips
@phillipskevin
no
can-map-define is the same
can-define/map/map is a slightly different thing
Frank Lemanschik
@frank-dspeed
ah now we are on the same point :)
Gregg Roemhildt
@roemhildtg
Oh, I see.
Kevin Phillips
@phillipskevin
can-map/can-map-define has attr() and works the same as the Map and define plugin in 2.3
Frank Lemanschik
@frank-dspeed
DifineMap nativ should get depricated or not?
Kevin Phillips
@phillipskevin
DefineMap you don’t need to use attr()
Gregg Roemhildt
@roemhildtg
I like using DefineMap since there's no need for attr
Kevin Phillips
@phillipskevin
DefineMap is the new way
Gregg Roemhildt
@roemhildtg
But can you confirm whether or not the set behavior has changed?
Kevin Phillips
@phillipskevin
set works the same
it’s the value that is not working in your example I think
Frank Lemanschik
@frank-dspeed
the old works but should complain when using attr
Kevin Phillips
@phillipskevin
no can-map-define is a different module
you have to use attr
@roemhildtg
let a = can.DefineMap.extend('a', {
  init(){
    console.log(arguments);
  },
  val: {
    set(val){
      console.log('hey there', val);
      return val;
    }
  }
})
let b = new a();
b.val = 'Hello';
console.log(b.val)
that does what you’re expecting
Frank Lemanschik
@frank-dspeed
ya but you agre with me that we don't use that this way any more as we do var DefineMap = require("can-define/map/map");
Kevin Phillips
@phillipskevin
don’t use what this way?
can-map and can-map-define are legacy modules
for backward compatibility
Frank Lemanschik
@frank-dspeed
we don't use can-map-define in donejs examples
ya
thats what i mean they are still updated but not used any more
Kevin Phillips
@phillipskevin
the donejs examples will be updated to use DefineMap, yeah
Frank Lemanschik
@frank-dspeed
they get replaced by the lazy models
Kevin Phillips
@phillipskevin
and generators, etc
Frank Lemanschik
@frank-dspeed
ya thats what i mean :)
Gregg Roemhildt
@roemhildtg
Okay, but I can provide a default value still, its just this doesn't call the set method anymore?
Frank Lemanschik
@frank-dspeed
i depricated it and throw it out all over
Oh @phillipskevin do you maybe know or tryed it what happens to a 2.3 project when you switch do can3.0
and use the legacy stuff does it work?
Kevin Phillips
@phillipskevin
yes
Frank Lemanschik
@frank-dspeed
so we are compatible wow
Kevin Phillips
@phillipskevin
yeah, we have client projects that are upgrading to 3.0
Frank Lemanschik
@frank-dspeed
don't knowed that fact should consider that in the genrator
ya upgrading means for me also changing the components
i mean it works to only change the requires and imports and they still work nothing left out?
Kevin Phillips
@phillipskevin
no, you do have to make some changes
@roemhildtg to answer your question… I’m not sure
Gregg Roemhildt
@roemhildtg
I've been doing the future proof migration, its not so bad. It cleans up the code a lot removing all of the .attr stuff
Kevin Phillips
@phillipskevin
I don’t think setting a default value on DefineMap like that does what you want
Gregg Roemhildt
@roemhildtg
Okay just thought I'd ask. I do know that in the previous version set would be called when the default value was set. http://jsbin.com/wicuguwisa/edit?html,js,console,output