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
2 changes: 1 addition & 1 deletion apps/tester-app/__tests__/bundle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('bundle command', () => {
webpackConfig: path.join(__dirname, 'configs', configFile),
};

// @ts-ignore
// @ts-expect-error
await bundleCommand.func([''], config, args);

const files = await globby(['**/*'], { cwd: TMP_DIR, dot: true });
Expand Down
2 changes: 1 addition & 1 deletion apps/tester-app/__tests__/start.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('start command', () => {
webpackConfig: path.join(__dirname, 'configs', configFile),
};

// @ts-ignore
// @ts-expect-error
const { stop } = await startCommand.func([], config, args);
stopServer = stop;
});
Expand Down
4 changes: 2 additions & 2 deletions apps/tester-app/src/nativewind/ui/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type VariantProps, cva } from 'class-variance-authority';
import { cva, type VariantProps } from 'class-variance-authority';
import * as React from 'react';
import { Pressable } from 'react-native';
import { TextClassContext } from './Text';
Expand Down Expand Up @@ -88,5 +88,5 @@ const Button = React.forwardRef<
});
Button.displayName = 'Button';

export { Button, buttonTextVariants, buttonVariants };
export type { ButtonProps };
export { Button, buttonTextVariants, buttonVariants };
2 changes: 1 addition & 1 deletion apps/tester-app/src/ui/Section.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StyleSheet, View } from 'react-native';
import { Text } from './Text';
import { Colors } from './colors';
import { Text } from './Text';
import type { WithChildren } from './types';

type SectionProps = WithChildren<{
Expand Down
2 changes: 1 addition & 1 deletion apps/tester-federation-v2/configs/rspack.host-app.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Repack from '@callstack/repack';
import rspack from '@rspack/core';
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
import reactPkg from 'react/package.json' with { type: 'json' };
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
import pkg from '../package.json' with { type: 'json' };

export default Repack.defineRspackConfig((env) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/tester-federation-v2/configs/rspack.mini-app.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Repack from '@callstack/repack';
import rspack from '@rspack/core';
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
import reactPkg from 'react/package.json' with { type: 'json' };
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
import pkg from '../package.json' with { type: 'json' };

export default Repack.defineRspackConfig((env) => {
Expand Down
6 changes: 3 additions & 3 deletions apps/tester-federation-v2/configs/webpack.host-app.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check
import * as Repack from '@callstack/repack';
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
import reactPkg from 'react/package.json' with { type: 'json' };
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
import webpack from 'webpack';
import pkg from '../package.json' with { type: 'json' };

Expand Down Expand Up @@ -30,7 +30,7 @@ export default Repack.defineWebpackConfig((env) => {
],
},
plugins: [
// @ts-ignore
// @ts-expect-error
new Repack.RepackPlugin({
extraChunks: [
{
Expand All @@ -40,7 +40,7 @@ export default Repack.defineWebpackConfig((env) => {
},
],
}),
// @ts-ignore
// @ts-expect-error
new Repack.plugins.ModuleFederationPluginV2({
name: 'HostApp',
filename: 'HostApp.container.js.bundle',
Expand Down
6 changes: 3 additions & 3 deletions apps/tester-federation-v2/configs/webpack.mini-app.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Repack from '@callstack/repack';
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
import reactPkg from 'react/package.json' with { type: 'json' };
import reactNativePkg from 'react-native/package.json' with { type: 'json' };
import webpack from 'webpack';
import pkg from '../package.json' with { type: 'json' };

Expand Down Expand Up @@ -29,7 +29,7 @@ export default Repack.defineWebpackConfig((env) => {
],
},
plugins: [
// @ts-ignore
// @ts-expect-error
new Repack.RepackPlugin({
extraChunks: [
{
Expand All @@ -39,7 +39,7 @@ export default Repack.defineWebpackConfig((env) => {
},
],
}),
// @ts-ignore
// @ts-expect-error
new Repack.plugins.ModuleFederationPluginV2({
name: 'MiniApp',
filename: 'MiniApp.container.js.bundle',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
type NativeStackNavigationProp,
createNativeStackNavigator,
type NativeStackNavigationProp,
} from '@react-navigation/native-stack';
import { StyleSheet } from 'react-native';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
type NativeStackNavigationProp,
createNativeStackNavigator,
type NativeStackNavigationProp,
} from '@react-navigation/native-stack';
import { StyleSheet } from 'react-native';

Expand Down
2 changes: 1 addition & 1 deletion apps/tester-federation/configs/rspack.host-app.mts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default Repack.defineRspackConfig((env) => {
};

if (process.env.RSDOCTOR) {
// @ts-ignore
// @ts-expect-error
config.plugins?.push(new RsdoctorRspackPlugin());
}

Expand Down
2 changes: 1 addition & 1 deletion apps/tester-federation/configs/rspack.mini-app.mts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default Repack.defineRspackConfig((env) => {
};

if (process.env.RSDOCTOR) {
// @ts-ignore
// @ts-expect-error
config.plugins?.push(new RsdoctorRspackPlugin());
}

Expand Down
4 changes: 2 additions & 2 deletions apps/tester-federation/configs/webpack.host-app.mts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default Repack.defineWebpackConfig((env) => {
],
},
plugins: [
// @ts-ignore
// @ts-expect-error
new Repack.RepackPlugin({
extraChunks: [
{
Expand All @@ -37,7 +37,7 @@ export default Repack.defineWebpackConfig((env) => {
},
],
}),
// @ts-ignore
// @ts-expect-error
new Repack.plugins.ModuleFederationPluginV1({
name: 'HostApp',
shared: {
Expand Down
4 changes: 2 additions & 2 deletions apps/tester-federation/configs/webpack.mini-app.mts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default Repack.defineWebpackConfig((env) => {
],
},
plugins: [
// @ts-ignore
// @ts-expect-error
new Repack.RepackPlugin({
extraChunks: [
{
Expand All @@ -37,7 +37,7 @@ export default Repack.defineWebpackConfig((env) => {
},
],
}),
// @ts-ignore
// @ts-expect-error
new Repack.plugins.ModuleFederationPluginV1({
name: 'MiniApp',
filename: 'MiniApp.container.bundle',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
type NativeStackNavigationProp,
createNativeStackNavigator,
type NativeStackNavigationProp,
} from '@react-navigation/native-stack';
import { StyleSheet } from 'react-native';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
type NativeStackNavigationProp,
createNativeStackNavigator,
type NativeStackNavigationProp,
} from '@react-navigation/native-stack';
import { StyleSheet } from 'react-native';

Expand Down
71 changes: 47 additions & 24 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.5.6/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"defaultBranch": "main",
"useIgnoreFile": true
},
"files": { "ignoreUnknown": false, "ignore": [] },
"files": {
"ignoreUnknown": false,
"includes": [
"**",
// ESM redirect stubs in a commonjs package - biome 2 infers module type
// from package.json and refuses to parse them as modules
"!packages/repack/client/*.js",
"!packages/repack/mf/*.js"
]
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
Expand All @@ -17,22 +26,27 @@
"lineWidth": 80,
"attributePosition": "auto",
"bracketSpacing": true,
"ignore": [
"pnpm-lock.yaml",
"tests/metro-compat/**/__tests__/**",
"website/src/2.x/**",
"website/src/3.x/**",
"website/src/4.x/**"
"includes": [
"**",
"!**/pnpm-lock.yaml",
"!**/tests/metro-compat/**/__tests__/**",
"!**/website/src/2.x/**",
"!**/website/src/3.x/**",
"!**/website/src/4.x/**"
]
},
"organizeImports": {
"enabled": true,
"ignore": ["templates/*", "tests/metro-compat/**/__tests__/**"]
"assist": {
"actions": { "source": { "organizeImports": "on" } },
"includes": [
"**",
"!**/templates/**/*",
"!**/tests/metro-compat/**/__tests__/**"
]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"preset": "recommended",
"complexity": {
"noBannedTypes": "off",
"noForEach": "off"
Expand All @@ -55,7 +69,11 @@
"noConfusingVoidType": "off"
}
},
"ignore": ["templates/*", "tests/metro-compat/**/__tests__/**"]
"includes": [
"**",
"!**/templates/**/*",
"!**/tests/metro-compat/**/__tests__/**"
]
},
"javascript": {
"formatter": {
Expand All @@ -72,35 +90,40 @@
},
"overrides": [
{
"include": ["packages/**/*"],
"includes": ["**/packages/**/*"],
"linter": {
"rules": {
"correctness": {
"useImportExtensions": {
"level": "error",
"options": {
"suggestedExtensions": {
"ts": {
"module": "js",
"component": "js"
}
}
"forceJsExtensions": true
}
}
}
}
}
},
{
"include": ["**/*.d.ts"],
"linter": { "rules": { "style": { "noVar": "off" } } }
// static SVG assets don't need accessibility titles
"includes": ["**/*.svg"],
"linter": { "rules": { "a11y": { "noSvgWithoutTitle": "off" } } }
},
{
// tailwind at-rules (@tailwind, @apply, etc.)
"includes": ["**/*.css"],
"linter": { "rules": { "suspicious": { "noUnknownAtRules": "off" } } }
},
{
"includes": ["**/*.d.ts"],
"linter": { "rules": { "suspicious": { "noVar": "off" } } }
},
{
"include": ["website/**/*.css"],
"includes": ["**/website/**/*.css"],
"formatter": { "lineWidth": 120 }
},
{
"include": ["packages/repack/src/**/implementation/**"],
"includes": ["**/packages/repack/src/**/implementation/**"],
"linter": { "enabled": false }
}
]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@babel/preset-env": "^7.29.7",
"@babel/preset-typescript": "^7.29.7",
"@babel/runtime": "^7.29.7",
"@biomejs/biome": "^1.9.4",
"@biomejs/biome": "^2.5.6",
"@changesets/changelog-github": "^0.7.0",
"@changesets/cli": "^2.31.1",
"husky": "^9.1.6",
Expand Down
13 changes: 11 additions & 2 deletions packages/dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@
".": "./dist/index.js",
"./package.json": "./package.json"
},
"files": ["dist", "static"],
"files": [
"dist",
"static"
],
"homepage": "https://github.com/callstack/repack",
"repository": {
"type": "git",
"url": "https://github.com/callstack/repack.git"
},
"keywords": ["react-native", "repack", "re.pack", "server", "dev-server"],
"keywords": [
"react-native",
"repack",
"re.pack",
"server",
"dev-server"
],
"author": "zamotany <zamotany.oss@gmail.com>",
"engines": {
"node": ">=18"
Expand Down
1 change: 0 additions & 1 deletion packages/dev-server/src/createServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { normalizeOptions } from './utils/normalizeOptions.js';
* @returns `start` and `stop` functions as well as an underlying Fastify `instance`.
*/
export async function createServer(config: Server.Config) {
// biome-ignore lint/style/useConst: needed in fastify constructor
let delegate: Server.Delegate;

const options = normalizeOptions(config.options);
Expand Down
3 changes: 1 addition & 2 deletions packages/dev-server/src/plugins/compiler/compilerPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { FastifyInstance } from 'fastify';
import fastifyPlugin from 'fastify-plugin';
import type { Server } from '../../types.js';
import type { SendProgress } from '../../types.js';
import type { SendProgress, Server } from '../../types.js';

async function compilerPlugin(
instance: FastifyInstance,
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-server/src/plugins/symbolicate/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { default } from './sybmolicatePlugin.js';
export * from './Symbolicator.js';
export { default } from './sybmolicatePlugin.js';
export * from './types.js';
Loading
Loading