Skip to content

Commit

Permalink
Merge pull request #116 from shipt/development
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
chaceburnette authored Nov 16, 2022
2 parents 089c3fe + 3ec6099 commit fba18c8
Show file tree
Hide file tree
Showing 11 changed files with 5,394 additions and 6,522 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
defaults: &defaults
working_directory: ~/osmosis
docker:
- image: circleci/node:12.16.1
- image: circleci/node:14.17.0

install_dependencies: &install_dependencies
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @chaceburnette @lein-haz @joshuakg @jkhusanov @divijadesai @taylorcore @MarquessV @TomMahle @ChiefoftheOwls @rkyle35242
* @chaceburnette @lein-haz @joshuakg @jkhusanov @divijadesai @taylorcore @TomMahle @rkyle35242
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## v2.1.0
* Updated several dependencies
* Updated package.json to reflect React 18 compatibility as peer dependency
* Other maintenance changes
* Updated the wrapper component name to be set from the store hook name

## v2.0.2
* Updated for better intellisence using templates
* Added `useStore` to be attached to objects returned from `setupStore`, which wraps and abstracts the need to explicitly call `useContext(StoreContext)` when subscribing to a store. This also helps with mocking store objects when unit testing components subscribed to a store.
Expand Down
13 changes: 7 additions & 6 deletions examples/counter-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
"private": true,
"dependencies": {
"@shipt/osmosis": "../../osmosis",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "4.0.3"
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"@testing-library/dom": "^8.19.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
4 changes: 2 additions & 2 deletions examples/counter-react/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CounterStore, CounterWithReducerStore } from './store';

import Counter from './counter';
import PersistedCounter from './persistedCounter.js';
import DispactCounter from './dispatchCounter.js';
import DispatchCounter from './dispatchCounter.js';
import CounterByName from './counterByName.js';

configureUsePersistedState({
Expand All @@ -18,7 +18,7 @@ const App = () => {
<>
<Counter />
<PersistedCounter />
<DispactCounter />
<DispatchCounter />
{counters.map(name => (
<CounterByName key={name} storeKey={name} name={name} />
))}
Expand Down
8 changes: 4 additions & 4 deletions examples/counter-react/src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot }from 'react-dom/client';
import App from './App';

ReactDOM.render(
const root = createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
</React.StrictMode>
);

8 changes: 6 additions & 2 deletions examples/counter-react/src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom/extend-expect';
import 'regenerator-runtime/runtime';

import { configure as configureTestingLibrary } from '@testing-library/react';
import { configureUsePersistedState } from '@shipt/osmosis';

// https://github.com/testing-library/dom-testing-library/issues/524
configureTestingLibrary({ asyncUtilTimeout: 400 });

configureUsePersistedState({
getItem: ()=> {},
getItem: () => {},
setItem: () => {}
});
11,860 changes: 5,360 additions & 6,500 deletions examples/counter-react/yarn.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions osmosis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shipt/osmosis",
"version": "2.0.2",
"version": "2.1.0",
"description": "A lightweight state management library for React and React Native",
"keywords": [
"react",
Expand Down Expand Up @@ -35,6 +35,6 @@
"generateTypes": "npx typescript ./src/index.js --declaration --allowJs --emitDeclarationOnly --outDir dist"
},
"peerDependencies": {
"react": "16.x || 17.x"
"react": "16.x || 17.x || 18.x"
}
}
1 change: 1 addition & 0 deletions osmosis/src/setupStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const setupStore = (useCustomHook, config = {}) => {
<WrappedComponent {...props} />
</StoreContextWrapper>
);
Wrapper.displayName = `${useCustomHook.name}Wrapper`;
return Wrapper;
};

Expand Down
8 changes: 4 additions & 4 deletions osmosis/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ component-emitter@^1.2.1:
[email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==

convert-source-map@^1.1.0, convert-source-map@^1.7.0:
version "1.8.0"
Expand Down Expand Up @@ -2314,9 +2314,9 @@ micromatch@^3.1.10, micromatch@^3.1.4:
to-regex "^3.0.2"

minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
dependencies:
brace-expansion "^1.1.7"

Expand Down

0 comments on commit fba18c8

Please sign in to comment.