documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Task/update docs tests failing on master

Open DavideDaniel opened this issue 3 years ago • 4 comments

Results of running npm run build and assessing npm test on master.

On master running npm test yields: image

Update: above was resolved by running npm ci first so I dropped the commit to amend tests.

Running npm run build results in self documentation breaking: image image

DavideDaniel avatar Nov 18 '21 03:11 DavideDaniel

Why are there differences in CI and local? I'm running node 14.18.1 but locally tests fail due to the additional \\ but in CI I can see it failing from the lack of. Does anyone know?

DavideDaniel avatar Nov 18 '21 07:11 DavideDaniel

@DavideDaniel you need to update your local packages, just execute npm ci

anthony-redFox avatar Nov 18 '21 09:11 anthony-redFox

On master, on node v14.18.1, ran npm ci and then npm run build and the command breaks in the midst of parsing own file. image image

Investigating underlying issue with [email protected] but if you don't have this happening on your end @anthony-redFox , please let me know.

DavideDaniel avatar Nov 19 '21 05:11 DavideDaniel

The problem is when konan parses https://github.com/documentationjs/documentation/blob/master/src/output/html.js#L23-L26 The dynamic import statements are not properly evaluated here https://github.com/egoist/konan/blob/master/index.js#L40 This is causing npm run build to break the self documenting, which probably means it would break for others as well. image

There is an option to disable detecting dynamic imports: https://github.com/egoist/konan#dynamicimport, which does seem to fix the issue. image

DavideDaniel avatar Nov 19 '21 06:11 DavideDaniel