create-next-rkk 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +7 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -77,9 +77,13 @@ function cleanupProjectDir(projectPath) {
77
77
  */
78
78
  function detectPackageManager() {
79
79
  for (const pm of ['pnpm', 'yarn']) {
80
- const result = (0, child_process_1.spawnSync)(pm, ['--version'], { encoding: 'utf8', shell: true });
81
- if (result.status === 0)
80
+ try {
81
+ (0, child_process_1.execSync)(`${pm} --version`, { stdio: 'ignore' });
82
82
  return pm;
83
+ }
84
+ catch {
85
+ // not available
86
+ }
83
87
  }
84
88
  return 'npm';
85
89
  }
@@ -155,7 +159,7 @@ function buildInstallCommand(pm) {
155
159
  program
156
160
  .name('create-next-rkk')
157
161
  .description('Create a new Next.js app with rkk-next pre-configured')
158
- .version('2.0.3')
162
+ .version('2.0.4')
159
163
  .argument('[project-name]', 'name of your project')
160
164
  .action(async (projectName) => {
161
165
  console.log(chalk_1.default.bold.cyan('\nšŸš€ Create RKK Next.js App\n'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-next-rkk",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "CLI tool to create Next.js apps with rkk-next pre-configured",
5
5
  "author": "Rohit Kumar Kundu",
6
6
  "license": "MIT",