Skip to content

Commit 37164a1

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

16 files changed

+834
-186
lines changed
File renamed without changes.
+31
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

+2
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

+7
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

+20-15
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

+20
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

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

example/index.html

+15
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

+12
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

+21
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+
}

package.json

+11-13
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"version": "1.0.0",
44
"private": true,
55
"type": "module",
6-
"packageManager": "pnpm@9.0.6",
76
"scripts": {
87
"lint": "biome check --apply ./packages",
8+
"lint:ci": "biome ci ./packages",
99
"test": "jest",
1010
"build": "turbo run build:clean && pnpm run -r build:types && turbo run build:js"
1111
},
1212
"devDependencies": {
13-
"@biomejs/biome": "^1.7.2",
13+
"@biomejs/biome": "^1.7.3",
1414
"@skypack/package-check": "^0.2.2",
1515
"@swc/cli": "^0.3.12",
16-
"@swc/core": "^1.3.37",
16+
"@swc/core": "^1.5.7",
1717
"@swc/jest": "^0.2.24",
18-
"@testing-library/react": "^15.0.5",
18+
"@testing-library/react": "^15.0.7",
1919
"@types/jest": "^29.4.0",
2020
"@types/leaflet": "^1.9.1",
2121
"@types/warning": "^3.0.0",
@@ -24,23 +24,21 @@
2424
"jest": "^29.4.3",
2525
"jest-environment-jsdom": "^29.4.3",
2626
"leaflet": "^1.9.3",
27-
"react": "beta",
28-
"react-dom": "beta",
27+
"react": "rc",
28+
"react-dom": "rc",
2929
"ts-jest-resolver": "^2.0.0",
3030
"turbo": "^1.8.3",
3131
"typescript": "^5.4.5"
3232
},
3333
"pnpm": {
3434
"overrides": {
35-
"@types/react": "npm:types-react@beta",
36-
"@types/react-dom": "npm:types-react-dom@beta",
37-
"react": "beta",
38-
"react-dom": "beta"
35+
"@types/react": "npm:types-react@rc",
36+
"@types/react-dom": "npm:types-react-dom@rc",
37+
"react": "rc",
38+
"react-dom": "rc"
3939
}
4040
},
4141
"jest": {
42-
"projects": [
43-
"<rootDir>/packages/*"
44-
]
42+
"projects": ["<rootDir>/packages/*"]
4543
}
4644
}

packages/core/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-leaflet/core",
3-
"version": "3.0.0-beta.1",
3+
"version": "3.0.0-rc.1",
44
"description": "React Leaflet core",
55
"repository": {
66
"type": "git",
@@ -35,12 +35,12 @@
3535
},
3636
"peerDependencies": {
3737
"leaflet": "^1.9.0",
38-
"react": "beta",
39-
"react-dom": "beta"
38+
"react": "rc",
39+
"react-dom": "rc"
4040
},
4141
"devDependencies": {
42-
"@types/react": "npm:types-react@beta",
43-
"@types/react-dom": "npm:types-react-dom@beta"
42+
"@types/react": "npm:types-react@rc",
43+
"@types/react-dom": "npm:types-react-dom@rc"
4444
},
4545
"jest": {
4646
"extensionsToTreatAsEsm": [".ts", ".tsx"],

packages/react-leaflet/.gitignore

-2
This file was deleted.

packages/react-leaflet/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-leaflet",
3-
"version": "5.0.0-beta.1",
3+
"version": "5.0.0-rc.1",
44
"description": "React components for Leaflet maps",
55
"repository": {
66
"type": "git",
@@ -39,14 +39,14 @@
3939
},
4040
"peerDependencies": {
4141
"leaflet": "^1.9.0",
42-
"react": "beta",
43-
"react-dom": "beta"
42+
"react": "rc",
43+
"react-dom": "rc"
4444
},
4545
"devDependencies": {
4646
"@types/geojson": "^7946.0.10",
4747
"@types/leaflet": "^1.9.1",
48-
"@types/react": "npm:types-react@beta",
49-
"@types/react-dom": "npm:types-react-dom@beta"
48+
"@types/react": "npm:types-react@rc",
49+
"@types/react-dom": "npm:types-react-dom@rc"
5050
},
5151
"jest": {
5252
"extensionsToTreatAsEsm": [".ts", ".tsx"],

0 commit comments

Comments
 (0)