Skip to content

Conversation

@danielroe
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 10, 2026 1:54am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 10, 2026 1:54am
npmx-lunaria Ignored Ignored Feb 10, 2026 1:54am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

📝 Walkthrough

Walkthrough

The PR restructures the package page skeleton (app/components/Package/Skeleton.vue) and updates Playgrounds heading styling (app/components/Package/Playgrounds.vue). Changes: header/nav and metrics badges rearranged; package details, external links and install block restyled (monospace headings, terminal-style install); sidebar reworked into stacked subsections with adjusted sticky offset; README and several headings given font-mono; skeletons expanded and reorganised into modular subsections; i18n locale files updated extensively (many new placeholder keys, removals of skeleton.weekly, and added privacy_policy/trends/size/likes keys). No exported/public code APIs changed.

Possibly related PRs

Suggested labels

front, i18n

Suggested reviewers

  • serhalp
🚥 Pre-merge checks | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The pull request lacks any author-provided description, making it impossible to assess intent or scope. Add a clear pull request description explaining the changes made, their purpose, and how they improve the package page skeleton accuracy.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/package-skeleton

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
lunaria/files/ar-EG.json Localization changed, will be marked as complete.
lunaria/files/az-AZ.json Localization changed, will be marked as complete.
lunaria/files/bn-IN.json Localization changed, will be marked as complete.
lunaria/files/cs-CZ.json Localization changed, will be marked as complete.
lunaria/files/de-DE.json Localization changed, will be marked as complete.
lunaria/files/en-GB.json Localization changed, will be marked as complete.
lunaria/files/en-US.json Source changed, localizations will be marked as outdated.
lunaria/files/es-419.json Localization changed, will be marked as complete.
lunaria/files/es-ES.json Localization changed, will be marked as complete.
lunaria/files/fr-FR.json Localization changed, will be marked as complete.
lunaria/files/hi-IN.json Localization changed, will be marked as complete.
lunaria/files/hu-HU.json Localization changed, will be marked as complete.
lunaria/files/id-ID.json Localization changed, will be marked as complete.
lunaria/files/it-IT.json Localization changed, will be marked as complete.
lunaria/files/ja-JP.json Localization changed, will be marked as complete.
lunaria/files/ne-NP.json Localization changed, will be marked as complete.
lunaria/files/no-NO.json Localization changed, will be marked as complete.
lunaria/files/pl-PL.json Localization changed, will be marked as complete.
lunaria/files/pt-BR.json Localization changed, will be marked as complete.
lunaria/files/ru-RU.json Localization changed, will be marked as complete.
lunaria/files/te-IN.json Localization changed, will be marked as complete.
lunaria/files/uk-UA.json Localization changed, will be marked as complete.
lunaria/files/zh-CN.json Localization changed, will be marked as complete.
lunaria/files/zh-TW.json Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@danielroe danielroe merged commit f4832f7 into main Feb 10, 2026
20 checks passed
@danielroe danielroe deleted the fix/package-skeleton branch February 10, 2026 01:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
i18n/locales/fr-FR.json (1)

248-260: ⚠️ Potential issue | 🟡 Minor

Populate package.security_downgrade with French translations.

The empty object leaves French users with untranslated content. The base en.json contains eight keys (title, description_to_none_provenance, description_to_none_trustedPublisher, etc.) that the Vue code references, but all non-English locales have empty security_downgrade objects. Either populate this section with French translations or remove the override to allow fallback to English. This pattern appears across all locales and should be addressed systematically.

Comment on lines +21 to +23
"shortcuts": {
"section": {}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

vue-i18n empty object fallback behavior translation key

💡 Result:

  • If a locale’s messages are an empty object (e.g. ja: {}), then any $t('some.key') lookup is treated as missing and vue-i18n will fall back through fallbackLocale (if configured). This is the documented “missing key → fallbackLocale” behavior. [1]
  • If the key can’t be resolved in any locale in the fallback chain, vue-i18n ultimately returns the key (or whatever your missing handler returns). In vue-i18n v8, component-local lookups also have fallbackRoot; when disabled it “is returned the key”. [2]
  • Important edge case: if the key exists but its value is an empty string (""), vue-i18n considers it present (so it won’t fall back by default), which is a known/commonly reported behavior. [3] Some setups address this by disabling “return empty string” behavior (e.g. returnEmptyString: false in some versions/configs). [4]

🏁 Script executed:

# Check the i18n configuration to understand how pl-PL.json is used
fd -t f i18n.ts config | head -5

Repository: npmx-dev/npmx.dev

Length of output: 75


🏁 Script executed:

# Look at the structure of the pl-PL.json file and check if it's a merge-locale
head -20 i18n/locales/pl-PL.json

Repository: npmx-dev/npmx.dev

Length of output: 749


🏁 Script executed:

# Check the base English locale to see what the expected structure is
head -30 i18n/locales/en-US.json

Repository: npmx-dev/npmx.dev

Length of output: 94


🏁 Script executed:

# Read the i18n configuration to understand fallback chain and locale structure
cat -n config/i18n.ts

Repository: npmx-dev/npmx.dev

Length of output: 14333


🏁 Script executed:

# Check if there's an en.json (base English file without country variant)
fd -t f "en\.json" i18n/

Repository: npmx-dev/npmx.dev

Length of output: 81


🏁 Script executed:

# Check the directory structure of i18n/locales
ls -la i18n/locales/ | head -20

Repository: npmx-dev/npmx.dev

Length of output: 1204


🏁 Script executed:

# Verify if pl-PL.json has the full translation set or is a variant (merge-locale)
wc -l i18n/locales/pl-PL.json i18n/locales/en-US.json

Repository: npmx-dev/npmx.dev

Length of output: 132


🏁 Script executed:

# Check if there's a pl.json base file that pl-PL.json should merge with
fd -t f "^pl\.json$" i18n/locales/

Repository: npmx-dev/npmx.dev

Length of output: 43


🏁 Script executed:

# Search for fallback locale configuration in nuxt.config or i18n setup
fd -t f "nuxt.config\|setup" | head -10

Repository: npmx-dev/npmx.dev

Length of output: 43


🏁 Script executed:

# Check the nuxt.config.ts for i18n fallback configuration
grep -n "fallback\|i18n" nuxt.config.ts 2>/dev/null | head -20

Repository: npmx-dev/npmx.dev

Length of output: 1108


🏁 Script executed:

# Look for i18n plugin or setup files
fd -t f -e ts -e js i18n | grep -E "plugin|setup|index" | head -10

Repository: npmx-dev/npmx.dev

Length of output: 94


🏁 Script executed:

# Read the i18n configuration section in nuxt.config.ts
sed -n '308,340p' nuxt.config.ts

Repository: npmx-dev/npmx.dev

Length of output: 858


🏁 Script executed:

# Read the i18n plugin setup
cat -n app/plugins/i18n-loader.client.ts

Repository: npmx-dev/npmx.dev

Length of output: 769


Remove empty translation objects for clarity.

Empty objects like {} for shortcuts.section are unnecessary in pl-PL.json, a standalone locale file. While they don't prevent fallback, they add no value and can be omitted since translations are tracked separately for non-English locales. Prefer either providing actual translated content or removing the placeholder key entirely.

🔧 Suggested fix (remove empty placeholder)
-  "shortcuts": {
-    "section": {}
-  },
+  "shortcuts": {},
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"shortcuts": {
"section": {}
},
"shortcuts": {},

Comment on lines +20 to +22
"shortcuts": {
"section": {}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Step 1: Find the base locale file(s)
echo "=== Finding base locale files ==="
find lunaria/files -name "en*.json" -type f | head -20

echo ""
echo "=== Content check: list all locale files ==="
ls -la lunaria/files/*.json 2>/dev/null | head -30

Repository: npmx-dev/npmx.dev

Length of output: 2066


🏁 Script executed:

#!/bin/bash
# Compare key types between en-US.json and it-IT.json
python3 <<'PY'
import json

base_path = "lunaria/files/en-US.json"
it_path = "lunaria/files/it-IT.json"

def get_path(obj, path):
    cur = obj
    for p in path:
        if not isinstance(cur, dict) or p not in cur:
            return None
        cur = cur[p]
    return cur

def describe_value(v):
    if v is None:
        return "MISSING"
    elif isinstance(v, dict):
        if not v:
            return "dict (empty)"
        else:
            return f"dict with keys: {list(v.keys())}"
    elif isinstance(v, str):
        return f"string (len={len(v)})"
    elif isinstance(v, list):
        return f"list (len={len(v)})"
    else:
        return type(v).__name__

paths = [
    ("shortcuts.section", ["shortcuts", "section"]),
    ("settings.data_source", ["settings", "data_source"]),
    ("package.security_downgrade", ["package", "security_downgrade"]),
    ("package.trends", ["package", "trends"]),
    ("compare.facets.trends", ["compare", "facets", "trends"]),
]

with open(base_path, "r", encoding="utf-8") as f:
    base = json.load(f)
with open(it_path, "r", encoding="utf-8") as f:
    it = json.load(f)

print(f"Base locale: {base_path}\nTarget locale: {it_path}\n")
for name, path in paths:
    b = get_path(base, path)
    i = get_path(it, path)
    print(f"{name}:")
    print(f"  en-US: {describe_value(b)}")
    print(f"  it-IT: {describe_value(i)}")
    print()
PY

Repository: npmx-dev/npmx.dev

Length of output: 1417


🏁 Script executed:

#!/bin/bash
# Check i18n configuration to see if it-IT is a merge locale
echo "=== Searching for i18n configuration mentioning it-IT ==="
rg "it-IT|merge.*locale|mergeLocale" --type ts --type js --type json -i 2>/dev/null | grep -i "it\|merge\|config" | head -30

echo ""
echo "=== Checking for i18n configuration files ==="
find . -maxdepth 3 -name "*i18n*" -o -name "*locale*config*" -o -name "*translation*config*" 2>/dev/null | grep -v node_modules | head -20

echo ""
echo "=== Checking scripts for i18n:check:fix logic ==="
fd "compare-translations\|i18n" --type f | head -20

Repository: npmx-dev/npmx.dev

Length of output: 2166


🏁 Script executed:

#!/bin/bash
# Check the i18n configuration to see if it-IT is a merge locale
echo "=== config/i18n.ts (it-IT locale definition) ==="
rg -A 10 "code: 'it-IT'" config/i18n.ts

echo ""
echo "=== Understanding merge locale logic ==="
echo "Searching for how merge locales are identified and processed..."
rg -B 5 -A 10 "mergeLocale.*true" scripts/compare-translations.ts | head -40

echo ""
echo "=== Checking mergeLocaleObject function ==="
head -80 lunaria/prepare-json-files.ts | tail -60

Repository: npmx-dev/npmx.dev

Length of output: 3086


🏁 Script executed:

#!/bin/bash
# Check i18n system's fallback and rendering logic
echo "=== Checking i18n loader and fallback logic ==="
rg -A 15 "getMessage|getLocalizedString|fallback" app/plugins/i18n-loader.client.ts | head -50

echo ""
echo "=== Verifying package.trends matches exactly ==="
python3 <<'PY'
import json

with open("lunaria/files/en-US.json", "r") as f:
    base = json.load(f)
with open("lunaria/files/it-IT.json", "r") as f:
    it = json.load(f)

base_trends = base["package"]["trends"]
it_trends = it["package"]["trends"]

base_keys = set(base_trends.keys())
it_keys = set(it_trends.keys())

print(f"Base trends keys: {sorted(base_keys)}")
print(f"Italian trends keys: {sorted(it_keys)}")
print(f"Missing in Italian: {base_keys - it_keys}")
print(f"Extra in Italian: {it_keys - base_keys}")
print(f"All values are strings? {all(isinstance(v, str) for v in it_trends.values())}")
PY

Repository: npmx-dev/npmx.dev

Length of output: 823


🏁 Script executed:

#!/bin/bash
# Check what types of values are in package.trends
python3 <<'PY'
import json

with open("lunaria/files/it-IT.json", "r") as f:
    it = json.load(f)

trends = it["package"]["trends"]

for key, value in sorted(trends.items()):
    value_type = type(value).__name__
    if isinstance(value, dict):
        print(f"{key}: {value_type} with keys {list(value.keys())}")
    elif isinstance(value, str):
        print(f"{key}: string (len={len(value)})")
    else:
        print(f"{key}: {value_type} = {repr(value)}")
PY

Repository: npmx-dev/npmx.dev

Length of output: 564


Replace empty-object placeholders with actual structure or remove them to allow fallback.

These keys use empty objects as placeholders, but the base locale defines nested structures with multiple subkeys:

  • shortcuts.section: base has 3 subkeys (global, search, package)
  • settings.data_source: base has 6 subkeys
  • package.security_downgrade: base has 8 subkeys
  • compare.facets.trends: base has 1 subkey (title)

Empty objects will cause i18n lookups to fail or render incorrectly. Either populate them with translations matching the base schema or delete them to allow fallback to the English text.

The package.trends block (lines 292–311) is correctly implemented with all 16 required keys and should be kept as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant