New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

create-payload-app

Package Overview
Dependencies
Maintainers
2
Versions
488
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.37 to 3.0.0-beta.38

32

dist/lib/get-package-manager.js

@@ -1,17 +0,29 @@

import commandExists from 'command-exists';
import execa from 'execa';
import fse from 'fs-extra';
export async function getPackageManager(args) {
const { cliArgs, projectDir } = args;
// Check for yarn.lock, package-lock.json, or pnpm-lock.yaml
let detected = 'npm';
if (cliArgs?.['--use-pnpm'] || fse.existsSync(`${projectDir}/pnpm-lock.yaml`) || await commandExists('pnpm')) {
detected = 'pnpm';
} else if (cliArgs?.['--use-yarn'] && fse.existsSync(`${projectDir}/yarn.lock`) || await commandExists('yarn')) {
detected = 'yarn';
} else if (cliArgs?.['--use-npm'] && fse.existsSync(`${projectDir}/package-lock.json`)) {
detected = 'npm';
try {
// Check for yarn.lock, package-lock.json, or pnpm-lock.yaml
let detected = 'npm';
if (cliArgs?.['--use-pnpm'] || fse.existsSync(`${projectDir}/pnpm-lock.yaml`) || await commandExists('pnpm')) {
detected = 'pnpm';
} else if (cliArgs?.['--use-yarn'] || fse.existsSync(`${projectDir}/yarn.lock`) || await commandExists('yarn')) {
detected = 'yarn';
} else if (cliArgs?.['--use-npm'] || fse.existsSync(`${projectDir}/package-lock.json`)) {
detected = 'npm';
}
return detected;
} catch (error) {
return 'npm';
}
return detected || 'npm';
}
async function commandExists(command) {
try {
await execa.command(`command -v ${command}`);
return true;
} catch {
return false;
}
}
//# sourceMappingURL=get-package-manager.js.map

@@ -14,31 +14,6 @@ import { error, info } from '../utils/log.js';

{
name: 'blank-3.0',
name: 'blank',
type: 'starter',
description: 'Blank 3.0 Template',
url: 'https://github.com/payloadcms/payload/templates/blank-3.0#beta'
},
// Remove these until they have been updated for 3.0
// {
// name: 'blank',
// type: 'starter',
// description: 'Blank Template',
// url: 'https://github.com/payloadcms/payload/templates/blank',
// },
// {
// name: 'website',
// type: 'starter',
// description: 'Website Template',
// url: 'https://github.com/payloadcms/payload/templates/website',
// },
// {
// name: 'ecommerce',
// type: 'starter',
// description: 'E-commerce Template',
// url: 'https://github.com/payloadcms/payload/templates/ecommerce',
// },
{
name: 'plugin',
type: 'plugin',
description: 'Template for creating a Payload plugin',
url: 'https://github.com/payloadcms/payload-plugin-template#beta'
}

@@ -45,0 +20,0 @@ ];

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

@@ -32,3 +32,2 @@ "repository": {

"chalk": "^4.1.0",
"command-exists": "^1.2.9",
"comment-json": "^4.2.3",

@@ -44,3 +43,2 @@ "degit": "^2.8.4",

"devDependencies": {
"@types/command-exists": "^1.2.0",
"@types/degit": "^2.8.3",

@@ -47,0 +45,0 @@ "@types/esprima": "^4.0.6",

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