Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace copy-paste with clipboardy #19

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Replace copy-paste with clipboardy #19

merged 3 commits into from
Apr 3, 2024

Conversation

beskay
Copy link
Collaborator

@beskay beskay commented Apr 1, 2024

Module copy-paste throws an error if xclip is not installed

? Pick a task or scope …  Error: spawn xclip ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Easy fix is to replace it with the more popular clipboardy.
Note version 2.3.0 has to be used, since the package is pure ESM starting from version 3.0.0

Also, Clipboardy doesnt work in a headless environment:
sindresorhus/clipboardy#63 (comment)

I am using xvfb to provide a virtual display when running tests.

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 71.17%. Comparing base (be5b01f) to head (c43687f).

Files Patch % Lines
packages/ethernaut-ai/src/internal/Action.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   72.10%   71.17%   -0.93%     
==========================================
  Files         156      156              
  Lines        2907     2907              
==========================================
- Hits         2096     2069      -27     
- Misses        811      838      +27     
Flag Coverage Δ
ethernaut-ai 21.39% <50.00%> (ø)
ethernaut-ai-ui 100.00% <ø> (ø)
ethernaut-challenges 76.09% <ø> (ø)
ethernaut-cli 89.85% <ø> (ø)
ethernaut-common 79.59% <ø> (ø)
ethernaut-interact 83.09% <ø> (ø)
ethernaut-interact-ui 54.54% <ø> (ø)
ethernaut-network 86.17% <ø> (ø)
ethernaut-network-ui 100.00% <ø> (ø)
ethernaut-ui 77.83% <100.00%> (-13.31%) ⬇️
ethernaut-util 81.32% <ø> (ø)
ethernaut-util-ui 100.00% <ø> (ø)
ethernaut-wallet 80.00% <ø> (ø)
ethernaut-wallet-ui 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eternauta1337 eternauta1337 merged commit 7c53d19 into main Apr 3, 2024
31 of 32 checks passed
@eternauta1337 eternauta1337 deleted the clipboardy branch April 3, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants