From ae3add8df7d382acb9a156c493050e24244dc900 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2020 18:57:29 +0000 Subject: [PATCH 01/10] Bump @types/sinon from 7.5.1 to 7.5.2 Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 7.5.1 to 7.5.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f49f47..d11f7b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -354,9 +354,9 @@ } }, "@types/sinon": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.1.tgz", - "integrity": "sha512-EZQUP3hSZQyTQRfiLqelC9NMWd1kqLcmQE0dMiklxBkgi84T+cHOhnKpgk4NnOWpGX863yE6+IaGnOXUNFqDnQ==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", + "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==", "dev": true }, "@types/tough-cookie": { diff --git a/package.json b/package.json index dea6f9a..32370fa 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@types/node": "~13.7.4", "@types/request": "~2.48.4", "@types/request-promise-native": "~1.0.17", - "@types/sinon": "~7.5.1", + "@types/sinon": "~7.5.2", "chai": "~4.2.0", "mocha": "~7.0.1", "nock": "~12.0.1", From da1a03bc3448688a645aa6a6d3d152c0668b19bd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2020 19:45:02 +0000 Subject: [PATCH 02/10] Bump @types/node from 13.7.4 to 13.7.5 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.4 to 13.7.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d11f7b8..7137469 100644 --- a/package-lock.json +++ b/package-lock.json @@ -314,9 +314,9 @@ "dev": true }, "@types/node": { - "version": "13.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.4.tgz", - "integrity": "sha512-oVeL12C6gQS/GAExndigSaLxTrKpQPxewx9bOcwfvJiJge4rr7wNaph4J+ns5hrmIV2as5qxqN8YKthn9qh0jw==", + "version": "13.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.5.tgz", + "integrity": "sha512-PfSBCTQhAQg6QBP4UhXgrZ/wQ3pjfwBr4sA7Aul+pC9XwGgm9ezrJF7OiC/I4Kf+7VPu/5ThKngAruqxyctZfA==", "dev": true }, "@types/request": { diff --git a/package.json b/package.json index 32370fa..15d306f 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "devDependencies": { "@types/chai": "~4.2.9", "@types/mocha": "~7.0.1", - "@types/node": "~13.7.4", + "@types/node": "~13.7.5", "@types/request": "~2.48.4", "@types/request-promise-native": "~1.0.17", "@types/sinon": "~7.5.2", From aaf7741194bd3180dd4e234310002d98d9f94ca6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2020 01:00:24 +0000 Subject: [PATCH 03/10] Bump @types/node from 13.7.5 to 13.7.6 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.5 to 13.7.6. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7137469..5630a5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -314,9 +314,9 @@ "dev": true }, "@types/node": { - "version": "13.7.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.5.tgz", - "integrity": "sha512-PfSBCTQhAQg6QBP4UhXgrZ/wQ3pjfwBr4sA7Aul+pC9XwGgm9ezrJF7OiC/I4Kf+7VPu/5ThKngAruqxyctZfA==", + "version": "13.7.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.6.tgz", + "integrity": "sha512-eyK7MWD0R1HqVTp+PtwRgFeIsemzuj4gBFSQxfPHY5iMjS7474e5wq+VFgTcdpyHeNxyKSaetYAjdMLJlKoWqA==", "dev": true }, "@types/request": { diff --git a/package.json b/package.json index 15d306f..c414138 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "devDependencies": { "@types/chai": "~4.2.9", "@types/mocha": "~7.0.1", - "@types/node": "~13.7.5", + "@types/node": "~13.7.6", "@types/request": "~2.48.4", "@types/request-promise-native": "~1.0.17", "@types/sinon": "~7.5.2", From 650ff2081f799b14824053872c9ae140020096cc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2020 10:47:46 +0000 Subject: [PATCH 04/10] Bump mocha from 7.0.1 to 7.1.0 Bumps [mocha](https://github.com/mochajs/mocha) from 7.0.1 to 7.1.0. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v7.0.1...v7.1.0) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5630a5a..bb653df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1886,12 +1886,12 @@ "dev": true }, "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", "dev": true, "requires": { - "chalk": "^2.0.1" + "chalk": "^2.4.2" } }, "lowercase-keys": { @@ -1975,9 +1975,9 @@ } }, "mocha": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.0.1.tgz", - "integrity": "sha512-9eWmWTdHLXh72rGrdZjNbG3aa1/3NRPpul1z0D979QpEnFdCG0Q5tv834N+94QEN2cysfV72YocQ3fn87s70fg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.0.tgz", + "integrity": "sha512-MymHK8UkU0K15Q/zX7uflZgVoRWiTjy0fXE/QjKts6mowUvGxOdPhZ2qj3b0iZdUrNZlW9LAIMFHB4IW+2b3EQ==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -1991,7 +1991,7 @@ "growl": "1.10.5", "he": "1.2.0", "js-yaml": "3.13.1", - "log-symbols": "2.2.0", + "log-symbols": "3.0.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", "ms": "2.1.1", diff --git a/package.json b/package.json index c414138..ee4fa39 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@types/request-promise-native": "~1.0.17", "@types/sinon": "~7.5.2", "chai": "~4.2.0", - "mocha": "~7.0.1", + "mocha": "~7.1.0", "nock": "~12.0.1", "nodemon": "~2.0.2", "nyc": "~15.0.0", From 96cbb0f3ac1e1281f8b3607c01f41d5e28bb4a76 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2020 05:48:10 +0000 Subject: [PATCH 05/10] Bump typedoc from 0.16.10 to 0.16.11 Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.16.10 to 0.16.11. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.16.10...v0.16.11) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index bb653df..f1a557a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3250,9 +3250,9 @@ } }, "typedoc": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.10.tgz", - "integrity": "sha512-Eo1+K+XTiqSi4lz5cPrV4RncLv6abjCd/jfL5tTueNZGO2p8x2yDIrXkxL9C+SoLjJm2xpMs3CXYmTnilxk1cA==", + "version": "0.16.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", + "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", "dev": true, "requires": { "@types/minimatch": "3.0.3", diff --git a/package.json b/package.json index ee4fa39..c10b051 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "sinon": "~9.0.0", "ts-node": "~8.6.2", "tslint": "~6.0.0", - "typedoc": "~0.16.10", + "typedoc": "~0.16.11", "typescript": "~3.8.2" }, "peerDependencies": { From 5f5bbb527ba2ce5901d7d899c7e05aea327b07a9 Mon Sep 17 00:00:00 2001 From: DonMahallem Date: Fri, 28 Feb 2020 11:10:30 +0100 Subject: [PATCH 06/10] bump peer version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c10b051..6ddb810 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "typescript": "~3.8.2" }, "peerDependencies": { - "@donmahallem/trapeze-api-types": ">=2.0.0" + "@donmahallem/trapeze-api-types": ">=2.2.0" }, "nyc": { "include": [ @@ -105,4 +105,4 @@ "strict": true, "esModuleInterop": true } -} +} \ No newline at end of file From 133a6eebd758cc1bff3063818e64131ce2634034 Mon Sep 17 00:00:00 2001 From: DonMahallem Date: Fri, 28 Feb 2020 11:13:28 +0100 Subject: [PATCH 07/10] added IStopPointInfo typings --- src/trapeze-api-client.spec.ts | 3 ++- src/trapeze-api-client.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/trapeze-api-client.spec.ts b/src/trapeze-api-client.spec.ts index 88b0f8c..99f5e61 100644 --- a/src/trapeze-api-client.spec.ts +++ b/src/trapeze-api-client.spec.ts @@ -4,6 +4,7 @@ import { IStopLocations, + IStopPointInfo, IStopPointLocations, IVehicleLocationList, } from '@donmahallem/trapeze-api-types'; @@ -121,7 +122,7 @@ describe('trapeze-api-client.ts', (): void => { .post('/internetservice/services/stopInfo/stopPoint', 'mode=' + mode + '&stopPoint=' + testId) .reply(200, testSuccessResponse); return instance.getStopPointInfo(testId, mode) - .then((val: any): void => { + .then((val: IStopPointInfo): void => { expect(val).to.deep.equal(testSuccessResponse); expect(scope.isDone()).to.eq(true, 'scope should be done'); }); diff --git a/src/trapeze-api-client.ts b/src/trapeze-api-client.ts index 7e802ab..e4b1c02 100644 --- a/src/trapeze-api-client.ts +++ b/src/trapeze-api-client.ts @@ -7,6 +7,7 @@ import { IStopInfo, IStopLocations, IStopPassage, + IStopPointInfo, IStopPointLocations, ITripPassages, IVehicleLocationList, @@ -271,7 +272,7 @@ export class TrapezeApiClient { * @since 1.0.0 */ public getStopPointInfo(stopPointId: string, - mode: StopMode = 'departure'): reqp.RequestPromise { + mode: StopMode = 'departure'): reqp.RequestPromise { const options: req.OptionsWithUri = { form: { mode, From 60fe54786f970113df795e7e95468d9acd713ac7 Mon Sep 17 00:00:00 2001 From: DonMahallem Date: Fri, 28 Feb 2020 11:14:24 +0100 Subject: [PATCH 08/10] remove unused parameter --- src/trapeze-api-client.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/trapeze-api-client.ts b/src/trapeze-api-client.ts index e4b1c02..dee7bf2 100644 --- a/src/trapeze-api-client.ts +++ b/src/trapeze-api-client.ts @@ -254,11 +254,9 @@ export class TrapezeApiClient { * * @since 1.0.0 */ - public getStopInfo(stopId: StopId, - mode: StopMode = 'departure'): reqp.RequestPromise { + public getStopInfo(stopId: StopId): reqp.RequestPromise { const options: req.OptionsWithUri = { form: { - mode, stop: stopId, }, method: 'POST', @@ -271,11 +269,9 @@ export class TrapezeApiClient { * * @since 1.0.0 */ - public getStopPointInfo(stopPointId: string, - mode: StopMode = 'departure'): reqp.RequestPromise { + public getStopPointInfo(stopPointId: string): reqp.RequestPromise { const options: req.OptionsWithUri = { form: { - mode, stopPoint: stopPointId, }, method: 'POST', From 031714ce7c152838e366b1cae9309802a4a8f7e0 Mon Sep 17 00:00:00 2001 From: DonMahallem Date: Fri, 28 Feb 2020 11:18:27 +0100 Subject: [PATCH 09/10] fix tests for parameter removal --- src/trapeze-api-client.spec.ts | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/src/trapeze-api-client.spec.ts b/src/trapeze-api-client.spec.ts index 99f5e61..456430e 100644 --- a/src/trapeze-api-client.spec.ts +++ b/src/trapeze-api-client.spec.ts @@ -116,24 +116,12 @@ describe('trapeze-api-client.ts', (): void => { describe('api methods', (): void => { describe('getStopPointInfo', (): void => { ['id1', 'id2'].forEach((testId: string): void => { - STOP_MODES.forEach((mode: StopMode): void => { - it('should query stop point info with mode: "' + mode + '" and id "' + testId + '"', (): Promise => { - const scope: nock.Scope = nock(testDomain) - .post('/internetservice/services/stopInfo/stopPoint', 'mode=' + mode + '&stopPoint=' + testId) - .reply(200, testSuccessResponse); - return instance.getStopPointInfo(testId, mode) - .then((val: IStopPointInfo): void => { - expect(val).to.deep.equal(testSuccessResponse); - expect(scope.isDone()).to.eq(true, 'scope should be done'); - }); - }); - }); - it('should query stop point info "' + testId + '" with default parameters', (): Promise => { + it('should query stop point info with id "' + testId + '"', (): Promise => { const scope: nock.Scope = nock(testDomain) - .post('/internetservice/services/stopInfo/stopPoint', 'mode=departure&stopPoint=' + testId) + .post('/internetservice/services/stopInfo/stopPoint', 'stopPoint=' + testId) .reply(200, testSuccessResponse); return instance.getStopPointInfo(testId) - .then((val: any): void => { + .then((val: IStopPointInfo): void => { expect(val).to.deep.equal(testSuccessResponse); expect(scope.isDone()).to.eq(true, 'scope should be done'); }); @@ -142,18 +130,6 @@ describe('trapeze-api-client.ts', (): void => { }); describe('getStopInfo', (): void => { ['id1', 'id2'].forEach((testId: string): void => { - STOP_MODES.forEach((mode: StopMode): void => { - it('should query stop info with mode: "' + mode + '" and id "' + testId + '"', (): Promise => { - const scope: nock.Scope = nock(testDomain) - .post('/internetservice/services/stopInfo/stop', 'mode=' + mode + '&stop=' + testId) - .reply(200, testSuccessResponse); - return instance.getStopInfo(testId, mode) - .then((val: any): void => { - expect(val).to.deep.equal(testSuccessResponse); - expect(scope.isDone()).to.eq(true, 'scope should be done'); - }); - }); - }); it('should query stop info "' + testId + '" with default parameters', (): Promise => { const scope: nock.Scope = nock(testDomain) .post('/internetservice/services/stopInfo/stop', 'mode=departure&stop=' + testId) From a03213f464b33000498f116080062f2d7ac66a14 Mon Sep 17 00:00:00 2001 From: DonMahallem Date: Fri, 28 Feb 2020 11:18:32 +0100 Subject: [PATCH 10/10] fix tests for parameter removal --- package-lock.json | 2 +- package.json | 4 ++-- src/trapeze-api-client.spec.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f1a557a..812ad95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@donmahallem/trapeze-api-client", - "version": "4.0.0", + "version": "4.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6ddb810..bd41940 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@donmahallem/trapeze-api-client", - "version": "4.0.0", + "version": "4.1.0", "description": "Node Client to consume the Trapeze Api", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -105,4 +105,4 @@ "strict": true, "esModuleInterop": true } -} \ No newline at end of file +} diff --git a/src/trapeze-api-client.spec.ts b/src/trapeze-api-client.spec.ts index 456430e..40febae 100644 --- a/src/trapeze-api-client.spec.ts +++ b/src/trapeze-api-client.spec.ts @@ -132,7 +132,7 @@ describe('trapeze-api-client.ts', (): void => { ['id1', 'id2'].forEach((testId: string): void => { it('should query stop info "' + testId + '" with default parameters', (): Promise => { const scope: nock.Scope = nock(testDomain) - .post('/internetservice/services/stopInfo/stop', 'mode=departure&stop=' + testId) + .post('/internetservice/services/stopInfo/stop', 'stop=' + testId) .reply(200, testSuccessResponse); return instance.getStopInfo(testId) .then((val: any): void => {