Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
chore: force to use pnpm instead of npm
Browse files Browse the repository at this point in the history
  • Loading branch information
mzrtamp committed Aug 1, 2024
1 parent ab16945 commit 2ba3b1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifierEnding": "js",
"npm.packageManager": "npm",
"npm.packageManager": "pnpm",
"liveshare.languages.allowGuestCommandControl": true
}
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function npmInstall(deleteDir = false, forceInstall = false, additionalArgs = []
}
}

execSync(`npm install${isGlitch ? " --only=prod" : ""}${forceInstall ? " --force" : ""} ${additionalArgs.join(" ")}`);
execSync(`pnpm install${isGlitch ? " --only=prod" : ""}${forceInstall ? " --force" : ""} ${additionalArgs.join(" ")}`);
}

if (isGlitch) {
Expand Down Expand Up @@ -104,7 +104,7 @@ if (isGlitch || isReplit) {
}).listen(Number(process.env.PORT || 3_000) || 3_000);

console.info(`[INFO] ${isGlitch ? "Glitch" : "Replit"} environment detected, trying to compile...`);
execSync(`npm run compile`);
execSync(`pnpm run compile`);
console.info("[INFO] Compiled.");
}

Expand All @@ -128,10 +128,10 @@ if (streamStrategy === "play-dl" && !existsSync(nodePath.resolve(process.cwd(),
rmSync(nodePath.resolve(process.cwd(), "temp.zip"), { force: true });

console.log("[INFO] Installing packages for play-dl...");
execSync("cd play-dl-fix && npm install");
execSync("cd play-dl-fix && pnpm install");

console.log("[INFO] Compiling play-dl...");
execSync("cd play-dl-fix && npm run build");
execSync("cd play-dl-fix && pnpm run build");
}
console.info("[INFO] Starting the bot...");

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"main": "index.js",
"type": "module",
"scripts": {
"build": "npm run lint && npm run compile",
"build": "pnpm run lint && pnpm run compile",
"compile": "npx swc src -d dist --strip-leading-paths",
"tscompile": "tsc --build tsconfig.json",
"lint": "eslint . --cache --cache-file .eslintcache",
"lint:fix": "eslint . --cache --cache-file .eslintcache --fix",
"pretty": "prettier --check src/**/*.ts",
"pretty:write": "prettier --write src/**/*.ts",
"start": "node --es-module-specifier-resolution=node -r dotenv/config .",
"start:dev": "rimraf ./dist && npm run compile && npm start"
"start:dev": "rimraf ./dist && pnpm run compile && pnpm start"
},
"engines": {
"node": ">=16.6.0",
Expand Down Expand Up @@ -67,4 +67,4 @@
"optionalDependencies": {
"play-dl": "^1.9.7"
}
}
}

0 comments on commit 2ba3b1b

Please sign in to comment.