![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
lerna-watcher
Advanced tools
An unofficial watcher for Lerna, similar to lerna-watch.
It was made with personal use in mind, but feel free to use/fork it, or PRs are welcome.
The tool uses internal Lerna APIs and although unlikely, it might break anytime.
Execute the following in your Lerna root:
yarn add --dev lerna-watcher
(-W
if you're using workspaces)
or
npm i --save-dev lerna-watcher
Run
yarn lerna-watcher --help
or npm run lerna-watcher --help
for the available commands and options.
An example command:
watch package-foo package-bar --stream --ignore "package-baz-*"
This will watch for changes in packages matching package-foo
and package-bar
along with their local dependencies excluding any dependency matching with package-baz-*
.
If any of the packages change their respective commands (package.json
scripts) will be run with Lerna, then this process is repeated for all dependents in topological order until there are no more dependents.
Forever running commands (such as web servers) are always killed with SIGTERM
to allow graceful shutdowns and then restarted on changes.
There are no timeouts anywhere.
Apart from the command line options, additional configuration can be done in lerna.json
under the watcher
property.
Here are the defaults with some explanation in the comments:
// lerna.json
{
// ...
// All of the properties are optional.
"watcher": {
// Stop the watching process if any of the commands fail.
"exitOnError": false,
// Configuration for packages.
"packages": {
// The default configuration for every package,
// unless specified otherwise.
//
// These example values are used by default if omitted from the config.
"default": {
// Paths to watch relative to the package root.
"include": ["**"],
// Files to exclude from watching relative to the package root.
// These override "include".
"exclude": [
"**/node_modules/**",
"**/.git/**",
"**/dist/**",
"**/build/**",
".*/**"
],
// The commands (npm/yarn scripts) to run on change.
// These are executed in order.
//
// This list must never be empty.
"commands": ["dev"],
// Alternatively, these commands are run when the package is
// a dependency, "commands" and "dependencyCommands" are completely
// independent.
//
// This list is allowed to be empty, and is empty by default.
"dependencyCommands": [],
// Continue with running the next command in case the previous one fails.
"continueOnError": false,
// Always ignore this package as a dependency.
"ignore": false
},
// Configuration for package names by wildcard patterns.
//
// All package must match exactly one pattern.
"patterns": {
// All the properties are the same as in "default".
//
// For missing properties, the default ones are used.
"foo-*": {
// Build and start every foo when directly watched.
"commands": ["test", "build", "start"],
// Build and test, but don't start it if it's a dependency.
"dependencyCommands": ["test", "build"]
}
}
}
}
}
FAQs
An opinionated watcher tool for Lerna.
The npm package lerna-watcher receives a total of 32 weekly downloads. As such, lerna-watcher popularity was classified as not popular.
We found that lerna-watcher 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.