Skip to content

Commit

Permalink
feat: expo
Browse files Browse the repository at this point in the history
- expo sdk 49 app
- expo-router v2
- pnpm monorepo
- gitHub actions for EAS
  • Loading branch information
tyrauber committed Nov 13, 2023
1 parent 3206881 commit 982ba7a
Show file tree
Hide file tree
Showing 207 changed files with 3,727 additions and 3,894 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ module.exports = {
parserOptions: {
project: [
'./tsconfig.json',
'./example/tsconfig.json',
'./examples/expo-app/tsconfig.json',
'./plugin/src/__tests__/tsconfig.eslint.json',
],
// Lint with Type Information
Expand Down
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Added `your feature` that allows ...
<!-- Check completed item: [X] -->

- [ ] I have tested this on a device/simulator for each compatible OS
- [ ] I formatted JS and TS files with running `yarn lint:fix` in the root folder
- [ ] I have run tests via `yarn test` in the root folder
- [ ] I updated the documentation with running `yarn generate` in the root folder
- [ ] I formatted JS and TS files with running `pnpm lint:fix` in the root folder
- [ ] I have run tests via `pnpm test` in the root folder
- [ ] I updated the documentation with running `pnpm generate` in the root folder
- [ ] I mentioned this change in `CHANGELOG.md`
- [ ] I updated the typings files (`index.d.ts`)
- [ ] I added/updated a sample (`/example`)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
distribution: 'zulu'
java-version: '11'

- run: yarn install --immutable --check-cache
- run: pnpm install --immutable --check-cache
working-directory: example

- run: ./gradlew assemble
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ios-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
with:
node-version: ${{ inputs.NVMRC }}

- name: Install Yarn Dependencies
run: yarn install --immutable --check-cache
- name: Install pnpm Dependencies
run: pnpm install --immutable --check-cache

- name: Install Pod Dependencies
run: cd ios && pod --version && pod install
Expand All @@ -37,7 +37,7 @@ jobs:
brew install applesimutils
- name: Build for detox
run: yarn detox build
run: pnpm detox build

- name: Test with detox
run: yarn detox test --debug-synchronization 200
run: pnpm detox test --debug-synchronization 200
16 changes: 8 additions & 8 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
node-version: ${{ steps.nvm.outputs.NVMRC }}

- name: Install
run: yarn install --immutable --check-cache
run: pnpm install --immutable --check-cache

- name: Lint
run: yarn lint
run: pnpm lint

- name: Test
run: yarn unittest
run: pnpm unittest

- name: Generate
run: yarn generate
run: pnpm generate

- name: Pack (to ensure the plugin builds)
run: yarn pack
run: pnpm pack

outputs:
NVMRC: ${{ steps.nvm.outputs.NVMRC }}
Expand Down Expand Up @@ -64,12 +64,12 @@ jobs:
registry-url: https://registry.npmjs.org/

- name: Install
run: yarn install --immutable --check-cache
run: pnpm install --immutable --check-cache

- name: Setup .yarnrc.yml
run: yarn config set npmAuthToken $NPM_AUTH_TOKEN
run: pnpm config set npmAuthToken $NPM_AUTH_TOKEN
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }}

- name: Publish
run: yarn npm publish
run: pnpm npm publish
4 changes: 2 additions & 2 deletions __tests__/components/BackgroundLayer.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import BackgroundLayer from '../../javascript/components/BackgroundLayer';

import React from 'react';
import {render} from '@testing-library/react-native';

import BackgroundLayer from '../../javascript/components/BackgroundLayer';

describe('BackgroundLayer', () => {
test('renders correctly with default props', () => {
const {queryByTestId} = render(
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/Callout.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Callout from '../../javascript/components/Callout';

import React from 'react';
import {render} from '@testing-library/react-native';
import {Text, View} from 'react-native';

import Callout from '../../javascript/components/Callout';

describe('Callout', () => {
test('renders with custom title', () => {
const testTitle = 'test title';
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/Camera.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Camera from '../../javascript/components/Camera';

import React from 'react';
import {render} from '@testing-library/react-native';

import Camera from '../../javascript/components/Camera';

const cameraWithoutFollowDefault = {
...Camera.defaultProps,
animationDuration: 2000,
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/CircleLayer.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import CircleLayer from '../../javascript/components/CircleLayer';

import React from 'react';
import {render} from '@testing-library/react-native';

import CircleLayer from '../../javascript/components/CircleLayer';

describe('CircleLayer', () => {
test('renders correctly with default props', () => {
const {queryByTestId} = render(<CircleLayer id="requiredCircleLayerID" />);
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/HeatmapLayer.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import HeatmapLayer from '../../javascript/components/HeatmapLayer';

import React from 'react';
import {render} from '@testing-library/react-native';

import HeatmapLayer from '../../javascript/components/HeatmapLayer';

describe('HeatmapLayer', () => {
test('renders correctly with default props', () => {
const {UNSAFE_getByType} = render(
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/Light.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Light from '../../javascript/components/Light';

import React from 'react';
import {render} from '@testing-library/react-native';

import Light from '../../javascript/components/Light';

describe('Light', () => {
test('renders correctly', () => {
const {queryByTestId} = render(<Light />);
Expand Down
4 changes: 2 additions & 2 deletions __tests__/components/MapView.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import MapView from '../../javascript/components/MapView';

import * as React from 'react';
import {render} from '@testing-library/react-native';

import MapView from '../../javascript/components/MapView';

describe('MapView', () => {
test('renders with testID', () => {
const expectedTestId = 'im used for identification in tests';
Expand Down
6 changes: 3 additions & 3 deletions __tests__/components/Style.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import {render} from '@testing-library/react-native';
import React from 'react';

import VectorSource from '../../javascript/components/VectorSource';
import RasterSource from '../../javascript/components/RasterSource';
import ImageSource from '../../javascript/components/ImageSource';
Expand All @@ -12,9 +15,6 @@ import FillLayer from '../../javascript/components/FillLayer';
import FillExtrusionLayer from '../../javascript/components/FillExtrusionLayer';
import BackgroundLayer from '../../javascript/components/BackgroundLayer';

import {render} from '@testing-library/react-native';
import React from 'react';

describe('Style', () => {
test('renders vectory source correctly', () => {
const vectorSource = {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/components/SymbolLayer.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import {render} from '@testing-library/react-native';

import SymbolLayer, {
NATIVE_MODULE_NAME,
} from '../../javascript/components/SymbolLayer';

import React from 'react';
import {render} from '@testing-library/react-native';

describe('SymbolLayer', () => {
test('renders correctly with default props', () => {
const {UNSAFE_getByType} = render(
Expand Down
6 changes: 3 additions & 3 deletions __tests__/components/UserLocation.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {render, fireEvent} from '@testing-library/react-native';
import React from 'react';

import UserLocation from '../../javascript/components/UserLocation';
import ShapeSource from '../../javascript/components/ShapeSource';
import CircleLayer from '../../javascript/components/CircleLayer';
import locationManager from '../../javascript/modules/location/locationManager';

import {render, fireEvent} from '@testing-library/react-native';
import React from 'react';

const position = {
coords: {
accuracy: 9.977999687194824,
Expand Down
4 changes: 2 additions & 2 deletions __tests__/modules/location/locationManager.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {NativeModules} from 'react-native';

import LocationManager, {
LocationModuleEventEmitter,
} from '../../../javascript/modules/location/locationManager';

import {NativeModules} from 'react-native';

const MapLibreGL = NativeModules.MGLModule;
const MapLibreGLLocationManager = NativeModules.MGLLocationModule;

Expand Down
4 changes: 2 additions & 2 deletions __tests__/modules/offline/OfflineCreatePackOptions.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import OfflineCreatePackOptions from '../../../javascript/modules/offline/OfflineCreatePackOptions';

import {featureCollection, point} from '@turf/helpers';

import OfflineCreatePackOptions from '../../../javascript/modules/offline/OfflineCreatePackOptions';

describe('OfflineCreatePackOptions', () => {
const options = {
name: 'test',
Expand Down
4 changes: 2 additions & 2 deletions __tests__/modules/offline/OfflinePack.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import OfflinePack from '../../../javascript/modules/offline/OfflinePack';

import {NativeModules} from 'react-native';

import OfflinePack from '../../../javascript/modules/offline/OfflinePack';

describe('OfflinePack', () => {
const fakeNativePack = {
bounds: [
Expand Down
4 changes: 2 additions & 2 deletions __tests__/modules/offline/offlineManager.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {NativeModules, Platform} from 'react-native';

import MapLibreGL from '../../../javascript';
import {OfflineModuleEventEmitter} from '../../../javascript/modules/offline/offlineManager';

import {NativeModules, Platform} from 'react-native';

describe('offlineManager', () => {
const packOptions = {
name: 'test',
Expand Down
4 changes: 2 additions & 2 deletions __tests__/modules/snapshot/SnapshotOptions.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {NativeModules} from 'react-native';

import SnapshotOptions from '../../../javascript/modules/snapshot/SnapshotOptions';
import {
makePoint,
makeFeatureCollection,
} from '../../../javascript/utils/geoUtils';

import {NativeModules} from 'react-native';

describe('SnapshotOptions', () => {
it('should throw error if no centerCoordinate or bounds are provided', () => {
expect(() => new SnapshotOptions()).toThrow();
Expand Down
8 changes: 4 additions & 4 deletions __tests__/utils/animated/AnimatedCoordinatesArray.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import AnimatedCoordinatesArray from '../../../javascript/utils/animated/AnimatedCoordinatesArray';
import AnimatedShape from '../../../javascript/utils/animated/AnimatedShape';
import ShapeSource from '../../../javascript/components/ShapeSource';

import FakeTimers from '@sinonjs/fake-timers';
import {Animated, Easing} from 'react-native';
import TestRenderer from 'react-test-renderer';
import React from 'react';

import ShapeSource from '../../../javascript/components/ShapeSource';
import AnimatedShape from '../../../javascript/utils/animated/AnimatedShape';
import AnimatedCoordinatesArray from '../../../javascript/utils/animated/AnimatedCoordinatesArray';

let clock = null;
let oldNodeEnv = null;

Expand Down
6 changes: 3 additions & 3 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ either `yarn` or `npm` (pick one).

```shell
# install with Yarn
yarn add @maplibre/maplibre-react-native
pnpm add @maplibre/maplibre-react-native

```

Expand Down Expand Up @@ -97,7 +97,7 @@ export default class App extends Component {

```shell
# Run with yarn
yarn run ios
pnpm run ios

# or Run with NPM
npm run ios
Expand All @@ -107,7 +107,7 @@ npm run ios

```shell
# Run with yarn
yarn run android
pnpm run android

# or Run with NPM
npm run android
Expand Down
75 changes: 0 additions & 75 deletions example/.flowconfig

This file was deleted.

3 changes: 0 additions & 3 deletions example/.gitattributes

This file was deleted.

Loading

0 comments on commit 982ba7a

Please sign in to comment.