npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

corp-semantic-release

v7.0.0

Published

Semantic-release package for repositories inside private networks (e.g. corporations) or for non-GitHub repositories.

Downloads

659

Readme

corp-semantic-release

Semantic-release for repositories that are inside private networks (e.g. corporations) or for non-GitHub repositories.

It has almost all expected features from semantic-release but will not publish to an NPM registry at the end.

Obviously this project is 100% inspired by semantic release. This module is not supposed to replace its parent. First try to use semantic-release. If you have special requirements under corporate network, then this module is made for you. Ironically this module uses semantic-release as I don't have any network restrictions at my home.

NPM Version Build Status semantic-release Coverage Status Dependencies status Dev-dependencies status Commitizen friendly npm monthly downloads

Actions performed

  • Detect if a release is required. If not, exit(0);
  • Figure out type of bump as usual: Major, minor or patch
  • Read your commits from last semantic tag and generate or append contents to CHANGELOG.md file.
  • bump your package.json
  • run git add package.json CHANGELOG.md
  • run any pre-commit script, if specified
  • run git commit -m "chore(build): release v1.0.0"
  • run git tag v1.0.0
  • run git push
  • run git push --tags

Install

npm install corp-semantic-release --save-dev

Configure

This tool installs itself as a bin. After installation, you have this command corp-semantic-release available from anywhere.

Add this script to your package.json

  "scripts": {
    "corp-release": "corp-semantic-release [options here]"
  }

Of course you can change corp-release to any name you like.

Options

  • --ci-skip [boolean]: Skip Continuous Integration in CI environment. This adds [ci skip] ***NO_CI*** to the commit message. Default is true.
  • -d or --dryrun: it runs in non-destructive mode. No alteration should be done in your workspace.
  • --pre-commit [npm-script]: Pre-commit hook. Pass the name of the npm script to run. It will run like this: npm run [npm-script].
  • --post-success [command]: Post-success hook (after git push completes successfully). Pass a command to run as the argument. Eg: --post-success "npm publish".
  • -b [branch] or --branch [branch]: Branch name allowed to run release. Default is master. If you want to release from another branch, you need to specify. Use "*" to allow any branch - Useful for Jenkins as git does a revision check-out.
  • -v or --verbose: it prints extra info such as commit list from last tag and command details.
  • --changelogpreset [preset]: The conventional-changelog preset to use. Default is angular. angular-bitbucket is available for BitBucket repositories. Other presets can be installed, e.g: npm i conventional-changelog-jquery then pass this flag to the command: --changelogpreset jquery.
  • -r [num] or --releasecount [num]: How many releases of changelog you want to generate. It counts from the upcoming release. Useful when you forgot to generate any previous changelog. Set to 0 to regenerate all (will overwrite any existing changelog!).
  • --tagPrefix [tag name]: Gives the tag version a prefix such as ALPHA 1.1.2.

NOTE: If you run via npm, you have to add -- before the options so npm passes all arguments to node. Eg.: npm run corp-release -- -v -d

Updating other files

A pretty common requirement when updating the version number is to update other files with the same version number. There are two ways you can run your own scripts to update additional files:

In the following example, updateOtherFiles.js does NOT receive the version as an argument but must query package.json to get the bumped version.


"scripts": {
  "corp-release": "corp-semantic-release",
  "version": "node updateOtherFiles.js"
}

"scripts": {
  "corp-release": "corp-semantic-release --pre-commit updateFiles",
  "updateFiles": "node updateOtherFiles.js"
}

Remember to stage the files using git add <file-name> after modifying the files, so that when corp-semantic-release commits the changes, all the changed files are commited.

Contribute

Please refer to the Contributor Guidelines and Conduct of Code from AngularJs project.

TODO - Roadmap:

  • add option to create release on Enterprise GitHub using API v3. I am sure one day the corps will be using version 3.

FAQ

I work in a corporation which has a network proxy which is a pain in the azz. What should I do?

This NPM module is for you! I was unable to pass the setup stage of semantic-release inside a corporation network. That was one of the reasons why I created this package.

How do I setup corp-semantic-release?

Run npm install corp-semantic-release. There is no setup wizard like the semantic-release package has. Simple!

Can I trust 'corp-semantic-release'?

Take a look at the file test/e2e.spec.js. It has comprehensive system tests in order to make sure it works as expected.

Are the pipeline-of-actions different to semantic-release?

Yes. Importantly, corp-semantic-release will not attempt to publish to an NPM registry.

Actions performed:

  1. Validate that the current branch is the release branch.
  2. Determine the current version number (from the latest git tag).
  3. Get the commit history since the latest git tag.
  4. Determine the new semantic version number from the commit history.
  5. Decide whether a release is required or not. If not, exit.
  6. Update package.json with the new version number.
  7. Update or create CHANGELOG.md with the relevant log entries (from the commit history).
  8. Run pre-commit scripts.
  9. Commit file changes to git, create git tag then push all changes (including tags).

What else is different to semantic-release?

corp-semantic-release, at the moment, generetes and appends changelog contents to a file called CHANGELOG.md.

I just can't get over it - I really hate corporate proxies!

I totally understand your frustrations and you are not the only one. Proxy settings is not the focus of this project but I am happy to provide some help if I can. I use cntlm as reverse proxy. I also turn off ssl on npm. This is how I get things working. If you need further instructions on cntlm, send me a message.

License

This software is licensed under the MIT Licence. See LICENSE.