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

@auto/git

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@auto/git - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

build/get-bumps.d.ts

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

import { TBump } from "@auto/utils";
import { TGitBump } from "@auto/utils";
import { TGitOptions } from "./types";
export declare const getBumps: (options: TGitOptions) => Promise<TBump[]>;
export declare const getBumps: (options: TGitOptions) => Promise<TGitBump[]>;
import { TGitOptions } from "./types";
import { TBumpStackItem } from "@auto/utils";
export declare const writeDependenciesCommit: (packageName: string, bumpStackItem: TBumpStackItem, gitOptions: TGitOptions) => Promise<void>;
import { TPackageBump } from "@auto/utils";
export declare const writeDependenciesCommit: (packageBump: TPackageBump, gitOptions: TGitOptions) => Promise<void>;
import execa from 'execa';
const removeNamespace = (name, namespace) => {
return name.replace(`@${namespace}/`, '');
};
export const writeDependenciesCommit = async (packageName, bumpStackItem, gitOptions) => {
const name = removeNamespace(packageName, gitOptions.namespace);
import path from 'path';
export const writeDependenciesCommit = async (packageBump, gitOptions) => {
const name = packageBump.name.replace(`@${gitOptions.namespace}/`, '');
const execaOptions = {

@@ -13,5 +9,7 @@ stderr: process.stderr

if (bumpStackItem.deps !== null || bumpStackItem.devDeps !== null) {
if (packageBump.deps !== null || packageBump.devDeps !== null) {
const packageJsonPath = path.join(packageBump.dir, 'package.json');
try {
await execa('git', ['commit', '-m', `${gitOptions.prefixes['dependencies']} ${name}: upgrade dependencies`, bumpStackItem.path], execaOptions);
await execa('git', ['commit', '-m', `${gitOptions.prefixes['dependencies']} ${name}: upgrade dependencies`, packageJsonPath], execaOptions);
} catch (err) {

@@ -18,0 +16,0 @@ throw null;

import { TGitOptions } from "./types";
import { TBumpStackItem } from "@auto/utils";
export declare const writePublishCommit: (packageName: string, bumpStackItem: TBumpStackItem, gitOptions: TGitOptions) => Promise<void>;
import { TPackageBump } from "@auto/utils";
export declare const writePublishCommit: (packageBump: TPackageBump, gitOptions: TGitOptions) => Promise<void>;

@@ -0,9 +1,5 @@

import path from 'path';
import execa from 'execa';
const removeNamespace = (name, namespace) => {
return name.replace(`@${namespace}/`, '');
};
export const writePublishCommit = async (packageName, bumpStackItem, gitOptions) => {
const name = removeNamespace(packageName, gitOptions.namespace);
export const writePublishCommit = async (packageBump, gitOptions) => {
const name = packageBump.name.replace(`@${gitOptions.namespace}/`, '');
const execaOptions = {

@@ -13,6 +9,8 @@ stderr: process.stderr

if (bumpStackItem.type !== null && bumpStackItem.version !== null) {
if (packageBump.type !== null && packageBump.version !== null) {
const packageJsonPath = path.join(packageBump.dir, 'package.json');
try {
await execa('git', ['commit', '-m', `${gitOptions.prefixes['publish']} ${name}: v${bumpStackItem.version}`, bumpStackItem.path], execaOptions);
await execa('git', ['tag', '-m', `${name}@${bumpStackItem.version}`, `${name}@${bumpStackItem.version}`], execaOptions);
await execa('git', ['commit', '-m', `${gitOptions.prefixes['publish']} ${name}: v${packageBump.version}`, packageJsonPath], execaOptions);
await execa('git', ['tag', '-m', `${name}@${packageBump.version}`, `${name}@${packageBump.version}`], execaOptions);
} catch (err) {

@@ -19,0 +17,0 @@ throw null;

{
"name": "@auto/git",
"version": "0.0.4",
"version": "0.0.5",
"description": "",

@@ -26,3 +26,3 @@ "keywords": "",

"dependencies": {
"@auto/utils": "^0.0.2",
"@auto/utils": "^0.0.3",
"esm": "^3.0.80",

@@ -29,0 +29,0 @@ "execa": "^0.11.0"

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