Skip to content

Commit bee318a

Browse files
authored
Merge branch 'main' into main
2 parents 64c2017 + 4123e8d commit bee318a

File tree

7 files changed

+29
-5
lines changed

7 files changed

+29
-5
lines changed

.github/workflows/welcome-close.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
const body = [
4040
`Thanks for your first contribution, @${author}! ${emoji}`,
4141
'',
42-
`We'd love to welcome you to the npmx community. Come and say hi on [Discord](https://chat.npmx.dev)! And once you've joined, visit [npmx.wamellow.com](https://npmx.wamellow.com/) to claim the **contributor** role.`,
42+
`We'd love to welcome you to the npmx community. Come and say hi on [Discord](https://build.npmx.dev)! And once you've joined, visit [npmx.wamellow.com](https://npmx.wamellow.com/) to claim the **contributor** role.`,
4343
].join('\n');
4444
4545
await github.rest.issues.createComment({

app/components/Package/ManagerSelect.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ function handleKeydown(event: KeyboardEvent) {
191191
:root[data-pm='yarn'] [data-pm-select='yarn'],
192192
:root[data-pm='bun'] [data-pm-select='bun'],
193193
:root[data-pm='deno'] [data-pm-select='deno'],
194-
:root[data-pm='vlt'] [data-pm-select='vlt'] {
194+
:root[data-pm='vlt'] [data-pm-select='vlt'],
195+
:root[data-pm='vp'] [data-pm-select='vp'] {
195196
display: inline-block;
196197
}
197198

app/components/Terminal/Execute.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ const copyExecuteCommand = () => copyExecute(getFullExecuteCommand())
9494
:root[data-pm='yarn'] [data-pm-cmd='yarn'],
9595
:root[data-pm='bun'] [data-pm-cmd='bun'],
9696
:root[data-pm='deno'] [data-pm-cmd='deno'],
97-
:root[data-pm='vlt'] [data-pm-cmd='vlt'] {
97+
:root[data-pm='vlt'] [data-pm-cmd='vlt'],
98+
:root[data-pm='vp'] [data-pm-cmd='vp'] {
9899
display: flex;
99100
}
100101

app/components/Terminal/Install.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ useCommandPaletteContextCommands(
412412
:root[data-pm='yarn'] [data-pm-cmd='yarn'],
413413
:root[data-pm='bun'] [data-pm-cmd='bun'],
414414
:root[data-pm='deno'] [data-pm-cmd='deno'],
415-
:root[data-pm='vlt'] [data-pm-cmd='vlt'] {
415+
:root[data-pm='vlt'] [data-pm-cmd='vlt'],
416+
:root[data-pm='vp'] [data-pm-cmd='vp'] {
416417
display: flex;
417418
}
418419

app/utils/install-command.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ export const packageManagers = [
5959
create: 'vlx',
6060
icon: 'i-custom-vlt',
6161
},
62+
{
63+
id: 'vp',
64+
label: 'vp',
65+
action: 'add',
66+
executeLocal: 'vp exec',
67+
executeRemote: 'vp dlx',
68+
create: 'vp create',
69+
icon: 'i-simple-icons:vite',
70+
},
6271
] as const
6372

6473
export type PackageManagerId = (typeof packageManagers)[number]['id']

app/utils/prehydrate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function initPreferencesOnPrehydrate() {
2121
] satisfies typeof ACCENT_COLOR_IDS)
2222

2323
// Valid package manager IDs
24-
const validPMs = new Set(['npm', 'pnpm', 'yarn', 'bun', 'deno', 'vlt'])
24+
const validPMs = new Set(['npm', 'pnpm', 'yarn', 'bun', 'deno', 'vlt', 'vp'])
2525

2626
// Read settings from localStorage
2727
const settings = JSON.parse(

test/unit/app/utils/install-command.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ describe('install command generation', () => {
3535
['bun', 'lodash'],
3636
['deno', 'npm:lodash'],
3737
['vlt', 'lodash'],
38+
['vp', 'lodash'],
3839
] as const)('%s → %s', (pm, expected) => {
3940
expect(
4041
getPackageSpecifier({
@@ -54,6 +55,7 @@ describe('install command generation', () => {
5455
['bun', '@trpc/server'],
5556
['deno', 'jsr:@trpc/server'], // Native JSR specifier preferred
5657
['vlt', '@trpc/server'],
58+
['vp', '@trpc/server'],
5759
] as const)('%s → %s', (pm, expected) => {
5860
expect(
5961
getPackageSpecifier({
@@ -73,6 +75,7 @@ describe('install command generation', () => {
7375
['bun', '@vue/shared'],
7476
['deno', 'npm:@vue/shared'], // Falls back to npm: compat
7577
['vlt', '@vue/shared'],
78+
['vp', '@vue/shared'],
7679
] as const)('%s → %s', (pm, expected) => {
7780
expect(
7881
getPackageSpecifier({
@@ -94,6 +97,7 @@ describe('install command generation', () => {
9497
['bun', 'bun add lodash'],
9598
['deno', 'deno add npm:lodash'],
9699
['vlt', 'vlt install lodash'],
100+
['vp', 'vp add lodash'],
97101
] as const)('%s → %s', (pm, expected) => {
98102
expect(
99103
getInstallCommand({
@@ -113,6 +117,7 @@ describe('install command generation', () => {
113117
['bun', 'bun add lodash@4.17.21'],
114118
['deno', 'deno add npm:lodash@4.17.21'],
115119
['vlt', 'vlt install lodash@4.17.21'],
120+
['vp', 'vp add lodash@4.17.21'],
116121
] as const)('%s → %s', (pm, expected) => {
117122
expect(
118123
getInstallCommand({
@@ -133,6 +138,7 @@ describe('install command generation', () => {
133138
['bun', 'bun add -d eslint'],
134139
['deno', 'deno add -D npm:eslint'],
135140
['vlt', 'vlt install -D eslint'],
141+
['vp', 'vp add -D eslint'],
136142
] as const)('%s → %s', (pm, expected) => {
137143
expect(
138144
getInstallCommand({
@@ -153,6 +159,7 @@ describe('install command generation', () => {
153159
['bun', 'bun add @trpc/server'],
154160
['deno', 'deno add jsr:@trpc/server'], // Native JSR preferred
155161
['vlt', 'vlt install @trpc/server'],
162+
['vp', 'vp add @trpc/server'],
156163
] as const)('%s → %s', (pm, expected) => {
157164
expect(
158165
getInstallCommand({
@@ -172,6 +179,7 @@ describe('install command generation', () => {
172179
['bun', 'bun add @trpc/server@10.0.0'],
173180
['deno', 'deno add jsr:@trpc/server@10.0.0'], // Native JSR with version
174181
['vlt', 'vlt install @trpc/server@10.0.0'],
182+
['vp', 'vp add @trpc/server@10.0.0'],
175183
] as const)('%s → %s', (pm, expected) => {
176184
expect(
177185
getInstallCommand({
@@ -192,6 +200,7 @@ describe('install command generation', () => {
192200
['bun', 'bun add @vue/shared'],
193201
['deno', 'deno add npm:@vue/shared'], // Falls back to npm: compat
194202
['vlt', 'vlt install @vue/shared'],
203+
['vp', 'vp add @vue/shared'],
195204
] as const)('%s → %s', (pm, expected) => {
196205
expect(
197206
getInstallCommand({
@@ -345,6 +354,7 @@ describe('install command generation', () => {
345354
['bun', ['bunx', 'eslint']],
346355
['deno', ['deno', 'run', 'npm:eslint']],
347356
['vlt', ['vlx', 'eslint']],
357+
['vp', ['vp', 'exec', 'eslint']],
348358
] as const)('%s → %s', (pm, expected) => {
349359
expect(
350360
getExecuteCommandParts({
@@ -364,6 +374,7 @@ describe('install command generation', () => {
364374
['bun', ['bunx', 'degit']],
365375
['deno', ['deno', 'run', 'npm:degit']],
366376
['vlt', ['vlx', 'degit']],
377+
['vp', ['vp', 'dlx', 'degit']],
367378
] as const)('%s → %s', (pm, expected) => {
368379
expect(
369380
getExecuteCommandParts({
@@ -383,6 +394,7 @@ describe('install command generation', () => {
383394
['bun', ['bun', 'create', 'vite']],
384395
['deno', ['deno', 'create', 'npm:vite']],
385396
['vlt', ['vlx', 'vite']],
397+
['vp', ['vp', 'create', 'vite']],
386398
] as const)('%s → %s', (pm, expected) => {
387399
expect(
388400
getExecuteCommandParts({

0 commit comments

Comments
 (0)