Skip to content

Commit ccced1c

Browse files
committed
chore: switch to pnpm
1 parent ee3d221 commit ccced1c

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

packages/command-tests/commands.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function main() {
3939
console.log("Preparing...");
4040

4141
const pluggableWidgetsToolsPath = "../pluggable-widgets-tools";
42-
const { stdout: packOutput } = await execAsync("npm pack", join(__dirname, pluggableWidgetsToolsPath));
42+
const { stdout: packOutput } = await execAsync("pnpm pack", join(__dirname, pluggableWidgetsToolsPath));
4343
const toolsPackagePath = join(__dirname, pluggableWidgetsToolsPath, packOutput.trim().split(/\n/g).pop());
4444

4545
const workDirs = [];
@@ -116,7 +116,7 @@ async function main() {
116116
console.log(`[${widgetName}] Checking dependencies files...`);
117117
await checkDependenciesFiles(isNative, boilerplate, version);
118118

119-
console.log(`[${widgetName}] Testing npm start...`);
119+
console.log(`[${widgetName}] Testing pnpm start...`);
120120
await testStart();
121121

122122
// Check native dependency management
@@ -183,26 +183,26 @@ async function main() {
183183

184184
await writeJson(join(workDir, "package.json"), widgetPackageJson);
185185

186-
await execAsync("npm install --loglevel=error", workDir);
186+
await execAsync("pnpm install --loglevel=error", workDir);
187187
}
188188

189189
async function testLint() {
190-
await execFailedAsync("npm run lint", workDir);
191-
await execAsync("npm run lint:fix", workDir);
192-
await execAsync("npm run lint", workDir);
190+
await execFailedAsync("pnpm run lint", workDir);
191+
await execAsync("pnpm run lint:fix", workDir);
192+
await execAsync("pnpm run lint", workDir);
193193
}
194194

195195
async function testTest() {
196196
if (platform === "native") {
197-
await execFailedAsync("npm test -- --forceExit", workDir);
198-
await execAsync("npm test -- -u --forceExit", workDir);
197+
await execFailedAsync("pnpm test -- --forceExit", workDir);
198+
await execAsync("pnpm test -- -u --forceExit", workDir);
199199
} else {
200-
await execAsync("npm test -- --forceExit", workDir);
200+
await execAsync("pnpm test -- --forceExit", workDir);
201201
}
202202
}
203203

204204
async function testBuild() {
205-
await execAsync("npm run build", workDir);
205+
await execAsync("pnpm run build", workDir);
206206
if (
207207
!existsSync(
208208
join(
@@ -216,15 +216,15 @@ async function main() {
216216
}
217217

218218
async function testTestUnit() {
219-
await execAsync("npm run test:unit -- --forceExit", workDir);
219+
await execAsync("pnpm run test:unit -- --forceExit", workDir);
220220
if (!existsSync(join(workDir, `/dist/coverage/clover.xml`))) {
221221
throw new Error("Expected coverage file to be generated, but it wasn't.");
222222
}
223223
}
224224

225225
async function testRelease() {
226226
rm("-rf", join(workDir, "dist"));
227-
await execAsync("npm run release", workDir);
227+
await execAsync("pnpm run release", workDir);
228228

229229
if (
230230
!existsSync(
@@ -273,7 +273,7 @@ async function main() {
273273
}
274274

275275
async function testStart() {
276-
const startProcess = exec("npm start", { cwd: workDir, env: { ...process.env, NO_COLOR: "true" } });
276+
const startProcess = exec("pnpm start", { cwd: workDir, env: { ...process.env, NO_COLOR: "true" } });
277277

278278
try {
279279
await new Promise((resolve, reject) => {
@@ -321,7 +321,7 @@ async function main() {
321321
Buffer.from(fileData)
322322
])
323323
);
324-
await execAsync("npm run build", workDir);
324+
await execAsync("pnpm run build", workDir);
325325
if (!existsSync(jsonPath)) {
326326
throw new Error("Expected dependency json file to be generated, but it wasn't.");
327327
}

0 commit comments

Comments
 (0)