ember-learn / ember-jsonapi-docs

fixes up the ember docs generated by YUIDoc to be in JSONAPI format + some other niceties
9 stars 11 forks source link

fix: ensure ember-data works properly #119

Closed runspired closed 1 year ago

runspired commented 1 year ago

Docs Generation Changes

resolves #117 partially resolves #118 by enabling work arounds

note, with this change you must explicitly opt-in to install and build of docs locally.

yarn gen --project ember --version 4.12.0 --build --install

If you don't opt in you will get whatever docs build was last built in that project, which for local purposes like this is typically preferred anyway.

Docs Parsing Changes

Updated Parser

Updated the parser to resolve several issues with EmberData docs not being correctly parsed. I've manually reviewed all EmberData documentation and this has no ill-effects. We should also review the Ember documentation.

Fixed Async Issues

Fixed Bug

There was a bug in which documentation with an id longer than 50 would not be saved into the json-docs.

https://github.com/ember-learn/ember-jsonapi-docs/blob/d25d94a1ee4db5c4048aa84d994a674a0061b09b/lib/save-document.js#L21-L23

This led to the module @ember-data/experimental-preview-types not being built properly. I've utilized the code comment to improve the heuristic to capture whatever case this was originally here for (sounds like no one knows?) so that EmberData's docs will correctly build.