78 Commits

Author SHA1 Message Date
Matt Travi
4bf763f264
test(semantic-release-error): switched instanceof check to the native version
since the check provided by the ava assertion seems to fail beyond the context of the test
2023-06-09 16:14:46 -05:00
Chris. Webster
6ead75bf73
test: index test should reset testdouble (#2723) 2023-03-03 15:58:42 -06:00
Gregor Martynus
d13ea9280e
style: prettier (#2624) 2022-11-23 16:02:51 -08:00
Matt Travi
1b6254880c
test: aligned pluginName with naming for functions 2022-11-13 00:43:46 -06:00
Matt Travi
f7c85e3fff
test(index): forced plugins to use semantic-release beta
which deduped env-ci to the esm-only version, allowing test double to stub properly
2022-11-11 11:01:16 -06:00
Matt Travi
9eab1adb9d
feat(esm): convert to esm (#2569)
for #2543

BREAKING CHANGE: semantic-release is now ESM-only. since it is used through its own executable, the impact on consuming projects should be minimal

BREAKING CHANGE: references to plugin files in configs need to include the file extension because of executing in an ESM context
2022-11-11 09:24:06 -06:00
Matt Travi
9a513a38f7
test: replaced proxyquire with testdouble (#2537)
for #2133

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
2022-08-26 09:32:52 -07:00
Matt Travi
58a226f29c
fix(log-repo): use the original form of the repo url to remove the need to mask credentials (#2459)
fixes #2449
2022-06-08 21:09:47 -05:00
Emmanuel Ogbizi
0f0c650b41
fix: use correct ci branch context (#1521) 2020-06-25 09:30:12 -07:00
Gregor Martynus
caa3526caa style: xo 2020-04-08 15:13:33 -07:00
Pierre Vanduynslager
a93c96fec9 revert: fix: allow plugins to set environment variables to be used by other plugins
This reverts commit 68f7e928f93440a891fdb7c053d37082e228e1a6.
2020-02-07 17:50:14 -05:00
Pierre Vanduynslager
68f7e928f9 fix: allow plugins to set environment variables to be used by other plugins 2020-02-07 13:51:20 -08:00
greenkeeper[bot]
ef1b8a0b91 chore(package): update ava to version 3.1.0 2020-01-27 13:52:59 -05:00
Pierre Vanduynslager
3ba8f2a929
Merge remote-tracking branch 'origin/master' into beta 2020-01-09 15:01:19 -05:00
Pierre Vanduynslager
a8c747d592 feat: pass envi-ci values to plugins context 2019-12-20 19:36:02 -05:00
Pierre Vanduynslager
61665be9ec fix: correct log when adding channel to tag 2019-12-10 00:23:38 -05:00
Pierre Vanduynslager
916c2685c5 feat: allow to release any version on a branch if up to date with next branch 2019-12-04 18:00:16 -05:00
Pierre Vanduynslager
b2c1b2c670 feat: use Git notes to store the channels on which a version has been released
BREAKING CHANGE: this feature change the way semantic-release keep track of the channels on which a version has been released.
It now use a JSON object stored in a [Git note](https://git-scm.com/docs/git-notes) instead of Git tags formatted as v{version}@{channel}.

The tags formatted as v{version}@{channel} will now be ignored. If you have made releases with v16.0.0 on branches other than the default one you will have to update your repository.

The changes to make consist in:
- Finding all the versions that have been released on a branch other than the default one by searching for all tags formatted v{version}@{channel}
- For each of those version:
  - Create a tag without the {@channel} if none doesn't already exists
  - Add a Git note to the tag without the {@channel} containing the channels on which the version was released formatted as `{"channels":["channel1","channel2"]}` and using `null` for the default channel (for example.`{"channels":[null,"channel1","channel2"]}`)
  - Push the tags and notes
  - Update the GitHub releases that refer to a tag formatted as v{version}@{channel} to use the tag without it
  - Delete the tags formatted as v{version}@{channel}
2019-12-02 23:38:40 -05:00
Pierre Vanduynslager
2caafbaa2b fix: add a flag indicate which branch is the main one 2019-11-28 13:59:06 -05:00
Pierre Vanduynslager
aec96c791f fix: correctly determine release to add to a channel
- Add only the most recent release to a channel (rather than adding all the one not added yet)
- Avoid attempting to ad the version twice in case that version is already present in multiple upper branches
2019-11-27 15:18:23 -05:00
Pierre Vanduynslager
63f51ae6dd fix: allow multiple branches with same channel 2019-11-20 16:17:24 -05:00
Pierre Vanduynslager
de77a799a8 fix: call getTagHead only when necessary 2019-11-07 14:33:53 -05:00
Pierre Vanduynslager
113157f42a test: fix parsing of test repo URL on Travis in unit tests 2019-06-05 17:18:17 -04:00
jmodjeski75
3610422959 fix(repositoryUrl): on beta repositoryUrl needs auth for pre-release flows (#1186) 2019-06-05 11:33:54 -07:00
Pierre Vanduynslager
8576f49e54 test: update test to new sinon version 2019-05-09 10:38:02 -04:00
greenkeeper[bot]
20e5d83456 chore(package): update sinon to version 7.2.7 2019-03-04 13:21:34 -05:00
greenkeeper[bot]
ba00e16f43 chore(package): update ava to version 1.0.1 2018-12-27 15:04:57 -05:00
greenkeeper[bot]
3819ca56a9 chore(package): update ava to version 1.0.1 2018-12-27 14:43:11 -05:00
Pierre Vanduynslager
9a023b4088 fix: call success plugin only once for releases added to a channel 2018-12-17 15:23:04 -05:00
Pierre Vanduynslager
1243f79064 fix: correctly handle skipped releases 2018-12-16 16:28:52 -05:00
Pierre Vanduynslager
89663d3fcf fix: correctly handle skipped releases 2018-12-16 16:15:48 -05:00
Pierre Vanduynslager
e1c7269cb3 feat: allow addChannel plugins to return false in order to signify no release was done 2018-12-14 18:37:02 -05:00
Pierre Vanduynslager
47484f5eb2
feat: allow publish plugins to return false in order to signify no release was done 2018-12-14 16:46:32 -05:00
Pierre Vanduynslager
70c68ef3ed feat: allow publish plugins to return false in order to signify no release was done 2018-12-14 16:16:27 -05:00
Pierre Vanduynslager
7b4052470b feat: support multiple branches and distribution channels
- Allow to configure multiple branches to release from
- Allow to define a distribution channel associated with each branch
- Manage the availability on distribution channels based on git merges
- Support regular releases, maintenance releases and pre-releases
- Add the `addChannel` plugin step to make an existing release available on a different distribution channel

BREAKING CHANGE: the `branch` option has been removed in favor of `branches`

The new `branches` option expect either an Array or a single branch definition. To migrate your configuration:
- If you want to publish package from multiple branches, please the configuration documentation
- If you use the default configuration and want to publish only from `master`: nothing to change
- If you use the `branch` configuration and want to publish only from one branch: replace `branch` by `branches` (`"branch": "my-release-branch"` => `"branches": "my-release-branch"`)
2018-11-29 14:13:03 -05:00
Pierre Vanduynslager
90da6a0bc1 feat: add logs about prepare, publish, success and fail plugins skipped in dry-run mode 2018-11-14 11:27:06 -05:00
Pierre Vanduynslager
90b497464e test: test that dry-run also skips prepare step 2018-11-14 11:27:06 -05:00
Pierre Vanduynslager
a99355effa fix: remove dependency to git-url-parse 2018-10-27 09:35:45 -04:00
Pierre Vanduynslager
cc06d8999a test: fix errors ordering in assertions 2018-10-27 09:35:45 -04:00
Pierre Vanduynslager
5ba5010c80 feat: add new plugins option 2018-10-08 13:24:51 -04:00
Pierre Vanduynslager
dffe148e33 fix: hide sensitive data in relesae notes and fail/success plugin params 2018-08-27 16:20:36 -04:00
Pierre Vanduynslager
cfeaf49233 test: use real writable stream
This way plugins can pipe a stream to `stdout` and `stderr` in integration tests.
2018-08-15 16:27:55 -04:00
Pierre Vanduynslager
417779e221 feat: return lastRelease, commits, nextRelease, releases from JS API 2018-07-29 21:56:21 -04:00
Pierre Vanduynslager
0626d57116 feat: log with signale and allow to customize stdin and stdout 2018-07-29 21:56:21 -04:00
Pierre Vanduynslager
a94e08de9a feat: pass cwd and env context to plugins
- Allow to run semantic-release (via API) from anywhere passing the current working directory.
- Allows to simplify the tests and to run them in parallel in both the core and plugins.
2018-07-17 00:42:04 -04:00
Pierre Vanduynslager
50061bb267 refactor: remove unnecessary object destructuring 2018-07-10 13:18:58 -04:00
Pierre Vanduynslager
5989989452 feat: allow to define multiple generateNotes plugins
Each `generateNotes` plugin will be called in the order defined and will receive the concatenation of the previous one in `nextRelease.notes`.
That gives each plugin the ability to test if there is a notes part that will precede it's own.
Each plugin is expected to return it's own part of the release notes only. **semantic-release** will take care of concatenating all the notes parts.
2018-07-10 13:18:58 -04:00
Pierre Vanduynslager
576eb6027f refactor: simplify plugin validation 2018-07-10 13:18:58 -04:00
Pierre Vanduynslager
5847514fcc fix: allow empty release notes in dry-run mode 2018-07-10 11:42:22 -04:00
Pierre Vanduynslager
2d3a5e53e9 test: harmonize git-utils functions name 2018-07-02 18:38:24 -04:00