Skip to content

Commit 9a2b8b8

Browse files
feat: remove browser support (#21)
Co-authored-by: James Garbutt <43081j@users.noreply.github.com>
1 parent 565ea08 commit 9a2b8b8

8 files changed

Lines changed: 23 additions & 78 deletions

File tree

.github/workflows/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ jobs:
7171
run: ${{ matrix.install-cmd }}
7272
- name: Install Dependencies
7373
run: pnpm install
74-
- name: Download Playwright binaries
75-
run: pnpm exec playwright install chromium
7674
- name: Build
7775
run: pnpm build
7876
- name: Test

.github/workflows/publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
run: pnpm build
2626
- name: Lint
2727
run: pnpm lint
28-
- name: Download Playwright binaries
29-
run: pnpm exec playwright install chromium
3028
- name: Test
3129
run: xvfb-run -a pnpm test
3230

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# tinyclip 📋
22

3-
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.
3+
A tiny cross-platform clipboard library. Uses native OS clipboard functionality on Node.js.
4+
5+
> [!NOTE]
6+
> 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.
47
58
## Install
69

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"main": "./dist/index.js",
2626
"exports": {
2727
".": {
28-
"browser": "./dist/browser.js",
2928
"default": "./dist/index.js"
3029
}
3130
},
@@ -39,9 +38,7 @@
3938
"devDependencies": {
4039
"@types/node": "^25.3.3",
4140
"@typescript/native-preview": "^7.0.0-dev.20260228.1",
42-
"@vitest/browser-playwright": "^4.0.18",
4341
"@vitest/coverage-v8": "^4.0.18",
44-
"playwright": "^1.58.2",
4542
"prettier": "^3.7.4",
4643
"vitest": "^4.0.18"
4744
}

pnpm-lock.yaml

Lines changed: 17 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/browser.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/browser.test.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

vitest.config.ts

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,10 @@
11
import {defineConfig} from 'vitest/config';
2-
import {playwright} from '@vitest/browser-playwright';
32

43
export default defineConfig({
54
test: {
5+
include: ['tests/*.test.ts'],
66
coverage: {
77
provider: 'v8'
8-
},
9-
projects: [
10-
{
11-
extends: './vitest.config.ts',
12-
test: {
13-
include: ['tests/index.test.ts'],
14-
environment: 'node',
15-
name: 'node'
16-
}
17-
},
18-
{
19-
extends: './vitest.config.ts',
20-
test: {
21-
include: ['tests/browser.test.ts'],
22-
name: 'browser',
23-
browser: {
24-
enabled: true,
25-
provider: playwright({
26-
contextOptions: {
27-
permissions: ['clipboard-read', 'clipboard-write']
28-
}
29-
}),
30-
headless: true,
31-
instances: [{browser: 'chromium'}],
32-
screenshotFailures: false
33-
}
34-
}
35-
}
36-
]
8+
}
379
}
3810
});

0 commit comments

Comments
 (0)