@quenty/fzy 5.15.1 → 5.17.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.17.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/fzy@5.16.0...@quenty/fzy@5.17.0) (2026-07-23)
7
+
8
+ ### Features
9
+
10
+ - Add baseline player-mock and support across Nevermore for mocked players. ([567d121](https://github.com/Quenty/NevermoreEngine/commit/567d121ffc014b42391554088189a1a6296dda83))
11
+
12
+ # [5.16.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/fzy@5.15.1...@quenty/fzy@5.16.0) (2026-07-18)
13
+
14
+ ### Bug Fixes
15
+
16
+ - pin translation behavior with tests and fix camelCase key generation ([#737](https://github.com/Quenty/NevermoreEngine/issues/737)) ([1b7a536](https://github.com/Quenty/NevermoreEngine/commit/1b7a536dde7e124f8432e57612ec8138dd835d75))
17
+
6
18
  ## [5.15.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/fzy@5.15.0...@quenty/fzy@5.15.1) (2026-05-30)
7
19
 
8
20
  **Note:** Version bump only for package @quenty/fzy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/fzy",
3
- "version": "5.15.1",
3
+ "version": "5.17.0",
4
4
  "description": "Lua implementation of fzy string search algorithm",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -28,11 +28,11 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@quenty/loader": "10.11.0",
31
- "@quenty/nevermore-test-runner": "1.4.0",
31
+ "@quenty/nevermore-test-runner": "1.5.0",
32
32
  "@quentystudios/jest-lua": "3.10.0-quenty.2"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "598b2b62b36bdcbdbbd56f7db10c399831cc6eba"
37
+ "gitHead": "1de37218a2bedb8e3f8614a2e09bba9eddc812da"
38
38
  }
@@ -1,4 +1,4 @@
1
- --!nonstrict
1
+ --!strict
2
2
  --[[
3
3
  Tests for fzy-lua
4
4
 
@@ -35,9 +35,7 @@ THE SOFTWARE.
35
35
 
36
36
  local EPSILON = 0.000001
37
37
 
38
- local require = (require :: any)(
39
- game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent
40
- ).bootstrapStory(script) :: typeof(require(script.Parent.loader).load(script))
38
+ local require = require(script.Parent.loader).load(script)
41
39
 
42
40
  local Fzy = require("Fzy")
43
41
  local Jest = require("Jest")
@@ -49,7 +47,9 @@ local it = Jest.Globals.it
49
47
  local MIN_SCORE = Fzy.getMinScore()
50
48
  local MAX_SCORE = Fzy.getMaxScore()
51
49
 
52
- local function compareTables(a, b)
50
+ -- Fzy.positions returns (positions, score); callers pass it as the second arg, so the
51
+ -- trailing score expands into this ignored third parameter.
52
+ local function compareTables(a: { [any]: any }, b: { [any]: any }, _score: any?)
53
53
  for key, value in a do
54
54
  if b[key] ~= value then
55
55
  return false
@@ -221,7 +221,7 @@ describe("positioning", function()
221
221
  expect(Fzy.score(config, longstring, longstring)).toBe(MIN_SCORE)
222
222
  end)
223
223
  it("is case-sensitive when requested", function()
224
- expect(compareTables({ 2, 5 }, Fzy.positions(caseSensitiveConfig, "AB", "aAabBb", true))).toBe(true)
224
+ expect(compareTables({ 2, 5 }, (Fzy.positions :: any)(caseSensitiveConfig, "AB", "aAabBb", true))).toBe(true)
225
225
  end)
226
226
  it("returns the same score as `score()`", function()
227
227
  local _, s = Fzy.positions(config, "ab", "aaabbb")
@@ -235,16 +235,15 @@ end)
235
235
 
236
236
  describe("filtering", function()
237
237
  it("repeats application of hasMatch and positions", function()
238
- -- compare the result of `filter` with repeated calls to `positions`
239
- local function check_filter(needle, haystacks, case)
240
- local result = Fzy.filter(config, needle, haystacks, case)
238
+ local function check_filter(needle: string, haystacks: { string }, case: boolean?)
239
+ local result = (Fzy.filter :: any)(config, needle, haystacks, case)
241
240
  local r = 0
242
241
  for i, line in ipairs(haystacks) do
243
- local match = Fzy.hasMatch(config, needle, line, case)
242
+ local match = (Fzy.hasMatch :: any)(config, needle, line, case)
244
243
  if match then
245
244
  r = r + 1
246
245
  expect(i).toBe(result[r][1])
247
- local p, s = Fzy.positions(config, needle, line, case)
246
+ local p, s = (Fzy.positions :: any)(config, needle, line, case)
248
247
  expect(compareTables(p, result[r][2])).toBe(true)
249
248
  expect(s).toBe(result[r][3])
250
249
  end