react-leaflet-deflate 2.2.1 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Github Package
5
+
6
+ on:
7
+ release:
8
+ types: [created]
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: 20
18
+ - run: npm ci
19
+ - run: npm test
20
+
21
+ publish-gpr:
22
+ needs: build
23
+ runs-on: ubuntu-latest
24
+ permissions:
25
+ contents: read
26
+ packages: write
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: actions/setup-node@v4
30
+ with:
31
+ node-version: 20
32
+ registry-url: https://npm.pkg.github.com/
33
+ - run: npm ci
34
+ - run: npm publish
35
+ env:
36
+ NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -0,0 +1,33 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Node.js Package
5
+
6
+ on:
7
+ release:
8
+ types: [created]
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: 20
18
+ - run: npm ci
19
+ - run: npm test
20
+
21
+ publish-npm:
22
+ needs: build
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - uses: actions/setup-node@v4
27
+ with:
28
+ node-version: 20
29
+ registry-url: https://registry.npmjs.org/
30
+ - run: npm ci
31
+ - run: npm publish
32
+ env:
33
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -0,0 +1,47 @@
1
+ name: NodeJS with Webpack
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master", "feature/**", "bugfix/**" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+ workflow_dispatch:
9
+ inputs:
10
+ logLevel:
11
+ description: 'Log level'
12
+ required: true
13
+ default: 'warning'
14
+ type: choice
15
+ options:
16
+ - info
17
+ - warning
18
+ - debug
19
+ tags:
20
+ description: 'Test scenario tags'
21
+ required: false
22
+ type: boolean
23
+ environment:
24
+ description: 'Environment to run tests against'
25
+ type: environment
26
+ required: true
27
+
28
+ jobs:
29
+ build:
30
+ runs-on: ubuntu-latest
31
+
32
+ strategy:
33
+ matrix:
34
+ node-version: [18.x, 20.x, 22.x]
35
+
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+
39
+ - name: Use Node.js ${{ matrix.node-version }}
40
+ uses: actions/setup-node@v4
41
+ with:
42
+ node-version: ${{ matrix.node-version }}
43
+
44
+ - name: Build
45
+ run: |
46
+ npm install
47
+ npx webpack
package/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  react-leaflet-deflate Changelog
2
2
  =========================
3
3
 
4
+ ## 3.0.0 (2025-11-07)
5
+
6
+ * Update Leaflet.Deflate dependency to 2.1.0.
7
+ * Update Leaflet dependency to 1.9.4
8
+ * Update react-leaflet dependency to 5.0.0
9
+ * Update react dependency to 19.2.0
10
+
4
11
  ## 2.2.1 (2019-02-11)
5
12
 
6
13
  * Update Leaflet.Deflate dependency to 1.1.0 ([PR #5](https://github.com/mhasbie/react-leaflet-deflate/pull/5) by _oliverroick_).
package/README.md CHANGED
@@ -3,9 +3,6 @@
3
3
 
4
4
  [![version](https://img.shields.io/npm/v/react-leaflet-deflate.svg?style=plastic)](http://npm.im/react-leaflet-deflate)
5
5
  [![react-leaflet compatibility](https://img.shields.io/npm/dependency-version/react-leaflet-deflate/peer/react-leaflet.svg?style=plastic)](https://github.com/mhasbie/react-leaflet-deflate)
6
- [![travis build](https://img.shields.io/travis/mhasbie/react-leaflet-deflate.svg?style=plastic)](https://travis-ci.org/mhasbie/react-leaflet-deflate)
7
- [![dependencies](https://img.shields.io/david/mhasbie/react-leaflet-deflate.svg?style=plastic)](https://david-dm.org/mhasbie/react-leaflet-deflate)
8
- [![peer dependencies](https://img.shields.io/david/peer/mhasbie/react-leaflet-deflate.svg?style=plastic)](https://david-dm.org/mhasbie/react-leaflet-deflate?type=peer)
9
6
  [![issues](https://img.shields.io/github/issues/mhasbie/react-leaflet-deflate.svg?style=plastic)](https://github.com/mhasbie/react-leaflet-deflate/issues)
10
7
  [![downloads](https://img.shields.io/npm/dt/react-leaflet-deflate.svg?style=plastic)](http://npm-stat.com/charts.html?package=react-leaflet-deflate&from=2018-01-01)
11
8
  [![MIT License](https://img.shields.io/npm/l/react-leaflet-deflate.svg?style=plastic)](http://opensource.org/licenses/MIT)
@@ -16,7 +13,7 @@ for [react-leaflet](https://github.com/PaulLeCam/react-leaflet).
16
13
 
17
14
  Substitutes polygons and lines with markers when their screen size falls below a defined threshold.
18
15
 
19
- *Tested with React 16.5.2, Leaflet 1.3.4, React-Leaflet 1.9.1, React-Leaflet 2.0.1, Leaflet.Deflate 1.0.0-alpha.3*
16
+ *Tested with React 19.2.0, Leaflet 1.9.4, React-Leaflet 5.0.0, React-Leaflet 4.0.0, Leaflet.Deflate 2.1.0*
20
17
 
21
18
  ![Example](https://cloud.githubusercontent.com/assets/159510/7164588/090c06fe-e399-11e4-956d-0283ef7e69cf.gif)
22
19
 
@@ -45,15 +42,15 @@ npm install --save leaflet.markercluster
45
42
 
46
43
  ## Usage example
47
44
 
48
- ### react-leaflet v1
45
+ ### react-leaflet v5
49
46
 
50
47
  ```javascript
51
- import { Map, TileLayer } from 'react-leaflet';
48
+ import { MapContainer, TileLayer } from 'react-leaflet';
52
49
  import Deflate from 'react-leaflet-deflate';
53
50
 
54
51
  const geojson = {...};
55
52
 
56
- <Map center={[2.935403, 101.448205]} zoom={10}>
53
+ <MapContainer center={[2.935403, 101.448205]} zoom={10}>
57
54
  <TileLayer
58
55
  url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
59
56
  attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
@@ -64,30 +61,7 @@ const geojson = {...};
64
61
  minSize={10}
65
62
  markerCluster={true}
66
63
  />
67
- </Map>
68
- ```
69
-
70
- ### react-leaflet v2
71
-
72
- ```javascript
73
- import { Map, TileLayer, withLeaflet } from 'react-leaflet';
74
- import DeflateDefault from 'react-leaflet-deflate'; // Import as DeflateDefault var
75
- const Deflate = withLeaflet(DeflateDefault); // wrap and pass to our Deflate variable. The rest of the code is the same as react-leaflet v1 example.
76
-
77
- const geojson = {...};
78
-
79
- <Map center={[2.935403, 101.448205]} zoom={10}>
80
- <TileLayer
81
- url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
82
- attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
83
- />
84
-
85
- <Deflate
86
- data={geojson}
87
- minSize={10}
88
- markerCluster={true}
89
- />
90
- </Map>
64
+ </MapContainer>
91
65
  ```
92
66
 
93
67
  ### Options