Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extend default root state with offline state #364

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .boilerplate-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b1ff5972e107940d3fdf6c5fd9aeafedd0a757ea
4939fd0f79a2ffcc5c6b5e77aa52d5341257b597
13 changes: 13 additions & 0 deletions .github/workflows/resolve-yarn-lock-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Resolve yarn.lock

on:
issue_comment:
types: [created]

jobs:
resolve-yarn-lock-on-comment:
if: contains(github.event.comment.body, '/resolve yarn.lock')
uses: technology-studio/github-workflows/.github/workflows/resolve-yarn-lock.yml@main
with:
pr-number: ${{ github.event.issue.number }}
repo: ${{ github.repository }}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn git-hook
yarn git-hook
12 changes: 6 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
**
!src
!src/**/*
!lib
!lib/**/*
!*.md
!package.json
!/src/
!/src/**/*
!/lib/
!/lib/**/*
!/*.md
!/package.json
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: './tsconfig.json'
tsconfig: './__tests__/tsconfig.json'
}]
},
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths , { prefix: '<rootDir>/' } ),
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,23 @@
"semantic-release": "semantic-release",
"update-boilerplate-version": "./scripts/update-boilerplate-version.sh"
},
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@txo/redux": "^4.0.25",
"immutability-helper": "^3.1.1"
},
"peerDependencies": {
"@txo-peer-dep/redux": "^1.0.1"
},
"devDependencies": {
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@txo-peer-dep/log": "^4.0.1",
"@txo-peer-dep/redux": "^1.0.1",
"@txo/log-console": "^3.0.0",
"@types/jest": "^29.5.4",
"@typescript-eslint/eslint-plugin": "^6.5.0",
Expand Down
7 changes: 7 additions & 0 deletions src/Redux/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
**/

import { combineRedux } from '@txo/redux'
import '@txo-peer-dep/redux'

import {
redux as modelRedux,
Expand All @@ -20,6 +21,12 @@ export type RootStateFragment = {
offline: State,
}

declare module '@txo-peer-dep/redux/lib/Model/Types' {
interface DefaultRootState {
offline: State,
}
}

export const redux = combineRedux({
model: modelRedux,
})
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,11 @@
dependencies:
"@txo/config-manager" "^3.1.0"

"@txo-peer-dep/redux@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@txo-peer-dep/redux/-/redux-1.0.1.tgz#dfe2205cf74e6344ccc635ed330632b84ac3028b"
integrity sha512-6AzIqr8wmllD2aMnwwsbk0hqNG5ldkON5faEg1pHQk03G118G7NkAuE61pUveZNX9tFdtCGfI+t24OCeXKfx4Q==

"@txo/config-manager@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@txo/config-manager/-/config-manager-3.1.0.tgz#9a38d0ba2b2355f973775bafe884cdbb7225dc0d"
Expand Down