Skip to content
Closed
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
9 changes: 8 additions & 1 deletion .github/workflows/changelog-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ on:
jobs:
generate_changelog_preview:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 24.x ]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v2
with:
ref: develop
Expand Down Expand Up @@ -45,7 +52,7 @@ jobs:

echo "Changelog file ready! Setting up outputs"
CHANGELOG_PREVIEW=$(cat NEXT_RELEASE_CHANGELOG.md)

CHANGELOG_PREVIEW_ESCAPED="${CHANGELOG_PREVIEW//'%'/'%25'}"
CHANGELOG_PREVIEW_ESCAPED="${CHANGELOG_PREVIEW_ESCAPED//$'\n'/'%0A'}"
CHANGELOG_PREVIEW_ESCAPED="${CHANGELOG_PREVIEW_ESCAPED//$'\r'/'%0D'}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
node-version: [24.x]
steps:
- uses: actions/checkout@v3
with:
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/next-release.yml

This file was deleted.

46 changes: 34 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,60 @@ on:
push:
branches:
- main
- develop

permissions:
id-token: write # for OIDC / npm provenance if you use it
actions: write # if you dispatch other workflows
contents: write # commits / tags / merge-back

jobs:
publish-release:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
node-version: [24.x]

steps:
- uses: actions/checkout@v2
with:
# pulls all commits (needed for semantic release to correctly version)
fetch-depth: '0'
# pulls all tags (needed for semantic release to correctly version)
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
fetch-depth: "0"

- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- name: Prepare git
run: |
git config --global user.name 'stream-ci-bot'
git config --global user.name 'stream-ci-bot'
git config --global user.email 'stream-bot@getstream.io'

- name: Install && Build - SDK and Sample App
uses: ./.github/actions/install-and-build-sdk

- name: Lint
run: yarn lerna-workspaces run lint
- name: Publish Release

- name: Test
if: github.ref == 'refs/heads/develop'
run: yarn test:coverage

- name: Publish Next Release (develop)
if: github.ref == 'refs/heads/develop'
run: |
GITHUB_SHORT_SHA="$(git rev-parse --short $GITHUB_SHA)" yarn release-next

- name: Publish Release (main)
if: github.ref == 'refs/heads/main'
run: yarn release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Merge back changes

- name: Merge back changes (main -> develop)
if: github.ref == 'refs/heads/main'
run: |
git stash
git checkout develop
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/sample-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ jobs:
build_and_deploy_ios_testflight_qa:
name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/develop' }}
runs-on: [macos-15]
strategy:
matrix:
node-version: [ 24.x ]
steps:
- name: Connect Bot
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
Expand Down Expand Up @@ -53,7 +60,14 @@ jobs:
build_and_deploy_android_s3:
name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 24.x ]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdk-size-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22.x
node-version: 24.x
cache: 'yarn'

- name: Run SDK Size Metrics
Expand Down
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ nmHoistingLimits: workspaces

nodeLinker: node-modules

npmPublishProvenance: true

yarnPath: .yarn/releases/yarn-1.22.22.cjs
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"dotenv": "^10.0.0",
"execa": "^5.1.1",
"husky": "^6.0.0",
"lerna": "^4.0.0",
"prettier": "^3.5.1",
"semantic-release": "^19.0.5",
"semantic-release": "^25.0.2",
"uglify-js": "^3.19.2"
},
"husky": {
Expand Down
5 changes: 5 additions & 0 deletions package/expo-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"company": "Stream.io Inc",
"name": "Stream.io Inc"
},
"repository": {
"type": "git",
"url": "https://github.com/GetStream/stream-chat-react-native.git",
"directory": "package/expo-package"
},
"license": "SEE LICENSE IN LICENSE",
"main": "src/index.js",
"types": "types/index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions package/expo-package/src/optionalDependencies/Sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ class ExpoAudioSoundAdapter {

// eslint-disable-next-line require-await
loadAsync = async (initialStatus) => {
// We have to subscribe as early as possible so that we know the initial status(durarion, etc.) of the audio.
this.subscribeStatusEventListener();
this.initialShouldCorrectPitch = initialStatus.shouldCorrectPitch;
this.initialPitchCorrectionQuality = initialStatus.pitchCorrectionQuality;
};
Expand Down Expand Up @@ -136,8 +138,7 @@ class ExpoAudioSoundAdapter {
};

// eslint-disable-next-line require-await
setPositionAsync: SoundReturnType['setPositionAsync'] = async (milliseconds) => {
const seconds = milliseconds / 1000;
setPositionAsync: SoundReturnType['setPositionAsync'] = async (seconds) => {
this.player.seekTo(seconds);
};

Expand Down
16 changes: 0 additions & 16 deletions package/i18next-parser.config.js

This file was deleted.

40 changes: 40 additions & 0 deletions package/i18next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { defineConfig } from 'i18next-cli';

export default defineConfig({
"locales": [
"en",
"es",
"fr",
"he",
"hi",
"it",
"ja",
"ko",
"nl",
"pt-br",
"ru",
"tr"
],
"extract": {
"input": [
"./src/**/*.{tsx,ts}"
],
"output": "src/i18n/{{language}}.json",
"defaultNS": "translation",
"keySeparator": false,
"nsSeparator": false,
"functions": [
"t",
"*.t"
],
"transComponents": [
"Trans"
]
},
"types": {
"input": [
"locales/{{language}}/{{namespace}}.json"
],
"output": "src/types/i18next.d.ts"
}
});
5 changes: 5 additions & 0 deletions package/native-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"company": "Stream.io Inc",
"name": "Stream.io Inc"
},
"repository": {
"type": "git",
"url": "https://github.com/GetStream/stream-chat-react-native.git",
"directory": "package/native-package"
},
"files": [
"src",
"types",
Expand Down
3 changes: 3 additions & 0 deletions package/native-package/src/optionalDependencies/Audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ class _Audio {
resumePlayer = async () => {
await audioRecorderPlayer.resumePlayer();
};
seekToPlayer = async (positionInMillis: number) => {
await audioRecorderPlayer.seekToPlayer(positionInMillis);
};
startPlayer = async (uri, _, onPlaybackStatusUpdate) => {
try {
const playback = await audioRecorderPlayer.startPlayer(uri);
Expand Down
9 changes: 5 additions & 4 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"repository": {
"type": "git",
"url": "https://github.com/GetStream/stream-chat-react-native.git"
"url": "https://github.com/GetStream/stream-chat-react-native.git",
"directory": "package"
},
"license": "SEE LICENSE IN LICENSE",
"main": "lib/commonjs/index.js",
Expand All @@ -24,7 +25,7 @@
"scripts": {
"install-all": "(yarn install --force && (cd native-package && yarn install --force) && (cd expo-package && yarn install --force))",
"build": "rimraf lib && yarn run --silent build-translations && bob build && yarn run --silent copy-translations",
"build-translations": "i18next",
"build-translations": "i18next-cli sync",
"copy-translations": "echo '\u001b[34mℹ\u001b[0m Copying translation files to \u001b[34mlib/typescript/i18n\u001b[0m' && cp -R -f ./src/i18n ./lib/typescript/i18n && echo '\u001b[32m✓\u001b[0m Done Copying Translations'",
"eslint": "eslint 'src/**/*.{js,md,ts,jsx,tsx}' --max-warnings 0",
"lint": "prettier --ignore-path ../.prettierignore --list-different 'src/**/*.{js,ts,tsx,md,json}' eslint.config.mjs ../.prettierrc babel.config.js && eslint 'src/**/*.{js,ts,tsx,md}' --max-warnings 0 && yarn run validate-translations",
Expand Down Expand Up @@ -112,11 +113,11 @@
"@babel/core": "^7.27.4",
"@babel/runtime": "^7.27.6",
"@op-engineering/op-sqlite": "^14.0.3",
"@shopify/flash-list": "^2.1.0",
"@react-native-community/eslint-config": "3.2.0",
"@react-native-community/eslint-plugin": "1.3.0",
"@react-native-community/netinfo": "^11.4.1",
"@react-native/babel-preset": "0.79.3",
"@shopify/flash-list": "^2.1.0",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "13.2.0",
"@types/better-sqlite3": "^7.6.13",
Expand Down Expand Up @@ -145,7 +146,7 @@
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-native": "^5.0.0",
"i18next-parser": "^9.3.0",
"i18next-cli": "^1.31.0",
"jest": "^30.0.0",
"moment-timezone": "^0.6.0",
"prettier": "^3.5.3",
Expand Down
Loading
Loading