@nxtedition/rocksdb 11.1.0 → 11.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/binding.cc +3 -3
  2. package/package.json +1 -1
package/binding.cc CHANGED
@@ -1487,7 +1487,7 @@ NAPI_METHOD(regex_init) {
1487
1487
  std::string pattern;
1488
1488
  NAPI_STATUS_THROWS(GetString(env, argv[0], pattern));
1489
1489
 
1490
- auto batch = std::make_unique<std::regex>(pattern);
1490
+ auto batch = std::make_unique<std::regex>(pattern, std::regex::optimize | std::regex::ECMAScript);
1491
1491
 
1492
1492
  napi_value result;
1493
1493
  NAPI_STATUS_THROWS(napi_create_external(env, batch.get(), Finalize<std::regex>, batch.get(), &result));
@@ -1505,7 +1505,7 @@ NAPI_METHOD(regex_test) {
1505
1505
  rocksdb::Slice value;
1506
1506
  NAPI_STATUS_THROWS(GetValue(env, argv[1], value));
1507
1507
 
1508
- const bool match = std::regex_match(value.data(), value.data() + value.size(), *regex);
1508
+ const bool match = std::regex_search(value.data(), value.data() + value.size(), *regex);
1509
1509
 
1510
1510
  napi_value result;
1511
1511
  NAPI_STATUS_THROWS(napi_get_boolean(env, match, &result));
@@ -1532,7 +1532,7 @@ NAPI_METHOD(regex_test_many) {
1532
1532
  rocksdb::Slice value;
1533
1533
  NAPI_STATUS_THROWS(GetValue(env, valueElement, value));
1534
1534
 
1535
- const bool match = std::regex_match(value.data(), value.data() + value.size(), *regex);
1535
+ const bool match = std::regex_search(value.data(), value.data() + value.size(), *regex);
1536
1536
 
1537
1537
  napi_value matchElement;
1538
1538
  NAPI_STATUS_THROWS(napi_get_boolean(env, match, &matchElement));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "11.1.0",
3
+ "version": "11.1.2",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",