verb icon indicating copy to clipboard operation
verb copied to clipboard

0.9.0: related.list / toc problems

Open tunnckoCore opened this issue 9 years ago • 12 comments

Not sure for where the problem come, but i have

"toc": {
  "render": true,
  "method": "preWrite",
  "maxdepth": 4
}

and when ran verb --config related.list:... it overrides the toc option to true.

Again, not sure enough. Before didn't have such problems and don't know from when it is (if it is actual bug)

tunnckoCore avatar Oct 24 '16 17:10 tunnckoCore

really? that's strange.

marking as a bug

jonschlinkert avatar Oct 24 '16 17:10 jonschlinkert

do you have a global config? this would still be a bug, but is there a chance that verb is somehow merging your global config over the local config?

Also, try using a = as a separator:

$ verb --config=related.list:foo,bar,baz

jonschlinkert avatar Oct 24 '16 17:10 jonschlinkert

do you have a global config?

I believe i deleted them with ~/.dat* (date-store and data-store)

But yea, I'll try in clean folder and no global config, and i'll back.

tunnckoCore avatar Oct 24 '16 17:10 tunnckoCore

Yea, still resets the toc option, even after deletion of global stores.

https://asciinema.org/a/0xbhmy7egjfbacd8uapzbdllj

(edit: 1) with = is same; 2) with adding <!-- toc --> too)

tunnckoCore avatar Oct 24 '16 18:10 tunnckoCore

Ok, that makes it easier thx. I was hoping it was just a glitch in verb itself, probably in the task logic or how the defaults are setup. This at least means that the global config isn't related to the issue

jonschlinkert avatar Oct 24 '16 18:10 jonschlinkert

@jonschlinkert do you know from where problem comes to navigate me so i can PR, cuz it is very weird. Moreover when I almost every day publish new package. ;d

edit: because I maybe don't have time to debug. (saying "maybe" because I always say it that way but I always debugging and finding it ;d)

tunnckoCore avatar Mar 30 '17 16:03 tunnckoCore

it still does this?

do you know from where problem...

No, not yet. But I suspect it comes from base-cli-process or base-cli-schema (probably the former).

jonschlinkert avatar Mar 30 '17 16:03 jonschlinkert

it still does this?

yea

But I suspect it comes from

ookey, i'll look what's up there, thanks

tunnckoCore avatar Mar 30 '17 16:03 tunnckoCore

I believe that the problem is somewhere here base-cli-process/index.js#L50-L58. It seems that the passed obj to the var fn = this.cli.process is not correct, but the opts is correct. So sounds like problem in the *-schema's .normalize? hm :thinking:

edit: in obj is toc: { render: true } and in opts is toc: { render: true, method: 'preWrite', maxdepth: 3 } }

edit2: daaamn, i don't know ;d

tunnckoCore avatar Mar 30 '17 16:03 tunnckoCore

forget that, nothing related ;d

tunnckoCore avatar Mar 30 '17 16:03 tunnckoCore

ok, so the problem still exists, and we're not sure where it's happening?

jonschlinkert avatar Mar 31 '17 13:03 jonschlinkert

Yea, absolutely.

Maybe the easy fix can be if we allow everything to be controlled through <!-- toc --> (if it isn't possible currently, i'm not sure), it would look like as it is CLI.

I was debugging few hours and didn't detect where the problem comes from. It may be in the verbose/verb-toc too.

tunnckoCore avatar Mar 31 '17 15:03 tunnckoCore