Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Mariano Guerra
    @marianoguerra
    npm run testonly fails with SecurityError: localStorage is not available for opaque origins
    Mariano Guerra
    @marianoguerra
    this works ./node_modules/.bin/jest --testURL http://localhost
    Matt Dziuban
    @mrdziuban
    hi all, i'm seeing a strange issue using an immutable Map where the values are xstream objects. using set properly sets the key/value pair, but using update (or updateIn) does not. here's an example:
    const {Map} = require('immutable')
    const xs = require('xstream').default;
    
    const m = Map()
    const set = m.set('a', xs.empty())
    const upd = m.update('a', xs.empty(), s => s)
    
    console.log(set)
    // Map {"a" => Stream {_d: false, _dl: Object {}, _err: Object {}, _ils: [], …}}
    console.log(upd)
    // Map {}
    Mariano Guerra
    @marianoguerra
    @mrdziuban which version are you using?
    I thhink I found the bug
        const existingValue = wasNotSet ? notSetValue : existing;
        const newValue = updater(existingValue);
        return newValue === existingValue ? existing : newValue;
    is wasNotSet, then existingValue is set to notSetValue, then updater returns existingValue (which is not existing, is the default), and then newValue === existingValue is true, so no update happens
    but it should, because existingValue is not actually existing, it's the default
    I think it should be
        return !wasNotSet && newValue === existingValue ? existing : newValue;
    but too early to tell :P
    Matt Dziuban
    @mrdziuban
    @marianoguerra sorry for the delay, but i'm using version 4.0.0-rc.12
    thanks for looking into it!
    Mariano Guerra
    @marianoguerra
    @leebyron hi, I would like to open a PR for the issue above ^, but I get many failing tests, npm install and npm run test fails. mostly __tests__/updateIn.ts: SyntaxError: Unexpected token, expected "," (36:43) and SyntaxError: Only declares and type imports are allowed inside declare module any hint on how to setup the environment to be able to add a failing test?
    Francisco Ryan Tolmasky I
    @tolmasky
    @marianoguerra I believe I ran into your exact issue a while ago, and even proposed a similar solution. I can't remember the reason, but (if it was the same solution), some problem was listed with it. I am having difficulty finding the issue on github though, will let you know if I do end up finding it
    @marianoguerra actually, found it: immutable-js/immutable-js#1061
    Mariano Guerra
    @marianoguerra
    @tolmasky " I'm hoping to improve it in a future major version" :)
    Viktor Kuroljov
    @viktor-ku
    Hi everyone
    Mariano Guerra
    @marianoguerra
    can someone with permissions close this issue as inactive and no further info provided? immutable-js/immutable-js#1670
    I would like to have a clear picture of which issues are actually issues
    Mariano Guerra
    @marianoguerra
    I replied to this one immutable-js/immutable-js#1708 can someone confirm and close it?
    Mariano Guerra
    @marianoguerra
    is anyone able to run the tests without getting a lot of typescript errors?
    Toan Le Nhat
    @ince01
    how to add multi item to array List() immuntable js ?
    Toan Le Nhat
    @ince01
    @marianoguerra thank u
    Erwann Mest
    @kud
    Hey
    I've got a question :)
    I'm doing this console.log(props.get("type"), props.type)
    and it returns
    "article", undefined
    I don't get it :)
    is it because it's a List?
    i'm doing this
    {divisions.size > 0 && divisions.map(props => (
    Mariano Guerra
    @marianoguerra
    what is props? a Immutable.Map?
    Erwann Mest
    @kud
    it's a List
    and what I'm reading here
    it sounds to be normal
    direct attribute access only works on Record
    not List or Map
    Mariano Guerra
    @marianoguerra
    yes
    Erwann Mest
    @kud
    @marianoguerra thanks :)
    Steven
    @StevenX911
    hell
    Seth Feibus
    @sethfork
    Is this project no longer being maintained? It'd be helpful to get a straight answer so people could migrate to other solutions
    Mariano Guerra
    @marianoguerra
    does immutable depend on a specific typescript version? running npm run test on master gives me syntax errors
    [error] resources/jest.d.ts: SyntaxError: Only declares and type imports are allowed inside declare module (75:3)
    issadarkthing
    @issadarkthing
    hi im having this issue when using List (node:9312) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated