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.0.3 to 1.0.4

6

CHANGELOG.md
# @changesets/git
## 1.0.4
### Patch Changes
- [`aa840db`](https://github.com/atlassian/changesets/commit/aa840db824c321159e3b1c66ea663b4036084bd7) [#336](https://github.com/atlassian/changesets/pull/336) Thanks [@MichaelKapustey](https://github.com/MichaelKapustey)! - Changed packages detection fixed on Windows.
## 1.0.3

@@ -4,0 +10,0 @@

3

dist/git.cjs.dev.js

@@ -11,2 +11,3 @@ 'use strict';

var errors = require('@changesets/errors');
var isSubdir = _interopDefault(require('is-subdir'));

@@ -103,3 +104,3 @@ async function add(pathToFile, cwd) {

const fileNameToPackage = fileName => packages.packages.find(pkg => fileName.startsWith(pkg.dir + path.sep));
const fileNameToPackage = fileName => packages.packages.find(pkg => isSubdir(pkg.dir, fileName));

@@ -106,0 +107,0 @@ const fileExistsInPackage = fileName => !!fileNameToPackage(fileName);

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

var spawn = _interopDefault(require("spawndamnit")), path = _interopDefault(require("path")), getPackages = require("@manypkg/get-packages"), errors = require("@changesets/errors");
var spawn = _interopDefault(require("spawndamnit")), path = _interopDefault(require("path")), getPackages = require("@manypkg/get-packages"), errors = require("@changesets/errors"), isSubdir = _interopDefault(require("is-subdir"));

@@ -72,3 +72,3 @@ async function add(pathToFile, cwd) {

let packages = await getPackages.getPackages(cwd);
const fileNameToPackage = fileName => packages.packages.find(pkg => fileName.startsWith(pkg.dir + path.sep));
const fileNameToPackage = fileName => packages.packages.find(pkg => isSubdir(pkg.dir, fileName));
return changedFiles.filter(fileName => !!fileNameToPackage(fileName)).map(fileNameToPackage).filter((pkg, idx, packages) => packages.indexOf(pkg) === idx);

@@ -75,0 +75,0 @@ }

@@ -5,2 +5,3 @@ import spawn from 'spawndamnit';

import { GitError } from '@changesets/errors';
import isSubdir from 'is-subdir';

@@ -97,3 +98,3 @@ async function add(pathToFile, cwd) {

const fileNameToPackage = fileName => packages.packages.find(pkg => fileName.startsWith(pkg.dir + path.sep));
const fileNameToPackage = fileName => packages.packages.find(pkg => isSubdir(pkg.dir, fileName));

@@ -100,0 +101,0 @@ const fileExistsInPackage = fileName => !!fileNameToPackage(fileName);

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

@@ -14,7 +14,8 @@ "main": "dist/git.cjs.js",

"@manypkg/get-packages": "^1.0.1",
"is-subdir": "^1.1.1",
"spawndamnit": "^2.0.0"
},
"devDependencies": {
"jest-fixtures": "^0.5.0"
"fixturez": "^1.1.0"
}
}

@@ -1,2 +0,2 @@

import { copyFixtureIntoTempDir } from "jest-fixtures";
import fixtures from "fixturez";
import spawn from "spawndamnit";

@@ -15,2 +15,4 @@

const f = fixtures(__dirname);
async function getCurrentCommit(cwd: string) {

@@ -24,6 +26,9 @@ const cmd = await spawn("git", ["rev-parse", "HEAD"], { cwd });

beforeEach(async () => {
cwd = await copyFixtureIntoTempDir(__dirname, "with-git");
cwd = await f.copy("with-git");
await spawn("git", ["init"], { cwd });
await spawn("git", ["config", "user.email", "x@y.z"], { cwd });
await spawn("git", ["config", "user.name", "xyz"], { cwd });
await spawn("git", ["config", "commit.gpgSign", "false"], { cwd });
await spawn("git", ["config", "tag.gpgSign", "false"], { cwd });
await spawn("git", ["config", "tag.forceSignAnnotated", "false"], { cwd });
});

@@ -30,0 +35,0 @@

@@ -5,2 +5,3 @@ import spawn from "spawndamnit";

import { GitError } from "@changesets/errors";
import isSubdir from "is-subdir";

@@ -112,3 +113,3 @@ async function add(pathToFile: string, cwd: string) {

const fileNameToPackage = (fileName: string) =>
packages.packages.find(pkg => fileName.startsWith(pkg.dir + path.sep))!;
packages.packages.find(pkg => isSubdir(pkg.dir, fileName))!;

@@ -115,0 +116,0 @@ const fileExistsInPackage = (fileName: string) =>

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