dependabot[bot] 7781999dd6 chore(deps): Bump i18next from 27.1.5 to 27.2.2 (#2356)
Bumps [i18next](https://github.com/i18next/i18next) from 27.1.5 to
27.2.2.
<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.2</h2>
<ul>
<li>fix: <code>setDefaultNamespace()</code> works on a clone. A clone's
translator keeps its own options object, so the call changed
<code>i18n.options.defaultNS</code> while <code>t()</code> kept using
the old default namespace. i18next-http-middleware hands every request a
clone, so <code>req.i18n.setDefaultNamespace()</code> did nothing there.
(<a
href="https://github.com/i18next/i18next/discussions/2106">#2106</a>)</li>
<li>fix: <code>supportedLngs</code> works in any casing. Every other
language code is formatted (<code>pt-br</code> to <code>pt-BR</code>,
<code>EN</code> to <code>en</code>, all lowercase with
<code>lowerCaseLng</code>), but <code>supportedLngs</code> was compared
as written, so <code>supportedLngs: ['pt-br']</code>,
<code>['EN']</code>, or <code>['pt-BR']</code> with <code>lowerCaseLng:
true</code> refused that language and fell back. They are now compared
in that formatted form (also by <code>loadLanguages()</code>), while
<code>options.supportedLngs</code> stays as written. (<a
href="https://github.com/i18next/i18next/discussions/1791">#1791</a>)</li>
<li>fix(types): resources typed with named <code>interface</code>s get
their nested keys. The key types only walked into objects with an index
signature, which a type alias has and an interface does not, so
<code>t('nested.key')</code> failed with TS2345 while
<code>t('nested')</code> compiled. Interfaces now give the same keys as
type aliases, so <code>t('nested')</code> without
<code>returnObjects</code> is rejected for them too. (<a
href="https://github.com/i18next/i18next/discussions/2326">#2326</a>)</li>
<li>fix(types): typed keys work with <code>strictNullChecks:
false</code>. Without strict null checks <code>undefined</code> passes
<code>extends string</code>, so the key prefix, namespace and context
checks took a missing <code>keyPrefix</code>, <code>ns</code> or
<code>context</code> for a value: <code>t('title')</code> was rejected
(only <code>t('ns:title')</code> compiled), <code>t()</code> returned
<code>string</code>, and react-i18next's <code>Trans</code> accepted no
<code>i18nKey</code>. A new type test project compiles with
<code>strictNullChecks: false</code>; with strict null checks the types
resolve as before. (<a
href="https://github.com/i18next/i18next/discussions/2085">#2085</a>)</li>
</ul>
<h2>v27.2.1</h2>
<ul>
<li>fix: a variable passed as <code>undefined</code> renders as an empty
string when its placeholder has a format too (<code>{{amount,
number}}</code>), as <code>{{amount}}</code> already did. The
placeholder stayed in the result with the default <code>skipOnVariables:
true</code>, and debug mode logged &quot;missed to pass in
variable&quot; with either setting. Thanks <a
href="https://github.com/Vineet829"><code>@​Vineet829</code></a> (<a
href="https://redirect.github.com/i18next/i18next/pull/2479">#2479</a>)</li>
</ul>
<h2>v27.2.0</h2>
<ul>
<li>fix: an error thrown by a load callback or a listener (the callback
of <code>init</code>, <code>changeLanguage</code>,
<code>loadNamespaces</code> or <code>loadLanguages</code>, or a
<code>languageChanged</code> / <code>loaded</code> listener) is no
longer handed back to the backend connector as if the read had failed.
With a backend whose <code>read</code> returns a value or a promise, the
connector got that error a second time: the namespace that had loaded
was marked as failed, <code>failedLoading</code> was emitted with your
error and the count of running reads dropped to -1. The error now
reaches your app: it is thrown from the call that started the load for a
<code>read</code> that returns a value, and it is an unhandled rejection
for a <code>read</code> that returns a promise, which ends a Node.js
process unless you handle <code>unhandledRejection</code>. Thanks <a
href="https://github.com/SudeepGowda55"><code>@​SudeepGowda55</code></a>
(<a
href="https://redirect.github.com/i18next/i18next/pull/2477">#2477</a>)</li>
<li>fix: when a load callback throws, the other callbacks waiting for
the same namespaces are still called and the <code>loaded</code> event
is still emitted, and the error is thrown on after that. A second
<code>loadNamespaces()</code> for the same namespace never called back
before.</li>
<li>fix: <code>addResourceBundle(lng, ns, resources, true, true)</code>
overwrites numbers and booleans too. Only strings were replaced, so
<code>{ n: 0 }</code> stayed 0 after adding <code>{ n: 5 }</code>, and
adding an object where the bundle had a number, boolean or null threw
<code>Cannot create property ... on number</code>, also without
<code>overwrite</code>. With <code>overwrite</code>, a number, boolean
or null now also replaces a nested object, as a string already did.
Thanks <a
href="https://github.com/SudeepGowda55"><code>@​SudeepGowda55</code></a>
(<a
href="https://redirect.github.com/i18next/i18next/pull/2476">#2476</a>)</li>
<li>fix: with <code>keySeparator: false</code>, a namespace separator
inside the key after the namespace is kept.
<code>t('common:errors:required')</code> looked up
<code>'errorsfalserequired'</code> instead of the flat key
<code>'errors:required'</code> that i18next-cli extracts (also for a
selector like <code>$ =&gt; $.common['errors:required']</code>), and
reported the missing key under that name. This dates back to 11.3.
Thanks <a
href="https://github.com/SudeepGowda55"><code>@​SudeepGowda55</code></a>
(<a
href="https://redirect.github.com/i18next/i18next/pull/2478">#2478</a>)</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.2</h2>
<ul>
<li>fix: <code>setDefaultNamespace()</code> works on a clone. A clone's
translator keeps its own options object, so the call changed
<code>i18n.options.defaultNS</code> while <code>t()</code> kept using
the old default namespace. i18next-http-middleware hands every request a
clone, so <code>req.i18n.setDefaultNamespace()</code> did nothing there.
(<a
href="https://github.com/i18next/i18next/discussions/2106">#2106</a>)</li>
<li>fix: <code>supportedLngs</code> works in any casing. Every other
language code is formatted (<code>pt-br</code> to <code>pt-BR</code>,
<code>EN</code> to <code>en</code>, all lowercase with
<code>lowerCaseLng</code>), but <code>supportedLngs</code> was compared
as written, so <code>supportedLngs: ['pt-br']</code>,
<code>['EN']</code>, or <code>['pt-BR']</code> with <code>lowerCaseLng:
true</code> refused that language and fell back. They are now compared
in that formatted form (also by <code>loadLanguages()</code>), while
<code>options.supportedLngs</code> stays as written. (<a
href="https://github.com/i18next/i18next/discussions/1791">#1791</a>)</li>
<li>fix(types): resources typed with named <code>interface</code>s get
their nested keys. The key types only walked into objects with an index
signature, which a type alias has and an interface does not, so
<code>t('nested.key')</code> failed with TS2345 while
<code>t('nested')</code> compiled. Interfaces now give the same keys as
type aliases, so <code>t('nested')</code> without
<code>returnObjects</code> is rejected for them too. (<a
href="https://github.com/i18next/i18next/discussions/2326">#2326</a>)</li>
<li>fix(types): typed keys work with <code>strictNullChecks:
false</code>. Without strict null checks <code>undefined</code> passes
<code>extends string</code>, so the key prefix, namespace and context
checks took a missing <code>keyPrefix</code>, <code>ns</code> or
<code>context</code> for a value: <code>t('title')</code> was rejected
(only <code>t('ns:title')</code> compiled), <code>t()</code> returned
<code>string</code>, and react-i18next's <code>Trans</code> accepted no
<code>i18nKey</code>. A new type test project compiles with
<code>strictNullChecks: false</code>; with strict null checks the types
resolve as before. (<a
href="https://github.com/i18next/i18next/discussions/2085">#2085</a>)</li>
</ul>
<h2>27.2.1</h2>
<ul>
<li>fix: a variable passed as <code>undefined</code> renders as an empty
string when its placeholder has a format too (<code>{{amount,
number}}</code>), as <code>{{amount}}</code> already did. The
placeholder stayed in the result with the default <code>skipOnVariables:
true</code>, and debug mode logged &quot;missed to pass in
variable&quot; with either setting. Thanks <a
href="https://github.com/Vineet829"><code>@​Vineet829</code></a> (<a
href="https://redirect.github.com/i18next/i18next/pull/2479">#2479</a>)</li>
</ul>
<h2>27.2.0</h2>
<ul>
<li>fix: an error thrown by a load callback or a listener (the callback
of <code>init</code>, <code>changeLanguage</code>,
<code>loadNamespaces</code> or <code>loadLanguages</code>, or a
<code>languageChanged</code> / <code>loaded</code> listener) is no
longer handed back to the backend connector as if the read had failed.
With a backend whose <code>read</code> returns a value or a promise, the
connector got that error a second time: the namespace that had loaded
was marked as failed, <code>failedLoading</code> was emitted with your
error and the count of running reads dropped to -1. The error now
reaches your app: it is thrown from the call that started the load for a
<code>read</code> that returns a value, and it is an unhandled rejection
for a <code>read</code> that returns a promise, which ends a Node.js
process unless you handle <code>unhandledRejection</code>. Thanks <a
href="https://github.com/SudeepGowda55"><code>@​SudeepGowda55</code></a>
(<a
href="https://redirect.github.com/i18next/i18next/pull/2477">#2477</a>)</li>
<li>fix: when a load callback throws, the other callbacks waiting for
the same namespaces are still called and the <code>loaded</code> event
is still emitted, and the error is thrown on after that. A second
<code>loadNamespaces()</code> for the same namespace never called back
before.</li>
<li>fix: <code>addResourceBundle(lng, ns, resources, true, true)</code>
overwrites numbers and booleans too. Only strings were replaced, so
<code>{ n: 0 }</code> stayed 0 after adding <code>{ n: 5 }</code>, and
adding an object where the bundle had a number, boolean or null threw
<code>Cannot create property ... on number</code>, also without
<code>overwrite</code>. With <code>overwrite</code>, a number, boolean
or null now also replaces a nested object, as a string already did.
Thanks <a
href="https://github.com/SudeepGowda55"><code>@​SudeepGowda55</code></a>
(<a
href="https://redirect.github.com/i18next/i18next/pull/2476">#2476</a>)</li>
<li>fix: with <code>keySeparator: false</code>, a namespace separator
inside the key after the namespace is kept.
<code>t('common:errors:required')</code> looked up
<code>'errorsfalserequired'</code> instead of the flat key
<code>'errors:required'</code> that i18next-cli extracts (also for a
selector like <code>$ =&gt; $.common['errors:required']</code>), and
reported the missing key under that name. This dates back to 11.3.
Thanks <a
href="https://github.com/SudeepGowda55"><code>@​SudeepGowda55</code></a>
(<a
href="https://redirect.github.com/i18next/i18next/pull/2478">#2478</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/i18next/i18next/commit/cb3add8ca73406cc1058af0dd358a35a37fd0985"><code>cb3add8</code></a>
27.2.2</li>
<li><a
href="https://github.com/i18next/i18next/commit/8bfb33bd33c0b54d4d527bd251114a81ee868f03"><code>8bfb33b</code></a>
changelog for 27.2.2</li>
<li><a
href="https://github.com/i18next/i18next/commit/9afc4bfc18c4629f0d94de27926bef75065de1e8"><code>9afc4bf</code></a>
fix(types): nested keys for resources typed with interfaces, and typed
keys w...</li>
<li><a
href="https://github.com/i18next/i18next/commit/ef8c31a50c3cbd30debd94be9c6fa1b1f8d5f5ea"><code>ef8c31a</code></a>
fix: supportedLngs works in any casing</li>
<li><a
href="https://github.com/i18next/i18next/commit/edfea35dd79ef36c448c400aa49d92b21c026a6a"><code>edfea35</code></a>
fix: setDefaultNamespace() works on a clone</li>
<li><a
href="https://github.com/i18next/i18next/commit/5d8505d052deef6cd1cd7686170f29bf3bc85ea8"><code>5d8505d</code></a>
27.2.1</li>
<li><a
href="https://github.com/i18next/i18next/commit/ddbf81289dd53549827adcc817628ab233db7432"><code>ddbf812</code></a>
changelog for 27.2.1</li>
<li><a
href="https://github.com/i18next/i18next/commit/6ba661c332af555c55d91a2ccf6270090f8edb9a"><code>6ba661c</code></a>
fix: render a formatted variable passed as undefined as an empty string
(<a
href="https://redirect.github.com/i18next/i18next/issues/2479">#2479</a>)</li>
<li><a
href="https://github.com/i18next/i18next/commit/7c7a49ab4271c1cf67d0127799382098f001c72c"><code>7c7a49a</code></a>
27.2.0</li>
<li><a
href="https://github.com/i18next/i18next/commit/ad31df5fd444e6f219364748a173eecbe3dd2254"><code>ad31df5</code></a>
changelog for 27.2.0</li>
<li>Additional commits viewable in <a
href="https://github.com/i18next/i18next/compare/v27.1.5...v27.2.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=i18next&package-manager=npm_and_yarn&previous-version=27.1.5&new-version=27.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-23 13:52:33 +00:00
2019-08-03 12:08:54 -04:00
2016-12-03 17:03:39 +01:00
2025-01-21 09:54:19 +01:00
2018-10-20 18:35:35 +02:00
2026-07-12 15:46:30 +03:00
2023-12-20 07:18:13 +02:00
2025-02-25 05:01:15 -05:00
2025-02-25 05:01:15 -05:00
2026-07-12 15:46:30 +03:00

Maputnik logo

Maputnik

GitHub CI status License

A free and open visual editor for the MapLibre GL styles targeted at developers and map designers.

Usage

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!

Design Map from Scratch

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

  1. 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.
  2. 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.json file to review and merge.
  3. 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.

S
Description
An open source visual editor for the 'Mapbox Style Specification'
Readme
324 MiB
Languages
JavaScript 88.5%
SCSS 9.3%
CSS 1.2%
HTML 0.9%
Dockerfile 0.1%