Bumps [i18next](https://github.com/i18next/i18next) from 26.7.2 to 27.0.0. <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.0.0</h2> <p><strong>This is a major breaking release.</strong> It changes defaults that most setups had to override, gives every instance its own logger and post-processors, refuses language codes that look like markup or paths, and removes options that were broken or had no effect. 26.7 warned in debug mode about most of the runtime changes. The <a href="https://www.i18next.com/misc/migration-guide#v26.x.x-to-v27.0.0">migration guide</a> has the details; to keep the v26 behavior where an option exists:</p> <pre lang="js"><code>i18next.init({ fallbackLng: 'dev', // or better your source language: there is no implicit 'dev' any more returnEmptyString: true, // an empty translation is a translation again cleanCode: false, // keep codes without a region as they are ('EN' stays 'EN') }); </code></pre> <pre lang="ts"><code>declare module 'i18next' { interface CustomTypeOptions { strictInterpolationChecks: false; returnEmptyString: true; } } </code></pre> <h3>Changed defaults</h3> <ul> <li><code>fallbackLng</code> defaults to <code>false</code> instead of <code>['dev']</code>. Without a <code>fallbackLng</code>, i18next no longer requests <code>dev</code> from the backend (<code>/locales/dev/translation.json</code> with i18next-http-backend), and <code>saveMissing</code> sends missing keys for the current language instead of <code>dev</code>. With <code>supportedLngs</code> and no <code>fallbackLng</code>, an unsupported language leaves <code>language</code> and <code>languages</code> unset, as <code>fallbackLng: false</code> already did. Set <code>fallbackLng</code> to your main language, or to <code>'dev'</code> for the previous behavior.</li> <li><code>returnEmptyString</code> defaults to <code>false</code>: an empty translation falls back like a missing value (to the fallback language, the default value or the key), as <code>null</code> already does. i18next-cli writes <code>''</code> for untranslated keys in the other languages, which now fall back instead of rendering blank. An explicit <code>''</code> default from code still counts: <code>t('key', '')</code> and <code>t('key', { defaultValue: '' })</code> return <code>''</code>. Set <code>returnEmptyString: true</code> (in <code>init()</code> and in <code>CustomTypeOptions</code>) if an empty translation is meant to render nothing, for example for a Locize project with "preserve empty strings" on.</li> <li>Language codes without a region get their canonical casing, as codes with one already did: <code>'EN'</code> becomes <code>'en'</code>. Only the casing changes: aliases like <code>tl</code>, <code>iw</code> or <code>eng</code> stay as they are (<code>'TL'</code> becomes <code>'tl'</code>), and so do codes that are not BCP 47 (<code>en_US</code>, <code>my_custom</code>). i18next 26.7.0 and 26.7.1 warned that v27 turns <code>iw</code> into <code>he</code> or <code>tl</code> into <code>fil</code>; that was wrong and 26.7.2 corrects it. <code>iw</code>, <code>tl</code> and the like stay as they are. Set <code>cleanCode: false</code> to keep codes without a region exactly as they are. <code>cleanCode</code> is deprecated.</li> <li>types: <code>strictInterpolationChecks</code> defaults to <code>true</code>: <code>t()</code> needs the options for a string with variables, so a <code>{{name}}</code> cannot be left out of a call. Type a wrapper around <code>t()</code> with <code>ParseKeysWithoutVariables</code>, declare the variables <code>interpolation.defaultVariables</code> fills in with <code>defaultVariables</code> in <code>CustomTypeOptions</code>, or set <code>strictInterpolationChecks: false</code> to keep the v26 types (also for ICU and MF2 messages, whose arguments are required either way). The fixes below close the gap plural keys left.</li> <li>types: <code>returnEmptyString</code> defaults to <code>false</code> in <code>TypeOptions</code> too, so a key whose value is <code>''</code> is typed as the key.</li> </ul> <h3>Changed behavior</h3> <ul> <li>The logger and the post-processors belong to the instance. <code>use()</code> of a logger or a post-processor on one instance no longer changes the others, and the <code>init()</code> of one instance no longer rewires the logging of all of them. An instance from <code>createInstance()</code> does not see what the default <code>i18next</code> instance (or any other) registered: call <code>use()</code> on each instance. A clone (<code>cloneInstance()</code>) keeps its parent's logger and post-processors, also those its parent registers later, and what it registers itself stays its own. A plugin that calls <code>use()</code> from its own <code>init()</code> (the Locize InContext editor) registers right away, as before. <code>services.logger</code> stays the instance's logger, with <code>forward()</code>. In debug mode, a <code>postProcess</code> name that is not registered on the instance logs a warning.</li> <li>An object or an array without <code>returnObjects</code> is handled like a missing key: <code>t()</code> returns the default value if one is passed, else the key (with <code>appendNamespaceToMissingKey</code>, <code>parseMissingKeyHandler</code> and the post-processors applied), instead of the sentence <code>key '... (en)' returned an object instead of string.</code>, which ended up in the UI. It is not saved as missing, since the key exists. The debug warning stays, and <code>returnedObjectHandler</code> still decides what is returned when it is set (<code>returnedObjectHandler: (key) => `key '${key}' returned an object instead of string.`</code> brings a sentence back).</li> <li><code>addResources()</code> keeps every value: numbers, booleans and objects were dropped silently, only strings and arrays were added.</li> <li>The default escape no longer escapes <code>/</code>: <code>'$10/month'</code> stays <code>'$10/month'</code> instead of <code>'$10&#x2F;month'</code>, and dates in react-i18next's <code>Trans</code> no longer render as <code>17&#x2F;12&#x2F;2025</code> (<a href="https://github.com/i18next/i18next/discussions/2199">discussion 2199</a>). <code>&</code>, <code><</code>, <code>></code>, <code>"</code> and <code>'</code> are still escaped, which covers HTML text and quoted attributes; a <code>/</code> cannot end either. Update snapshots that contain <code>&#x2F;</code>, or pass your own <code>interpolation.escape</code> to keep escaping it.</li> <li>A language code from <code>lng</code>, <code>changeLanguage()</code>, a language detector or <code>loadLanguages()</code> that does not have the shape of <code>isSafeLanguageCode()</code> (letters, digits, <code>-</code>, <code>_</code>, <code>@</code> and <code>.</code>, no <code>..</code>, at most 128 characters) is refused unless it is configured: listed in <code>supportedLngs</code>, in a <code>fallbackLng</code> that is not a function or in <code>preload</code>, or a language in <code>resources</code>, as given to <code>init()</code>. <code>changeLanguage()</code> continues as with an unsupported code: with the detector's next code, else the fallback language, else none (with <code>fallbackLng: false</code>, a code refused at <code>init()</code> leaves <code>language</code> unset); <code>loadLanguages()</code> skips it. With <code>supportedLngs</code>, the input is matched as before (<code>'de-DE;q=0.9'</code> still gives <code>'de'</code>), and only an unsafe match is refused, which only <code>nonExplicitSupportedLngs</code> can return (<code>'de-<x>'</code> for a supported <code>'de'</code>). Without <code>supportedLngs</code>, a detector that returned <code>"><img src=x onerror=alert(1)></code> made that string <code>i18next.language</code>, which apps put into <code><html lang></code>, and backends were asked to load it. BCP 47, POSIX (<code>en_US.UTF-8@euro</code>, <code>sr@latin</code>) and private-use codes (<code>en-x-pirate</code>) pass; to use a code with other characters (<code>+</code>, spaces, <code>/</code>), list it in <code>supportedLngs</code>. In debug mode a refused code logs a warning.</li> <li><code>createInstance(options)</code> merges the defaults right away, without initializing: before <code>init()</code>, <code>instance.options</code> has the defaults, <code>getFixedT()</code> no longer throws (<code>t()</code> returns <code>''</code> until <code>init()</code>), and <code>debug: true</code> already shows the warnings before <code>init()</code>. <code>init()</code> still tells the options you set from the defaults, so a <code>keySeparator</code> or <code>nsSeparator</code> passed to <code>createInstance()</code> counts as set by you (<a href="https://redirect.github.com/i18next/i18next/issues/2426">#2426</a>). <code>loadNamespaces()</code> before <code>init()</code> does nothing and calls back, as it did for an instance without options.</li> <li><code>keySeparator: false</code> means flat keys only: a lookup no longer splits a key at the text <code>false</code> (<code>t('nestedfalsec')</code> returned the value of <code>nested.c</code>), and a selector path is joined with <code>.</code> like a key prefix, so selectors work on the flat keys (<code>$ => $['a.b']</code> and <code>$ => $.a.b</code> look up the flat key <code>'a.b'</code>; <code>$ => $.nested.c</code> no longer resolves <code>nested</code>, then <code>c</code>). types: with <code>keySeparator: false</code> in <code>CustomTypeOptions</code>, the keys are the flat keys (no <code>nestedfalsec</code> keys), a key containing <code>false</code> is no longer split, and <code>keyPrefix</code> takes the parts of the flat keys before a <code>.</code>, which is how <code>getFixedT()</code> joins it (<code>'nested'</code> for <code>'nested.c'</code>). A key prefix combined with selectors is not typed for flat keys.</li> </ul> <h3>Removed</h3> <ul> <li>The dotted language in the resource store calls: <code>getResource('en.translation.key')</code>, <code>addResource('en.translation.key', value)</code> and <code>addResourceBundle('en.translation', resources)</code>. Pass language, namespace and key as separate arguments; <code>addResource()</code>, <code>addResources()</code> and <code>addResourceBundle()</code> throw a <code>TypeError</code> for the dotted form. A language code with a <code>.</code> (<code>de_DE.UTF-8</code>) is now a language like any other.</li> <li><code>interpolation.prefixEscaped</code>, <code>suffixEscaped</code>, <code>nestingPrefixEscaped</code> and <code>nestingSuffixEscaped</code>, which were inserted into the RegExp unescaped. Pass the literal delimiters as <code>prefix</code>, <code>suffix</code>, <code>nestingPrefix</code> and <code>nestingSuffix</code>.</li> <li>types: <code>compatibilityJSON</code> (it had no effect since v24).</li> <li>types: the option types of plugins. <code>locizeLastUsed</code> is declared by locize-lastused (5.1.0 and later). <code>ReactOptions</code> stays importable from <code>'i18next'</code> but is empty: react-i18next fills it in (17.1.13 and later, and 18), so the <code>react</code> options are checked when react-i18next is in the program.</li> <li>types: the <code>_</code> and <code>$</code> helpers in <code>typescript/t.d.ts</code> and <code>typescript/options.d.ts</code> (<code>$FirstNamespace</code>, <code>_ValueOf</code> and 84 more) are no longer importable; every declaration of those files counted as exported. The other types of those files (<code>TOptionsBase</code>, <code>TFunctionSignature</code>, <code>ParseTReturn</code>, ...) are now exported on purpose. If you imported one of the hidden helpers, please open an issue: exporting it again does not break anything.</li> <li>The root <code>index.js</code>, a CommonJS shim that the <code>exports</code> map made unreachable.</li> </ul> <h3>Support</h3> <ul> <li>Node.js 22 or later (<code>engines</code>); CI tests 22, 24 and 26.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </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.0.0</h2> <p><strong>This is a major breaking release.</strong> It changes defaults that most setups had to override, gives every instance its own logger and post-processors, refuses language codes that look like markup or paths, and removes options that were broken or had no effect. 26.7 warned in debug mode about most of the runtime changes. The <a href="https://www.i18next.com/misc/migration-guide#v26.x.x-to-v27.0.0">migration guide</a> has the details; to keep the v26 behavior where an option exists:</p> <pre lang="js"><code>i18next.init({ fallbackLng: 'dev', // or better your source language: there is no implicit 'dev' any more returnEmptyString: true, // an empty translation is a translation again cleanCode: false, // keep codes without a region as they are ('EN' stays 'EN') }); </code></pre> <pre lang="ts"><code>declare module 'i18next' { interface CustomTypeOptions { strictInterpolationChecks: false; returnEmptyString: true; } } </code></pre> <h3>Changed defaults</h3> <ul> <li><code>fallbackLng</code> defaults to <code>false</code> instead of <code>['dev']</code>. Without a <code>fallbackLng</code>, i18next no longer requests <code>dev</code> from the backend (<code>/locales/dev/translation.json</code> with i18next-http-backend), and <code>saveMissing</code> sends missing keys for the current language instead of <code>dev</code>. With <code>supportedLngs</code> and no <code>fallbackLng</code>, an unsupported language leaves <code>language</code> and <code>languages</code> unset, as <code>fallbackLng: false</code> already did. Set <code>fallbackLng</code> to your main language, or to <code>'dev'</code> for the previous behavior.</li> <li><code>returnEmptyString</code> defaults to <code>false</code>: an empty translation falls back like a missing value (to the fallback language, the default value or the key), as <code>null</code> already does. i18next-cli writes <code>''</code> for untranslated keys in the other languages, which now fall back instead of rendering blank. An explicit <code>''</code> default from code still counts: <code>t('key', '')</code> and <code>t('key', { defaultValue: '' })</code> return <code>''</code>. Set <code>returnEmptyString: true</code> (in <code>init()</code> and in <code>CustomTypeOptions</code>) if an empty translation is meant to render nothing, for example for a Locize project with "preserve empty strings" on.</li> <li>Language codes without a region get their canonical casing, as codes with one already did: <code>'EN'</code> becomes <code>'en'</code>. Only the casing changes: aliases like <code>tl</code>, <code>iw</code> or <code>eng</code> stay as they are (<code>'TL'</code> becomes <code>'tl'</code>), and so do codes that are not BCP 47 (<code>en_US</code>, <code>my_custom</code>). i18next 26.7.0 and 26.7.1 warned that v27 turns <code>iw</code> into <code>he</code> or <code>tl</code> into <code>fil</code>; that was wrong and 26.7.2 corrects it. <code>iw</code>, <code>tl</code> and the like stay as they are. Set <code>cleanCode: false</code> to keep codes without a region exactly as they are. <code>cleanCode</code> is deprecated.</li> <li>types: <code>strictInterpolationChecks</code> defaults to <code>true</code>: <code>t()</code> needs the options for a string with variables, so a <code>{{name}}</code> cannot be left out of a call. Type a wrapper around <code>t()</code> with <code>ParseKeysWithoutVariables</code>, declare the variables <code>interpolation.defaultVariables</code> fills in with <code>defaultVariables</code> in <code>CustomTypeOptions</code>, or set <code>strictInterpolationChecks: false</code> to keep the v26 types (also for ICU and MF2 messages, whose arguments are required either way). The fixes below close the gap plural keys left.</li> <li>types: <code>returnEmptyString</code> defaults to <code>false</code> in <code>TypeOptions</code> too, so a key whose value is <code>''</code> is typed as the key.</li> </ul> <h3>Changed behavior</h3> <ul> <li>The logger and the post-processors belong to the instance. <code>use()</code> of a logger or a post-processor on one instance no longer changes the others, and the <code>init()</code> of one instance no longer rewires the logging of all of them. An instance from <code>createInstance()</code> does not see what the default <code>i18next</code> instance (or any other) registered: call <code>use()</code> on each instance. A clone (<code>cloneInstance()</code>) keeps its parent's logger and post-processors, also those its parent registers later, and what it registers itself stays its own. A plugin that calls <code>use()</code> from its own <code>init()</code> (the Locize InContext editor) registers right away, as before. <code>services.logger</code> stays the instance's logger, with <code>forward()</code>. In debug mode, a <code>postProcess</code> name that is not registered on the instance logs a warning.</li> <li>An object or an array without <code>returnObjects</code> is handled like a missing key: <code>t()</code> returns the default value if one is passed, else the key (with <code>appendNamespaceToMissingKey</code>, <code>parseMissingKeyHandler</code> and the post-processors applied), instead of the sentence <code>key '... (en)' returned an object instead of string.</code>, which ended up in the UI. It is not saved as missing, since the key exists. The debug warning stays, and <code>returnedObjectHandler</code> still decides what is returned when it is set (<code>returnedObjectHandler: (key) => `key '${key}' returned an object instead of string.`</code> brings a sentence back).</li> <li><code>addResources()</code> keeps every value: numbers, booleans and objects were dropped silently, only strings and arrays were added.</li> <li>The default escape no longer escapes <code>/</code>: <code>'$10/month'</code> stays <code>'$10/month'</code> instead of <code>'$10&#x2F;month'</code>, and dates in react-i18next's <code>Trans</code> no longer render as <code>17&#x2F;12&#x2F;2025</code> (<a href="https://github.com/i18next/i18next/discussions/2199">discussion 2199</a>). <code>&</code>, <code><</code>, <code>></code>, <code>"</code> and <code>'</code> are still escaped, which covers HTML text and quoted attributes; a <code>/</code> cannot end either. Update snapshots that contain <code>&#x2F;</code>, or pass your own <code>interpolation.escape</code> to keep escaping it.</li> <li>A language code from <code>lng</code>, <code>changeLanguage()</code>, a language detector or <code>loadLanguages()</code> that does not have the shape of <code>isSafeLanguageCode()</code> (letters, digits, <code>-</code>, <code>_</code>, <code>@</code> and <code>.</code>, no <code>..</code>, at most 128 characters) is refused unless it is configured: listed in <code>supportedLngs</code>, in a <code>fallbackLng</code> that is not a function or in <code>preload</code>, or a language in <code>resources</code>, as given to <code>init()</code>. <code>changeLanguage()</code> continues as with an unsupported code: with the detector's next code, else the fallback language, else none (with <code>fallbackLng: false</code>, a code refused at <code>init()</code> leaves <code>language</code> unset); <code>loadLanguages()</code> skips it. With <code>supportedLngs</code>, the input is matched as before (<code>'de-DE;q=0.9'</code> still gives <code>'de'</code>), and only an unsafe match is refused, which only <code>nonExplicitSupportedLngs</code> can return (<code>'de-<x>'</code> for a supported <code>'de'</code>). Without <code>supportedLngs</code>, a detector that returned <code>"><img src=x onerror=alert(1)></code> made that string <code>i18next.language</code>, which apps put into <code><html lang></code>, and backends were asked to load it. BCP 47, POSIX (<code>en_US.UTF-8@euro</code>, <code>sr@latin</code>) and private-use codes (<code>en-x-pirate</code>) pass; to use a code with other characters (<code>+</code>, spaces, <code>/</code>), list it in <code>supportedLngs</code>. In debug mode a refused code logs a warning.</li> <li><code>createInstance(options)</code> merges the defaults right away, without initializing: before <code>init()</code>, <code>instance.options</code> has the defaults, <code>getFixedT()</code> no longer throws (<code>t()</code> returns <code>''</code> until <code>init()</code>), and <code>debug: true</code> already shows the warnings before <code>init()</code>. <code>init()</code> still tells the options you set from the defaults, so a <code>keySeparator</code> or <code>nsSeparator</code> passed to <code>createInstance()</code> counts as set by you (<a href="https://redirect.github.com/i18next/i18next/issues/2426">#2426</a>). <code>loadNamespaces()</code> before <code>init()</code> does nothing and calls back, as it did for an instance without options.</li> <li><code>keySeparator: false</code> means flat keys only: a lookup no longer splits a key at the text <code>false</code> (<code>t('nestedfalsec')</code> returned the value of <code>nested.c</code>), and a selector path is joined with <code>.</code> like a key prefix, so selectors work on the flat keys (<code>$ => $['a.b']</code> and <code>$ => $.a.b</code> look up the flat key <code>'a.b'</code>; <code>$ => $.nested.c</code> no longer resolves <code>nested</code>, then <code>c</code>). types: with <code>keySeparator: false</code> in <code>CustomTypeOptions</code>, the keys are the flat keys (no <code>nestedfalsec</code> keys), a key containing <code>false</code> is no longer split, and <code>keyPrefix</code> takes the parts of the flat keys before a <code>.</code>, which is how <code>getFixedT()</code> joins it (<code>'nested'</code> for <code>'nested.c'</code>). A key prefix combined with selectors is not typed for flat keys.</li> </ul> <h3>Removed</h3> <ul> <li>The dotted language in the resource store calls: <code>getResource('en.translation.key')</code>, <code>addResource('en.translation.key', value)</code> and <code>addResourceBundle('en.translation', resources)</code>. Pass language, namespace and key as separate arguments; <code>addResource()</code>, <code>addResources()</code> and <code>addResourceBundle()</code> throw a <code>TypeError</code> for the dotted form. A language code with a <code>.</code> (<code>de_DE.UTF-8</code>) is now a language like any other.</li> <li><code>interpolation.prefixEscaped</code>, <code>suffixEscaped</code>, <code>nestingPrefixEscaped</code> and <code>nestingSuffixEscaped</code>, which were inserted into the RegExp unescaped. Pass the literal delimiters as <code>prefix</code>, <code>suffix</code>, <code>nestingPrefix</code> and <code>nestingSuffix</code>.</li> <li>types: <code>compatibilityJSON</code> (it had no effect since v24).</li> <li>types: the option types of plugins. <code>locizeLastUsed</code> is declared by locize-lastused (5.1.0 and later). <code>ReactOptions</code> stays importable from <code>'i18next'</code> but is empty: react-i18next fills it in (17.1.13 and later, and 18), so the <code>react</code> options are checked when react-i18next is in the program.</li> <li>types: the <code>_</code> and <code>$</code> helpers in <code>typescript/t.d.ts</code> and <code>typescript/options.d.ts</code> (<code>$FirstNamespace</code>, <code>_ValueOf</code> and 84 more) are no longer importable; every declaration of those files counted as exported. The other types of those files (<code>TOptionsBase</code>, <code>TFunctionSignature</code>, <code>ParseTReturn</code>, ...) are now exported on purpose. If you imported one of the hidden helpers, please open an issue: exporting it again does not break anything.</li> <li>The root <code>index.js</code>, a CommonJS shim that the <code>exports</code> map made unreachable.</li> </ul> <h3>Support</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/i18next/i18next/commit/e22c212df08632b26fd2f29e1d364919f4d342f3"><code>e22c212</code></a> 27.0.0</li> <li><a href="https://github.com/i18next/i18next/commit/846c76d85a46d5f0f364c81470c155aa4a82b172"><code>846c76d</code></a> changelog for 27.0.0</li> <li><a href="https://github.com/i18next/i18next/commit/94320bc32953b3b793e8edd9d390628b20f8ffec"><code>94320bc</code></a> feat!: i18next 27, a major version with breaking changes</li> <li>See full diff in <a href="https://github.com/i18next/i18next/compare/v26.7.2...v27.0.0">compare view</a></li> </ul> </details> <br /> [](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>
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.
