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

release-please

Package Overview
Dependencies
Maintainers
2
Versions
383
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

release-please - npm Package Compare versions

Comparing version 5.3.0 to 5.4.0

8

build/src/bin/release-please.js

@@ -47,2 +47,6 @@ #!/usr/bin/env node

default: false,
})
.option('default-branch', {
describe: 'default branch to open release PR against',
type: 'string',
});

@@ -115,2 +119,6 @@ }, (argv) => {

})
.option('default-branch', {
describe: '',
type: 'string',
})
.demandCommand(1)

@@ -117,0 +125,0 @@ .strict(true)

3

build/src/github.d.ts

@@ -15,2 +15,3 @@ import { Octokit } from '@octokit/rest';

interface GitHubOptions {
defaultBranch?: string;
token?: string;

@@ -48,2 +49,3 @@ owner: string;

export declare class GitHub {
defaultBranch?: string;
octokit: OctokitType;

@@ -73,2 +75,3 @@ request: Function;

openPR(options: GitHubPR): Promise<number>;
private getDefaultBranch;
updateFiles(updates: Update[], branch: string, refName: string): Promise<void>;

@@ -75,0 +78,0 @@ private refByBranchName;

@@ -28,2 +28,3 @@ "use strict";

constructor(options) {
this.defaultBranch = options.defaultBranch;
this.token = options.token;

@@ -473,2 +474,3 @@ this.owner = options.owner;

await this.updateFiles(options.updates, options.branch, refName);
const base = await this.getDefaultBranch(this.owner, this.repo);
if (openReleasePR) {

@@ -486,3 +488,3 @@ // TODO: dig into why `updateRef` closes an issue attached

state: 'open',
base: 'master',
base,
});

@@ -499,3 +501,3 @@ return openReleasePR.number;

head: options.branch,
base: 'master',
base,
});

@@ -505,2 +507,13 @@ return resp.data.number;

}
async getDefaultBranch(owner, repo) {
if (this.defaultBranch) {
return this.defaultBranch;
}
const { data } = await this.octokit.repos.get({
repo,
owner,
});
this.defaultBranch = data.default_branch;
return this.defaultBranch;
}
async updateFiles(updates, branch, refName) {

@@ -507,0 +520,0 @@ // does the user care about skipping CI at all?

4

build/src/graphql-to-commits.js

@@ -33,4 +33,2 @@ "use strict";

const commit = await graphqlToCommit(github, commitEdge, observedSHAs);
// if the commit and its associated PR do not share a sha, we assume
// that the commit was a push to master and disregard it.
if (commit) {

@@ -58,3 +56,3 @@ commits.commits.push(commit);

// if the commit.sha and mergeCommit.oid do not match, assume that this
// was a push to master and drop the commit.
// was a push directly to the default branch.
//

@@ -61,0 +59,0 @@ // TODO: investigate our motivations for skipping commits when

@@ -7,2 +7,3 @@ import { ConventionalCommits } from './conventional-commits';

bumpMinorPreMajor?: boolean;
defaultBranch?: string;
label?: string;

@@ -29,2 +30,3 @@ token?: string;

apiUrl: string;
defaultBranch?: string;
labels: string[];

@@ -31,0 +33,0 @@ gh: GitHub;

@@ -26,2 +26,3 @@ "use strict";

this.bumpMinorPreMajor = options.bumpMinorPreMajor || false;
this.defaultBranch = options.defaultBranch;
this.labels = options.label

@@ -126,2 +127,3 @@ ? options.label.split(',')

token: this.token,
defaultBranch: this.defaultBranch,
owner,

@@ -128,0 +130,0 @@ repo,

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

}));
updates.push(new package_json_1.PackageJson({
path: 'package-lock.json',
changelogEntry,
version: candidate.version,
packageName: this.packageName,
}));
updates.push(new samples_package_json_1.SamplesPackageJson({

@@ -69,0 +75,0 @@ path: 'samples/package.json',

@@ -25,2 +25,12 @@ "use strict";

const setup_cfg_1 = require("../updaters/python/setup-cfg");
const CHANGELOG_SECTIONS = [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'docs', section: 'Documentation' },
{ type: 'chore', section: 'Miscellaneous Chores', hidden: true },
{ type: 'refactor', section: 'Code Refactoring', hidden: true },
{ type: 'test', section: 'Tests', hidden: true },
{ type: 'build', section: 'Build System', hidden: true },
{ type: 'ci', section: 'Continuous Integration', hidden: true },
];
class Python extends release_pr_1.ReleasePR {

@@ -34,2 +44,3 @@ async _run() {

bumpMinorPreMajor: this.bumpMinorPreMajor,
changelogSections: CHANGELOG_SECTIONS,
});

@@ -36,0 +47,0 @@ const candidate = await this.coerceReleaseCandidate(cc, latestTag);

@@ -7,2 +7,16 @@ # Changelog

## [5.4.0](https://www.github.com/googleapis/release-please/compare/v5.3.0...v5.4.0) (2020-06-17)
### Features
* detect default branch ([#468](https://www.github.com/googleapis/release-please/issues/468)) ([301a08a](https://www.github.com/googleapis/release-please/commit/301a08a1afdac48fd81b55816316f14d42aba23c))
* **node:** update version number in package-lock.json ([#467](https://www.github.com/googleapis/release-please/issues/467)) ([2d69956](https://www.github.com/googleapis/release-please/commit/2d69956bb80619097f92c6d5eb809f8083381acb))
### Bug Fixes
* list commits of type `docs` for python ([#460](https://www.github.com/googleapis/release-please/issues/460)) ([ba06649](https://www.github.com/googleapis/release-please/commit/ba06649fc17843d3dcff16bef5cdf0f33f0d5fc4)), closes [#459](https://www.github.com/googleapis/release-please/issues/459)
* **deps:** update dependency @octokit/rest to v18 ([#465](https://www.github.com/googleapis/release-please/issues/465)) ([ffbf2eb](https://www.github.com/googleapis/release-please/commit/ffbf2eb1109897fb0d7d98a9056fb8052a5cc4f9))
## [5.3.0](https://www.github.com/googleapis/release-please/compare/v5.2.1...v5.3.0) (2020-06-11)

@@ -9,0 +23,0 @@

{
"name": "release-please",
"version": "5.3.0",
"version": "5.4.0",
"description": "generate release PRs based on the conventionalcommits.org spec",

@@ -38,3 +38,3 @@ "main": "./build/src/index.js",

"devDependencies": {
"@octokit/types": "^4.0.0",
"@octokit/types": "^5.0.0",
"@types/chai": "^4.1.7",

@@ -49,3 +49,3 @@ "@types/mocha": "^7.0.0",

"gts": "^2.0.0",
"mocha": "^7.0.0",
"mocha": "^8.0.0",
"nock": "^12.0.0",

@@ -58,3 +58,3 @@ "snap-shot-it": "^7.0.0",

"@octokit/request": "^5.3.4",
"@octokit/rest": "^17.1.4",
"@octokit/rest": "^18.0.0",
"chalk": "^4.0.0",

@@ -61,0 +61,0 @@ "concat-stream": "^2.0.0",

@@ -112,2 +112,3 @@ <img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

| `--token` | a token with write access to `--repo-url`. |
| `--default-branch`| branch to open pull release PR against (detected by default). |

@@ -114,0 +115,0 @@ ### Creating a release on GitHub

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