Skip to content
Draft
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
7 changes: 4 additions & 3 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
".": "./dist/index.mjs"
},
"scripts": {
"build": "tsdown",
"build": "vp pack",
"dev": "NPMX_CLI_DEV=true node src/cli.ts",
"dev:debug": "DEBUG=npmx-connector NPMX_CLI_DEV=true node src/cli.ts",
"dev:mock": "NPMX_CLI_DEV=true node src/mock-server.ts",
Expand All @@ -42,8 +42,9 @@
"devDependencies": {
"@types/node": "24.12.2",
"@types/validate-npm-package-name": "4.0.2",
"tsdown": "0.21.7",
"typescript": "6.0.2"
"typescript": "6.0.2",
"vite": "catalog:",
"vite-plus": "catalog:"
},
"engines": {
"node": ">=24.4.0"
Expand Down
2 changes: 1 addition & 1 deletion cli/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from 'tsdown'
import { defineConfig } from 'vite-plus/pack'

export default defineConfig({
entry: ['src/index.ts', 'src/cli.ts'],
Expand Down
7 changes: 7 additions & 0 deletions cli/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import tsdownConfig from './tsdown.config.js'

import { defineConfig } from 'vite-plus'

export default defineConfig({
pack: tsdownConfig,
})
5 changes: 5 additions & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, unknown>
export default component
}
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"start:playwright:webserver": "TEST=1 vp run preview --port 5678",
"storybook": "STORYBOOK=true storybook dev -p 6006",
"build-storybook": "STORYBOOK=true storybook build",
"chromatic": "chromatic"
"chromatic": "chromatic",
"prepare": "vp config"
},
"dependencies": {
"@atcute/bluesky-richtext-segmenter": "3.0.0",
Expand Down Expand Up @@ -110,7 +111,7 @@
"validate-npm-package-name": "8.0.0",
"virtua": "0.49.0",
"vite-plugin-pwa": "1.3.0",
"vite-plus": "0.1.20",
"vite-plus": "https://pkg.pr.new/voidzero-dev/vite-plus@670c987e4097d4e5d53bb4c0521c8bf643a33cf5",
"vue": "3.5.38",
Comment on lines 113 to 115

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The package vite-plus is declared in dependencies with a hardcoded URL, but it is also declared in devDependencies using "catalog:" (line 154). Having the same package in both dependencies and devDependencies is redundant and can cause package resolution issues.

Since vite-plus is a build-time tool, it should be removed from dependencies and managed solely via devDependencies using the catalog.

Suggested change
"vite-plugin-pwa": "1.3.0",
"vite-plus": "0.1.20",
"vite-plus": "https://pkg.pr.new/voidzero-dev/vite-plus@670c987e4097d4e5d53bb4c0521c8bf643a33cf5",
"vue": "3.5.38",
"vite-plugin-pwa": "1.3.0",
"vue": "3.5.38",

"vue-data-ui": "3.21.5",
"vue-router": "5.0.4"
Expand All @@ -128,7 +129,8 @@
"@types/sanitize-html": "2.16.1",
"@types/semver": "7.7.1",
"@types/validate-npm-package-name": "4.0.2",
"@vitest/coverage-v8": "4.1.6",
"@vitest/browser-playwright": "4.1.9",
"@vitest/coverage-v8": "4.1.9",
"@vue/test-utils": "2.4.6",
"axe-core": "4.11.2",
"changelogen": "0.6.2",
Expand All @@ -142,12 +144,16 @@
"markdown-it-anchor": "9.2.0",
"msw": "catalog:msw",
"msw-storybook-addon": "catalog:storybook",
"playwright": "*",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

playwright is added with a wildcard version "*", while @playwright/test is pinned to "1.60.0". To prevent potential compatibility issues and ensure consistent test runs, it is highly recommended to pin playwright to the same version as @playwright/test.

Suggested change
"playwright": "*",
"playwright": "1.60.0",

"rolldown": "1.1.2",
"schema-dts": "2.0.0",
"storybook": "catalog:storybook",
"storybook-i18n": "catalog:storybook",
"typescript": "6.0.2",
"unplugin-vue-markdown": "30.0.0",
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.20",
"vite": "catalog:",
"vite-plus": "catalog:",
"vitest": "catalog:",
"vue-i18n-extract": "2.0.7",
"vue-tsc": "3.2.6"
},
Expand Down
2,430 changes: 929 additions & 1,501 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ overrides:
'@types/node': 24.12.0
nuxt-og-image: ^6.6.0
sharp: 0.34.5
vite: npm:@voidzero-dev/vite-plus-core@0.1.20
vitest: npm:@voidzero-dev/vite-plus-test@0.1.20
vite: 'catalog:'
vitest: 'catalog:'
vue-router: 5.0.4
vite-plus: https://pkg.pr.new/voidzero-dev/vite-plus@670c987e4097d4e5d53bb4c0521c8bf643a33cf5
Comment on lines 43 to +44

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

In pnpm-workspace.yaml, vite-plus is overridden with a hardcoded URL. Since vite-plus is already defined in the catalog on line 65, you can use 'catalog:' here to keep the configuration DRY and maintainable.

  vue-router: 5.0.4
  vite-plus: 'catalog:'


packageExtensions:
'@nuxt/scripts':
Expand All @@ -58,3 +59,15 @@ patchedDependencies:
savePrefix: ''

shellEmulator: true
catalog:
vite: https://pkg.pr.new/voidzero-dev/vite-plus/@voidzero-dev/vite-plus-core@670c987e4097d4e5d53bb4c0521c8bf643a33cf5
vitest: 4.1.9
vite-plus: https://pkg.pr.new/voidzero-dev/vite-plus@670c987e4097d4e5d53bb4c0521c8bf643a33cf5
blockExoticSubdeps: false
peerDependencyRules:
allowAny:
- vite
- vitest
allowedVersions:
vite: '*'
vitest: '*'
Loading