GithubHelp home page GithubHelp logo

Comments (4)

jonschlinkert avatar jonschlinkert commented on July 2, 2024

Changed it to:

A negative lookahead won't work. The node version is wrong in package.json, it should be 8.6 I think.

And it hasn't errored yet. I don't know if my fix will break anything though.

Are you saying all of the unit tests passed?

from data-store.

hazelmeow avatar hazelmeow commented on July 2, 2024

@jonschlinkert haven't run unit tests, but it worked to temporarily fix my project.

from data-store.

hazelmeow avatar hazelmeow commented on July 2, 2024

Before change:

store
    create
      ✓ should create an instance of Store
      1) should create a store with the given `name`
      ✓ should initialize a store with the given defaults
    set
      2) should `.set()` a value
      ✓ should `.set()` an object
      3) should `.set()` a nested value
      4) should save data that is added directly to `storedata`
    union
      5) should add and arrayify a new value
      6) should uniquify duplicate values
      7) should union an existing value
    has
      8) should return true if a key has a value
      9) should return true if a nested key has a value
    hasOwn
      10) should return true if a key exists
      11) should work with escaped keys
      12) should return true if a nested key exists
    get
      13) should `.get()` a stored value
      14) should `.get()` a nested value
    union
      15) should `.del()` a stored value
    del
      16) should delete stored values
      17) should delete a nested stored value
      18) should ignore nested properties that do not exist
      19) should delete multiple stored values
    json
      20) should use the indent value defined on ctor options


  3 passing (22ms)
  20 failing

...all the fails are because

SyntaxError: Invalid regular expression: /(?<!\\)\./: Invalid group
      at split (index.js:392:26)
      at set (index.js:438:10)
      at Store.set (index.js:73:7)
      at Context.<anonymous> (test/test.js:167:13)

after:

store
    create
      ✓ should create an instance of Store
      ✓ should create a store with the given `name`
      ✓ should initialize a store with the given defaults
    set
      ✓ should `.set()` a value
      ✓ should `.set()` an object
      ✓ should `.set()` a nested value
      ✓ should save data that is added directly to `storedata`
    union
      ✓ should add and arrayify a new value
      ✓ should uniquify duplicate values
      ✓ should union an existing value
    has
      ✓ should return true if a key has a value
      ✓ should return true if a nested key has a value
    hasOwn
      ✓ should return true if a key exists
      1) should work with escaped keys
      ✓ should return true if a nested key exists
    get
      ✓ should `.get()` a stored value
      ✓ should `.get()` a nested value
    union
      ✓ should `.del()` a stored value
    del
      ✓ should delete stored values
      ✓ should delete a nested stored value
      ✓ should ignore nested properties that do not exist
      ✓ should delete multiple stored values
    json
      ✓ should use the indent value defined on ctor options


  22 passing (24ms)
  1 failing

  1) store hasOwn should work with escaped keys:

      AssertionError [ERR_ASSERTION]: false == true
      + expected - actual

      -false
      +true
      
      at Context.<anonymous> (test/test.js:158:7)

from data-store.

jonschlinkert avatar jonschlinkert commented on July 2, 2024

I eliminated the regex negative lookbehind that caused the error. Thanks for creating the issue

from data-store.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.