apify / apify-docs

This project is the home of Apify's documentation.
https://docs.apify.com
Apache License 2.0
28 stars 73 forks source link

Incorrect version, log on JavaScript SDK #626

Closed HonzaTuron closed 1 year ago

HonzaTuron commented 1 year ago
image

Docs of Apify SDK shows version 3.0, when 3.1.7 is the latest one. It's visible in next version: https://docs.apify.com/sdk/js/reference/next

Also, some content isn't available for 3.0, e.g. log (only in latest)

Log docs doesn't support modern syntax: https://docs.apify.com/sdk/js/reference/next/class/Log

Log doc is duplicated with crawlee one: https://crawlee.dev/api/core/class/Log

Also, console.log is used instead of apify log: https://docs.apify.com/sdk/js/docs/examples/accept-user-input

Reported at: https://apifier.slack.com/archives/C0L33UM7Z/p1687946566788449

B4nan commented 1 year ago

I will close this with the v3.1 docs snapshot release, the rest feels irrelevant (or needs to be addressed elsewhere).

Also, some content isn't available for 3.0, e.g. log (only in latest)

This is correct, the log export was added in v3.1, its not supposed to be in v3.0 docs.

Log docs doesn't support modern syntax: docs.apify.com/sdk/js/reference/next/class/Log

This needs to be fixed in the jsdoc in apify-shared: https://github.com/apify/apify-shared-js/commit/1b2a0459bc0e53719058e3854761628b8653d4a8

Log doc is duplicated with crawlee one: crawlee.dev/api/core/class/Log

This is on purpose, as it is exported in both apify sdk and crawlee.

Also, console.log is used instead of apify log: docs.apify.com/sdk/js/docs/examples/accept-user-input

I believe we use console.log in examples on purpose as its something people already know.

B4nan commented 1 year ago

Fixed via https://github.com/apify/apify-sdk-js/commit/5395a297c46aa241889bd91a6077d0d4176b5459