From 0cc6b7d9d5c171c31d08ed771604aca28bf1b836 Mon Sep 17 00:00:00 2001 From: Florian Lefebvre Date: Mon, 2 Mar 2026 12:21:00 +0100 Subject: [PATCH 1/2] feat: use tinyclip instead of copy-paste --- knip.json | 2 +- packages/nuxi/package.json | 3 +- packages/nuxi/src/commands/info.ts | 5 ++-- packages/nuxt-cli/package.json | 2 +- pnpm-lock.yaml | 45 ++++++++---------------------- 5 files changed, 16 insertions(+), 41 deletions(-) diff --git a/knip.json b/knip.json index b31fa8354..5a0ee48d9 100644 --- a/knip.json +++ b/knip.json @@ -33,7 +33,6 @@ "@clack/prompts", "c12", "confbox", - "copy-paste", "debug", "defu", "exsolve", @@ -53,6 +52,7 @@ "scule", "semver", "srvx", + "tinyclip", "ufo", "youch" ] diff --git a/packages/nuxi/package.json b/packages/nuxi/package.json index ecf05b81a..a05eb12cb 100644 --- a/packages/nuxi/package.json +++ b/packages/nuxi/package.json @@ -38,7 +38,6 @@ "@nuxt/kit": "^4.3.1", "@nuxt/schema": "^4.3.1", "@nuxt/test-utils": "^4.0.0", - "@types/copy-paste": "^2.1.0", "@types/debug": "^4.1.12", "@types/node": "^24.10.12", "@types/semver": "^7.7.1", @@ -46,7 +45,6 @@ "citty": "^0.2.0", "confbox": "^0.2.4", "consola": "^3.4.2", - "copy-paste": "^2.2.0", "debug": "^4.4.3", "defu": "^6.1.4", "exsolve": "^1.0.8", @@ -72,6 +70,7 @@ "semver": "^7.7.4", "srvx": "^0.11.2", "std-env": "^3.10.0", + "tinyclip": "^0.1.8", "tinyexec": "^1.0.2", "tsdown": "^0.20.3", "typescript": "^5.9.3", diff --git a/packages/nuxi/src/commands/info.ts b/packages/nuxi/src/commands/info.ts index 7dd2c17fa..433ff8747 100644 --- a/packages/nuxi/src/commands/info.ts +++ b/packages/nuxi/src/commands/info.ts @@ -7,12 +7,11 @@ import process from 'node:process' import { box } from '@clack/prompts' import { defineCommand } from 'citty' import { colors } from 'consola/utils' -import { copy as copyToClipboard } from 'copy-paste' import { detectPackageManager } from 'nypm' import { resolve } from 'pathe' import { readPackageJSON } from 'pkg-types' - import { isBun, isDeno, isMinimal } from 'std-env' +import { writeText } from 'tinyclip' import { version as nuxiVersion } from '../../package.json' import { getBuilder } from '../utils/banner' @@ -143,7 +142,7 @@ export default defineCommand({ } } - const copied = !isMinimal && await new Promise(resolve => copyToClipboard(copyStr, err => resolve(!err))) + const copied = !isMinimal && await writeText(copyStr).then(() => true).catch(() => false) if (copied) { box( diff --git a/packages/nuxt-cli/package.json b/packages/nuxt-cli/package.json index b57b126d8..68da9ec0c 100644 --- a/packages/nuxt-cli/package.json +++ b/packages/nuxt-cli/package.json @@ -47,7 +47,6 @@ "citty": "^0.2.0", "confbox": "^0.2.4", "consola": "^3.4.2", - "copy-paste": "^2.2.0", "debug": "^4.4.3", "defu": "^6.1.4", "exsolve": "^1.0.8", @@ -66,6 +65,7 @@ "semver": "^7.7.4", "srvx": "^0.11.2", "std-env": "^3.10.0", + "tinyclip": "^0.1.8", "tinyexec": "^1.0.2", "ufo": "^1.6.3", "youch": "^4.1.0-beta.13" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2afc221d7..c2c8bf146 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,9 +134,6 @@ importers: '@nuxt/test-utils': specifier: ^4.0.0 version: 4.0.0(crossws@0.4.4(srvx@0.11.8))(magicast@0.5.2)(typescript@5.9.3)(vite@7.3.1(@types/node@24.11.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2))(vitest@4.0.18(@types/node@24.11.0)(jiti@2.6.1)(terser@5.46.0)(yaml@2.8.2)) - '@types/copy-paste': - specifier: ^2.1.0 - version: 2.1.0 '@types/debug': specifier: ^4.1.12 version: 4.1.12 @@ -158,9 +155,6 @@ importers: consola: specifier: ^3.4.2 version: 3.4.2 - copy-paste: - specifier: ^2.2.0 - version: 2.2.0 debug: specifier: ^4.4.3 version: 4.4.3 @@ -236,6 +230,9 @@ importers: std-env: specifier: ^3.10.0 version: 3.10.0 + tinyclip: + specifier: ^0.1.8 + version: 0.1.8 tinyexec: specifier: ^1.0.2 version: 1.0.2 @@ -278,9 +275,6 @@ importers: consola: specifier: ^3.4.2 version: 3.4.2 - copy-paste: - specifier: ^2.2.0 - version: 2.2.0 debug: specifier: ^4.4.3 version: 4.4.3 @@ -335,6 +329,9 @@ importers: std-env: specifier: ^3.10.0 version: 3.10.0 + tinyclip: + specifier: ^0.1.8 + version: 0.1.8 tinyexec: specifier: ^1.0.2 version: 1.0.2 @@ -2449,9 +2446,6 @@ packages: '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} - '@types/copy-paste@2.1.0': - resolution: {integrity: sha512-u9PFnY4MVc7U90RYcItZxiUYLbdaO5HRbCVQ08Aurt+fQHKMcVOLM4/1ior1nEHX3yFEhh2dSz1CuGV0XBPWew==} - '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -3172,9 +3166,6 @@ packages: cookie-es@2.0.0: resolution: {integrity: sha512-RAj4E421UYRgqokKUmotqAwuplYw15qtdXfY+hGzgCJ/MBjCVZcSoHK/kH9kocfjRjcDME7IiDWR/1WX1TM2Pg==} - copy-paste@2.2.0: - resolution: {integrity: sha512-jqSL4r9DSeiIvJZStLzY/sMLt9ToTM7RsK237lYOTG+KcbQJHGala3R1TUpa8h1p9adswVgIdV4qGbseVhL4lg==} - core-js-compat@3.48.0: resolution: {integrity: sha512-OM4cAF3D6VtH/WkLtWvyNC56EZVXsZdU3iqaMG2B4WvYrlqU831pc4UtG5yp0sE9z8Y02wVN7PjW5Zf9Gt0f1Q==} @@ -4022,10 +4013,6 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -5209,9 +5196,6 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sax@1.5.0: resolution: {integrity: sha512-21IYA3Q5cQf089Z6tgaUTr7lDAyzoTPx5HRtbhsME8Udispad8dC/+sziTNugOEx54ilvatQ9YCzl4KQLPcRHA==} engines: {node: '>=11.0.0'} @@ -5463,6 +5447,9 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinyclip@0.1.8: + resolution: {integrity: sha512-dEm6a8LTMgfJCG3pv7DUcKDXyuQviLZVaw+6lXHEAY1xRE6SXFSydIc+sY3D7xKpxNbF/gDuUynBNYbolT4eWA==} + tinyexec@1.0.2: resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==} engines: {node: '>=18'} @@ -7897,8 +7884,6 @@ snapshots: '@types/deep-eql': 4.0.2 assertion-error: 2.0.1 - '@types/copy-paste@2.1.0': {} - '@types/debug@4.1.12': dependencies: '@types/ms': 2.1.0 @@ -8686,10 +8671,6 @@ snapshots: cookie-es@2.0.0: {} - copy-paste@2.2.0: - dependencies: - iconv-lite: 0.4.24 - core-js-compat@3.48.0: dependencies: browserslist: 4.28.1 @@ -9574,10 +9555,6 @@ snapshots: human-signals@5.0.0: {} - iconv-lite@0.4.24: - dependencies: - safer-buffer: 2.1.2 - ieee754@1.2.1: {} ignore@5.3.2: {} @@ -11275,8 +11252,6 @@ snapshots: safe-buffer@5.2.1: {} - safer-buffer@2.1.2: {} - sax@1.5.0: {} scslre@0.3.0: @@ -11532,6 +11507,8 @@ snapshots: tinybench@2.9.0: {} + tinyclip@0.1.8: {} + tinyexec@1.0.2: {} tinyglobby@0.2.15: From 3578e90381ee988137b4f2515c220fe4d248f094 Mon Sep 17 00:00:00 2001 From: Florian Lefebvre Date: Thu, 5 Mar 2026 11:10:48 +0100 Subject: [PATCH 2/2] bump dep --- packages/nuxi/package.json | 2 +- packages/nuxt-cli/package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/nuxi/package.json b/packages/nuxi/package.json index a05eb12cb..27bd7c85d 100644 --- a/packages/nuxi/package.json +++ b/packages/nuxi/package.json @@ -70,7 +70,7 @@ "semver": "^7.7.4", "srvx": "^0.11.2", "std-env": "^3.10.0", - "tinyclip": "^0.1.8", + "tinyclip": "^0.1.10", "tinyexec": "^1.0.2", "tsdown": "^0.20.3", "typescript": "^5.9.3", diff --git a/packages/nuxt-cli/package.json b/packages/nuxt-cli/package.json index 68da9ec0c..2685bf5aa 100644 --- a/packages/nuxt-cli/package.json +++ b/packages/nuxt-cli/package.json @@ -65,7 +65,7 @@ "semver": "^7.7.4", "srvx": "^0.11.2", "std-env": "^3.10.0", - "tinyclip": "^0.1.8", + "tinyclip": "^0.1.10", "tinyexec": "^1.0.2", "ufo": "^1.6.3", "youch": "^4.1.0-beta.13" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2c8bf146..2764b1ecc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -231,8 +231,8 @@ importers: specifier: ^3.10.0 version: 3.10.0 tinyclip: - specifier: ^0.1.8 - version: 0.1.8 + specifier: ^0.1.10 + version: 0.1.10 tinyexec: specifier: ^1.0.2 version: 1.0.2 @@ -330,8 +330,8 @@ importers: specifier: ^3.10.0 version: 3.10.0 tinyclip: - specifier: ^0.1.8 - version: 0.1.8 + specifier: ^0.1.10 + version: 0.1.10 tinyexec: specifier: ^1.0.2 version: 1.0.2 @@ -5447,8 +5447,8 @@ packages: tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyclip@0.1.8: - resolution: {integrity: sha512-dEm6a8LTMgfJCG3pv7DUcKDXyuQviLZVaw+6lXHEAY1xRE6SXFSydIc+sY3D7xKpxNbF/gDuUynBNYbolT4eWA==} + tinyclip@0.1.10: + resolution: {integrity: sha512-DNZXvIJh/yrejeAxGcXsALXblF8pUGguQrTjqOEltaA4x94qf9F8aXWJzXXY8qcKD1AAILMz9F8dDTLSDyIF9Q==} tinyexec@1.0.2: resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==} @@ -11507,7 +11507,7 @@ snapshots: tinybench@2.9.0: {} - tinyclip@0.1.8: {} + tinyclip@0.1.10: {} tinyexec@1.0.2: {}