diff --git a/.changeset/README.md b/.changeset/README.md index 3c04306..6a4f8f0 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -8,5 +8,4 @@ Common commands: - `pnpm version-packages` to apply pending version updates locally - `pnpm release` to publish the currently versioned package to npm -The GitHub Actions release workflow creates or updates the release PR from pending -changesets, then publishes from `main` after that PR is merged. +The GitHub Actions release workflow creates or updates the release PR from pending changesets, then publishes from `main` after that PR is merged. diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6ef014f..5ea37fa 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,9 +1,9 @@ --- name: Bug Report about: Report unexpected behavior or a regression -title: "" +title: '' labels: bug -assignees: "" +assignees: '' --- ## AS IS diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 7b77f29..3d302c5 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,9 +1,9 @@ --- name: Feature Request about: Propose a new feature or UX improvement -title: "" +title: '' labels: enhancement -assignees: "" +assignees: '' --- ## AS IS diff --git a/.oxfmtrc.jsonc b/.oxfmtrc.jsonc deleted file mode 100644 index b1bb9b1..0000000 --- a/.oxfmtrc.jsonc +++ /dev/null @@ -1,23 +0,0 @@ -// Ultracite oxfmt Configuration -// https://oxc.rs/docs/guide/usage/formatter/config-file-reference.html -{ - "$schema": "./node_modules/oxfmt/configuration_schema.json", - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "semi": true, - "singleQuote": false, - "quoteProps": "as-needed", - "jsxSingleQuote": false, - "trailingComma": "es5", - "bracketSpacing": true, - "bracketSameLine": false, - "arrowParens": "always", - "endOfLine": "lf", - "experimentalSortPackageJson": true, - "experimentalSortImports": { - "ignoreCase": true, - "newlinesBetween": true, - "order": "asc", - }, -} diff --git a/.oxlintrc.json b/.oxlintrc.json deleted file mode 100644 index dc2e5df..0000000 --- a/.oxlintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "./node_modules/oxlint/configuration_schema.json", - "extends": ["./node_modules/ultracite/config/oxlint/core/.oxlintrc.json"], - "ignorePatterns": ["example/**"], - "rules": { - "func-style": "off", - "sort-keys": "off", - "no-shadow": "off", - "no-use-before-define": "off", - "no-promise-executor-return": "off", - "import/no-relative-parent-imports": "off", - "import/first": "off", - "promise/prefer-await-to-then": "off", - "promise/prefer-await-to-callbacks": "off", - "promise/avoid-new": "off", - "unicorn/no-array-for-each": "off", - "unicorn/no-await-expression-member": "off", - "typescript/consistent-type-imports": "off" - }, - "overrides": [ - { - "files": [ - "**/*.{test,spec}.{ts,tsx,js,jsx}", - "**/__tests__/**/*.{ts,tsx,js,jsx}", - "test/**/*.{ts,tsx,js,jsx}" - ], - "plugins": ["jest", "vitest"], - "rules": { - "jest/no-hooks": "off", - "jest/valid-title": "off", - "jest/prefer-called-with": "off", - "vitest/prefer-strict-boolean-matchers": "off" - } - } - ] -} diff --git a/.zed/settings.json b/.zed/settings.json index 3d6119e..a702101 100644 --- a/.zed/settings.json +++ b/.zed/settings.json @@ -18,7 +18,8 @@ "fixKind": "safe_fix", "run": "onType", "typeAware": true, - "unusedDisableDirectives": "deny" + "unusedDisableDirectives": "deny", + "configPath": "./.oxlintrc.json" } } }, @@ -46,7 +47,12 @@ "code_actions_on_format": { "source.fixAll.oxc": true, "source.organizeImports.oxc": true - } + }, + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "code_action": "source.fixAll.oxc" }, "TypeScript": { "formatter": { @@ -57,6 +63,10 @@ "code_actions_on_format": { "source.fixAll.oxc": true, "source.organizeImports.oxc": true + }, + "format_on_save": "on", + "prettier": { + "allowed": false } }, "TSX": { @@ -68,7 +78,193 @@ "code_actions_on_format": { "source.fixAll.oxc": true, "source.organizeImports.oxc": true + }, + "format_on_save": "on", + "prettier": { + "allowed": false } + }, + "CSS": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "GraphQL": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "Handlebars": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "HTML": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "JSX": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "JSON": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "JSON5": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "JSONC": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "Less": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "Markdown": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "MDX": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "SCSS": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "Vue.js": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] + }, + "YAML": { + "format_on_save": "on", + "prettier": { + "allowed": false + }, + "formatter": [ + { + "language_server": { + "name": "oxfmt" + } + } + ] } } } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3011e01..4a3f954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,9 +44,7 @@ This is a breaking change. - `prw` now stores history in `$XDG_STATE_HOME/prw/history.json` and falls back to - `~/.local/state/prw/history.json` when `XDG_STATE_HOME` is unset. It no longer - uses `~/.config/prw/history.json`. + `prw` now stores history in `$XDG_STATE_HOME/prw/history.json` and falls back to `~/.local/state/prw/history.json` when `XDG_STATE_HOME` is unset. It no longer uses `~/.config/prw/history.json`. ## 0.1.1 diff --git a/CLAUDE.md b/CLAUDE.md index 97eef2c..dfc87eb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -43,3 +43,92 @@ Uses Changesets. - `pnpm version-packages` applies pending changesets locally. - `pnpm release` publishes via Changesets. - `prepublishOnly` runs `pnpm build && pnpm build:man`, so release-related changes should keep the generated man page in sync. + + + +# Using Vite+, the Unified Toolchain for the Web + +This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`. + +## Vite+ Workflow + +`vp` is a global binary that handles the full development lifecycle. Run `vp help` to print a list of commands and `vp --help` for information about a specific command. + +### Start + +- create - Create a new project from a template +- migrate - Migrate an existing project to Vite+ +- config - Configure hooks and agent integration +- staged - Run linters on staged files +- install (`i`) - Install dependencies +- env - Manage Node.js versions + +### Develop + +- dev - Run the development server +- check - Run format, lint, and TypeScript type checks +- lint - Lint code +- fmt - Format code +- test - Run tests + +### Execute + +- run - Run monorepo tasks +- exec - Execute a command from local `node_modules/.bin` +- dlx - Execute a package binary without installing it as a dependency +- cache - Manage the task cache + +### Build + +- build - Build for production +- pack - Build libraries +- preview - Preview production build + +### Manage Dependencies + +Vite+ automatically detects and wraps the underlying package manager such as pnpm, npm, or Yarn through the `packageManager` field in `package.json` or package manager-specific lockfiles. + +- add - Add packages to dependencies +- remove (`rm`, `un`, `uninstall`) - Remove packages from dependencies +- update (`up`) - Update packages to latest versions +- dedupe - Deduplicate dependencies +- outdated - Check for outdated packages +- list (`ls`) - List installed packages +- why (`explain`) - Show why a package is installed +- info (`view`, `show`) - View package information from the registry +- link (`ln`) / unlink - Manage local package links +- pm - Forward a command to the package manager + +### Maintain + +- upgrade - Update `vp` itself to the latest version + +These commands map to their corresponding tools. For example, `vp dev --port 3000` runs Vite's dev server and works the same as Vite. `vp test` runs JavaScript tests through the bundled Vitest. The version of all tools can be checked using `vp --version`. This is useful when researching documentation, features, and bugs. + +## Common Pitfalls + +- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations. +- **Always use Vite commands to run tools:** Don't attempt to run `vp vitest` or `vp oxlint`. They do not exist. Use `vp test` and `vp lint` instead. +- **Running scripts:** Vite+ built-in commands (`vp dev`, `vp build`, `vp test`, etc.) always run the Vite+ built-in tool, not any `package.json` script of the same name. To run a custom script that shares a name with a built-in command, use `vp run