Skip to content

Commit a947f25

Browse files
authored
fix: update lifecycle script list in run-script (#7679)
This change updates the list of lifecycle scripts in the RunScript class to include important npm scripts that were previously missing. - add `prepare`, `prepublishOnly` scripts - add `dependencies` scripts - add `prepack` and `postpack` scripts - todo comments removed due to changes reflected <!-- What / Why --> <!-- Describe the request in detail. What it does and why it's being changed. --> ## References The documents I referenced are as follows: - https://docs.npmjs.com/cli/v10/using-npm/scripts <!-- Examples: Related to #0 Depends on #0 Blocked by #0 Fixes #0 Closes #0 -->
1 parent 9214be9 commit a947f25

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/commands/run-script.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ class RunScript extends BaseCommand {
165165
return
166166
}
167167

168-
// TODO this is missing things like prepare, prepublishOnly, and dependencies
169168
const cmdList = [
169+
'prepare', 'prepublishOnly',
170+
'prepack', 'postpack',
171+
'dependencies',
170172
'preinstall', 'install', 'postinstall',
171173
'prepublish', 'publish', 'postpublish',
172174
'prerestart', 'restart', 'postrestart',

0 commit comments

Comments
 (0)