From 97c65a60eb8fa2e98a46445af78a7a319c526d61 Mon Sep 17 00:00:00 2001 From: Willem Liu Date: Fri, 8 Dec 2017 08:06:04 +0100 Subject: [PATCH] Updated dependencies --- .travis.yml | 28 ++++----- dist/PlayerControls.js | 16 ++---- package-lock.json | 106 ++++++++++++++++++++++++----------- package.json | 19 ++++--- test/PlayerControls.test.tsx | 7 +-- 5 files changed, 106 insertions(+), 70 deletions(-) diff --git a/.travis.yml b/.travis.yml index c20176d..3670d1e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,23 @@ language: node_js - node_js: - - "node" - +- node addons: apt: packages: - - nodejs-legacy - + - nodejs-legacy install: - - npm install -g gulp - - npm install -g typescript - - npm install - +- npm install -g gulp +- npm install -g typescript +- npm install script: - - npm run test - - npm run lint - +- npm run test +- npm run lint after_success: - - "cat ./dist/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" \ No newline at end of file +- cat ./dist/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js +deploy: + provider: npm + email: willem_liu@hotmail.com + on: + branch: master + api_key: + secure: UoaHrzZ5TjphJH+uymWfLitGKceqK3Dq5PcIVSMfW6za9ulOGy//nXtLYFDEexOxKZIc4MZpKl+CT52yK0HLN4WdrPIJFKkS6MYg5MaAf7BpzY0BahzkoFEx8bFr4tDuapFj/aqKj+30ZoYcJ8d2TmmjVxKbwlfnYuWcM2nAkvrO4Ld8YYx3jd1TnFKdeC/zfzTsO8MLqvo9EVxa1tWoQUXGcyvpupuisi3ineulONuOTEBXyVstQI4yYBOYaG4/2q7DnmAnW+kxigvSKllWsiSqJSZT7uHPa0xSkdtKWufHovHwKw28s2DyIlesLyvSla+XTEJouQ52B/1Os8cJ3uDO4JAnwoJuPFdjPH0NIS+EE64BEYUSU4dZ6dtMnOb93xCvvkldCnS47pGBR8CsTB2MAM4L9s9DRgo/fqHHKTKsiiKhYZ7+lYklG6rifODZFXtTWCFtPhgwdxHx/0nvlQDh4xux9GZMvXbzfeYy8YCofIVKF+Tdcqg7ZZUiRtH5ESyiJudzufbIxNZs7kmgLsbKw6lM4+o2hTBVPCZXr4RjGzbvRQPH1y4g3lHPoCnKoE+nDq3I/0huwo7LNP3GflT9swBuapgj7gzj1OiR29by0OAGkCt17d2rS3NYb5kGykVzMx6jc99tpgjcaGuOy8uiOLQ7dhFyptJeKGMoSD0= diff --git a/dist/PlayerControls.js b/dist/PlayerControls.js index 1ae1ffa..31c7af9 100644 --- a/dist/PlayerControls.js +++ b/dist/PlayerControls.js @@ -21,20 +21,16 @@ var PlayerControls = /** @class */ (function (_super) { function PlayerControls(props) { var _this = _super.call(this, props) || this; _this.props = props; - console.info('Player controls composition', _this.state, _this.props); return _this; } PlayerControls.prototype.render = function () { + var previousButton = this.props.showPreviousButton ? (React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.previousButtonImage, onClick: this.props.onPrevious, className: "previous-button", alt: "previous button" })) : null; + var playPauseButton = this.props.showPlayPauseButton ? (React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.playPauseButtonImage, onClick: this.props.onPlayPause, className: "playpause-button", alt: "play/pause button" })) : null; + var nextButton = this.props.showNextButton ? (React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.nextButtonImage, onClick: this.props.onNext, className: "next-button", alt: "next button" })) : null; return (React.createElement("div", { className: this.props.className }, - this.props.showPreviousButton ? - React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.previousButtonImage, onClick: this.props.onPrevious, className: "previous-button", alt: "previous button" }) - : null, - this.props.showPlayPauseButton ? - React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.playPauseButtonImage, onClick: this.props.onPlayPause, className: "playpause-button", alt: "play/pause button" }) - : null, - this.props.showNextButton ? - React.createElement(fdmg_ts_react_image_button_1.default, { src: this.props.nextButtonImage, onClick: this.props.onNext, className: "next-button", alt: "next button" }) - : null)); + previousButton, + playPauseButton, + nextButton)); }; return PlayerControls; }(React.Component)); diff --git a/package-lock.json b/package-lock.json index 14f558f..e217fea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "fdmg-ts-react-player-controls", - "version": "1.0.7", + "version": "1.0.8", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -17,9 +17,9 @@ "dev": true }, "@types/react": { - "version": "16.0.25", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.0.25.tgz", - "integrity": "sha512-K79zMwWRzQ2db+nPoKpi3gA/KmLo6ZQgT4iO2QPEUdBO7as0PcgrmU9KHYzIO3V6lbD7gRjOM0/nUch6xBfOvQ==", + "version": "16.0.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.0.28.tgz", + "integrity": "sha512-9YQ0JjVVoEfMCfapSpsSZY8RjgUygSac7Lb8S27OVPxAMSTdUZp3likCFmVhSHbSQfoLp83EiJD2y+voAf2HvQ==", "dev": true }, "abab": { @@ -1026,7 +1026,7 @@ "object.assign": "4.0.4", "object.values": "1.0.4", "prop-types": "15.6.0", - "react-test-renderer": "16.1.1" + "react-test-renderer": "16.2.0" } }, "enzyme-adapter-utils": { @@ -1255,17 +1255,19 @@ "ua-parser-js": "0.7.17" } }, - "fdmg-ts-react-image": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fdmg-ts-react-image/-/fdmg-ts-react-image-1.0.2.tgz", - "integrity": "sha1-gPH5fssP6Zv4ZzxrsyiMqSI5MwU=" - }, "fdmg-ts-react-image-button": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/fdmg-ts-react-image-button/-/fdmg-ts-react-image-button-1.0.21.tgz", - "integrity": "sha1-Povli1Yo+w7oVb++/apM4+r5u00=", + "version": "1.0.23", + "resolved": "https://registry.npmjs.org/fdmg-ts-react-image-button/-/fdmg-ts-react-image-button-1.0.23.tgz", + "integrity": "sha512-I3yDIe6cfZtWFdN1Kc3kaMUEZD9BKV86RsOFsIHKQlcFJSJB8pAHg1SaQwkfqaBx4Jd/bxVILUrnLZfAsOeBhg==", "requires": { - "fdmg-ts-react-image": "1.0.2" + "fdmg-ts-react-image": "1.0.4" + }, + "dependencies": { + "fdmg-ts-react-image": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fdmg-ts-react-image/-/fdmg-ts-react-image-1.0.4.tgz", + "integrity": "sha512-CflWNyTA+808fztFyArRp1b6brblDFHN2zhix1zGdeVeyWkEa/wL9vEh6X2Nsoqs8TpufULo9z2im/jUGFvg+Q==" + } } }, "filename-regex": { @@ -1351,9 +1353,9 @@ } }, "fs-extra": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz", - "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "dev": true, "requires": { "graceful-fs": "4.1.11", @@ -2015,6 +2017,43 @@ "throat": "4.1.0" } }, + "jest-cli": { + "version": "21.2.1", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-21.2.1.tgz", + "integrity": "sha512-T1BzrbFxDIW/LLYQqVfo94y/hhaj1NzVQkZgBumAC+sxbjMROI7VkihOdxNR758iYbQykL2ZOWUBurFgkQrzdg==", + "dev": true, + "requires": { + "ansi-escapes": "3.0.0", + "chalk": "2.3.0", + "glob": "7.1.2", + "graceful-fs": "4.1.11", + "is-ci": "1.0.10", + "istanbul-api": "1.2.1", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-instrument": "1.9.1", + "istanbul-lib-source-maps": "1.2.2", + "jest-changed-files": "21.2.0", + "jest-config": "21.2.1", + "jest-environment-jsdom": "21.2.1", + "jest-haste-map": "21.2.0", + "jest-message-util": "21.2.1", + "jest-regex-util": "21.2.0", + "jest-resolve-dependencies": "21.2.0", + "jest-runner": "21.2.1", + "jest-runtime": "21.2.1", + "jest-snapshot": "21.2.1", + "jest-util": "21.2.1", + "micromatch": "2.3.11", + "node-notifier": "5.1.2", + "pify": "3.0.0", + "slash": "1.0.0", + "string-length": "2.0.0", + "strip-ansi": "4.0.0", + "which": "1.3.0", + "worker-farm": "1.5.2", + "yargs": "9.0.1" + } + }, "jest-config": { "version": "21.2.1", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-21.2.1.tgz", @@ -3140,9 +3179,9 @@ } }, "react": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/react/-/react-16.1.1.tgz", - "integrity": "sha512-FQfiFfk2z2Fk87OngNJHT05KyC9DOVn8LPeB7ZX+9u5+yU1JK6o5ozRlU3PeOMr0IFkWNvgn9jU8/IhRxR1F0g==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.2.0.tgz", + "integrity": "sha512-ZmIomM7EE1DvPEnSFAHZn9Vs9zJl5A9H7el0EGTE6ZbW9FKe/14IYAlPbC8iH25YarEQxZL+E8VW7Mi7kfQrDQ==", "dev": true, "requires": { "fbjs": "0.8.16", @@ -3152,9 +3191,9 @@ } }, "react-dom": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.1.1.tgz", - "integrity": "sha512-q06jiwST8SEPAMIEkAsu7BgynEZtqF87VrTc70XsW7nxVhWEu2Y4MF5UfxxHQO/mNtQHQWP0YcFxmwm9oMrMaQ==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz", + "integrity": "sha512-zpGAdwHVn9K0091d+hr+R0qrjoJ84cIBFL2uU60KvWBPfZ7LPSrfqviTxGHWN0sjPZb2hxWzMexwrvJdKePvjg==", "dev": true, "requires": { "fbjs": "0.8.16", @@ -3164,9 +3203,9 @@ } }, "react-test-renderer": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.1.1.tgz", - "integrity": "sha512-RV0Krfuc6wDnlv5C/BJzW3e2/s7ZTMZ25gfVjdXdT3hhXNDCQlZucP83HMD8mVh1XScGx9hRaXnIRJ7mE+2N6A==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.2.0.tgz", + "integrity": "sha512-Kd4gJFtpNziR9ElOE/C23LeflKLZPRpNQYWP3nQBY43SJ5a+xyEGSeMrm2zxNKXcnCbBS/q1UpD9gqd5Dv+rew==", "dev": true, "requires": { "fbjs": "0.8.16", @@ -3683,9 +3722,9 @@ "dev": true }, "ts-jest": { - "version": "21.2.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-21.2.3.tgz", - "integrity": "sha512-/gpl/RUPJMVZmERi360sKu5wzSriAg20HMRZsNgXY7sUWtmSn3iPxQcCBDUi2bmcRPtPOLTSijzWK3ZrlYkUhA==", + "version": "21.2.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-21.2.4.tgz", + "integrity": "sha512-Plk49Us+DcncpQcC8fhYwDUdhW96QB0Dv02etOLhzq+2HAvXfrEUys3teZ/BeyQ+r1rHxfGdNj4dB0Q5msZR3g==", "dev": true, "requires": { "babel-core": "6.26.0", @@ -3693,9 +3732,8 @@ "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", "babel-preset-jest": "21.2.0", "cpx": "1.5.0", - "fs-extra": "4.0.2", + "fs-extra": "4.0.3", "jest-config": "21.2.1", - "jest-util": "21.2.1", "pkg-dir": "2.0.0", "source-map-support": "0.5.0", "yargs": "10.0.3" @@ -3866,9 +3904,9 @@ } }, "typescript": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", - "integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.2.tgz", + "integrity": "sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=", "dev": true }, "ua-parser-js": { diff --git a/package.json b/package.json index 197b4a3..7b1c2d1 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "fdmg-ts-react-player-controls", - "version": "1.0.7", + "version": "1.0.8", "description": "ReactJS PlayerControls component", "main": "dist/PlayerControls.js", "types": "dist/PlayerControls.d.ts", "scripts": { - "release": "npm install && yarn && tsc -d", + "release": "npm update && npm install && yarn && npm run test && npm run lint && tsc -d", "test": "jest", "lint": "tslint -p .", "updateSnapshot": "jest --updateSnapshot", @@ -19,20 +19,21 @@ "license": "ISC", "devDependencies": { "@types/jest": "^21.1.8", - "@types/react": "^16.0.23", + "@types/react": "^16.0.28", "coveralls": "^3.0.0", "enzyme": "^3.2.0", "enzyme-adapter-react-16": "^1.1.0", "enzyme-to-json": "^3.2.2", "jest": "^21.2.1", + "jest-cli": "^21.2.1", "raf": "^3.4.0", - "react": "^16.1.1", - "react-dom": "^16.1.1", - "react-test-renderer": "^16.1.1", - "ts-jest": "^21.2.1", + "react": "^16.2.0", + "react-dom": "^16.2.0", + "react-test-renderer": "^16.2.0", + "ts-jest": "^21.2.4", "tslint": "^5.8.0", "tslint-react": "^3.2.0", - "typescript": "^2.5.3" + "typescript": "^2.6.2" }, "jest": { "transform": { @@ -60,6 +61,6 @@ "mapCoverage": true }, "dependencies": { - "fdmg-ts-react-image-button": "^1.0.21" + "fdmg-ts-react-image-button": "^1.0.23" } } diff --git a/test/PlayerControls.test.tsx b/test/PlayerControls.test.tsx index 4139c36..2491e77 100644 --- a/test/PlayerControls.test.tsx +++ b/test/PlayerControls.test.tsx @@ -15,7 +15,7 @@ describe('PlayerControls', () => { Enzyme.configure({ adapter: new Adapter() }); }); - test('PlayerControls renders correctly', () => { + test('renders correctly', () => { const component = shallow( { expect(toJson(component)).toMatchSnapshot(); }); - test('PlayerControls buttons clicked', () => { + test('buttons clicked', () => { const spyPrev = jest.fn(); const spyPlay = jest.fn(); const spyNext = jest.fn(); @@ -55,7 +55,7 @@ describe('PlayerControls', () => { expect(spyPrev).toHaveBeenCalled(); }); - test('PlayerControls renders previous, next or play/pause button correctly', () => { + test('renders previous, next or play/pause button correctly', () => { let component = mount( { /> ); expect(toJson(component)).toMatchSnapshot(); - }); });