Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated examples using glob in Chapter 2 #49

Open
vramana opened this issue Feb 13, 2024 · 2 comments
Open

Outdated examples using glob in Chapter 2 #49

vramana opened this issue Feb 13, 2024 · 2 comments

Comments

@vramana
Copy link

vramana commented Feb 13, 2024

Current version of glob doesn't support callback API. May be the chapter needs to be updated or recommend an older version.

https://www.npmjs.com/package/glob

@gvwilson
Copy link
Owner

thanks for the pointer - a pull request would be great (and all contributors are acknowledged).

@perterHUAN
Copy link

We need to understand all three layers in order to debug things when they go wrong, so this chapter explores callbacks, while Chapter 3 shows how promises and async/await work.

  • At the beginning of Chapter 2, it's mentioned that we initially explore callbacks in this chapter, while Chapter 3 delves into how async/await operates.
  • The newer version of glob returns a Promise, allowing data or error information to be accessed via the then method. However, changing to an example using the updated glob might be premature, as Promises are discussed in Chapter 3, whereas this chapter primarily focuses on callbacks.
  • It would be appropriate to maintain the current code examples but clarify their version, so readers can follow along without encountering errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants