Socket
Socket
Sign inDemoInstall

@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.0.5 to 1.0.6

9

CHANGELOG.md
# @changesets/git
## 1.0.6
### Patch Changes
- [`1dd3117`](https://github.com/atlassian/changesets/commit/1dd311708c65321e1a1c99d36129190f940435ed) [#418](https://github.com/atlassian/changesets/pull/418) Thanks [@jonathanmorley](https://github.com/jonathanmorley)! - Don't return paths for unchanged packages
- Updated dependencies [[`a57d163`](https://github.com/atlassian/changesets/commit/a57d16355ad7d67b18b768c8f79224d80afa507c)]:
- @changesets/types@3.1.1
## 1.0.5

@@ -4,0 +13,0 @@

2

dist/git.cjs.dev.js

@@ -79,3 +79,3 @@ 'use strict';

const files = cmd.stdout.toString().trim().split("\n");
const files = cmd.stdout.toString().trim().split("\n").filter(a => a);
if (!fullPath) return files;

@@ -82,0 +82,0 @@ return files.map(file => path.resolve(cwd, file));

@@ -53,3 +53,3 @@ "use strict";

if (0 !== cmd.code) throw new Error(`Failed to diff against ${divergedAt}. Is ${divergedAt} a valid ref?`);
const files = cmd.stdout.toString().trim().split("\n");
const files = cmd.stdout.toString().trim().split("\n").filter(a => a);
return fullPath ? files.map(file => path.resolve(cwd, file)) : files;

@@ -56,0 +56,0 @@ }

@@ -73,3 +73,3 @@ import spawn from 'spawndamnit';

const files = cmd.stdout.toString().trim().split("\n");
const files = cmd.stdout.toString().trim().split("\n").filter(a => a);
if (!fullPath) return files;

@@ -76,0 +76,0 @@ return files.map(file => path.resolve(cwd, file));

{
"name": "@changesets/git",
"version": "1.0.5",
"version": "1.0.6",
"description": "Some git helpers that changesets use to get information",

@@ -10,5 +10,5 @@ "main": "dist/git.cjs.js",

"dependencies": {
"@babel/runtime": "^7.4.4",
"@babel/runtime": "^7.10.4",
"@changesets/errors": "^0.1.4",
"@changesets/types": "^3.0.0",
"@changesets/types": "^3.1.1",
"@manypkg/get-packages": "^1.0.1",

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

@@ -211,11 +211,22 @@ import fixtures from "fixturez";

it("should be empty if no changes", async () => {
it("should be empty if no changes (partial path)", async () => {
const head = await spawn("git", ["rev-parse", "HEAD"], { cwd });
const changedFiles = await getChangedFilesSince({
ref: head.stdout.toString().trim(),
cwd
cwd,
fullPath: false
});
expect(changedFiles.filter(a => a)).toHaveLength(0);
expect(changedFiles).toHaveLength(0);
});
it("should be empty if no changes (full path)", async () => {
const head = await spawn("git", ["rev-parse", "HEAD"], { cwd });
const changedFiles = await getChangedFilesSince({
ref: head.stdout.toString().trim(),
cwd,
fullPath: true
});
expect(changedFiles).toHaveLength(0);
});
it("should get list of files that have been committed", async () => {

@@ -222,0 +233,0 @@ const firstRef = await spawn("git", ["rev-parse", "HEAD"], { cwd });

@@ -76,3 +76,4 @@ import spawn from "spawndamnit";

.trim()
.split("\n");
.split("\n")
.filter(a => a);
if (!fullPath) return files;

@@ -79,0 +80,0 @@ return files.map(file => path.resolve(cwd, file));

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