From f3d1a696229276ee96fa1f1af36286be08c4ea21 Mon Sep 17 00:00:00 2001 From: hydromoll Date: Thu, 4 Jun 2026 13:20:50 +0300 Subject: [PATCH] =?UTF-8?q?fix(=F0=9F=8D=8F/=F0=9F=A4=96):=20rename=20nati?= =?UTF-8?q?ve=20component=20specs=20to=20singular=20suffix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Components/Circle.tsx | 2 +- src/Components/Marker.tsx | 2 +- src/Components/Polygon.tsx | 2 +- src/Components/Polyline.tsx | 2 +- ...s.ts => YamapCircleViewNativeComponent.ts} | 0 ...s.ts => YamapMarkerViewNativeComponent.ts} | 0 ....ts => YamapPolygonViewNativeComponent.ts} | 0 ...ts => YamapPolylineViewNativeComponent.ts} | 0 src/__tests__/index.test.tsx | 34 +++++++++---------- 9 files changed, 21 insertions(+), 21 deletions(-) rename src/{YamapCircleViewNativeComponents.ts => YamapCircleViewNativeComponent.ts} (100%) rename src/{YamapMarkerViewNativeComponents.ts => YamapMarkerViewNativeComponent.ts} (100%) rename src/{YamapPolygonViewNativeComponents.ts => YamapPolygonViewNativeComponent.ts} (100%) rename src/{YamapPolylineViewNativeComponents.ts => YamapPolylineViewNativeComponent.ts} (100%) diff --git a/src/Components/Circle.tsx b/src/Components/Circle.tsx index caecfb0..bb597e6 100644 --- a/src/Components/Circle.tsx +++ b/src/Components/Circle.tsx @@ -1,7 +1,7 @@ import React from 'react'; import type { CircleProps, Point } from '../@types'; import { type NativeSyntheticEvent } from 'react-native'; -import YamapLiteCircleView from '../YamapCircleViewNativeComponents'; +import YamapLiteCircleView from '../YamapCircleViewNativeComponent'; export const Circle: React.FC = ({ onPress, diff --git a/src/Components/Marker.tsx b/src/Components/Marker.tsx index 3330e2e..f8e9276 100644 --- a/src/Components/Marker.tsx +++ b/src/Components/Marker.tsx @@ -7,7 +7,7 @@ import { } from 'react'; import type { MarkerProps, MarkerRef, Point } from '../@types'; import { Image, type NativeSyntheticEvent } from 'react-native'; -import YamapLiteMarkerView from '../YamapMarkerViewNativeComponents'; +import YamapLiteMarkerView from '../YamapMarkerViewNativeComponent'; export const Marker = forwardRef( ({ onPress, source, zIndex, point: pointProp, ...props }, ref) => { diff --git a/src/Components/Polygon.tsx b/src/Components/Polygon.tsx index e1fd148..5b30e35 100644 --- a/src/Components/Polygon.tsx +++ b/src/Components/Polygon.tsx @@ -1,7 +1,7 @@ import React from 'react'; import type { Point, PolygonProps } from '../@types'; import { type NativeSyntheticEvent } from 'react-native'; -import YamapLitePolygonView from '../YamapPolygonViewNativeComponents'; +import YamapLitePolygonView from '../YamapPolygonViewNativeComponent'; export const Polygon: React.FC = ({ onPress, diff --git a/src/Components/Polyline.tsx b/src/Components/Polyline.tsx index e78acf2..6a433d7 100644 --- a/src/Components/Polyline.tsx +++ b/src/Components/Polyline.tsx @@ -1,7 +1,7 @@ import React from 'react'; import type { Point, PolylineProps } from '../@types'; import { type NativeSyntheticEvent } from 'react-native'; -import YamapLitePolylineView from '../YamapPolylineViewNativeComponents'; +import YamapLitePolylineView from '../YamapPolylineViewNativeComponent'; export const Polyline: React.FC = ({ onPress, diff --git a/src/YamapCircleViewNativeComponents.ts b/src/YamapCircleViewNativeComponent.ts similarity index 100% rename from src/YamapCircleViewNativeComponents.ts rename to src/YamapCircleViewNativeComponent.ts diff --git a/src/YamapMarkerViewNativeComponents.ts b/src/YamapMarkerViewNativeComponent.ts similarity index 100% rename from src/YamapMarkerViewNativeComponents.ts rename to src/YamapMarkerViewNativeComponent.ts diff --git a/src/YamapPolygonViewNativeComponents.ts b/src/YamapPolygonViewNativeComponent.ts similarity index 100% rename from src/YamapPolygonViewNativeComponents.ts rename to src/YamapPolygonViewNativeComponent.ts diff --git a/src/YamapPolylineViewNativeComponents.ts b/src/YamapPolylineViewNativeComponent.ts similarity index 100% rename from src/YamapPolylineViewNativeComponents.ts rename to src/YamapPolylineViewNativeComponent.ts diff --git a/src/__tests__/index.test.tsx b/src/__tests__/index.test.tsx index 9af777d..f7eb537 100644 --- a/src/__tests__/index.test.tsx +++ b/src/__tests__/index.test.tsx @@ -661,7 +661,7 @@ describe('Marker', () => { ); }); const native = instance.root.findByType( - require('../YamapMarkerViewNativeComponents').default + require('../YamapMarkerViewNativeComponent').default ); act(() => { native.props.onMarkerPress({ nativeEvent: { lat: 55.75, lon: 37.61 } }); @@ -675,7 +675,7 @@ describe('Marker', () => { instance = renderer.create(); }); const native = instance.root.findByType( - require('../YamapMarkerViewNativeComponents').default + require('../YamapMarkerViewNativeComponent').default ); expect(() => { act(() => { @@ -695,7 +695,7 @@ describe('Marker', () => { ); }); const native = instance.root.findByType( - require('../YamapMarkerViewNativeComponents').default + require('../YamapMarkerViewNativeComponent').default ); expect(typeof native.props.source).toBe('string'); }); @@ -705,7 +705,7 @@ describe('Marker', () => { act(() => { instance = renderer.create(); }); - const native = findNative(instance, '../YamapMarkerViewNativeComponents'); + const native = findNative(instance, '../YamapMarkerViewNativeComponent'); expect(native.props.source).toBe(''); }); @@ -719,11 +719,11 @@ describe('Marker', () => { withoutZ = renderer.create(); }); expect( - findNative(withZ, '../YamapMarkerViewNativeComponents').props.zInd + findNative(withZ, '../YamapMarkerViewNativeComponent').props.zInd ).toBe(8); // Marker defaults zInd to 1 when zIndex is omitted (zIndex ?? 1) expect( - findNative(withoutZ, '../YamapMarkerViewNativeComponents').props.zInd + findNative(withoutZ, '../YamapMarkerViewNativeComponent').props.zInd ).toBe(1); }); @@ -741,7 +741,7 @@ describe('Marker', () => { }); const native = instance.root.findByType( - require('../YamapMarkerViewNativeComponents').default + require('../YamapMarkerViewNativeComponent').default ); expect(native.props.point).toEqual(newPoint); }); @@ -765,7 +765,7 @@ describe('Marker', () => { }); const native = instance.root.findByType( - require('../YamapMarkerViewNativeComponents').default + require('../YamapMarkerViewNativeComponent').default ); expect(native.props.point).toEqual({ lat: 60.0, lon: 31.0 }); }); @@ -808,7 +808,7 @@ describe('Circle', () => { act(() => { instance = renderer.create(); }); - const native = findNative(instance, '../YamapCircleViewNativeComponents'); + const native = findNative(instance, '../YamapCircleViewNativeComponent'); expect(native.props.zInd).toBe(7); }); @@ -819,7 +819,7 @@ describe('Circle', () => { instance = renderer.create(); }); const native = instance.root.findByType( - require('../YamapCircleViewNativeComponents').default + require('../YamapCircleViewNativeComponent').default ); act(() => { native.props.onCirclePress({ nativeEvent: { lat: 55.75, lon: 37.61 } }); @@ -833,7 +833,7 @@ describe('Circle', () => { instance = renderer.create(); }); const native = instance.root.findByType( - require('../YamapCircleViewNativeComponents').default + require('../YamapCircleViewNativeComponent').default ); expect(() => { act(() => { @@ -878,7 +878,7 @@ describe('Polygon', () => { act(() => { instance = renderer.create(); }); - const native = findNative(instance, '../YamapPolygonViewNativeComponents'); + const native = findNative(instance, '../YamapPolygonViewNativeComponent'); expect(native.props.zInd).toBe(9); }); @@ -889,7 +889,7 @@ describe('Polygon', () => { instance = renderer.create(); }); const native = instance.root.findByType( - require('../YamapPolygonViewNativeComponents').default + require('../YamapPolygonViewNativeComponent').default ); act(() => { native.props.onPolygonPress({ nativeEvent: { lat: 55.75, lon: 37.61 } }); @@ -903,7 +903,7 @@ describe('Polygon', () => { instance = renderer.create(); }); const native = instance.root.findByType( - require('../YamapPolygonViewNativeComponents').default + require('../YamapPolygonViewNativeComponent').default ); expect(() => { act(() => { @@ -956,7 +956,7 @@ describe('Polyline', () => { act(() => { instance = renderer.create(); }); - const native = findNative(instance, '../YamapPolylineViewNativeComponents'); + const native = findNative(instance, '../YamapPolylineViewNativeComponent'); expect(native.props.zInd).toBe(5); }); @@ -967,7 +967,7 @@ describe('Polyline', () => { instance = renderer.create(); }); const native = instance.root.findByType( - require('../YamapPolylineViewNativeComponents').default + require('../YamapPolylineViewNativeComponent').default ); act(() => { native.props.onPolylinePress({ nativeEvent: { lat: 55.75, lon: 37.62 } }); @@ -981,7 +981,7 @@ describe('Polyline', () => { instance = renderer.create(); }); const native = instance.root.findByType( - require('../YamapPolylineViewNativeComponents').default + require('../YamapPolylineViewNativeComponent').default ); expect(() => { act(() => {