Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
bun-scripty
Advanced tools
Bun-Scripty is a package that allows you to define npm scripts in separate TypeScript files, adapted to work with Bun. This project is inspired by and based on scripty by Test Double.
Bun-Scripty allows you to organize your npm scripts into separate TypeScript files, making them easier to maintain and manage. Instead of cluttering your package.json
with numerous script commands, you can create individual TypeScript script files for each command.
bun add bun-scripty
Create a scripts
directory in your project root (or customize the path, see Customizing Script Path).
Add your TypeScript script files in this directory. For example, scripts/test.ts
for a test
script.
Make your script files executable:
chmod +x scripts/test.ts
In your package.json
, use Bun-Scripty to run your scripts:
{
"scripts": {
"test": "bun-scripty"
}
}
Now, when you run bun run test
, Bun-Scripty will execute the scripts/test.ts
file.
Other valid separating delimiters are :
, .
, |
, and /
. These represent the same pattern i.e. a new folder.
// All of the examples below will look for the script in the `scripts/test/unit.ts` file
{
"scripts": {
"test:unit": "bun-scripty",
"test.unit": "bun-scripty",
"test|unit": "bun-scripty",
"test/unit": "bun-scripty"
}
}
{ "scripts": { "test:unit": "bun-scripty", "test.unit": "bun-scripty", "test|unit": "bun-scripty", "test/unit": "bun-scripty" } }
As of now, the common ':' delimiter works, but bun's zsh autocomplete shows it in a weird way. The other delimiters work as expected
with the autocomplete.
## Features
- Organize npm scripts into separate TypeScript files
- Support for nested directories
- Works seamlessly with Bun
- Customizable script path
## Current Limitations and Future Plans
- **Current Version**: Bun-Scripty currently only supports TypeScript (.ts) files.
- **Future Expansion**: We plan to expand support to other languages in future releases, similar to the original scripty project.
## Acknowledgements
This project is based on the excellent [scripty](https://github.com/testdouble/scripty) package by Test Double. We'd like to express our gratitude for their solid script setup and structure, which served as the foundation for Bun-Scripty.
## License
[MIT License](LICENSE)
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
Scripty for Bun
The npm package bun-scripty receives a total of 0 weekly downloads. As such, bun-scripty popularity was classified as not popular.
We found that bun-scripty demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.