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
12 changes: 12 additions & 0 deletions .changeset/curly-tigers-send.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"ferric-cli": minor
---

- Created generate command to generate scaffold project. Replacing ferric-example.
- Add path as arg to build project.
- Fixed cargo build command with correct --release flag.
- Added Cargo.toml optmizations for size.
- Added tests ferric-cli, to build and generate commands.
- Added debug flag as commands logging.
- Replaced eslint since the project lacks formatter and sort organizer, biome is faster and has all three.
- Changed build output to send to dist folder.
5 changes: 1 addition & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
types: [opened, ready_for_review, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -132,9 +132,6 @@ jobs:
- name: Build weak-node-api for all architectures
run: npm run build-weak-node-api -- --android
working-directory: packages/host
- name: Build ferric-example for all architectures
run: npm run build -- --android
working-directory: packages/ferric-example
- name: Run tests (Android)
timeout-minutes: 75
uses: reactivecircus/android-emulator-runner@v2
Expand Down
26 changes: 7 additions & 19 deletions apps/test-app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import React from "react";
import { StyleSheet, View, SafeAreaView } from "react-native";

import { suites as nodeAddonExamplesSuites } from "@react-native-node-api/node-addon-examples";
import {
MochaRemoteProvider,
ConnectionText,
MochaRemoteProvider,
StatusEmoji,
StatusText,
} from "mocha-remote-react-native";

import { suites as nodeAddonExamplesSuites } from "@react-native-node-api/node-addon-examples";
// biome-ignore lint/correctness/noUnusedImports: Keep React
import React from "react";
import { SafeAreaView, StyleSheet, View } from "react-native";

function describeIf(
condition: boolean,
title: string,
fn: (this: Mocha.Suite) => void
fn: (this: Mocha.Suite) => void,
) {
return condition ? describe(title, fn) : describe.skip(title, fn);
}
Expand All @@ -31,7 +30,7 @@ function loadTests({
}: Context) {
describeIf(nodeAddonExamples, "Node Addon Examples", () => {
for (const [suiteName, examples] of Object.entries(
nodeAddonExamplesSuites
nodeAddonExamplesSuites,
)) {
describe(suiteName, () => {
for (const [exampleName, requireExample] of Object.entries(examples)) {
Expand All @@ -45,17 +44,6 @@ function loadTests({
});
}
});

describeIf(ferricExample, "ferric-example", () => {
it("exports a callable sum function", () => {
/* eslint-disable-next-line @typescript-eslint/no-require-imports -- TODO: Determine why a dynamic import doesn't work on Android */
const exampleAddon = require("ferric-example");
const result = exampleAddon.sum(1, 3);
if (result !== 4) {
throw new Error(`Expected 1 + 3 to equal 4, but got ${result}`);
}
});
});
}

export default function App() {
Expand Down
4 changes: 2 additions & 2 deletions apps/test-app/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
presets: ["module:@react-native/babel-preset"],
// plugins: [['module:react-native-node-api/babel-plugin', { stripPathSuffix: true }]],
plugins: ['module:react-native-node-api/babel-plugin'],
plugins: ["module:react-native-node-api/babel-plugin"],
};
1 change: 0 additions & 1 deletion apps/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@types/mocha": "^10.0.10",
"@types/react": "^19.0.0",
"concurrently": "^9.1.2",
"ferric-example": "^0.1.0",
"mocha": "^11.6.0",
"mocha-remote-cli": "^1.13.2",
"mocha-remote-react-native": "^1.13.2",
Expand Down
3 changes: 1 addition & 2 deletions apps/test-app/react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

const project = (() => {
try {
const { configureProjects } = require("react-native-test-app");
Expand All @@ -25,4 +24,4 @@ const project = (() => {

module.exports = {
...(project ? { project } : undefined),
};
};
38 changes: 38 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iff we'd switch linter, it would have to be in a completely separate PR without any added features, and we'd have to bike-shed that for a while on Discord first.

Copy link
Contributor Author

@dougg0k dougg0k Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why?

Because even though Biome is newer, it has already found many lint issues that eslint didnt and fixed them or provided suggestions to the ones it didnt. Project is cleaner with it.

It's just a tool that is and can do more than eslint was doing, not sure why there would be fuss in a project in a migration to it. But I understand it's your company project.

Copy link
Collaborator

@kraenhansen kraenhansen Jul 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why?

I added a few comments here or there, but I won't be able to give a thorough review if your actual changes are interleaved with a ton of changes from replacing the linter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to close the PR then?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to discourage you by blatantly closing the PR - I'll let you decide its faith.

I would love to discuss and merge many of the improvements, if we're able to get them reviewed one-by-one 👍

"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
},
"enabled": true
},
"files": {
"ignoreUnknown": false,
"includes": [
"**",
"!node_modules",
"!.nx/**",
"!**/dist/**",
"!apps/test-app/ios/**",
"!packages/host/hermes/**",
"!packages/node-addon-examples/examples/**"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"vcs": {
"clientKind": "git",
"enabled": false,
"useIgnoreFile": false
}
}
49 changes: 0 additions & 49 deletions eslint.config.js

This file was deleted.

Loading
Loading