{"version":"2.1.333","anchor":"plugin-store-set-accepts-a-new-lasts-field","canonical_anchor":"plugin-store-set-accepts-a-new-lasts-field","heading":"Plugin state writes accept a new optional lasts field","tier":"internal","area":"Plugin API","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/plugin-store-set-accepts-a-new-lasts-field","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Plugin state writes accept a new optional `lasts` field\n\nThe plugin state store's write call now accepts an optional `lasts` key, and its error message names the wrong key correctly\n\n**Unclear.** What `lasts` does to a stored value is not stated.\n\n**What**\n\nThe write call of the plugin state store, `$.state.set`, now accepts an optional `lasts` key. It joins `plugin`, `key`, `id`, `value` and `ifVersion`. Passing `lasts` is no longer rejected.\n\nThe error shown when a write contains a key the call does not accept has also been fixed. It now reports the key that was actually wrong. Before, it printed a different value.\n\n**Why**\n\nPlugin authors who write to the state store can include `lasts` without the write failing. If they pass a key the call does not accept, the error message now tells them which one it was.\n\n- Area: Plugin API\n- Names: `lasts`\n- Tier: Under the hood\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}