Skip to content

Commit 11fe6fa

Browse files
committed
chore: reduce npm vulnerability and attack surface across workspace
1 parent 2e3fee9 commit 11fe6fa

52 files changed

Lines changed: 1812 additions & 5068 deletions

Some content is hidden

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

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
- name: Checkout code
2424
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525

26-
- name: Setup Node.js 22.x
26+
- name: Setup Node.js 24.x
2727
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
2828
with:
29-
node-version: 22.x
29+
node-version: 24.x
3030

3131
- name: Install pnpm
3232
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

.github/workflows/lint.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Lint and Type Check
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
merge_group:
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Harden the runner
19+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
20+
with:
21+
egress-policy: audit
22+
23+
- name: Checkout code
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
26+
- name: Setup Node.js 24.x
27+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
28+
with:
29+
node-version: 24.x
30+
31+
- name: Install pnpm
32+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
33+
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Lint
38+
run: pnpm lint
39+
40+
- name: Check types
41+
run: pnpm check-types

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
- name: Install dependencies
3636
run: pnpm install --frozen-lockfile
3737

38+
- name: Lint
39+
run: pnpm lint
40+
41+
- name: Check types
42+
run: pnpm check-types
43+
3844
- name: Build package
3945
run: |
4046
cd packages/react-native

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
- name: Checkout code
2525
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626

27-
- name: Setup Node.js 22.x
27+
- name: Setup Node.js 24.x
2828
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
2929
with:
30-
node-version: 22.x
30+
node-version: 24.x
3131

3232
- name: Install pnpm
3333
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

apps/playground/.eslintrc.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/playground/app.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
"assetBundlePatterns": ["**/*"],
1010
"icon": "./assets/icon.png",
1111
"ios": {
12-
"infoPlist": {
13-
"NSCameraUsageDescription": "Take pictures for certain activities.",
14-
"NSMicrophoneUsageDescription": "Need microphone access for recording videos.",
15-
"NSPhotoLibraryUsageDescription": "Select pictures for certain activities."
16-
},
1712
"supportsTablet": true
1813
},
1914
"jsEngine": "hermes",

apps/playground/package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@
77
"android": "expo start --android",
88
"ios": "expo start --ios",
99
"clean": "rimraf .turbo node_modules .expo",
10-
"build": "expo export --no-bytecode"
10+
"build": "expo export --no-bytecode",
11+
"check-types": "tsc --noEmit"
1112
},
1213
"dependencies": {
1314
"@formbricks/react-native": "workspace:*",
14-
"@react-native-async-storage/async-storage": "2.2.0",
15-
"expo": "54.0.33",
16-
"expo-status-bar": "3.0.9",
15+
"@react-native-async-storage/async-storage": "3.0.2",
16+
"expo": "55.0.9",
17+
"expo-status-bar": "55.0.4",
1718
"react": "19.2.4",
18-
"react-native": "0.84.0",
19-
"react-native-webview": "13.16.0"
19+
"react-native": "0.84.1",
20+
"react-native-webview": "13.16.1"
2021
},
2122
"devDependencies": {
2223
"@babel/core": "7.29.0",
2324
"@types/react": "19.2.14",
24-
"typescript": "5.9.3"
25+
"typescript": "6.0.2"
2526
},
2627
"private": true
2728
}

apps/playground/src/app.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { StatusBar } from "expo-status-bar";
2-
import React, { type JSX } from "react";
3-
import { Button, LogBox, StyleSheet, Text, View } from "react-native";
41
import Formbricks, {
52
logout,
63
setAttribute,
@@ -9,6 +6,9 @@ import Formbricks, {
96
setUserId,
107
track,
118
} from "@formbricks/react-native";
9+
import { StatusBar } from "expo-status-bar";
10+
import type { JSX } from "react";
11+
import { Button, LogBox, StyleSheet, Text, View } from "react-native";
1212

1313
LogBox.ignoreAllLogs();
1414

@@ -74,7 +74,7 @@ export default function App(): JSX.Element {
7474
(error: unknown) => {
7575
// eslint-disable-next-line no-console -- logging is allowed in demo apps
7676
console.error("Error setting user attributes:", error);
77-
}
77+
},
7878
);
7979
}}
8080
/>

biome.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"includes": [
11+
"**",
12+
"!**/coverage",
13+
"!**/dist",
14+
"!**/.expo",
15+
"!**/node_modules"
16+
]
17+
},
18+
"formatter": {
19+
"enabled": true,
20+
"indentStyle": "space"
21+
},
22+
"linter": {
23+
"enabled": true,
24+
"rules": {
25+
"recommended": true
26+
}
27+
},
28+
"javascript": {
29+
"formatter": {
30+
"quoteStyle": "double",
31+
"semicolons": "always"
32+
}
33+
}
34+
}

package.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,20 @@
44
"scripts": {
55
"build": "turbo run build",
66
"dev": "turbo run dev",
7-
"lint": "node scripts/check-exact-deps.mjs && turbo run lint",
8-
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
7+
"lint": "node scripts/check-exact-deps.mjs && biome check .",
8+
"format": "biome format --write .",
99
"check-types": "turbo run check-types",
1010
"test": "turbo run test --no-cache",
1111
"test:coverage": "turbo run test:coverage --no-cache"
1212
},
1313
"devDependencies": {
14-
"prettier": "3.8.1",
15-
"turbo": "2.8.20",
16-
"typescript": "5.9.3",
14+
"@biomejs/biome": "2.4.9",
15+
"turbo": "2.8.21",
16+
"typescript": "6.0.2",
1717
"rimraf": "6.1.3"
1818
},
19-
"packageManager": "pnpm@10.32.1",
19+
"packageManager": "pnpm@10.33.0",
2020
"engines": {
21-
"node": ">=20.19.0"
22-
},
23-
"pnpm": {
24-
"overrides": {
25-
"on-headers": "1.1.0",
26-
"glob": "13.0.4",
27-
"node-forge": "1.3.3",
28-
"js-yaml": "4.1.1",
29-
"tar": "7.5.12"
30-
}
21+
"node": "^20.19.0 || >=22.12.0"
3122
}
3223
}

0 commit comments

Comments
 (0)