@okam/next-component 2.0.0 → 2.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 2.0.1 (2026-02-20)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **workspace:** migrate from npm to pnpm ([#399](https://github.com/OKAMca/stack/pull/399))
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **next-component:** link doesnt localize anchor href anymore ([f960c993](https://github.com/OKAMca/stack/commit/f960c993))
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - Claude Opus 4.5
14
+ - Marie-Maxime Tanguay @marie-maxime
15
+ - poclerson
16
+
1
17
  # 2.0.0 (2026-02-05)
2
18
 
3
19
  ### 🚀 Features
@@ -23,8 +23,9 @@ function useLinkLocale(props) {
23
23
  }
24
24
  function localizeHref(href, locale) {
25
25
  const hrefString = href.toString();
26
+ const isAnchor = hrefString.startsWith("#");
26
27
  const isExternal = /^[a-z]+:\/\//i.test(hrefString) || hrefString.startsWith("//");
27
- if (isExternal)
28
+ if (isExternal || isAnchor)
28
29
  return hrefString;
29
30
  if (locale != null && locale !== false) {
30
31
  return `/${locale}${hrefString}`;
@@ -21,8 +21,9 @@ function useLinkLocale(props) {
21
21
  }
22
22
  function localizeHref(href, locale) {
23
23
  const hrefString = href.toString();
24
+ const isAnchor = hrefString.startsWith("#");
24
25
  const isExternal = /^[a-z]+:\/\//i.test(hrefString) || hrefString.startsWith("//");
25
- if (isExternal)
26
+ if (isExternal || isAnchor)
26
27
  return hrefString;
27
28
  if (locale != null && locale !== false) {
28
29
  return `/${locale}${hrefString}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okam/next-component",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "repository": {
5
5
  "url": "https://github.com/OKAMca/stack.git"
6
6
  },