Skip to content

[DX] Add dev.yml scripts for opening editors#259

Open
kieran-osgood-shopify wants to merge 1 commit into
mainfrom
kieran-osgood/06-05-feataddscriptsforopeningeditors
Open

[DX] Add dev.yml scripts for opening editors#259
kieran-osgood-shopify wants to merge 1 commit into
mainfrom
kieran-osgood/06-05-feataddscriptsforopeningeditors

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Introduces the following commands to streamline opening editors for the given platform

 ┌────────────────────────────┬──────────────────────────────────────────────┐
 │ Command                    │ Opens                                        │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev swift open             │ xed → Samples.xcworkspace (demo default)     │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev swift open lib         │ xed → platforms/swift                        │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev android open           │ Android Studio → CheckoutKitAndroidDemo      │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev android open lib       │ Android Studio → platforms/android           │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev react-native open      │ editor → platforms/react-native              │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev rn open demo --ios     │ xed → CheckoutKitReactNativeDemo.xcworkspace │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev rn open demo --android │ Android Studio → sample/android              │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev web open               │ editor → web/sample                          │
 ├────────────────────────────┼──────────────────────────────────────────────┤
 │ dev web open lib           │ editor → platforms/web                       │
 └────────────────────────────┴──────────────────────────────────────────────┘

Adds a .dev.env to allow customising the local dev experience
I'm thinking of ƒuture additions to this might will include the ability to configure the USE_LOCAL_SDK option for local dev against the libraries in react-native

We use this env file to set up a new var:

  • DEV_EDITOR - Select a command that exists in path, e.g. code, nvim, zed

This file is only for dev overrides and does not customise the library or demo apps.

Why

I considered $EDITOR or $VISUAL but these seem more suited to editing with command line utilities like git

I chose the DEV_EDITOR to simplify the mental overhead of support
Personally I have $EDITOR set to nvim for quick edits during git, but default to VSCode for the sample apps
I wanted to avoid confusion in scripts that may rely on EDITOR being set, and rely on both

How to test

Setup a .dev.env file and override the DEV_EDITOR to your chosen editor
cp .dev.env.example .dev.env


Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated platforms/swift/CHANGELOG.md
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Android version?
  • I have bumped the versionName in platforms/android/lib/build.gradle
  • I have updated platforms/android/CHANGELOG.md
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.59% (316/345) 87.25% (178/204) 100% (82/82)

@kieran-osgood-shopify kieran-osgood-shopify changed the title feat: add scripts for opening editors [DX] Add dev.yml scripts for opening editors Jun 5, 2026
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/06-05-feataddscriptsforopeningeditors branch 2 times, most recently from 322ce6d to 96218ad Compare June 5, 2026 16:17
module CheckoutKit
module CLI
module ConfigSummary
SENSITIVE_KEY_PATTERN = /(ACCESS_TOKEN|TOKEN|SECRET|PASSWORD|CHECKOUT_URL|MERCHANT_IDENTIFIER|SHOP_ID|ACCOUNT_ID|CLIENT_ID|AUTH|KEY)/i

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some shared verbose logging for --verbose when things go wrong

@kieran-osgood-shopify kieran-osgood-shopify marked this pull request as ready for review June 5, 2026 16:25
@kieran-osgood-shopify kieran-osgood-shopify requested a review from a team as a code owner June 5, 2026 16:25
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/rename-demo-apps/react-native branch from 884e885 to 8583382 Compare June 5, 2026 16:35
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/06-05-feataddscriptsforopeningeditors branch from 96218ad to 32f87fd Compare June 5, 2026 16:35
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/rename-demo-apps/react-native branch from 8583382 to 3e004af Compare June 8, 2026 08:21
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/06-05-feataddscriptsforopeningeditors branch from 32f87fd to 41300fd Compare June 8, 2026 08:22
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/rename-demo-apps/react-native branch 2 times, most recently from dcf5776 to a6a9cef Compare June 8, 2026 08:46
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/06-05-feataddscriptsforopeningeditors branch from 41300fd to 5174f36 Compare June 8, 2026 08:46
@kieran-osgood-shopify kieran-osgood-shopify changed the base branch from kieran-osgood/rename-demo-apps/react-native to graphite-base/259 June 8, 2026 09:18
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/06-05-feataddscriptsforopeningeditors branch from 5174f36 to 15fe32a Compare June 8, 2026 09:18
@graphite-app graphite-app Bot changed the base branch from graphite-base/259 to main June 8, 2026 09:19
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/06-05-feataddscriptsforopeningeditors branch from 15fe32a to d3f0978 Compare June 8, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant