Comparing version 0.0.4 to 0.0.5
@@ -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" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6903
158
+ Added@auto/utils@0.0.3(transitive)
- Removed@auto/utils@0.0.2(transitive)
Updated@auto/utils@^0.0.3