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

migrate npm-run-all2 to read-package-json-fast #19

Closed
43081j opened this issue Jan 29, 2024 · 2 comments
Closed

migrate npm-run-all2 to read-package-json-fast #19

43081j opened this issue Jan 29, 2024 · 2 comments

Comments

@43081j
Copy link
Collaborator

43081j commented Jan 29, 2024

npm-run-all2 is a fork of npm-run-all:
https://github.com/bcomnes/npm-run-all2

it was created since npm-run-all isn't actively maintained anymore

it depends on read-pkg which is fairly bloated. We can switch to npm's own read-package-json-fast:
https://github.com/npm/read-package-json-fast

Both are only for reading the package.json in the current working directory, they do not traverse up the directory tree.

So we should be able to replace with:

const data = await readPackageJsonFast('./package.json');

// or

const packagePath = path.join(cwd, './package.json'); // `cwd` is passed in for npm-run-all at least
const data = await readPackageJsonFast(packagePath);

It is probably also worth moving people from npm-run-all to npm-run-all2 if we ever bump into that in other repos.

@43081j 43081j added the help wanted Extra attention is needed label Jan 29, 2024
@43081j
Copy link
Collaborator Author

43081j commented Jan 30, 2024

opened bcomnes/npm-run-all2#130 to tackle this

@43081j 43081j removed the help wanted Extra attention is needed label Jan 30, 2024
@43081j
Copy link
Collaborator Author

43081j commented Feb 1, 2024

Fixed by bcomnes/npm-run-all2#130 🥳

@43081j 43081j closed this as completed Feb 1, 2024
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

1 participant