Skip to content

Releases: almin/almin

almin@0.19.0

12 Jul 08:29
@azu azu
Compare
Choose a tag to compare

BreakingChanges

  • almin: Drop flow type support
  • Drop Node.js 8.x

features

fixes

  • almin: drop flow type support (#427) (9714b9a)
  • deps: update dependency shallow-equal-object to ^1.1.1 (2734178)

almin@0.18.0

27 Aug 02:33
@azu azu
Compare
Choose a tag to compare

almin@0.17.0

09 Jun 13:17
@azu azu
Compare
Choose a tag to compare

almin@0.16.0

24 Feb 04:17
@azu azu
Compare
Choose a tag to compare

almin@0.16.0

features

You can write follows in Almin 0.16+

const context = new Context({
-	dispatcher: new Dispatcher(),
	store: storeGroup
});

Breaking Changes

  • almin: remove dispatcher from DispatchPayloadMeta (9e7a776) #331

almin-react-container@0.6.4

fixes

  • react-container: should initialize before other component (f12cef3), closes #321

almin@0.15.3

05 Feb 13:10
@azu azu
Compare
Choose a tag to compare

almin@0.15.3

fixes

Almin 0.15.0

18 Jan 01:58
@azu azu
Compare
Choose a tag to compare

🌟 Features

Support UseCase#shouldExecute #292 #298

What it UseCase#shouldExecute?

Currently, the user can not prevent to execute of UseCase by declaratory.
Also, almin-logger does log the execute, but this usecase is not executed actually,

class MyUseCase extends UseCase {
    execute(args){
        if(condition){
             return; // Should not execute this UseCase
        }
        // do something
    }
}

The user can prevent to execute of UseCase by declaratory.
This UseCase#shouldExecute allow to write following.

class MyUseCase extends UseCase {
    shouldExecute(args): boolean {
         return false; // if this usecase should not execute
    }
    execute(args){
        // do something
    }
}

If shouldExecute return false, almin-logger does not log the execution of the UseCase.
But, you can observe this log by onWillNotExecuteEachUseCase handler.

For more details, see LifeCycleEventHub · Almin.

📝 Documentation

New documentation design

image

cqrs patterns for javascript application 2018-01-18 11-38-49

🔥 Breaking Change

TypeScript

  • Improve type check on subclass of Payload #296

Before:

// OK
class P1 extends Payload{
    type = "P1"
}
// OK
class P2 extends Payload {
    type: string;
    constructor() {
        super({ type: "P2" });
    }
}
// OK
class P3 extends Payload{
    constructor() {
        super({ type: "P2" });
    }
}
// OK - It is a bug
class P4 extends Payload{
    // no type
}

After:

If you have inherited Payload class, should have defined type property.

// OK
class P1 extends Payload{
    type = "P1"
}
// OK
class P2 extends Payload {
    type: string;
    constructor() {
        super({ type: "P2" });
    }
}
// NG - Need to defined `type: string`
class P3 extends Payload{
    constructor() {
        super({ type: "P2" });
    }
}
// NG: Fix a bug #295 
class P4 extends Payload{
    // no type
}

♻️ Remove deprecated API

  • Remove deprecated Context#on* API #206
  • Remove deprecated ChangedPayload #285

You can migrate this deprecated API to new API by @almin/migration-tools.

How to migrate?

Run following command and select x.x.x → 0.15.x

npm install -g @almin/migration-tools
almin-migration-tools "src/**/*.js"

What is changed?

ChangedPayload has been removed.

import { UseCase, ChangedPayload } from "almin";

export class ExampleUseCase extends UseCase {
    execute() {
        this.context.useCase(new ChangedPayload()).execute();
    }
}

to

import { UseCase } from "almin";

export class ExampleUseCase extends UseCase {
    execute() {
        this.context.useCase({ type: "ChangedPayload" }).execute();
    }
}

For more information, see @almin/migration-tools.

almin-react-container@0.5.0

11 Nov 11:22
@azu azu
Compare
Choose a tag to compare

0.5.0 (2017-11-11)

Features

  • almin-react-container: Can pass props to <Container {...props} /> (#294) (2fc5d2b)
const storeGroup = new StoreGroup({
    myState: new MyStore()
});
// Context
const context = new Context({
    dispatcher: new Dispatcher(),
    store: storeGroup
});
// View

type AppState = typeof storeGroup.state & {
    // defined by App View
    custom?: string;
};

class App extends React.Component<AppState, {}> {
    render() {
        return <div>{this.props.myState.value}</div>;
    }
}

// Create Container
const RootContainer = AlminReactContainer.create(App, context);
ReactDOM.render(<RootContainer custom={"value" }/>, document.body);

almin@0.14.0

18 Sep 05:17
@azu azu
Compare
Choose a tag to compare

⭐️ Features

Blog Post: Almin + React/Vue optimizing performance visually – azu – Medium

Introduce Almin Instruments #280

You can profiling UseCase execute, StoreGroup write/read, Store update using the browser developer tool timeline.

Video: https://twitter.com/azu_re/status/909418278153478144

image

You can turn on performance profile by performanceProfile option.

const appContext = new Context({
    dispatcher: new Dispatcher(),
    store: yourStoreGroup,
    options: {
        strict: true,
        performanceProfile: true
    }
});

For more details, See Performance profile · Almin.js

TypeScript

  • Make Payload abstract #276

Deprecated

  • Deprecate ChangedPayload #285
    • ChangedPayload will be removed @ 0.15.0 #287

If you want to know Roadmap, see Almin 0.15.0 · Issue #287 · almin/almin

almin@0.13.11

29 Jul 13:06
@azu azu
Compare
Choose a tag to compare

Fixes

  • almin: Deprecated warning should be print #258 #270

almin-logger@6.0.0

29 Jul 12:15
@azu azu
Compare
Choose a tag to compare

BREAKING CHANGES

  • almin-logger: Remove SyncLogger

If you use commonjs require, please use require("almin-logger").default.

-const AlminLogger = require("almin-logger");
-import AlminLogger from "almin-logger";
+import { AlminLogger } from "almin-logger";

Chores

  • almin-logger: export { AlminLogger } and remove SyncLogger (#269) (7ee8c5d)

Features

Chores

  • docs(almin-logger): Reflect removal synclogger

  • test(almin-logger): add start/stop test

  • docs(almin-logger): Update README