Skip to content

Commit

Permalink
feat: remove configureStore function and dependency to @reduxjs/too…
Browse files Browse the repository at this point in the history
…lkit

* chore: replace redux-starter-kit with @reduxjs/toolkit

* chore: update packages

Required package updates to solve known vulnerabilities and to make Redux Toolkit work

* Revert manual edit to changelog

* Revert manaul edit of package version

* Revert ts target change

* feat: remove `configureStore` function and dependency to @reduxjs/toolkit

closes #164 and #151.

BREAKING CHANGE:

- `configureStore` function has been removed from public API.
- There is no dependency to [redux-starter-kit](https://github.com/reduxjs/redux-toolkit) package
anymore.
- TypeScript version and `tslib` version has been bumped.

Co-authored-by: Michael Schmid <michael.schmid@raisenow.com>
Co-authored-by: Mohammad Hasani <the-dr-lazy@pm.me>
  • Loading branch information
3 people committed Mar 15, 2021
1 parent 6a5f95b commit 1f488a1
Show file tree
Hide file tree
Showing 8 changed files with 63,322 additions and 11,918 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.spec.ts', '!**/__tests__/**'],
globals: {
'ts-jest': {
tsConfig: 'tsconfig.spec.json',
tsconfig: 'tsconfig.spec.json',
},
},
}
75,177 changes: 63,294 additions & 11,883 deletions package-lock.json

Large diffs are not rendered by default.

28 changes: 12 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,24 @@
"clean": "rimraf tmp dist coverage",
"prepare": "not-in-install || { npm run test-tsc && npm run test && npm run test-dts && npm run build; }"
},
"dependencies": {
"redux-starter-kit": "0.5.1"
},
"devDependencies": {
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^12.0.1",
"@semantic-release/changelog": "^3.0.2",
"@semantic-release/commit-analyzer": "^7.0.0-beta.7",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^7.1.0-beta.10",
"@semantic-release/github": "^5.6.0-beta.6",
"@semantic-release/npm": "^6.0.0-beta.7",
"@semantic-release/release-notes-generator": "^7.1.4",
"@semantic-release/github": "^7.2.0",
"@semantic-release/npm": "^7.0.10",
"@semantic-release/release-notes-generator": "^9.0.2",
"@thebrodmann/tslint-config": "0.2.1",
"@types/jest": "^24.0.0",
"@types/node": "^10.12.18",
"codecov": "^3.1.0",
"docz": "^1.0.0-rc.7",
"docz-theme-default": "^1.0.0-rc.7",
"docz": "^2.3.1",
"dts-jest": "^23.0.0",
"husky": "^2.0.0",
"in-publish": "^2.0.0",
"jest": "^24.0.0",
"jest": "^26.6.3",
"jest-runner-tsc": "^1.5.1",
"lint-staged": "^8.1.0",
"rimraf": "^2.6.3",
Expand All @@ -65,14 +61,14 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-terser": "^5.0.0",
"rxjs-marbles": "^5.0.0",
"semantic-release": "^16.0.0-beta.43",
"ts-jest": "^24.2.0",
"semantic-release": "^17.4.2",
"ts-jest": "^26.5.3",
"tslint": "^5.12.1",
"typescript": "~3.5.2"
"typescript": "^4.2.3"
},
"peerDependencies": {
"rxjs": ">=6.0.0-beta.0 <7",
"tslib": "^1.9.0"
"tslib": "^2.1.0"
},
"keywords": [
"reducer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ exports[`createReducer counter scenario (type) should match snapshot 2`] = `"(st

exports[`createReducer immutable items list scenario (type) should match snapshot 1`] = `"(state: DeepImmutableArray<Item> | undefined, action: { type: string; } | { type: \\"IDENTITY\\"; } | { type: \\"ADD_ITEM\\"; payload: string; } | { type: \\"REMOVE_ITEM\\"; payload: string; }) => DeepImmutableArray<Item> | DeepImmutableObject<Item>[]"`;
exports[`createReducer mutable items list scenario (type) should match snapshot 1`] = `"(state: Item[] | undefined, action: { type: string; } | { type: \\"IDENTITY\\"; } | { type: \\"ADD_ITEM\\"; payload: string; } | { type: \\"REMOVE_ITEM\\"; payload: string; }) => Item[]"`;
exports[`createReducer mutable items list scenario (type) should match snapshot 1`] = `"(state: ItemsState | undefined, action: { type: string; } | { type: \\"IDENTITY\\"; } | { type: \\"ADD_ITEM\\"; payload: string; } | { type: \\"REMOVE_ITEM\\"; payload: string; }) => ItemsState | Item[]"`;
1 change: 0 additions & 1 deletion src/__tests__/__snapshots__/index.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
exports[`public API has proper exports 1`] = `
Object {
"action": [Function],
"configureStore": [Function],
"createAction": [Function],
"createActionCreator": [Function],
"createReducer": [Function],
Expand Down
24 changes: 12 additions & 12 deletions src/__tests__/__snapshots__/types.dts.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`DeepImmutable displayType<DeepImmutable<Array<null>>>() (type) should match snapshot 1`] = `"DeepImmutableArray<null>"`;
exports[`DeepImmutable displayType<DeepImmutable<Function>>() (type) should match snapshot 1`] = `"Function"`;
exports[`DeepImmutable displayType<DeepImmutable<Function[]>>() (type) should match snapshot 1`] = `"DeepImmutableArray<Function>"`;
Expand All @@ -18,13 +20,13 @@ exports[`DeepImmutable displayType<DeepImmutable<Map<'undefined', undefined>>>()
exports[`DeepImmutable displayType<DeepImmutable<Map<'user', User>>>() (type) should match snapshot 1`] = `"DeepImmutableMap<\\"user\\", User>"`;
exports[`DeepImmutable displayType<DeepImmutable<Map<'users', Users>>>() (type) should match snapshot 1`] = `"DeepImmutableMap<\\"users\\", User[]>"`;
exports[`DeepImmutable displayType<DeepImmutable<Map<'users', Users>>>() (type) should match snapshot 1`] = `"DeepImmutableMap<\\"users\\", Users>"`;
exports[`DeepImmutable displayType<DeepImmutable<ReadonlyArray<Function>>>() (type) should match snapshot 1`] = `"DeepImmutableArray<Function>"`;
exports[`DeepImmutable displayType<DeepImmutable<ReadonlyArray<User>>>() (type) should match snapshot 1`] = `"DeepImmutableArray<User>"`;
exports[`DeepImmutable displayType<DeepImmutable<ReadonlyArray<Users>>>() (type) should match snapshot 1`] = `"DeepImmutableArray<User[]>"`;
exports[`DeepImmutable displayType<DeepImmutable<ReadonlyArray<Users>>>() (type) should match snapshot 1`] = `"DeepImmutableArray<Users>"`;
exports[`DeepImmutable displayType<DeepImmutable<ReadonlyArray<boolean>>>() (type) should match snapshot 1`] = `"DeepImmutableArray<boolean>"`;
Expand All @@ -50,22 +52,20 @@ exports[`DeepImmutable displayType<DeepImmutable<ReadonlyMap<'undefined', undefi
exports[`DeepImmutable displayType<DeepImmutable<ReadonlyMap<'user', User>>>() (type) should match snapshot 1`] = `"DeepImmutableMap<\\"user\\", User>"`;
exports[`DeepImmutable displayType<DeepImmutable<ReadonlyMap<'users', Users>>>() (type) should match snapshot 1`] = `"DeepImmutableMap<\\"users\\", User[]>"`;
exports[`DeepImmutable displayType<DeepImmutable<ReadonlyMap<'users', Users>>>() (type) should match snapshot 1`] = `"DeepImmutableMap<\\"users\\", Users>"`;
exports[`DeepImmutable displayType<DeepImmutable<User>>() (type) should match snapshot 1`] = `"DeepImmutableObject<User>"`;
exports[`DeepImmutable displayType<DeepImmutable<User[]>>() (type) should match snapshot 1`] = `"DeepImmutableArray<User>"`;
exports[`DeepImmutable displayType<DeepImmutable<Users[]>>() (type) should match snapshot 1`] = `"DeepImmutableArray<User[]>"`;
exports[`DeepImmutable displayType<DeepImmutable<Users[]>>() (type) should match snapshot 1`] = `"DeepImmutableArray<Users>"`;
exports[`DeepImmutable displayType<DeepImmutable<boolean>>() (type) should match snapshot 1`] = `"boolean"`;
exports[`DeepImmutable displayType<DeepImmutable<boolean[]>>() (type) should match snapshot 1`] = `"DeepImmutableArray<boolean>"`;
exports[`DeepImmutable displayType<DeepImmutable<null>>() (type) should match snapshot 1`] = `"null"`;
exports[`DeepImmutable displayType<DeepImmutable<null[]>>() (type) should match snapshot 1`] = `"DeepImmutableArray<null>"`;
exports[`DeepImmutable displayType<DeepImmutable<number>>() (type) should match snapshot 1`] = `"number"`;
exports[`DeepImmutable displayType<DeepImmutable<number[]>>() (type) should match snapshot 1`] = `"DeepImmutableArray<number>"`;
Expand All @@ -78,6 +78,8 @@ exports[`DeepImmutable displayType<DeepImmutable<undefined>>() (type) should mat
exports[`DeepImmutable displayType<DeepImmutable<undefined[]>>() (type) should match snapshot 1`] = `"DeepImmutableArray<undefined>"`;
exports[`Immutable displayType<Immutable<Array<null>>>() (type) should match snapshot 1`] = `"readonly null[]"`;
exports[`Immutable displayType<Immutable<Function>>() (type) should match snapshot 1`] = `"Function"`;
exports[`Immutable displayType<Immutable<Function[]>>() (type) should match snapshot 1`] = `"readonly Function[]"`;
Expand All @@ -96,13 +98,13 @@ exports[`Immutable displayType<Immutable<Map<'undefined', undefined>>>() (type)
exports[`Immutable displayType<Immutable<Map<'user', User>>>() (type) should match snapshot 1`] = `"ReadonlyMap<\\"user\\", User>"`;
exports[`Immutable displayType<Immutable<Map<'users', Users>>>() (type) should match snapshot 1`] = `"ReadonlyMap<\\"users\\", User[]>"`;
exports[`Immutable displayType<Immutable<Map<'users', Users>>>() (type) should match snapshot 1`] = `"ReadonlyMap<\\"users\\", Users>"`;
exports[`Immutable displayType<Immutable<ReadonlyArray<Function>>>() (type) should match snapshot 1`] = `"readonly Function[]"`;
exports[`Immutable displayType<Immutable<ReadonlyArray<User>>>() (type) should match snapshot 1`] = `"readonly User[]"`;
exports[`Immutable displayType<Immutable<ReadonlyArray<Users>>>() (type) should match snapshot 1`] = `"readonly User[][]"`;
exports[`Immutable displayType<Immutable<ReadonlyArray<Users>>>() (type) should match snapshot 1`] = `"readonly Users[]"`;
exports[`Immutable displayType<Immutable<ReadonlyArray<boolean>>>() (type) should match snapshot 1`] = `"readonly boolean[]"`;
Expand All @@ -128,22 +130,20 @@ exports[`Immutable displayType<Immutable<ReadonlyMap<'undefined', undefined>>>()
exports[`Immutable displayType<Immutable<ReadonlyMap<'user', User>>>() (type) should match snapshot 1`] = `"ReadonlyMap<\\"user\\", User>"`;
exports[`Immutable displayType<Immutable<ReadonlyMap<'users', Users>>>() (type) should match snapshot 1`] = `"ReadonlyMap<\\"users\\", User[]>"`;
exports[`Immutable displayType<Immutable<ReadonlyMap<'users', Users>>>() (type) should match snapshot 1`] = `"ReadonlyMap<\\"users\\", Users>"`;
exports[`Immutable displayType<Immutable<User>>() (type) should match snapshot 1`] = `"Readonly<User>"`;
exports[`Immutable displayType<Immutable<User[]>>() (type) should match snapshot 1`] = `"readonly User[]"`;
exports[`Immutable displayType<Immutable<Users[]>>() (type) should match snapshot 1`] = `"readonly User[][]"`;
exports[`Immutable displayType<Immutable<Users[]>>() (type) should match snapshot 1`] = `"readonly Users[]"`;
exports[`Immutable displayType<Immutable<boolean>>() (type) should match snapshot 1`] = `"boolean"`;
exports[`Immutable displayType<Immutable<boolean[]>>() (type) should match snapshot 1`] = `"readonly boolean[]"`;
exports[`Immutable displayType<Immutable<null>>() (type) should match snapshot 1`] = `"null"`;
exports[`Immutable displayType<Immutable<null[]>>() (type) should match snapshot 1`] = `"readonly null[]"`;
exports[`Immutable displayType<Immutable<number>>() (type) should match snapshot 1`] = `"number"`;
exports[`Immutable displayType<Immutable<number[]>>() (type) should match snapshot 1`] = `"readonly number[]"`;
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/types.dts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ displayType<Immutable<User>>()
// @dts-jest:pass:snap
displayType<Immutable<undefined[]>>()
// @dts-jest:pass:snap
displayType<Immutable<null[]>>()
displayType<Immutable<Array<null>>>()
// @dts-jest:pass:snap
displayType<Immutable<boolean[]>>()
// @dts-jest:pass:snap
Expand Down Expand Up @@ -114,7 +114,7 @@ displayType<DeepImmutable<User>>()
// @dts-jest:pass:snap
displayType<DeepImmutable<undefined[]>>()
// @dts-jest:pass:snap
displayType<DeepImmutable<null[]>>()
displayType<DeepImmutable<Array<null>>>()
// @dts-jest:pass:snap
displayType<DeepImmutable<boolean[]>>()
// @dts-jest:pass:snap
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export { configureStore } from 'redux-starter-kit'

export { createAction as action, Action, AnyAction } from './create-action'
export { createActionCreator, createActionCreator as createAction, ActionCreator } from './create-action-creator'
export { getType } from './get-type'
Expand Down

0 comments on commit 1f488a1

Please sign in to comment.