Skip to content

Commit 35d8b2f

Browse files
authored
Merge branch 'main' into chore/test-route-overriting
2 parents 9adacac + 4df6c2a commit 35d8b2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2832
-585
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "\U0001F41E Bug report"
2+
description: Create a report to help us improve npmx
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Please carefully read the contribution docs before creating a bug report
8+
👉 https://github.com/npmx-dev/npmx.dev/blob/main/CONTRIBUTING.md
9+
- type: textarea
10+
id: bug-description
11+
attributes:
12+
label: Describe the bug
13+
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
14+
placeholder: Bug description
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: additional
19+
attributes:
20+
label: Additional context
21+
description: If applicable, add any other context about the problem here
22+
- type: textarea
23+
id: logs
24+
attributes:
25+
label: Logs
26+
description: |
27+
Optional if you have reproduction steps. Please try not to insert an image but copy paste the log text.
28+
render: shell-script

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 📚 npmx documentation
4+
url: https://docs.npmx.dev/
5+
about: Check the documentation for usage of npmx
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: '🚀 Feature request'
2+
description: Suggest a feature that will improve npmx
3+
labels: ['pending triage']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for taking the time to fill out this feature request!
9+
10+
Please carefully read the contribution docs before suggesting a new feature
11+
👉 https://github.com/npmx-dev/npmx.dev/blob/main/CONTRIBUTING.md
12+
- type: textarea
13+
id: feature-description
14+
attributes:
15+
label: Describe the feature
16+
description: A clear and concise description of what you think would be a helpful addition to npmx, including the possible use cases and alternatives you have considered. If you have a working prototype or module that implements it, please include a link.
17+
placeholder: Feature description
18+
validations:
19+
required: true
20+
- type: checkboxes
21+
id: additional-info
22+
attributes:
23+
label: Additional information
24+
description: Additional information that helps us decide how to proceed.
25+
options:
26+
- label: Would you be willing to help implement this feature?
27+
- type: checkboxes
28+
id: required-info
29+
attributes:
30+
label: Final checks
31+
description: Before submitting, please make sure you do the following
32+
options:
33+
- label: Read the [contribution guide](https://github.com/npmx-dev/npmx.dev/blob/main/CONTRIBUTING.md).
34+
required: true
35+
- label: Check existing [issues](https://github.com/npmx-dev/npmx.dev/issues).
36+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
### 🔗 Linked issue
2+
3+
<!-- Please ensure there is an open issue and mention its number. For example, "resolves #123" -->
4+
5+
### 🧭 Context
6+
7+
<!-- Brief background and why this change is needed -->
8+
9+
<!-- High-level summary of what changed -->
10+
11+
### 📚 Description
12+
13+
<!-- Describe your changes in detail. Why is this change required? What problem does it solve? -->
14+
15+
<!-- If you used AI tools to help with this contribution, please ensure the PR description and code reflect your own understanding.
16+
Write in your own voice rather than copying AI-generated text. -->
17+
18+
<!----------------------------------------------------------------------
19+
Before creating the pull request, please make sure you do the following:
20+
21+
- Check that there isn't already a PR that solves the problem the same way. If you find a duplicate, please help us reviewing it.
22+
- Ensure that PR title follows conventional commits (https://www.conventionalcommits.org)
23+
- Update the corresponding documentation if needed.
24+
- Include relevant tests that fail without this PR but pass with it.
25+
- Add any additional context, tradeoffs, follow-ups, or things reviewers should be aware of.
26+
27+
Thank you for contributing to npmx!
28+
----------------------------------------------------------------------->

app/components/Button/Base.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script setup lang="ts">
2+
import type { IconClass } from '~/types'
3+
24
const props = withDefaults(
35
defineProps<{
46
disabled?: boolean
@@ -8,7 +10,7 @@ const props = withDefaults(
810
ariaKeyshortcuts?: string
911
block?: boolean
1012
11-
classicon?: string
13+
classicon?: IconClass
1214
}>(),
1315
{
1416
type: 'button',

app/components/Compare/PackageSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ function handleFocus() {
307307
v-if="result.description"
308308
class="text-xs text-fg-muted truncate mt-0.5 w-full block"
309309
>
310-
{{ result.description }}
310+
{{ decodeHtmlEntities(result.description) }}
311311
</span>
312312
</ButtonBase>
313313
</div>

app/components/Header/SearchBox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const showSearchBar = computed(() => {
1616
return route.name !== 'index'
1717
})
1818
19-
const { model: searchQuery, flushUpdateUrlQuery } = useGlobalSearch()
19+
const { model: searchQuery, flushUpdateUrlQuery } = useGlobalSearch('header')
2020
2121
function handleSubmit() {
2222
flushUpdateUrlQuery()

app/components/Link/Base.vue

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
11
<script setup lang="ts">
22
import type { NuxtLinkProps } from '#app'
3+
import type { IconClass } from '~/types'
34
45
const props = withDefaults(
5-
defineProps<
6-
{
7-
/** Disabled links will be displayed as plain text */
8-
disabled?: boolean
9-
/**
10-
* `type` should never be used, because this will always be a link.
11-
* */
12-
type?: never
13-
variant?: 'button-primary' | 'button-secondary' | 'link'
14-
size?: 'small' | 'medium'
15-
block?: boolean
6+
defineProps<{
7+
/** Disabled links will be displayed as plain text */
8+
disabled?: boolean
9+
/**
10+
* `type` should never be used, because this will always be a link.
11+
* */
12+
type?: never
13+
variant?: 'button-primary' | 'button-secondary' | 'link'
14+
size?: 'small' | 'medium'
15+
block?: boolean
1616
17-
ariaKeyshortcuts?: string
17+
ariaKeyshortcuts?: string
1818
19-
/**
20-
* Don't use this directly. This will automatically be set to `_blank` for external links passed via `to`.
21-
*/
22-
target?: never
19+
/**
20+
* Don't use this directly. This will automatically be set to `_blank` for external links passed via `to`.
21+
*/
22+
target?: never
2323
24-
/**
25-
* Don't use this directly. This will automatically be set for external links passed via `to`.
26-
*/
27-
rel?: never
24+
/**
25+
* Don't use this directly. This will automatically be set for external links passed via `to`.
26+
*/
27+
rel?: never
2828
29-
classicon?: string
29+
classicon?: IconClass
3030
31-
to?: NuxtLinkProps['to']
31+
to?: NuxtLinkProps['to']
3232
33-
/** always use `to` instead of `href` */
34-
href?: never
33+
/** always use `to` instead of `href` */
34+
href?: never
3535
36-
/** should only be used for links where the context makes it very clear they are clickable. Don't just use this, because you don't like underlines. */
37-
noUnderline?: boolean
38-
} & NuxtLinkProps
39-
>(),
36+
/** should only be used for links where the context makes it very clear they are clickable. Don't just use this, because you don't like underlines. */
37+
noUnderline?: boolean
38+
}>(),
4039
{ variant: 'link', size: 'medium' },
4140
)
4241

app/components/Package/Playgrounds.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup lang="ts">
22
import type { PlaygroundLink } from '#shared/types'
3-
import { decodeHtmlEntities } from '~/utils/formatters'
43
54
const props = defineProps<{
65
links: PlaygroundLink[]
@@ -130,7 +129,7 @@ function focusMenuItem(index: number) {
130129
:class="[getIcon(firstLink.provider), getColor(firstLink.provider), 'w-4 h-4 shrink-0']"
131130
aria-hidden="true"
132131
/>
133-
<span class="truncate text-fg-muted">{{ decodeHtmlEntities(firstLink.label) }}</span>
132+
<span class="truncate text-fg-muted">{{ firstLink.label }}</span>
134133
</a>
135134
</TooltipApp>
136135

@@ -186,7 +185,7 @@ function focusMenuItem(index: number) {
186185
:class="[getIcon(link.provider), getColor(link.provider), 'w-4 h-4 shrink-0']"
187186
aria-hidden="true"
188187
/>
189-
<span class="truncate">{{ decodeHtmlEntities(link.label) }}</span>
188+
<span class="truncate">{{ link.label }}</span>
190189
</a>
191190
</TooltipApp>
192191
</div>

app/components/Package/TableRow.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const allMaintainersText = computed(() => {
6969
v-if="isColumnVisible('description')"
7070
class="py-2 px-3 text-sm text-fg-muted max-w-xs truncate"
7171
>
72-
{{ pkg.description || '-' }}
72+
{{ decodeHtmlEntities(pkg.description || '-') }}
7373
</td>
7474

7575
<!-- Downloads -->

0 commit comments

Comments
 (0)