New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

superfly-timeline

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superfly-timeline - npm Package Compare versions

Comparing version 7.1.2 to 7.2.0

19

CHANGELOG.md

@@ -1,5 +0,22 @@

# Change Log
# Changelog
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.
## [7.2.0](https://github.com/SuperFlyTV/supertimeline/compare/7.1.2...7.2.0) (2019-07-16)
### Bug Fixes
* typo ([f8901b3](https://github.com/SuperFlyTV/supertimeline/commit/f8901b3))
* update dependencies, due to security issues upstream ([28aa657](https://github.com/SuperFlyTV/supertimeline/commit/28aa657))
### Features
* add typings for originalStart & originalEnd ([1f7af78](https://github.com/SuperFlyTV/supertimeline/commit/1f7af78))
* support for having negative start times in groups ([9a61048](https://github.com/SuperFlyTV/supertimeline/commit/9a61048))
* support for originalStart & originalEnd in instances ([52b2a9b](https://github.com/SuperFlyTV/supertimeline/commit/52b2a9b))
<a name="7.1.2"></a>

@@ -6,0 +23,0 @@ ## [7.1.2](https://github.com/SuperFlyTV/supertimeline/compare/7.1.1...7.1.2) (2019-05-21)

@@ -127,5 +127,13 @@ import { EventType } from './enums';

end: Time | null;
/** The original start time of the instance (if an instance is split or capped, the original start time is retained in here).
* If undefined, fallback to .start
*/
originalStart?: Time;
/** The original end time of the instance (if an instance is split or capped, the original end time is retained in here)
* If undefined, fallback to .end
*/
originalEnd?: Time | null;
/** array of the id of the referenced objects */
references: Array<string>;
/** If set, tells the cap of the parent */
/** If set, tells the cap of the parent. The instance will always be capped inside this. */
caps?: Array<Cap>;

@@ -132,0 +140,0 @@ /** If the instance was generated from another instance, reference to the original */

@@ -61,2 +61,4 @@ import { InstanceEvent, TimelineObjectInstance, ResolveOptions, ValueWithReference, Cap } from './api/api';

export declare function resetId(): void;
export declare function setInstanceEndTime(instance: TimelineObjectInstance, endTime: number | null): void;
export declare function setInstanceStartTime(instance: TimelineObjectInstance, startTime: number): void;
export {};

25

dist/lib.js

@@ -26,3 +26,3 @@ "use strict";

if (_.isString(str))
return !!(str.match(/^[0-9\.\-]+$/) && !_.isNaN(parseFloat(str)));
return !!(str.match(/^[\-\+]?[0-9\.]+$/) && !_.isNaN(parseFloat(str)));
return false;

@@ -370,4 +370,5 @@ }

_.each(parentInstances, function (p) {
if (instance.start >= p.start &&
instance.start < (p.end || Infinity)) {
if ((instance.start >= p.start &&
instance.start < (p.end || Infinity)) || (instance.start < p.start &&
(instance.end || Infinity) > (p.end || Infinity))) {
if (parent === null ||

@@ -395,6 +396,6 @@ (p.end || Infinity) > (parent.end || Infinity)) {

(i2.end || Infinity) > parent2.end) {
i2.end = parent2.end;
setInstanceEndTime(i2, parent2.end);
}
if ((i2.start || Infinity) < parent2.start) {
i2.start = parent2.start;
setInstanceStartTime(i2, parent2.start);
}

@@ -482,2 +483,16 @@ returnInstances.push(i2);

exports.resetId = resetId;
function setInstanceEndTime(instance, endTime) {
instance.originalEnd = (instance.originalEnd !== undefined ?
instance.originalEnd :
instance.end);
instance.end = endTime;
}
exports.setInstanceEndTime = setInstanceEndTime;
function setInstanceStartTime(instance, startTime) {
instance.originalStart = (instance.originalStart !== undefined ?
instance.originalStart :
instance.start);
instance.start = startTime;
}
exports.setInstanceStartTime = setInstanceStartTime;
//# sourceMappingURL=lib.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _ = require("underscore");
var lib_1 = require("../lib");
exports.OPERATORS = ['&', '|', '+', '-', '*', '/', '%', '!'];
function interpretExpression(expr) {
if (_.isString(expr)) {
if (lib_1.isNumeric(expr)) {
return parseFloat(expr);
}
else if (_.isString(expr)) {
var operatorList = exports.OPERATORS;

@@ -29,10 +33,2 @@ var regexpOperators = _.map(operatorList, function (o) { return '\\' + o; }).join('');

}
else if (_.isNumber(expr)) {
return expr;
// return {
// l: expr,
// o: '+',
// r: 0
// }
}
else {

@@ -39,0 +35,0 @@ return expr;

@@ -335,2 +335,3 @@ "use strict";

var rest = '';
var objIdsToReference = [];
// Match id, example: "#objectId.start"

@@ -341,6 +342,3 @@ var m = expr.match(/^\W*#([^.]+)(.*)/);

rest = m[2];
var obj_1 = resolvedTimeline.objects[id];
if (obj_1) {
referencedObjs_1.push(obj_1);
}
objIdsToReference = [id];
}

@@ -353,9 +351,3 @@ else {

rest = m_1[2];
var objIds = resolvedTimeline.classes[className] || [];
_.each(objIds, function (objId) {
var obj = resolvedTimeline.objects[objId];
if (obj) {
referencedObjs_1.push(obj);
}
});
objIdsToReference = resolvedTimeline.classes[className] || [];
}

@@ -368,12 +360,12 @@ else {

rest = m_2[2];
var objIds = resolvedTimeline.layers[layer] || [];
_.each(objIds, function (objId) {
var obj = resolvedTimeline.objects[objId];
if (obj) {
referencedObjs_1.push(obj);
}
});
objIdsToReference = resolvedTimeline.layers[layer] || [];
}
}
}
_.each(objIdsToReference, function (objId) {
var obj = resolvedTimeline.objects[objId];
if (obj) {
referencedObjs_1.push(obj);
}
});
if (referencedObjs_1.length) {

@@ -394,3 +386,3 @@ if (rest.match(/start/))

if (firstInstance) {
var duration = (firstInstance && firstInstance.end !== null ?
var duration = (firstInstance.end !== null ?
firstInstance.end - firstInstance.start :

@@ -397,0 +389,0 @@ null);

@@ -7,2 +7,3 @@ "use strict";

var enums_1 = require("../api/enums");
var lib_1 = require("../lib");
function getState(resolved, time, eventLimit) {

@@ -46,5 +47,5 @@ if (eventLimit === void 0) { eventLimit = 0; }

return -1;
if (a.id > a.id)
if (a.id > b.id)
return 1;
if (a.id < a.id)
if (a.id < b.id)
return -1;

@@ -99,14 +100,6 @@ return 0;

_.each(obj.resolved.instances, function (instance) {
var timeEvents = [];
if (instance.start) {
timeEvents.push({ time: instance.start, enable: true });
}
else {
timeEvents.push({ time: instance.start, enable: true });
}
_.each(timeEvents, function (timeEvent) {
if (!pointsInTime[timeEvent.time + ''])
pointsInTime[timeEvent.time + ''] = [];
pointsInTime[timeEvent.time + ''].push({ obj: obj, instance: instance, enable: timeEvent.enable });
});
var timeEvent = { time: instance.start, enable: true };
if (!pointsInTime[timeEvent.time + ''])
pointsInTime[timeEvent.time + ''] = [];
pointsInTime[timeEvent.time + ''].push({ obj: obj, instance: instance, enable: timeEvent.enable });
});

@@ -215,3 +208,3 @@ }

// Cap the old instance, so it'll end at this point in time:
prevObj.instance.end = time;
lib_1.setInstanceEndTime(prevObj.instance, time);
// Update activeObjIds:

@@ -221,6 +214,6 @@ delete activeObjIds[prevObj.id];

if (!onlyForTime ||
prevObj.instance.end > onlyForTime) {
time > onlyForTime) {
resolvedStates.nextEvents.push({
type: enums_1.EventType.END,
time: prevObj.instance.end,
time: time,
objId: prevObj.id

@@ -248,3 +241,7 @@ });

// We're setting new start & end times so they match up with the state:
start: time, end: null, fromInstanceId: currentOnTopOfLayer.instance.id });
start: time, end: null, fromInstanceId: currentOnTopOfLayer.instance.id, originalEnd: (currentOnTopOfLayer.instance.originalEnd !== undefined ?
currentOnTopOfLayer.instance.originalEnd :
currentOnTopOfLayer.instance.end), originalStart: (currentOnTopOfLayer.instance.originalStart !== undefined ?
currentOnTopOfLayer.instance.originalStart :
currentOnTopOfLayer.instance.start) });
// Make the instance id unique:

@@ -251,0 +248,0 @@ _.each(newObj_1.resolved.instances, function (instance) {

{
"name": "superfly-timeline",
"version": "7.1.2",
"version": "7.2.0",
"description": "A collection of rules as well as a resolver for placing objects on a virtual timeline.",

@@ -37,6 +37,6 @@ "license": "MIT",

"watch": "jest --watch",
"cov": "jest --coverage; opn coverage/lcov-report/index.html",
"cov-open": "opn coverage/lcov-report/index.html",
"cov": "jest --coverage; open-cli coverage/lcov-report/index.html",
"cov-open": "open-cli coverage/lcov-report/index.html",
"send-coverage": "jest && codecov",
"docs": "yarn docs:html && opn docs/index.html",
"docs": "yarn docs:html && open-cli docs/index.html",
"docs:test": "yarn docs:html",

@@ -81,18 +81,19 @@ "docs:html": "typedoc src/index.ts --excludePrivate --mode file --theme minimal --out docs",

"devDependencies": {
"@types/jest": "^23.0.0",
"@types/jest": "^24.0.15",
"@types/node": "^8.0.4",
"codecov": "^3.1.0",
"fast-clone": "^1.5.3",
"gh-pages": "^1.2.0",
"jest": "^24.1.0",
"@types/underscore": "^1.8.9",
"codecov": "^3.5.0",
"fast-clone": "^1.5.13",
"gh-pages": "^2.0.1",
"jest": "^24.8.0",
"mkdirp": "^0.5.1",
"node-license-validator": "^1.3.0",
"npm-scripts-info": "^0.3.9",
"nyc": "^13.3.0",
"opn-cli": "^4.0.0",
"nyc": "^14.1.1",
"open-cli": "^5.0.0",
"sleep-ms": "^2.0.1",
"standard-version": "^4.4.0",
"trash-cli": "^1.4.0",
"ts-jest": "^24.0.0",
"tslint": "^5.12.1",
"standard-version": "^6.0.1",
"trash-cli": "^3.0.0",
"ts-jest": "^24.0.2",
"tslint": "^5.18.0",
"tslint-config-standard": "^8.0.1",

@@ -113,3 +114,3 @@ "typedoc": "^0.14.2",

"dependencies": {
"@types/underscore": "^1.8.9",
"marked": "^0.6.2",
"underscore": "^1.9.1"

@@ -116,0 +117,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc