Skip to content

Commit 37164a1

Browse files
committed
v5.0.0-rc.1
1 parent 6d253ed commit 37164a1

File tree

16 files changed

+834
-186
lines changed

16 files changed

+834
-186
lines changed
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Bug report in v5
3+
about: Report a bug in v5
4+
---
5+
6+
## Bug report in v5
7+
8+
**Before** opening an issue, make sure to read the [contributing guide](https://github.com/PaulLeCam/react-leaflet/blob/master/CONTRIBUTING.md) and understand this is a bug tracker, not a support platform.
9+
10+
Please make sure to check the following boxes before submitting an issue.\
11+
**Issues opened without using this template will be closed unless they have a good reason not to follow this template.**
12+
13+
- [ ] All peer dependencies are installed: React, ReactDOM and Leaflet.
14+
- [ ] Using the latest RC version of React and ReactDOM v19.
15+
- [ ] Using the supported version of Leaflet (v1.9.0 minimum) and its corresponding CSS file is loaded.
16+
- [ ] Using the [latest v5 RC version of React-Leaflet](https://github.com/PaulLeCam/react-leaflet/releases).
17+
- [ ] The issue has not already been reported.
18+
- [ ] Make sure you have followed the [quick start guide](https://leafletjs.com/examples/quick-start.html) for Leaflet.
19+
- [ ] Make sure you have fully read the [documentation](https://react-leaflet.js.org/docs/start-introduction) and that you understand the [limitations](https://react-leaflet.js.org/docs/start-introduction#limitations).
20+
21+
### Expected behavior
22+
23+
Please describe.
24+
25+
### Actual behavior
26+
27+
Please describe.
28+
29+
### Steps to reproduce
30+
31+
Please provide the simplest example possible to reproduce the issue, based on [this StackBlitz](https://stackblitz.com/edit/react-leaflet-v5?file=src/App.tsx).

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules
2+
lib
3+
coverage
24
.turbo
35
.vercel

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## v5.0.0-rc.1 (2024-05-24)
2+
3+
### Breaking changes
4+
5+
- React v19 is now required as peer dependency.
6+
- Removed `LeafletProvider` component from the core package.
7+
18
## v4.2.1 (2023-02-28)
29

310
Fixed bounds update in `ImageOverlay`

biome.json

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
3-
"organizeImports": {
4-
"enabled": true
5-
},
6-
"formatter": {
2+
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"formatter": {
77
"enabled": true,
88
"formatWithErrors": false,
99
"ignore": [],
1010
"attributePosition": "auto",
1111
"indentStyle": "space",
1212
"indentWidth": 2,
1313
"lineWidth": 80
14-
},
15-
"javascript": {
14+
},
15+
"javascript": {
1616
"formatter": {
1717
"arrowParentheses": "always",
1818
"bracketSameLine": true,
1919
"bracketSpacing": true,
2020
"jsxQuoteStyle": "double",
2121
"quoteProperties": "asNeeded",
22-
"quoteStyle": "single",
22+
"quoteStyle": "single",
2323
"semicolons": "asNeeded",
2424
"trailingComma": "all"
2525
}
2626
},
27-
"linter": {
28-
"enabled": true,
29-
"ignore": ["lib/**", "__tests__/**"],
30-
"rules": {
31-
"recommended": true
32-
}
33-
}
27+
"linter": {
28+
"enabled": true,
29+
"ignore": ["__tests__/**"],
30+
"rules": {
31+
"recommended": true
32+
}
33+
},
34+
"vcs": {
35+
"enabled": true,
36+
"clientKind": "git",
37+
"useIgnoreFile": true
38+
}
3439
}

example/App.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react'
2+
import { MapContainer, Marker, Popup, TileLayer } from 'react-leaflet'
3+
4+
const position = [51.505, -0.09]
5+
6+
export default function App() {
7+
return (
8+
<MapContainer center={position} zoom={13} scrollWheelZoom={false}>
9+
<TileLayer
10+
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
11+
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
12+
/>
13+
<Marker position={position}>
14+
<Popup>
15+
A pretty CSS3 popup. <br />
16+
</Popup>
17+
</Marker>
18+
</MapContainer>
19+
)
20+
}

example/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.leaflet-container {
2+
height: 400px;
3+
}

example/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
7+
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
8+
crossorigin=""/>
9+
<title>React-Leaflet example</title>
10+
</head>
11+
<body>
12+
<div id="root"></div>
13+
<script type="module" src="/main.tsx"></script>
14+
</body>
15+
</html>

example/main.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react'
2+
import ReactDOM from 'react-dom/client'
3+
4+
import App from './App.tsx'
5+
import './index.css'
6+
7+
// biome-ignore lint/style/noNonNullAssertion: DOM root exists
8+
ReactDOM.createRoot(document.getElementById('root')!).render(
9+
<React.StrictMode>
10+
<App />
11+
</React.StrictMode>,
12+
)

example/package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "react-leaflet-example",
3+
"private": true,
4+
"version": "1.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"start": "vite"
8+
},
9+
"dependencies": {
10+
"react": "rc",
11+
"react-dom": "rc",
12+
"react-leaflet": "workspace:^"
13+
},
14+
"devDependencies": {
15+
"@types/react": "npm:types-react@rc",
16+
"@types/react-dom": "npm:types-react-dom@rc",
17+
"@vitejs/plugin-react": "^4.3.0",
18+
"typescript": "^5.4.5",
19+
"vite": "^5.2.11"
20+
}
21+
}

0 commit comments

Comments
 (0)