Merge branch 'yanick-updux'

typescript
Yanick Champoux 2021-05-02 16:22:19 -04:00
commit a39715f0a8
12 changed files with 22 additions and 16 deletions

View File

@ -2,8 +2,15 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.1.0](https://github.com/yanick/updux/compare/v2.0.0...v2.1.0) (2020-06-19) ## 3.0.0 (2021-05-02)
### ⚠ BREAKING CHANGES
* Upgrade to Typescript 4.
* Switch from 'updeep' to '@yanick/updeep'.
## [2.1.0](https://github.com/yanick/updux/compare/v2.0.0...v2.1.0) (2020-06-19)
### Features ### Features
@ -11,7 +18,6 @@ All notable changes to this project will be documented in this file. See [standa
## [2.0.0](https://github.com/yanick/updux/compare/v1.2.0...v2.0.0) (2020-06-13) ## [2.0.0](https://github.com/yanick/updux/compare/v1.2.0...v2.0.0) (2020-06-13)
### ⚠ BREAKING CHANGES ### ⚠ BREAKING CHANGES
* use ts-action for action creation * use ts-action for action creation

View File

@ -4,7 +4,7 @@
"redux": "^4.0.5", "redux": "^4.0.5",
"ts-action": "^11.0.0", "ts-action": "^11.0.0",
"ts-node": "^8.6.2", "ts-node": "^8.6.2",
"updeep": "^1.2.0" "@yanick/updeep": "^2.2.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.8.4", "@babel/cli": "^7.8.4",
@ -34,7 +34,7 @@
"tsd": "^0.11.0", "tsd": "^0.11.0",
"typedoc": "0.17.7", "typedoc": "0.17.7",
"typedoc-plugin-markdown": "^2.2.17", "typedoc-plugin-markdown": "^2.2.17",
"typescript": "^3.8.3" "typescript": "^4.2.0"
}, },
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "dist/index.js",
@ -47,7 +47,7 @@
"lint": "prettier -c --", "lint": "prettier -c --",
"lint:fix": "prettier --write --" "lint:fix": "prettier --write --"
}, },
"version": "2.1.0", "version": "3.0.0",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/yanick/updux.git" "url": "git+https://github.com/yanick/updux.git"

View File

@ -1,5 +1,5 @@
import fp from 'lodash/fp'; import fp from 'lodash/fp';
import u from 'updeep'; import u from '@yanick/updeep';
function buildInitial(initial: any, coduxes: any = [], subduxes: any = {}) { function buildInitial(initial: any, coduxes: any = [], subduxes: any = {}) {
if (!fp.isPlainObject(initial)) return initial; if (!fp.isPlainObject(initial)) return initial;

View File

@ -1,5 +1,5 @@
import fp from 'lodash/fp'; import fp from 'lodash/fp';
import u from 'updeep'; import u from '@yanick/updeep';
import { import {
Mutation, Mutation,
Action, Action,

View File

@ -1,5 +1,5 @@
import Updux from './updux'; import Updux from './updux';
import u from 'updeep'; import u from '@yanick/updeep';
import tap from 'tap'; import tap from 'tap';
const todo: any = new Updux<any>({ const todo: any = new Updux<any>({

View File

@ -1,4 +1,4 @@
import u from 'updeep'; import u from '@yanick/updeep';
import { action } from 'ts-action'; import { action } from 'ts-action';
import tap from 'tap'; import tap from 'tap';
import sinon from 'sinon'; import sinon from 'sinon';

View File

@ -2,7 +2,7 @@ import { action, empty } from 'ts-action';
import Updux, { dux } from '.'; import Updux, { dux } from '.';
import tap from 'tap'; import tap from 'tap';
import u from 'updeep'; import u from '@yanick/updeep';
tap.test('as array of arrays', async t => { tap.test('as array of arrays', async t => {
const doIt = action('doIt'); const doIt = action('doIt');

View File

@ -1,6 +1,6 @@
import tap from 'tap'; import tap from 'tap';
import Updux, {dux} from '.'; import Updux, {dux} from '.';
import u from 'updeep'; import u from '@yanick/updeep';
import { expectType } from 'tsd'; import { expectType } from 'tsd';
const tracer = (chr: string) => u({ tracer: (s = '') => s + chr }); const tracer = (chr: string) => u({ tracer: (s = '') => s + chr });

View File

@ -1,7 +1,7 @@
import tap from 'tap'; import tap from 'tap';
import Updux from '.'; import Updux from '.';
import { action, payload } from 'ts-action'; import { action, payload } from 'ts-action';
import u from 'updeep'; import u from '@yanick/updeep';
const inc = action('inc'); const inc = action('inc');
const set_double = action('set_double', payload<number>()); const set_double = action('set_double', payload<number>());

View File

@ -1,5 +1,5 @@
import Updux, {dux} from '.'; import Updux, {dux} from '.';
import u from 'updeep'; import u from '@yanick/updeep';
import { action, payload } from 'ts-action'; import { action, payload } from 'ts-action';
import tap from 'tap'; import tap from 'tap';

View File

@ -318,7 +318,7 @@ export type Dux<S = unknown, A = unknown, X = unknown, C = unknown> = {
* ``` * ```
* import Updux from 'updux'; * import Updux from 'updux';
* import { actions, payload } from 'ts-action'; * import { actions, payload } from 'ts-action';
* import u from 'updeep'; * import u from '@yanick/updeep';
* *
* const todoUpdux = new Updux({ * const todoUpdux = new Updux({
* initial: { * initial: {

View File

@ -275,7 +275,7 @@ export class Updux<
* ``` * ```
* import todo from './todo'; // updux for a single todo * import todo from './todo'; // updux for a single todo
* import Updux from 'updux'; * import Updux from 'updux';
* import u from 'updeep'; * import u from '@yanick/updeep';
* *
* const todos = new Updux({ initial: [], subduxes: { '*': todo } }); * const todos = new Updux({ initial: [], subduxes: { '*': todo } });
* todos.addMutation( * todos.addMutation(
@ -370,7 +370,7 @@ export class Updux<
*/ */
get asDux() { get asDux() {
return { return {
createStore: this.createStore, createStore: this.createStore.bind(this),
upreducer: this.upreducer, upreducer: this.upreducer,
subduxes: this.subduxes, subduxes: this.subduxes,
coduxes: this.coduxes, coduxes: this.coduxes,