Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sidorares/node-mysql2
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.13.0
Choose a base ref
...
head repository: sidorares/node-mysql2
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.14.0
Choose a head ref

Commits on Mar 7, 2025

  1. build(deps): bump lucide-react from 0.477.0 to 0.479.0 in /website (#…

    …3461)
    
    Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.477.0 to 0.479.0.
    - [Release notes](https://github.com/lucide-icons/lucide/releases)
    - [Commits](https://github.com/lucide-icons/lucide/commits/0.479.0/packages/lucide-react)
    
    ---
    updated-dependencies:
    - dependency-name: lucide-react
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 7, 2025
    Copy the full SHA
    f452658 View commit details
  2. build(deps-dev): bump @eslint/markdown from 6.2.2 to 6.3.0 (#3462)

    Bumps [@eslint/markdown](https://github.com/eslint/markdown) from 6.2.2 to 6.3.0.
    - [Release notes](https://github.com/eslint/markdown/releases)
    - [Changelog](https://github.com/eslint/markdown/blob/main/CHANGELOG.md)
    - [Commits](eslint/markdown@v6.2.2...v6.3.0)
    
    ---
    updated-dependencies:
    - dependency-name: "@eslint/markdown"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 7, 2025
    Copy the full SHA
    6e5a21f View commit details
  3. build(deps-dev): bump eslint-config-prettier from 10.0.2 to 10.1.1 (#…

    …3463)
    
    Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 10.0.2 to 10.1.1.
    - [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
    - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/eslint-config-prettier@v10.0.2...v10.1.1)
    
    ---
    updated-dependencies:
    - dependency-name: eslint-config-prettier
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 7, 2025
    Copy the full SHA
    68519f0 View commit details

Commits on Mar 10, 2025

  1. Copy the full SHA
    3c9ba64 View commit details
  2. Copy the full SHA
    013000e View commit details
  3. Copy the full SHA
    a90faf6 View commit details
  4. build(deps-dev): bump @types/node from 22.13.9 to 22.13.10 in /website (

    #3469)
    
    Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.13.9 to 22.13.10.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 10, 2025
    Copy the full SHA
    3bcd394 View commit details
  5. build(deps): bump prismjs from 1.29.0 to 1.30.0 in /website (#3470)

    Bumps [prismjs](https://github.com/PrismJS/prism) from 1.29.0 to 1.30.0.
    - [Release notes](https://github.com/PrismJS/prism/releases)
    - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
    - [Commits](PrismJS/prism@v1.29.0...v1.30.0)
    
    ---
    updated-dependencies:
    - dependency-name: prismjs
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 10, 2025
    Copy the full SHA
    01db213 View commit details

Commits on Mar 11, 2025

  1. build(deps-dev): bump @typescript-eslint/eslint-plugin (#3472)

    Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.26.0 to 8.26.1.
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.26.1/packages/eslint-plugin)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 11, 2025
    Copy the full SHA
    44eb308 View commit details
  2. Copy the full SHA
    9d6b474 View commit details
  3. feat: add RegExp support to PoolCluster (#3451)

    * add regex support to PoolCluster
    
    * Update lib/pool_cluster.js
    
    Co-authored-by: Weslley Araújo <46850407+wellwelwel@users.noreply.github.com>
    
    * fix linting issues
    
    * chore: add tests for regex pattern
    
    ---------
    
    Co-authored-by: Weslley Araújo <46850407+wellwelwel@users.noreply.github.com>
    uPaymeiFixit and wellwelwel authored Mar 11, 2025
    Copy the full SHA
    2d5050d View commit details

Commits on Mar 12, 2025

  1. build(deps): bump @easyops-cn/docusaurus-search-local in /website (#3476

    )
    
    Bumps [@easyops-cn/docusaurus-search-local](https://github.com/easyops-cn/docusaurus-search-local/tree/HEAD/packages/docusaurus-search-local) from 0.48.5 to 0.49.0.
    - [Release notes](https://github.com/easyops-cn/docusaurus-search-local/releases)
    - [Commits](https://github.com/easyops-cn/docusaurus-search-local/commits/v0.49.0/packages/docusaurus-search-local)
    
    ---
    updated-dependencies:
    - dependency-name: "@easyops-cn/docusaurus-search-local"
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 12, 2025
    Copy the full SHA
    7a33335 View commit details
  2. Copy the full SHA
    1caccfc View commit details

Commits on Mar 13, 2025

  1. build(deps): bump @babel/runtime-corejs3 in /website (#3478)

    Bumps [@babel/runtime-corejs3](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime-corejs3) from 7.26.9 to 7.26.10.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime-corejs3)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/runtime-corejs3"
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 13, 2025
    Copy the full SHA
    d200b5b View commit details
  2. build(deps): bump @babel/runtime from 7.26.9 to 7.26.10 in /website (#…

    …3479)
    
    Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.26.9 to 7.26.10.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-runtime)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/runtime"
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 13, 2025
    Copy the full SHA
    c504675 View commit details
  3. build(deps): bump @babel/helpers from 7.26.9 to 7.26.10 in /website (#…

    …3480)
    
    Bumps [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) from 7.26.9 to 7.26.10.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/helpers"
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 13, 2025
    Copy the full SHA
    6ac4646 View commit details

Commits on Mar 14, 2025

  1. build(deps): bump @easyops-cn/docusaurus-search-local in /website (#3482

    )
    
    Bumps [@easyops-cn/docusaurus-search-local](https://github.com/easyops-cn/docusaurus-search-local/tree/HEAD/packages/docusaurus-search-local) from 0.49.0 to 0.49.1.
    - [Release notes](https://github.com/easyops-cn/docusaurus-search-local/releases)
    - [Commits](https://github.com/easyops-cn/docusaurus-search-local/commits/v0.49.1/packages/docusaurus-search-local)
    
    ---
    updated-dependencies:
    - dependency-name: "@easyops-cn/docusaurus-search-local"
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 14, 2025
    Copy the full SHA
    ec4a2d7 View commit details
  2. Copy the full SHA
    2670f32 View commit details

Commits on Mar 17, 2025

  1. build(deps): bump lucide-react from 0.479.0 to 0.482.0 in /website (#…

    …3484)
    
    Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.479.0 to 0.482.0.
    - [Release notes](https://github.com/lucide-icons/lucide/releases)
    - [Commits](https://github.com/lucide-icons/lucide/commits/0.482.0/packages/lucide-react)
    
    ---
    updated-dependencies:
    - dependency-name: lucide-react
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 17, 2025
    Copy the full SHA
    a2a9804 View commit details

Commits on Mar 18, 2025

  1. build(deps): bump sass from 1.85.1 to 1.86.0 in /website (#3485)

    Bumps [sass](https://github.com/sass/dart-sass) from 1.85.1 to 1.86.0.
    - [Release notes](https://github.com/sass/dart-sass/releases)
    - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
    - [Commits](sass/dart-sass@1.85.1...1.86.0)
    
    ---
    updated-dependencies:
    - dependency-name: sass
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 18, 2025
    Copy the full SHA
    d6d82ed View commit details
  2. build(deps): bump lucide-react from 0.482.0 to 0.483.0 in /website (#…

    …3486)
    
    Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.482.0 to 0.483.0.
    - [Release notes](https://github.com/lucide-icons/lucide/releases)
    - [Commits](https://github.com/lucide-icons/lucide/commits/0.483.0/packages/lucide-react)
    
    ---
    updated-dependencies:
    - dependency-name: lucide-react
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 18, 2025
    Copy the full SHA
    2e7f224 View commit details

Commits on Mar 19, 2025

  1. build(deps-dev): bump poku from 3.0.1 to 3.0.2 (#3487)

    Bumps [poku](https://github.com/wellwelwel/poku) from 3.0.1 to 3.0.2.
    - [Release notes](https://github.com/wellwelwel/poku/releases)
    - [Changelog](https://github.com/wellwelwel/poku/blob/main/CHANGELOG.md)
    - [Commits](wellwelwel/poku@v3.0.1...v3.0.2)
    
    ---
    updated-dependencies:
    - dependency-name: poku
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 19, 2025
    Copy the full SHA
    65cc9cf View commit details
  2. build(deps-dev): bump poku from 3.0.1 to 3.0.2 in /website (#3488)

    Bumps [poku](https://github.com/wellwelwel/poku) from 3.0.1 to 3.0.2.
    - [Release notes](https://github.com/wellwelwel/poku/releases)
    - [Changelog](https://github.com/wellwelwel/poku/blob/main/CHANGELOG.md)
    - [Commits](wellwelwel/poku@v3.0.1...v3.0.2)
    
    ---
    updated-dependencies:
    - dependency-name: poku
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 19, 2025
    Copy the full SHA
    67d18f9 View commit details

Commits on Mar 20, 2025

  1. chore(master): release 3.14.0 (#3473)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Mar 20, 2025
    Copy the full SHA
    1fe1c9d View commit details
Showing with 246 additions and 261 deletions.
  1. +7 −0 Changelog.md
  2. +18 −14 lib/pool_cluster.js
  3. +143 −205 package-lock.json
  4. +1 −1 package.json
  5. +36 −0 test/esm/integration/pool-cluster/test-promise-wrapper.test.mjs
  6. +36 −36 website/package-lock.json
  7. +5 −5 website/package.json
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [3.14.0](https://github.com/sidorares/node-mysql2/compare/v3.13.0...v3.14.0) (2025-03-19)


### Features

* add `RegExp` support to PoolCluster ([#3451](https://github.com/sidorares/node-mysql2/issues/3451)) ([2d5050d](https://github.com/sidorares/node-mysql2/commit/2d5050d59c28b269d1ef52b70a726777a34ecf1c))

## [3.13.0](https://github.com/sidorares/node-mysql2/compare/v3.12.0...v3.13.0) (2025-03-06)


32 changes: 18 additions & 14 deletions lib/pool_cluster.js
Original file line number Diff line number Diff line change
@@ -37,6 +37,18 @@ const getMonotonicMilliseconds = function () {
return Math.floor(ms);
};

const patternRegExp = function (pattern) {
if (pattern instanceof RegExp) {
return pattern;
}

const source = pattern
.replace(/([.+?^=!:${}()|[\]/\\])/g, '\\$1')
.replace(/\*/g, '.*');

return new RegExp(`^${source}$`);
};

class PoolNamespace {
constructor(cluster, pattern, selector) {
this._cluster = cluster;
@@ -256,20 +268,12 @@ class PoolCluster extends EventEmitter {
let currentTime = 0;
let foundNodeIds = this._findCaches[pattern];

if (typeof this._findCaches[pattern] === 'undefined') {
if (pattern === '*') {
// all
foundNodeIds = this._serviceableNodeIds;
} else if (this._serviceableNodeIds.indexOf(pattern) !== -1) {
// one
foundNodeIds = [pattern];
} else {
// wild matching
const keyword = pattern.substring(pattern.length - 1, 0);
foundNodeIds = this._serviceableNodeIds.filter((id) =>
id.startsWith(keyword)
);
}
if (foundNodeIds === undefined) {
const expression = patternRegExp(pattern);

foundNodeIds = this._serviceableNodeIds.filter((id) =>
id.match(expression)
);
}

this._findCaches[pattern] = foundNodeIds;
Loading