unjs / c12

βš™οΈ Smart Configuration Loader
MIT License
543 stars 20 forks source link

feat: support `install` for source options #126

Closed pi0 closed 11 months ago

pi0 commented 11 months ago

πŸ”— Linked issue

51

❓ Type of change

πŸ“š Description

This adds a shortcut for install giget option. A layer extended with [name, { install: true }] will install it's dependencies

πŸ“ Checklist

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6c09735) 76.83% compared to head (5ed62b3) 76.89%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #126 +/- ## ========================================== + Coverage 76.83% 76.89% +0.05% ========================================== Files 7 7 Lines 803 805 +2 Branches 80 80 ========================================== + Hits 617 619 +2 Misses 184 184 Partials 2 2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Marian-Calin-Stroescu-Fiskars commented 11 months ago

it looks like it is going in an infinite loop?

I am using nuxt to extend some layers:

  extends: [
    [
      `github:username/repo/path1#develop`,
      { install: true }
    ],
    [
      `github:username/repo/path2#develop`,
      { install: true }
    ],
    [
      `github:username/repo/path3#develop`,
      { install: true }
    ],
  ],

when i run install it throws this:

(node:37546) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 keypress listeners added to [Socket]. Use emitter.setMa…
β”‚ (Use `node --trace-warnings ...` to show where the warning was created)
β”‚ (node:37546) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Socket]. Use emitter.setMaxList…
β”‚ (node:37546) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Socket]. Use emitter.setMaxLi…
pi0 commented 11 months ago

@Marian-Calin-Stroescu-Fiskars Would you please open a new issue with reproduction I can check? πŸ™πŸΌ