@maplibre/maplibre-react-native
Advanced tools
Comparing version 10.0.0 to 10.0.1
@@ -6,4 +6,5 @@ "use strict"; | ||
}); | ||
exports.withGradleProperties = exports.mergeGradleProperties = exports.getGradleProperties = exports.android = void 0; | ||
exports.withGradleProperties = exports.mergeGradleProperties = exports.getGradleProperties = exports.android = exports.GRADLE_PROPERTIES_PREFIX = void 0; | ||
var _configPlugins = require("@expo/config-plugins"); | ||
const GRADLE_PROPERTIES_PREFIX = exports.GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative."; | ||
const getGradleProperties = props => { | ||
@@ -14,3 +15,3 @@ return Object.entries(props?.android || {}).reduce((properties, [key, value]) => { | ||
type: "property", | ||
key: `org.maplibre.reactnative.${key}`, | ||
key: `${GRADLE_PROPERTIES_PREFIX}${key}`, | ||
value: value.toString() | ||
@@ -24,6 +25,3 @@ }); | ||
const mergeGradleProperties = (oldProperties, newProperties) => { | ||
const newPropertiesKeys = newProperties.map(({ | ||
key | ||
}) => key); | ||
const merged = oldProperties.filter(item => !(item.type === "property" && newPropertiesKeys.includes(item.key))); | ||
const merged = oldProperties.filter(item => !(item.type === "property" && item.key.startsWith(GRADLE_PROPERTIES_PREFIX))); | ||
merged.push(...newProperties); | ||
@@ -30,0 +28,0 @@ return merged; |
"use strict"; | ||
import { withGradleProperties as withGradlePropertiesExpo } from "@expo/config-plugins"; | ||
export const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative."; | ||
export const getGradleProperties = props => { | ||
@@ -9,3 +10,3 @@ return Object.entries(props?.android || {}).reduce((properties, [key, value]) => { | ||
type: "property", | ||
key: `org.maplibre.reactnative.${key}`, | ||
key: `${GRADLE_PROPERTIES_PREFIX}${key}`, | ||
value: value.toString() | ||
@@ -18,6 +19,3 @@ }); | ||
export const mergeGradleProperties = (oldProperties, newProperties) => { | ||
const newPropertiesKeys = newProperties.map(({ | ||
key | ||
}) => key); | ||
const merged = oldProperties.filter(item => !(item.type === "property" && newPropertiesKeys.includes(item.key))); | ||
const merged = oldProperties.filter(item => !(item.type === "property" && item.key.startsWith(GRADLE_PROPERTIES_PREFIX))); | ||
merged.push(...newProperties); | ||
@@ -24,0 +22,0 @@ return merged; |
@@ -9,2 +9,3 @@ import { type ConfigPlugin } from "@expo/config-plugins"; | ||
}; | ||
export declare const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative."; | ||
export declare const getGradleProperties: (props: MapLibrePluginProps) => PropertyItem[]; | ||
@@ -11,0 +12,0 @@ export declare const mergeGradleProperties: (oldProperties: PropertiesItem[], newProperties: PropertyItem[]) => PropertiesItem[]; |
@@ -9,2 +9,3 @@ import { type ConfigPlugin } from "@expo/config-plugins"; | ||
}; | ||
export declare const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative."; | ||
export declare const getGradleProperties: (props: MapLibrePluginProps) => PropertyItem[]; | ||
@@ -11,0 +12,0 @@ export declare const mergeGradleProperties: (oldProperties: PropertiesItem[], newProperties: PropertyItem[]) => PropertiesItem[]; |
{ | ||
"name": "@maplibre/maplibre-react-native", | ||
"description": "React Native library for creating maps with MapLibre Native for Android & iOS", | ||
"version": "10.0.0", | ||
"version": "10.0.1", | ||
"publishConfig": { | ||
@@ -30,3 +30,3 @@ "access": "public", | ||
"lint": "yarn lint:tsc && yarn lint:eslint", | ||
"lint:tsc": "tsc --project ./ && tsc --project ./packages/examples && yarn docs lint:tsc", | ||
"lint:tsc": "tsc --project ./ && tsc --project ./examples/shared && yarn docs lint:tsc", | ||
"lint:eslint": "eslint ./ --max-warnings 0", | ||
@@ -37,8 +37,8 @@ "lint:eslint:fix": "yarn lint:eslint --fix", | ||
"docs": "yarn workspace docs", | ||
"example:react-native": "yarn workspace react-native-app", | ||
"example:expo": "yarn workspace expo-app" | ||
"examples:react-native": "yarn workspace react-native-app", | ||
"examples:expo": "yarn workspace expo-app" | ||
}, | ||
"workspaces": [ | ||
"packages/*", | ||
"docs" | ||
"docs", | ||
"examples/*" | ||
], | ||
@@ -45,0 +45,0 @@ "packageManager": "yarn@4.5.3", |
@@ -7,3 +7,3 @@ [![MapLibre Logo](https://maplibre.org/img/maplibre-logo-big.svg)](https://maplibre.org) | ||
[![Version](https://img.shields.io/npm/v/@maplibre/maplibre-react-native)](https://www.npmjs.com/package/@maplibre/maplibre-react-native) | ||
[![Actions](https://img.shields.io/github/actions/workflow/status/maplibre/maplibre-react-native/review.yml?label=Actions)](https://github.com/maplibre/maplibre-react-native/actions/workflows/review.yml) | ||
[![Actions](https://img.shields.io/github/actions/workflow/status/maplibre/maplibre-react-native/release.yml?label=Actions&branch=main)](https://github.com/maplibre/maplibre-react-native/actions/workflows/release.yml?query=branch:main) | ||
@@ -10,0 +10,0 @@ _React Native library for creating maps |
@@ -15,2 +15,4 @@ import { | ||
export const GRADLE_PROPERTIES_PREFIX = "org.maplibre.reactnative."; | ||
export const getGradleProperties = ( | ||
@@ -24,3 +26,3 @@ props: MapLibrePluginProps, | ||
type: "property", | ||
key: `org.maplibre.reactnative.${key}`, | ||
key: `${GRADLE_PROPERTIES_PREFIX}${key}`, | ||
value: value.toString(), | ||
@@ -40,6 +42,8 @@ }); | ||
): PropertiesItem[] => { | ||
const newPropertiesKeys = newProperties.map(({ key }) => key); | ||
const merged = oldProperties.filter( | ||
(item) => | ||
!(item.type === "property" && newPropertiesKeys.includes(item.key)), | ||
!( | ||
item.type === "property" && | ||
item.key.startsWith(GRADLE_PROPERTIES_PREFIX) | ||
), | ||
); | ||
@@ -46,0 +50,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1963246
33014