284 Commits

Author SHA1 Message Date
greenkeeper[bot]
48ade92b81 chore(package): update prettier to version 1.10.0 2018-01-11 11:01:04 -05:00
Pierre Vanduynslager
ed89361d7c docs: documentation improvements
**Refactor and clarify the documentation in `README.md`**
- Add Highlights
- Add a Table of contents
- Clarify the way semantic-release works
- Clarify relationship with the CI environments
- Describe local install for Node projects (with a `package.json`) and global install for non-JavaScript projects
- Explain CI general configuration (environment variables and a run after all jobs are successful)
- Clarify configuration (via config file or CLI arguments)
- Clarify plugin roles and configuration
- Add doc for shareable configuration
- Add recipes
- Add resources (Videos, articles, tutorials)
- Add a Support section
- Add a Team section

**Add the following FAQs**
- How can I use a npm build script that requires the `package.json`’s version ?
- Can I use Semantic-release with Yarn?
- Can I use Semantic-release to publish non-JavaScript packages?
- Can I use Semantic-release with any CI service?
- Can I use Semantic-release with any GitLab?
- Can I use Semantic-release with any Git hosted environment?
- Can I skip the release to the npm registry?
- Can I use .npmrc options?
- How can I set the access level of the published npm package?
- Can I use Semantic-release to publish a package on Artifactory?
- Can I set the initial release version of my package to 0.0.1?
- Why does semantic-release require Node version >= 8?

**Clarify Nove 8 requirement and solutions**
- Add Node version requirement explanation and solutions
- [X] Display a link to the documentation when running on Node < 8 version

**Add recipes**
- Travis
- GitLab CI
- Travis with build stages - To be done in #573
- CircleCI workflows - To be done in #573
2018-01-05 16:05:30 -05:00
simlu
f4d9ebeef7 fix(security): Updated marked dependency
The marked dependency defined in package-lock.json has a known moderate severity security vulnerability in version range < 0.3.9 and should be updated.
2018-01-05 15:48:41 -05:00
greenkeeper[bot]
7eded2f018 chore(package): update @semantic-release/github to version 3.0.1 2018-01-01 20:20:19 -05:00
Pierre Vanduynslager
8d575654c2 feat: make semantic-release CI agnostic
- Remove `@semantic-release/condition-travis` from the default plugins
- Verify the current branch in the core
- Verify the build is not triggered by a PR in the core
- Run in dry-run mode if not triggered on CI
- Dry-run mode runs the `verifyConditions` plugins, allowing to detect configuration error locally
- Return without error when no version has to be released due to no changes
- Return without error if the build is triggered from a PR
- Return without error if the current branch is not the configured branch
- CLI return with exit code 1 if there is a `semanticReleaseError`, allowing to fail builds in case of config error, missing token etc...

BREAKING CHANGE: `semantic-release` doesn't make sure it runs only on one Travis job anymore.
The CI configuration has to be done such that `semantic-release`
- runs only once per build
- runs only after all tests are successful on every jobs of the build
- runs on Node >=8

This can easily be done with [travis-deploy-once](https://github.com/semantic-release/travis-deploy-once).

Migration Guide

Modify your `.travis.yml` to use `travis-deploy-once`.
Replace:
```yaml
after_success:
  - npm run semantic-release
```
by:
Replace
```yaml
after_success:
  - npm install -g travis-deploy-once@4
  - travis-deploy-once "npm run semantic-release"
```
2017-12-30 23:15:25 -05:00
Pierre Vanduynslager
754b420fd6 feat: support sharable configuration
Adds the options `extends`, which can be defined via configuration file or CLI arguments to a single path or an array of paths of shareable configuration.
A shareable configuration is a file or a module that can be loaded with `require`.
Options is defined by merging in the following order of priority:
- CLI/API
- Configuration file
- Shareable configuration (from right to left)

Options set in a shareable configuration can be unset by setting it to `null` or `undefined` in the main configuration file. If a default value applies to this property it will be used.
2017-12-22 14:22:30 -05:00
greenkeeper[bot]
d28b7e3e07 fix(package): update @semantic-release/github to version 3.0.0 2017-12-22 13:26:00 -05:00
greenkeeper[bot]
e00dd160c7 chore(package): update @semantic-release/github to version 2.2.3 2017-12-17 00:25:54 -05:00
Pierre Vanduynslager
3316f1a79e test: add a delay after starting the npm registry
Attempt at improving test reliability on CI
2017-12-14 11:44:24 -05:00
greenkeeper[bot]
1b8aa95a6e chore(package): update prettier to version 1.9.2 2017-12-12 00:01:12 -05:00
greenkeeper[bot]
624ee88abd chore(package): update fs-extra to version 5.0.0 2017-12-11 15:02:29 -05:00
greenkeeper[bot]
88f33ec482 chore(package): update mockserver-client to version 5.1.1 2017-12-06 16:29:19 -05:00
greenkeeper[bot]
f30fb6c8af chore(package): update prettier to version 1.9.0 2017-12-05 10:03:18 -05:00
Pierre Vanduynslager
685959107b chore: Clean up mistakenly added configs 2017-11-29 18:06:14 -05:00
greenkeeper[bot]
89f5e07408 chore(package): update ava to version 0.24.0 2017-11-27 15:22:17 -05:00
Pierre Vanduynslager
40c58c9b42 ci: Run npm registry in Docker 2017-11-25 14:50:44 -05:00
Pierre Vanduynslager
0c67ba517f feat: Make semantic-release language agnostic
- Do not rely on `package.json` anymore
- Use `cosmiconfig` to load the configation. `semantic-release` can be configured:
  - via CLI options (including plugin names but not plugin options)
  - in the `release` property of `package.json` (as before)
  - in a `.releaserc.yml` or `.releaserc.js` or `.releaserc.js` or `release.config.js` file
  - in a `.releaserc` file containing `json`, `yaml` or `javascript` module
- Add the `repositoryUrl` options (used across `semantic-release` and plugins). The value is determined from CLi option, or option configuration, or package.json or the git remote url
- Verifies that `semantic-release` runs from a git repository
- `pkg` and `env` are not passed to plugin anymore
- `semantic-release` can be run both locally and globally. If ran globally with non default plugins, the plugins can be installed both globally or locally.

BREAKING CHANGE: `pkg` and `env` are not passed to plugin anymore.
Plugins relying on a `package.json` must verify the presence of a valid `package.json` and load it.
Plugins can use `process.env` instead of `env`.
2017-11-24 21:56:15 -05:00
Pierre Vanduynslager
facdadaddb ci: Lint with XO 2017-11-21 20:55:47 -05:00
Pierre Vanduynslager
d548edcf37 feat: Extract npm and github publish to plugins
- Add a new plugin type: `publish`
- Add support for multi-plugin. A plugin module can now return an object with a property for each plugin type
- Uses by default [npm](https://github.com/semantic-release/npm) and [github](https://github.com/semantic-release/github) in addition of Travis for the verify condition plugin
- Uses by default [npm](https://github.com/semantic-release/npm) and [github](https://github.com/semantic-release/github) for the publish plugin
- `gitTag` if one can be found is passed to `generateNotes` for both `lastRelease` and `nextRelease`
- `semantic-release` now verifies the plugin configuration (in the `release` property of `package.json`) and throws an error if it's invalid
- `semantic-release` now verifies each plugin output and will throw an error if a plugin returns an unexpected value.

BREAKING CHANGE: `githubToken`, `githubUrl` and `githubApiPathPrefix` have to be set at the [github](https://github.com/semantic-release/github) plugin level. They can be set via `GH_TOKEN`, `GH_URL` and `GH_PREFIX` environment variables.

BREAKING CHANGE: the `npm` parameter is not passed to any plugin anymore. Each plugin have to read `.npmrc` if they needs to (with https://github.com/kevva/npm-conf for example).
2017-11-21 16:41:04 -05:00
Pierre Vanduynslager
991a7b5f97 refactor: Simplify file tree 2017-11-21 16:41:04 -05:00
greenkeeper[bot]
c8748ad0e2 chore(package): update dependencies 2017-11-21 12:50:10 -05:00
Pierre Vanduynslager
17a600672f style: Update style for Prettier 1.8.0 2017-11-07 00:34:16 -05:00
greenkeeper[bot]
470697c01d chore(package): update prettier to version 1.8.0 2017-11-07 00:34:16 -05:00
Pierre Vanduynslager
d0180c4348 feat: Additional commit information
Add `author`, `commiter`, `gitTags` and `committerDate` to the commit object passed to plugin
2017-10-29 20:01:16 -07:00
greenkeeper[bot]
186950acc0 fix(package): update @semantic-release/commit-analyzer to version 4.0.0 2017-10-29 21:19:27 -04:00
Pierre Vanduynslager
65d344bae8 fix: Check SemanticReleaseError by error.semanticRelease property 2017-10-29 14:37:05 -07:00
greenkeeper[bot]
8a1dd7b324 fix(package): update @semantic-release/release-notes-generator to version 5.0.0 2017-10-28 22:17:45 -07:00
Pierre-Denis Vanduynslager
e2a8a5cd32 feat: Refactor CLI to run with one command, improve logs, modularize, add tests
- Run with one command and do not rely on error exit codes to stop the process when a release is not necessary
- Break `index.js` in smaller modules in order to improve testability and simplify the code
- Add several missing unit and integration tests to reach 100% coverage
- Integration tests now test end to end, including publishing to Github (with http://www.mock-server.com on Docker)
- Use `tj/commander.js` to print an help message, verify and parse CLI arguments
- Semantic-release can now be called via Javascript API: `require('semantic-release')(options)`
- Remove npmlog dependency and add more log messages
- Logger is now passed to plugins
- Add debug logs with `visionmedia/debug`. `debug` is enabled for both semantic-release and plugins with `--debug`
- Use `kevva/npm-conf` in place of the deprecated `npm/npmconf`
- Pass lastRelease, nextRelease and commits to generate-notes plugin
- In dry-run mode, print the release note instead of publishing it to Github as draft, and skip the CI verifications
- The dry-run mode does not require npm and Github TOKEN to be set anymore and can be run locally

BREAKING CHANGE: Semantic-Release must now be executed with `semantic-release` instead of `semantic-release pre && npm publish && semantic-release post`.
BREAKING CHANGE: The `semantic-release` command now returns with exit code 0 on expected exception (no release has to be done, running on a PR, gitHead not found, other CI job failed etc...). It only returns with 1 when there is an unexpected error (code error in a plugin, plugin not found, git command cannot be run etc..).
BREAKING CHANGE: Calling the `semantic-release` command with unexpected argument(s) now exit with 1 and print an help message.
BREAKING CHANGE: Semantic-Release does not rely on `npmlog` anymore and the log level cannot be configured. Debug logs can be activated with CLI option `--debug` or with environment variable `DEBUG=semantic-release:*`
BREAKING CHANGE: The CLI options `--debug` doesn't enable the dry-run mode anymore but activate the debugs. The dry run mode is now set with the CLI command `--dry-run` or `-d`.
2017-10-27 18:07:13 -07:00
greenkeeper[bot]
16a02e523e fix(package): update github to version 12.0.0 2017-10-25 10:35:57 -04:00
greenkeeper[bot]
51e7579c69 chore(package): update ava to version 0.23.0 2017-10-24 14:11:22 -07:00
greenkeeper[bot]
acddd5a12f chore(package): update codecov to version 3.0.0 2017-10-23 11:04:25 -04:00
Pierre-Denis Vanduynslager
cc3c8f2548 ci: Use codecov for code coverage 2017-09-30 13:30:41 -04:00
Pierre-Denis Vanduynslager
abf92ad03d refactor: Use ES6, Test with AVA
- Use async/await instead of callbacks
- Use execa to run command line
- Use AVA for tests
- Add several assertions in the unit tests
- Add documentation (comments) in the tests
- Run tests with a real git repo instead of mocking child_process and add test helpers to create repos, commits and checkout
- Simplify test directory structure
- Simplify code readability (mostly with async/await)
- Use eslint for for linting, prettier for formatting
2017-09-30 13:30:41 -04:00
greenkeeper[bot]
42456a32b3 chore(package): update coveralls to version 3.0.0 2017-09-28 10:25:35 -07:00
greenkeeper[bot]
3a4334fbfd fix(package): update @semantic-release/error to version 2.0.0 2017-09-25 13:16:40 -04:00
Pierre Vanduynslager
9951cf7e00 fix(package): Set minimum node version to 4 (#442) 2017-09-21 11:24:18 -07:00
greenkeeper[bot]
2d14c53b11 fix(package): update @semantic-release/last-release-npm to version 2.0.0 2017-09-21 11:08:42 -07:00
greenkeeper[bot]
277d9ab4e2 chore(package): update cz-conventional-changelog to version 2.0.0
https://greenkeeper.io/
2017-09-19 18:03:30 -04:00
Stephan Schneider
4612a056a3 chore(package): update commitizen config 2017-09-19 16:42:09 -04:00
greenkeeper[bot]
8c44c3176a fix(package): update @semantic-release/commit-analyzer to version 3.0.1 2017-09-17 20:31:46 -07:00
greenkeeper[bot]
dd60b461a6 fix(package): update @semantic-release/release-notes-generator to version 4.0.0 2017-09-17 19:51:43 +00:00
Gregor
12b35396d8 fix(package): @semantic-release/condition-travis@6.0.0
This also introduces the new build leader detecation from https://github.com/semantic-release/travis-deploy-once/releases/tag/v2.0.0
2017-08-19 14:15:28 -07:00
Stephan Bönnemann
f534c57215 fix: remove support for node < 8
BREAKING CHANGE: Remove support for publishing a package with node < 8. [Details](https://github.com/semantic-release/semantic-release#why-does-semantic-release-require-node-version-8).
2017-08-19 14:15:28 -07:00
greenkeeper[bot]
1fa6d50264 fix(package): update @semantic-release/release-notes-generator to version 3.0.1
BREAKING CHANGE: Dropped support for unmaintained Node.js versions (< v4)
2017-08-13 12:10:36 -07:00
greenkeeper[bot]
76cd99c3a5 chore(package): update standard to version 9.0.0
https://greenkeeper.io/
2017-03-06 10:13:19 +01:00
greenkeeper[bot]
22dc640117 chore(package): update tap to version 10.0.1
https://greenkeeper.io/
2017-02-03 11:37:47 +01:00
Stephan Bönnemann
aa012b3023 Merge branch 'greenkeeper/tap-9.0.0' into dep-updates
* greenkeeper/tap-9.0.0:
  chore(package): update tap to version 9.0.0
2017-01-13 12:04:45 +01:00
Stephan Bönnemann
5724b19e23 Merge branch 'greenkeeper/github-8.0.0' into dep-updates
* greenkeeper/github-8.0.0:
  fix(package): update github to version 8.0.0
2017-01-13 12:04:25 +01:00
Stephan Bönnemann
97a8e73b01 Merge branch 'caribou' into greenkeeper/nopt-4.0.0 2017-01-13 11:51:22 +01:00
Cory Reed
51e12a3a4b docs(package): fix 'home' link 2017-01-13 11:51:04 +01:00