Skip to content

Commit 80fe8f9

Browse files
Merge pull request #1260 from Adyen/automation/release
Release v14.3.0
2 parents 4f32b86 + 9241a2d commit 80fe8f9

28 files changed

+817
-151
lines changed

.github/scripts/release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ exports.detectChanges = (changeset) => {
113113
break;
114114
case 'breaking-change':
115115
increment = 'major';
116-
break;
116+
return increment;
117117
}
118118
}
119119
}

.github/scripts/release.test.js

Lines changed: 209 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,195 @@ const comparisonFixture = {
112112
}
113113
};
114114

115+
const associatedPullRequestsMajor = {
116+
"repository": {
117+
"name": "adyen-node-api-library",
118+
"ref": {
119+
"compare": {
120+
"aheadBy": 8,
121+
"commits": {
122+
"edges": [
123+
{
124+
"node": {
125+
"message": "Another commit in the same PR non squashed",
126+
"associatedPullRequests": {
127+
"edges": [
128+
{
129+
"node": {
130+
"number": 20,
131+
"labels": {
132+
"nodes": [
133+
{
134+
"name": "Breaking change"
135+
}
136+
]
137+
}
138+
}
139+
}
140+
]
141+
}
142+
}
143+
},
144+
{
145+
"node": {
146+
"message": "Fixing the constructor",
147+
"associatedPullRequests": {
148+
"edges": [
149+
{
150+
"node": {
151+
"number": 10,
152+
"labels": {
153+
"nodes": [
154+
{
155+
"name": "Fix"
156+
}
157+
]
158+
}
159+
}
160+
}
161+
]
162+
}
163+
}
164+
},
165+
{
166+
"node": {
167+
"message": "Upgrade some service",
168+
"associatedPullRequests": {
169+
"edges": [
170+
{
171+
"node": {
172+
"number": 20,
173+
"labels": {
174+
"nodes": [
175+
{
176+
"name": "Feature"
177+
}
178+
]
179+
}
180+
}
181+
}
182+
]
183+
}
184+
}
185+
},
186+
{
187+
"node": {
188+
"message": "Update CODEOWNERS (#965)",
189+
"associatedPullRequests": {
190+
"edges": [
191+
{
192+
"node": {
193+
"number": 30,
194+
"labels": {
195+
"nodes": []
196+
}
197+
}
198+
}
199+
]
200+
}
201+
}
202+
}
203+
]
204+
}
205+
}
206+
}
207+
}
208+
};
209+
210+
const associatedPullRequestsMinor = {
211+
"repository": {
212+
"name": "adyen-node-api-library",
213+
"ref": {
214+
"compare": {
215+
"aheadBy": 8,
216+
"commits": {
217+
"edges": [
218+
{
219+
"node": {
220+
"message": "Another commit in the same PR non squashed",
221+
"associatedPullRequests": {
222+
"edges": [
223+
{
224+
"node": {
225+
"number": 20,
226+
"labels": {
227+
"nodes": [
228+
{
229+
"name": ""
230+
}
231+
]
232+
}
233+
}
234+
}
235+
]
236+
}
237+
}
238+
},
239+
{
240+
"node": {
241+
"message": "Fixing the constructor",
242+
"associatedPullRequests": {
243+
"edges": [
244+
{
245+
"node": {
246+
"number": 10,
247+
"labels": {
248+
"nodes": [
249+
{
250+
"name": "Feature"
251+
}
252+
]
253+
}
254+
}
255+
}
256+
]
257+
}
258+
}
259+
},
260+
{
261+
"node": {
262+
"message": "Upgrade some service",
263+
"associatedPullRequests": {
264+
"edges": [
265+
{
266+
"node": {
267+
"number": 20,
268+
"labels": {
269+
"nodes": [
270+
{
271+
"name": "Fix"
272+
}
273+
]
274+
}
275+
}
276+
}
277+
]
278+
}
279+
}
280+
},
281+
{
282+
"node": {
283+
"message": "Update CODEOWNERS (#965)",
284+
"associatedPullRequests": {
285+
"edges": [
286+
{
287+
"node": {
288+
"number": 30,
289+
"labels": {
290+
"nodes": []
291+
}
292+
}
293+
}
294+
]
295+
}
296+
}
297+
}
298+
]
299+
}
300+
}
301+
}
302+
}
303+
};
115304
beforeEach(() => {
116305
// Reset env variables
117306
delete process.env.CURRENT_VERSION;
@@ -134,7 +323,7 @@ test('Detect changes', async t => {
134323

135324
assert.strictEqual(ver, 'major');
136325
});
137-
326+
138327
await t.test('Zero changes', t => {
139328
let sync = structuredClone(comparisonFixture);
140329
sync.repository.ref.compare.aheadBy = 0;
@@ -158,6 +347,7 @@ test('Detect changes', async t => {
158347
});
159348
});
160349

350+
161351
test('Get next version', async t => {
162352
await t.test('Major', async t => {
163353
const ver = release.nextVersion('13.1.2', 'major');
@@ -229,4 +419,21 @@ test('Bump', async t => {
229419
await release.bump(options);
230420

231421
assert.strictEqual(core.setOutput.mock.calls.length, 3);
232-
});
422+
});
423+
424+
425+
test('Calculate version major', async t => {
426+
await t.test('Major', t => {
427+
const ver = release.detectChanges(associatedPullRequestsMajor);
428+
429+
assert.strictEqual(ver, 'major');
430+
})
431+
});
432+
433+
test('Calculate version minor', async t => {
434+
await t.test('Minor', t => {
435+
const ver = release.detectChanges(associatedPullRequestsMinor);
436+
437+
assert.strictEqual(ver, 'minor');
438+
});
439+
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adyen/api-library",
3-
"version": "14.2.0",
3+
"version": "14.3.0",
44
"description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ class Client {
5454
} else {
5555
this.config = new Config();
5656
}
57-
this.liveEndpointUrlPrefix = options.liveEndpointUrlPrefix || '';
57+
this.liveEndpointUrlPrefix = options.liveEndpointUrlPrefix ?? '';
5858

59-
const environment = options.environment || this.config.environment;
59+
const environment = options.environment ?? this.config.environment;
6060
if (environment) {
6161
this.setEnvironment(environment, options.liveEndpointUrlPrefix);
6262
if (options.username && options.password) {
@@ -80,7 +80,7 @@ class Client {
8080
public setEnvironment(environment: Environment, liveEndpointUrlPrefix?: string): void {
8181
// ensure environment and liveUrlPrefix is set in config
8282
this.config.environment = environment;
83-
this.liveEndpointUrlPrefix = liveEndpointUrlPrefix || "";
83+
this.liveEndpointUrlPrefix = liveEndpointUrlPrefix ?? "";
8484

8585
if (environment === "TEST") {
8686
this.config.marketPayEndpoint = Client.MARKETPAY_ENDPOINT_TEST;

src/services/transfers/transactionsApi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ export class TransactionsApi extends Service {
3030
* @summary Get all transactions
3131
* @param createdSince {@link Date } Only include transactions that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**.
3232
* @param createdUntil {@link Date } Only include transactions that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**.
33-
* @param balancePlatform {@link string } Unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id).
34-
* @param paymentInstrumentId {@link string } Unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_).
35-
* @param accountHolderId {@link string } Unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id).
36-
* @param balanceAccountId {@link string } Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id).
33+
* @param balancePlatform {@link string } The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don\'t provide a `balanceAccountId` or `accountHolderId`.
34+
* @param paymentInstrumentId {@link string } The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide.
35+
* @param accountHolderId {@link string } The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don\'t provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`.
36+
* @param balanceAccountId {@link string } The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don\'t provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`.
3737
* @param cursor {@link string } The `cursor` returned in the links of the previous response.
3838
* @param limit {@link number } The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page.
3939
* @param requestOptions {@link IRequest.Options}

src/services/transfers/transfersApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export class TransfersApi extends Service {
2828

2929
/**
3030
* @summary Transfer funds
31+
* @param wWWAuthenticate {@link string } Header for authenticating through SCA
3132
* @param transferInfo {@link TransferInfo }
3233
* @param requestOptions {@link IRequest.Options}
3334
* @return {@link Transfer }

src/typings/checkout/afterpayDetails.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export namespace AfterpayDetails {
8686
export enum TypeEnum {
8787
AfterpayDefault = 'afterpay_default',
8888
Afterpaytouch = 'afterpaytouch',
89-
AfterpayB2b = 'afterpay_b2b'
89+
AfterpayB2b = 'afterpay_b2b',
90+
Clearpay = 'clearpay'
9091
}
9192
}

src/typings/checkout/balanceCheckRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class BalanceCheckRequest {
5555
'fraudOffset'?: number;
5656
'installments'?: Installments;
5757
/**
58-
* This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.
58+
* The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.
5959
*/
6060
'localizedShopperStatement'?: { [key: string]: string; };
6161
/**

src/typings/checkout/donationPaymentRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export class DonationPaymentRequest {
163163
*/
164164
'lineItems'?: Array<LineItem>;
165165
/**
166-
* This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned.
166+
* The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.
167167
*/
168168
'localizedShopperStatement'?: { [key: string]: string; };
169169
'mandate'?: Mandate;

src/typings/checkout/paymentDetails.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ export namespace PaymentDetails {
9595
Knet = 'knet',
9696
Omannet = 'omannet',
9797
GopayWallet = 'gopay_wallet',
98-
Poli = 'poli',
9998
KcpNaverpay = 'kcp_naverpay',
10099
OnlinebankingIn = 'onlinebanking_IN',
101100
Fawry = 'fawry',

0 commit comments

Comments
 (0)