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

@changesets/git

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@changesets/git - npm Package Compare versions

Comparing version 1.3.2 to 1.4.0

11

CHANGELOG.md
# @changesets/git
## 1.4.0
### Minor Changes
- [#858](https://github.com/changesets/changesets/pull/858) [`dd9b76f`](https://github.com/changesets/changesets/commit/dd9b76f162a546ae8b412e0cb10277f971f3585e) Thanks [@dotansimha](https://github.com/dotansimha)! - Added a new helper function: `getCurrentCommitId`
### Patch Changes
- Updated dependencies [[`dd9b76f`](https://github.com/changesets/changesets/commit/dd9b76f162a546ae8b412e0cb10277f971f3585e)]:
- @changesets/types@5.1.0
## 1.3.2

@@ -4,0 +15,0 @@

3

dist/declarations/src/index.d.ts

@@ -35,1 +35,4 @@ import { Package } from "@manypkg/get-packages";

}): Promise<Package[]>;
export declare function getCurrentCommitId({ cwd }: {
cwd: string;
}): Promise<string>;

@@ -255,2 +255,9 @@ 'use strict';

}
async function getCurrentCommitId({
cwd
}) {
return (await spawn__default['default']("git", ["show", `--format="%h"`, "--no-patch"], {
cwd
})).stdout.toString().trim();
}

@@ -266,4 +273,5 @@ exports.add = add;

exports.getCommitsThatAddFiles = getCommitsThatAddFiles;
exports.getCurrentCommitId = getCurrentCommitId;
exports.getDivergedCommit = getDivergedCommit;
exports.isRepoShallow = isRepoShallow;
exports.tag = tag;

10

dist/git.cjs.prod.js

@@ -160,2 +160,8 @@ "use strict";

async function getCurrentCommitId({cwd: cwd}) {
return (await spawn__default.default("git", [ "show", '--format="%h"', "--no-patch" ], {
cwd: cwd
})).stdout.toString().trim();
}
exports.add = add, exports.commit = commit, exports.deepenCloneBy = deepenCloneBy,

@@ -165,3 +171,3 @@ exports.getAllTags = getAllTags, exports.getChangedChangesetFilesSinceRef = getChangedChangesetFilesSinceRef,

exports.getCommitThatAddsFile = getCommitThatAddsFile, exports.getCommitsThatAddFiles = getCommitsThatAddFiles,
exports.getDivergedCommit = getDivergedCommit, exports.isRepoShallow = isRepoShallow,
exports.tag = tag;
exports.getCurrentCommitId = getCurrentCommitId, exports.getDivergedCommit = getDivergedCommit,
exports.isRepoShallow = isRepoShallow, exports.tag = tag;

@@ -244,3 +244,10 @@ import spawn from 'spawndamnit';

}
async function getCurrentCommitId({
cwd
}) {
return (await spawn("git", ["show", `--format="%h"`, "--no-patch"], {
cwd
})).stdout.toString().trim();
}
export { add, commit, deepenCloneBy, getAllTags, getChangedChangesetFilesSinceRef, getChangedFilesSince, getChangedPackagesSinceRef, getCommitThatAddsFile, getCommitsThatAddFiles, getDivergedCommit, isRepoShallow, tag };
export { add, commit, deepenCloneBy, getAllTags, getChangedChangesetFilesSinceRef, getChangedFilesSince, getChangedPackagesSinceRef, getCommitThatAddsFile, getCommitsThatAddFiles, getCurrentCommitId, getDivergedCommit, isRepoShallow, tag };
{
"name": "@changesets/git",
"version": "1.3.2",
"version": "1.4.0",
"description": "Some git helpers that changesets use to get information",

@@ -12,3 +12,3 @@ "main": "dist/git.cjs.js",

"@changesets/errors": "^0.1.4",
"@changesets/types": "^5.0.0",
"@changesets/types": "^5.1.0",
"@manypkg/get-packages": "^1.1.3",

@@ -15,0 +15,0 @@ "is-subdir": "^1.1.1",

@@ -289,1 +289,13 @@ import spawn from "spawndamnit";

}
export async function getCurrentCommitId({
cwd
}: {
cwd: string;
}): Promise<string> {
return (
await spawn("git", ["show", `--format="%h"`, "--no-patch"], { cwd })
).stdout
.toString()
.trim();
}
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