mysqljs / named-placeholders

PDO-style named to unnamed placeholders compiler
MIT License
21 stars 13 forks source link

Bump lru-cache dependency to ^7.14.1 #19

Closed MasterOdin closed 1 year ago

MasterOdin commented 1 year ago

PR bumps the lru-cache to its latest version (which matches the version string used for mysql2). I had considered lowering the version, but given https://github.com/isaacs/node-lru-cache/issues/257 which was fixed in the latest release, probably not worth allowing older versions.

I also added a test that goes through the cache.get code path as no existing test exercised it to help validate that LRU is (hopefully) working as expected, though cache.get(query) could just always return undefined or whatever.

I also updated the minimum version of this package and what versions of Node are tested against as lru-cache@^7 as a minimal supported node version of 12.

Finally, I ended up changing indentation of some amount of the test file as everything after the should throw error when query contains placeholders but parameters object not passed was indented when it shouldn't have been. Beyond the new test addition, all other changes in that file are just whitespace related.