Skip to content

[lexical-extension] Chore: Update signals-core to 1.14.4 - #9248

Merged
etrepum merged 1 commit into
meta:mainfrom
etrepum:update-signals-core-1.14.4
Sep 27, 2026
Merged

etrepum merged 1 commit into
meta:mainfrom
etrepum:update-signals-core-1.14.4

Conversation

@etrepum

@etrepum etrepum commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Description

@lexical/extension currently allows @preact/signals-core 1.14.1, which can return stale computed values after a batch changes a signal and restores its original value. A subsequent write can reuse a version observed during the batch, leaving the computed's cached value stale.

Raise the dependency minimum to ^1.14.4 and update pnpm-lock.yaml to pick up the fix in preactjs/signals#947. This also includes the intervening bundle-size improvements and the model effect-capture fix. No Lexical APIs change.

Test plan

No tests were added, but the upstream bug is reproducible from our API with a contrived probe.

Before

Ran this probe through Lexical's signal exports with signals-core 1.14.1:

node --input-type=module <<'JS'
import {batch, computed, signal} from './packages/lexical-extension/src/signals.ts';
for (const method of ['value', 'peek']) {
  const source = signal('A');
  const derived = computed(() => source.value + '!');
  const read = () => method === 'value' ? derived.value : derived.peek();
  read();
  batch(() => {
    source.value = 'B';
    read();
    source.value = 'A';
  });
  source.value = 'C';
  const actual = read();
  console.log(`${method}: expected C!, received ${actual} (${actual === 'C!' ? 'PASS' : 'FAIL'})`);
  if (actual !== 'C!') process.exitCode = 1;
}
JS
value: expected C!, received B! (FAIL)
peek: expected C!, received B! (FAIL)

After

The same probe with signals-core 1.14.4:

value: expected C!, received C! (PASS)
peek: expected C!, received C! (PASS)

pnpm exec vitest run --project unit packages/lexical-extension packages/lexical-react/src/__tests__/unit/useExtensionSignalValue.test.tsx packages/lexical/src/__tests__/unit/LexicalExtensionCore.test.ts:

 Test Files  14 passed (14)
      Tests  178 passed (178)

pnpm exec prettier --check packages/lexical-extension/package.json pnpm-lock.yaml:

Checking formatting...
All matched files use Prettier code style!

pnpm install --frozen-lockfile, pnpm run tsc, and git diff --check also completed successfully (exit 0).

## Description

@lexical/extension currently allows @preact/signals-core 1.14.1, which can return stale computed values after a batch changes a signal and restores its original value. A subsequent write can reuse a version observed during the batch, leaving the computed's cached value stale.

Raise the dependency minimum to ^1.14.4 and update pnpm-lock.yaml to pick up the fix in preactjs/signals#947. This also includes the intervening bundle-size improvements and the model effect-capture fix. No Lexical APIs change.

## Test plan

### Before

Ran this probe through Lexical's signal exports with signals-core 1.14.1:

```sh
node --input-type=module <<'JS'
import {batch, computed, signal} from './packages/lexical-extension/src/signals.ts';
for (const method of ['value', 'peek']) {
  const source = signal('A');
  const derived = computed(() => source.value + '!');
  const read = () => method === 'value' ? derived.value : derived.peek();
  read();
  batch(() => {
    source.value = 'B';
    read();
    source.value = 'A';
  });
  source.value = 'C';
  const actual = read();
  console.log(`${method}: expected C!, received ${actual} (${actual === 'C!' ? 'PASS' : 'FAIL'})`);
  if (actual !== 'C!') process.exitCode = 1;
}
JS
```

```text
value: expected C!, received B! (FAIL)
peek: expected C!, received B! (FAIL)
```

### After

The same probe with signals-core 1.14.4:

```text
value: expected C!, received C! (PASS)
peek: expected C!, received C! (PASS)
```

`pnpm exec vitest run --project unit packages/lexical-extension packages/lexical-react/src/__tests__/unit/useExtensionSignalValue.test.tsx packages/lexical/src/__tests__/unit/LexicalExtensionCore.test.ts`:

```text
 Test Files  14 passed (14)
      Tests  178 passed (178)
```

`pnpm exec prettier --check packages/lexical-extension/package.json pnpm-lock.yaml`:

```text
Checking formatting...
All matched files use Prettier code style!
```

`pnpm install --frozen-lockfile`, `pnpm run tsc`, and `git diff --check` also completed successfully (exit 0).

Browser and E2E suites were not run for this dependency-only update.
@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lexical Ready Ready Preview Sep 27, 2026 6:47pm UTC
lexical-playground Ready Ready Preview Sep 27, 2026 6:47pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 27, 2026
@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Sep 27, 2026
@etrepum
etrepum added this pull request to the merge queue Sep 27, 2026
Merged via the queue into meta:main with commit 774e89e Sep 27, 2026
54 checks passed
@etrepum etrepum mentioned this pull request Sep 28, 2026

This branch was successfully deployed

2 active deployments
Preview – lexical — 42501045 Deployed Sep 27, 2026 by vercel[bot]
Preview – lexical-playground — 42501045 Deployed Sep 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants