Bumps [i18next](https://github.com/i18next/i18next) from 27.2.7 to 27.2.10. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/i18next/i18next/releases">i18next's releases</a>.</em></p> <blockquote> <h2>v27.2.10</h2> <ul> <li>fix: a formatter option that is empty or only whitespace in quotes stays a string instead of becoming <code>NaN</code>: <code>{{name, join(separator: ' ')}}</code> passes <code>' '</code> to the formatter, so a custom <code>join</code> writes "Anna Smith" instead of "AnnaNaNSmith". Thanks <a href="https://github.com/arba-octo"><code>@arba-octo</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2485">#2485</a>)</li> <li>perf: <code>t()</code> runs the natural-language key check only for a key that contains the namespace separator, instead of twice on every call. With the default separators <code>t()</code> is about 30% faster; the results do not change. Thanks <a href="https://github.com/ximex"><code>@ximex</code></a> (<a href="https://redirect.github.com/i18next/i18next/issues/2486">#2486</a>)</li> <li>perf: without <code>debug</code>, <code>t()</code> looks a missing key up once instead of twice. The second lookup only fed the debug warning about flat JSON, so output and logs do not change. Thanks <a href="https://github.com/ximex"><code>@ximex</code></a> (<a href="https://redirect.github.com/i18next/i18next/issues/2487">#2487</a>)</li> </ul> <h2>v27.2.9</h2> <ul> <li>fix: <code>t('item', { count: 2n })</code> picks the plural form instead of throwing <code>TypeError: Cannot convert a BigInt value to a number</code>: a BigInt <code>count</code> (as some database drivers return for <code>COUNT(*)</code>) is converted to a number for <code>Intl.PluralRules</code>, <code>{{count}}</code> still gets the BigInt, and <code>0n</code> looks up <code>_zero</code> like <code>0</code>. Above <code>Number.MAX_SAFE_INTEGER</code> the form follows the rounded number. Thanks <a href="https://github.com/Asimmimx"><code>@Asimmimx</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2484">#2484</a>)</li> </ul> <h2>v27.2.8</h2> <ul> <li>fix(types): a <code>t()</code> call with <code>context</code> looks the key up along its own path in the namespace it names, instead of matching it against every key of every namespace. With several large namespaces each such call cost up to millions of type instantiations and could fail with TS2589, a literal <code>context: 'x'</code> soonest. A context value without a key is still an error, as since 25.9.0 (<a href="https://redirect.github.com/i18next/i18next/issues/2482">#2482</a>)</li> <li>fix: a language code without subtags gets its language part in the same casing as a code with subtags: with <code>supportedLngs: ['en-US']</code>, <code>'EN'</code> (from <code>?lng=EN</code> or a capitalised cookie) matches <code>'en-US'</code> like <code>'en'</code> and <code>'EN-GB'</code> already did, instead of falling back to <code>fallbackLng</code>, and <code>dir('AR')</code> returns <code>'rtl'</code> where <code>Intl.Locale</code> has no <code>getTextInfo()</code>. Thanks <a href="https://github.com/anishkun"><code>@anishkun</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2483">#2483</a>)</li> <li>fix: <code>dir()</code> also returns <code>'rtl'</code> for <code>'AR'</code> or <code>'AR-EG'</code> with <code>cleanCode: false</code> where <code>Intl.Locale</code> has no <code>getTextInfo()</code> (Node.js 22, some browsers)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/i18next/i18next/blob/master/CHANGELOG.md">i18next's changelog</a>.</em></p> <blockquote> <h2>27.2.10</h2> <ul> <li>fix: a formatter option that is empty or only whitespace in quotes stays a string instead of becoming <code>NaN</code>: <code>{{name, join(separator: ' ')}}</code> passes <code>' '</code> to the formatter, so a custom <code>join</code> writes "Anna Smith" instead of "AnnaNaNSmith". Thanks <a href="https://github.com/arba-octo"><code>@arba-octo</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2485">#2485</a>)</li> <li>perf: <code>t()</code> runs the natural-language key check only for a key that contains the namespace separator, instead of twice on every call. With the default separators <code>t()</code> is about 30% faster; the results do not change. Thanks <a href="https://github.com/ximex"><code>@ximex</code></a> (<a href="https://redirect.github.com/i18next/i18next/issues/2486">#2486</a>)</li> <li>perf: without <code>debug</code>, <code>t()</code> looks a missing key up once instead of twice. The second lookup only fed the debug warning about flat JSON, so output and logs do not change. Thanks <a href="https://github.com/ximex"><code>@ximex</code></a> (<a href="https://redirect.github.com/i18next/i18next/issues/2487">#2487</a>)</li> </ul> <h2>27.2.9</h2> <ul> <li>fix: <code>t('item', { count: 2n })</code> picks the plural form instead of throwing <code>TypeError: Cannot convert a BigInt value to a number</code>: a BigInt <code>count</code> (as some database drivers return for <code>COUNT(*)</code>) is converted to a number for <code>Intl.PluralRules</code>, <code>{{count}}</code> still gets the BigInt, and <code>0n</code> looks up <code>_zero</code> like <code>0</code>. Above <code>Number.MAX_SAFE_INTEGER</code> the form follows the rounded number. Thanks <a href="https://github.com/Asimmimx"><code>@Asimmimx</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2484">#2484</a>)</li> </ul> <h2>27.2.8</h2> <ul> <li>fix(types): a <code>t()</code> call with <code>context</code> looks the key up along its own path in the namespace it names, instead of matching it against every key of every namespace. With several large namespaces each such call cost up to millions of type instantiations and could fail with TS2589, a literal <code>context: 'x'</code> soonest. A context value without a key is still an error, as since 25.9.0 (<a href="https://redirect.github.com/i18next/i18next/issues/2482">#2482</a>)</li> <li>fix: a language code without subtags gets its language part in the same casing as a code with subtags: with <code>supportedLngs: ['en-US']</code>, <code>'EN'</code> (from <code>?lng=EN</code> or a capitalised cookie) matches <code>'en-US'</code> like <code>'en'</code> and <code>'EN-GB'</code> already did, instead of falling back to <code>fallbackLng</code>, and <code>dir('AR')</code> returns <code>'rtl'</code> where <code>Intl.Locale</code> has no <code>getTextInfo()</code>. Thanks <a href="https://github.com/anishkun"><code>@anishkun</code></a> (<a href="https://redirect.github.com/i18next/i18next/pull/2483">#2483</a>)</li> <li>fix: <code>dir()</code> also returns <code>'rtl'</code> for <code>'AR'</code> or <code>'AR-EG'</code> with <code>cleanCode: false</code> where <code>Intl.Locale</code> has no <code>getTextInfo()</code> (Node.js 22, some browsers)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/i18next/i18next/commit/7839a3b0006255e98c3cdd1bf28c1fbac7f278bb"><code>7839a3b</code></a> 27.2.10</li> <li><a href="https://github.com/i18next/i18next/commit/a3d827265a5af209d685f88070c6e543b50ba055"><code>a3d8272</code></a> changelog for 27.2.10</li> <li><a href="https://github.com/i18next/i18next/commit/b36d5e7170b0605c32dbb15d4f9d7a7d570f7594"><code>b36d5e7</code></a> changelog: <a href="https://redirect.github.com/i18next/i18next/issues/2485">#2485</a>, <a href="https://redirect.github.com/i18next/i18next/issues/2486">#2486</a> and <a href="https://redirect.github.com/i18next/i18next/issues/2487">#2487</a> under Unreleased</li> <li><a href="https://github.com/i18next/i18next/commit/574342994733054225c6da748a5b04a318d62155"><code>5743429</code></a> perf: look a missing key up only once when debug is off (<a href="https://redirect.github.com/i18next/i18next/issues/2487">#2487</a>)</li> <li><a href="https://github.com/i18next/i18next/commit/78fe071619189b30f12c08aab5a842d41ef497f1"><code>78fe071</code></a> perf: run the natural-language key check only for a key with the namespace se...</li> <li><a href="https://github.com/i18next/i18next/commit/4c02a177fefd8263229207498361d420709af0e6"><code>4c02a17</code></a> fix: keep blank formatter options as strings (<a href="https://redirect.github.com/i18next/i18next/issues/2485">#2485</a>)</li> <li><a href="https://github.com/i18next/i18next/commit/83e6f680ab2bfda438888f251990fb6f7a639869"><code>83e6f68</code></a> contributing: point to the organisation's page for what we merge and how we r...</li> <li><a href="https://github.com/i18next/i18next/commit/add2f77109d1daa0a59a9b78133296ac5bb4e35c"><code>add2f77</code></a> 27.2.9</li> <li><a href="https://github.com/i18next/i18next/commit/dcc1487abb3a302d93411ba06a40afba3efafdb7"><code>dcc1487</code></a> changelog for 27.2.9</li> <li><a href="https://github.com/i18next/i18next/commit/09335895f13448542932ee96990e721dcde2118f"><code>0933589</code></a> changelog: <a href="https://redirect.github.com/i18next/i18next/issues/2484">#2484</a> under Unreleased</li> <li>Additional commits viewable in <a href="https://github.com/i18next/i18next/compare/v27.2.7...v27.2.10">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Maputnik
A free and open visual editor for the MapLibre GL styles targeted at developers and map designers.
Usage
- 🔗 Design your maps online at https://www.maplibre.org/maputnik/ (all in local storage)
- 🔗 Use the Maputnik CLI for local style development
- In a Docker, run this command and browse to http://localhost:8888, Ctrl+C to stop the server.
docker run -it --rm -p 8888:8000 ghcr.io/maplibre/maputnik:main
To see the CLI options (for example file watching or style serving) run:
docker run -it --rm -p 8888:8000 ghcr.io/maplibre/maputnik:main --help
You might need to mount a volume (-v) to be able to use these options.
Documentation
The documentation can be found in the Wiki. You are welcome to collaborate!
- 🔗 Study the Maputnik Wiki
- 📹 Design a map from Scratch https://youtu.be/XoDh0gEnBQo
Develop
Maputnik is written in typescript and is using React and MapLibre GL JS.
We ensure building and developing Maputnik works with the current active LTS Node.js version and above.
Check out our Internationalization guide for UI text related changes.
Getting Involved
Join the #maplibre or #maputnik slack channel at OSMUS: get an invite at https://slack.openstreetmap.us/ Read the the below guide in order to get familiar with how we do things around here.
Install the deps, start the dev server and open the web browser on http://localhost:8888/.
# install dependencies
npm install
# start dev server
npm run start
If you want Maputnik to be accessible externally use the --host option:
# start externally accessible dev server
npm run start -- --host 0.0.0.0
The build process will watch for changes to the filesystem, rebuild and autoreload the editor.
npm run build
Lint the JavaScript code.
# run linter
npm run lint
npm run lint-css
npm run sort-styles
Tests
End-to-end tests
For E2E testing we use Playwright. The tests live in the e2e directory and drive the app through the MaputnikDriver page object.
The first time you run the tests, install the browser:
npx playwright install chromium
Playwright automatically starts the dev server (npm run start) for you, so you can just run:
npm run test
Some useful options:
# see the tests run in a headed browser
npm run test -- --headed
# run a single spec / filter by title
npm run test -- e2e/map.spec.ts
npm run test -- -g "zoom level"
# open the interactive UI mode
npx playwright test --ui
Running the E2E tests also produces a code-coverage report in coverage/ (collected via istanbul instrumentation of the dev server).
Unit & component tests
Unit tests and component tests run with Vitest; component tests (*.browser.test.tsx) use Vitest's browser mode with the Playwright provider.
npm run test-unit
Release process
- Review
CHANGELOG.md- Double-check that all changes included in the release are appropriately documented.
- To-be-released changes should be under the "main" header.
- Commit any final changes to the changelog.
- Run Create bump version PR by manual workflow dispatch and set the version number in the input. This will create a PR that changes the changelog and
package.jsonfile to review and merge. - Once merged, an automatic process will kick in and creates a GitHub release and uploads release assets.
Sponsors
Thanks to the supporters of the Kickstarter campaign. This project would not be possible without these commercial and individual sponsors. You can see this file's history for previous sponsors of the original Maputnik repo. Read more about the MapLibre Sponsorship Program at https://maplibre.org/sponsors/.
License
Maputnik is licensed under MIT and is Copyright (c) Lukas Martinelli and Maplibre contributors. As contributor please take extra care of not violating any Mapbox trademarks. Do not get inspired by other map studios and make your own decisions for a good style editor.
