k2snowman69 / exec-if-exists Goto Github PK
View Code? Open in Web Editor NEWExecutes a npm cli if it exists, else it fails silently without error
License: MIT License
Executes a npm cli if it exists, else it fails silently without error
License: MIT License
We should spawn a normal npm exec vs exec-if-exists and make sure it's the same
Add testing and update the circleci config to run them
When the husky config looks like this:
module.exports = {
hooks: {
'commit-msg': [
'echo npm',
'exec-if-exists npm -v',
'echo does not exist',
'exec-if-exists asdfasdfasdfadsf -v',
'echo commitlint',
'exec-if-exists commitlint -E HUSKY_GIT_PARAMS',
].join(' && '),
'pre-commit': 'lint-staged',
'pre-push': 'npm test',
},
};
The output looks like this:
husky > commit-msg (node v12.18.4)
npm
6.14.6
_stream_readable.js:681
dest.end();
^
TypeError: dest.end is not a function
at Socket.onend (_stream_readable.js:681:10)
at Object.onceWrapper (events.js:421:28)
at Socket.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1220:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
husky > commit-msg hook failed (add --no-verify to bypass)
So looks like something is wrong with exiting the first process or maybe piping?
Expected:
npm ERR! could not determine executable to run
Actual:
The version of the globally installed npm library
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Preset package is missing a renovate-config entry (@snowcoders)
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
.github/workflows/ci.yml
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/setup-node v4
.github/workflows/publish.yml
actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
actions/setup-node v4
package.json
find-up ^7.0.0
@release-it/keep-a-changelog 5.0.0
@snowcoders/renovate-config 3.0.0-beta.17
@types/which 3.0.3
@typescript-eslint/eslint-plugin 6.20.0
@typescript-eslint/parser 6.20.0
changelog-updater 2.0.3
concurrently 8.2.2
cpy-cli 5.0.0
eslint 8.56.0
eslint-config-prettier 9.1.0
eslint-plugin-import 2.29.1
eslint-plugin-prettier 5.1.3
husky 9.0.7
jest 29.7.0
lint-staged 15.2.1
prettier 3.2.4
release-it 17.0.3
rimraf 5.0.5
sortier 2.0.2
ts-jest 29.1.2
tslib 2.6.2
typescript 5.3.3
node >=16.0.0
I've noticed that the performance for exec-if-exists now hangs for a second or two before executing. I think it's because of how it's searching for files in the node_modules folder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.