orval-labs / orval

orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
https://orval.dev
MIT License
2.82k stars 313 forks source link

FR: Reduce dependencies for better interop and lightweight usage #727

Closed hsjobeki closed 10 months ago

hsjobeki commented 1 year ago

The amount of dependencies is huge. Orval first seemed like a lightweight tool to just generate nice and easy api code.

But many of those dependencies seem really unnecessary and have a lot of conflict potential in bigger projects. (Also keep in mind that every single dependency has multiple sub-dependencies)

// file: packages/orval/package.json
"dependencies": {
    "@apidevtools/swagger-parser": "^10.1.0",
    "@orval/angular": "6.11.0",
    "@orval/axios": "6.11.0",
    "@orval/core": "6.11.0",
    "@orval/msw": "6.11.0",
    "@orval/query": "6.11.0",
    "@orval/swr": "6.11.0",
    "ajv": "^8.11.0",
    "cac": "^6.7.12",
    "chalk": "^4.1.2",
    "chokidar": "^3.5.3",
    "enquirer": "^2.3.6",
    "execa": "^5.1.1",
    "find-up": "5.0.0",
    "fs-extra": "^10.1.0",
    "lodash.uniq": "^4.5.0",
    "openapi3-ts": "^3.0.0",
    "string-argv": "^0.3.1",
    "tsconfck": "^2.0.1"
  }

As this is potentially always an issue in the node.js/npm world because you cannot directly see how many dependencies you are actually forcing the user to install additionally to its main dependencies. Also as i mentioned in #558 it is not possible to just run orval on the api spec in isolation because it makes predictions about the surrounding folders.

Still: The best practice for modern libraries is to reduce the number of dependencies.

possibly zero-dependencies, but i guess that is not possible here e.g. openapi3-ts will always be required?

one of the first and most important steps is to reduce the number of dependencies.

When fully resolved only orval has the following tree.

370 different Packages which is HUGE for just an api generator

$ npm install orval
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated json-schema-ref-parser@5.1.3: Please switch to @apidevtools/json-schema-ref-parser
...

added 367 packages, and audited 368 packages in 5s
hsjobeki commented 1 year ago
$ npm list --all
test@1.0.0 ~/installed-only-orval
└─┬ orval@6.11.0
  ├─┬ @apidevtools/swagger-parser@10.1.0
  │ ├─┬ @apidevtools/json-schema-ref-parser@9.0.6
  │ │ ├── @jsdevtools/ono@7.1.3 deduped
  │ │ ├── call-me-maybe@1.0.2 deduped
  │ │ └─┬ js-yaml@3.14.1
  │ │   ├─┬ argparse@1.0.10
  │ │   │ └── sprintf-js@1.0.3
  │ │   └── esprima@4.0.1
  │ ├── @apidevtools/openapi-schemas@2.1.0
  │ ├── @apidevtools/swagger-methods@3.0.2
  │ ├── @jsdevtools/ono@7.1.3
  │ ├─┬ ajv-draft-04@1.0.0
  │ │ └── ajv@8.12.0 deduped
  │ ├── ajv@8.12.0 deduped
  │ ├── call-me-maybe@1.0.2
  │ └── openapi-types@12.1.0
  ├─┬ @orval/angular@6.11.0
  │ └── @orval/core@6.11.0 deduped
  ├─┬ @orval/axios@6.11.0
  │ └── @orval/core@6.11.0 deduped
  ├─┬ @orval/core@6.11.0
  │ ├── @apidevtools/swagger-parser@10.1.0 deduped
  │ ├── acorn@8.8.1
  │ ├── ajv@8.12.0 deduped
  │ ├── chalk@4.1.2 deduped
  │ ├── compare-versions@4.1.4
  │ ├─┬ debug@4.3.4
  │ │ └── ms@2.1.2
  │ ├─┬ esbuild@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY @esbuild/android-arm@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY @esbuild/linux-loong64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-android-64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-android-arm64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-darwin-64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-darwin-arm64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-freebsd-64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-freebsd-arm64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-linux-32@0.15.18
  │ │ ├── esbuild-linux-64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-linux-arm@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-linux-arm64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-linux-mips64le@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-linux-ppc64le@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-linux-riscv64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-linux-s390x@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-netbsd-64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-openbsd-64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-sunos-64@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-windows-32@0.15.18
  │ │ ├── UNMET OPTIONAL DEPENDENCY esbuild-windows-64@0.15.18
  │ │ └── UNMET OPTIONAL DEPENDENCY esbuild-windows-arm64@0.15.18
  │ ├── esutils@2.0.3
  │ ├── fs-extra@10.1.0 deduped
  │ ├─┬ globby@11.1.0
  │ │ ├── array-union@2.1.0
  │ │ ├─┬ dir-glob@3.0.1
  │ │ │ └── path-type@4.0.0
  │ │ ├─┬ fast-glob@3.2.12
  │ │ │ ├── @nodelib/fs.stat@2.0.5
  │ │ │ ├─┬ @nodelib/fs.walk@1.2.8
  │ │ │ │ ├─┬ @nodelib/fs.scandir@2.1.5
  │ │ │ │ │ ├── @nodelib/fs.stat@2.0.5 deduped
  │ │ │ │ │ └─┬ run-parallel@1.2.0
  │ │ │ │ │   └── queue-microtask@1.2.3
  │ │ │ │ └─┬ fastq@1.15.0
  │ │ │ │   └── reusify@1.0.4
  │ │ │ ├── glob-parent@5.1.2 deduped
  │ │ │ ├── merge2@1.4.1 deduped
  │ │ │ └── micromatch@4.0.5 deduped
  │ │ ├── ignore@5.2.4
  │ │ ├── merge2@1.4.1
  │ │ └── slash@3.0.0
  │ ├─┬ ibm-openapi-validator@0.88.3
  │ │ ├─┬ @ibm-cloud/openapi-ruleset@0.37.3
  │ │ │ ├─┬ @stoplight/spectral-formats@1.4.0
  │ │ │ │ ├── @stoplight/json@3.20.1 deduped
  │ │ │ │ ├── @stoplight/spectral-core@1.16.0 deduped
  │ │ │ │ ├── @types/json-schema@7.0.11 deduped
  │ │ │ │ └── tslib@2.4.1 deduped
  │ │ │ ├─┬ @stoplight/spectral-functions@1.7.2
  │ │ │ │ ├── @stoplight/better-ajv-errors@1.0.3 deduped
  │ │ │ │ ├── @stoplight/json@3.20.1 deduped
  │ │ │ │ ├── @stoplight/spectral-core@1.16.0 deduped
  │ │ │ │ ├── @stoplight/spectral-formats@1.4.0 deduped
  │ │ │ │ ├── @stoplight/spectral-runtime@1.1.2 deduped
  │ │ │ │ ├── ajv-draft-04@1.0.0 deduped
  │ │ │ │ ├── ajv-errors@3.0.0 deduped
  │ │ │ │ ├── ajv-formats@2.1.1 deduped
  │ │ │ │ ├── ajv@8.12.0 deduped
  │ │ │ │ ├── lodash@4.17.21 deduped
  │ │ │ │ └── tslib@2.4.1 deduped
  │ │ │ ├─┬ @stoplight/spectral-rulesets@1.14.1
  │ │ │ │ ├── @asyncapi/specs@3.2.1
  │ │ │ │ ├── @stoplight/better-ajv-errors@1.0.3 deduped
  │ │ │ │ ├── @stoplight/json@3.20.1 deduped
  │ │ │ │ ├── @stoplight/spectral-core@1.16.0 deduped
  │ │ │ │ ├── @stoplight/spectral-formats@1.4.0 deduped
  │ │ │ │ ├── @stoplight/spectral-functions@1.7.2 deduped
  │ │ │ │ ├── @stoplight/spectral-runtime@1.1.2 deduped
  │ │ │ │ ├── @stoplight/types@13.8.0 deduped
  │ │ │ │ ├── @types/json-schema@7.0.11 deduped
  │ │ │ │ ├── ajv-formats@2.1.1 deduped
  │ │ │ │ ├── ajv@8.12.0 deduped
  │ │ │ │ ├── json-schema-traverse@1.0.0 deduped
  │ │ │ │ ├── lodash@4.17.21 deduped
  │ │ │ │ └── tslib@2.4.1 deduped
  │ │ │ └── lodash@4.17.21 deduped
  │ │ ├─┬ @stoplight/spectral-cli@6.6.0
  │ │ │ ├─┬ @stoplight/json@3.20.1
  │ │ │ │ ├── @stoplight/ordered-object-literal@1.0.4
  │ │ │ │ ├── @stoplight/path@1.3.2 deduped
  │ │ │ │ ├── @stoplight/types@13.8.0 deduped
  │ │ │ │ ├── jsonc-parser@2.2.1
  │ │ │ │ ├── lodash@4.17.21 deduped
  │ │ │ │ └── safe-stable-stringify@1.1.1
  │ │ │ ├── @stoplight/path@1.3.2
  │ │ │ ├── @stoplight/spectral-core@1.16.0 deduped
  │ │ │ ├── @stoplight/spectral-parsers@1.0.2 deduped
  │ │ │ ├─┬ @stoplight/spectral-ref-resolver@1.0.2
  │ │ │ │ ├─┬ @stoplight/json-ref-readers@1.2.2
  │ │ │ │ │ ├── node-fetch@2.6.7 deduped
  │ │ │ │ │ └── tslib@1.14.1
  │ │ │ │ ├─┬ @stoplight/json-ref-resolver@3.1.5
  │ │ │ │ │ ├── @stoplight/json@3.20.1 deduped
  │ │ │ │ │ ├── @stoplight/path@1.3.2 deduped
  │ │ │ │ │ ├── @stoplight/types@13.8.0 deduped
  │ │ │ │ │ ├── @types/urijs@1.19.19
  │ │ │ │ │ ├── dependency-graph@0.11.0 deduped
  │ │ │ │ │ ├── fast-memoize@2.5.2
  │ │ │ │ │ ├── immer@9.0.17
  │ │ │ │ │ ├── lodash@4.17.21 deduped
  │ │ │ │ │ ├── tslib@2.4.1 deduped
  │ │ │ │ │ └── urijs@1.19.11
  │ │ │ │ ├── @stoplight/spectral-runtime@1.1.2 deduped
  │ │ │ │ ├── dependency-graph@0.11.0
  │ │ │ │ └── tslib@2.4.1 deduped
  │ │ │ ├─┬ @stoplight/spectral-ruleset-bundler@1.5.0
  │ │ │ │ ├─┬ @rollup/plugin-commonjs@22.0.2
  │ │ │ │ │ ├─┬ @rollup/pluginutils@3.1.0
  │ │ │ │ │ │ ├── @types/estree@0.0.39
  │ │ │ │ │ │ ├── estree-walker@1.0.1
  │ │ │ │ │ │ ├── picomatch@2.3.1 deduped
  │ │ │ │ │ │ └── rollup@2.79.1 deduped
  │ │ │ │ │ ├── commondir@1.0.1
  │ │ │ │ │ ├── estree-walker@2.0.2
  │ │ │ │ │ ├─┬ glob@7.2.3
  │ │ │ │ │ │ ├── fs.realpath@1.0.0
  │ │ │ │ │ │ ├─┬ inflight@1.0.6
  │ │ │ │ │ │ │ ├── once@1.4.0 deduped
  │ │ │ │ │ │ │ └── wrappy@1.0.2
  │ │ │ │ │ │ ├── inherits@2.0.4
  │ │ │ │ │ │ ├── minimatch@3.1.2 deduped
  │ │ │ │ │ │ ├─┬ once@1.4.0
  │ │ │ │ │ │ │ └── wrappy@1.0.2 deduped
  │ │ │ │ │ │ └── path-is-absolute@1.0.1
  │ │ │ │ │ ├─┬ is-reference@1.2.1
  │ │ │ │ │ │ └── @types/estree@0.0.39 deduped
  │ │ │ │ │ ├─┬ magic-string@0.25.9
  │ │ │ │ │ │ └── sourcemap-codec@1.4.8
  │ │ │ │ │ ├─┬ resolve@1.22.1
  │ │ │ │ │ │ ├─┬ is-core-module@2.11.0
  │ │ │ │ │ │ │ └── has@1.0.3 deduped
  │ │ │ │ │ │ ├── path-parse@1.0.7
  │ │ │ │ │ │ └── supports-preserve-symlinks-flag@1.0.0
  │ │ │ │ │ └── rollup@2.79.1 deduped
  │ │ │ │ ├── @stoplight/path@1.3.2 deduped
  │ │ │ │ ├── @stoplight/spectral-core@1.16.0 deduped
  │ │ │ │ ├── @stoplight/spectral-formats@1.4.0 deduped
  │ │ │ │ ├── @stoplight/spectral-functions@1.7.2 deduped
  │ │ │ │ ├── @stoplight/spectral-parsers@1.0.2 deduped
  │ │ │ │ ├── @stoplight/spectral-ref-resolver@1.0.2 deduped
  │ │ │ │ ├── @stoplight/spectral-ruleset-migrator@1.9.1 deduped
  │ │ │ │ ├── @stoplight/spectral-rulesets@1.14.1 deduped
  │ │ │ │ ├── @stoplight/spectral-runtime@1.1.2 deduped
  │ │ │ │ ├── @stoplight/types@13.8.0 deduped
  │ │ │ │ ├── @types/node@18.11.18
  │ │ │ │ ├── pony-cause@1.1.1 deduped
  │ │ │ │ ├─┬ rollup@2.79.1
  │ │ │ │ │ └── UNMET OPTIONAL DEPENDENCY fsevents@~2.3.2
  │ │ │ │ ├── tslib@2.4.1 deduped
  │ │ │ │ └─┬ validate-npm-package-name@3.0.0
  │ │ │ │   └── builtins@1.0.3
  │ │ │ ├─┬ @stoplight/spectral-ruleset-migrator@1.9.1
  │ │ │ │ ├── @stoplight/json@3.20.1 deduped
  │ │ │ │ ├── @stoplight/ordered-object-literal@1.0.4 deduped
  │ │ │ │ ├── @stoplight/path@1.3.2 deduped
  │ │ │ │ ├── @stoplight/spectral-functions@1.7.2 deduped
  │ │ │ │ ├── @stoplight/spectral-runtime@1.1.2 deduped
  │ │ │ │ ├── @stoplight/types@13.8.0 deduped
  │ │ │ │ ├── @stoplight/yaml@4.2.3 deduped
  │ │ │ │ ├── @types/node@18.11.18 deduped
  │ │ │ │ ├── ajv@8.12.0 deduped
  │ │ │ │ ├─┬ ast-types@0.14.2
  │ │ │ │ │ └── tslib@2.4.1 deduped
  │ │ │ │ ├── astring@1.8.4
  │ │ │ │ ├── reserved@0.1.2
  │ │ │ │ ├── tslib@2.4.1 deduped
  │ │ │ │ └── validate-npm-package-name@3.0.0 deduped
  │ │ │ ├── @stoplight/spectral-rulesets@1.14.1 deduped
  │ │ │ ├─┬ @stoplight/spectral-runtime@1.1.2
  │ │ │ │ ├── @stoplight/json@3.20.1 deduped
  │ │ │ │ ├── @stoplight/path@1.3.2 deduped
  │ │ │ │ ├─┬ @stoplight/types@12.5.0
  │ │ │ │ │ ├── @types/json-schema@7.0.11 deduped
  │ │ │ │ │ └── utility-types@3.10.0 deduped
  │ │ │ │ ├─┬ abort-controller@3.0.0
  │ │ │ │ │ └── event-target-shim@5.0.1
  │ │ │ │ ├── lodash@4.17.21 deduped
  │ │ │ │ ├── node-fetch@2.6.7 deduped
  │ │ │ │ └── tslib@2.4.1 deduped
  │ │ │ ├─┬ @stoplight/types@13.8.0
  │ │ │ │ ├── @types/json-schema@7.0.11 deduped
  │ │ │ │ └── utility-types@3.10.0
  │ │ │ ├── chalk@4.1.2 deduped
  │ │ │ ├─┬ cliui@7.0.4
  │ │ │ │ ├── string-width@4.2.3 deduped
  │ │ │ │ ├── strip-ansi@6.0.1 deduped
  │ │ │ │ └─┬ wrap-ansi@7.0.0
  │ │ │ │   ├── ansi-styles@4.3.0 deduped
  │ │ │ │   ├── string-width@4.2.3 deduped
  │ │ │ │   └── strip-ansi@6.0.1 deduped
  │ │ │ ├── eol@0.9.1
  │ │ │ ├─┬ fast-glob@3.2.7
  │ │ │ │ ├── @nodelib/fs.stat@2.0.5 deduped
  │ │ │ │ ├── @nodelib/fs.walk@1.2.8 deduped
  │ │ │ │ ├── glob-parent@5.1.2 deduped
  │ │ │ │ ├── merge2@1.4.1 deduped
  │ │ │ │ └── micromatch@4.0.5 deduped
  │ │ │ ├── lodash@4.17.21 deduped
  │ │ │ ├── pony-cause@1.1.1
  │ │ │ ├─┬ proxy-agent@5.0.0
  │ │ │ │ ├─┬ agent-base@6.0.2
  │ │ │ │ │ └── debug@4.3.4 deduped
  │ │ │ │ ├── debug@4.3.4 deduped
  │ │ │ │ ├─┬ http-proxy-agent@4.0.1
  │ │ │ │ │ ├── @tootallnate/once@1.1.2
  │ │ │ │ │ ├── agent-base@6.0.2 deduped
  │ │ │ │ │ └── debug@4.3.4 deduped
  │ │ │ │ ├─┬ https-proxy-agent@5.0.1
  │ │ │ │ │ ├── agent-base@6.0.2 deduped
  │ │ │ │ │ └── debug@4.3.4 deduped
  │ │ │ │ ├─┬ lru-cache@5.1.1
  │ │ │ │ │ └── yallist@3.1.1
  │ │ │ │ ├─┬ pac-proxy-agent@5.0.0
  │ │ │ │ │ ├── @tootallnate/once@1.1.2 deduped
  │ │ │ │ │ ├── agent-base@6.0.2 deduped
  │ │ │ │ │ ├── debug@4.3.4 deduped
  │ │ │ │ │ ├─┬ get-uri@3.0.2
  │ │ │ │ │ │ ├── @tootallnate/once@1.1.2 deduped
  │ │ │ │ │ │ ├── data-uri-to-buffer@3.0.1
  │ │ │ │ │ │ ├── debug@4.3.4 deduped
  │ │ │ │ │ │ ├── file-uri-to-path@2.0.0
  │ │ │ │ │ │ ├─┬ fs-extra@8.1.0
  │ │ │ │ │ │ │ ├── graceful-fs@4.2.10 deduped
  │ │ │ │ │ │ │ ├─┬ jsonfile@4.0.0
  │ │ │ │ │ │ │ │ └── graceful-fs@4.2.10 deduped
  │ │ │ │ │ │ │ └── universalify@0.1.2
  │ │ │ │ │ │ └─┬ ftp@0.3.10
  │ │ │ │ │ │   ├─┬ readable-stream@1.1.14
  │ │ │ │ │ │   │ ├── core-util-is@1.0.3
  │ │ │ │ │ │   │ ├── inherits@2.0.4 deduped
  │ │ │ │ │ │   │ ├── isarray@0.0.1
  │ │ │ │ │ │   │ └── string_decoder@0.10.31
  │ │ │ │ │ │   └── xregexp@2.0.0
  │ │ │ │ │ ├── http-proxy-agent@4.0.1 deduped
  │ │ │ │ │ ├── https-proxy-agent@5.0.1 deduped
  │ │ │ │ │ ├─┬ pac-resolver@5.0.1
  │ │ │ │ │ │ ├─┬ degenerator@3.0.2
  │ │ │ │ │ │ │ ├─┬ ast-types@0.13.4
  │ │ │ │ │ │ │ │ └── tslib@2.4.1 deduped
  │ │ │ │ │ │ │ ├─┬ escodegen@1.14.3
  │ │ │ │ │ │ │ │ ├── esprima@4.0.1 deduped
  │ │ │ │ │ │ │ │ ├── estraverse@4.3.0
  │ │ │ │ │ │ │ │ ├── esutils@2.0.3 deduped
  │ │ │ │ │ │ │ │ ├─┬ optionator@0.8.3
  │ │ │ │ │ │ │ │ │ ├── deep-is@0.1.4
  │ │ │ │ │ │ │ │ │ ├── fast-levenshtein@2.0.6
  │ │ │ │ │ │ │ │ │ ├─┬ levn@0.3.0
  │ │ │ │ │ │ │ │ │ │ ├── prelude-ls@1.1.2 deduped
  │ │ │ │ │ │ │ │ │ │ └── type-check@0.3.2 deduped
  │ │ │ │ │ │ │ │ │ ├── prelude-ls@1.1.2
  │ │ │ │ │ │ │ │ │ ├─┬ type-check@0.3.2
  │ │ │ │ │ │ │ │ │ │ └── prelude-ls@1.1.2 deduped
  │ │ │ │ │ │ │ │ │ └── word-wrap@1.2.3
  │ │ │ │ │ │ │ │ └── source-map@0.6.1 deduped
  │ │ │ │ │ │ │ ├── esprima@4.0.1 deduped
  │ │ │ │ │ │ │ └─┬ vm2@3.9.13
  │ │ │ │ │ │ │   ├── acorn-walk@8.2.0
  │ │ │ │ │ │ │   └── acorn@8.8.1 deduped
  │ │ │ │ │ │ ├── ip@1.1.8
  │ │ │ │ │ │ └── netmask@2.0.2
  │ │ │ │ │ ├─┬ raw-body@2.5.1
  │ │ │ │ │ │ ├── bytes@3.1.2
  │ │ │ │ │ │ ├─┬ http-errors@2.0.0
  │ │ │ │ │ │ │ ├── depd@2.0.0
  │ │ │ │ │ │ │ ├── inherits@2.0.4 deduped
  │ │ │ │ │ │ │ ├── setprototypeof@1.2.0
  │ │ │ │ │ │ │ ├── statuses@2.0.1
  │ │ │ │ │ │ │ └── toidentifier@1.0.1
  │ │ │ │ │ │ ├─┬ iconv-lite@0.4.24
  │ │ │ │ │ │ │ └── safer-buffer@2.1.2
  │ │ │ │ │ │ └── unpipe@1.0.0
  │ │ │ │ │ └── socks-proxy-agent@5.0.1 deduped
  │ │ │ │ ├── proxy-from-env@1.1.0
  │ │ │ │ └─┬ socks-proxy-agent@5.0.1
  │ │ │ │   ├── agent-base@6.0.2 deduped
  │ │ │ │   ├── debug@4.3.4 deduped
  │ │ │ │   └─┬ socks@2.7.1
  │ │ │ │     ├── ip@2.0.0
  │ │ │ │     └── smart-buffer@4.2.0
  │ │ │ ├─┬ stacktracey@2.1.8
  │ │ │ │ ├─┬ as-table@1.0.55
  │ │ │ │ │ └── printable-characters@1.0.42
  │ │ │ │ └─┬ get-source@2.0.12
  │ │ │ │   ├── data-uri-to-buffer@2.0.2
  │ │ │ │   └── source-map@0.6.1
  │ │ │ ├─┬ strip-ansi@6.0.1
  │ │ │ │ └── ansi-regex@5.0.1
  │ │ │ ├── text-table@0.2.0
  │ │ │ ├── tslib@2.4.1
  │ │ │ └── yargs@17.3.1 deduped
  │ │ ├─┬ @stoplight/spectral-core@1.16.0
  │ │ │ ├─┬ @stoplight/better-ajv-errors@1.0.3
  │ │ │ │ ├── ajv@8.12.0 deduped
  │ │ │ │ ├── jsonpointer@5.0.1
  │ │ │ │ └── leven@3.1.0
  │ │ │ ├── @stoplight/json@3.20.1 deduped
  │ │ │ ├── @stoplight/path@1.3.2 deduped
  │ │ │ ├── @stoplight/spectral-parsers@1.0.2 deduped
  │ │ │ ├── @stoplight/spectral-ref-resolver@1.0.2 deduped
  │ │ │ ├── @stoplight/spectral-runtime@1.1.2 deduped
  │ │ │ ├─┬ @stoplight/types@13.6.0
  │ │ │ │ ├── @types/json-schema@7.0.11 deduped
  │ │ │ │ └── utility-types@3.10.0 deduped
  │ │ │ ├─┬ @types/es-aggregate-error@1.0.2
  │ │ │ │ └── @types/node@18.11.18 deduped
  │ │ │ ├── @types/json-schema@7.0.11
  │ │ │ ├─┬ ajv-errors@3.0.0
  │ │ │ │ └── ajv@8.12.0 deduped
  │ │ │ ├─┬ ajv-formats@2.1.1
  │ │ │ │ └── ajv@8.12.0 deduped
  │ │ │ ├── ajv@8.12.0 deduped
  │ │ │ ├─┬ es-aggregate-error@1.0.9
  │ │ │ │ ├─┬ define-properties@1.1.4
  │ │ │ │ │ ├── has-property-descriptors@1.0.0 deduped
  │ │ │ │ │ └── object-keys@1.1.1
  │ │ │ │ ├─┬ es-abstract@1.21.0
  │ │ │ │ │ ├─┬ call-bind@1.0.2
  │ │ │ │ │ │ ├── function-bind@1.1.1 deduped
  │ │ │ │ │ │ └── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ ├─┬ es-set-tostringtag@2.0.1
  │ │ │ │ │ │ ├── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ │ ├─┬ has-tostringtag@1.0.0
  │ │ │ │ │ │ │ └── has-symbols@1.0.3 deduped
  │ │ │ │ │ │ └── has@1.0.3 deduped
  │ │ │ │ │ ├─┬ es-to-primitive@1.2.1
  │ │ │ │ │ │ ├── is-callable@1.2.7 deduped
  │ │ │ │ │ │ ├─┬ is-date-object@1.0.5
  │ │ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped
  │ │ │ │ │ │ └─┬ is-symbol@1.0.4
  │ │ │ │ │ │   └── has-symbols@1.0.3 deduped
  │ │ │ │ │ ├── function-bind@1.1.1 deduped
  │ │ │ │ │ ├─┬ function.prototype.name@1.1.5
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── define-properties@1.1.4 deduped
  │ │ │ │ │ │ ├── es-abstract@1.21.0 deduped
  │ │ │ │ │ │ └── functions-have-names@1.2.3 deduped
  │ │ │ │ │ ├── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ ├─┬ get-symbol-description@1.0.0
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ └── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ ├── globalthis@1.0.3 deduped
  │ │ │ │ │ ├─┬ gopd@1.0.1
  │ │ │ │ │ │ └── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ ├── has-property-descriptors@1.0.0 deduped
  │ │ │ │ │ ├── has-proto@1.0.1
  │ │ │ │ │ ├── has-symbols@1.0.3
  │ │ │ │ │ ├─┬ has@1.0.3
  │ │ │ │ │ │ └── function-bind@1.1.1 deduped
  │ │ │ │ │ ├─┬ internal-slot@1.0.4
  │ │ │ │ │ │ ├── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ │ ├── has@1.0.3 deduped
  │ │ │ │ │ │ └─┬ side-channel@1.0.4
  │ │ │ │ │ │   ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │   ├── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ │   └── object-inspect@1.12.2 deduped
  │ │ │ │ │ ├─┬ is-array-buffer@3.0.1
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ │ └── is-typed-array@1.1.10 deduped
  │ │ │ │ │ ├── is-callable@1.2.7
  │ │ │ │ │ ├── is-negative-zero@2.0.2
  │ │ │ │ │ ├─┬ is-regex@1.1.4
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped
  │ │ │ │ │ ├─┬ is-shared-array-buffer@1.0.2
  │ │ │ │ │ │ └── call-bind@1.0.2 deduped
  │ │ │ │ │ ├─┬ is-string@1.0.7
  │ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped
  │ │ │ │ │ ├─┬ is-typed-array@1.1.10
  │ │ │ │ │ │ ├── available-typed-arrays@1.0.5
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├─┬ for-each@0.3.3
  │ │ │ │ │ │ │ └── is-callable@1.2.7 deduped
  │ │ │ │ │ │ ├── gopd@1.0.1 deduped
  │ │ │ │ │ │ └── has-tostringtag@1.0.0 deduped
  │ │ │ │ │ ├─┬ is-weakref@1.0.2
  │ │ │ │ │ │ └── call-bind@1.0.2 deduped
  │ │ │ │ │ ├── object-inspect@1.12.2
  │ │ │ │ │ ├── object-keys@1.1.1 deduped
  │ │ │ │ │ ├─┬ object.assign@4.1.4
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── define-properties@1.1.4 deduped
  │ │ │ │ │ │ ├── has-symbols@1.0.3 deduped
  │ │ │ │ │ │ └── object-keys@1.1.1 deduped
  │ │ │ │ │ ├─┬ regexp.prototype.flags@1.4.3
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── define-properties@1.1.4 deduped
  │ │ │ │ │ │ └── functions-have-names@1.2.3 deduped
  │ │ │ │ │ ├─┬ safe-regex-test@1.0.0
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── get-intrinsic@1.1.3 deduped
  │ │ │ │ │ │ └── is-regex@1.1.4 deduped
  │ │ │ │ │ ├─┬ string.prototype.trimend@1.0.6
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── define-properties@1.1.4 deduped
  │ │ │ │ │ │ └── es-abstract@1.21.0 deduped
  │ │ │ │ │ ├─┬ string.prototype.trimstart@1.0.6
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── define-properties@1.1.4 deduped
  │ │ │ │ │ │ └── es-abstract@1.21.0 deduped
  │ │ │ │ │ ├─┬ typed-array-length@1.0.4
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── for-each@0.3.3 deduped
  │ │ │ │ │ │ └── is-typed-array@1.1.10 deduped
  │ │ │ │ │ ├─┬ unbox-primitive@1.0.2
  │ │ │ │ │ │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │ ├── has-bigints@1.0.2
  │ │ │ │ │ │ ├── has-symbols@1.0.3 deduped
  │ │ │ │ │ │ └─┬ which-boxed-primitive@1.0.2
  │ │ │ │ │ │   ├─┬ is-bigint@1.0.4
  │ │ │ │ │ │   │ └── has-bigints@1.0.2 deduped
  │ │ │ │ │ │   ├─┬ is-boolean-object@1.1.2
  │ │ │ │ │ │   │ ├── call-bind@1.0.2 deduped
  │ │ │ │ │ │   │ └── has-tostringtag@1.0.0 deduped
  │ │ │ │ │ │   ├─┬ is-number-object@1.0.7
  │ │ │ │ │ │   │ └── has-tostringtag@1.0.0 deduped
  │ │ │ │ │ │   ├── is-string@1.0.7 deduped
  │ │ │ │ │ │   └── is-symbol@1.0.4 deduped
  │ │ │ │ │ └─┬ which-typed-array@1.1.9
  │ │ │ │ │   ├── available-typed-arrays@1.0.5 deduped
  │ │ │ │ │   ├── call-bind@1.0.2 deduped
  │ │ │ │ │   ├── for-each@0.3.3 deduped
  │ │ │ │ │   ├── gopd@1.0.1 deduped
  │ │ │ │ │   ├── has-tostringtag@1.0.0 deduped
  │ │ │ │ │   └── is-typed-array@1.1.10 deduped
  │ │ │ │ ├── function-bind@1.1.1
  │ │ │ │ ├── functions-have-names@1.2.3
  │ │ │ │ ├─┬ get-intrinsic@1.1.3
  │ │ │ │ │ ├── function-bind@1.1.1 deduped
  │ │ │ │ │ ├── has-symbols@1.0.3 deduped
  │ │ │ │ │ └── has@1.0.3 deduped
  │ │ │ │ ├─┬ globalthis@1.0.3
  │ │ │ │ │ └── define-properties@1.1.4 deduped
  │ │ │ │ └─┬ has-property-descriptors@1.0.0
  │ │ │ │   └── get-intrinsic@1.1.3 deduped
  │ │ │ ├── jsonpath-plus@7.1.0
  │ │ │ ├── lodash.topath@4.5.2
  │ │ │ ├── lodash@4.17.21 deduped
  │ │ │ ├─┬ minimatch@3.1.2
  │ │ │ │ └─┬ brace-expansion@1.1.11
  │ │ │ │   ├── balanced-match@1.0.2
  │ │ │ │   └── concat-map@0.0.1
  │ │ │ ├─┬ nimma@0.2.2
  │ │ │ │ ├─┬ @jsep-plugin/regex@1.0.3
  │ │ │ │ │ └── jsep@1.3.8 deduped
  │ │ │ │ ├─┬ @jsep-plugin/ternary@1.1.3
  │ │ │ │ │ └── jsep@1.3.8 deduped
  │ │ │ │ ├── astring@1.8.4 deduped
  │ │ │ │ ├── jsep@1.3.8
  │ │ │ │ ├── jsonpath-plus@6.0.1
  │ │ │ │ └── lodash.topath@4.5.2 deduped
  │ │ │ ├── pony-cause@1.1.1 deduped
  │ │ │ ├─┬ simple-eval@1.0.0
  │ │ │ │ └── jsep@1.3.8 deduped
  │ │ │ └── tslib@2.4.1 deduped
  │ │ ├─┬ @stoplight/spectral-parsers@1.0.2
  │ │ │ ├── @stoplight/json@3.20.1 deduped
  │ │ │ ├── @stoplight/types@13.8.0 deduped
  │ │ │ ├─┬ @stoplight/yaml@4.2.3
  │ │ │ │ ├── @stoplight/ordered-object-literal@1.0.4 deduped
  │ │ │ │ ├── @stoplight/types@13.8.0 deduped
  │ │ │ │ ├── @stoplight/yaml-ast-parser@0.0.48
  │ │ │ │ └── tslib@2.4.1 deduped
  │ │ │ └── tslib@2.4.1 deduped
  │ │ ├── chalk@4.1.2 deduped
  │ │ ├── commander@2.20.3
  │ │ ├── deepmerge@2.2.1
  │ │ ├─┬ find-up@3.0.0
  │ │ │ └─┬ locate-path@3.0.0
  │ │ │   ├─┬ p-locate@3.0.0
  │ │ │   │ └─┬ p-limit@2.3.0
  │ │ │   │   └── p-try@2.2.0
  │ │ │   └── path-exists@3.0.0
  │ │ ├── globby@11.1.0 deduped
  │ │ ├── js-yaml@3.14.1 deduped
  │ │ ├─┬ json-dup-key-validator@1.0.3
  │ │ │ └── backslash@0.2.0
  │ │ ├─┬ json-schema-ref-parser@5.1.3
  │ │ │ ├── call-me-maybe@1.0.2 deduped
  │ │ │ ├─┬ debug@3.2.7
  │ │ │ │ └── ms@2.1.2 deduped
  │ │ │ ├── js-yaml@3.14.1 deduped
  │ │ │ └─┬ ono@4.0.11
  │ │ │   └── format-util@1.0.5
  │ │ ├── jsonschema@1.4.1
  │ │ ├── lodash@4.17.21
  │ │ ├─┬ matcher@1.1.1
  │ │ │ └── escape-string-regexp@1.0.5
  │ │ ├─┬ pad@2.3.0
  │ │ │ └─┬ wcwidth@1.0.1
  │ │ │   └─┬ defaults@1.0.4
  │ │ │     └── clone@1.0.4
  │ │ ├── require-all@3.0.0
  │ │ ├── semver@5.7.1
  │ │ ├── validator@13.7.0 deduped
  │ │ └── yaml-js@0.2.3
  │ ├── lodash.get@4.4.2
  │ ├── lodash.isempty@4.4.0
  │ ├── lodash.omit@4.5.0
  │ ├── lodash.uniq@4.5.0 deduped
  │ ├── lodash.uniqby@4.7.0
  │ ├── lodash.uniqwith@4.5.0
  │ ├─┬ micromatch@4.0.5
  │ │ ├── braces@3.0.2 deduped
  │ │ └── picomatch@2.3.1
  │ ├── openapi3-ts@3.1.2 deduped
  │ ├─┬ swagger2openapi@7.0.8
  │ │ ├── call-me-maybe@1.0.2 deduped
  │ │ ├─┬ node-fetch-h2@2.3.0
  │ │ │ └── http2-client@1.3.5
  │ │ ├─┬ node-fetch@2.6.7
  │ │ │ ├── UNMET OPTIONAL DEPENDENCY encoding@^0.1.0
  │ │ │ └─┬ whatwg-url@5.0.0
  │ │ │   ├── tr46@0.0.3
  │ │ │   └── webidl-conversions@3.0.1
  │ │ ├─┬ node-readfiles@0.2.0
  │ │ │ └── es6-promise@3.3.1
  │ │ ├─┬ oas-kit-common@1.0.8
  │ │ │ └── fast-safe-stringify@2.1.1
  │ │ ├─┬ oas-resolver@2.5.6
  │ │ │ ├── node-fetch-h2@2.3.0 deduped
  │ │ │ ├── oas-kit-common@1.0.8 deduped
  │ │ │ ├── reftools@1.1.9 deduped
  │ │ │ ├── yaml@1.10.2
  │ │ │ └── yargs@17.3.1 deduped
  │ │ ├── oas-schema-walker@1.1.5
  │ │ ├─┬ oas-validator@5.0.8
  │ │ │ ├── call-me-maybe@1.0.2 deduped
  │ │ │ ├── oas-kit-common@1.0.8 deduped
  │ │ │ ├─┬ oas-linter@3.2.2
  │ │ │ │ ├── @exodus/schemasafe@1.0.0-rc.9
  │ │ │ │ ├── should@13.2.3 deduped
  │ │ │ │ └── yaml@1.10.2
  │ │ │ ├── oas-resolver@2.5.6 deduped
  │ │ │ ├── oas-schema-walker@1.1.5 deduped
  │ │ │ ├── reftools@1.1.9 deduped
  │ │ │ ├─┬ should@13.2.3
  │ │ │ │ ├─┬ should-equal@2.0.0
  │ │ │ │ │ └── should-type@1.4.0 deduped
  │ │ │ │ ├─┬ should-format@3.0.3
  │ │ │ │ │ ├── should-type-adaptors@1.1.0 deduped
  │ │ │ │ │ └── should-type@1.4.0 deduped
  │ │ │ │ ├─┬ should-type-adaptors@1.1.0
  │ │ │ │ │ ├── should-type@1.4.0 deduped
  │ │ │ │ │ └── should-util@1.0.1 deduped
  │ │ │ │ ├── should-type@1.4.0
  │ │ │ │ └── should-util@1.0.1
  │ │ │ └── yaml@1.10.2
  │ │ ├── reftools@1.1.9
  │ │ ├── yaml@1.10.2
  │ │ └─┬ yargs@17.3.1
  │ │   ├── cliui@7.0.4 deduped
  │ │   ├── escalade@3.1.1
  │ │   ├── get-caller-file@2.0.5
  │ │   ├── require-directory@2.1.1
  │ │   ├─┬ string-width@4.2.3
  │ │   │ ├── emoji-regex@8.0.0
  │ │   │ ├── is-fullwidth-code-point@3.0.0
  │ │   │ └── strip-ansi@6.0.1 deduped
  │ │   ├── y18n@5.0.8
  │ │   └── yargs-parser@21.1.1
  │ ├─┬ url@0.11.0
  │ │ ├── punycode@1.3.2
  │ │ └── querystring@0.2.0
  │ └── validator@13.7.0
  ├─┬ @orval/msw@6.11.0
  │ ├── @orval/core@6.11.0 deduped
  │ ├── cuid@2.1.8
  │ ├── lodash.get@4.4.2 deduped
  │ ├── lodash.omit@4.5.0 deduped
  │ └── openapi3-ts@3.1.2 deduped
  ├─┬ @orval/query@6.11.0
  │ ├── @orval/core@6.11.0 deduped
  │ └── lodash.omitby@4.6.0
  ├─┬ @orval/swr@6.11.0
  │ └── @orval/core@6.11.0 deduped
  ├─┬ ajv@8.12.0
  │ ├── fast-deep-equal@3.1.3
  │ ├── json-schema-traverse@1.0.0
  │ ├── require-from-string@2.0.2
  │ └─┬ uri-js@4.4.1
  │   └── punycode@2.1.1
  ├── cac@6.7.14
  ├─┬ chalk@4.1.2
  │ ├─┬ ansi-styles@4.3.0
  │ │ └─┬ color-convert@2.0.1
  │ │   └── color-name@1.1.4
  │ └─┬ supports-color@7.2.0
  │   └── has-flag@4.0.0
  ├─┬ chokidar@3.5.3
  │ ├─┬ anymatch@3.1.3
  │ │ ├── normalize-path@3.0.0 deduped
  │ │ └── picomatch@2.3.1 deduped
  │ ├─┬ braces@3.0.2
  │ │ └─┬ fill-range@7.0.1
  │ │   └─┬ to-regex-range@5.0.1
  │ │     └── is-number@7.0.0
  │ ├── UNMET OPTIONAL DEPENDENCY fsevents@~2.3.2
  │ ├─┬ glob-parent@5.1.2
  │ │ └── is-glob@4.0.3 deduped
  │ ├─┬ is-binary-path@2.1.0
  │ │ └── binary-extensions@2.2.0
  │ ├─┬ is-glob@4.0.3
  │ │ └── is-extglob@2.1.1
  │ ├── normalize-path@3.0.0
  │ └─┬ readdirp@3.6.0
  │   └── picomatch@2.3.1 deduped
  ├─┬ enquirer@2.3.6
  │ └── ansi-colors@4.1.3
  ├─┬ execa@5.1.1
  │ ├─┬ cross-spawn@7.0.3
  │ │ ├── path-key@3.1.1
  │ │ ├─┬ shebang-command@2.0.0
  │ │ │ └── shebang-regex@3.0.0
  │ │ └─┬ which@2.0.2
  │ │   └── isexe@2.0.0
  │ ├── get-stream@6.0.1
  │ ├── human-signals@2.1.0
  │ ├── is-stream@2.0.1
  │ ├── merge-stream@2.0.0
  │ ├─┬ npm-run-path@4.0.1
  │ │ └── path-key@3.1.1 deduped
  │ ├─┬ onetime@5.1.2
  │ │ └── mimic-fn@2.1.0
  │ ├── signal-exit@3.0.7
  │ └── strip-final-newline@2.0.0
  ├─┬ find-up@5.0.0
  │ ├─┬ locate-path@6.0.0
  │ │ └─┬ p-locate@5.0.0
  │ │   └─┬ p-limit@3.1.0
  │ │     └── yocto-queue@0.1.0
  │ └── path-exists@4.0.0
  ├─┬ fs-extra@10.1.0
  │ ├── graceful-fs@4.2.10
  │ ├─┬ jsonfile@6.1.0
  │ │ ├── graceful-fs@4.2.10 deduped
  │ │ └── universalify@2.0.0 deduped
  │ └── universalify@2.0.0
  ├── lodash.uniq@4.5.0
  ├─┬ openapi3-ts@3.1.2
  │ └── yaml@2.2.1
  ├── string-argv@0.3.1
  └─┬ tsconfck@2.0.2
    └── UNMET OPTIONAL DEPENDENCY typescript@^4.3.5
MatthijsKok commented 1 year ago

Good work, the amount of dependencies could certainly be reduced.

The deprecation warning npm WARN deprecated querystring@0.2.0: .... happens because of the url dependency in @orval/core, which has only one usage. link

The Node.js documentation for this function (link) gives an alternative function to migrate to.

anymaniax commented 1 year ago

Hello guys, if you want to work on this I would really appreciate. If you found solution to reduce the bundle it's really welcome

MatthijsKok commented 1 year ago

@anymaniax I've created Pull Request #731 to fix the deprecation warning.

JaneJeon commented 1 year ago

My question is, how much does this matter when it gets bundled into the frontend? AFAIK the only things I'd need are axios (or if I'm using react-query, @tanstack/react-query), both of which I already use, so the module impact should be close to zero in cases like this?

Atulin commented 1 year ago

Well, Axios could also be removed since fetch is a thing. So the final build dependencies can be reduced to zero

melloware commented 10 months ago

Since this library only generates code I agree how much does its packaging and size matter since its not being bundled into your webapp?

melloware commented 10 months ago

Closing this for lack of response. I would be happy to reopen if it we get strong feedback.