Skip to content

Commit e2fde03

Browse files
Juanita-Dashclaude
andcommitted
Rename Checkout Sheet Kit to Checkout Kit (React Native)
Renames the React Native bridge in react-native/ from Shopify Checkout Sheet Kit to Shopify Checkout Kit. Mirrors the parallel rename in the source repo (Shopify/checkout-sheet-kit-react-native#483) applied to the v4.0.0 import (#31). Stacked on rn-import-source-v4 (PR #31). When #31 merges, this will be auto-retargeted onto main with the rename diff intact. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 089ff32 commit e2fde03

74 files changed

Lines changed: 486 additions & 488 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ updates:
7777
- "version-update:semver-major"
7878
- "version-update:semver-minor"
7979

80-
# React Native — Checkout Sheet Kit module
80+
# React Native — Checkout Kit module
8181
- package-ecosystem: npm
82-
directory: "/platforms/react-native/modules/@shopify/checkout-sheet-kit"
82+
directory: "/platforms/react-native/modules/@shopify/checkout-kit-react-native"
8383
schedule:
8484
interval: daily
8585
cooldown:

.github/workflows/rn-test-ios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
5656
with:
5757
path: platforms/react-native/sample/ios/Pods
58-
key: ${{ runner.os }}-cocoapods-${{ hashFiles('platforms/react-native/sample/ios/Podfile.lock', 'platforms/react-native/sample/Gemfile.lock', 'platforms/react-native/sample/Gemfile', 'platforms/react-native/package.json', 'platforms/react-native/sample/package.json', 'platforms/react-native/modules/@shopify/checkout-sheet-kit/package.json', 'platforms/react-native/pnpm-lock.yaml') }}
58+
key: ${{ runner.os }}-cocoapods-${{ hashFiles('platforms/react-native/sample/ios/Podfile.lock', 'platforms/react-native/sample/Gemfile.lock', 'platforms/react-native/sample/Gemfile', 'platforms/react-native/package.json', 'platforms/react-native/sample/package.json', 'platforms/react-native/modules/@shopify/checkout-kit-react-native/package.json', 'platforms/react-native/pnpm-lock.yaml') }}
5959

6060
- name: Install cocoapods
6161
working-directory: platforms/react-native/sample

.github/workflows/rn-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
working-directory: platforms/react-native
2828

2929
- name: Run tests with coverage
30-
run: pnpm test --coverage --testPathPatterns="modules/@shopify/checkout-sheet-kit/tests" --coverageReporters=json-summary
30+
run: pnpm test --coverage --testPathPatterns="modules/@shopify/checkout-kit-react-native/tests" --coverageReporters=json-summary
3131

3232
- name: Coverage comment
3333
if: github.event_name == 'pull_request'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Checkout Kit is a monorepo containing all the platforms Checkout Kit supports to
3535
| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------------------------- | ------------------------------------------ |
3636
| [`ShopifyCheckoutKit` `ShopifyAcceleratedCheckouts`](platforms/swift/) | [![GitHub tag](https://img.shields.io/github/v/tag/Shopify/checkout-kit?label=SPM)](https://github.com/Shopify/checkout-kit/tags) [![CocoaPods](https://img.shields.io/cocoapods/v/ShopifyCheckoutKit.svg?label=CocoaPods)](https://cocoapods.org/pods/ShopifyCheckoutKit) | Swift Package Manager, CocoaPods | iOS checkout presentation and accelerated checkout libraries. | [Readme](platforms/swift/README.md) |
3737
| [`com.shopify:checkout-kit`](platforms/android/) | [![Maven Central](https://img.shields.io/maven-central/v/com.shopify/checkout-kit.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/com.shopify/checkout-kit) | Maven Central | Android checkout presentation and accelerated checkout support. | [Readme](platforms/android/README.md) |
38-
| [`@shopify/checkout-kit`](platforms/react-native/) | [![npm latest](https://img.shields.io/npm/v/@shopify/checkout-kit/latest.svg?label=npm)](https://www.npmjs.com/package/@shopify/checkout-kit) | npm | React Native wrapper for Checkout Kit. | [Readme](platforms/react-native/README.md) |
38+
| [`@shopify/checkout-kit-react-native`](platforms/react-native/) | [![npm latest](https://img.shields.io/npm/v/@shopify/checkout-kit-react-native/latest.svg?label=npm)](https://www.npmjs.com/package/@shopify/checkout-kit-react-native) | npm | React Native wrapper for Checkout Kit. | [Readme](platforms/react-native/README.md) |
3939

4040
## Versioning
4141

platforms/react-native/.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ dist
8787
.turbo
8888

8989
# Module
90-
modules/@shopify/checkout-sheet-kit/android/gradle/wrapper/gradle-wrapper.jar
91-
modules/@shopify/checkout-sheet-kit/android/gradle/wrapper/gradle-wrapper.properties
92-
modules/@shopify/checkout-sheet-kit/android/gradlew
93-
modules/@shopify/checkout-sheet-kit/android/gradlew.bat
90+
modules/@shopify/checkout-kit-react-native/android/gradle/wrapper/gradle-wrapper.jar
91+
modules/@shopify/checkout-kit-react-native/android/gradle/wrapper/gradle-wrapper.properties
92+
modules/@shopify/checkout-kit-react-native/android/gradlew
93+
modules/@shopify/checkout-kit-react-native/android/gradlew.bat
9494

9595
# Sample bundle
9696
**/index.android.bundle

platforms/react-native/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ see [guidelines and instructions](.github/CONTRIBUTING.md).
77

88
This repo is subdivided into 3 parts using pnpm workspaces:
99

10-
- The base repo (workspace name = `checkout-sheet-kit-react-native`)
11-
- The `@shopify/checkout-sheet-kit` Native Module (workspace name = `module`)
10+
- The base repo (workspace name = `checkout-kit-react-native`)
11+
- The `@shopify/checkout-kit-react-native` Native Module (workspace name = `module`)
1212
- The sample application (workspace name = `sample`)
1313

1414
Each of the workspaces contains a separate `package.json` to manage tasks
@@ -75,7 +75,7 @@ SCCACHE=false pnpm sample android
7575
## Making changes to the Native Module
7676

7777
If your intentions are to modify the TS code for the Native Module under
78-
`modules/@shopify/checkout-sheet-kit`, note that you will not need to rebuild to
78+
`modules/@shopify/checkout-kit-react-native`, note that you will not need to rebuild to
7979
observe your changes in the sample app. This is because the sample app is
8080
importing the TS files directly from the module directory (through symlinking).
8181

@@ -118,7 +118,7 @@ There are 3 types of tests in this repo: Typescript, Swift and Java - each for
118118
testing the Native Module.
119119

120120
```sh
121-
# Run Jest tests for "modules/@shopify/checkout-sheet-kit/src/**/*.tsx"
121+
# Run Jest tests for "modules/@shopify/checkout-kit-react-native/src/**/*.tsx"
122122
pnpm test
123123

124124
# Run swift tests for the Native Module

platforms/react-native/README.md

Lines changed: 43 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Shopify Checkout Kit - React Native
22

3-
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/Shopify/checkout-sheet-kit-react-native/blob/main/LICENSE)
4-
[![GitHub Release](https://img.shields.io/github/release/shopify/checkout-sheet-kit-react-native.svg?style=flat)]()
3+
[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](https://github.com/Shopify/checkout-kit/blob/main/LICENSE)
54

65
<img width="3200" height="800" alt="gradients" src="https://github.com/user-attachments/assets/156492b7-5a64-43d2-b574-2e8f29ed8780" />
76

@@ -13,8 +12,6 @@ branding, and more. It also provides platform idiomatic defaults such as support
1312
for light and dark mode, and convenient developer APIs to embed, customize, and
1413
follow the lifecycle of the checkout experience.
1514

16-
Note: We're in the process of renaming "Checkout Sheet Kit" to "Checkout Kit." The dev docs and README already use the new name, while the package itself will be updated in an upcoming version.
17-
1815
Check out our blog to
1916
[learn how and why we built the Shopify Checkout Kit](https://www.shopify.com/partners/blog/mobile-checkout-sdks-for-ios-and-android).
2017

@@ -71,7 +68,7 @@ experiences.
7168

7269
## Version Compatibility
7370

74-
Starting with **v4.0.0**, `@shopify/checkout-sheet-kit` requires the React Native
71+
Starting with **v4.0.0**, `@shopify/checkout-kit-react-native` requires the React Native
7572
**New Architecture** (TurboModules + Fabric). Apps on the old architecture must
7673
stay on the `v3.x` line until they migrate.
7774

@@ -95,13 +92,13 @@ application:
9592
Install the Shopify Checkout Kit package dependency:
9693

9794
```sh
98-
pnpm add @shopify/checkout-sheet-kit
95+
pnpm add @shopify/checkout-kit-react-native
9996

10097
# or using yarn
101-
yarn add @shopify/checkout-sheet-kit
98+
yarn add @shopify/checkout-kit-react-native
10299

103100
# or using npm
104-
npm install @shopify/checkout-sheet-kit
101+
npm install @shopify/checkout-kit-react-native
105102
```
106103

107104
### 2. Minimum Android requirements
@@ -141,13 +138,13 @@ requirements have been checked, you can begin by importing the library in your
141138
application code:
142139

143140
```tsx
144-
import {ShopifyCheckoutSheetProvider} from '@shopify/checkout-sheet-kit';
141+
import {ShopifyCheckoutProvider} from '@shopify/checkout-kit-react-native';
145142

146143
function AppWithContext() {
147144
return (
148-
<ShopifyCheckoutSheetProvider>
145+
<ShopifyCheckoutProvider>
149146
<App />
150-
</ShopifyCheckoutSheetProvider>
147+
</ShopifyCheckoutProvider>
151148
);
152149
}
153150
```
@@ -156,10 +153,10 @@ Doing so will now allow you to access the Native Module anywhere in your
156153
application using React hooks:
157154

158155
```tsx
159-
import {useShopifyCheckoutSheet} from '@shopify/checkout-sheet-kit';
156+
import {useShopifyCheckout} from '@shopify/checkout-kit-react-native';
160157

161158
function App() {
162-
const shopifyCheckout = useShopifyCheckoutSheet();
159+
const shopifyCheckout = useShopifyCheckout();
163160

164161
// Present the checkout
165162
shopifyCheckout.present(checkoutUrl);
@@ -171,22 +168,22 @@ to obtain a checkout URL to pass to the kit.
171168

172169
> [!NOTE]
173170
> The recommended usage of the library is through a
174-
> `ShopifyCheckoutSheetProvider` Context provider, but see
171+
> `ShopifyCheckoutProvider` Context provider, but see
175172
> [Programmatic usage](#programamatic-usage) below for details on how to use the
176173
> library without React context.
177174
178175
## Programmatic Usage
179176

180-
To use the library without React context, import the `ShopifyCheckoutSheet`
177+
To use the library without React context, import the `ShopifyCheckout`
181178
class from the package and instantiate it. We recommend to instantiating the
182179
class at a relatively high level in your application, and exporting it for use
183180
throughout your app.
184181

185182
```tsx
186183
// shopify.ts
187-
import {ShopifyCheckoutSheet} from '@shopify/checkout-sheet-kit';
184+
import {ShopifyCheckout} from '@shopify/checkout-kit-react-native';
188185

189-
export const shopifyCheckout = new ShopifyCheckoutSheet({
186+
export const shopifyCheckout = new ShopifyCheckout({
190187
// optional configuration
191188
});
192189
```
@@ -281,7 +278,7 @@ browser. To present a native checkout sheet in your application, provide the
281278

282279
```tsx
283280
function App() {
284-
const shopifyCheckout = useShopifyCheckoutSheet()
281+
const shopifyCheckout = useShopifyCheckout()
285282
const checkoutUrl = useRef<string>(null)
286283
const [createCart] = useMutation(createCartMutation)
287284
const [addToCart] = useMutation(addToCartMutation)
@@ -330,7 +327,7 @@ function App() {
330327

331328
The SDK provides a way to customize the presented checkout experience through a
332329
`configuration` object in the Context Provider or a `setConfig` method on an
333-
instance of the `ShopifyCheckoutSheet` class.
330+
instance of the `ShopifyCheckout` class.
334331

335332
| Name | Required | Default | Description |
336333
| ------------- | -------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -346,8 +343,8 @@ import {
346343
ColorScheme,
347344
Configuration,
348345
LogLevel,
349-
ShopifyCheckoutSheetProvider,
350-
} from '@shopify/checkout-sheet-kit';
346+
ShopifyCheckoutProvider,
347+
} from '@shopify/checkout-kit-react-native';
351348

352349
const config: Configuration = {
353350
colorScheme: ColorScheme.web,
@@ -370,14 +367,14 @@ const config: Configuration = {
370367
// If using React Context
371368
function AppWithContext() {
372369
return (
373-
<ShopifyCheckoutSheetProvider configuration={config}>
370+
<ShopifyCheckoutProvider configuration={config}>
374371
<App />
375-
</ShopifyCheckoutSheetProvider>
372+
</ShopifyCheckoutProvider>
376373
);
377374
}
378375

379-
// If using ShopifyCheckoutSheet directly
380-
const shopifyCheckout = new ShopifyCheckoutSheet(config);
376+
// If using ShopifyCheckout directly
377+
const shopifyCheckout = new ShopifyCheckout(config);
381378
```
382379

383380
### Colors
@@ -424,8 +421,8 @@ slightly different, as you can specify different overrides for `light` and
424421
import {
425422
ColorScheme,
426423
Configuration,
427-
ShopifyCheckoutSheetProvider,
428-
} from '@shopify/checkout-sheet-kit';
424+
ShopifyCheckoutProvider,
425+
} from '@shopify/checkout-kit-react-native';
429426

430427
const config: Configuration = {
431428
colorScheme: ColorScheme.automatic,
@@ -452,9 +449,9 @@ const config: Configuration = {
452449

453450
function AppWithContext() {
454451
return (
455-
<ShopifyCheckoutSheetProvider configuration={config}>
452+
<ShopifyCheckoutProvider configuration={config}>
456453
<App />
457-
</ShopifyCheckoutSheetProvider>
454+
</ShopifyCheckoutProvider>
458455
);
459456
}
460457
```
@@ -552,11 +549,11 @@ Once enabled, preloading a checkout is as simple as calling
552549

553550
```tsx
554551
// using hooks
555-
const shopifyCheckout = useShopifyCheckoutSheet();
552+
const shopifyCheckout = useShopifyCheckout();
556553
ShopifyCheckout.preload(checkoutUrl);
557554

558555
// using a class instance
559-
const shopifyCheckout = new ShopifyCheckoutSheet();
556+
const shopifyCheckout = new ShopifyCheckout();
560557
shopifyCheckout.preload(checkoutUrl);
561558
```
562559

@@ -590,7 +587,7 @@ Instead, a better approach is to call `preload()` when you have a strong enough
590587

591588
### Cache invalidation
592589

593-
Should you wish to manually clear the preload cache, there is a `ShopifyCheckoutSheetKit.invalidate()` helper function to do so.
590+
Should you wish to manually clear the preload cache, there is a `ShopifyCheckoutKit.invalidate()` helper function to do so.
594591

595592
## Checkout lifecycle
596593

@@ -613,7 +610,7 @@ an event listener in a React `useEffect`, ensuring to remove it on unmount.
613610

614611
```tsx
615612
// Using hooks
616-
const shopifyCheckout = useShopifyCheckoutSheet();
613+
const shopifyCheckout = useShopifyCheckout();
617614

618615
useEffect(() => {
619616
const close = shopifyCheckout.addEventListener('close', () => {
@@ -751,7 +748,7 @@ is completed.
751748
### Universal Links - iOS
752749

753750
See the
754-
[Universal Links guide](https://github.com/Shopify/checkout-sheet-kit-react-native/blob/main/documentation/universal_links_ios.md)
751+
[Universal Links guide](https://github.com/Shopify/checkout-kit/blob/main/documentation/universal_links_ios.md)
755752
for information on how to get started with adding support for Offsite Payments
756753
in your app.
757754

@@ -812,20 +809,20 @@ The geolocation request flow follows this sequence:
812809
> This section is only applicable for Android.
813810

814811
In order to opt-out of the default permission handling, you can set `features.handleGeolocationRequests` to `false`
815-
when you instantiate the `ShopifyCheckoutSheet` class.
812+
when you instantiate the `ShopifyCheckout` class.
816813

817814
If you're using the sheet programmatically, you can do so by specifying a `features` object as the second argument:
818815

819816
```tsx
820-
const checkoutSheetKit = new ShopifyCheckoutSheet(config, {handleGeolocationRequests: false});
817+
const shopifyCheckout = new ShopifyCheckout(config, {handleGeolocationRequests: false});
821818
```
822819

823-
If you're using the context provider, you can pass the same `features` object as a prop to the `ShopifyCheckoutSheetProvider` component:
820+
If you're using the context provider, you can pass the same `features` object as a prop to the `ShopifyCheckoutProvider` component:
824821

825822
```tsx
826-
<ShopifyCheckoutSheetProvider configuration={config} features={{handleGeolocationRequests: false}}>
823+
<ShopifyCheckoutProvider configuration={config} features={{handleGeolocationRequests: false}}>
827824
{children}
828-
</ShopifyCheckoutSheetProvider>
825+
</ShopifyCheckoutProvider>
829826
```
830827

831828
When opting out, you'll need to implement your own permission handling logic and communicate the result back to the checkout sheet. This can be useful if you want to:
@@ -872,10 +869,10 @@ Accelerated checkout buttons surface Apple Pay and Shop Pay options earlier in t
872869

873870
### Configure the integration
874871

875-
Pass an `acceleratedCheckouts` configuration when setting up the provider or `ShopifyCheckoutSheet` instance. This connects the accelerated checkout buttons to your storefront.
872+
Pass an `acceleratedCheckouts` configuration when setting up the provider or `ShopifyCheckout` instance. This connects the accelerated checkout buttons to your storefront.
876873

877874
```tsx
878-
import {ShopifyCheckoutSheetProvider} from '@shopify/checkout-sheet-kit';
875+
import {ShopifyCheckoutProvider} from '@shopify/checkout-kit-react-native';
879876

880877
const config = {
881878
acceleratedCheckouts: {
@@ -901,9 +898,9 @@ const config = {
901898

902899
function App() {
903900
return (
904-
<ShopifyCheckoutSheetProvider configuration={config}>
901+
<ShopifyCheckoutProvider configuration={config}>
905902
<YourApp />
906-
</ShopifyCheckoutSheetProvider>
903+
</ShopifyCheckoutProvider>
907904
);
908905
}
909906
```
@@ -919,7 +916,7 @@ Use `AcceleratedCheckoutButtons` to attach accelerated checkout calls-to-action
919916
import {
920917
AcceleratedCheckoutButtons,
921918
AcceleratedCheckoutWallet,
922-
} from '@shopify/checkout-sheet-kit';
919+
} from '@shopify/checkout-kit-react-native';
923920

924921
function CartFooter({cartId}: {cartId: string}) {
925922
return (
@@ -964,7 +961,7 @@ Accelerated checkout buttons display every available wallet by default. Use `wal
964961
Use `applePayLabel` to map to the native `PayWithApplePayButtonLabel` values. The default is `plain`.
965962

966963
```tsx
967-
import {ApplePayLabel} from '@shopify/checkout-sheet-kit';
964+
import {ApplePayLabel} from '@shopify/checkout-kit-react-native';
968965

969966
<AcceleratedCheckoutButtons
970967
cartId={cartId}
@@ -977,7 +974,7 @@ import {ApplePayLabel} from '@shopify/checkout-sheet-kit';
977974
Use `applePayStyle` to set the color style of the Apple Pay button. The default is `automatic`, which adapts to the current appearance (light/dark mode).
978975

979976
```tsx
980-
import {ApplePayStyle} from '@shopify/checkout-sheet-kit';
977+
import {ApplePayStyle} from '@shopify/checkout-kit-react-native';
981978

982979
<AcceleratedCheckoutButtons
983980
cartId={cartId}

0 commit comments

Comments
 (0)