webext-redux

A set of utilities for building Redux applications in Web Extensions.

MIT License

Downloads
646
Stars
1.2K
webext-redux - v3.0.0 Latest Release

Published by SidneyNemzer 3 months ago

v3.0.0

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 5c7d998f5ccf94b3b905588009b04f558c8ec27d.

Fixes / Updates

  • Bind getState and subscribe in Store constructor (@dermeck in https://github.com/tshaddix/webext-redux/pull/289). This fixes compatibility with react-redux v8.
  • Update Redux peer dependency to include v5 (@SidneyNemzer in https://github.com/tshaddix/webext-redux/pull/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 7fe2113cc31a70188ade7e04289344f60ae33fc5.
  • Minor/patch updates for some dependencies. #300.

New Contributors

All Changes: https://github.com/tshaddix/webext-redux/compare/v2.1.9...v3.0.0

webext-redux - v2.1.9

Published by tshaddix almost 3 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/tshaddix/webext-redux/compare/v2.1.7...v2.1.9

webext-redux - v2.1.7

Published by tshaddix over 4 years ago

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!

webext-redux - v2.1.6

Published by tshaddix almost 5 years ago

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

webext-redux - v2.1.5

Published by tshaddix almost 5 years ago

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

webext-redux - v2.1.4

Published by tshaddix about 5 years ago

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

webext-redux - v2.1.3

Published by tshaddix about 5 years ago

Updated dependencies to address emerging security vulnerabilities in dependencies.

webext-redux - v2.1.2

Published by tshaddix over 5 years ago

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

webext-redux - v2.1.1

Published by tshaddix over 5 years ago

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

webext-redux - v2.1.0

Published by tshaddix over 5 years ago

Adds better diffing functionality for arrays via @srvance's contribution in #202

webext-redux - v2.0.2

Published by tshaddix over 5 years ago

Fixes issue in Firefox via #196

webext-redux - v2.0.1

Published by tshaddix over 5 years ago

This includes a simple enhancement that makes the options parameter of wrapStore and Store optional via defaults.

webext-redux - v2.0.0 WebExt

Published by tshaddix over 5 years ago

This is the 2.0.0 release of react-chrome-redux, now moving forward as webext-redux.

webext-redux - 2.0.0-alpha.5

Published by tshaddix over 5 years ago

Includes changes by @collectedmind , @jvergeldedios, @Mindaugas-Jacionis from PRs #181, #180, #175, #172, #171

webext-redux - v2.0.0-alpha.4

Published by tshaddix about 6 years ago

Updated some dependencies to address vulnerabilities. Updates visible in #165

webext-redux - v2.0.0-alpha.3

Published by tshaddix about 6 years ago

This pre-release includes fixes for middleware application and updated typings. You can view changes in #162 #159

webext-redux - v2.0.0-alpha.2

Published by tshaddix about 6 years ago

This pre-release includes new strategies for state diff-ing. You can view the changes here.

webext-redux - 2.0.0-alpha.1

Published by tshaddix over 6 years ago

This release contains all the changes in previous pre-release v1.6.0-alpha.1, as well as some additional bug fixes via #148

webext-redux - v1.6.0-alpha.1

Published by tshaddix over 6 years ago

This is a pre-release. Changes include addition of serialization hooks from #126, proxy store middleware support from #124, and fixes for latest versions of chrome.

webext-redux - v.1.5.1

Published by tshaddix almost 7 years ago

Patch fixes mis-defined typescript definition for aliases.

Package Rankings
Top 11.14% on Npmjs.org
Badges
Extracted from project README
NPM Version NPM Downloads
Related Projects