Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
@jsr:registry=https://npm.jsr.io
ignore-scripts=true
legacy-peer-deps=true
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ node_js:
before_install:
- node scripts/hack-travis.mjs
install:
- yarn install --frozen-lockfile --network-concurrency 1
- yarn prepare
- npm ci
- npm run prepare
script:
- yarn lint
- yarn tsc
- yarn test
- npm run lint
- npx tsc
- npm test
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

22 changes: 11 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

## Package Manager

- **Use Yarn v1** instead of npm for all package management and script execution
- `yarn install` - Install dependencies
- `yarn add <package>` - Add new dependency
- `yarn add -D <package>` - Add dev dependency
- **Use npm** for all package management and script execution
- `npm ci` - Install dependencies from the lockfile (CI-style, reproducible)
- `npm install <package>` - Add new dependency
- `npm install -D <package>` - Add dev dependency

## Build/Test/Lint Commands

- `yarn lint` - Run ESLint on entire codebase
- `yarn fix` - Auto-fix linting issues and deduplicate yarn
- `yarn test` - Run Jest tests (single run)
- `yarn watch` - Run Jest tests in watch mode
- `yarn test --testNamePattern="test name"` - Run specific test by name
- `yarn verify` - Run lint, typechain, tsc, and test (full verification)
- `yarn precommit` - Full pre-commit check (localize, lint-staged, tsc, test)
- `npm run lint` - Run ESLint on entire codebase
- `npm run fix` - Auto-fix linting issues and dedupe the dependency tree
- `npm test` - Run Jest tests (single run)
- `npm run watch` - Run Jest tests in watch mode
- `npm test -- --testNamePattern="test name"` - Run specific test by name
- `npm run verify` - Run lint, typechain, tsc, and test (full verification)
- `npm run precommit` - Full pre-commit check (localize, lint-staged, tsc, test)
- `tsc` - TypeScript type checking (via package.json script)

## Code Style Guidelines
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased (develop)

- added: Bitcoin Lightning sends from BTC wallets via the Breez SDK - Spark — paste or scan a BOLT11 invoice in the send flow to pay over Lightning.
- added: Logbox disable option to env.json

## 4.49.0 (staging)
Expand Down
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def preBuildStages(String stageName, versionFile) {
writeJSON file: './release-version.json', json: versionFile
currentBuild.description = versionString

sh 'yarn'
sh 'npm ci'

// Import the settings files
withCredentials([file(credentialsId: 'githubSshKey', variable: 'id_github')]) {
Expand All @@ -24,13 +24,13 @@ def preBuildStages(String stageName, versionFile) {
// Pick the new build number and version from git:
sh 'node -r sucrase/register ./scripts/updateVersion.ts'

sh 'yarn prepare'
sh 'npm run prepare'
}
}

def preTest(String stageName) {
stage("${stageName}: preTest") {
sh 'yarn test --ci'
sh 'npm test -- --ci'
}
}

Expand Down Expand Up @@ -108,8 +108,8 @@ pipeline {
sh "cp ${id_github} ./id_github"
}

// Use npm to install Sucrase globally
sh 'yarn add --dev sucrase'
// Install Sucrase so gitVersionFile.ts can run before the full npm ci below
sh 'npm install --save-dev sucrase'
sh "node -r sucrase/register ./scripts/gitVersionFile.ts ${BRANCH_NAME}"

def versionFile = readJSON file: './release-version.json'
Expand Down
30 changes: 12 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,17 @@ The React Native documentation contains [detailed instructions on how to prepare

If you are using a Mac, follow both the iOS and Android target instructions. Otherwise, you only need the Android target instructions.

### Install Yarn

This project uses Yarn to manage Javascript dependencies:

https://yarnpkg.com

Do not use NPM to install dependencies, since that will not work.

### Checkout develop branch & install node_modules

This project uses npm to manage Javascript dependencies (npm ships with Node).

cd edge-react-gui
yarn
yarn prepare
npm ci
npm run prepare

### Run the bundler

yarn start
npm start

This bundler process needs to run in the background, so feel free to run this in its own terminal window.

Expand All @@ -57,15 +51,15 @@ Change the `AIRBITZ_API_KEY` in `env.json` to the API key you received from Edge

#### iOS

- Run `yarn prepare.ios` to generate the CocoaPods files. You will need to do this after the first install, and any time Xcode produces a `The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.` error.
- Run `npm run prepare.ios` to generate the CocoaPods files. You will need to do this after the first install, and any time Xcode produces a `The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.` error.
- Open `edge-react-gui/ios/edge.xcworkspace` in Xcode
- Choose a target device or simulator and tap the Play button on the top nav bar

#### Android

To build, install, and start the app on a simulator or physical phone with USB debugging, run:

yarn android
npm run android

Otherwise, to get an APK, do:

Expand Down Expand Up @@ -109,11 +103,11 @@ Set `BUILD_REPO_URL` to the URL of an empty Git repo that will hold a version
file that will be auto updated to increment the version and build number. Then
run the following to update a local `release-version.json` file

yarn gitVersionFile
npm run gitVersionFile

Update the project files based on the version in `release-version.json`

yarn updateVersion
npm run updateVersion

### Build, sign, and deploy

Expand All @@ -137,15 +131,15 @@ The included `deploy.ts` is a script to automate building, signing, and deployin
Run deploy

```sh
yarn deploy edge ios master
yarn deploy edge android master
npm run deploy edge ios master
npm run deploy edge android master
```

## Fastlane support

This repo supports utilizing Fastlane to automate updates to iOS Provisioning
Profiles. To use Fastlane, set the following environment variables and run
`yarn deploy` as mentioned above
`npm run deploy` as mentioned above

BUILD_REPO_URL // Git repo used to store encrypted provisioning
// keys.
Expand Down
2 changes: 1 addition & 1 deletion docs/MAESTRO.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ cd ~/edge/edge-react-gui


```bash
yarn maestro
npm run maestro
```

## Creating Maestro tests with Maestro Studio
Expand Down
33 changes: 33 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
PODS:
- _NIODataStructures (2.40.0)
- boost (1.84.0)
- BreezSdkSparkReactNative (0.14.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-hermes
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- uniffi-bindgen-react-native (= 0.29.3-1)
- Yoga
- BVLinearGradient (2.8.3):
- React-Core
- CGRPCZlib (1.8.0)
Expand Down Expand Up @@ -2860,6 +2885,8 @@ PODS:
- SwiftNIOPosix (< 3, >= 2.32.0)
- SwiftNIOTLS (< 3, >= 2.32.0)
- SwiftProtobuf (1.33.3)
- uniffi-bindgen-react-native (0.29.3-1):
- React-Core
- VisionCamera (4.7.2):
- VisionCamera/Core (= 4.7.2)
- VisionCamera/React (= 4.7.2)
Expand All @@ -2874,6 +2901,7 @@ PODS:

DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- "BreezSdkSparkReactNative (from `../node_modules/@breeztech/breez-sdk-spark-react-native`)"
- BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
- disklet (from `../node_modules/disklet`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
Expand Down Expand Up @@ -3053,12 +3081,15 @@ SPEC REPOS:
- SwiftNIOTLS
- SwiftNIOTransportServices
- SwiftProtobuf
- uniffi-bindgen-react-native
- ZIPFoundation
- ZXingObjC

EXTERNAL SOURCES:
boost:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
BreezSdkSparkReactNative:
:path: "../node_modules/@breeztech/breez-sdk-spark-react-native"
BVLinearGradient:
:path: "../node_modules/react-native-linear-gradient"
disklet:
Expand Down Expand Up @@ -3324,6 +3355,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
_NIODataStructures: 3d45d8e70a1d17a15b1dc59d102c63dbc0525ffd
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
BreezSdkSparkReactNative: 1edad49da8a438ec9fe89f51e7f57d3013625720
BVLinearGradient: cb006ba232a1f3e4f341bb62c42d1098c284da70
CGRPCZlib: 298dd3237ba4bd7b3eed109e7080ff3324b7d9c9
CNIOAtomics: 8edf08644e5e6fa0f021c239be9e8beb1cd9ef18
Expand Down Expand Up @@ -3495,6 +3527,7 @@ SPEC CHECKSUMS:
SwiftNIOTLS: 598af547490133e9aac52aed0c23c4a90c31dcfc
SwiftNIOTransportServices: 0b2b407819d82eb63af558c5396e33c945759503
SwiftProtobuf: e1b437c8e31a4c5577b643249a0bb62ed4f02153
uniffi-bindgen-react-native: 125eae9e3a0cf34bf8f3d4b0ceed517df7cc0733
VisionCamera: 30b358b807324c692064f78385e9a732ce1bebfe
Yoga: 50518ade05048235d91a78b803336dbb5b159d5d
ZIPFoundation: dfd3d681c4053ff7e2f7350bc4e53b5dba3f5351
Expand Down
14 changes: 3 additions & 11 deletions maestro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ start() {
STEPS=("Checking Apple CLI tools installation"
"Installing Homebrew"
"Installing Git"
"Installing nvm, node, npm and yarn"
"Installing nvm, node, and npm"
"Installing the Java Development Kit (JDK)"
"Installing android-platform-tools"
"Installing Maestro")

CMDS=("verify_apple_cli_tools_installed"
"install_homebrew"
"install_git"
"install_node_npm_yarn"
"install_node_npm"
"install_jdk"
"install_adb"
"install_maestro")
Expand Down Expand Up @@ -140,7 +140,7 @@ install_git() {
fi
}

install_node_npm_yarn() {
install_node_npm() {
if is_cmd nvm; then
echo "NVM already installed. "
else
Expand All @@ -159,14 +159,6 @@ install_node_npm_yarn() {
nvm install $NODE_VERSION
nvm use $NODE_VERSION
fi

if is_cmd yarn; then
echo "Yarn already installed..."
else
echo "Installing Yarn"
npm install -g yarn
fi

}

verify_apple_cli_tools_installed() {
Expand Down
Loading
Loading