Skip to content

Commit

Permalink
v5.0.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulLeCam committed May 24, 2024
1 parent 6d253ed commit 37164a1
Show file tree
Hide file tree
Showing 16 changed files with 834 additions and 186 deletions.
File renamed without changes.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report-v5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report in v5
about: Report a bug in v5
---

## Bug report in v5

**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.

Please make sure to check the following boxes before submitting an issue.\
**Issues opened without using this template will be closed unless they have a good reason not to follow this template.**

- [ ] All peer dependencies are installed: React, ReactDOM and Leaflet.
- [ ] Using the latest RC version of React and ReactDOM v19.
- [ ] Using the supported version of Leaflet (v1.9.0 minimum) and its corresponding CSS file is loaded.
- [ ] Using the [latest v5 RC version of React-Leaflet](https://github.com/PaulLeCam/react-leaflet/releases).
- [ ] The issue has not already been reported.
- [ ] Make sure you have followed the [quick start guide](https://leafletjs.com/examples/quick-start.html) for Leaflet.
- [ ] 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).

### Expected behavior

Please describe.

### Actual behavior

Please describe.

### Steps to reproduce

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).
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
lib
coverage
.turbo
.vercel
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v5.0.0-rc.1 (2024-05-24)

### Breaking changes

- React v19 is now required as peer dependency.
- Removed `LeafletProvider` component from the core package.

## v4.2.1 (2023-02-28)

Fixed bounds update in `ImageOverlay`
Expand Down
35 changes: 20 additions & 15 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"ignore": [],
"attributePosition": "auto",
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"javascript": {
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"bracketSameLine": true,
"bracketSpacing": true,
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"quoteStyle": "single",
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingComma": "all"
}
},
"linter": {
"enabled": true,
"ignore": ["lib/**", "__tests__/**"],
"rules": {
"recommended": true
}
}
"linter": {
"enabled": true,
"ignore": ["__tests__/**"],
"rules": {
"recommended": true
}
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
}
}
20 changes: 20 additions & 0 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react'
import { MapContainer, Marker, Popup, TileLayer } from 'react-leaflet'

const position = [51.505, -0.09]

export default function App() {
return (
<MapContainer center={position} zoom={13} scrollWheelZoom={false}>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<Marker position={position}>
<Popup>
A pretty CSS3 popup. <br />
</Popup>
</Marker>
</MapContainer>
)
}
3 changes: 3 additions & 0 deletions example/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.leaflet-container {
height: 400px;
}
15 changes: 15 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""/>
<title>React-Leaflet example</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/main.tsx"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions example/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import ReactDOM from 'react-dom/client'

import App from './App.tsx'
import './index.css'

// biome-ignore lint/style/noNonNullAssertion: DOM root exists
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
21 changes: 21 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "react-leaflet-example",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"start": "vite"
},
"dependencies": {
"react": "rc",
"react-dom": "rc",
"react-leaflet": "workspace:^"
},
"devDependencies": {
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"@vitejs/plugin-react": "^4.3.0",
"typescript": "^5.4.5",
"vite": "^5.2.11"
}
}
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
"version": "1.0.0",
"private": true,
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"lint": "biome check --apply ./packages",
"lint:ci": "biome ci ./packages",
"test": "jest",
"build": "turbo run build:clean && pnpm run -r build:types && turbo run build:js"
},
"devDependencies": {
"@biomejs/biome": "^1.7.2",
"@biomejs/biome": "^1.7.3",
"@skypack/package-check": "^0.2.2",
"@swc/cli": "^0.3.12",
"@swc/core": "^1.3.37",
"@swc/core": "^1.5.7",
"@swc/jest": "^0.2.24",
"@testing-library/react": "^15.0.5",
"@testing-library/react": "^15.0.7",
"@types/jest": "^29.4.0",
"@types/leaflet": "^1.9.1",
"@types/warning": "^3.0.0",
Expand All @@ -24,23 +24,21 @@
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"leaflet": "^1.9.3",
"react": "beta",
"react-dom": "beta",
"react": "rc",
"react-dom": "rc",
"ts-jest-resolver": "^2.0.0",
"turbo": "^1.8.3",
"typescript": "^5.4.5"
},
"pnpm": {
"overrides": {
"@types/react": "npm:types-react@beta",
"@types/react-dom": "npm:types-react-dom@beta",
"react": "beta",
"react-dom": "beta"
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc",
"react": "rc",
"react-dom": "rc"
}
},
"jest": {
"projects": [
"<rootDir>/packages/*"
]
"projects": ["<rootDir>/packages/*"]
}
}
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-leaflet/core",
"version": "3.0.0-beta.1",
"version": "3.0.0-rc.1",
"description": "React Leaflet core",
"repository": {
"type": "git",
Expand Down Expand Up @@ -35,12 +35,12 @@
},
"peerDependencies": {
"leaflet": "^1.9.0",
"react": "beta",
"react-dom": "beta"
"react": "rc",
"react-dom": "rc"
},
"devDependencies": {
"@types/react": "npm:types-react@beta",
"@types/react-dom": "npm:types-react-dom@beta"
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
},
"jest": {
"extensionsToTreatAsEsm": [".ts", ".tsx"],
Expand Down
2 changes: 0 additions & 2 deletions packages/react-leaflet/.gitignore

This file was deleted.

10 changes: 5 additions & 5 deletions packages/react-leaflet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-leaflet",
"version": "5.0.0-beta.1",
"version": "5.0.0-rc.1",
"description": "React components for Leaflet maps",
"repository": {
"type": "git",
Expand Down Expand Up @@ -39,14 +39,14 @@
},
"peerDependencies": {
"leaflet": "^1.9.0",
"react": "beta",
"react-dom": "beta"
"react": "rc",
"react-dom": "rc"
},
"devDependencies": {
"@types/geojson": "^7946.0.10",
"@types/leaflet": "^1.9.1",
"@types/react": "npm:types-react@beta",
"@types/react-dom": "npm:types-react-dom@beta"
"@types/react": "npm:types-react@rc",
"@types/react-dom": "npm:types-react-dom@rc"
},
"jest": {
"extensionsToTreatAsEsm": [".ts", ".tsx"],
Expand Down
Loading

0 comments on commit 37164a1

Please sign in to comment.