Giter Site home page Giter Site logo

hpal-debug's People

Contributors

devinivy avatar mattboutet avatar nargonath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hpal-debug's Issues

Tests do not run due to missing nested dependency

I tried to run the test locally but I get this error when I do:

> [email protected] test /home/jpauthier/workspace/hpal-debug
> lab -a @hapi/code -t 100 -L -I "FinalizationRegistry,WeakRef"

Error requiring file: /home/jpauthier/workspace/hpal-debug/test/closet/repl/pal-plugins/server.js
Cannot find module 'joi'
Require stack:
- /home/jpauthier/workspace/hpal-debug/node_modules/schwifty/lib/index.js
- /home/jpauthier/workspace/hpal-debug/test/closet/repl/pal-plugins/server.js
- /home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/lib/cli.js
- /home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/bin/lab
Error: Cannot find module 'joi'
Require stack:
- /home/jpauthier/workspace/hpal-debug/node_modules/schwifty/lib/index.js
- /home/jpauthier/workspace/hpal-debug/test/closet/repl/pal-plugins/server.js
- /home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/lib/cli.js
- /home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/bin/lab
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/jpauthier/workspace/hpal-debug/node_modules/schwifty/lib/index.js:6:13)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.require.extensions.<computed> [as .js] (/home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/lib/coverage.js:127:28)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/home/jpauthier/workspace/hpal-debug/test/closet/repl/pal-plugins/server.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.require.extensions.<computed> [as .js] (/home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/lib/coverage.js:127:28)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/lib/cli.js:134:13
    at Array.forEach (<anonymous>)
    at Object.internals.traverse (/home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/lib/cli.js:128:15)
    at Object.exports.run (/home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/lib/cli.js:61:31)
    at main (/home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/bin/lab:56:48)
    at Object.<anonymous> (/home/jpauthier/workspace/hpal-debug/node_modules/@hapi/lab/bin/lab:60:1)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
npm ERR! Test failed.  See above for more details.

The problem seems to be coming from Schwifty. In the lib/index.js we require('joi') but joi is a devDependency and @hapi/joi@16 is in the dependencies section. That way I guess it works when running Schwifty from the repo itself. I believe devDeps are not installed when installing a package dependency from NPM and as hpal-debug does not have joi in its dependencies but rather joi-17 joi is nowhere to be found in the dependency tree thus it breaks when running hpal-debug tests.

Support non-TTY usage

Piping the output of routes and curl can fail since stdout no longer has a columns property.

Remove support for curl parameters from joi v15 and below

We currently have a compatibility layer in hpal-debug's hpal run debug:curl to create CLI flags from route validation for both joi v15 and joi v16+. The next version of hpal-debug targets joi v17+ and will degrade gracefully for older versions of joi. Technically this should cover joi v16 too, though official support is for joi v17+.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.