fitness-models
Advanced tools
Comparing version 0.2.1 to 0.3.0
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
## [0.3.0] 2019-03-29 | ||
### Added | ||
- Temperature to points | ||
### Other | ||
- Update dependency mathjs to ^5.7.0 | ||
- Update dependency @socifi/jest-config to ^2.3.0 | ||
- Update dependency mathjs to ^5.6.0 | ||
- Update dependency luxon to ^1.11.4 | ||
- Update dependency mathjs to ^5.5.0 | ||
- Update dependency @types/luxon to ^1.11.1 | ||
- Update dependency luxon to ^1.11.3 | ||
- Update dependency @types/mathjs to v5 (#18) | ||
- Update dependency luxon to ^1.11.2 | ||
- Update dependency luxon to ^1.11.0 | ||
- Update dependency mathjs to ^5.4.2 | ||
- Update dependency @types/luxon to ^1.10.2 | ||
- Update dependency @socifi/rollup-config to ^2.1.0 | ||
- Update dependency @socifi/eslint-config to ^2.6.1 | ||
- Update dependency @types/mathjs to ^4.4.5 | ||
- Update dependency @types/luxon to ^1.4.2 | ||
## [0.2.1] 2019-01-15 | ||
@@ -5,0 +27,0 @@ ### Merge branch 'master' of github.com |
@@ -47,3 +47,4 @@ import { GarminBuilder, buildGPX } from 'gpx-builder'; | ||
cadence = _ref.cadence, | ||
altitude = _ref.altitude; | ||
altitude = _ref.altitude, | ||
temperature = _ref.temperature; | ||
@@ -68,2 +69,4 @@ _defineProperty(this, "time", void 0); | ||
_defineProperty(this, "temperature", void 0); | ||
this.time = time; | ||
@@ -78,2 +81,3 @@ this.latitude = latitude; | ||
this.altitude = altitude; | ||
this.temperature = temperature; | ||
} | ||
@@ -121,2 +125,6 @@ | ||
getTemperature() { | ||
return this.temperature; | ||
} | ||
setTime(time) { | ||
@@ -176,2 +184,8 @@ return this.clone({ | ||
setTemperature(temperature) { | ||
return this.clone({ | ||
temperature | ||
}); | ||
} | ||
toObject() { | ||
@@ -187,3 +201,4 @@ return { | ||
cadence: this.cadence, | ||
altitude: this.altitude | ||
altitude: this.altitude, | ||
temperature: this.temperature | ||
}; | ||
@@ -745,3 +760,3 @@ } | ||
const distance = this.getDistance(); | ||
return ['Workout', `type: ${this.getTypeName()}`, `start: ${this.getStart().toFormat('yyyy-MM-dd HH:mm')}`, distance ? `distance: ${Math.round(distance.toNumber('km') * 10) / 10}km` : null, `duration: ${Math.round(this.getDuration().as('minutes'))}min`].join('; '); | ||
return ['Workout', "type: " + this.getTypeName(), "start: " + this.getStart().toFormat('yyyy-MM-dd HH:mm'), distance ? "distance: " + Math.round(distance.toNumber('km') * 10) / 10 + "km" : null, "duration: " + Math.round(this.getDuration().as('minutes')) + "min"].join('; '); | ||
} | ||
@@ -748,0 +763,0 @@ |
@@ -51,3 +51,4 @@ 'use strict'; | ||
cadence = _ref.cadence, | ||
altitude = _ref.altitude; | ||
altitude = _ref.altitude, | ||
temperature = _ref.temperature; | ||
@@ -72,2 +73,4 @@ _defineProperty(this, "time", void 0); | ||
_defineProperty(this, "temperature", void 0); | ||
this.time = time; | ||
@@ -82,2 +85,3 @@ this.latitude = latitude; | ||
this.altitude = altitude; | ||
this.temperature = temperature; | ||
} | ||
@@ -125,2 +129,6 @@ | ||
getTemperature() { | ||
return this.temperature; | ||
} | ||
setTime(time) { | ||
@@ -180,2 +188,8 @@ return this.clone({ | ||
setTemperature(temperature) { | ||
return this.clone({ | ||
temperature | ||
}); | ||
} | ||
toObject() { | ||
@@ -191,3 +205,4 @@ return { | ||
cadence: this.cadence, | ||
altitude: this.altitude | ||
altitude: this.altitude, | ||
temperature: this.temperature | ||
}; | ||
@@ -749,3 +764,3 @@ } | ||
const distance = this.getDistance(); | ||
return ['Workout', `type: ${this.getTypeName()}`, `start: ${this.getStart().toFormat('yyyy-MM-dd HH:mm')}`, distance ? `distance: ${Math.round(distance.toNumber('km') * 10) / 10}km` : null, `duration: ${Math.round(this.getDuration().as('minutes'))}min`].join('; '); | ||
return ['Workout', "type: " + this.getTypeName(), "start: " + this.getStart().toFormat('yyyy-MM-dd HH:mm'), distance ? "distance: " + Math.round(distance.toNumber('km') * 10) / 10 + "km" : null, "duration: " + Math.round(this.getDuration().as('minutes')) + "min"].join('; '); | ||
} | ||
@@ -752,0 +767,0 @@ |
@@ -13,2 +13,3 @@ import { DateTime, Duration } from 'luxon'; | ||
speed?: Unit; | ||
temperature?: Unit; | ||
} | ||
@@ -25,3 +26,4 @@ export default class Point { | ||
protected altitude?: Unit; | ||
constructor({ time, latitude, longitude, distance, duration, speed, hr, cadence, altitude, }: Constructor); | ||
protected temperature?: Unit; | ||
constructor({ time, latitude, longitude, distance, duration, speed, hr, cadence, altitude, temperature, }: Constructor); | ||
protected clone(extend: Partial<Constructor>): Point; | ||
@@ -37,2 +39,3 @@ getTime(): DateTime | undefined; | ||
getDuration(): Duration | undefined; | ||
getTemperature(): Unit | undefined; | ||
setTime(time?: DateTime): Point; | ||
@@ -47,3 +50,4 @@ setLatitude(latitude?: number): Point; | ||
setDuration(duration?: Duration): Point; | ||
setTemperature(temperature?: Unit): Point; | ||
toObject(): Constructor; | ||
} |
@@ -45,3 +45,4 @@ function _defineProperty(obj, key, value) { | ||
cadence = _ref.cadence, | ||
altitude = _ref.altitude; | ||
altitude = _ref.altitude, | ||
temperature = _ref.temperature; | ||
@@ -66,2 +67,4 @@ _defineProperty(this, "time", void 0); | ||
_defineProperty(this, "temperature", void 0); | ||
this.time = time; | ||
@@ -76,2 +79,3 @@ this.latitude = latitude; | ||
this.altitude = altitude; | ||
this.temperature = temperature; | ||
} | ||
@@ -119,2 +123,6 @@ | ||
getTemperature() { | ||
return this.temperature; | ||
} | ||
setTime(time) { | ||
@@ -174,2 +182,8 @@ return this.clone({ | ||
setTemperature(temperature) { | ||
return this.clone({ | ||
temperature | ||
}); | ||
} | ||
toObject() { | ||
@@ -185,3 +199,4 @@ return { | ||
cadence: this.cadence, | ||
altitude: this.altitude | ||
altitude: this.altitude, | ||
temperature: this.temperature | ||
}; | ||
@@ -188,0 +203,0 @@ } |
@@ -47,3 +47,4 @@ 'use strict'; | ||
cadence = _ref.cadence, | ||
altitude = _ref.altitude; | ||
altitude = _ref.altitude, | ||
temperature = _ref.temperature; | ||
@@ -68,2 +69,4 @@ _defineProperty(this, "time", void 0); | ||
_defineProperty(this, "temperature", void 0); | ||
this.time = time; | ||
@@ -78,2 +81,3 @@ this.latitude = latitude; | ||
this.altitude = altitude; | ||
this.temperature = temperature; | ||
} | ||
@@ -121,2 +125,6 @@ | ||
getTemperature() { | ||
return this.temperature; | ||
} | ||
setTime(time) { | ||
@@ -176,2 +184,8 @@ return this.clone({ | ||
setTemperature(temperature) { | ||
return this.clone({ | ||
temperature | ||
}); | ||
} | ||
toObject() { | ||
@@ -187,3 +201,4 @@ return { | ||
cadence: this.cadence, | ||
altitude: this.altitude | ||
altitude: this.altitude, | ||
temperature: this.temperature | ||
}; | ||
@@ -190,0 +205,0 @@ } |
@@ -514,3 +514,3 @@ import { GarminBuilder, buildGPX } from 'gpx-builder'; | ||
const distance = this.getDistance(); | ||
return ['Workout', `type: ${this.getTypeName()}`, `start: ${this.getStart().toFormat('yyyy-MM-dd HH:mm')}`, distance ? `distance: ${Math.round(distance.toNumber('km') * 10) / 10}km` : null, `duration: ${Math.round(this.getDuration().as('minutes'))}min`].join('; '); | ||
return ['Workout', "type: " + this.getTypeName(), "start: " + this.getStart().toFormat('yyyy-MM-dd HH:mm'), distance ? "distance: " + Math.round(distance.toNumber('km') * 10) / 10 + "km" : null, "duration: " + Math.round(this.getDuration().as('minutes')) + "min"].join('; '); | ||
} | ||
@@ -517,0 +517,0 @@ |
@@ -516,3 +516,3 @@ 'use strict'; | ||
const distance = this.getDistance(); | ||
return ['Workout', `type: ${this.getTypeName()}`, `start: ${this.getStart().toFormat('yyyy-MM-dd HH:mm')}`, distance ? `distance: ${Math.round(distance.toNumber('km') * 10) / 10}km` : null, `duration: ${Math.round(this.getDuration().as('minutes'))}min`].join('; '); | ||
return ['Workout', "type: " + this.getTypeName(), "start: " + this.getStart().toFormat('yyyy-MM-dd HH:mm'), distance ? "distance: " + Math.round(distance.toNumber('km') * 10) / 10 + "km" : null, "duration: " + Math.round(this.getDuration().as('minutes')) + "min"].join('; '); | ||
} | ||
@@ -519,0 +519,0 @@ |
{ | ||
"name": "fitness-models", | ||
"version": "0.2.1", | ||
"description": "Extendable fitness models for Workout and GPS points", | ||
"main": "dist/index.js", | ||
"jsnext:main": "dist/index.esm.js", | ||
"module": "dist/index.esm.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"lint": "eslint --ext .ts ./src ./tests", | ||
"lint:export": "npm run lint -- -o ./tests_results/checkstyle/js-checkstyle.xml -f checkstyle", | ||
"tsc": "tsc", | ||
"build": "rollup --config ./rollup.config.js", | ||
"test": "jest", | ||
"develop": "tsc --emitDeclarationOnly false --watch", | ||
"test:build": "npm run test -- --config jest.config.build.js", | ||
"test:all": "npm run lint && npm run tsc && npm run test", | ||
"prepublishOnly": "npm run build && npm run tsc && npm run test:build", | ||
"release": "semantic-release" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/fabulator/fitness-models.git" | ||
}, | ||
"author": "Michal Ozogán <michal@ozogan.eu>", | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/fabulator/fitness-models#readme", | ||
"keywords": [ | ||
"fitness" | ||
], | ||
"devDependencies": { | ||
"@socifi/babel-config": "^0.6.0", | ||
"@socifi/browserslist-config": "^0.1.0", | ||
"@socifi/commitlint-config": "^1.0.0", | ||
"@socifi/eslint-config": "^2.5.0", | ||
"@socifi/jest-config": "^2.2.0", | ||
"@socifi/rollup-config": "^2.0.1", | ||
"@types/luxon": "^1.4.1", | ||
"@types/mathjs": "^4.4.4", | ||
"husky": "^1.3.1", | ||
"semantic-release-config-fabulator": "^1.0.3" | ||
}, | ||
"dependencies": { | ||
"gpx-builder": "^2.0.1", | ||
"luxon": "^1.10.0", | ||
"mathjs": "^5.4.1" | ||
} | ||
"name": "fitness-models", | ||
"version": "0.3.0", | ||
"description": "Extendable fitness models for Workout and GPS points", | ||
"main": "dist/index.js", | ||
"jsnext:main": "dist/index.esm.js", | ||
"module": "dist/index.esm.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"lint": "eslint --ext .ts ./src ./tests", | ||
"lint:export": "npm run lint -- -o ./tests_results/checkstyle/js-checkstyle.xml -f checkstyle", | ||
"tsc": "tsc", | ||
"build": "rollup --config ./rollup.config.js", | ||
"test": "jest", | ||
"develop": "tsc --emitDeclarationOnly false --watch", | ||
"test:build": "npm run test -- --config jest.config.build.js", | ||
"test:all": "npm run lint && npm run tsc && npm run test", | ||
"prepublishOnly": "npm run build && npm run tsc && npm run test:build", | ||
"release": "semantic-release" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/fabulator/fitness-models.git" | ||
}, | ||
"author": "Michal Ozogán <michal@ozogan.eu>", | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/fabulator/fitness-models#readme", | ||
"keywords": [ | ||
"fitness" | ||
], | ||
"devDependencies": { | ||
"@socifi/babel-config": "^0.6.1", | ||
"@socifi/browserslist-config": "^0.1.0", | ||
"@socifi/commitlint-config": "^1.0.0", | ||
"@socifi/eslint-config": "^2.7.1", | ||
"@socifi/jest-config": "^2.3.1", | ||
"@socifi/rollup-config": "^2.1.0", | ||
"husky": "^1.3.1", | ||
"semantic-release-config-fabulator": "^1.0.3" | ||
}, | ||
"dependencies": { | ||
"@types/luxon": "^1.11.1", | ||
"@types/mathjs": "^5.0.1", | ||
"gpx-builder": "^2.0.1", | ||
"luxon": "^1.11.4", | ||
"mathjs": "^5.8.0" | ||
} | ||
} |
@@ -14,2 +14,3 @@ import { DateTime, Duration } from 'luxon'; | ||
speed?: Unit, | ||
temperature?: Unit, | ||
} | ||
@@ -36,2 +37,4 @@ | ||
protected temperature?: Unit; | ||
public constructor({ | ||
@@ -47,2 +50,3 @@ time, | ||
altitude, | ||
temperature, | ||
}: Constructor) { | ||
@@ -58,2 +62,3 @@ this.time = time; | ||
this.altitude = altitude; | ||
this.temperature = temperature; | ||
} | ||
@@ -104,2 +109,6 @@ | ||
public getTemperature() { | ||
return this.temperature; | ||
} | ||
public setTime(time?: DateTime) { | ||
@@ -141,2 +150,6 @@ return this.clone({ time }); | ||
public setTemperature(temperature?: Unit) { | ||
return this.clone({ temperature }); | ||
} | ||
public toObject(): Constructor { | ||
@@ -153,4 +166,5 @@ return { | ||
altitude: this.altitude, | ||
temperature: this.temperature, | ||
}; | ||
} | ||
} |
128084
8
4030
5
+ Added@types/luxon@^1.11.1
+ Added@types/mathjs@^5.0.1
+ Added@types/luxon@1.27.1(transitive)
+ Added@types/mathjs@5.0.1(transitive)
+ Addeddecimal.js@10.5.0(transitive)
Updatedluxon@^1.11.4
Updatedmathjs@^5.8.0