Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Cleans a distribution directory by removing distribution files of deleted source files
A simple script that can be used to cleanup previously transpiled typescript files. When typescript is setup to transpile files from a source to distribution folder, it won't automatically remove distribution files when their source file is deleted. ts-cleaner can take care of this task for you, both in single time build mode, or in watch mode.
Npm: ts-cleaner
tsc && ts-cleaner
concurrently "tsc --watch" "ts-cleaner --watch"
Usage: ts-cleaner [options] [command]
Commands:
help Display help
version Display version
Options:
-d, --dist [value] The distribution folder with js files (defaults to "dist")
-h, --help Output usage information
-i, --ifDeclared If set to true, js files in dist will only be removed if a file with the same name and a .d.ts extension is also present
-s, --src [value] The source folder with ts files (defaults to "src")
-v, --verbose Whether to show messages for files being deleted (disabled by default)
-V, --version Output the version number
-w, --watch Whether to watch for files being deleted (disabled by default)
ts-cleaner also provides two simple functions for usage from within a node script:
const tsCleaner = require("ts-cleaner");
/**
* Cleans the directory by removing dist files that no longer have a source file
* Arguments: Source directory, distribution directory, verbose
* Where a directory is either an absolute path, or a path relative to process.cwd()
*/
tsCleaner.clean("srcDir", "distDir", true);
/**
* Cleans the directory by removing dist files when a src file is deleted
* Arguments: Source directory, distribution directory, ifDeclared, verbose
* Where a directory is either an absolute path, or a path relative to process.cwd(),
* and ifTsDeclaration does the same as the argument
*/
tsCleaner.watch("srcDir", "distDir", false, true);
FAQs
Cleans a distribution directory by removing distribution files of deleted source files
The npm package ts-cleaner receives a total of 457 weekly downloads. As such, ts-cleaner popularity was classified as not popular.
We found that ts-cleaner 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.