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
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ jobs:
run: ${{ matrix.install-cmd }}
- name: Install Dependencies
run: pnpm install
- name: Download Playwright binaries
run: pnpm exec playwright install chromium
- name: Build
run: pnpm build
- name: Test
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
run: pnpm build
- name: Lint
run: pnpm lint
- name: Download Playwright binaries
run: pnpm exec playwright install chromium
- name: Test
run: xvfb-run -a pnpm test

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# tinyclip 📋

A tiny cross-platform clipboard library. Uses native OS clipboard functionality on Node.js, and the [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API) in browsers.
A tiny cross-platform clipboard library. Uses native OS clipboard functionality on Node.js.

> [!NOTE]
> In the browser, you can use the native [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API) instead of a dependency.

## Install

Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"main": "./dist/index.js",
"exports": {
".": {
"browser": "./dist/browser.js",
"default": "./dist/index.js"
}
},
Expand All @@ -39,9 +38,7 @@
"devDependencies": {
"@types/node": "^25.3.3",
"@typescript/native-preview": "^7.0.0-dev.20260228.1",
"@vitest/browser-playwright": "^4.0.18",
"@vitest/coverage-v8": "^4.0.18",
"playwright": "^1.58.2",
"prettier": "^3.7.4",
"vitest": "^4.0.18"
}
Expand Down
29 changes: 17 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions src/browser.ts

This file was deleted.

21 changes: 0 additions & 21 deletions tests/browser.test.ts

This file was deleted.

32 changes: 2 additions & 30 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
import {defineConfig} from 'vitest/config';
import {playwright} from '@vitest/browser-playwright';

export default defineConfig({
test: {
include: ['tests/*.test.ts'],
coverage: {
provider: 'v8'
},
projects: [
{
extends: './vitest.config.ts',
test: {
include: ['tests/index.test.ts'],
environment: 'node',
name: 'node'
}
},
{
extends: './vitest.config.ts',
test: {
include: ['tests/browser.test.ts'],
name: 'browser',
browser: {
enabled: true,
provider: playwright({
contextOptions: {
permissions: ['clipboard-read', 'clipboard-write']
}
}),
headless: true,
instances: [{browser: 'chromium'}],
screenshotFailures: false
}
}
}
]
}
}
});