-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: dependency upgrades and npx bins in builds #1
Conversation
Thanks for the PR, but I've got to ask first: Why do you want to prefix everything with npx? These commands should work without. |
Also, you've switched to a newer version of npm with the new lockfile format. I've noticed some strange things with the new npm and would like to skip on moving to it until its a bit more stable. |
|
Sorry about the delay, the past months have been quite busy. npm will always prefer the commands that are installed in node_modules. npx is a command to optionally download these packages or to use when you run them from command line rather than from a scripts definition. None of the commands used in the scripts need to be globally installed, as they all exist within node_modules. I've updated idtsc just now, so this PR is obsolete. |
@Lusito sorry but you are wrong, and I'm just trying to help here. This package does not build for all developers using the provided package.json across all environments, but if you don't care then so be it. |
The link you posted it about running a node_modules command from the command line. That is different from running a node_modules command from within a package.json script. Here is the explanation: https://docs.npmjs.com/cli/v7/using-npm/scripts#path
In other words: Since I installed rimraf as a devDependency, it will be added to the PATH and I can run it without using npx when I use the package.json scripts definition. Your stackoverflow link even has an answer which shows this (even though it doesn't explain why this works very well): https://stackoverflow.com/a/28549523 I have done this in a lot of personal and commercial projects and never had any issues with this (across multiple environments: Mac, Linux and Windows). Now you might argue that I didn't add eslint in the (dev)dependencies, but I added it indirectly via another package, which works exactly the same. Any package, which installs itself as a binary into I'm not trying to ignore your argument. I'm just saying, that unless there is some other issue here, it should work perfectly fine as per specification of npm scripts. If it does not work for you, feel free to create an issue with an error message and steps to reproduce. |
One issue I did sometimes have cross-platform is that quotes do not work the same on all platforms. Maybe you are on windows and the single quotes don't work for you? |
I've changed quotes to double-quotes, and added some extra quotes, which should fix possible problems on windows. Feel free to try again on the latest master branch. |
The tool is currently broken as it fails to parse:
This PR upgrades dependencies to latest typescript parser versions and uses
npx
for build taks.