Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["demo"]
}
7 changes: 7 additions & 0 deletions .changeset/sweet-foxes-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@vingy/vueltip': minor
'@vingy/shared': minor
'@vingy/vuebugger': patch
---

fixes type for optional plugin settings
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
task: [oxlint, oxfmt, build, test:ci]
task: [oxlint, oxfmt, build, test]
steps:
- uses: actions/checkout@v4

Expand All @@ -24,10 +24,16 @@ jobs:

- run: mise run install --frozen-lockfile

- name: Install Playwright Browsers
if: matrix.task == 'test'
run: pnpm exec playwright install --with-deps chromium
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 0

- run: mise run ${{ matrix.task }}

- name: Upload coverage artifacts
if: matrix.task == 'test:ci'
if: matrix.task == 'test'
uses: actions/upload-artifact@v4
with:
name: coverage
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
on:
release:
types: [published]
push:
branches:
- main

permissions:
contents: read
contents: write
id-token: write

jobs:
publish:
name: Publish Packages
runs-on: ubuntu-latest
if: github.event.pusher.name != 'github-actions[bot]' && !contains(github.event.head_commit.message, 'Version Packages')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: jdx/mise-action@v2

- run: mise run install --frozen-lockfile

- run: mise run build

- run: pnpm -r publish --no-git-checks --access public
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
publish: pnpm changeset:publish
version: pnpm changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154 changes: 154 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
# Contributing to @vingy/vue-utilities

Thank you for contributing! This monorepo uses pnpm workspaces and changesets for version management.

## Development Setup

```bash
# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run tests
pnpm test

# Run dev mode (watches for changes)
pnpm dev

# Lint and format code
pnpm run lint
pnpm run lint:fix
pnpm run format
```

## Making Changes

1. Create a branch from `main`
2. Make your changes in the relevant package under `packages/`
3. Add tests if applicable
4. Ensure code passes linting: `pnpm run lint`
5. Run tests: `pnpm test`

## Versioning with Changesets

This monorepo uses [changesets](https://github.com/changesets/changesets) for managing independent package versions and changelogs.

### Creating a Changeset

After making changes, create a changeset:

```bash
pnpm changeset
```

This will prompt you to:

1. **Select affected packages** - Choose which packages were modified
2. **Select version bump** - Choose between:
- `patch` - Bug fixes (0.0.X)
- `minor` - Features (0.X.0)
- `major` - Breaking changes (X.0.0)
3. **Write summary** - Describe your changes for the changelog

Example:

```
✔ Which packages would you like to include? … @vingy/vuebugger
✔ Which packages should have a MAJOR bump? … no
✔ Which packages should have a MINOR bump? … @vingy/vuebugger
✔ Write a summary for this change: Added support for custom options

Summary: Added support for custom options
```

This creates a file in `.changeset/` (e.g., `.changeset/brave-lions-enjoy.md`). Commit this file with your changes.

### Before Publishing

The maintainers will handle versioning and publishing:

```bash
# Update package versions based on changesets
pnpm changeset:version

# This will:
# - Update all package.json versions
# - Create/update CHANGELOG.md files
# - Consume all changesets
# - Create a version commit

# Review the changes, then publish
pnpm changeset:publish

# This will:
# - Build all packages
# - Publish to npm
# - Create git tags (e.g., @vingy/vuebugger@1.0.0)
# - Push tags to GitHub
```

## Package Structure

```
packages/
├── vuebugger/ # Vue devtools plugin
├── vueltip/ # Headless tooltip component
└── [your-package]/ # New packages follow the same structure
├── src/
├── package.json
├── tsconfig.json
└── tsdown.config.ts
```

Each package:

- Has independent versioning via changesets
- Uses the shared tooling (TypeScript, vitest, oxlint, oxfmt)
- Publishes to npm with `@vingy` scope
- Is linked in the workspace via `pnpm` for local development

## Publishing New Packages

Initial publish (manual):

```bash
pnpm --filter @vingy/your-package publish --access public
```

Future updates use changesets (see "Before Publishing" section above).

## Guidelines

- **No changesets needed for:**
- Documentation changes
- CI/CD workflow updates
- README changes
- Dependency updates (these auto-bump if a package changes)

- **Always create changesets for:**
- Code changes affecting any package
- API additions or changes
- Bug fixes

## Code Quality

All code is checked with:

- **oxlint** - JavaScript/TypeScript linting
- **oxfmt** - Code formatting
- **vitest** - Unit tests
- **TypeScript** - Type checking

Run before committing:

```bash
pnpm run lint # Check for issues
pnpm run lint:fix # Fix formatting
pnpm test # Run tests
```

## Questions?

See the [main README](./README.md) or open an issue for questions!
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tools]
node = "24"
pnpm = "latest"

[hooks]
postinstall = "npx corepack enable"
Expand All @@ -8,7 +9,6 @@ postinstall = "npx corepack enable"
experimental = true

[tasks]
"test:ci" = "pnpm test:ci"
install = "pnpm install"
build = "pnpm build"
dev = "pnpm dev"
Expand Down
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@
"author": "vingy",
"repository": {
"type": "git",
"url": "https://github.com/vinpogo/vuebugger"
"url": "https://github.com/vinpogo/vue-utils"
},
"files": [
"dist"
],
"type": "module",
"scripts": {
"test": "pnpm -r test",
"test:ci": "pnpm -r test:ci",
"test": "pnpm vitest",
"build": "pnpm -r build",
"dev": "pnpm -r dev"
"dev": "pnpm -r dev",
"changeset": "changeset",
"changeset:version": "changeset version",
"changeset:publish": "pnpm build && changeset publish"
},
"devDependencies": {
"@changesets/cli": "catalog:",
"@tsconfig/node24": "catalog:",
"@types/node": "catalog:",
"@vitest/coverage-v8": "catalog:",
"@vitest/browser-playwright": "catalog:",
"oxfmt": "catalog:",
"oxlint": "catalog:",
"playwright": "catalog:",
"tsdown": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
Expand Down
11 changes: 11 additions & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@vingy/shared",
"version": "0.0.0",
"private": true,
"type": "module",
"exports": {
"./types": "./src/types.ts"
},
"dependencies": {},
"devDependencies": {}
}
1 change: 1 addition & 0 deletions packages/shared/src/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type Maybe<T> = T | null | undefined
2 changes: 1 addition & 1 deletion README.md → packages/vuebugger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ export const useFoo = (initial: number) => {
}
```

See the demo app in [demo/](demo).
See the demo app in [demo/](../../demo/).

> **Note:** This plugin is tree-shakable and has zero runtime overhead when `debug()` calls are not used.
6 changes: 2 additions & 4 deletions packages/vuebugger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vingy/vuebugger",
"version": "0.3.0",
"version": "0.3.1",
"description": "Vue devtools plugin to debug anything.",
"keywords": [
"composable",
Expand All @@ -15,7 +15,7 @@
"author": "vingy",
"repository": {
"type": "git",
"url": "https://github.com/vinpogo/vuebugger"
"url": "https://github.com/vinpogo/vue-utils"
},
"files": [
"dist"
Expand All @@ -34,8 +34,6 @@
"access": "public"
},
"scripts": {
"test": "vitest",
"test:ci": "vitest run --coverage",
"build": "tsdown",
"dev": "tsdown -w"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vuebugger/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PluginOptions } from './types'

export { debug } from './debug'

const plugin: Plugin<PluginOptions | undefined> = {
const plugin: Plugin<[PluginOptions?]> = {
install: (app: App, options?: PluginOptions) => {
if (!import.meta.env.DEV) return
if (options?.uidFn) setUidGenerator(options.uidFn)
Expand Down
45 changes: 45 additions & 0 deletions packages/vueltip/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@vingy/vueltip",
"version": "0.1.0",
"description": "Headless tooltip which only shows when necessary.",
"keywords": [
"composition-api",
"plugin",
"tooltip",
"vue"
],
"license": "MIT",
"author": "vingy",
"repository": {
"type": "git",
"url": "https://github.com/vinpogo/vue-utils"
},
"files": [
"dist"
],
"type": "module",
"sideEffects": false,
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": {
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs"
}
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsdown",
"dev": "tsdown -w"
},
"devDependencies": {
"@floating-ui/vue": "catalog:",
"@vingy/shared": "workspace:^"
},
"peerDependencies": {
"vue": "catalog:"
},
"packageManager": "pnpm@10.28.0"
}
Loading
Loading