Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json",
"baseBranch": "main",
"access": "public"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'rozenite': minor
"rozenite": minor
---

Plugin templates were updated to use updated dependencies.
16 changes: 2 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,5 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Set shas
uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v.4.3.3

- name: Typecheck
run: pnpm nx affected -t typecheck

- name: Build
run: pnpm nx affected -t build

- name: Lint
run: pnpm nx affected -t lint

- name: Test
run: pnpm nx affected -t test
- name: Validate
run: pnpm turbo run typecheck build lint test --affected
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Thumbs.db
.nx/workspace-data
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md
.turbo

vite.config.*.timestamp*
vitest.config.*.timestamp*
Expand Down Expand Up @@ -122,4 +123,4 @@ yarn-error.log
.vscode/

# Expo
.expo/
.expo/
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All development is done directly on GitHub, and all work is public. Contributors
3. Run `pnpm build:all` to build all packages.
4. Do the changes you want and test them out in the playground app (`apps/playground`) before sending a pull request.

This repository uses Nx to maintain the monorepository. I strongly advise you to briefly go through the [Nx documentation](https://nx.dev/docs/getting-started/intro) to make sure you understand the basic rules of working with this technology.
This repository uses Turborepo to maintain the monorepository and Changesets for version plans.

### Testing your changes

Expand Down Expand Up @@ -65,7 +65,7 @@ When developing plugins, you can test them in the playground app using developme
```
2. **Set development mode**: Set the `ROZENITE_DEV_MODE` environment variable to your plugin name:
```bash
ROZENITE_DEV_MODE=my-plugin-name pnpm nx start playground
ROZENITE_DEV_MODE=my-plugin-name pnpm start:playground
```
3. **Test your plugin**: Your plugin will be loaded in development mode and you can test it in the DevTools interface.

Expand All @@ -88,4 +88,4 @@ The documentation is a part of the website, which is stored in the `website` dir

## License

By contributing to Rozenite, you agree that your contributions will be licensed under its **MIT** license.
By contributing to Rozenite, you agree that your contributions will be licensed under its **MIT** license.
16 changes: 0 additions & 16 deletions apps/playground/.babelrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
module.exports = function (api) {
api.cache(true);

if (
process.env.NX_TASK_TARGET_TARGET === 'build' ||
process.env.NX_TASK_TARGET_TARGET?.includes('storybook')
) {
return {
presets: [
[
'@nx/react/babel',
{
runtime: 'automatic',
},
],
],
};
}

return {
presets: [
['module:@react-native/babel-preset', { useTransformReactJSX: true }],
Expand Down
4 changes: 2 additions & 2 deletions apps/playground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

This app uses React Native Community CLI, so make sure you have your [environment setup to build native apps](https://reactnative.dev/docs/environment-setup).

You can then use Xcode/Android Studio/Gradle to build applications, or run `pnpm nx start playground` and `pnpm nx run-ios playground`/`pnpm nx run-android playground` to start the development server and run applications in development mode.
You can then use Xcode/Android Studio/Gradle to build applications, or run `pnpm start:playground` and `pnpm start:playground:ios`/`pnpm start:playground:android` to start the development server and run applications in development mode.

You can also start the development server from the root workspace by executing `pnpm start:playground`.
You can also start the development server from the root workspace by executing `pnpm start:playground`.
44 changes: 18 additions & 26 deletions apps/playground/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { withNxMetro } = require('@nx/react-native');
const path = require('node:path');
const { makeMetroConfig } = require('@rnx-kit/metro-config');
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const { composeMetroConfigTransformers } = require('@rozenite/tools');
const { withRozenite } = require('@rozenite/metro');
Expand Down Expand Up @@ -38,28 +39,19 @@ const customConfig = {
server: {},
};

module.exports = composeMetroConfigTransformers(
[
withNxMetro,
{
// Change this to true to see debugging info.
// Useful if you have issues resolving modules
debug: false,
// all the file extensions used for imports other than 'ts', 'tsx', 'js', 'jsx', 'json'
extensions: [],
// Specify folders to watch, in addition to Nx defaults (workspace libraries and node_modules)
// watchFolders: ["../../packages/expo-atlas-plugin"],
},
],
[
withRozenite,
{
enabled: true,
enhanceMetroConfig: composeMetroConfigTransformers(
withRozeniteExpoAtlasPlugin,
withRozeniteRequireProfiler,
withRozeniteReduxDevTools,
),
},
],
)(mergeConfig(defaultConfig, customConfig));
const baseConfig = makeMetroConfig(mergeConfig(defaultConfig, customConfig), {
projectRoot: __dirname,
workspaceRoot: path.resolve(__dirname, '../..'),
});

module.exports = composeMetroConfigTransformers([
withRozenite,
{
enabled: true,
enhanceMetroConfig: composeMetroConfigTransformers(
withRozeniteExpoAtlasPlugin,
withRozeniteRequireProfiler,
withRozeniteReduxDevTools,
),
},
])(baseConfig);
27 changes: 24 additions & 3 deletions apps/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "@rozenite/playground",
"version": "0.0.1",
"scripts": {
"start": "react-native start"
"start": "react-native start",
"ios": "react-native run-ios",
"android": "react-native run-android",
"typecheck": "tsc -p tsconfig.app.json --noEmit",
"lint": "eslint ."
},
"dependencies": {
"@react-navigation/bottom-tabs": "^7.4.7",
Expand All @@ -22,21 +26,38 @@
"@tanstack/react-query": "^5.81.5",
"expo-atlas": "^0.4.0",
"expo-atlas-without-expo": "^1.0.1",
"react": "*",
"react-native": "*",
"react": "~18.3.1",
"react-dom": "~18.3.1",
"react-native": "0.76.0",
"react-native-get-random-values": "^1.11.0",
"react-native-mmkv": "^3.3.0",
"react-native-performance": "5.1.4",
"react-native-safe-area-context": "^5.5.2",
"react-native-screens": "~4.4.0",
"react-native-sse": "^1.2.1",
"react-native-svg": "~15.8.0",
"react-native-svg-web": "~1.0.9",
"react-redux": "^9.2.0",
"zustand": "^5.0.6"
},
"devDependencies": {
"@babel/runtime": "*",
"@rnx-kit/metro-config": "^2.2.3",
"@react-native-community/cli": "~15.0.1",
"@react-native-community/cli-platform-android": "~15.0.1",
"@react-native-community/cli-platform-ios": "~15.0.1",
"@react-native/babel-preset": "~0.76.3",
"@react-native/codegen": "0.76.0",
"@react-native/gradle-plugin": "0.76.0",
"@react-native/metro-config": "~0.76.3",
"@rozenite/metro": "workspace:*",
"@testing-library/jest-native": "~5.4.3",
"@testing-library/react-native": "~12.9.0",
"@types/react": "~18.3.23",
"@types/react-dom": "~18.3.1",
"jest-react-native": "18.0.0",
"react-native-svg-transformer": "~1.5.0",
"react-test-renderer": "~18.3.1",
"rozenite": "workspace:*"
},
"private": true
Expand Down
7 changes: 7 additions & 0 deletions apps/playground/src/types/svg.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare module '*.svg' {
import * as React from 'react';
import { SvgProps } from 'react-native-svg';

const content: React.FC<SvgProps>;
export default content;
}
2 changes: 1 addition & 1 deletion apps/playground/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo",
"noEmit": true
},
"files": ["../../node_modules/@nx/react-native/typings/svg.d.ts"],
"files": ["src/types/svg.d.ts"],
"exclude": [
"out-tsc",
"dist",
Expand Down
42 changes: 15 additions & 27 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import nx from '@nx/eslint-plugin';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';

export default [
...nx.configs['flat/base'],
...nx.configs['flat/typescript'],
...nx.configs['flat/javascript'],
js.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
'**/dist',
Expand All @@ -12,27 +12,6 @@ export default [
'**/build',
],
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: [
'^.*/eslint(\\.base)?\\.config\\.[cm]?[jt]s$',
'^@rozenite/.*-plugin$',
],
depConstraints: [
{
sourceTag: '*',
onlyDependOnLibsWithTags: ['*'],
},
],
},
],
},
},
{
files: [
'**/*.ts',
Expand All @@ -44,7 +23,16 @@ export default [
'**/*.cjs',
'**/*.mjs',
],
// Override or add rules here
rules: {},
languageOptions: {
globals: {
require: 'readonly',
module: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
},
},
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
];
94 changes: 0 additions & 94 deletions nx.json

This file was deleted.

Loading
Loading