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

@lerna-lite/init

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna-lite/init - npm Package Compare versions

Comparing version 2.0.0-alpha.2 to 2.0.0

1

dist/init-command.d.ts
import { Command, CommandType, InitCommandOption } from '@lerna-lite/core';
export declare function factory(argv: InitCommandOption): InitCommand;
export declare class InitCommand extends Command<InitCommandOption> {
/** command name */
name: CommandType;

@@ -6,0 +5,0 @@ exact?: boolean;

@@ -13,3 +13,2 @@ import { Command, exec } from '@lerna-lite/core';

super(argv);
/** command name */
this.name = 'init';

@@ -45,3 +44,2 @@ this.exact = false;

this.logger.info('', 'Creating package.json');
// initialize with default indentation so write-pkg doesn't screw it up with tabs
await writeJsonFile(join(this.project.rootPath, 'package.json'), { name: 'root', private: true }, { indent: 2 });

@@ -55,9 +53,6 @@ }

if (rootPkg.dependencies?.[LERNA_CLI_PKG_NAME]) {
// lerna is a dependency in the current project
targetDependencies = rootPkg.dependencies;
}
else {
// lerna is a devDependency or no dependency, yet
if (!rootPkg.devDependencies) {
// mutate raw JSON object
rootPkg.set('devDependencies', {});

@@ -68,3 +63,2 @@ }

targetDependencies[LERNA_CLI_PKG_NAME] = this.exact ? this.lernaVersion : `^${this.lernaVersion}`;
// add workspace packages in package.json when `useWorkspaces` enabled
if (this.options.useWorkspaces && !rootPkg.workspaces) {

@@ -76,3 +70,2 @@ rootPkg.workspaces = ['packages/*'];

ensureLernaConfig() {
// config already defaulted to empty object in Project constructor
const { config, version: projectVersion } = this.project;

@@ -91,5 +84,4 @@ let version;

this.logger.info('', logMessage);
delete config[LERNA_CLI_PKG_NAME]; // no longer relevant
delete config[LERNA_CLI_PKG_NAME];
if (this.exact) {
// ensure --exact is preserved for future init commands
const commandConfig = config.command || (config.command = {});

@@ -96,0 +88,0 @@ const initConfig = commandConfig.init || (commandConfig.init = {});

7

package.json
{
"name": "@lerna-lite/init",
"description": "Lerna-Lite init commmand - Create a new Lerna repo or upgrade an existing repo to the current version of Lerna",
"version": "2.0.0-alpha.2",
"version": "2.0.0",
"files": [

@@ -46,9 +46,8 @@ "/dist"

"dependencies": {
"@lerna-lite/core": "2.0.0-alpha.2",
"@lerna-lite/core": "2.0.0",
"fs-extra": "^11.1.1",
"p-map": "^4.0.0",
"path": "^0.12.7",
"write-json-file": "^5.0.0"
},
"gitHead": "7f5fab8f47795e5f1090c60bd2cb5d76aee4dbee"
"gitHead": "95237d601339ac61a74983ee379b17e04f81582b"
}

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