Skip to content

Releases: tshaddix/webext-redux

v4.0.0: Merge pull request #304 from tshaddix/async-response

29 Oct 18:14
dbfb07f
Compare
Choose a tag to compare

This release fixes an issue in 3.0.0 that would cause Chrome to log a warning about a message channel being closed before a response was received. See #303.

This is a breaking change if you're using the channelName argument; the option is now passed to createWrapStore() insead of wrapStore():

  import { createWrapStore } from "webext-redux";

  const wrapStore = createWrapStore(
+   { channelName: 'mychannel' }
  );
  wrapStore(
    store, 
-   { channelName: 'mychannel' }
  );

The other options to wrapStore haven't changed. If you're not using channelName, no changes are required!

As part of this release, CI was also updated to use Node 18, 20, and 22 instead of 12, 14, and 16.

v3.0.0

16 Jul 02:13
Compare
Choose a tag to compare

Webext-redux now supports manifest v3! Here's a quick guide on how to update for webext-redux 3.0.0. Full changelog below.

Use createWrapStore() to init wrapStore

  import {
-   wrapStore,
+   createWrapStore
  } from "webext-redux";

+ const wrapStore = createWrapStore();
  wrapStore(store);

Remember to call createWrapStore() at the top-level.

Correct 👍

const wrapStore = createWrapStore()

chrome.storage.local.get('state').then(({ state }) => {
  const store = ...
  wrapStore(store);
});

Incorrect 👎

chrome.storage.local.get('state').then(({ state }) => {
  const store = ...
  // Incorrect: createWrapStore must be called synchronously
  const wrapStore = createWrapStore()
  wrapStore(store);
});

Replace portName with channelName

  Store({
-   portName: 'custom-name'
+   channelName: 'custom-name'
  })

  wrapStore(store, {
-   portName: 'custom-name'
+   channelName: 'custom-name'
  })

Breaking Changes

  • Option portName renamed to channelName.
    For manifest v3 support, webext-redux no longer uses ports. Thus, "portName" doesn't describe the purpose anymore. It still allows multiple independent stores or wrapStore calls. #297.
  • Function wrapStore is now created by createWrapStore.
    This new function sets up listeners to ensure webext-redux works in manifest v3. createWrapStore must be called synchronously at the top level of your extension, just like browser event handlers. More details in #297.
  • Removed external messaging (listening or passing store updates to other extensions).
    Since ports are no longer used, there's no mechanism to track which external contexts are still subscribed to updates. If you have a use case for this feature, please open an issue and we'll brainstorm ways to re-implement this. Details in 5c7d998.

Fixes / Updates

  • Bind getState and subscribe in Store constructor (@dermeck in #289). This fixes compatibility with react-redux v8.
  • Update Redux peer dependency to include v5 (@SidneyNemzer in #299).
  • Internal string constants changed. These aren't part of the public API, but I figured I'd mention them here just in case someone depends on them. See the change in 7fe2113.
  • Minor/patch updates for some dependencies. #300.

New Contributors

All Changes: v2.1.9...v3.0.0

v2.1.9

06 Nov 17:14
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.1.7...v2.1.9

v2.1.7

18 Jun 16:16
8e9aeee
Compare
Choose a tag to compare

This release includes two bug fixes:

  • #252 fixes issues when the global object has been overridden somewhere else on a page.
  • #253 fixes issues with stores not honoring the portName when listening for "store ready" messages.

Thanks to @sokki for your contributions on #253!

v2.1.6

19 Nov 04:54
238d7eb
Compare
Choose a tag to compare

Includes fixes for typescript typings for Redux v4. Thanks @ymdevs !

v2.1.5

15 Nov 16:38
8083537
Compare
Choose a tag to compare

Thanks @craigsketchley for cleaning up dependencies and moving Redux v4 to a peer dependency.

v2.1.4

29 Sep 16:23
185ab81
Compare
Choose a tag to compare

Thanks to @sneakypete81, all builds after 2.1.3 will include a UMD build in the /dist directory.

v2.1.3

29 Sep 15:56
8806170
Compare
Choose a tag to compare

Updated dependencies to address emerging security vulnerabilities in dependencies.

v2.1.2

28 May 17:20
0c4608d
Compare
Choose a tag to compare

Fixed embarrassing breaking bug introduced in the last release which added a message callback in the wrong place. Thanks, @jbarzegar for reporting!

v2.1.1

27 May 16:17
92812f6
Compare
Choose a tag to compare

Includes fix that will catch and ignore errors generated by the "ready" message from the background store. See #209 for detail.