Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-payload-app

Package Overview
Dependencies
Maintainers
0
Versions
456
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-payload-app - npm Package Compare versions

Comparing version 3.0.0-beta.99 to 3.0.0-beta.100

2

dist/lib/create-project.js

@@ -29,2 +29,4 @@ import * as p from '@clack/prompts';

installCmd = 'pnpm install';
} else if (packageManager === 'bun') {
installCmd = 'bun install';
}

@@ -31,0 +33,0 @@ try {

2

dist/lib/get-package-manager.d.ts

@@ -5,3 +5,3 @@ import type { CliArgs, PackageManager } from '../types.js';

projectDir: string;
}): Promise<PackageManager>;
}): PackageManager;
//# sourceMappingURL=get-package-manager.d.ts.map

@@ -1,4 +0,3 @@

import execa from 'execa';
import fse from 'fs-extra';
export async function getPackageManager(args) {
export function getPackageManager(args) {
const { cliArgs, projectDir } = args;

@@ -14,11 +13,7 @@ try {

detected = 'npm';
} else if (cliArgs?.['--use-bun'] || fse.existsSync(`${projectDir}/bun.lockb`)) {
detected = 'bun';
} else {
// Otherwise check for existing commands
if (await commandExists('pnpm')) {
detected = 'pnpm';
} else if (await commandExists('yarn')) {
detected = 'yarn';
} else {
detected = 'npm';
}
// Otherwise check the execution environment
detected = getEnvironmentPackageManager();
}

@@ -30,11 +25,16 @@ return detected;

}
async function commandExists(command) {
try {
await execa.command(`command -v ${command}`);
return true;
} catch {
return false;
function getEnvironmentPackageManager() {
const userAgent = process.env.npm_config_user_agent || '';
if (userAgent.startsWith('yarn')) {
return 'yarn';
}
if (userAgent.startsWith('pnpm')) {
return 'pnpm';
}
if (userAgent.startsWith('bun')) {
return 'bun';
}
return 'npm';
}
//# sourceMappingURL=get-package-manager.js.map

@@ -38,2 +38,3 @@ import * as p from '@clack/prompts';

'--no-deps': Boolean,
'--use-bun': Boolean,
'--use-npm': Boolean,

@@ -98,3 +99,3 @@ '--use-pnpm': Boolean,

const projectDir = nextConfigPath ? path.dirname(nextConfigPath) : path.resolve(process.cwd(), slugify(projectName));
const packageManager = await getPackageManager({
const packageManager = getPackageManager({
cliArgs: this.args,

@@ -101,0 +102,0 @@ projectDir

@@ -18,2 +18,3 @@ import type arg from 'arg';

'--template-branch': StringConstructor;
'--use-bun': BooleanConstructor;
'--use-npm': BooleanConstructor;

@@ -20,0 +21,0 @@ '--use-pnpm': BooleanConstructor;

@@ -35,2 +35,3 @@ /* eslint-disable no-console */ import chalk from 'chalk';

--use-pnpm Use pnpm to install dependencies
--use-bun Use bun to install dependencies (experimental)
--no-deps Do not install any dependencies

@@ -37,0 +38,0 @@ -h Show help

{
"name": "create-payload-app",
"version": "3.0.0-beta.99",
"version": "3.0.0-beta.100",
"homepage": "https://payloadcms.com",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc