Skip to content
This repository was archived by the owner on Aug 18, 2024. It is now read-only.

Commit 605077b

Browse files
committed
chore: improve var naming
1 parent 39ca0c0 commit 605077b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ exports.run = async (options) => {
113113

114114
const allowScripts = pkg.allowScripts || {};
115115

116-
const allowedScripts = queue
116+
const allowedPackages = queue
117117
.map((path) => {
118118

119119
const childPkg = require(Path.join(cwd, path, 'package.json'));
@@ -141,7 +141,7 @@ exports.run = async (options) => {
141141
}
142142

143143
if (!Semver.validRange(allowScripts[name])) {
144-
throw new Error(`Invalid version range in allowedScripts[${name}]: ${allowScripts[name]}`);
144+
throw new Error(`Invalid version range in allowScripts[${name}]: ${allowScripts[name]}`);
145145
}
146146

147147
if (!Semver.satisfies(childPkg.version, allowScripts[name])) {
@@ -154,15 +154,15 @@ exports.run = async (options) => {
154154

155155
await internals.runScript('preinstall', { pkg, path: '', cwd, unsafePerm: true }, options);
156156

157-
for (const { path, childPkg } of allowedScripts) {
157+
for (const { path, childPkg } of allowedPackages) {
158158
await internals.runScript('preinstall', { pkg: childPkg, path, cwd }, options);
159159
}
160160

161-
for (const { path, childPkg } of allowedScripts) {
161+
for (const { path, childPkg } of allowedPackages) {
162162
await internals.runScript('install', { pkg: childPkg, path, cwd }, options);
163163
}
164164

165-
for (const { path, childPkg } of allowedScripts) {
165+
for (const { path, childPkg } of allowedPackages) {
166166
await internals.runScript('postinstall', { pkg: childPkg, path, cwd }, options);
167167
}
168168

0 commit comments

Comments
 (0)