jekyll-client-search 0.3.3 → 0.3.5
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +64 -0
- data/LICENSE +654 -15
- data/README.developer.md +23 -13
- data/README.md +19 -8
- data/assets/client-search-base.js +2 -2
- data/assets/client-search-dropdown.js +2 -2
- data/assets/client-search-related.js +1 -1
- data/assets/includes/related-articles.html +4 -2
- data/assets/query-embedders/transformers-worker.js +3 -0
- data/lib/jekyll/client_search/dropdown_tag.rb +24 -41
- data/lib/jekyll/client_search/related_tag.rb +23 -17
- data/lib/jekyll/client_search/script_tags.rb +41 -0
- data/lib/jekyll/client_search/search_tag.rb +20 -34
- data/lib/jekyll/client_search/version.rb +1 -1
- data/lib/jekyll/client_search.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4bd0e3f73bbbf16d364c059483ad2ad40382232dda34ca1e8a0f83b0286fa605
|
|
4
|
+
data.tar.gz: 643dfe41f83ab07d100fa9f841e7b80f07ce1a8db5d5e3d2e5e43d4a29880a2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e0e6fbfde2eaf9695f31bc4f79980f5a0d5e88b299253fde5523faa137be6606c60fecf25de2d2ed4b0e3e05d08d2afc5a9033346dd64b25c3dbde8156a44b4
|
|
7
|
+
data.tar.gz: b2cdf16bbca7714c81b6ce4a8054f94fa654a30d3e30f5c926fde2f0f3c312cc28ed66d249f3c9dcd38f03cbd9ccb40bf437ce6180c13f867928afa16c6a1f30
|
data/CHANGELOG.md
CHANGED
|
@@ -2,14 +2,68 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.3.5 — 2026-10-06
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `LICENSE` now contains the verbatim AGPL-3.0 text (was a 22-line
|
|
10
|
+
stub that license scanners could not detect); README keeps the
|
|
11
|
+
copyright attribution.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Codecov coverage reporting: CI uploads Cobertura XML (via `simplecov-cobertura`) from the Ruby 3.4 / Node 24 matrix job, with `codecov.yml` status checks (85% project/patch targets) and a README badge
|
|
16
|
+
- `rake version:check_consistency` — two-axis drift check: doc floor
|
|
17
|
+
literals (`Ruby >= X.Y`, `TargetRubyVersion`) against the gemspec,
|
|
18
|
+
full `X.Y.Z` pins against `.ruby-version`. `rake version:pre_release`
|
|
19
|
+
runs it with `check_changelog`.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- `release.yml` no longer hardcodes the Ruby pin — `setup-ruby` reads
|
|
24
|
+
`.ruby-version` (single source for dev/release; the 3.2 floor stays a
|
|
25
|
+
deliberate gemspec literal proven by the CI matrix).
|
|
26
|
+
- `rbenv` instructions in README/README.developer.md now derive from
|
|
27
|
+
`.ruby-version` instead of restating the pin.
|
|
28
|
+
- Git hooks moved to tracked `bin/hooks/` enabled via `core.hooksPath`
|
|
29
|
+
— `bin/install-hooks.sh` no longer generates copies into `.git/hooks`.
|
|
30
|
+
- `spec/spec_helper.rb` autoloads `spec/support/**/*.rb`.
|
|
31
|
+
- Removed stale literal counts from docs (test examples, Semgrep rule
|
|
32
|
+
counts) — numbers that change on their own aren't restated.
|
|
33
|
+
|
|
34
|
+
### Security
|
|
35
|
+
|
|
36
|
+
- Dev-tooling audit gate: `scripts/npm-audit.mjs` + `.audit-allow.json`
|
|
37
|
+
replace the bare `npm audit` CI step — patchable transitive deps are
|
|
38
|
+
forced to fixed versions via `overrides` (smol-toml, katex), and only
|
|
39
|
+
explicitly allowlisted unpatched advisories are tolerated (braces,
|
|
40
|
+
dev-only, no patched release).
|
|
41
|
+
|
|
42
|
+
## 0.3.4 — 2026-09-11
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- SonarQube Cloud badge in README.md (project key: `gundestrup_jekyll-client-search`)
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- Verify `event.origin` in transformers-worker.js `message` listener to prevent cross-origin message injection (SonarQube: `javascript:S2819`, CRITICAL)
|
|
51
|
+
- Add `--ignore-scripts` to `npm ci` in CI to prevent lifecycle script execution during dependency installation (SonarQube: `githubactions:S6505`)
|
|
52
|
+
- Pin Semgrep to `1.176.0` with `--only-binary :all:` in CI to prevent setup script execution and lock resolved versions (SonarQube: `githubactions:S8541`, `githubactions:S8544`)
|
|
53
|
+
- Wrap `normalize` and `resultElement` callbacks in anonymous functions in `.map()` calls to avoid passing unexpected iterator arguments (SonarQube: `javascript:S7727`)
|
|
54
|
+
- Wrap `search` callback in anonymous function in `.forEach()` call in benchmark (SonarQube: `javascript:S7727`)
|
|
55
|
+
- Replace `parseInt` with `Number.parseInt` in dropdown and related runtimes (SonarQube: `javascript:S7773`)
|
|
56
|
+
|
|
5
57
|
## 0.3.3 — 2026-09-11
|
|
6
58
|
|
|
7
59
|
### Refactored
|
|
60
|
+
|
|
8
61
|
- Extract duplicated `normalize` function from `client-search-base.js` and `client-search-dropdown.js` into new shared module `assets/client-search-shared.js` (exposes `window.ClientSearchShared.normalize` and `window.ClientSearchShared.coreFields`) — eliminates CodeFactor duplicate-code finding and ensures consistent normalization across both runtimes
|
|
9
62
|
|
|
10
63
|
## 0.3.2 — 2026-09-10
|
|
11
64
|
|
|
12
65
|
### Added
|
|
66
|
+
|
|
13
67
|
- Semgrep security scan in CI (`semgrep ci` job in `.github/workflows/ci.yml`) — runs on every push and pull request using the `SEMGREP_APP_TOKEN` secret and the Semgrep Pro engine with the organization's full policy (2,900+ rules)
|
|
14
68
|
- `.semgrep.yml` with custom Ruby ReDoS detection rules and usage documentation
|
|
15
69
|
- Semgrep step in pre-commit hook (`bin/install-hooks.sh`)
|
|
@@ -19,20 +73,24 @@
|
|
|
19
73
|
- Semgrep usage guide in README.developer.md (local commands, nosemgrep annotations, SHA pinning)
|
|
20
74
|
|
|
21
75
|
### Fixed
|
|
76
|
+
|
|
22
77
|
- Pin all GitHub Actions to full 40-character commit SHAs with version comments to prevent supply-chain attacks via mutable tag repointing (Semgrep: `github-actions-mutable-action-tag`)
|
|
23
78
|
- Replace `Object.assign({}, entry, ...)` in benchmark with explicit field construction to avoid mass-assignment taint (Semgrep: `insecure-object-assign`)
|
|
24
79
|
- Replace manual arXiv query string with `URI.encode_www_form` for correct URL encoding (Semgrep: `avoid-tainted-http-request`)
|
|
25
80
|
|
|
26
81
|
### Changed
|
|
82
|
+
|
|
27
83
|
- Add `nosemgrep` annotations with justifications for false positives (static ERB template, array-form `Open3.capture2`, fixed-host arXiv request) and acceptable risks (local loopback Ollama HTTP in tests and benchmarks)
|
|
28
84
|
|
|
29
85
|
## 0.3.1 — 2026-09-09
|
|
30
86
|
|
|
31
87
|
### Fixed
|
|
88
|
+
|
|
32
89
|
- Fix CodeQL `rb/bad-tag-filter` (high) in `DocumentBuilder#clean` — closing tag regex `</script\s*>` only matched whitespace before `>`, missing browser-accepted tags like `</script\t\n bar>`; changed to `</script[^>]*>` and `</style[^>]*>` to match any non-`>` content
|
|
33
90
|
- Fix CodeQL `rb/polynomial-redos` (high) in `RelatedTag` — `\s*` patterns between optional groups in SYNTAX regex caused O(n²) backtracking on input with many spaces; replaced single regex with token-split parser that validates each token individually
|
|
34
91
|
|
|
35
92
|
### Changed
|
|
93
|
+
|
|
36
94
|
- Update `simplecov` 1.1.1 → 1.2.0
|
|
37
95
|
- Update `google-protobuf` 4.36.0 → 4.36.1 (transitive)
|
|
38
96
|
- Update `sass-embedded` 1.103.1 → 1.104.0 (transitive)
|
|
@@ -42,6 +100,7 @@
|
|
|
42
100
|
## 0.3.0 — 2026-09-02
|
|
43
101
|
|
|
44
102
|
### Added
|
|
103
|
+
|
|
45
104
|
- `{% search_dropdown %}` Liquid tag — compact live-search dropdown for navbars and headers with keyboard navigation (Arrow/Enter/Escape), lazy index loading, icon support, and framework-agnostic semantic HTML (no Bulma/Bootstrap/Tailwind classes)
|
|
46
105
|
- `DropdownConfiguration` class with `enabled`, `max_items`, `min_chars`, `debounce_ms`, `redirect_url` options
|
|
47
106
|
- `assets/client-search-dropdown.js` runtime (434 lines) — two-stage search (AND first, fuzzy OR fallback), shared index cache with the base runtime, multi-instance support via `[data-client-search-dropdown]` attributes, icon rendering from `icon_field`
|
|
@@ -56,6 +115,7 @@
|
|
|
56
115
|
- System test assertions for embeddings/retrieval content matching and non-ASCII query robustness
|
|
57
116
|
|
|
58
117
|
### Changed
|
|
118
|
+
|
|
59
119
|
- `related.max_items` default changed from `nil` (unlimited) to `5`
|
|
60
120
|
- `Configuration#initialize` refactored — extracted `normalize_configured` helper for cleaner config validation
|
|
61
121
|
- Runtime config page now merges `dropdown` config alongside `liveSearch`
|
|
@@ -67,6 +127,7 @@
|
|
|
67
127
|
- README.md updated with dropdown section, related `max:N` docs, and CSS styling examples for dropdown
|
|
68
128
|
|
|
69
129
|
### Fixed
|
|
130
|
+
|
|
70
131
|
- `SearchTag#render` no longer raises on nil site (now returns empty string)
|
|
71
132
|
- `RelatedTag#render` no longer raises on nil site or `client_search: false` config
|
|
72
133
|
- Meta test race condition — `forEach` callback couldn't `await settle()`, causing flaky cross-engine comparisons; fixed by switching to `for` loops
|
|
@@ -74,6 +135,7 @@
|
|
|
74
135
|
## 0.2.0 — 2026-08-27
|
|
75
136
|
|
|
76
137
|
### Added
|
|
138
|
+
|
|
77
139
|
- Generic `passthrough_fields` config option: external plugins declare which document `data` fields to forward into the search index (e.g. `file_type`, `icon_url`, `icon_set` from jekyll-documents)
|
|
78
140
|
- Field renaming in `passthrough_fields`: entries can be strings (same name) or hashes (`{source => target}`) for integration with other search conventions
|
|
79
141
|
- `icon_field` config option (default: `"icon_url"`): tells the browser runtime which field to render as an `<img>` icon before the result title; set to `null` to disable
|
|
@@ -81,10 +143,12 @@
|
|
|
81
143
|
- Result `<article>` elements carry `data-source`, `data-categories`, `data-tags`, plus `data-*` for all passthrough fields (snake_case → data-kebab-case) for CSS-based result customization
|
|
82
144
|
|
|
83
145
|
### Fixed
|
|
146
|
+
|
|
84
147
|
- Allow whitespace in script/style end tags in `DocumentBuilder#clean` (`</script\s*>` instead of `</script>`) — CodeQL: bad HTML filtering regexp
|
|
85
148
|
- Fix polynomial ReDoS in `SearchTag` and `RelatedTag` syntax regexes — strip markup before matching, remove leading/trailing `\s*` patterns that caused O(n²) backtracking (CodeQL: polynomial regex on uncontrolled data)
|
|
86
149
|
|
|
87
150
|
### Changed
|
|
151
|
+
|
|
88
152
|
- Simplified release workflow to tag-push trigger (`push: tags: v*`) — no manual `gh release create` needed
|
|
89
153
|
- Switched to RubyGems trusted publishing (`rubygems/release-gem@v1` with OIDC)
|
|
90
154
|
- Centralized version in `version.rb` as single source of truth — removed `version` field from `package.json`
|