├── .gitignore ├── .travis.yml ├── LICENSE.md ├── README.md ├── package.json ├── rollup.config.js ├── src └── index.ts ├── tests ├── index.ts └── typings │ ├── index.ts │ └── tsconfig.json ├── tsconfig.json ├── tsconfig.tests.json ├── tslint.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # IntelliJ IDEA 2 | .idea 3 | *.iml 4 | 5 | # VSCode 6 | .vscode 7 | 8 | # NPM 9 | node_modules 10 | npm-*.log 11 | 12 | # OS X 13 | .DS_Store 14 | 15 | lib 16 | dist 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "8" 5 | - "9" 6 | - "10" 7 | 8 | script: 9 | - npm run lint 10 | - npm test 11 | - npm run build 12 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Daniel Lytkin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TypeScript FSA [![npm version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] 2 | 3 | Action Creator library for TypeScript. Its goal is to provide type-safe experience with Flux actions with minimum boilerplate. 4 | Created actions are FSA-compliant: 5 | 6 | ```ts 7 | interface Action { 8 | type: string; 9 | payload: Payload; 10 | error?: boolean; 11 | meta?: Object; 12 | } 13 | ``` 14 | 15 | ## Installation 16 | 17 | ``` 18 | npm install --save typescript-fsa 19 | ``` 20 | 21 | ## Usage 22 | 23 | ### Basic 24 | 25 | ```ts 26 | import actionCreatorFactory from 'typescript-fsa'; 27 | 28 | const actionCreator = actionCreatorFactory(); 29 | 30 | // Specify payload shape as generic type argument. 31 | const somethingHappened = actionCreator<{foo: string}>('SOMETHING_HAPPENED'); 32 | 33 | // Get action creator type. 34 | console.log(somethingHappened.type); // SOMETHING_HAPPENED 35 | 36 | // Create action. 37 | const action = somethingHappened({foo: 'bar'}); 38 | console.log(action); // {type: 'SOMETHING_HAPPENED', payload: {foo: 'bar'}} 39 | ``` 40 | 41 | ### Async Action Creators 42 | 43 | Async Action Creators are objects with properties `started`, `done` and 44 | `failed` whose values are action creators. There is a number of [Companion Packages](#companion-packages) that help with binding Async Action Creators to async processes. 45 | 46 | ```ts 47 | import actionCreatorFactory from 'typescript-fsa'; 48 | 49 | const actionCreator = actionCreatorFactory(); 50 | 51 | // specify parameters and result shapes as generic type arguments 52 | const doSomething = 53 | actionCreator.async<{foo: string}, // parameter type 54 | {bar: number}, // success type 55 | {code: number} // error type 56 | >('DO_SOMETHING'); 57 | 58 | console.log(doSomething.started({foo: 'lol'})); 59 | // {type: 'DO_SOMETHING_STARTED', payload: {foo: 'lol'}} 60 | 61 | console.log(doSomething.done({ 62 | params: {foo: 'lol'}, 63 | result: {bar: 42}, 64 | })); 65 | // {type: 'DO_SOMETHING_DONE', payload: { 66 | // params: {foo: 'lol'}, 67 | // result: {bar: 42}, 68 | // }} 69 | 70 | console.log(doSomething.failed({ 71 | params: {foo: 'lol'}, 72 | error: {code: 42}, 73 | })); 74 | // {type: 'DO_SOMETHING_FAILED', payload: { 75 | // params: {foo: 'lol'}, 76 | // error: {code: 42}, 77 | // }, error: true} 78 | ``` 79 | 80 | ### Actions With Type Prefix 81 | 82 | You can specify a prefix that will be prepended to all action types. This is 83 | useful to namespace library actions as well as for large projects where it's 84 | convenient to keep actions near the component that dispatches them. 85 | 86 | ```ts 87 | // MyComponent.actions.ts 88 | import actionCreatorFactory from 'typescript-fsa'; 89 | 90 | const actionCreator = actionCreatorFactory('MyComponent'); 91 | 92 | const somethingHappened = actionCreator<{foo: string}>('SOMETHING_HAPPENED'); 93 | 94 | const action = somethingHappened({foo: 'bar'}); 95 | console.log(action); 96 | // {type: 'MyComponent/SOMETHING_HAPPENED', payload: {foo: 'bar'}} 97 | ``` 98 | 99 | ### Redux 100 | 101 | ```ts 102 | // actions.ts 103 | import actionCreatorFactory from 'typescript-fsa'; 104 | 105 | const actionCreator = actionCreatorFactory(); 106 | 107 | export const somethingHappened = 108 | actionCreator<{foo: string}>('SOMETHING_HAPPENED'); 109 | export const somethingAsync = 110 | actionCreator.async<{foo: string}, 111 | {bar: string} 112 | >('SOMETHING_ASYNC'); 113 | 114 | 115 | // reducer.ts 116 | import {Action} from 'redux'; 117 | import {isType} from 'typescript-fsa'; 118 | import {somethingHappened, somethingAsync} from './actions'; 119 | 120 | type State = {bar: string}; 121 | 122 | export const reducer = (state: State, action: Action): State => { 123 | if (isType(action, somethingHappened)) { 124 | // action.payload is inferred as {foo: string}; 125 | 126 | action.payload.bar; // error 127 | 128 | return {bar: action.payload.foo}; 129 | } 130 | 131 | if (isType(action, somethingAsync.started)) { 132 | return {bar: action.payload.foo}; 133 | } 134 | 135 | if (isType(action, somethingAsync.done)) { 136 | return {bar: action.payload.result.bar}; 137 | } 138 | 139 | return state; 140 | }; 141 | ``` 142 | 143 | #### redux-observable 144 | 145 | ```ts 146 | // epic.ts 147 | import {Action} from 'redux'; 148 | import {Observable} from 'rxjs'; 149 | import {somethingAsync} from './actions'; 150 | 151 | export const epic = (actions$: Observable) => 152 | actions$.filter(somethingAsync.started.match) 153 | .delay(2000) 154 | .map(action => { 155 | // action.payload is inferred as {foo: string}; 156 | 157 | action.payload.bar; // error 158 | 159 | return somethingAsync.done({ 160 | params: action.payload, 161 | result: { 162 | bar: 'bar', 163 | }, 164 | }); 165 | }); 166 | ``` 167 | 168 | ## Companion Packages 169 | 170 | * [typescript-fsa-redux-saga](https://github.com/aikoven/typescript-fsa-redux-saga) 171 | * [typescript-fsa-redux-observable](https://github.com/m0a/typescript-fsa-redux-observable) 172 | * [typescript-fsa-redux-thunk](https://github.com/xdave/typescript-fsa-redux-thunk) 173 | * [typescript-fsa-reducers](https://github.com/dphilipson/typescript-fsa-reducers) 174 | 175 | ## Resources 176 | 177 | * [Type-safe Flux Standard Actions (FSA) in React Using TypeScript FSA](https://www.triplet.fi/blog/type-safe-flux-standard-actions-fsa-in-react-using-typescript-fsa/) 178 | * [Type-safe Asynchronous Actions (Redux Thunk) Using TypeScript FSA](https://www.triplet.fi/blog/type-safe-asynchronous-actions-redux-thunk-using-typescript-fsa/) 179 | 180 | ## API 181 | 182 | ### `actionCreatorFactory(prefix?: string, defaultIsError?: Predicate): ActionCreatorFactory` 183 | 184 | Creates Action Creator factory with optional prefix for action types. 185 | 186 | * `prefix?: string`: Prefix to be prepended to action types as `/`. 187 | * `defaultIsError?: Predicate`: Function that detects whether action is error 188 | given the payload. Default is `payload => payload instanceof Error`. 189 | 190 | ### `ActionCreatorFactory#(type: string, commonMeta?: object, isError?: boolean): ActionCreator` 191 | 192 | Creates Action Creator that produces actions with given `type` and payload of type `Payload`. 193 | 194 | * `type: string`: Type of created actions. 195 | * `commonMeta?: object`: Metadata added to created actions. 196 | * `isError?: boolean`: Defines whether created actions are error actions. 197 | 198 | ### `ActionCreatorFactory#async(type: string, commonMeta?: object): AsyncActionCreators` 199 | 200 | Creates three Action Creators: 201 | * `started: ActionCreator` 202 | * `done: ActionCreator<{params: Params, result: Result}>` 203 | * `failed: ActionCreator<{params: Params, error: Error}>` 204 | 205 | Useful to wrap asynchronous processes. 206 | 207 | * `type: string`: Prefix for types of created actions, which will have types `${type}_STARTED`, `${type}_DONE` and `${type}_FAILED`. 208 | * `commonMeta?: object`: Metadata added to created actions. 209 | 210 | ### `ActionCreator#(payload: Payload, meta?: object): Action` 211 | 212 | Creates action with given payload and metadata. 213 | 214 | * `payload: Payload`: Action payload. 215 | * `meta?: object`: Action metadata. Merged with `commonMeta` of Action Creator. 216 | 217 | ### `isType(action: Action, actionCreator: ActionCreator): boolean` 218 | 219 | Returns `true` if action has the same type as action creator. Defines 220 | [Type Guard](https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards) 221 | that lets TypeScript know `payload` type inside blocks where `isType` returned 222 | `true`: 223 | 224 | ```ts 225 | const somethingHappened = actionCreator<{foo: string}>('SOMETHING_HAPPENED'); 226 | 227 | if (isType(action, somethingHappened)) { 228 | // action.payload has type {foo: string} 229 | } 230 | ``` 231 | 232 | ### `ActionCreator#match(action: Action): boolean` 233 | 234 | Identical to `isType` except it is exposed as a bound method of an action 235 | creator. Since it is bound and takes a single argument it is ideal for passing 236 | to a filtering function like `Array.prototype.filter` or 237 | [RxJS](http://reactivex.io/rxjs/)'s `Observable.prototype.filter`. 238 | 239 | ```ts 240 | const somethingHappened = actionCreator<{foo: string}>('SOMETHING_HAPPENED'); 241 | const somethingElseHappened = 242 | actionCreator<{bar: number}>('SOMETHING_ELSE_HAPPENED'); 243 | 244 | if (somethingHappened.match(action)) { 245 | // action.payload has type {foo: string} 246 | } 247 | 248 | const actionArray = [ 249 | somethingHappened({foo: 'foo'}), 250 | somethingElseHappened({bar: 5}), 251 | ]; 252 | 253 | // somethingHappenedArray has inferred type Action<{foo: string}>[] 254 | const somethingHappenedArray = actionArray.filter(somethingHappened.match); 255 | ``` 256 | 257 | For more on using `Array.prototype.filter` as a type guard, see 258 | [this github issue](https://github.com/Microsoft/TypeScript/issues/7657). 259 | 260 | 261 | [npm-image]: https://badge.fury.io/js/typescript-fsa.svg 262 | [npm-url]: https://badge.fury.io/js/typescript-fsa 263 | [travis-image]: https://travis-ci.org/aikoven/typescript-fsa.svg?branch=master 264 | [travis-url]: https://travis-ci.org/aikoven/typescript-fsa 265 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typescript-fsa", 3 | "version": "3.0.0", 4 | "description": "Type-safe action creator utilities", 5 | "keywords": [ 6 | "redux", 7 | "flux", 8 | "typescript", 9 | "action", 10 | "action creator" 11 | ], 12 | "main": "lib/index.js", 13 | "typings": "lib/index.d.ts", 14 | "files": [ 15 | "dist", 16 | "lib", 17 | "src" 18 | ], 19 | "repository": "aikoven/typescript-fsa", 20 | "scripts": { 21 | "clean": "rimraf lib dist", 22 | "lint": "tslint -c tslint.json src/index.ts tests/index.ts", 23 | "test": "ts-node -P tsconfig.tests.json node_modules/.bin/tape tests/*.ts", 24 | "build:commonjs": "tsc", 25 | "build:umd": "NODE_ENV=development rollup -c -o dist/typescript-fsa.js", 26 | "build:umd:min": "NODE_ENV=production rollup -c -o dist/typescript-fsa.min.js", 27 | "build": "npm run build:commonjs && npm run build:umd && npm run build:umd:min", 28 | "prepublish": "npm run clean && npm run lint && npm run test && npm run build" 29 | }, 30 | "author": "Daniel Lytkin ", 31 | "license": "MIT", 32 | "devDependencies": { 33 | "@alexlur/rollup-plugin-typescript": "^1.0.4", 34 | "@types/tape": "^4.2.28", 35 | "rimraf": "^2.5.4", 36 | "rollup": "^0.46.0", 37 | "rollup-plugin-execute": "^1.0.0", 38 | "rollup-plugin-replace": "^1.1.1", 39 | "rollup-plugin-uglify": "^2.0.1", 40 | "tape": "^4.6.2", 41 | "ts-node": "^8.4.0", 42 | "tslint": "^5.0.0", 43 | "typescript": "^3.6.2", 44 | "typings-tester": "^0.3.0" 45 | }, 46 | "greenkeeper": { 47 | "ignore": [ 48 | "rollup", 49 | "rollup-plugin-execute", 50 | "rollup-plugin-replace", 51 | "rollup-plugin-uglify" 52 | ] 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import typescript from '@alexlur/rollup-plugin-typescript'; 2 | import replace from 'rollup-plugin-replace'; 3 | import uglify from 'rollup-plugin-uglify'; 4 | import execute from 'rollup-plugin-execute'; 5 | 6 | const moduleName = 'TypeScriptFSA'; 7 | 8 | const env = process.env.NODE_ENV; 9 | const config = { 10 | entry: './src/index.ts', 11 | format: 'umd', 12 | exports: 'named', 13 | moduleName, 14 | plugins: [ 15 | typescript(), 16 | replace({ 17 | 'process.env.NODE_ENV': JSON.stringify(env) 18 | }) 19 | ] 20 | }; 21 | 22 | if (env === 'production') { 23 | config.plugins.push( 24 | uglify({ 25 | compress: { 26 | pure_getters: true, 27 | unsafe: true, 28 | unsafe_comps: true, 29 | warnings: false 30 | } 31 | }), 32 | execute([ 33 | 'cp lib/index.d.ts dist/typescript-fsa.d.ts', 34 | `echo "export as namespace ${moduleName};" >> dist/typescript-fsa.d.ts` 35 | ]) 36 | ); 37 | } 38 | 39 | export default config; 40 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export interface AnyAction { 2 | type: any; 3 | } 4 | 5 | export type Meta = null | {[key: string]: any}; 6 | 7 | export interface Action extends AnyAction { 8 | type: string; 9 | payload: Payload; 10 | error?: boolean; 11 | meta?: Meta; 12 | } 13 | 14 | /** 15 | * Returns `true` if action has the same type as action creator. 16 | * Defines Type Guard that lets TypeScript know `payload` type inside blocks 17 | * where `isType` returned `true`. 18 | * 19 | * @example 20 | * 21 | * const somethingHappened = 22 | * actionCreator<{foo: string}>('SOMETHING_HAPPENED'); 23 | * 24 | * if (isType(action, somethingHappened)) { 25 | * // action.payload has type {foo: string} 26 | * } 27 | */ 28 | export function isType( 29 | action: AnyAction, 30 | actionCreator: ActionCreator, 31 | ): action is Action { 32 | return action.type === actionCreator.type; 33 | } 34 | 35 | export interface ActionCreator { 36 | type: string; 37 | /** 38 | * Identical to `isType` except it is exposed as a bound method of an action 39 | * creator. Since it is bound and takes a single argument it is ideal for 40 | * passing to a filtering function like `Array.prototype.filter` or 41 | * RxJS's `Observable.prototype.filter`. 42 | * 43 | * @example 44 | * 45 | * const somethingHappened = 46 | * actionCreator<{foo: string}>('SOMETHING_HAPPENED'); 47 | * const somethingElseHappened = 48 | * actionCreator<{bar: number}>('SOMETHING_ELSE_HAPPENED'); 49 | * 50 | * if (somethingHappened.match(action)) { 51 | * // action.payload has type {foo: string} 52 | * } 53 | * 54 | * const actionArray = [ 55 | * somethingHappened({foo: 'foo'}), 56 | * somethingElseHappened({bar: 5}), 57 | * ]; 58 | * 59 | * // somethingHappenedArray has inferred type Action<{foo: string}>[] 60 | * const somethingHappenedArray = 61 | * actionArray.filter(somethingHappened.match); 62 | */ 63 | match: (action: AnyAction) => action is Action; 64 | /** 65 | * Creates action with given payload and metadata. 66 | * 67 | * @param payload Action payload. 68 | * @param meta Action metadata. Merged with `commonMeta` of Action Creator. 69 | */ 70 | (payload: Payload, meta?: Meta): Action; 71 | } 72 | 73 | export type Success = ( 74 | | {params: Params} 75 | | (Params extends void ? {params?: Params} : never)) & 76 | ({result: Result} | (Result extends void ? {result?: Result} : never)); 77 | 78 | export type Failure = ( 79 | | {params: Params} 80 | | (Params extends void ? {params?: Params} : never)) & {error: Error}; 81 | 82 | export interface AsyncActionCreators { 83 | type: string; 84 | started: ActionCreator; 85 | done: ActionCreator>; 86 | failed: ActionCreator>; 87 | } 88 | 89 | export interface ActionCreatorFactory { 90 | /** 91 | * Creates Action Creator that produces actions with given `type` and payload 92 | * of type `Payload`. 93 | * 94 | * @param type Type of created actions. 95 | * @param commonMeta Metadata added to created actions. 96 | * @param isError Defines whether created actions are error actions. 97 | */ 98 | ( 99 | type: string, 100 | commonMeta?: Meta, 101 | isError?: boolean, 102 | ): ActionCreator; 103 | /** 104 | * Creates Action Creator that produces actions with given `type` and payload 105 | * of type `Payload`. 106 | * 107 | * @param type Type of created actions. 108 | * @param commonMeta Metadata added to created actions. 109 | * @param isError Function that detects whether action is error given the 110 | * payload. 111 | */ 112 | ( 113 | type: string, 114 | commonMeta?: Meta, 115 | isError?: (payload: Payload) => boolean, 116 | ): ActionCreator; 117 | 118 | /** 119 | * Creates three Action Creators: 120 | * * `started: ActionCreator` 121 | * * `done: ActionCreator<{params: Params, result: Result}>` 122 | * * `failed: ActionCreator<{params: Params, error: Error}>` 123 | * 124 | * Useful to wrap asynchronous processes. 125 | * 126 | * @param type Prefix for types of created actions, which will have types 127 | * `${type}_STARTED`, `${type}_DONE` and `${type}_FAILED`. 128 | * @param commonMeta Metadata added to created actions. 129 | */ 130 | async( 131 | type: string, 132 | commonMeta?: Meta, 133 | ): AsyncActionCreators; 134 | } 135 | 136 | declare const process: { 137 | env: { 138 | NODE_ENV?: string; 139 | }; 140 | }; 141 | 142 | /** 143 | * Creates Action Creator factory with optional prefix for action types. 144 | * @param prefix Prefix to be prepended to action types as `/`. 145 | * @param defaultIsError Function that detects whether action is error given the 146 | * payload. Default is `payload => payload instanceof Error`. 147 | */ 148 | export function actionCreatorFactory( 149 | prefix?: string | null, 150 | defaultIsError: (payload: any) => boolean = p => p instanceof Error, 151 | ): ActionCreatorFactory { 152 | const actionTypes: {[type: string]: boolean} = {}; 153 | 154 | const base = prefix ? `${prefix}/` : ''; 155 | 156 | function actionCreator( 157 | type: string, 158 | commonMeta?: Meta, 159 | isError: ((payload: Payload) => boolean) | boolean = defaultIsError, 160 | ) { 161 | const fullType = base + type; 162 | 163 | if (process.env.NODE_ENV !== 'production') { 164 | if (actionTypes[fullType]) 165 | throw new Error(`Duplicate action type: ${fullType}`); 166 | 167 | actionTypes[fullType] = true; 168 | } 169 | 170 | return Object.assign( 171 | (payload: Payload, meta?: Meta) => { 172 | const action: Action = { 173 | type: fullType, 174 | payload, 175 | }; 176 | 177 | if (commonMeta || meta) { 178 | action.meta = Object.assign({}, commonMeta, meta); 179 | } 180 | 181 | if (isError && (typeof isError === 'boolean' || isError(payload))) { 182 | action.error = true; 183 | } 184 | 185 | return action; 186 | }, 187 | { 188 | type: fullType, 189 | toString: () => fullType, 190 | match: (action: AnyAction): action is Action => 191 | action.type === fullType, 192 | }, 193 | ) as ActionCreator; 194 | } 195 | 196 | function asyncActionCreators( 197 | type: string, 198 | commonMeta?: Meta, 199 | ): AsyncActionCreators { 200 | return { 201 | type: base + type, 202 | started: actionCreator(`${type}_STARTED`, commonMeta, false), 203 | done: actionCreator>( 204 | `${type}_DONE`, 205 | commonMeta, 206 | false, 207 | ), 208 | failed: actionCreator>( 209 | `${type}_FAILED`, 210 | commonMeta, 211 | true, 212 | ), 213 | }; 214 | } 215 | 216 | return Object.assign(actionCreator, {async: asyncActionCreators}); 217 | } 218 | 219 | export default actionCreatorFactory; 220 | -------------------------------------------------------------------------------- /tests/index.ts: -------------------------------------------------------------------------------- 1 | import test = require('tape'); 2 | import {join} from "path"; 3 | import {checkDirectory} from "typings-tester"; 4 | import actionCreatorFactory, {isType} from "../src/index"; 5 | 6 | test('isType', assert => { 7 | const actionCreator = actionCreatorFactory(); 8 | 9 | const action1 = actionCreator('ACTION_1'); 10 | const action2 = actionCreator('ACTION_2'); 11 | 12 | const action = action1(); 13 | 14 | assert.true(isType(action, action1)); 15 | assert.false(isType(action, action2)); 16 | 17 | assert.end(); 18 | }); 19 | 20 | test('actionCreator.match', assert => { 21 | const actionCreator = actionCreatorFactory(); 22 | 23 | const action1 = actionCreator('ACTION_1'); 24 | const action2 = actionCreator('ACTION_2'); 25 | 26 | const action = action1(); 27 | 28 | assert.true(action1.match(action)); 29 | assert.false(action2.match(action)); 30 | 31 | assert.end(); 32 | }); 33 | 34 | test('basic', assert => { 35 | const actionCreator = actionCreatorFactory(); 36 | 37 | const someAction = actionCreator<{foo: string}>('ACTION_TYPE'); 38 | 39 | assert.throws(() => actionCreator('ACTION_TYPE'), 40 | 'Duplicate action type ACTION_TYPE'); 41 | 42 | assert.equal(someAction.type, 'ACTION_TYPE'); 43 | 44 | const action = someAction({foo: 'bar'}); 45 | 46 | assert.equal(action.type, 'ACTION_TYPE'); 47 | assert.equal(action.error, undefined); 48 | assert.equal(action.meta, undefined); 49 | assert.deepEqual(action.payload, {foo: 'bar'}); 50 | 51 | assert.end(); 52 | }); 53 | 54 | test('meta', assert => { 55 | const actionCreator = actionCreatorFactory(); 56 | 57 | const someAction = actionCreator('ACTION_TYPE'); 58 | 59 | const action = someAction(undefined, {foo: 'bar'}); 60 | 61 | assert.deepEqual(action.meta, {foo: 'bar'}); 62 | 63 | const someActionWithMeta = actionCreator('ACTION_WITH_META', {foo: 'bar'}); 64 | 65 | const actionWithMeta = someActionWithMeta(undefined); 66 | 67 | assert.deepEqual(actionWithMeta.meta, {foo: 'bar'}); 68 | 69 | const actionWithExtraMeta = someActionWithMeta(undefined, {fizz: 'buzz'}); 70 | 71 | assert.deepEqual(actionWithExtraMeta.meta, {foo: 'bar', fizz: 'buzz'}); 72 | 73 | assert.end(); 74 | }); 75 | 76 | test('error actions', assert => { 77 | const actionCreator = actionCreatorFactory(); 78 | 79 | const errorAction = actionCreator('ERROR_ACTION', null, true); 80 | 81 | const action = errorAction(); 82 | 83 | assert.true(action.error); 84 | 85 | const inferredErrorAction = actionCreator('INF_ERROR_ACTION', null); 86 | 87 | assert.false(inferredErrorAction({}).error); 88 | assert.true(inferredErrorAction(new Error()).error); 89 | 90 | const customErrorAction = actionCreator<{ 91 | isError: boolean; 92 | }>('CUSTOM_ERROR_ACTION', null, payload => payload.isError); 93 | 94 | assert.false(customErrorAction({isError: false}).error); 95 | assert.true(customErrorAction({isError: true}).error); 96 | 97 | const actionCreator2 = actionCreatorFactory(null, 98 | payload => payload.isError); 99 | 100 | const customErrorAction2 = actionCreator2<{ 101 | isError: boolean; 102 | }>('CUSTOM_ERROR_ACTION'); 103 | 104 | assert.false(customErrorAction2({isError: false}).error); 105 | assert.true(customErrorAction2({isError: true}).error); 106 | 107 | assert.end(); 108 | }); 109 | 110 | test('prefix', assert => { 111 | const actionCreator = actionCreatorFactory('somePrefix'); 112 | 113 | const someAction = actionCreator('SOME_ACTION'); 114 | 115 | assert.equal(someAction.type, 'somePrefix/SOME_ACTION'); 116 | 117 | const action = someAction(); 118 | 119 | assert.equal(action.type, 'somePrefix/SOME_ACTION'); 120 | 121 | assert.end(); 122 | }); 123 | 124 | test('async', assert => { 125 | const actionCreator = actionCreatorFactory('prefix'); 126 | 127 | const asyncActions = actionCreator.async< 128 | {foo: string}, 129 | {bar: string} 130 | >('DO_SOMETHING', {baz: 'baz'}); 131 | 132 | assert.equal(asyncActions.type, 'prefix/DO_SOMETHING'); 133 | assert.equal(asyncActions.started.type, 'prefix/DO_SOMETHING_STARTED'); 134 | assert.equal(asyncActions.done.type, 'prefix/DO_SOMETHING_DONE'); 135 | assert.equal(asyncActions.failed.type, 'prefix/DO_SOMETHING_FAILED'); 136 | 137 | const started = asyncActions.started({foo: 'foo'}); 138 | assert.equal(started.type, 'prefix/DO_SOMETHING_STARTED'); 139 | assert.deepEqual(started.payload, {foo: 'foo'}); 140 | assert.deepEqual(started.meta, {baz: 'baz'}); 141 | assert.true(!started.error); 142 | 143 | const done = asyncActions.done({params: {foo: 'foo'}, result: {bar: 'bar'}}); 144 | assert.true(!done.error); 145 | 146 | const failed = asyncActions.failed({params: {foo: 'foo'}, error: 'error'}); 147 | assert.true(failed.error); 148 | 149 | assert.end(); 150 | }); 151 | 152 | test('typings', assert => { 153 | assert.doesNotThrow(() => { 154 | checkDirectory(join(__dirname, 'typings')); 155 | }); 156 | 157 | assert.end(); 158 | }); 159 | -------------------------------------------------------------------------------- /tests/typings/index.ts: -------------------------------------------------------------------------------- 1 | import actionCreatorFactory, {isType, AnyAction} from "typescript-fsa"; 2 | 3 | 4 | declare const action: AnyAction; 5 | 6 | const actionCreator = actionCreatorFactory(); 7 | 8 | 9 | function testPayload() { 10 | const withPayload = actionCreator<{foo: string}>('WITH_PAYLOAD'); 11 | const withoutPayload = actionCreator('WITHOUT_PAYLOAD'); 12 | 13 | // typings:expect-error 14 | const a = withPayload(); 15 | // typings:expect-error 16 | const b = withPayload({bar: 1}); 17 | const c = withPayload({foo: 'bar'}); 18 | const d = withPayload({foo: 'bar'}, {meta: 'meta'}); 19 | 20 | const e = withoutPayload(); 21 | const f = withoutPayload(undefined, {meta: 'meta'}); 22 | // typings:expect-error 23 | const g = withoutPayload({foo: 'bar'}); 24 | } 25 | 26 | function testAsyncPayload() { 27 | const async = actionCreator.async<{foo: string}, 28 | {bar: string}, 29 | {baz: string}>('ASYNC'); 30 | 31 | const started = async.started({foo: 'foo'}); 32 | // typings:expect-error 33 | const started1 = async.started({}); 34 | // typings:expect-error 35 | const started2 = async.started(); 36 | 37 | const done = async.done({ 38 | params: {foo: 'foo'}, 39 | result: {bar: 'bar'}, 40 | }); 41 | // typings:expect-error 42 | const done1 = async.done({ 43 | params: {foo: 1}, 44 | result: {bar: 'bar'}, 45 | }); 46 | // typings:expect-error 47 | const done2 = async.done({ 48 | params: {foo: 'foo'}, 49 | result: {bar: 1}, 50 | }); 51 | 52 | const failed = async.failed({ 53 | params: {foo: 'foo'}, 54 | error: {baz: 'baz'}, 55 | }); 56 | // typings:expect-error 57 | const failed1 = async.failed({ 58 | params: {foo: 1}, 59 | error: {baz: 'baz'}, 60 | }); 61 | // typings:expect-error 62 | const failed2 = async.failed({ 63 | params: {foo: 'foo'}, 64 | error: {baz: 1}, 65 | }); 66 | } 67 | 68 | function testAsyncNoParams() { 69 | const asyncNoParams = actionCreator.async('ASYNC_NO_PARAMS'); 72 | 73 | const started = asyncNoParams.started(); 74 | // typings:expect-error 75 | const started1 = asyncNoParams.started({foo: 'foo'}); 76 | 77 | const done = asyncNoParams.done({ 78 | result: {bar: 'bar'}, 79 | }); 80 | // typings:expect-error 81 | const done1 = asyncNoParams.done({ 82 | params: {foo: 'foo'}, 83 | result: {bar: 'bar'}, 84 | }); 85 | // typings:expect-error 86 | const done2 = asyncNoParams.done({ 87 | result: {bar: 1}, 88 | }); 89 | 90 | const failed = asyncNoParams.failed({ 91 | error: {baz: 'baz'}, 92 | }); 93 | // typings:expect-error 94 | const failed1 = asyncNoParams.failed({ 95 | params: {foo: 'foo'}, 96 | error: {baz: 'baz'}, 97 | }); 98 | // typings:expect-error 99 | const failed2 = asyncNoParams.failed({ 100 | error: {baz: 1}, 101 | }); 102 | } 103 | 104 | function testAsyncNoResult() { 105 | const asyncNoResult = actionCreator.async<{foo: string}, 106 | void, 107 | {baz: string}>('ASYNC_NO_RESULT'); 108 | 109 | const started = asyncNoResult.started({foo: 'foo'}); 110 | // typings:expect-error 111 | const started1 = asyncNoResult.started({}); 112 | // typings:expect-error 113 | const started2 = asyncNoResult.started(); 114 | 115 | const done = asyncNoResult.done({ 116 | params: {foo: 'foo'}, 117 | }); 118 | // typings:expect-error 119 | const done1 = asyncNoResult.done({ 120 | params: {foo: 1}, 121 | }); 122 | // typings:expect-error 123 | const done2 = asyncNoResult.done({ 124 | params: {foo: 'foo'}, 125 | result: {bar: 'bar'}, 126 | }); 127 | 128 | const failed = asyncNoResult.failed({ 129 | params: {foo: 'foo'}, 130 | error: {baz: 'baz'}, 131 | }); 132 | // typings:expect-error 133 | const failed1 = asyncNoResult.failed({ 134 | params: {foo: 1}, 135 | error: {baz: 'baz'}, 136 | }); 137 | // typings:expect-error 138 | const failed2 = asyncNoResult.failed({ 139 | params: {foo: 'foo'}, 140 | error: {baz: 1}, 141 | }); 142 | } 143 | 144 | function testAsyncNoParamsAndResult() { 145 | const async = actionCreator.async('ASYNC'); 148 | 149 | const started = async.started(); 150 | // typings:expect-error 151 | const started2 = async.started({foo: 'foo'}); 152 | 153 | const done = async.done({}); 154 | // typings:expect-error 155 | const done1 = async.done({ 156 | params: {foo: 'foo'}, 157 | }); 158 | // typings:expect-error 159 | const done2 = async.done({ 160 | result: {bar: 'bar'}, 161 | }); 162 | 163 | const failed = async.failed({ 164 | error: {baz: 'baz'}, 165 | }); 166 | // typings:expect-error 167 | const failed1 = async.failed({ 168 | params: {foo: 'foo'}, 169 | error: {baz: 'baz'}, 170 | }); 171 | } 172 | 173 | function testAsyncGeneric(params: P, result: R) { 174 | const async = actionCreator.async('ASYNC'); 175 | 176 | const started = async.started(params); 177 | // typings:expect-error 178 | const started1 = async.started({}); 179 | // typings:expect-error 180 | const started2 = async.started(); 181 | 182 | const done = async.done({ 183 | params, 184 | result, 185 | }); 186 | // typings:expect-error 187 | const done1 = async.done({ 188 | params: {foo: 1}, 189 | result, 190 | }); 191 | // typings:expect-error 192 | const done2 = async.done({ 193 | params, 194 | result: {bar: 1}, 195 | }); 196 | 197 | const failed = async.failed({ 198 | params, 199 | error: {baz: 'baz'}, 200 | }); 201 | // typings:expect-error 202 | const failed1 = async.failed({ 203 | params: {foo: 1}, 204 | error: {baz: 'baz'}, 205 | }); 206 | } 207 | 208 | function testAsyncGenericStrictError(params: P, result: R, error: E) { 209 | const async = actionCreator.async('ASYNC'); 210 | 211 | const started = async.started(params); 212 | // typings:expect-error 213 | const started1 = async.started({}); 214 | // typings:expect-error 215 | const started2 = async.started(); 216 | 217 | const done = async.done({ 218 | params, 219 | result, 220 | }); 221 | // typings:expect-error 222 | const done1 = async.done({ 223 | params: {foo: 1}, 224 | result, 225 | }); 226 | // typings:expect-error 227 | const done2 = async.done({ 228 | params, 229 | result: {bar: 1}, 230 | }); 231 | 232 | const failed = async.failed({ 233 | params, 234 | error, 235 | }); 236 | // typings:expect-error 237 | const failed1 = async.failed({ 238 | params: {foo: 1}, 239 | error, 240 | }); 241 | // typings:expect-error 242 | const failed2 = async.failed({ 243 | params, 244 | error: {baz: 1}, 245 | }); 246 | } 247 | 248 | function testIsType() { 249 | const withPayload = actionCreator<{foo: string}>('WITH_PAYLOAD'); 250 | const withoutPayload = actionCreator('WITHOUT_PAYLOAD'); 251 | 252 | if (isType(action, withPayload)) { 253 | const foo: string = action.payload.foo; 254 | 255 | // typings:expect-error 256 | action.payload.bar; 257 | } 258 | 259 | if (isType(action, withoutPayload)) { 260 | // typings:expect-error 261 | const foo: {} = action.payload; 262 | } 263 | } 264 | 265 | function testMatch() { 266 | const withPayload = actionCreator<{foo: string}>('WITH_PAYLOAD'); 267 | const withoutPayload = actionCreator('WITHOUT_PAYLOAD'); 268 | 269 | if (withPayload.match(action)) { 270 | const foo: string = action.payload.foo; 271 | 272 | // typings:expect-error 273 | action.payload.bar; 274 | } 275 | 276 | if (withoutPayload.match(action)) { 277 | // typings:expect-error 278 | const foo: {} = action.payload; 279 | } 280 | } 281 | 282 | function testMeta() { 283 | const a = actionCreator<{foo: string}>(''); 284 | 285 | a({foo: 'foo'}); 286 | a({foo: 'foo'}, null); 287 | // typings:expect-error 288 | a({foo: 'foo'}, 1); 289 | // typings:expect-error 290 | a({foo: 'foo'}, 'foo'); 291 | // typings:expect-error 292 | a({foo: 'foo'}, true); 293 | 294 | const action = a({foo: 'foo'}, {bar: 'baz'}); 295 | 296 | // typings:expect-error 297 | action.meta.foo; 298 | action.meta!.foo; 299 | } 300 | -------------------------------------------------------------------------------- /tests/typings/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["es6"], 4 | "strictNullChecks": true, 5 | "noImplicitAny": true, 6 | "baseUrl": ".", 7 | "paths": { 8 | "typescript-fsa": ["../../src/index"] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "lib": ["es2015"], 6 | "moduleResolution": "node", 7 | "declaration": true, 8 | "declarationDir": "lib", 9 | "outDir": "lib", 10 | "noImplicitReturns": true, 11 | "noImplicitAny": true, 12 | "strictNullChecks": true 13 | }, 14 | "files": [ 15 | "src/index.ts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /tsconfig.tests.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "lib": ["es2015"], 5 | "moduleResolution": "node", 6 | "strictNullChecks": true, 7 | "noImplicitAny": true, 8 | "noImplicitReturns": true 9 | }, 10 | "include": [ 11 | "tests/*.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "class-name": true, 4 | "comment-format": [ 5 | true, 6 | "check-space" 7 | ], 8 | "indent": [ 9 | true, 10 | "spaces" 11 | ], 12 | "max-line-length": [ 13 | true, 14 | 80 15 | ], 16 | "no-duplicate-variable": true, 17 | "no-empty": false, 18 | "no-eval": true, 19 | "no-internal-module": true, 20 | "no-trailing-whitespace": false, 21 | "no-unused-expression": true, 22 | "no-use-before-declare": true, 23 | "no-var-keyword": true, 24 | "one-line": [ 25 | true, 26 | "check-catch", 27 | "check-else", 28 | "check-open-brace", 29 | "check-whitespace" 30 | ], 31 | "quotemark": false, 32 | "semicolon": true, 33 | "trailing-comma": [ 34 | true, { 35 | "multiline": "always" 36 | } 37 | ], 38 | "triple-equals": [ 39 | true, 40 | "allow-null-check" 41 | ], 42 | "typedef-whitespace": [ 43 | true, 44 | { 45 | "call-signature": "nospace", 46 | "index-signature": "nospace", 47 | "parameter": "nospace", 48 | "property-declaration": "nospace", 49 | "variable-declaration": "nospace" 50 | } 51 | ], 52 | "variable-name": [ 53 | true, 54 | "ban-keywords" 55 | ], 56 | "whitespace": [ 57 | true, 58 | "check-branch", 59 | "check-decl", 60 | "check-operator", 61 | "check-separator", 62 | "check-type" 63 | ] 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@alexlur/rollup-plugin-typescript@^1.0.4": 6 | version "1.0.4" 7 | resolved "https://registry.yarnpkg.com/@alexlur/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.4.tgz#7d661135c079fb784d6503d32b5c03b8139a07be" 8 | dependencies: 9 | rollup-pluginutils "^2.0.1" 10 | tslib "^1.6.0" 11 | 12 | "@types/node@*": 13 | version "7.0.5" 14 | resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7" 15 | 16 | "@types/tape@^4.2.28": 17 | version "4.2.29" 18 | resolved "https://registry.yarnpkg.com/@types/tape/-/tape-4.2.29.tgz#14cf2eb49bf852407eaaefdc53773eb90b32cf56" 19 | dependencies: 20 | "@types/node" "*" 21 | 22 | ansi-regex@^2.0.0: 23 | version "2.1.1" 24 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 25 | 26 | ansi-styles@^2.2.1: 27 | version "2.2.1" 28 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 29 | 30 | ansi-styles@^3.2.1: 31 | version "3.2.1" 32 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 33 | dependencies: 34 | color-convert "^1.9.0" 35 | 36 | arr-diff@^2.0.0: 37 | version "2.0.0" 38 | resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" 39 | dependencies: 40 | arr-flatten "^1.0.1" 41 | 42 | arr-flatten@^1.0.1: 43 | version "1.0.3" 44 | resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" 45 | 46 | array-unique@^0.2.1: 47 | version "0.2.1" 48 | resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" 49 | 50 | arrify@^1.0.0: 51 | version "1.0.1" 52 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 53 | 54 | babel-code-frame@^6.22.0: 55 | version "6.22.0" 56 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" 57 | dependencies: 58 | chalk "^1.1.0" 59 | esutils "^2.0.2" 60 | js-tokens "^3.0.0" 61 | 62 | balanced-match@^0.4.1: 63 | version "0.4.2" 64 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 65 | 66 | brace-expansion@^1.0.0: 67 | version "1.1.6" 68 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" 69 | dependencies: 70 | balanced-match "^0.4.1" 71 | concat-map "0.0.1" 72 | 73 | braces@^1.8.2: 74 | version "1.8.5" 75 | resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" 76 | dependencies: 77 | expand-range "^1.8.1" 78 | preserve "^0.2.0" 79 | repeat-element "^1.1.2" 80 | 81 | buffer-from@^1.0.0: 82 | version "1.0.0" 83 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" 84 | 85 | chalk@^1.1.0: 86 | version "1.1.3" 87 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 88 | dependencies: 89 | ansi-styles "^2.2.1" 90 | escape-string-regexp "^1.0.2" 91 | has-ansi "^2.0.0" 92 | strip-ansi "^3.0.0" 93 | supports-color "^2.0.0" 94 | 95 | chalk@^2.3.0: 96 | version "2.3.2" 97 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" 98 | dependencies: 99 | ansi-styles "^3.2.1" 100 | escape-string-regexp "^1.0.5" 101 | supports-color "^5.3.0" 102 | 103 | color-convert@^1.9.0: 104 | version "1.9.1" 105 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" 106 | dependencies: 107 | color-name "^1.1.1" 108 | 109 | color-name@^1.1.1: 110 | version "1.1.3" 111 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 112 | 113 | colors@^1.1.2: 114 | version "1.1.2" 115 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" 116 | 117 | commander@^2.12.2: 118 | version "2.15.1" 119 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" 120 | 121 | commander@~2.9.0: 122 | version "2.9.0" 123 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 124 | dependencies: 125 | graceful-readlink ">= 1.0.0" 126 | 127 | concat-map@0.0.1: 128 | version "0.0.1" 129 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 130 | 131 | deep-equal@~1.0.1: 132 | version "1.0.1" 133 | resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" 134 | 135 | define-properties@^1.1.2: 136 | version "1.1.2" 137 | resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" 138 | dependencies: 139 | foreach "^2.0.5" 140 | object-keys "^1.0.8" 141 | 142 | defined@~1.0.0: 143 | version "1.0.0" 144 | resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" 145 | 146 | diff@^3.1.0, diff@^3.2.0: 147 | version "3.2.0" 148 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" 149 | 150 | es-abstract@^1.5.0: 151 | version "1.7.0" 152 | resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" 153 | dependencies: 154 | es-to-primitive "^1.1.1" 155 | function-bind "^1.1.0" 156 | is-callable "^1.1.3" 157 | is-regex "^1.0.3" 158 | 159 | es-to-primitive@^1.1.1: 160 | version "1.1.1" 161 | resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" 162 | dependencies: 163 | is-callable "^1.1.1" 164 | is-date-object "^1.0.1" 165 | is-symbol "^1.0.1" 166 | 167 | escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 168 | version "1.0.5" 169 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 170 | 171 | estree-walker@^0.2.1: 172 | version "0.2.1" 173 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e" 174 | 175 | estree-walker@^0.3.0: 176 | version "0.3.1" 177 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" 178 | 179 | esutils@^2.0.2: 180 | version "2.0.2" 181 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 182 | 183 | expand-brackets@^0.1.4: 184 | version "0.1.5" 185 | resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" 186 | dependencies: 187 | is-posix-bracket "^0.1.0" 188 | 189 | expand-range@^1.8.1: 190 | version "1.8.2" 191 | resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" 192 | dependencies: 193 | fill-range "^2.1.0" 194 | 195 | extglob@^0.3.1: 196 | version "0.3.2" 197 | resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" 198 | dependencies: 199 | is-extglob "^1.0.0" 200 | 201 | filename-regex@^2.0.0: 202 | version "2.0.1" 203 | resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" 204 | 205 | fill-range@^2.1.0: 206 | version "2.2.3" 207 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" 208 | dependencies: 209 | is-number "^2.1.0" 210 | isobject "^2.0.0" 211 | randomatic "^1.1.3" 212 | repeat-element "^1.1.2" 213 | repeat-string "^1.5.2" 214 | 215 | findup-sync@~0.3.0: 216 | version "0.3.0" 217 | resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" 218 | dependencies: 219 | glob "~5.0.0" 220 | 221 | for-each@~0.3.2: 222 | version "0.3.2" 223 | resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.2.tgz#2c40450b9348e97f281322593ba96704b9abd4d4" 224 | dependencies: 225 | is-function "~1.0.0" 226 | 227 | for-in@^1.0.1: 228 | version "1.0.2" 229 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" 230 | 231 | for-own@^0.1.4: 232 | version "0.1.5" 233 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" 234 | dependencies: 235 | for-in "^1.0.1" 236 | 237 | foreach@^2.0.5: 238 | version "2.0.5" 239 | resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" 240 | 241 | fs.realpath@^1.0.0: 242 | version "1.0.0" 243 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 244 | 245 | function-bind@^1.0.2, function-bind@^1.1.0, function-bind@~1.1.0: 246 | version "1.1.0" 247 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" 248 | 249 | glob-base@^0.3.0: 250 | version "0.3.0" 251 | resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" 252 | dependencies: 253 | glob-parent "^2.0.0" 254 | is-glob "^2.0.0" 255 | 256 | glob-parent@^2.0.0: 257 | version "2.0.0" 258 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" 259 | dependencies: 260 | is-glob "^2.0.0" 261 | 262 | glob@^7.0.5, glob@^7.1.1, glob@~7.1.1: 263 | version "7.1.1" 264 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 265 | dependencies: 266 | fs.realpath "^1.0.0" 267 | inflight "^1.0.4" 268 | inherits "2" 269 | minimatch "^3.0.2" 270 | once "^1.3.0" 271 | path-is-absolute "^1.0.0" 272 | 273 | glob@~5.0.0: 274 | version "5.0.15" 275 | resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" 276 | dependencies: 277 | inflight "^1.0.4" 278 | inherits "2" 279 | minimatch "2 || 3" 280 | once "^1.3.0" 281 | path-is-absolute "^1.0.0" 282 | 283 | "graceful-readlink@>= 1.0.0": 284 | version "1.0.1" 285 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 286 | 287 | has-ansi@^2.0.0: 288 | version "2.0.0" 289 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 290 | dependencies: 291 | ansi-regex "^2.0.0" 292 | 293 | has-flag@^3.0.0: 294 | version "3.0.0" 295 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 296 | 297 | has@^1.0.1, has@~1.0.1: 298 | version "1.0.1" 299 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" 300 | dependencies: 301 | function-bind "^1.0.2" 302 | 303 | inflight@^1.0.4: 304 | version "1.0.6" 305 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 306 | dependencies: 307 | once "^1.3.0" 308 | wrappy "1" 309 | 310 | inherits@2, inherits@~2.0.3: 311 | version "2.0.3" 312 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 313 | 314 | is-buffer@^1.1.5: 315 | version "1.1.5" 316 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" 317 | 318 | is-callable@^1.1.1, is-callable@^1.1.3: 319 | version "1.1.3" 320 | resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" 321 | 322 | is-date-object@^1.0.1: 323 | version "1.0.1" 324 | resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" 325 | 326 | is-dotfile@^1.0.0: 327 | version "1.0.3" 328 | resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" 329 | 330 | is-equal-shallow@^0.1.3: 331 | version "0.1.3" 332 | resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" 333 | dependencies: 334 | is-primitive "^2.0.0" 335 | 336 | is-extendable@^0.1.1: 337 | version "0.1.1" 338 | resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" 339 | 340 | is-extglob@^1.0.0: 341 | version "1.0.0" 342 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" 343 | 344 | is-function@~1.0.0: 345 | version "1.0.1" 346 | resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" 347 | 348 | is-glob@^2.0.0, is-glob@^2.0.1: 349 | version "2.0.1" 350 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" 351 | dependencies: 352 | is-extglob "^1.0.0" 353 | 354 | is-number@^2.1.0: 355 | version "2.1.0" 356 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" 357 | dependencies: 358 | kind-of "^3.0.2" 359 | 360 | is-number@^3.0.0: 361 | version "3.0.0" 362 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" 363 | dependencies: 364 | kind-of "^3.0.2" 365 | 366 | is-posix-bracket@^0.1.0: 367 | version "0.1.1" 368 | resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" 369 | 370 | is-primitive@^2.0.0: 371 | version "2.0.0" 372 | resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" 373 | 374 | is-regex@^1.0.3: 375 | version "1.0.4" 376 | resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" 377 | dependencies: 378 | has "^1.0.1" 379 | 380 | is-symbol@^1.0.1: 381 | version "1.0.1" 382 | resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" 383 | 384 | isarray@1.0.0: 385 | version "1.0.0" 386 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 387 | 388 | isobject@^2.0.0: 389 | version "2.1.0" 390 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" 391 | dependencies: 392 | isarray "1.0.0" 393 | 394 | js-tokens@^3.0.0: 395 | version "3.0.1" 396 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" 397 | 398 | kind-of@^3.0.2: 399 | version "3.2.2" 400 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" 401 | dependencies: 402 | is-buffer "^1.1.5" 403 | 404 | kind-of@^4.0.0: 405 | version "4.0.0" 406 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" 407 | dependencies: 408 | is-buffer "^1.1.5" 409 | 410 | magic-string@^0.15.2: 411 | version "0.15.2" 412 | resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.15.2.tgz#0681d7388741bbc3addaa65060992624c6c09e9c" 413 | dependencies: 414 | vlq "^0.2.1" 415 | 416 | make-error@^1.1.1: 417 | version "1.2.2" 418 | resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.2.2.tgz#e4e270e474f642cca20fa126fe441163957832ef" 419 | 420 | micromatch@^2.3.11: 421 | version "2.3.11" 422 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" 423 | dependencies: 424 | arr-diff "^2.0.0" 425 | array-unique "^0.2.1" 426 | braces "^1.8.2" 427 | expand-brackets "^0.1.4" 428 | extglob "^0.3.1" 429 | filename-regex "^2.0.0" 430 | is-extglob "^1.0.0" 431 | is-glob "^2.0.1" 432 | kind-of "^3.0.2" 433 | normalize-path "^2.0.1" 434 | object.omit "^2.0.0" 435 | parse-glob "^3.0.4" 436 | regex-cache "^0.4.2" 437 | 438 | "minimatch@2 || 3", minimatch@^3.0.2: 439 | version "3.0.3" 440 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 441 | dependencies: 442 | brace-expansion "^1.0.0" 443 | 444 | minimist@0.0.8, minimist@~0.0.1: 445 | version "0.0.8" 446 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 447 | 448 | minimist@^1.2.0, minimist@~1.2.0: 449 | version "1.2.0" 450 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 451 | 452 | mkdirp@^0.5.1: 453 | version "0.5.1" 454 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 455 | dependencies: 456 | minimist "0.0.8" 457 | 458 | normalize-path@^2.0.1: 459 | version "2.1.1" 460 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" 461 | dependencies: 462 | remove-trailing-separator "^1.0.1" 463 | 464 | object-inspect@~1.2.1: 465 | version "1.2.1" 466 | resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.2.1.tgz#3b62226eb8f6d441751c7d8f22a20ff80ac9dc3f" 467 | 468 | object-keys@^1.0.8: 469 | version "1.0.11" 470 | resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" 471 | 472 | object.omit@^2.0.0: 473 | version "2.0.1" 474 | resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" 475 | dependencies: 476 | for-own "^0.1.4" 477 | is-extendable "^0.1.1" 478 | 479 | once@^1.3.0: 480 | version "1.4.0" 481 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 482 | dependencies: 483 | wrappy "1" 484 | 485 | optimist@~0.6.0: 486 | version "0.6.1" 487 | resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" 488 | dependencies: 489 | minimist "~0.0.1" 490 | wordwrap "~0.0.2" 491 | 492 | parse-glob@^3.0.4: 493 | version "3.0.4" 494 | resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" 495 | dependencies: 496 | glob-base "^0.3.0" 497 | is-dotfile "^1.0.0" 498 | is-extglob "^1.0.0" 499 | is-glob "^2.0.0" 500 | 501 | path-is-absolute@^1.0.0: 502 | version "1.0.1" 503 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 504 | 505 | path-parse@^1.0.5: 506 | version "1.0.5" 507 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" 508 | 509 | preserve@^0.2.0: 510 | version "0.2.0" 511 | resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" 512 | 513 | randomatic@^1.1.3: 514 | version "1.1.7" 515 | resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" 516 | dependencies: 517 | is-number "^3.0.0" 518 | kind-of "^4.0.0" 519 | 520 | regex-cache@^0.4.2: 521 | version "0.4.3" 522 | resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" 523 | dependencies: 524 | is-equal-shallow "^0.1.3" 525 | is-primitive "^2.0.0" 526 | 527 | remove-trailing-separator@^1.0.1: 528 | version "1.0.2" 529 | resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511" 530 | 531 | repeat-element@^1.1.2: 532 | version "1.1.2" 533 | resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" 534 | 535 | repeat-string@^1.5.2: 536 | version "1.6.1" 537 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 538 | 539 | resolve@^1.3.2: 540 | version "1.3.3" 541 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" 542 | dependencies: 543 | path-parse "^1.0.5" 544 | 545 | resolve@~1.1.7: 546 | version "1.1.7" 547 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" 548 | 549 | resumer@~0.0.0: 550 | version "0.0.0" 551 | resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" 552 | dependencies: 553 | through "~2.3.4" 554 | 555 | rimraf@^2.5.4: 556 | version "2.6.1" 557 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" 558 | dependencies: 559 | glob "^7.0.5" 560 | 561 | rollup-plugin-execute@^1.0.0: 562 | version "1.0.0" 563 | resolved "https://registry.yarnpkg.com/rollup-plugin-execute/-/rollup-plugin-execute-1.0.0.tgz#cea6445ef5b2655253a6b0b859ecf7c6ef8d08f6" 564 | 565 | rollup-plugin-replace@^1.1.1: 566 | version "1.1.1" 567 | resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-1.1.1.tgz#396315ded050a6ce43b9518a886a3f60efb1ea33" 568 | dependencies: 569 | magic-string "^0.15.2" 570 | minimatch "^3.0.2" 571 | rollup-pluginutils "^1.5.0" 572 | 573 | rollup-plugin-uglify@^2.0.1: 574 | version "2.0.1" 575 | resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-2.0.1.tgz#67b37ad1efdafbd83af4c36b40c189ee4866c969" 576 | dependencies: 577 | uglify-js "^3.0.9" 578 | 579 | rollup-pluginutils@^1.5.0: 580 | version "1.5.2" 581 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" 582 | dependencies: 583 | estree-walker "^0.2.1" 584 | minimatch "^3.0.2" 585 | 586 | rollup-pluginutils@^2.0.1: 587 | version "2.0.1" 588 | resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0" 589 | dependencies: 590 | estree-walker "^0.3.0" 591 | micromatch "^2.3.11" 592 | 593 | rollup@^0.46.0: 594 | version "0.46.3" 595 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.46.3.tgz#40b408a202b2273ba0318e9672c51290fe33ea11" 596 | 597 | semver@^5.3.0: 598 | version "5.3.0" 599 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" 600 | 601 | source-map-support@^0.5.3: 602 | version "0.5.6" 603 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" 604 | dependencies: 605 | buffer-from "^1.0.0" 606 | source-map "^0.6.0" 607 | 608 | source-map@^0.6.0: 609 | version "0.6.1" 610 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 611 | 612 | source-map@~0.5.1: 613 | version "0.5.6" 614 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" 615 | 616 | string.prototype.trim@~1.1.2: 617 | version "1.1.2" 618 | resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" 619 | dependencies: 620 | define-properties "^1.1.2" 621 | es-abstract "^1.5.0" 622 | function-bind "^1.0.2" 623 | 624 | strip-ansi@^3.0.0: 625 | version "3.0.1" 626 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 627 | dependencies: 628 | ansi-regex "^2.0.0" 629 | 630 | supports-color@^2.0.0: 631 | version "2.0.0" 632 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 633 | 634 | supports-color@^5.3.0: 635 | version "5.3.0" 636 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" 637 | dependencies: 638 | has-flag "^3.0.0" 639 | 640 | tape@^4.6.2: 641 | version "4.6.3" 642 | resolved "https://registry.yarnpkg.com/tape/-/tape-4.6.3.tgz#637e77581e9ab2ce17577e9bd4ce4f575806d8b6" 643 | dependencies: 644 | deep-equal "~1.0.1" 645 | defined "~1.0.0" 646 | for-each "~0.3.2" 647 | function-bind "~1.1.0" 648 | glob "~7.1.1" 649 | has "~1.0.1" 650 | inherits "~2.0.3" 651 | minimist "~1.2.0" 652 | object-inspect "~1.2.1" 653 | resolve "~1.1.7" 654 | resumer "~0.0.0" 655 | string.prototype.trim "~1.1.2" 656 | through "~2.3.8" 657 | 658 | through@~2.3.4, through@~2.3.8: 659 | version "2.3.8" 660 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 661 | 662 | ts-node@^6.0.0: 663 | version "6.0.3" 664 | resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-6.0.3.tgz#28bf74bcad134fad17f7469dad04638ece03f0f4" 665 | dependencies: 666 | arrify "^1.0.0" 667 | chalk "^2.3.0" 668 | diff "^3.1.0" 669 | make-error "^1.1.1" 670 | minimist "^1.2.0" 671 | mkdirp "^0.5.1" 672 | source-map-support "^0.5.3" 673 | yn "^2.0.0" 674 | 675 | tslib@^1.6.0: 676 | version "1.7.0" 677 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.0.tgz#6e8366695f72961252b35167b0dd4fbeeafba491" 678 | 679 | tslint@^5.0.0: 680 | version "5.2.0" 681 | resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.2.0.tgz#16a2addf20cb748385f544e9a0edab086bc34114" 682 | dependencies: 683 | babel-code-frame "^6.22.0" 684 | colors "^1.1.2" 685 | diff "^3.2.0" 686 | findup-sync "~0.3.0" 687 | glob "^7.1.1" 688 | optimist "~0.6.0" 689 | resolve "^1.3.2" 690 | semver "^5.3.0" 691 | tslib "^1.6.0" 692 | tsutils "^1.8.0" 693 | 694 | tsutils@^1.8.0: 695 | version "1.8.0" 696 | resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.8.0.tgz#bf8118ed8e80cd5c9fc7d75728c7963d44ed2f52" 697 | 698 | typescript@^3.6.2: 699 | version "3.6.2" 700 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54" 701 | integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw== 702 | 703 | typings-tester@^0.3.0: 704 | version "0.3.1" 705 | resolved "https://registry.yarnpkg.com/typings-tester/-/typings-tester-0.3.1.tgz#53bb9784b0ebd7b93192e6fcd908f14501af3878" 706 | dependencies: 707 | commander "^2.12.2" 708 | 709 | uglify-js@^3.0.9: 710 | version "3.0.18" 711 | resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.0.18.tgz#d67a3e5a0a08356b787fb1c9bddf3a807630902e" 712 | dependencies: 713 | commander "~2.9.0" 714 | source-map "~0.5.1" 715 | 716 | vlq@^0.2.1: 717 | version "0.2.2" 718 | resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.2.tgz#e316d5257b40b86bb43cb8d5fea5d7f54d6b0ca1" 719 | 720 | wordwrap@~0.0.2: 721 | version "0.0.3" 722 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" 723 | 724 | wrappy@1: 725 | version "1.0.2" 726 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 727 | 728 | yn@^2.0.0: 729 | version "2.0.0" 730 | resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" 731 | --------------------------------------------------------------------------------