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

create-nx-workspace

Package Overview
Dependencies
Maintainers
7
Versions
1781
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-nx-workspace - npm Package Compare versions

Comparing version 20.0.0-beta.3 to 20.0.0-beta.4

7

bin/create-nx-workspace.d.ts

@@ -9,5 +9,6 @@ import * as yargs from 'yargs';

stack: 'none';
workspaceType: 'package-based' | 'integrated' | 'standalone';
js: boolean;
appName: string | undefined;
workspaceType?: 'package-based' | 'integrated' | 'standalone';
js?: boolean;
appName?: string | undefined;
formatter?: 'none' | 'prettier';
}

@@ -14,0 +15,0 @@ interface ReactArguments extends BaseArguments {

@@ -270,3 +270,6 @@ "use strict";

name: `none`,
message: `None: Configures a TypeScript/JavaScript project with minimal structure.`,
message: process.env.NX_ADD_PLUGINS !== 'false' &&
process.env.NX_ADD_TS_PLUGIN === 'true'
? `None: Configures a TypeScript/JavaScript monorepo.`
: `None: Configures a TypeScript/JavaScript project with minimal structure.`,
},

@@ -311,31 +314,8 @@ {

async function determineNoneOptions(parsedArgs) {
let preset;
let workspaceType = undefined;
let appName = undefined;
let js;
if (parsedArgs.preset) {
preset = parsedArgs.preset;
}
else {
workspaceType = await determinePackageBasedOrIntegratedOrStandalone();
if (workspaceType === 'standalone') {
preset = preset_1.Preset.TsStandalone;
}
else if (workspaceType === 'integrated') {
preset = preset_1.Preset.Apps;
}
else {
preset = preset_1.Preset.NPM;
}
}
if (parsedArgs.js !== undefined) {
js = parsedArgs.js;
}
else if (preset === preset_1.Preset.TsStandalone) {
// Only standalone TS preset generates a default package, so we need to provide --js and --appName options.
appName = parsedArgs.name;
if (process.env.NX_ADD_PLUGINS !== 'false' &&
process.env.NX_ADD_TS_PLUGIN === 'true') {
const reply = await enquirer.prompt([
{
name: 'ts',
message: `Would you like to use TypeScript with this project?`,
name: 'prettier',
message: `Would you like to use Prettier for code formatting?`,
type: 'autocomplete',

@@ -350,9 +330,61 @@ choices: [

],
initial: 0,
initial: 1,
skip: !parsedArgs.interactive || (0, is_ci_1.isCI)(),
},
]);
js = reply.ts === 'No';
return {
preset: preset_1.Preset.TS,
formatter: reply.prettier === 'Yes' ? 'prettier' : 'none',
};
}
return { preset, js, appName };
else {
let preset;
let workspaceType = undefined;
let appName = undefined;
let js;
if (parsedArgs.preset) {
preset = parsedArgs.preset;
}
else {
workspaceType = await determinePackageBasedOrIntegratedOrStandalone();
if (workspaceType === 'standalone') {
preset = preset_1.Preset.TsStandalone;
}
else if (workspaceType === 'integrated') {
preset = preset_1.Preset.Apps;
}
else {
preset = preset_1.Preset.NPM;
}
}
if (preset === preset_1.Preset.TS) {
return { preset, formatter: 'prettier' };
}
if (parsedArgs.js !== undefined) {
js = parsedArgs.js;
}
else if (preset === preset_1.Preset.TsStandalone) {
// Only standalone TS preset generates a default package, so we need to provide --js and --appName options.
appName = parsedArgs.name;
const reply = await enquirer.prompt([
{
name: 'ts',
message: `Would you like to use TypeScript with this project?`,
type: 'autocomplete',
choices: [
{
name: 'Yes',
},
{
name: 'No',
},
],
initial: 0,
skip: !parsedArgs.interactive || (0, is_ci_1.isCI)(),
},
]);
js = reply.ts === 'No';
}
return { preset, js, appName };
}
}

@@ -359,0 +391,0 @@ async function determineReactOptions(parsedArgs) {

{
"name": "create-nx-workspace",
"version": "20.0.0-beta.3",
"version": "20.0.0-beta.4",
"private": false,

@@ -5,0 +5,0 @@ "description": "Smart Monorepos · Fast CI",

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