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
13 changes: 0 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ jobs:
- name: Typecheck files
run: yarn typecheck

test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup
uses: ./.github/actions/setup

- name: Run unit tests
run: yarn test --maxWorkers=2 --coverage

build-library:
runs-on: ubuntu-latest

Expand Down
17 changes: 5 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,7 @@ To fix formatting errors, run the following:
yarn lint --fix
```

Remember to add tests for your change if possible. Run the unit tests by:

```sh
yarn test
```

To run the E2E tests with [Maestro](https://maestro.mobile.dev/), use:
Remember to add Maestro E2E tests for your change when behavior is user-visible. To run the E2E tests with [Maestro](https://maestro.mobile.dev/), use:

```sh
yarn test:e2e:ios
Expand Down Expand Up @@ -139,13 +133,13 @@ We follow the [conventional commits specification](https://www.conventionalcommi

Our pre-commit hooks verify that your commit message matches this format when committing.

### Linting and tests
### Linting and type checking

[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)

We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
We use [TypeScript](https://www.typescriptlang.org/) for type checking and [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code. User-facing behavior is covered by Maestro E2E tests.

Our pre-commit hooks verify that the linter and tests pass when committing.
Our pre-commit hooks verify that lint and typecheck pass when committing.

### Publishing to npm

Expand All @@ -165,7 +159,6 @@ The `package.json` file contains various scripts for common tasks:
- `yarn prepare`: build the library (required before running any app).
- `yarn typecheck`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
- `yarn example start`: start the Metro server for the example app.
- `yarn example android`: run the example app on Android.
- `yarn example ios`: run the example app on iOS.
Expand All @@ -189,7 +182,7 @@ The `package.json` file contains various scripts for common tasks:
When you're sending a pull request:

- Prefer small pull requests focused on one change.
- Verify that linters and tests are passing.
- Verify that lint and typecheck are passing.
- Review the documentation to make sure it looks good.
- Follow the pull request template when opening a pull request.
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
3 changes: 0 additions & 3 deletions apps/example/jest.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion apps/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@react-native/metro-config": "0.85.3",
"@react-native/typescript-config": "0.85.3",
"@types/react": "^19.2.0",
"react-native-builder-bob": "^0.40.18",
"react-native-builder-bob": "^0.41.0",
"react-native-monorepo-config": "^0.3.3",
"react-native-svg-transformer": "^1.5.3"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/macos-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@react-native/babel-preset": "0.81.2",
"@react-native/metro-config": "0.81.2",
"@types/react": "^19.2.0",
"react-native-builder-bob": "^0.40.18"
"react-native-builder-bob": "^0.41.0"
},
"engines": {
"node": ">= 22.11.0"
Expand Down
54 changes: 22 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"build:wasm": "bash cpp/wasm/build.sh",
"android:build:release": "cd apps/example && npx react-native build-android --mode=release",
"android:test:release": "cd apps/example && yarn android --mode release",
"test": "jest",
"test:e2e:mobile": ".maestro/scripts/run-all-tests.sh",
"test:e2e:android": ".maestro/scripts/run-tests.sh --platform android",
"test:e2e:ios": ".maestro/scripts/run-tests.sh --platform ios",
Expand Down Expand Up @@ -85,32 +84,32 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@commitlint/config-conventional": "^19.8.1",
"@eslint/compat": "^1.3.2",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.35.0",
"@commitlint/config-conventional": "^20.5.0",
"@eslint/compat": "^2.0.3",
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^10.0.1",
"@expo/config-plugins": "^55.0.6",
"@react-native-community/cli": "20.0.1",
"@react-native/babel-preset": "0.84.1",
"@react-native/eslint-config": "0.84.1",
"@release-it/conventional-changelog": "^10.0.1",
"@types/jest": "^29.5.14",
"@react-native-community/cli": "20.1.0",
"@react-native/babel-preset": "0.85.0",
"@react-native/eslint-config": "0.85.0",
"@release-it/conventional-changelog": "^10.0.6",
"@types/node": "^22.0.0",
"@types/react": "^19.2.0",
"clang-format": "^1.8.0",
"commitlint": "^19.8.1",
"del-cli": "^6.0.0",
"eslint": "^9.35.0",
"commitlint": "^20.5.0",
"del-cli": "^7.0.0",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"jest": "^29.7.0",
"lefthook": "^2.0.3",
"prettier": "^3.6.2",
"eslint-plugin-ft-flow": "^3.0.11",
"eslint-plugin-prettier": "^5.5.5",
"lefthook": "^2.1.4",
"prettier": "^3.8.1",
"react": "19.2.3",
"react-native": "0.84.1",
"react-native-builder-bob": "^0.40.18",
"release-it": "^19.0.4",
"turbo": "^2.5.6",
"typescript": "^5.9.2"
"react-native": "0.85.0",
"react-native-builder-bob": "^0.41.0",
"release-it": "^19.2.4",
"turbo": "^2.8.21",
"typescript": "^6.0.2"
},
"peerDependencies": {
"@expo/config-plugins": ">=50.0.0",
Expand All @@ -132,14 +131,6 @@
"apps/web-example"
],
"packageManager": "yarn@4.11.0",
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/apps/example/node_modules",
"<rootDir>/apps/macos-example/node_modules",
"<rootDir>/lib/"
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
Expand Down Expand Up @@ -221,10 +212,9 @@
"languages": "kotlin-objc",
"tools": [
"eslint",
"jest",
"lefthook",
"release-it"
],
"version": "0.57.2"
"version": "0.62.0"
}
}
6 changes: 4 additions & 2 deletions src/EnrichedMarkdownTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ export interface EnrichedMarkdownTextInputInstance {
getCaretRect: () => Promise<CaretRect>;
}

export interface EnrichedMarkdownTextInputProps
extends Omit<ViewProps, 'style' | 'children'> {
export interface EnrichedMarkdownTextInputProps extends Omit<
ViewProps,
'style' | 'children'
> {
ref?: RefObject<EnrichedMarkdownTextInputInstance | null>;
defaultValue?: string;
placeholder?: string;
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/index.test.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/plugin/withIosMath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const withIosMath: ConfigPlugin<{ enableMath?: boolean }> = (

const lines = contents.split('\n');
const filteredLines = lines.filter(
(line) => !line.includes('ENRICHED_MARKDOWN_ENABLE_MATH')
(line: string) => !line.includes('ENRICHED_MARKDOWN_ENABLE_MATH')
);

filteredLines.unshift(IOS_MATH_OPTION);
Expand Down
6 changes: 4 additions & 2 deletions src/types/MarkdownTextProps.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import type {
TaskListItemPressEvent,
} from './events';

export interface EnrichedMarkdownTextProps
extends Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'dir'> {
export interface EnrichedMarkdownTextProps extends Omit<
HTMLAttributes<HTMLDivElement>,
'style' | 'dir'
> {
/**
* Markdown content to render.
* @platform ios, android, web
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"types": ["node"],
"strict": true,
"target": "ESNext",
"verbatimModuleSyntax": true
Expand Down
Loading
Loading