Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.3.2 (8 Nov 2026)

- `strait init` writes the SDKs that carry the `doctor()` "Apps & stores" fix: Android 0.10.1 (JitPack), iOS 0.11.1 (SwiftPM) and Flutter 0.10.2 (was 0.10.0, 0.11.0 and 0.10.1), so an app set up with `init` gets the same next step from `doctor()` as from `strait doctor`.

## 0.3.1 (7 Nov 2026)

- `strait init` writes React Native 0.11.0 (now on npm, was 0.10.2).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@straitlink/cli",
"version": "0.3.1",
"version": "0.3.2",
"description": "Strait deep links from the terminal: init sets them up in a React Native, Expo, Flutter or Android app, doctor checks your link host, links creates and lists links and saves QR codes.",
"keywords": [
"strait",
Expand Down
6 changes: 3 additions & 3 deletions src/install.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export const sourceFor = (src, registry) => (typeof src.source === 'string' ? sr
* `strait events add` reads them too: its iOS/Android eventId needs these SDKs.
*/
export const VERSIONS = {
version: '0.11.0', // Swift (Unity is not written by this CLI)
version: '0.11.1', // Swift (Unity is not written by this CLI)
rnVersion: '0.11.0',
flutterVersion: '0.10.1',
androidVersion: '0.10.0',
flutterVersion: '0.10.2',
androidVersion: '0.10.1',
};

export const PACKAGES = {
Expand Down
2 changes: 1 addition & 1 deletion src/version.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Kept equal to package.json version (test/links.test.mjs checks it). Sent as the API User-Agent.
export const CLI_VERSION = '0.3.1';
export const CLI_VERSION = '0.3.2';
4 changes: 2 additions & 2 deletions test/events.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ test('each platform prints its SDK\'s real event call with the name', async () =
const want = {
'react-native': [/import \{ links \} from '\.\/links'/, /await links\.trackEvent\('purchase'\);/, /value: 49\.99, currency: 'USD', eventId: order\.id/],
flutter: [/import 'links\.dart';/, /await links\.trackEvent\('purchase'\);/, /value: 49\.99, currency: 'USD'/],
ios: [/strait\.trackEvent\("purchase"\) \{ ok in/, /eventId: order\.id/, /StraitSDK 0\.11\.0\+/],
android: [/StraitLinks\.client\.trackEvent\("purchase"\)/, /off the main thread/, /eventId = order\.id/, /strait-sdk-android 0\.10\.0\+/],
ios: [/strait\.trackEvent\("purchase"\) \{ ok in/, /eventId: order\.id/, /StraitSDK 0\.11\.1\+/],
android: [/StraitLinks\.client\.trackEvent\("purchase"\)/, /off the main thread/, /eventId = order\.id/, /strait-sdk-android 0\.10\.1\+/],
web: [/import \{ reportWebOpen, trackEvent \} from '@straitlink\/web'/, /await reportWebOpen\(strait\);/, /await trackEvent\(strait, 'purchase'\);/, /value: 49\.99, currency: 'USD', eventId: order\.id/],
};
for (const [platform, patterns] of Object.entries(want)) {
Expand Down
4 changes: 2 additions & 2 deletions test/init.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ test('Flutter: lib/links.dart, pubspec install from the constant, manifest alrea
assert.match(dart, new RegExp(`publishableKey: '${KEY}'`));
assert.match(dart, /links\.onLink\.listen/);
assert.match(dart, /didChangeAppLifecycleState\(AppLifecycleState state\) => _ctl\.add\(switch \(state\)/, 'flutter analyze: avoid_renaming_method_parameters');
assert.match(dart, /\(strait_sdk 0\.10\.1\)/, 'header names the Flutter SDK version');
assert.match(r.out, /strait_sdk: \^0\.10\.1\n/);
assert.match(dart, /\(strait_sdk 0\.10\.2\)/, 'header names the Flutter SDK version');
assert.match(r.out, /strait_sdk: \^0\.10\.2\n/);
for (const line of installSpecs().flutterPubspec.split('\n')) assert.ok(r.out.includes(` ${line}\n`), line);
assert.match(r.out, /intent filters for acme\.strait\.link and acmeflutter:\/\/ are already there/);
assert.match(r.out, /flutter_deeplinking_enabled" android:value="false"/);
Expand Down
16 changes: 8 additions & 8 deletions test/install.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ const root = fileURLToPath(new URL('..', import.meta.url));
const walk = (d) => readdirSync(d).flatMap((n) => (n === 'node_modules' || n === '.git' ? [] : statSync(join(d, n)).isDirectory() ? walk(join(d, n)) : [join(d, n)]));

test('github and registry sources', () => {
// Versions as of 7 Nov 2026 (site.config.json packages = npm / pub.dev / JitPack): RN 0.11.0, Flutter 0.10.1, Android 0.10.0.
// Versions as of 8 Nov 2026 (site.config.json packages = npm / pub.dev / JitPack): RN 0.11.0, Flutter 0.10.2, Android 0.10.1.
const gh = installSpecs({ source: 'github', githubOwner: 'strait-sdks' });
assert.equal(gh.reactNative, 'github:strait-sdks/strait-sdk-react-native#v0.11.0');
assert.equal(gh.android, 'com.github.strait-sdks:strait-sdk-android:v0.10.0');
assert.equal(gh.android, 'com.github.strait-sdks:strait-sdk-android:v0.10.1');
assert.equal(gh.androidRepository, 'https://jitpack.io');
assert.match(gh.flutterPubspec, /url: https:\/\/github\.com\/strait-sdks\/strait-sdk-flutter\n {6}ref: v0\.10\.1/);
assert.match(gh.flutterPubspec, /url: https:\/\/github\.com\/strait-sdks\/strait-sdk-flutter\n {6}ref: v0\.10\.2/);
const today = installSpecs();
assert.equal(today.reactNative, '@straitlink/react-native@0.11.0', 'npm in registry mode (16 Oct)');
assert.equal(today.flutterPubspec, ' strait_sdk: ^0.10.1', 'pub.dev in registry mode (16 Oct)');
assert.equal(today.android, `com.github.${INSTALL.githubOwner}:strait-sdk-android:v0.10.0`, 'Android stays on JitPack');
assert.equal(today.flutterPubspec, ' strait_sdk: ^0.10.2', 'pub.dev in registry mode (16 Oct)');
assert.equal(today.android, `com.github.${INSTALL.githubOwner}:strait-sdk-android:v0.10.1`, 'Android stays on JitPack');
const reg = installSpecs({ ...INSTALL, source: 'registry' });
assert.equal(reg.reactNative, '@straitlink/react-native@0.11.0');
assert.equal(reg.android, 'in.straitlink:strait-sdk-android:0.10.0');
assert.equal(reg.flutterPubspec, ' strait_sdk: ^0.10.1');
assert.equal(reg.android, 'in.straitlink:strait-sdk-android:0.10.1');
assert.equal(reg.flutterPubspec, ' strait_sdk: ^0.10.2');
assert.equal(reg.androidRepository, null);
assert.equal(VERSIONS.version, '0.11.0', 'Swift tag v0.11.0 (SwiftPM)');
assert.equal(VERSIONS.version, '0.11.1', 'Swift tag v0.11.1 (SwiftPM)');
});

test('the owner is spelled out only in src/install.mjs', () => {
Expand Down
Loading