Skip to content

Bump glob from v7 to v10 #7112

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

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Conversation

birkskyum
Copy link
Contributor

@birkskyum birkskyum commented Aug 19, 2024

Removes this warning on clean install (remove node_modules and npm i):

npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

Since Glob v9 a Promise based syntax is used instead of a callback one, and since Glob v10 only named exports are used, so this PR rewrites from:

// Glob v7
var glob = require('glob');

glob(path, function(err, files) {})

to

// Glob v10
var { glob } = require('glob');

glob(path)
.then((files) => {})
.catch((err) => {})

The latest Glob version is v11, but it requires Node 20+, so Glob v10 is used here.

Changelog

@birkskyum birkskyum force-pushed the bump-glob-from-v7-to-v10 branch 2 times, most recently from fe368b8 to 6ab3921 Compare August 19, 2024 12:52
@archmoj
Copy link
Contributor

archmoj commented Aug 19, 2024

What is the minimum node.js version?

@birkskyum
Copy link
Contributor Author

birkskyum commented Aug 19, 2024

Node 16 was set as minimum as of Glob v9

@birkskyum birkskyum force-pushed the bump-glob-from-v7-to-v10 branch from 6ab3921 to 95e57c6 Compare August 19, 2024 12:54
@archmoj
Copy link
Contributor

archmoj commented Aug 19, 2024

Thanks very much for the PR.

@archmoj archmoj merged commit fe1750d into plotly:master Aug 19, 2024
1 check failed
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

Successfully merging this pull request may close these issues.

2 participants