@cycle/base
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -1,3 +0,3 @@ | ||
<a name="2.0.1"></a> | ||
## [2.0.1](https://github.com/cyclejs/base/compare/v2.0.0...v2.0.1) (2016-04-05) | ||
<a name="4.0.2"></a> | ||
## 4.0.2 (2016-07-31) | ||
@@ -7,49 +7,10 @@ | ||
* **sources:** automatically adapt sources when isValidStream ([31935c3](https://github.com/cyclejs/base/commit/31935c3)) | ||
* **base:** remove browserify config from package.json ([2000474](https://github.com/cyclejs/cyclejs/tree/master/packages/base/commit/2000474)) | ||
<a name="2.0.0"></a> | ||
# [2.0.0](https://github.com/cyclejs/base/compare/v2.0.0...v2.0.0) (2016-04-05) | ||
<a name="4.0.1"></a> | ||
## 4.0.1 (2016-07-16) | ||
### Features | ||
* **DriverFunction:** improve DriverFunction signature ([3da5431](https://github.com/cyclejs/base/commit/3da5431)) | ||
<a name="1.3.0"></a> | ||
# [1.3.0](https://github.com/cyclejs/base/compare/v1.2.2...v1.3.0) (2016-04-05) | ||
### Features | ||
* **src:** export CycleSetup interface ([191f08f](https://github.com/cyclejs/base/commit/191f08f)) | ||
<a name="1.3.0"></a> | ||
# [1.3.0](https://github.com/cyclejs/base/compare/v1.2.2...v1.3.0) (2016-04-05) | ||
### Features | ||
* **src:** export CycleSetup interface ([191f08f](https://github.com/cyclejs/base/commit/191f08f)) | ||
<a name="1.2.2"></a> | ||
## [1.2.2](https://github.com/cyclejs/base/compare/v1.2.1...v1.2.2) (2016-01-31) | ||
### Bug Fixes | ||
* **dispose:** add disposal of sources, if they exist ([0ac38e4](https://github.com/cyclejs/base/commit/0ac38e4)) | ||
<a name="1.2.0"></a> | ||
# [1.2.0](https://github.com/cyclejs/base/compare/v1.2.0...v1.2.0) (2016-01-25) | ||
feat(StreamAdapter): improve typing of makeHoldSubject() |
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.CycleBase = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
"use strict"; | ||
var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { | ||
return typeof obj === "undefined" ? "undefined" : _typeof2(obj); | ||
} : function (obj) { | ||
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj); | ||
}; | ||
function logToConsoleError(err) { | ||
@@ -13,0 +7,0 @@ var target = err.stack || err; |
@@ -1,1 +0,1 @@ | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.CycleBase=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";var _typeof2=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol?"symbol":typeof obj};var _typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return typeof obj==="undefined"?"undefined":_typeof2(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol?"symbol":typeof obj==="undefined"?"undefined":_typeof2(obj)};function logToConsoleError(err){var target=err.stack||err;if(console&&console.error){console.error(target)}else if(console&&console.log){console.log(target)}}function makeSinkProxies(drivers,streamAdapter){var sinkProxies={};for(var name_1 in drivers){if(drivers.hasOwnProperty(name_1)){var holdSubject=streamAdapter.makeSubject();var driverStreamAdapter=drivers[name_1].streamAdapter||streamAdapter;var stream=driverStreamAdapter.adapt(holdSubject.stream,streamAdapter.streamSubscribe);sinkProxies[name_1]={stream:stream,observer:holdSubject.observer}}}return sinkProxies}function callDrivers(drivers,sinkProxies,streamAdapter){var sources={};for(var name_2 in drivers){if(drivers.hasOwnProperty(name_2)){var driverOutput=drivers[name_2](sinkProxies[name_2].stream,streamAdapter,name_2);var driverStreamAdapter=drivers[name_2].streamAdapter;if(driverStreamAdapter&&driverStreamAdapter.isValidStream(driverOutput)){sources[name_2]=streamAdapter.adapt(driverOutput,driverStreamAdapter.streamSubscribe)}else{sources[name_2]=driverOutput}}}return sources}function replicateMany(sinks,sinkProxies,streamAdapter){var results=Object.keys(sinks).filter(function(name){return!!sinkProxies[name]}).map(function(name){return streamAdapter.streamSubscribe(sinks[name],{next:function next(x){sinkProxies[name].observer.next(x)},error:function error(err){logToConsoleError(err);sinkProxies[name].observer.error(err)},complete:function complete(x){sinkProxies[name].observer.complete(x)}})});var disposeFunctions=results.filter(function(dispose){return typeof dispose==="function"});return function(){disposeFunctions.forEach(function(dispose){return dispose()})}}function disposeSources(sources){for(var k in sources){if(sources.hasOwnProperty(k)&&sources[k]&&typeof sources[k].dispose==="function"){sources[k].dispose()}}}var isObjectEmpty=function isObjectEmpty(obj){return Object.keys(obj).length===0};function Cycle(main,drivers,options){if(typeof main!=="function"){throw new Error("First argument given to Cycle must be the 'main' "+"function.")}if((typeof drivers==="undefined"?"undefined":_typeof(drivers))!=="object"||drivers===null){throw new Error("Second argument given to Cycle must be an object "+"with driver functions as properties.")}if(isObjectEmpty(drivers)){throw new Error("Second argument given to Cycle must be an object "+"with at least one driver function declared as a property.")}var streamAdapter=options.streamAdapter;if(!streamAdapter||isObjectEmpty(streamAdapter)){throw new Error("Third argument given to Cycle must be an options object "+"with the streamAdapter key supplied with a valid stream adapter.")}var sinkProxies=makeSinkProxies(drivers,streamAdapter);var sources=callDrivers(drivers,sinkProxies,streamAdapter);var sinks=main(sources);if(typeof window!=="undefined"){window.Cyclejs={sinks:sinks}}var run=function run(){var disposeReplication=replicateMany(sinks,sinkProxies,streamAdapter);return function(){disposeSources(sources);disposeReplication()}};return{sinks:sinks,sources:sources,run:run}}Object.defineProperty(exports,"__esModule",{value:true});exports.default=Cycle},{}]},{},[1])(1)}); | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.CycleBase=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol?"symbol":typeof obj};function logToConsoleError(err){var target=err.stack||err;if(console&&console.error){console.error(target)}else if(console&&console.log){console.log(target)}}function makeSinkProxies(drivers,streamAdapter){var sinkProxies={};for(var name_1 in drivers){if(drivers.hasOwnProperty(name_1)){var holdSubject=streamAdapter.makeSubject();var driverStreamAdapter=drivers[name_1].streamAdapter||streamAdapter;var stream=driverStreamAdapter.adapt(holdSubject.stream,streamAdapter.streamSubscribe);sinkProxies[name_1]={stream:stream,observer:holdSubject.observer}}}return sinkProxies}function callDrivers(drivers,sinkProxies,streamAdapter){var sources={};for(var name_2 in drivers){if(drivers.hasOwnProperty(name_2)){var driverOutput=drivers[name_2](sinkProxies[name_2].stream,streamAdapter,name_2);var driverStreamAdapter=drivers[name_2].streamAdapter;if(driverStreamAdapter&&driverStreamAdapter.isValidStream(driverOutput)){sources[name_2]=streamAdapter.adapt(driverOutput,driverStreamAdapter.streamSubscribe)}else{sources[name_2]=driverOutput}}}return sources}function replicateMany(sinks,sinkProxies,streamAdapter){var results=Object.keys(sinks).filter(function(name){return!!sinkProxies[name]}).map(function(name){return streamAdapter.streamSubscribe(sinks[name],{next:function next(x){sinkProxies[name].observer.next(x)},error:function error(err){logToConsoleError(err);sinkProxies[name].observer.error(err)},complete:function complete(x){sinkProxies[name].observer.complete(x)}})});var disposeFunctions=results.filter(function(dispose){return typeof dispose==="function"});return function(){disposeFunctions.forEach(function(dispose){return dispose()})}}function disposeSources(sources){for(var k in sources){if(sources.hasOwnProperty(k)&&sources[k]&&typeof sources[k].dispose==="function"){sources[k].dispose()}}}var isObjectEmpty=function isObjectEmpty(obj){return Object.keys(obj).length===0};function Cycle(main,drivers,options){if(typeof main!=="function"){throw new Error("First argument given to Cycle must be the 'main' "+"function.")}if((typeof drivers==="undefined"?"undefined":_typeof(drivers))!=="object"||drivers===null){throw new Error("Second argument given to Cycle must be an object "+"with driver functions as properties.")}if(isObjectEmpty(drivers)){throw new Error("Second argument given to Cycle must be an object "+"with at least one driver function declared as a property.")}var streamAdapter=options.streamAdapter;if(!streamAdapter||isObjectEmpty(streamAdapter)){throw new Error("Third argument given to Cycle must be an options object "+"with the streamAdapter key supplied with a valid stream adapter.")}var sinkProxies=makeSinkProxies(drivers,streamAdapter);var sources=callDrivers(drivers,sinkProxies,streamAdapter);var sinks=main(sources);if(typeof window!=="undefined"){window.Cyclejs={sinks:sinks}}var run=function run(){var disposeReplication=replicateMany(sinks,sinkProxies,streamAdapter);return function(){disposeSources(sources);disposeReplication()}};return{sinks:sinks,sources:sources,run:run}}Object.defineProperty(exports,"__esModule",{value:true});exports.default=Cycle},{}]},{},[1])(1)}); |
{ | ||
"name": "@cycle/base", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Base infrastructure for a generic run() function for Cycle.js", | ||
"license": "MIT", | ||
"homepage": "https://cyclejs.github.io", | ||
"bugs": "https://github.com/cyclejs/base/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/cyclejs/base" | ||
}, | ||
"homepage": "https://cycle.js.org", | ||
"bugs": "https://github.com/cyclejs/cyclejs/issues", | ||
"repository": "https://github.com/cyclejs/cyclejs/tree/master/packages/base", | ||
"contributors": [ | ||
@@ -35,33 +32,5 @@ { | ||
"devDependencies": { | ||
"assert": "^1.3.0", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-register": "^6.4.3", | ||
"babelify": "^7.2.0", | ||
"browserify": "^13.0.0", | ||
"commitizen": "^2.5.0", | ||
"conventional-changelog": "^0.5.3", | ||
"cz-conventional-changelog": "^1.1.5", | ||
"ghooks": "^1.0.3", | ||
"mkdirp": "^0.5.1", | ||
"mocha": "2.3.3", | ||
"rx": "4.0.6", | ||
"rxjs": "^5.0.0-beta.5", | ||
"sinon": "1.17.2", | ||
"tslint": "3.6.0", | ||
"typescript": "1.8.9", | ||
"uglify-js": "2.6.1", | ||
"validate-commit-msg": "^1.1.1" | ||
"rxjs": "^5.0.0-beta.5" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
[ | ||
"babelify", | ||
{ | ||
"presets": [ | ||
"es2015" | ||
] | ||
} | ||
] | ||
] | ||
}, | ||
"engines": { | ||
@@ -79,21 +48,26 @@ "node": ">=0.10.0" | ||
"scripts": { | ||
"lint": "tslint -c tslint.json src/*.ts", | ||
"commit": "git-cz", | ||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -w", | ||
"prelib": "rm -rf lib/ && mkdirp lib/", | ||
"lib": "tsc", | ||
"lint": "../node_modules/.bin/tslint -c tslint.json src/*.ts", | ||
"prelib": "rm -rf lib/ && mkdir -p lib/", | ||
"lib": "../node_modules/.bin/tsc", | ||
"premocha": "npm run lib", | ||
"mocha": "mocha --compilers js:babel-register test", | ||
"mocha": "../node_modules/.bin/mocha --compilers js:babel-register test", | ||
"test": "npm run lint && npm run mocha", | ||
"predist": "rm -rf dist/ && mkdirp dist/ && npm run lib", | ||
"dist": "browserify lib/index.js -t babelify --standalone CycleBase -o dist/cycle-base.js", | ||
"postdist": "uglifyjs dist/cycle-base.js -o dist/cycle-base.min.js", | ||
"start": "npm install && npm prune", | ||
"prepublish": "npm run lib", | ||
"preversion": "npm run dist && git add dist/ && git diff --quiet --exit-code --cached || git commit -a -m 'chore(dist): build dist/'", | ||
"version-patch": "npm version patch --message 'chore(version): %s'", | ||
"version-minor": "npm version minor --message 'chore(version): %s'", | ||
"version-major": "npm version major --message 'chore(version): %s'", | ||
"postversion": "npm publish --access=public" | ||
"test-ci": "npm run test", | ||
"prebrowserify": "npm run lib", | ||
"browserify": "../node_modules/.bin/browserify lib/index.js -t babelify --standalone CycleBase -o dist/cycle-base.js", | ||
"uglify": "../node_modules/.bin/uglifyjs dist/cycle-base.js -o dist/cycle-base.min.js", | ||
"predist": "rm -rf dist/ && mkdir -p dist/", | ||
"dist": "npm run browserify && npm run uglify", | ||
"readme": ":", | ||
"changelog": "node ../.scripts/update-changelogs.js ${PWD##*/}", | ||
"preversion": "npm test", | ||
"version": "npm run dist && npm run readme && npm run changelog", | ||
"postversion": "git add -A && git commit -m \"release(${PWD##*/}): v$(cat package.json | ../node_modules/.bin/jase version)\" && git push origin master && npm publish", | ||
"release-patch": "npm --no-git-tag-version version patch", | ||
"release-minor": "npm --no-git-tag-version version minor", | ||
"release-major": "npm --no-git-tag-version version major" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
@@ -1,7 +0,3 @@ | ||
# base | ||
Base infrastructure for a generic run() function for Cycle.js | ||
# Cycle Base | ||
[![npm version](https://badge.fury.io/js/%40cycle%2Fbase.svg)](http://badge.fury.io/js/%40cycle%2Fbase) | ||
[![Build Status](https://travis-ci.org/cyclejs/base.svg?branch=master)](https://travis-ci.org/cyclejs/base) | ||
[![Dependency Status](https://david-dm.org/cyclejs/base.svg)](https://david-dm.org/cyclejs/base) | ||
[![devDependency Status](https://david-dm.org/cyclejs/base/dev-status.svg)](https://david-dm.org/cyclejs/base#info=devDependencies) | ||
Base infrastructure for a generic run() function for Cycle.js. Used only internally in Cycle.js. Application developers should never need to install *base* separately. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2
1
38504
17
767
4
5