Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
yarn-no-save
Advanced tools
Enabling --no-save
/ -N
option to Yarn cli commands. The option prevents saving to package.json when you do yarn add
stuff.
First you should have yarn installed globally. See more at the official site
install yarn-no-save globally:
$ yarn global add yarn-no-save
Now you can use Yarn with --no-save
/ -N
option in your command:
$ yarn add --no-save xxxxxxxx
Firstly, let's see how it works. Basically, we are making a feature injection to Yarn:
before saving to the root manifest (package.json), we try to stop the saving operation if --no-save
/ -N
option is given.
to prevent yarn to throw an exception when we are trying to remove packages which are not found in the manifest file (package.json).
to update the help message.
Also, the "feature injection" will fail if Yarn in updated or reinstalled, so we need to check if any changes (including file replacement) are made to the file. Therefore, we build a watcher to surveil the changes. In order to ease you up, we register it as a system service at startup. So there is nothing more to do when you reinstall Yarn by default.
In advance, we offered you someway to control the service. Here are the advanced usages (These commands are ONLY available for MacOS):
Stop watching and reset Yarn to default:
$ yns reset
This will reinstall Yarn from your current registry. If you want --no-save
option to come back, you should run the following commands:
$ yns
$ yns start
Start watching service:
$ yns start
Stop watching service:
$ yns stop
Restart watching service:
$ yns restart
The --no-save / -N option will be available in help message by typing "yarn help add
" or "yarn add --help
".
You are free to uninstall any packages installed with --no-save
/ -N
option by executing "yarn uninstall xxxxx
" (postuninstall scripts will be executed by doing this, while the same thing won't happen by just deleting the folders from node_modules).
Please contact me if you have any problems into this tool.
FAQs
Enabling --no-save/-N option to Yarn cli commands
The npm package yarn-no-save receives a total of 26 weekly downloads. As such, yarn-no-save popularity was classified as not popular.
We found that yarn-no-save demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.