Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress authored Dec 19, 2024
2 parents 8739751 + ad56dd6 commit 44a6611
Show file tree
Hide file tree
Showing 35 changed files with 291 additions and 172 deletions.
13 changes: 13 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Security Policy

## Supported Versions

Security updates are applied only to the latest release.

## Reporting a Vulnerability

If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.

Please disclose it at [security advisory](https://github.com/visgl/react-map-gl/security/advisories/new).

This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ on:

jobs:
release-notes:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

if: github.repository_owner == 'visgl'

permissions:
contents: write

env:
ADMIN_TOKEN: ${{ secrets.ADMIN_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2.1.1

- name: Get git tags (https://github.com/actions/checkout/issues/206)
run: git fetch --tags -f
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '16.x'
node-version: '18.x'

- name: Publish release
run: |
Expand All @@ -33,4 +33,4 @@ jobs:
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/visgl/react-map-gl/releases \
-d "${body}" \
-H "Authorization: token ${ADMIN_TOKEN}"
-H "Authorization: token ${GITHUB_TOKEN}"
15 changes: 7 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,27 @@ on:

jobs:
test-node:
runs-on: ubuntu-latest

env:
VITE_MAPBOX_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN_CI }}
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2.1.1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '16.x'
node-version: '18.x'

- name: Install dependencies
run: |
yarn bootstrap
- name: Run tests
env:
VITE_MAPBOX_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN_CI }}
run: |
yarn test ci
- name: Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # v1.2.5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
55 changes: 32 additions & 23 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,51 @@ on:
- '*-release'

jobs:
publish-website:
runs-on: ubuntu-latest
check_branch:
runs-on: ubuntu-22.04
outputs:
should_deploy: ${{ endsWith(github.ref, steps.get_version.outputs.latest) }}

if: github.repository_owner == 'visgl'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Get version
id: get_version
run: |
LATEST=$(npm show react-map-gl version | grep -o -E "^[0-9]+\.[0-9]+")
echo "latest=${LATEST}-release" >> "$GITHUB_OUTPUT"
deploy:
runs-on: ubuntu-22.04
needs: check_branch

permissions:
contents: write

env:
MapboxAccessToken: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
if: ${{ github.repository_owner == 'visgl' && needs.check_branch.outputs.should_deploy }}

steps:
- uses: actions/checkout@v2.1.1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
token: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '16.x'
node-version: '18.x'

- name: Get version
id: get-version
run: LATEST=$(npm show react-map-gl version | grep -o -E "^[0-9]+\.[0-9]+") && echo "::set-output name=latest::/${LATEST}-release"

- name: Check version
if: ${{ !endsWith(github.ref, steps.get-version.outputs.latest) }}
- name: Install dependencies
run: |
echo "Website is only published from the latest release branch"
yarn bootstrap
(cd website && yarn)
- name: Build website
if: ${{ endsWith(github.ref, steps.get-version.outputs.latest) }}
run: |
yarn bootstrap
cd website
yarn
yarn build
env:
MapboxAccessToken: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
run: (cd website && yarn build)

- name: Deploy
if: ${{ endsWith(github.ref, steps.get-version.outputs.latest) }}
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@132898c54c57c7cc6b80eb3a89968de8fc283505 # 3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
Expand Down
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code of Conduct

react-map-gl is an [OpenJS Foundation](https://openjsf.org/) project. Please be mindful of and adhere to the OpenJS Foundation's [Code of Conduct](https://github.com/openjs-foundation/cross-project-council/blob/main/CODE_OF_CONDUCT.md) when contributing to react-map-gl.
8 changes: 2 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ react-map-gl follows the [Semantic Versioning](https://semver.org/) guidelines.

## Community Governance

vis.gl is part of the [Urban Computing Foundation](https://uc.foundation/). See the organization's [Technical Charter](https://github.com/visgl/tsc/blob/master/Technical%20Charter.md).
vis.gl is part of the [OpenJS Foundation](https://openjsf.org/). See the organization's [Technical Charter](https://github.com/visgl/tsc/blob/master/Technical%20Charter.md).

### Technical Steering Committee

Expand All @@ -84,8 +84,4 @@ Maintainers of react-map-gl have commit access to this GitHub repository, and ta
If you are interested in becoming a maintainer, read the [governance guidelines](https://github.com/visgl/tsc/blob/master/governance.md).

The vis.gl TSC meets monthly and publishes meeting notes via a [mailing list](https://lists.uc.foundation/g/visgl).
This mailing list can also be utilized to reach out to the TSC.

## Code of Conduct

Please be mindful of and adhere to the Linux Foundation's [Code of Conduct](https://lfprojects.org/policies/code-of-conduct/) when contributing to react-map-gl.
This mailing list can also be utilized to reach out to the TSC.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2020 Urban Computing Foundation
Copyright Vis.gl contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<h1 align="center">react-map-gl | <a href="https://visgl.github.io/react-map-gl">Docs</a></h1>

`react-map-gl` is a suite of [React](http://facebook.github.io/react/) components designed to provide a React API for [mapbox-gl](https://github.com/mapbox/mapbox-gl-js) or [maplibre-gl](https://maplibre.org/maplibre-gl-js-docs/api/). More information in the online documentation.
`react-map-gl` is a suite of [React](http://facebook.github.io/react/) components designed to provide a React API for [mapbox-gl](https://github.com/mapbox/mapbox-gl-js) or [maplibre-gl](https://maplibre.org/maplibre-gl-js/docs/). More information in the online documentation.

See our [Design Philosophy](docs/README.md#design-philosophy).

Expand Down Expand Up @@ -63,7 +63,7 @@ See [contribution guide](/CONTRIBUTING.md).

### Attributions

react-map-gl is part of vis.gl, an [Urban Computing Foundation](https://uc.foundation) project.
react-map-gl is part of vis.gl, an [OpenJS Foundation](https://openjsf.org) project.

Development is also supported by

Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
</p>

react-map-gl is a suite of [React](http://facebook.github.io/react/) components for
[mapbox-gl](https://github.com/mapbox/mapbox-gl-js), [maplibre-gl](https://maplibre.org/maplibre-gl-js-docs/api/) or compatible libraries.
[mapbox-gl](https://github.com/mapbox/mapbox-gl-js), [maplibre-gl](https://maplibre.org/maplibre-gl-js/docs/) or compatible libraries.

| Library | Description |
| --- | --- |
| [MapLibre](https://github.com/MapLibre/maplibre-gl-js) | An open fork of mapbox-gl v1, that can be used without a mapbox token. |
| [MapLibre GL JS](https://github.com/MapLibre/maplibre-gl-js) | An open fork of mapbox-gl v1, that can be used without a mapbox token. |
| [Mapbox GL JS v1](https://github.com/mapbox/mapbox-gl-js) | The previous version of mapbox GL JS. This version is free open source and can be used with non-mapbox basemaps without a mapbox token. |
| [Mapbox GL JS v2](https://github.com/mapbox/mapbox-gl-js) | The latest version of Mapbox GL JS. Note that version 2 is not free open source, and a mapbox token is required and billable events are generated even if you do not use mapbox hosted basemaps. |
| Other mapbox-gl forks | It may be possible to use react-map-gl with other mapbox forks, but this is not a supported use case. Minor PRs to enable other forks to be used may be accepted. |
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/attribution-control.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AttributionControl

React component that wraps the base library's `AttributionControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#attributioncontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js-docs/api/markers/#attributioncontrol)).
React component that wraps the base library's `AttributionControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#attributioncontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js/docs/API/classes/AttributionControl/)).


import Tabs from '@theme/Tabs';
Expand Down Expand Up @@ -68,7 +68,7 @@ CSS style override that applies to the control's container.

The properties in this section are not reactive. They are only used when the component first mounts.

Any options supported by the `AttributionControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#attributioncontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js-docs/api/markers/#attributioncontrol)), such as
Any options supported by the `AttributionControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#attributioncontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js/docs/API/classes/AttributionControl/)), such as

- `compact`
- `customAttribution`
Expand Down
10 changes: 5 additions & 5 deletions docs/api-reference/fullscreen-control.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FullscreenControl

React component that wraps the base library's `FullscreenControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#fullscreencontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js-docs/api/markers/#fullscreencontrol)).
React component that wraps the base library's `FullscreenControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#fullscreencontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js/docs/API/classes/FullscreenControl/)).


import Tabs from '@theme/Tabs';
Expand Down Expand Up @@ -56,7 +56,7 @@ function App() {

### Reactive Properties

#### `style`: CSSProperties {#style}
#### `style`: CSSProperties {#style}

CSS style override that applies to the control's container.

Expand All @@ -65,11 +65,11 @@ CSS style override that applies to the control's container.

The properties in this section are not reactive. They are only used when the component first mounts.

#### `containerId`: string {#containerid}
#### `containerId`: string {#containerid}

Id of the DOM element which should be made full screen. By default, the map container element will be made full screen.

#### `position`: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' {#position}
#### `position`: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' {#position}

Default: `'top-right'`

Expand All @@ -78,4 +78,4 @@ Placement of the control relative to the map.

## Source

[fullscreen-control.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/fullscreen-control.ts)
[fullscreen-control.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/fullscreen-control.tsx)
4 changes: 2 additions & 2 deletions docs/api-reference/geolocate-control.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GeolocateControl

React component that wraps the base library's `GeolocateControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#geolocatecontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js-docs/api/markers/#geolocatecontrol)).
React component that wraps the base library's `GeolocateControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#geolocatecontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js/docs/API/classes/GeolocateControl/)).


import Tabs from '@theme/Tabs';
Expand Down Expand Up @@ -88,7 +88,7 @@ Called when the GeolocateControl changes to the background state.

The properties in this section are not reactive. They are only used when the component first mounts.

Any options supported by the `GeolocateControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#geolocatecontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js-docs/api/markers/#geolocatecontrol)), such as
Any options supported by the `GeolocateControl` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#geolocatecontrol) | [Maplibre](https://maplibre.org/maplibre-gl-js/docs/API/classes/GeolocateControl/)), such as

- `positionOptions`
- `fitBoundsOptions`
Expand Down
Loading

0 comments on commit 44a6611

Please sign in to comment.