Skip to content

Commit 9d22b8f

Browse files
committed
Merge branch 'dob/modelConfig' into feat/dob/aiTracking
2 parents 898e61d + f95775b commit 9d22b8f

File tree

429 files changed

+17832
-4391
lines changed

Some content is hidden

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

429 files changed

+17832
-4391
lines changed

.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,38 @@ module.exports = {
4747
'jest/no-focused-tests': 'error',
4848
'jest/no-identical-title': 'error',
4949
'jest/valid-expect': 'error',
50+
'no-underscore-dangle': ['error', { allowAfterThis: true }],
51+
'@typescript-eslint/naming-convention': [
52+
'error',
53+
{
54+
selector: ['method'],
55+
format: ['camelCase'],
56+
leadingUnderscore: 'forbid',
57+
},
58+
{
59+
selector: ['method'],
60+
format: ['camelCase'],
61+
modifiers: ['private'],
62+
leadingUnderscore: 'require',
63+
},
64+
{
65+
selector: ['classProperty', 'parameterProperty'],
66+
format: ['camelCase'],
67+
leadingUnderscore: 'forbid',
68+
},
69+
{
70+
selector: ['classProperty', 'parameterProperty'],
71+
modifiers: ['static'],
72+
format: ['PascalCase'],
73+
leadingUnderscore: 'forbid',
74+
},
75+
{
76+
selector: ['classProperty', 'parameterProperty'],
77+
modifiers: ['private'],
78+
format: ['camelCase'],
79+
leadingUnderscore: 'require',
80+
},
81+
],
5082
},
5183
globals: {
5284
BigInt: 'readonly',

.github/workflows/browser.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212

1313
jobs:
1414
build-test-browser:
15+
permissions:
16+
pull-requests: write
1517
runs-on: ubuntu-latest
1618

1719
strategy:
@@ -31,3 +33,12 @@ jobs:
3133
with:
3234
workspace_name: '@launchdarkly/js-client-sdk'
3335
workspace_path: packages/sdk/browser
36+
- name: Check package size
37+
if: github.event_name == 'pull_request' && matrix.version == '21'
38+
uses: ./actions/package-size
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
target_file: 'packages/sdk/browser/dist/index.js'
42+
package_name: '@launchdarkly/js-client-sdk'
43+
pr_number: ${{ github.event.number }}
44+
size_limit: 21000

.github/workflows/common.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ jobs:
2525
with:
2626
workspace_name: '@launchdarkly/js-sdk-common'
2727
workspace_path: packages/shared/common
28+
- name: Check package size
29+
if: github.event_name == 'pull_request'
30+
uses: ./actions/package-size
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
target_file: 'packages/shared/common/dist/esm/index.mjs'
34+
package_name: '@launchdarkly/js-sdk-common'
35+
pr_number: ${{ github.event.number }}
36+
size_limit: 21000

.github/workflows/mocks.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: sdk/react-native/example
2+
3+
# The example builds independently of react-native because of the duration of the build.
4+
# We limit it to only build under specific circumstances.
5+
# Additionally this does allow for scheduled builds of just the example, to handle changes in expo,
6+
# should they be desired.
7+
8+
on:
9+
push:
10+
branches: [main, 'feat/**']
11+
paths-ignore:
12+
- '**.md' #Do not need to run CI for markdown changes.
13+
pull_request:
14+
branches: [main, 'feat/**']
15+
paths:
16+
- 'packages/shared/common/**'
17+
- 'packages/shared/sdk-client/**'
18+
- 'packages/sdk/react-native/**'
19+
20+
jobs:
21+
detox-android:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
id-token: write
25+
contents: read
26+
defaults:
27+
run:
28+
working-directory: packages/sdk/react-native/example
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
35+
- name: Install deps
36+
run: yarn workspaces focus
37+
- name: Build
38+
run: yarn workspaces foreach -pR --topological-dev --from 'react-native-example' run build
39+
40+
- uses: ./actions/release-secrets
41+
name: 'Get mobile key'
42+
with:
43+
aws_assume_role: ${{ vars.AWS_ROLE_ARN_EXAMPLES }}
44+
ssm_parameter_pairs: '/sdk/common/hello-apps/mobile-key = MOBILE_KEY,
45+
/sdk/common/hello-apps/boolean-flag-key = LAUNCHDARKLY_FLAG_KEY'
46+
47+
- name: Create .env file.
48+
run: echo "MOBILE_KEY=$MOBILE_KEY" > .env
49+
50+
- name: Enable KVM group perms (for performance)
51+
run: |
52+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
53+
sudo udevadm control --reload-rules
54+
sudo udevadm trigger --name-match=kvm
55+
56+
- name: Expo Prebuild
57+
run: npx expo prebuild
58+
59+
# Java setup is after checkout and expo prebuild so that it can locate the
60+
# gradle configuration.
61+
- name: Setup Java
62+
uses: actions/setup-java@v4
63+
with:
64+
distribution: temurin
65+
java-version: 17
66+
cache: 'gradle'
67+
68+
- name: Detox build
69+
run: yarn detox build --configuration android.emu.release
70+
71+
- name: Get android emulator device name
72+
id: device
73+
run: node -e "console.log('AVD_NAME=' + require('./.detoxrc').devices.emulator.device.avdName)" >> $GITHUB_OUTPUT
74+
75+
- name: Make space for the emulator.
76+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
77+
with:
78+
android: false # We need android.
79+
80+
- name: Detox test
81+
uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915
82+
with:
83+
api-level: 31
84+
arch: x86_64
85+
avd-name: ${{ steps.device.outputs.AVD_NAME }}
86+
working-directory: packages/sdk/react-native/example
87+
script: yarn detox test --configuration android.emu.release --headless --record-logs all
88+
89+
- name: Upload artifacts
90+
if: always()
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: detox-artifacts
94+
path: packages/sdk/react-native/example/artifacts

.github/workflows/react-native.yml

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -22,65 +22,3 @@ jobs:
2222
with:
2323
workspace_name: '@launchdarkly/react-native-client-sdk'
2424
workspace_path: packages/sdk/react-native
25-
detox-ios:
26-
# TODO: disable detox for now because it's unstable.
27-
if: false
28-
# macos-latest uses macos-12 and we need macos-14 to get xcode 15.
29-
# https://github.com/actions/runner-images/blob/main/README.md
30-
runs-on: macos-14
31-
permissions:
32-
id-token: write
33-
contents: read
34-
defaults:
35-
run:
36-
working-directory: packages/sdk/react-native/example
37-
steps:
38-
- uses: actions/checkout@v4
39-
- name: Setup Node.js
40-
uses: actions/setup-node@v4
41-
- name: Install deps
42-
run: yarn workspaces focus
43-
- name: Build
44-
run: yarn workspaces foreach -pR --topological-dev --from 'react-native-example' run build
45-
- name: Install macOS dependencies
46-
run: |
47-
brew tap wix/brew
48-
brew install applesimutils
49-
env:
50-
HOMEBREW_NO_AUTO_UPDATE: 1
51-
HOMEBREW_NO_INSTALL_CLEANUP: 1
52-
53-
- name: Cache Detox build
54-
id: cache-detox-build
55-
uses: actions/cache@v4
56-
with:
57-
path: ios/build
58-
key: ${{ runner.os }}-detox-build
59-
restore-keys: |
60-
${{ runner.os }}-detox-build
61-
62-
- name: Detox rebuild framework cache
63-
run: yarn detox rebuild-framework-cache
64-
65-
- uses: ./actions/release-secrets
66-
name: 'Get mobile key'
67-
with:
68-
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
69-
ssm_parameter_pairs: '/sdk/detox/mobile-key = MOBILE_KEY'
70-
71-
- name: Set mobile key
72-
run: echo "MOBILE_KEY=$MOBILE_KEY" > .env
73-
74-
- name: Expo prebuild
75-
# HACK: Deleting ios/.xcode.env.local is needed to solve an xcode build issue with rn 0.73
76-
# https://github.com/facebook/react-native/issues/42112#issuecomment-1884536225
77-
run: |
78-
export NO_FLIPPER=1
79-
yarn expo-prebuild
80-
rm -rf ./ios/.xcode.env.local
81-
82-
- name: Detox build
83-
run: yarn detox build --configuration ios.sim.release
84-
85-
- name: Detox test
86-
run: yarn detox test --configuration ios.sim.release --cleanup --headless --record-logs all --take-screenshots failing

0 commit comments

Comments
 (0)