Skip to content

Commit 3cf4362

Browse files
authored
Merge branch 'main' into fix/docs-page-improvements
2 parents 7ae64b8 + e2a7b59 commit 3cf4362

File tree

9 files changed

+537
-11
lines changed

9 files changed

+537
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ npmx.dev supports npm permalinks – just replace `npmjs.com` with `npmx.dev
114114
| `npmjs.com/org/nuxt` | [`npmx.dev/org/nuxt`](https://npmx.dev/org/nuxt) |
115115

116116
> [!TIP]
117-
> Want automatic redirects? Try the [npmx-replace browser extension](https://github.com/tylersayshi/npmx-replace-extension) (Chrome only for now) or the separate [npmx-redirect extension](https://github.com/iaverages/npmx-redirect) for [Chrome](https://chromewebstore.google.com/detail/lbhjgfgpnlihfmobnohoipeljollhlnb) / [Firefox](https://addons.mozilla.org/en-GB/firefox/addon/npmx-redirect/).
117+
> Want automatic redirects? Try the [npmx-redirect extension](https://github.com/iaverages/npmx-redirect) for [Chrome](https://chromewebstore.google.com/detail/lbhjgfgpnlihfmobnohoipeljollhlnb) / [Firefox](https://addons.mozilla.org/en-GB/firefox/addon/npmx-redirect/).
118118
119119
#### Not yet supported
120120

docs/content/1.getting-started/2.quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ Replace `npmjs.com` with `npmx.dev` in any npm URL:
4444
| `npmjs.com/~sindresorhus` | `npmx.dev/~sindresorhus` |
4545

4646
::tip
47-
Install the [npmx-replace browser extension](https://github.com/tylersayshi/npmx-replace-extension) for automatic redirects from npmjs.com.
47+
Install the [npmx-redirect extension](https://github.com/iaverages/npmx-redirect) for automatic redirects from npmjs.com.
4848
::

docs/content/2.guide/3.url-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Replace `npmjs.com` with `npmx.dev` (or `xnpmjs.com`) in any npm URL:
2121
| `npmjs.com/org/nuxt` | [`npmx.dev/org/nuxt`](https://npmx.dev/org/nuxt) |
2222

2323
::tip
24-
Install the [npmx-replace browser extension](https://github.com/tylersayshi/npmx-replace-extension) for automatic redirects.
24+
Install the [npmx-redirect extension](https://github.com/iaverages/npmx-redirect) for automatic redirects from npmjs.com.
2525
::
2626

2727
## Use simpler URLs

i18n/locales/ar-EG.json

Lines changed: 441 additions & 1 deletion
Large diffs are not rendered by default.

i18n/locales/fr-FR.json

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"social": "réseaux sociaux",
2020
"chat": "espace de discussion",
2121
"builders_chat": "builders",
22-
"keyboard_shortcuts": "raccourcis clavier"
22+
"keyboard_shortcuts": "raccourcis clavier",
23+
"brand": "Marque"
2324
},
2425
"shortcuts": {
2526
"section": {
@@ -305,7 +306,8 @@
305306
"refs": "{count} référence | {count} références",
306307
"assets": "{count} ressource | {count} ressources"
307308
},
308-
"view_source": "Voir la source"
309+
"view_source": "Voir la source",
310+
"skills_cli": "Skills CLI"
309311
},
310312
"links": {
311313
"main": "principal",
@@ -477,7 +479,8 @@
477479
"cancel_add": "Annuler l'ajout de propriétaire",
478480
"add_owner": "+ Ajouter un propriétaire",
479481
"show_more": "(afficher {count} de plus)",
480-
"show_less": "(afficher moins)"
482+
"show_less": "(afficher moins)",
483+
"maintainer_template": "Mainteneur {name}"
481484
},
482485
"trends": {
483486
"chart_assistive_text": {
@@ -1105,7 +1108,8 @@
11051108
"table_view": "Tableau",
11061109
"charts_view": "Graphiques",
11071110
"bar_chart_nav_hint": "Utilisez ↑ ↓",
1108-
"line_chart_nav_hint": "Utilisez ← →"
1111+
"line_chart_nav_hint": "Utilisez ← →",
1112+
"no_chartable_data": "Aucune donnée représentable"
11091113
},
11101114
"selector": {
11111115
"search_label": "Rechercher des paquets",
@@ -1205,7 +1209,11 @@
12051209
},
12061210
"trends": {
12071211
"title": "Comparer les tendances"
1208-
}
1212+
},
1213+
"select_all_category_facets": "Sélectionner toutes les facettes de la catégorie",
1214+
"deselect_all_category_facets": "Désélectionner toutes les facettes de la catégorie",
1215+
"selected_all_category_facets": "Toutes les facettes de la catégorie sont sélectionnées",
1216+
"deselected_all_category_facets": "Toutes les facettes de la catégorie sont désélectionnées"
12091217
},
12101218
"file_changes": "Modifications de fichiers",
12111219
"files_count": "{count} fichiers",
@@ -1427,5 +1435,55 @@
14271435
"selection": "0 sélectionné | 1 sélectionné | {count} sélectionnés",
14281436
"shortcut": "Appuyez sur « {key} » pour cibler les actions",
14291437
"button_close_aria_label": "Fermer la barre d'actions"
1438+
},
1439+
"logo_menu": {
1440+
"copy_svg": "Copier le logo en SVG",
1441+
"copied": "Copié !",
1442+
"browse_brand": "Parcourir la marque"
1443+
},
1444+
"brand": {
1445+
"title": "Marque",
1446+
"heading": "Marque",
1447+
"meta_description": "Ressources et directives de la marque npmx",
1448+
"intro": "Bienvenue sur la page des ressources de la marque npmx",
1449+
"logos": {
1450+
"title": "Logos",
1451+
"description": "Télécharger les logos officiels de npmx",
1452+
"wordmark": "Logotype",
1453+
"wordmark_alt": "Logotype npmx",
1454+
"wordmark_light_alt": "Logotype npmx clair",
1455+
"mark": "Symbole",
1456+
"mark_alt": "Symbole npmx",
1457+
"mark_light_alt": "Symbole npmx clair",
1458+
"on_dark": "Sur fond sombre",
1459+
"on_light": "Sur fond clair",
1460+
"download_svg": "Télécharger en SVG",
1461+
"download_png": "Télécharger en PNG",
1462+
"download_svg_aria": "Télécharger {name} en SVG",
1463+
"download_png_aria": "Télécharger {name} en PNG"
1464+
},
1465+
"customize": {
1466+
"title": "Personnalisation",
1467+
"description": "Personnalisez l'apparence du logo",
1468+
"accent_label": "Couleur d'accentuation",
1469+
"bg_label": "Couleur de fond",
1470+
"download_svg_aria": "Télécharger le logo personnalisé en SVG",
1471+
"download_png_aria": "Télécharger le logo personnalisé en PNG"
1472+
},
1473+
"typography": {
1474+
"title": "Typographie",
1475+
"description": "Polices utilisées dans npmx",
1476+
"sans": "Sans",
1477+
"sans_desc": "Police du contenu principal",
1478+
"mono": "Mono",
1479+
"mono_desc": "Police du code",
1480+
"pangram": "Phrase contenant tous les caractères",
1481+
"numbers": "Chiffres"
1482+
},
1483+
"guidelines": {
1484+
"title": "Directives de marque",
1485+
"message": "Pour un usage commercial, veuillez nous contacter.",
1486+
"discord_link_text": "Discussion Discord"
1487+
}
14301488
}
14311489
}

server/utils/parse-package-params.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ export function parsePackageParams(segments: string[]): {
66
rawPackageName: string
77
rawVersion: string | undefined
88
} {
9-
const vIndex = segments.indexOf('v')
9+
let vIndex = segments.indexOf('v')
10+
11+
// If we encounter ".../v/v/...", treat the second "v" as the version delimiter.
12+
if (segments[vIndex] === 'v' && segments[vIndex + 1] === 'v') {
13+
vIndex++
14+
}
1015

1116
if (vIndex !== -1 && vIndex < segments.length - 1) {
1217
return {

shared/utils/parse-package-param.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ export interface ParsedPackageParams {
3737
*/
3838
export function parsePackageParam(pkgParam: string): ParsedPackageParams {
3939
const segments = pkgParam.split('/')
40-
const vIndex = segments.indexOf('v')
40+
let vIndex = segments.indexOf('v')
41+
42+
// If we encounter ".../v/v/...", treat the second "v" as the version delimiter.
43+
if (segments[vIndex] === 'v' && segments[vIndex + 1] === 'v') {
44+
vIndex++
45+
}
4146

4247
if (vIndex !== -1 && vIndex < segments.length - 1) {
4348
return {

test/unit/server/utils/parse-package-params.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,14 @@ describe('parsePackageParams', () => {
4949
rawVersion: '1.0.0',
5050
})
5151
})
52+
53+
it('parses scoped package names whose package segment is literally v', () => {
54+
const segments = ['@scope', 'v', 'v', '1.2.3']
55+
const result = parsePackageParams(segments)
56+
expect(result).toEqual({
57+
rawPackageName: '@scope/v',
58+
rawVersion: '1.2.3',
59+
})
60+
})
5261
})
5362
})

test/unit/shared/utils/parse-package-param.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ describe('parsePackageParam', () => {
8585
rest: [],
8686
})
8787
})
88+
89+
it('parses scoped package names whose package segment is literally v', () => {
90+
const result = parsePackageParam('@scope/v/v/1.2.3/dist/index.js')
91+
expect(result).toEqual({
92+
packageName: '@scope/v',
93+
version: '1.2.3',
94+
rest: ['dist', 'index.js'],
95+
})
96+
})
8897
})
8998

9099
describe('edge cases', () => {

0 commit comments

Comments
 (0)