Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FROM_REF: ${{ steps.version.outputs.from }}
run: node scripts/release-notes.ts "$FROM_REF" > /tmp/release-notes.md
TO_REF: ${{ steps.version.outputs.next }}
run: node scripts/release-notes.ts "$FROM_REF" "$TO_REF" > /tmp/release-notes.md

- name: 🚀 Create GitHub Release
if: steps.check.outputs.skip == 'false'
Expand Down
1 change: 0 additions & 1 deletion app/components/Package/TimelineChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ function stackbarTooltipPoints(
}
})
.filter(point => point.size > 0)
.toReversed()
}

function areAllValuesEqual(array: number[]): boolean {
Expand Down
22 changes: 13 additions & 9 deletions app/components/Package/TrendsChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1758,23 +1758,25 @@ const copyEmbedUrl = () => copyEmbed(embedUrl.value)

<!-- Custom legend for multiple series -->
<template #legend="{ legend }">
<div class="flex gap-x-6 gap-y-2 flex-wrap justify-center text-sm">
<div class="flex flex-wrap justify-center gap-x-6 gap-y-2 text-sm">
<template v-if="isMultiPackageMode">
<button
v-for="datapoint in legend"
:key="datapoint.name"
:aria-pressed="datapoint.isSegregated"
:aria-label="datapoint.name"
type="button"
class="flex gap-1 place-items-center"
class="flex shrink-0 items-center gap-1 whitespace-nowrap"
@click="datapoint.segregate()"
>
<div class="h-3 w-3">
<div class="h-3 w-3 shrink-0">
<svg viewBox="0 0 2 2" class="w-full">
<rect x="0" y="0" width="2" height="2" rx="0.3" :fill="datapoint.color" />
</svg>
</div>

<span
class="shrink-0 whitespace-nowrap"
:style="{
textDecoration: datapoint.isSegregated ? 'line-through' : undefined,
}"
Expand All @@ -1786,24 +1788,24 @@ const copyEmbedUrl = () => copyEmbed(embedUrl.value)

<!-- Single series legend (no user interaction) -->
<template v-else-if="legend.length > 0">
<div class="flex gap-1 place-items-center">
<div class="h-3 w-3">
<div class="flex shrink-0 items-center gap-1 whitespace-nowrap">
<div class="h-3 w-3 shrink-0">
<svg viewBox="0 0 2 2" class="w-full">
<rect x="0" y="0" width="2" height="2" rx="0.3" :fill="legend[0]?.color" />
</svg>
</div>
<span>
<span class="shrink-0 whitespace-nowrap">
{{ legend[0]?.name }}
</span>
</div>
</template>

<!-- Estimation extra legend item -->
<div
class="flex gap-1 place-items-center"
class="flex shrink-0 items-center gap-1 whitespace-nowrap"
v-if="supportsEstimation || hasDownloadAnomalies"
>
<svg viewBox="0 0 20 2" width="20">
<svg viewBox="0 0 20 2" width="20" class="shrink-0">
<line
x1="0"
y1="1"
Expand All @@ -1814,7 +1816,9 @@ const copyEmbedUrl = () => copyEmbed(embedUrl.value)
stroke-linecap="round"
/>
</svg>
<span class="text-fg-subtle">{{ $t('package.trends.legend_estimation') }}</span>
<span class="shrink-0 whitespace-nowrap text-fg-subtle">
{{ $t('package.trends.legend_estimation') }}
</span>
</div>
</div>
</template>
Expand Down
6 changes: 3 additions & 3 deletions app/components/Package/VersionDistribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -506,13 +506,13 @@ const chartConfig = computed<VueUiXyConfig>(() => {
<template #legend="{ legend }">
<div class="flex gap-4 flex-wrap justify-center pt-8">
<template v-if="legend.length > 0">
<div class="flex gap-1 place-items-center">
<div class="h-3 w-3">
<div class="flex gap-1 shrink-0 items-center whitespace-nowrap">
<div class="h-3 w-3 shrink-0">
<svg viewBox="0 0 2 2" class="w-full">
<rect x="0" y="0" width="2" height="2" rx="0.3" :fill="legend[0]?.color" />
</svg>
</div>
<span>
<span class="shrink-0 whitespace-nowrap">
{{ legend[0]?.name }}
</span>
</div>
Expand Down
30 changes: 30 additions & 0 deletions app/pages/package-docs/[...path].vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,24 @@ const stickyStyle = computed(() => {
@apply text-xs text-fg-subtle hover:text-fg block py-0.5 truncate;
}

.toc-content li.docs-toc-group:not(:first-child) {
@apply mt-6;
}

/* Ellipsise long entry points from the start so the subpath tail stays readable.
Flipping `direction` moves the overflow, and its ellipsis, to the page's
inline-start edge; `text-align` pulls labels that fit back to that same edge.
The label is wrapped in <bdi> so its own text keeps its natural direction. */
.toc-content .docs-toc-group > a {
direction: rtl;
text-align: left;
}

html[dir='rtl'] .toc-content .docs-toc-group > a {
direction: ltr;
text-align: right;
}

/* Main docs content container - no max-width to use full space */
.docs-content {
@apply max-w-none;
Expand All @@ -254,6 +272,18 @@ const stickyStyle = computed(() => {
top: var(--combined-header-height);
}

.docs-content .docs-group {
scroll-margin-top: var(--combined-header-height);
}

.docs-content .docs-group-title {
@apply static mt-20;
}

.docs-content .docs-group:first-child .docs-group-title {
@apply mt-0;
}

/* Individual symbol articles */
.docs-content .docs-symbol {
@apply mb-10 pb-10 border-b border-border/30 last:border-0;
Expand Down
8 changes: 8 additions & 0 deletions app/pages/package/[[org]]/[name]/versions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,14 @@ const flatItems = computed<FlatItem[]>(() => {
<span class="text-xs text-fg-muted truncate" :title="item.versions[0]" dir="ltr"
>v{{ item.versions[0] }}</span
>
<ProvenanceBadge
v-if="fullVersionMap?.get(item.versions[0]!)?.trustStatus?.provenance"
:package-name="packageName"
:version="item.versions[0]!"
compact
:linked="false"
class="relative z-10"
/>
<span
v-if="groupDownloadsMap.has(item.groupKey)"
class="ms-auto max-w-32 md:w-32 grid grid-flow-col auto-cols-max items-center justify-end gap-1 text-xs text-fg-muted tabular-nums shrink-0"
Expand Down
7 changes: 5 additions & 2 deletions app/utils/npm/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ export async function fetchAllPackageVersions(packageName: string): Promise<Pack
.map(([version, meta]) => ({
version,
time: meta.time,
hasProvenance: meta.provenance,
hasTrustedPublisher: meta.trustedPublisher,
trustStatus: {
provenance: meta.provenance ?? false,
trustedPublisher: meta.trustedPublisher ?? false,
stagedPublish: meta.staged ?? false,
},
deprecated: meta.deprecated,
}))
.sort((a, b) => compare(b.version, a.version))
Expand Down
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"@lydell/node-pty": "1.2.0-beta.15",
"citty": "^0.2.2",
"h3-next": "npm:h3@2.0.1-rc.26",
"obug": "^2.1.3",
"srvx": "^0.12.0",
"obug": "^3.0.0",
"srvx": "^1.0.0",
"valibot": "^1.4.2",
"validate-npm-package-name": "^8.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions cli/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineConfig({
dts: true,
outDir: 'dist',
deps: {
resolveDepSubpath: true,
neverBundle: ['@lydell/node-pty'],
},
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@unocss/preset-wind4": "66.7.5",
"@upstash/redis": "1.38.2",
"@vercel/speed-insights": "2.0.0",
"@vite-pwa/assets-generator": "1.0.2",
"@vite-pwa/assets-generator": "2.0.0",
"@vite-pwa/nuxt": "1.1.1",
"@vueuse/core": "14.4.0",
"@vueuse/integrations": "14.4.0",
Expand Down Expand Up @@ -112,7 +112,7 @@
"vite-plugin-pwa": "1.3.0",
"vite-plus": "catalog:vite-plus",
"vue": "3.5.42",
"vue-data-ui": "3.25.0",
"vue-data-ui": "3.25.6",
"vue-router": "5.2.0"
},
"devDependencies": {
Expand All @@ -138,7 +138,7 @@
"fast-check": "4.9.0",
"h3": "1.15.11",
"h3-next": "npm:h3@2.0.1-rc.26",
"knip": "6.34.0",
"knip": "6.35.1",
"markdown-it-anchor": "9.2.1",
"msw": "catalog:msw",
"msw-storybook-addon": "catalog:storybook",
Expand Down
Loading
Loading