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

beachball

Package Overview
Dependencies
Maintainers
3
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beachball - npm Package Compare versions

Comparing version 2.44.0 to 2.44.1

2

lib/bump/performBump.js

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

// Unlink changelogs
(0, unlinkChangeFiles_1.unlinkChangeFiles)(changeFileChangeInfos, packageInfos, options.path, options.changeDir);
(0, unlinkChangeFiles_1.unlinkChangeFiles)(changeFileChangeInfos, packageInfos, options);
}

@@ -104,0 +104,0 @@ await (0, callHook_1.callHook)(options.hooks?.postbump, modifiedPackages, bumpInfo.packageInfos);

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

function getAllChangedPackages(options, packageInfos) {
const { branch, path: cwd, verbose, all } = options;
const { branch, path: cwd, verbose, all, changeDir } = options;
const verboseLog = (msg) => verbose && console.log(msg);

@@ -74,3 +74,2 @@ const logIgnored = (file, reason) => verboseLog(` - ~~${file}~~ (${reason})`);

// Also ignore the CHANGELOG files and change files because they're generated by beachball.
const changeDir = options.changeDir ?? paths_1.defaultChangeFolder;
const ignorePatterns = [...(options.ignorePatterns || []), `${changeDir}/*.json`, 'CHANGELOG.{md,json}'];

@@ -113,4 +112,4 @@ const nonIgnoredChanges = changes.filter(moddedFile => {

function getChangedPackages(options, packageInfos) {
const { path: cwd, branch, changeDir = paths_1.defaultChangeFolder } = options;
const changePath = (0, paths_1.getChangePath)(cwd, changeDir);
const { path: cwd, branch, changeDir } = options;
const changePath = (0, paths_1.getChangePath)(options);
(0, ensureSharedHistory_1.ensureSharedHistory)(options);

@@ -117,0 +116,0 @@ const changedPackages = getAllChangedPackages(options, packageInfos);

@@ -19,3 +19,3 @@ import prompts from 'prompts';

email: string | null;
options: BeachballOptions;
options: Pick<BeachballOptions, 'message' | 'type' | 'dependentChangeType'>;
}): Promise<ChangeFileInfo[] | undefined>;

@@ -30,3 +30,3 @@ /**

packageGroups: PackageGroups;
options: BeachballOptions;
options: Pick<BeachballOptions, 'message' | 'type'>;
recentMessages: string[];

@@ -47,5 +47,5 @@ }): prompts.PromptObject[] | undefined;

email: string | null;
options: BeachballOptions;
options: Pick<BeachballOptions, 'type' | 'message' | 'dependentChangeType'>;
}): ChangeFileInfo | undefined;
export {};
//# sourceMappingURL=promptForChange.d.ts.map

@@ -24,5 +24,5 @@ "use strict";

function readChangeFiles(options, packageInfos) {
const { path: cwd, fromRef, command, changeDir } = options;
const { fromRef, command } = options;
const scopedPackages = (0, getScopedPackages_1.getScopedPackages)(options, packageInfos);
const changePath = (0, paths_1.getChangePath)(cwd, changeDir);
const changePath = (0, paths_1.getChangePath)(options);
if (!fs_extra_1.default.existsSync(changePath)) {

@@ -29,0 +29,0 @@ return [];

import { ChangeSet } from '../types/ChangeInfo';
import { PackageInfo } from '../types/PackageInfo';
import type { BeachballOptions } from '../types/BeachballOptions';
/**

@@ -10,3 +11,3 @@ * Unlink only change files that are specified in the changes param

[pkg: string]: PackageInfo;
}, cwd: string, changeDir?: string): void;
}, options: Pick<BeachballOptions, 'path' | 'changeDir'>): void;
//# sourceMappingURL=unlinkChangeFiles.d.ts.map

@@ -15,4 +15,4 @@ "use strict";

*/
function unlinkChangeFiles(changeSet, packageInfos, cwd, changeDir) {
const changePath = (0, paths_1.getChangePath)(cwd, changeDir);
function unlinkChangeFiles(changeSet, packageInfos, options) {
const changePath = (0, paths_1.getChangePath)(options);
if (!changeSet || !changeSet.length) {

@@ -19,0 +19,0 @@ return;

import { ChangeFileInfo } from '../types/ChangeInfo';
import type { BeachballOptions } from '../types/BeachballOptions';
/**

@@ -6,11 +7,3 @@ * Loops through the `changes` and writes out a list of change files

*/
export declare function writeChangeFiles(params: {
changes: ChangeFileInfo[];
cwd: string;
/** default true */
commitChangeFiles?: boolean;
/** group all changes into one change file (default false) */
groupChanges?: boolean;
changeDir?: string;
}): string[];
export declare function writeChangeFiles(changes: ChangeFileInfo[], options: Pick<BeachballOptions, 'path' | 'groupChanges' | 'changeDir' | 'commit'>): string[];
//# sourceMappingURL=writeChangeFiles.d.ts.map

@@ -16,5 +16,5 @@ "use strict";

*/
function writeChangeFiles(params) {
const { changes, cwd, commitChangeFiles = true, groupChanges = false, changeDir = paths_1.defaultChangeFolder } = params;
const changePath = (0, paths_1.getChangePath)(cwd, changeDir);
function writeChangeFiles(changes, options) {
const { path: cwd, groupChanges, commit: commitChangeFiles } = options;
const changePath = (0, paths_1.getChangePath)(options);
const branchName = (0, workspace_tools_1.getBranchName)(cwd);

@@ -30,3 +30,4 @@ if (!(Object.keys(changes).length && branchName)) {

if (groupChanges) {
const changeFile = getChangeFile(changeDir);
// use a generic file prefix when grouping changes
const changeFile = getChangeFile('change');
changeFiles = [changeFile];

@@ -37,3 +38,3 @@ fs_extra_1.default.writeFileSync(changeFile, JSON.stringify({ changes }, null, 2));

changeFiles = changes.map(change => {
const changeFile = getChangeFile(change.packageName.replace(/[^a-zA-Z0-9@]/g, '-'));
const changeFile = getChangeFile(change.packageName.replace(/[^\w@]/g, '-'));
fs_extra_1.default.writeJSONSync(changeFile, change, { spaces: 2 });

@@ -40,0 +41,0 @@ return changeFile;

@@ -5,2 +5,3 @@ import { PackageInfos } from '../types/PackageInfo';

import { ChangeSet } from '../types/ChangeInfo';
import type { BeachballOptions } from '../types/BeachballOptions';
/**

@@ -15,5 +16,4 @@ * Get the preliminary changelog info for each modified package, based on change files and dependent bumps.

packageInfos: PackageInfos;
cwd: string;
changeDir?: string;
options: Pick<BeachballOptions, 'path' | 'changeDir'>;
}): Record<string, PackageChangelog>;
//# sourceMappingURL=getPackageChangelogs.d.ts.map

@@ -21,10 +21,10 @@ "use strict";

var _a, _b, _c, _d;
const { changeFileChangeInfos, calculatedChangeTypes, dependentChangedBy = {}, packageInfos, cwd, changeDir, } = params;
const { changeFileChangeInfos, calculatedChangeTypes, dependentChangedBy = {}, packageInfos, options } = params;
const changelogs = {};
const changeFileCommits = {};
const changePath = (0, paths_1.getChangePath)(cwd, changeDir);
const changePath = (0, paths_1.getChangePath)(options);
for (const { change, changeFile } of changeFileChangeInfos) {
const { packageName, type: changeType, dependentChangeType, email, ...rest } = change;
changelogs[packageName] ?? (changelogs[packageName] = createPackageChangelog(packageInfos[packageName]));
changeFileCommits[changeFile] ?? (changeFileCommits[changeFile] = (0, workspace_tools_1.getFileAddedHash)(path_1.default.join(changePath, changeFile), cwd) || commitNotAvailable);
changeFileCommits[changeFile] ?? (changeFileCommits[changeFile] = (0, workspace_tools_1.getFileAddedHash)(path_1.default.join(changePath, changeFile), options.path) || commitNotAvailable);
(_a = changelogs[packageName]).comments ?? (_a.comments = {});

@@ -31,0 +31,0 @@ (_b = changelogs[packageName].comments)[changeType] ?? (_b[changeType] = []);

@@ -22,4 +22,3 @@ "use strict";

packageInfos,
cwd: options.path,
changeDir: options.changeDir,
options,
});

@@ -52,4 +51,3 @@ // Use a standard for loop here to prevent potentially firing off multiple network requests at once

packageInfos,
cwd: options.path,
changeDir: options.changeDir,
options,
});

@@ -56,0 +54,0 @@ const groupedChangelogs = {};

@@ -33,9 +33,3 @@ "use strict";

if (changes) {
(0, writeChangeFiles_1.writeChangeFiles)({
changes,
cwd: options.path,
commitChangeFiles: options.commit,
groupChanges: options.groupChanges,
changeDir: options.changeDir,
});
(0, writeChangeFiles_1.writeChangeFiles)(changes, options);
}

@@ -42,0 +36,0 @@ }

import { BeachballOptions } from '../types/BeachballOptions';
import { PackageInfos } from '../types/PackageInfo';
export declare function getScopedPackages(options: BeachballOptions, packageInfos: PackageInfos): string[];
export declare function getScopedPackages(options: Pick<BeachballOptions, 'path' | 'scope'>, packageInfos: PackageInfos): string[];
//# sourceMappingURL=getScopedPackages.d.ts.map
import { BeachballOptions } from '../types/BeachballOptions';
/**
* Default options.
* Note that as of writing, this does not actually set values for all "required" BeachballOptions.
*/
export declare function getDefaultOptions(): BeachballOptions;
//# sourceMappingURL=getDefaultOptions.d.ts.map

@@ -5,6 +5,4 @@ "use strict";

const env_1 = require("../env");
const paths_1 = require("../paths");
/**
* Default options.
* Note that as of writing, this does not actually set values for all "required" BeachballOptions.
*/

@@ -21,4 +19,5 @@ function getDefaultOptions() {

changehint: 'Run "beachball change" to create a change file',
changeDir: paths_1.defaultChangeFolder,
changeDir: 'change',
command: 'change',
commit: true,
defaultNpmTag: 'latest',

@@ -32,2 +31,4 @@ depth: undefined,

message: '',
new: false,
path: '',
publish: true,

@@ -34,0 +35,0 @@ push: true,

@@ -1,7 +0,6 @@

/** Relative path to the change files folder */
export declare const defaultChangeFolder = "change";
import type { BeachballOptions } from './types/BeachballOptions';
/**
* Get the absolute path to the folder containing beachball change files.
*/
export declare function getChangePath(cwd: string, changdir?: string): string;
export declare function getChangePath(options: Pick<BeachballOptions, 'path' | 'changeDir'>): string;
//# sourceMappingURL=paths.d.ts.map

@@ -6,15 +6,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getChangePath = exports.defaultChangeFolder = void 0;
exports.getChangePath = void 0;
const path_1 = __importDefault(require("path"));
const workspace_tools_1 = require("workspace-tools");
/** Relative path to the change files folder */
exports.defaultChangeFolder = 'change';
/**
* Get the absolute path to the folder containing beachball change files.
*/
function getChangePath(cwd, changdir) {
const root = (0, workspace_tools_1.findProjectRoot)(cwd);
return path_1.default.join(root, changdir ?? exports.defaultChangeFolder);
function getChangePath(options) {
const root = (0, workspace_tools_1.findProjectRoot)(options.path);
return path_1.default.join(root, options.changeDir);
}
exports.getChangePath = getChangePath;
//# sourceMappingURL=paths.js.map

@@ -15,3 +15,3 @@ import { AuthType } from './Auth';

configPath?: string;
dependentChangeType: ChangeType | null;
dependentChangeType?: ChangeType;
disallowDeletedChangeFiles?: boolean;

@@ -18,0 +18,0 @@ forceVersions?: boolean;

import { BeachballOptions } from '../types/BeachballOptions';
export declare function areChangeFilesDeleted(options: BeachballOptions): boolean;
export declare function areChangeFilesDeleted(options: Pick<BeachballOptions, 'branch' | 'path' | 'changeDir'>): boolean;
//# sourceMappingURL=areChangeFilesDeleted.d.ts.map

@@ -7,5 +7,5 @@ "use strict";

function areChangeFilesDeleted(options) {
const { branch, path: cwd, changeDir } = options;
const { branch, path: cwd } = options;
const root = (0, workspace_tools_1.findProjectRoot)(cwd);
const changePath = (0, paths_1.getChangePath)(cwd, changeDir);
const changePath = (0, paths_1.getChangePath)(options);
console.log(`Checking for deleted change files against "${branch}"`);

@@ -12,0 +12,0 @@ const changeFilesDeletedSinceRef = (0, workspace_tools_1.getChangesBetweenRefs)(branch, 'HEAD', [

{
"name": "beachball",
"version": "2.44.0",
"version": "2.44.1",
"description": "The Sunniest Semantic Version Bumper",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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