yarn install v1.22.19
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] π Resolving packages...
warning jest > jest-cli > @jest/core > jest-haste-map > fsevents > node-pre-gyp@0.17.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
warning " > ts-jest@26.5.6" has incorrect peer dependency "jest@>=26 <27".
[4/4] π¨ Building fresh packages...
warning Error running install script for optional dependency: "/Users/yoichika/dev/github/gitrivy-test/gitrivy.yokawasa/node_modules/fsevents: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/yoichika/dev/github/gitrivy-test/gitrivy.yokawasa/node_modules/fsevents
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.0
gyp info using node@19.3.0 | darwin | x64
gyp info find Python using Python version 3.9.6 found at \"/Users/yoichika/dev/venv3.8/bin/python3\"
gyp info spawn /Users/yoichika/dev/venv3.8/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/local/Cellar/node/19.3.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/yoichika/dev/github/gitrivy-test/gitrivy.yokawasa/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/19.3.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/yoichika/Library/Caches/node-gyp/19.3.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/yoichika/Library/Caches/node-gyp/19.3.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/19.3.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/yoichika/Library/Caches/node-gyp/19.3.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/yoichika/dev/github/gitrivy-test/gitrivy.yokawasa/node_modules/fsevents',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:174:
../../nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
typedef v8::Local<v8::AccessorSignature> Sig;
~~~~^
In file included from ../fsevents.cc:6:
../../nan/nan.h:2536:8: error: no matching member function for call to 'SetAccessor'
tpl->SetAccessor(
~~~~~^~~~~~~~~~~
/Users/yoichika/Library/Caches/node-gyp/19.3.0/include/node/v8-template.h:814:8: note: candidate function not viable: no known conversion from 'imp::Sig' (aka 'int') to 'v8::SideEffectType' for 7th argument
void SetAccessor(
^
/Users/yoichika/Library/Caches/node-gyp/19.3.0/include/node/v8-template.h:807:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'v8::AccessorGetterCallback' (aka 'void (*)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') for 2nd argument
void SetAccessor(
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: error: no member named 'GetContents' in 'v8::ArrayBuffer'
data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
~~~~~~~~^
3 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/Cellar/node/19.3.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12)
gyp ERR! System Darwin 22.2.0
gyp ERR! command \"/usr/local/Cellar/node/19.3.0/bin/node\" \"/usr/local/Cellar/node/19.3.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /Users/yoichika/dev/github/gitrivy-test/gitrivy.yokawasa/node_modules/fsevents
gyp ERR! node -v v19.3.0
gyp ERR! node-gyp -v v9.3.0
gyp ERR! not ok"
info This module is OPTIONAL, you can safely ignore this error
success Saved lockfile.
β¨ Done in 10.75s.
Issue2: test failure
yarn run test
# or yarn jest
# or npm run test
output
FAIL __tests__/trivy.test.ts (28.551s)
Platform
β is Liniux (2ms)
β is Darwin
β is not linux and darwin (18ms)
getDownloadUrl
β with latest version and linux (474ms)
β with 0.2.0 and macOS (273ms)
β with non-supported version (329ms)
β with non-supported os (91ms)
Download trivy command
β with valid download URL and save in __tests__ (5199ms)
β with invalid download URL (289ms)
Trivy command
β exists (1ms)
β does not exist (1ms)
Trivy scan
β with valid option (2129ms)
β without ignoreUnfixed (324ms)
β with table format (294ms)
β with invalid severity
β with invalid vulnType (1ms)
Parse
β the result without vulnerabilities (1ms)
β the result including vulnerabilities
Validate trivy option
β with a valid severity
β with two valid severities
β with an invalid severity
β with two invalid severities
β with an invalid and a valid severities (1ms)
β with a valid vuln-type (1ms)
β with two valid vuln-types
β with an invalid vuln-type
β with two invalid vuln-types (1ms)
β with a valid and an invalid vuln-types
... snip ...
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 58.82 | 52.05 | 73.91 | 59.06 | |
index.ts | 0 | 0 | 0 | 0 |... 77,78,81,82,86 |
issue.ts | 0 | 0 | 0 | 0 |... 62,63,68,70,71 |
trivy.ts | 89.8 | 67.92 | 100 | 90.53 |... 61,164,166,167 |
utils.ts | 100 | 100 | 100 | 100 | |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 1 failed, 1 passed, 2 total
Tests: 3 failed, 29 passed, 32 total
Snapshots: 0 total
Time: 34.664s
Ran all test suites.
The following 3 unit tests need to be fixed
Trivy scan
β with valid option (2129ms)
β without ignoreUnfixed (324ms)
β with table format (294ms)
Test after fixes
Installation and build
After updating package.json like this, installation completed successfully!
Description
This PR is to fix the following 2 issues
Issues
Issue1: installation failure
output
Issue2: test failure
output
The following 3 unit tests need to be fixed
Test after fixes
Installation and build
After updating package.json like this, installation completed successfully!
After packages installation done, build can be done with the following command
Test
output