9 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
09976342d2 fix(socratiq): bump uuid to ^14.0.0 (GHSA, buffer bounds in v3/v5/v6)
Transitive via mermaid@11.14.0 — only consumer in this package — uses
uuid v4 (random IDs for diagrams), unaffected by the buffer-bounds bug
in v3/v5/v6, but Dependabot still flags any uuid <14.0.0. Pinned via
overrides so future mermaid bumps stay on the patched line.

Closes Dependabot #88.
2026-05-01 17:23:27 -04:00
dependabot[bot]
eff5e8ec2b build(deps): bump markdown-it from 14.1.0 to 14.1.1 in /socratiq
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.1.0 to 14.1.1.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.1.0...14.1.1)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-26 08:19:55 -04:00
Vijay Janapa Reddi
64c99415c1 fix(socratiq): bump vite-plugin-singlefile to ^2.3.0 to satisfy vite 8 peer dep
vite-plugin-singlefile@2.0.2 declares a peer dependency on
vite ^5.4.11 || ^6.0.0, but socratiq/ pins vite ^8.0.10. npm refused
to resolve the dep tree, so 'npm ci' failed in the SocratiQ Bundle
Drift workflow on every PR that touched socratiq/package-lock.json
— including dependabot bumps for unrelated transitive packages
(see #1538 markdown-it, #1539 solid-js).

vite-plugin-singlefile@2.3.0+ supports vite 5/6/7/8, so a one-line
bump unblocks 'npm ci', which lets the bundle drift check actually
run again.

Also commits the regenerated production bundle and stylesheet to
satisfy the drift check itself.
2026-04-26 07:57:18 -04:00
dependabot[bot]
007fd45409 build(deps): bump jspdf and jspdf-autotable in /socratiq
Bumps [jspdf](https://github.com/parallax/jsPDF) and [jspdf-autotable](https://github.com/simonbengtsson/jsPDF-AutoTable). These dependencies needed to be updated together.

Updates `jspdf` from 2.5.2 to 4.2.1
- [Release notes](https://github.com/parallax/jsPDF/releases)
- [Changelog](https://github.com/parallax/jsPDF/blob/master/RELEASE.md)
- [Commits](https://github.com/parallax/jsPDF/compare/v2.5.2...v4.2.1)

Updates `jspdf-autotable` from 3.8.4 to 5.0.7
- [Release notes](https://github.com/simonbengtsson/jsPDF-AutoTable/releases)
- [Commits](https://github.com/simonbengtsson/jsPDF-AutoTable/compare/v3.8.4...v5.0.7)

---
updated-dependencies:
- dependency-name: jspdf
  dependency-version: 4.2.1
  dependency-type: direct:production
- dependency-name: jspdf-autotable
  dependency-version: 5.0.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-25 12:07:50 +00:00
dependabot[bot]
bc8dcd4831 build(deps-dev): bump vite from 5.4.20 to 8.0.10 in /socratiq
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.20 to 8.0.10.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.0.10/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 8.0.10
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-25 11:47:25 +00:00
dependabot[bot]
c6378b3566 build(deps): bump lodash-es and mermaid in /socratiq
Bumps [lodash-es](https://github.com/lodash/lodash) to 4.18.1 and updates ancestor dependency [mermaid](https://github.com/mermaid-js/mermaid). These dependencies need to be updated together.


Updates `lodash-es` from 4.17.21 to 4.18.1
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.18.1)

Updates `mermaid` from 11.11.0 to 11.14.0
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Commits](https://github.com/mermaid-js/mermaid/compare/mermaid@11.11.0...mermaid@11.14.0)

---
updated-dependencies:
- dependency-name: lodash-es
  dependency-version: 4.18.1
  dependency-type: indirect
- dependency-name: mermaid
  dependency-version: 11.14.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-24 20:02:45 +00:00
Vijay Janapa Reddi
858011aaac chore(socratiq): rename package to @mlsysbook/socratiq
The package had been carrying the legacy name "injectchat" inherited
from an earlier prototype. Rename to the scoped name matching the
rest of the mlsysbook ecosystem, add a real description, and mark the
package private so it cannot be accidentally published to npm.

No behavioural change — the package is consumed only via the prebuilt
bundle at book/quarto/tools/scripts/socratiQ/bundle.js; nothing in
the repository imports it by name.
2026-04-24 13:42:42 -04:00
kai4avaya
b19b9306ee fix: address CodeQL security alerts and code quality warnings
- XSS: validate URL (same-origin, http/https only) before window.location.href
  in streamdown_markdown.js and reference_renderer.js
- XSS: replace tooltip.innerHTML with DOM construction in streamdown_markdown.js
- XSS: sanitize mermaid SVG with DOMPurify in renderMermaid() and at call site
- XSS: sanitize customContainerHtml, mathDiv, and preview.innerHTML with DOMPurify
- XSS: replace button.innerHTML with textContent for question buttons
- XSS: add escapeHtml() for mermaid error messages interpolated into innerHTML
- Add DOMPurify ^3.4.0 to dependencies
- Remove duplicate diagramId assignments in highlight.js and markdown.js
- Remove unused percentLineIndex variable in markdown.js and streamdown_markdown.js
- Remove useless targetElement assignment in streamdown_markdown.js
- chart.js: replace /auto import with tree-shaken named imports in spaced-repetition-stats.js
- Add _comments to package.json documenting bundle size analysis per dependency
2026-04-21 19:32:00 -04:00
kai4avaya
81909553c3 feat: add socratiq directory (excluding node_modules and dist) 2026-04-21 18:39:28 -04:00