Skip to content

Commit 0a165fe

Browse files
authored
Merge branch 'master' into gen-sdk-updates
2 parents e7c1f3e + 289d390 commit 0a165fe

20 files changed

Lines changed: 507 additions & 51 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
permissions:
99
actions: write
1010
contents: write
11+
id-token: write # Required for npm trusted publishing (OIDC)
1112

1213
jobs:
1314
release:
@@ -41,27 +42,47 @@ jobs:
4142
- name: Setup
4243
uses: ./.github/actions/ci
4344

44-
- name: Creating .npmrc
45-
run: |
46-
cat << EOF > "$HOME/.npmrc"
47-
email=npmjs@commercetools.com
48-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
49-
EOF
50-
env:
51-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
# Ensure npm 11.5.1 or later is installed for OIDC support
46+
- name: Update npm
47+
run: npm install -g npm@latest
48+
49+
- name: Verify npm version
50+
run: npm --version
51+
52+
# Configure npm for OIDC authentication with trusted publishing
53+
# This must be done after CI setup to ensure npm is properly configured
54+
55+
# setup-node@v4 with registry-url automatically configures OIDC when id-token: write is set
56+
- name: Setup Node.js for npm publishing
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: '24'
60+
registry-url: 'https://registry.npmjs.org'
5261

5362
- name: Building packages
5463
run: yarn build
5564

65+
- name: Verify npm OIDC configuration
66+
run: |
67+
# Verify registry is set correctly
68+
echo "Registry: $(npm config get registry)"
69+
# Ensure no token-based auth is configured (OIDC should be used automatically)
70+
npm config delete //registry.npmjs.org/:_authToken || true
71+
# Verify npm can access the registry (this will use OIDC if configured)
72+
echo "npm OIDC authentication configured via setup-node action"
73+
5674
- name: Create Release Pull Request or Publish to npm
5775
id: changesets
58-
uses: changesets/action@master
76+
uses: changesets/action@v1
5977
with:
6078
publish: yarn changeset publish
6179
version: yarn changeset:version-and-format
6280
commit: 'ci(changesets): version packages'
6381
env:
6482
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
83+
# Ensure npm uses OIDC authentication
84+
NPM_CONFIG_REGISTRY: 'https://registry.npmjs.org'
85+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6586

6687
- name: Dispatch repository event
6788
if: steps.changesets.outputs.published == 'true'

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.19.0
1+
24.11.0

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
"docs": "rm -rf docs;typedoc"
2020
},
2121
"workspaces": ["packages/*"],
22+
"repository": {
23+
"type": "git",
24+
"url": "https://github.com/commercetools/commercetools-sdk-typescript.git"
25+
},
2226
"lint-staged": {
2327
"*.{js,json,md}": ["prettier --write"],
2428
"*.ts": ["prettier --write", "tsc-files --noEmit"]

packages/checkout-sdk/CHANGELOG.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,85 @@
11
# @commercetools/checkout-sdk
22

3+
## 1.4.0
4+
5+
### Minor Changes
6+
7+
- [#1205](https://github.com/commercetools/commercetools-sdk-typescript/pull/1205) [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04) Thanks [@ajimae](https://github.com/ajimae)! - release packages
8+
9+
### Patch Changes
10+
11+
- [#1205](https://github.com/commercetools/commercetools-sdk-typescript/pull/1205) [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04) Thanks [@ajimae](https://github.com/ajimae)! - release packages
12+
13+
- [#1205](https://github.com/commercetools/commercetools-sdk-typescript/pull/1205) [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04) Thanks [@ajimae](https://github.com/ajimae)! - release changeset
14+
15+
- Updated dependencies [[`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04), [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04), [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04)]:
16+
- @commercetools/ts-client@4.7.0
17+
18+
## 1.3.0
19+
20+
### Minor Changes
21+
22+
- [#1203](https://github.com/commercetools/commercetools-sdk-typescript/pull/1203) [`e0b0fcc`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e0b0fccaed4812c0ac47b0c8c4724e81174b0255) Thanks [@ajimae](https://github.com/ajimae)! - release packages
23+
24+
### Patch Changes
25+
26+
- [#1203](https://github.com/commercetools/commercetools-sdk-typescript/pull/1203) [`e0b0fcc`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e0b0fccaed4812c0ac47b0c8c4724e81174b0255) Thanks [@ajimae](https://github.com/ajimae)! - release changeset
27+
28+
- Updated dependencies [[`e0b0fcc`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e0b0fccaed4812c0ac47b0c8c4724e81174b0255), [`e0b0fcc`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e0b0fccaed4812c0ac47b0c8c4724e81174b0255)]:
29+
- @commercetools/ts-client@4.6.0
30+
31+
## 1.2.0
32+
33+
### Minor Changes
34+
35+
- [#1201](https://github.com/commercetools/commercetools-sdk-typescript/pull/1201) [`f7c3101`](https://github.com/commercetools/commercetools-sdk-typescript/commit/f7c31015ae0e18111c31fcdb3baee8e964bad99b) Thanks [@ajimae](https://github.com/ajimae)! - release packages
36+
37+
### Patch Changes
38+
39+
- Updated dependencies [[`f7c3101`](https://github.com/commercetools/commercetools-sdk-typescript/commit/f7c31015ae0e18111c31fcdb3baee8e964bad99b)]:
40+
- @commercetools/ts-client@4.5.0
41+
42+
## 1.1.0
43+
44+
### Minor Changes
45+
46+
- [#1191](https://github.com/commercetools/commercetools-sdk-typescript/pull/1191) [`2898e78`](https://github.com/commercetools/commercetools-sdk-typescript/commit/2898e7831c731b611628e6516d99e19fa32d402e) Thanks [@ShipilA](https://github.com/ShipilA)! - **Api changes**
47+
48+
<details>
49+
<summary>Required Property(s)</summary>
50+
- changed property `variantSelection` of type `ProductSelectionProductAddedMessage` to be optional
51+
- changed property `variantExclusion` of type `ProductSelectionProductExcludedMessage` to be optional
52+
- changed property `oldVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessage` to be optional
53+
- changed property `newVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessage` to be optional
54+
- changed property `oldVariantSelection` of type `ProductSelectionVariantSelectionChangedMessage` to be optional
55+
- changed property `newVariantSelection` of type `ProductSelectionVariantSelectionChangedMessage` to be optional
56+
- changed property `variantSelection` of type `ProductSelectionProductAddedMessagePayload` to be optional
57+
- changed property `variantExclusion` of type `ProductSelectionProductExcludedMessagePayload` to be optional
58+
- changed property `oldVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessagePayload` to be optional
59+
- changed property `newVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessagePayload` to be optional
60+
- changed property `oldVariantSelection` of type `ProductSelectionVariantSelectionChangedMessagePayload` to be optional
61+
- changed property `newVariantSelection` of type `ProductSelectionVariantSelectionChangedMessagePayload` to be optional
62+
</details>
63+
64+
<details>
65+
<summary>Added Property(s)</summary>
66+
- added property `interfaceId` to type `MyTransactionDraft`
67+
- added property `interfaceId` to type `Transaction`
68+
- added property `interfaceId` to type `TransactionDraft`
69+
</details>
70+
71+
<details>
72+
<summary>Added Type(s)</summary>
73+
- added type `PaymentTransactionInterfaceIdSetMessage`
74+
- added type `PaymentTransactionInterfaceIdSetMessagePayload`
75+
- added type `PaymentSetTransactionInterfaceIdAction`
76+
</details>
77+
78+
### Patch Changes
79+
80+
- Updated dependencies [[`e2fb7fd`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e2fb7fd778f849f2a1da7f5abf0643c699bb8968), [`2898e78`](https://github.com/commercetools/commercetools-sdk-typescript/commit/2898e7831c731b611628e6516d99e19fa32d402e)]:
81+
- @commercetools/ts-client@4.4.0
82+
383
## 1.0.0
484

585
### Major Changes

packages/checkout-sdk/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"access": "public"
55
},
66
"name": "@commercetools/checkout-sdk",
7-
"version": "1.0.0",
7+
"version": "1.4.0",
88
"engines": {
99
"node": ">=18"
1010
},
@@ -16,11 +16,11 @@
1616
"sdk",
1717
"checkout"
1818
],
19-
"homepage": "https://github.com/commercetools/commercetools-typescript-sdks/packages/checkout-sdk",
20-
"bugs": "https://github.com/commercetools/commercetools-typescript-sdks/issues",
19+
"homepage": "https://github.com/commercetools/commercetools-sdk-typescript/packages/checkout-sdk",
20+
"bugs": "https://github.com/commercetools/commercetools-sdk-typescript/issues",
2121
"repository": {
2222
"type": "git",
23-
"url": "https://github.com/commercetools/commercetools-typescript-sdks.git"
23+
"url": "https://github.com/commercetools/commercetools-sdk-typescript"
2424
},
2525
"files": ["dist", "CHANGELOG.md"],
2626
"author": "Ajima Chukwuemeka",
@@ -32,7 +32,7 @@
3232
"./dist/commercetools-checkout-sdk.esm.js": "./dist/commercetools-checkout-sdk.browser.esm.js"
3333
},
3434
"dependencies": {
35-
"@commercetools/ts-client": "^4.2.1"
35+
"@commercetools/ts-client": "^4.7.0"
3636
},
3737
"devDependencies": {
3838
"organize-imports-cli": "0.10.0",

packages/checkout-sdk/test/helpers/api-helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const ctpClient = new ClientBuilder()
2828
.withHttpMiddleware(httpMiddleware)
2929
.build()
3030

31+
export type { Transaction } from '../../src'
3132
export const ctpApiBuilder = createApiBuilderFromCtpClient(
3233
ctpClient,
3334
'https://checkout.europe-west1.gcp.commercetools.com'

packages/checkout-sdk/test/integration-tests/transaction.test.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { ctpApiBuilder as ctpApiRoot } from '../helpers/ctp-api-helper'
2-
import { ctpApiBuilder } from '../helpers/api-helpers'
2+
import { ctpApiBuilder, Transaction } from '../helpers/api-helpers'
33

44
describe('::transaction', () => {
5-
let cart: any
5+
let cart: any, transactions: Transaction
66

77
afterAll(async () => {
88
const updatedCart = await ctpApiRoot
@@ -31,7 +31,7 @@ describe('::transaction', () => {
3131
})
3232

3333
it('should create a transaction using created cart', async () => {
34-
const transactions = await ctpApiBuilder
34+
const _transactions = await ctpApiBuilder
3535
.transactions()
3636
.post({
3737
body: {
@@ -59,7 +59,19 @@ describe('::transaction', () => {
5959
})
6060
.execute()
6161

62-
expect(transactions).toBeDefined()
63-
expect(transactions.statusCode).toEqual(201)
62+
expect(_transactions).toBeDefined()
63+
expect(_transactions.statusCode).toEqual(201)
64+
transactions = _transactions.body
65+
})
66+
67+
it('should retrieve a transaction using ID', async () => {
68+
const _transaction = await ctpApiBuilder
69+
.transactions()
70+
.withId({ id: transactions.id })
71+
.get()
72+
.execute()
73+
74+
expect(_transaction).toBeDefined()
75+
expect(_transaction.statusCode).toEqual(200)
6476
})
6577
})

packages/history-sdk/CHANGELOG.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,87 @@
11
# @commercetools/history-sdk
22

3+
## 5.10.0
4+
5+
### Minor Changes
6+
7+
- [#1205](https://github.com/commercetools/commercetools-sdk-typescript/pull/1205) [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04) Thanks [@ajimae](https://github.com/ajimae)! - release packages
8+
9+
### Patch Changes
10+
11+
- [#1205](https://github.com/commercetools/commercetools-sdk-typescript/pull/1205) [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04) Thanks [@ajimae](https://github.com/ajimae)! - release packages
12+
13+
- [#1205](https://github.com/commercetools/commercetools-sdk-typescript/pull/1205) [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04) Thanks [@ajimae](https://github.com/ajimae)! - release changeset
14+
15+
- Updated dependencies [[`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04), [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04), [`1ceb53b`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1ceb53bf00457494ad061d7fe77a8d1b5a010d04)]:
16+
- @commercetools/ts-client@4.7.0
17+
18+
## 5.9.0
19+
20+
### Minor Changes
21+
22+
- [#1203](https://github.com/commercetools/commercetools-sdk-typescript/pull/1203) [`e0b0fcc`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e0b0fccaed4812c0ac47b0c8c4724e81174b0255) Thanks [@ajimae](https://github.com/ajimae)! - release packages
23+
24+
### Patch Changes
25+
26+
- [#1203](https://github.com/commercetools/commercetools-sdk-typescript/pull/1203) [`e0b0fcc`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e0b0fccaed4812c0ac47b0c8c4724e81174b0255) Thanks [@ajimae](https://github.com/ajimae)! - release changeset
27+
28+
- Updated dependencies [[`e0b0fcc`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e0b0fccaed4812c0ac47b0c8c4724e81174b0255), [`e0b0fcc`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e0b0fccaed4812c0ac47b0c8c4724e81174b0255)]:
29+
- @commercetools/ts-client@4.6.0
30+
31+
## 5.8.0
32+
33+
### Minor Changes
34+
35+
- [#1201](https://github.com/commercetools/commercetools-sdk-typescript/pull/1201) [`f7c3101`](https://github.com/commercetools/commercetools-sdk-typescript/commit/f7c31015ae0e18111c31fcdb3baee8e964bad99b) Thanks [@ajimae](https://github.com/ajimae)! - release packages
36+
37+
### Patch Changes
38+
39+
- Updated dependencies [[`f7c3101`](https://github.com/commercetools/commercetools-sdk-typescript/commit/f7c31015ae0e18111c31fcdb3baee8e964bad99b)]:
40+
- @commercetools/ts-client@4.5.0
41+
42+
## 5.7.0
43+
44+
### Minor Changes
45+
46+
- [#1191](https://github.com/commercetools/commercetools-sdk-typescript/pull/1191) [`2898e78`](https://github.com/commercetools/commercetools-sdk-typescript/commit/2898e7831c731b611628e6516d99e19fa32d402e) Thanks [@ShipilA](https://github.com/ShipilA)! - **Api changes**
47+
48+
<details>
49+
<summary>Required Property(s)</summary>
50+
- changed property `variantSelection` of type `ProductSelectionProductAddedMessage` to be optional
51+
- changed property `variantExclusion` of type `ProductSelectionProductExcludedMessage` to be optional
52+
- changed property `oldVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessage` to be optional
53+
- changed property `newVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessage` to be optional
54+
- changed property `oldVariantSelection` of type `ProductSelectionVariantSelectionChangedMessage` to be optional
55+
- changed property `newVariantSelection` of type `ProductSelectionVariantSelectionChangedMessage` to be optional
56+
- changed property `variantSelection` of type `ProductSelectionProductAddedMessagePayload` to be optional
57+
- changed property `variantExclusion` of type `ProductSelectionProductExcludedMessagePayload` to be optional
58+
- changed property `oldVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessagePayload` to be optional
59+
- changed property `newVariantExclusion` of type `ProductSelectionVariantExclusionChangedMessagePayload` to be optional
60+
- changed property `oldVariantSelection` of type `ProductSelectionVariantSelectionChangedMessagePayload` to be optional
61+
- changed property `newVariantSelection` of type `ProductSelectionVariantSelectionChangedMessagePayload` to be optional
62+
</details>
63+
64+
<details>
65+
<summary>Added Property(s)</summary>
66+
- added property `interfaceId` to type `MyTransactionDraft`
67+
- added property `interfaceId` to type `Transaction`
68+
- added property `interfaceId` to type `TransactionDraft`
69+
</details>
70+
71+
<details>
72+
<summary>Added Type(s)</summary>
73+
- added type `PaymentTransactionInterfaceIdSetMessage`
74+
- added type `PaymentTransactionInterfaceIdSetMessagePayload`
75+
- added type `PaymentSetTransactionInterfaceIdAction`
76+
</details>
77+
78+
- [#1191](https://github.com/commercetools/commercetools-sdk-typescript/pull/1191) [`2898e78`](https://github.com/commercetools/commercetools-sdk-typescript/commit/2898e7831c731b611628e6516d99e19fa32d402e) Thanks [@ShipilA](https://github.com/ShipilA)! - Regular release
79+
80+
### Patch Changes
81+
82+
- Updated dependencies [[`e2fb7fd`](https://github.com/commercetools/commercetools-sdk-typescript/commit/e2fb7fd778f849f2a1da7f5abf0643c699bb8968), [`2898e78`](https://github.com/commercetools/commercetools-sdk-typescript/commit/2898e7831c731b611628e6516d99e19fa32d402e)]:
83+
- @commercetools/ts-client@4.4.0
84+
385
## 5.6.0
486

587
### Minor Changes

packages/history-sdk/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"access": "public"
55
},
66
"name": "@commercetools/history-sdk",
7-
"version": "5.6.0",
7+
"version": "5.10.0",
88
"engines": {
99
"node": ">=18"
1010
},
@@ -16,11 +16,11 @@
1616
"sdk",
1717
"history"
1818
],
19-
"homepage": "https://github.com/commercetools/commercetools-typescript-sdks/packages/history-sdk",
20-
"bugs": "https://github.com/commercetools/commercetools-typescript-sdks/issues",
19+
"homepage": "https://github.com/commercetools/commercetools-sdk-typescript/packages/history-sdk",
20+
"bugs": "https://github.com/commercetools/commercetools-sdk-typescript/issues",
2121
"repository": {
2222
"type": "git",
23-
"url": "https://github.com/commercetools/commercetools-typescript-sdks.git"
23+
"url": "https://github.com/commercetools/commercetools-sdk-typescript"
2424
},
2525
"files": ["dist", "CHANGELOG.md"],
2626
"author": "Jens Schulze",
@@ -32,10 +32,10 @@
3232
"./dist/commercetools-history-sdk.esm.js": "./dist/commercetools-history-sdk.browser.esm.js"
3333
},
3434
"dependencies": {
35-
"@commercetools/ts-client": "^4.3.0"
35+
"@commercetools/ts-client": "^4.7.0"
3636
},
3737
"devDependencies": {
38-
"@commercetools/platform-sdk": "8.18.0",
38+
"@commercetools/platform-sdk": "8.22.0",
3939
"@types/uuid": "10.0.0",
4040
"organize-imports-cli": "0.10.0",
4141
"tsconfig-replace-paths": "0.0.14",

0 commit comments

Comments
 (0)