Skip to content

@logseq/libs: update bundled dependencies and publish a refreshed SDK release #13970

Closed

Description

@BaksiLi

Search first

  • I searched and no similar issues were found

What Happened?

Small dependency update for @logseq/libs followed by a new SDK release.

I understand the contribution guidelines generally discourage dependency-only PRs. I’m raising this first because these dependencies are bundled into the published SDK, so downstream projects cannot update them through npm overrides.

Btw, in Chinese

已發佈的 SDK 將依賴內聯進 bundle,導致下游無法透過 overrides 取得更新,因此需要上游升級、重建並發布新版。

@logseq/[email protected] and libs/package.json on logseq/logseq’s master branch pin [email protected], [email protected], and [email protected]. A production dependency audit reports two high-severity findings and one low-severity finding. The published dist/lsplugin.user.js inlines dependency code, so overrides do not change the implementation loaded through the package’s main entry point. Getting updated code to downstream plugins therefore requires rebuilding and publishing the SDK.

These audit findings do not establish that the SDK is exploitable. The SDK does call DOMPurify.sanitize() for plugin-provided UI HTML, but its current calls do not enable IN_PLACE, hooks, or SAFE_FOR_TEMPLATES. Its Lodash usage is limited to isArray, isFunction, and mapKeys; it does not use template, unset, omit, or pullAt. I have not demonstrated exploitation through these SDK paths.

Reproduce the Bug

  1. Install @logseq/[email protected] in a plugin project.
  2. Run npm audit --omit=dev.
  3. Observe two high-severity findings and one low-severity finding in the production dependency tree.
  4. Inspect the published dist/lsplugin.user.js: it contains DOMPurify 3.3.3, and changing downstream npm overrides does not change that bundled code.

Expected Behavior

Update dompurify to 3.4.17 and lodash-es to 4.18.1, then rebuild and publish a new @logseq/libs release so downstream plugins receive the updated bundle.

[email protected] is still affected by CVE-2026-93753 / GHSA-gcqx-w48m-w2h4, which has no patched release. That would need separate follow-up.

Screenshots

No response

Desktop or Mobile Platform Information

No response

Additional Context

I tried these updates locally, with changes limited to libs/package.json and libs/pnpm-lock.yaml. The production audit then reports zero high, zero moderate, and one low-severity finding (deepmerge). The build succeeds, repeated builds produce identical output, and webpack stats confirm that the rebuilt bundle includes the upgraded versions.

Validation is limited: libs has no standalone test script, and I have not run the full Logseq or UI tests. The existing lint check also fails on eight source files untouched by this change.

Related dependency PRs: #12486, #12513, #12946, and #13005. These are closed, but I could not find an issue addressing the bundled release itself.

If this approach is acceptable, I’d be happy to submit the PR. A new @logseq/libs release would still be needed after merging so downstream plugins receive the updated bundle.

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions