Compare commits

...
Author SHA1 Message Date
Matt Travi d4ed18d184 fix: bump @semantic-release/commit-analyzer to v10.0.0-beta.1 2023-05-29 21:56:00 -05:00
Matt Travi 039145ab3e chore: update the lockfile 2023-05-29 20:42:35 -05:00
Gregor Martynus 75280d28d8 fix: bump @semantic-release/github to 9.0.0-beta.2 2023-05-29 16:39:20 -07:00
6ef4cee971 chore(deps): update dependency c8 to v7.14.0 (#2815)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-28 19:00:28 +00:00
18bd0c4904 chore(deps): lock file maintenance (#2797)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-23 07:05:08 +00:00
Matt Travi ab4fe4c3d4 refactor: leverage native async setTimeout rather than delay 2023-05-22 22:25:22 -05:00
42385d0f96 chore(deps): update dependency sinon to v15.1.0 (#2801)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 15:39:53 -07:00
57db31ad97 chore(deps): update dependency delay to v6 (#2803)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-21 20:14:15 +00:00
Matt TraviandGitHub fa133f2a9d ci(release): pinned the version of semantic-release (#2796) 2023-05-12 17:17:04 -05:00
4af49f3c87 chore(deps): update dependency nock to v13.3.1 (#2777)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-10 16:01:22 -05:00
Joram van den BoezemandGitHub 0d5e717fa6 docs(extending): add semantic-release-yarn to community plugins (#2790) 2023-05-10 08:40:17 -05:00
Matt Travi ee250a04db docs(gitbook): fixed reference to the installation page 2023-05-09 09:07:50 -05:00
85a31fb612 docs(npx-version): mentioned using a renovate regex manager to update the version (#2786)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2023-05-09 08:02:45 -05:00
8826e524e4 chore(deps): update dependency testdouble to v3.18.0 (#2787)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-09 06:35:20 +00:00
Liran TalandGitHub f1b0801157 docs: Update README.md with npm package provenance (#2789) 2023-05-08 21:06:39 -05:00
214a376342 ci(action): pin dependencies (#2781)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-06 10:09:56 +00:00
0c6c20ee96 chore(deps): lock file maintenance (#2763)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-06 08:06:29 +00:00
420211c806 chore(deps): update dependency prettier to v2.8.8 (#2771)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-06 04:19:59 +00:00
Eric KandGitHub 0476ae58a0 docs(extending): add link to semantic-release-major-tag (#2776) 2023-05-05 16:55:09 -05:00
ac40804dc4 fix(deps): update dependency @semantic-release/release-notes-generator to v11 (#2778)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-28 17:01:24 -05:00
Matt Travi e046ece3cb ci(signatures): moved the audit step to the non-matrix stage
since older versions of npm dont support `npm audit signatures` and instead simply audit for vulnerabilities
2023-04-28 16:33:03 -05:00
Matt Travi ef998acd4d ci(dependencies): audited signatures and provenance attestations of installed packages 2023-04-21 16:41:27 -05:00
Matt Travi 278d8e6bec docs(gh-actions): captured details about publishing with provenance from an actions workflow 2023-04-21 16:01:08 -05:00
ddf4065b4e chore(deps): update dependency sinon to v15.0.4 (#2769)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-20 17:40:03 +00:00
4bddb37de2 fix(deps): update dependency env-ci to v9 (#2757)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-01 08:18:03 -05:00
aa90774738 chore(deps): update dependency testdouble to v3.17.2 (#2751)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-01 01:53:55 +00:00
Matt Travi d7e14f6d02 docs(artifactory): removed details about using artifactory with legacy auth
since we no longer support legacy auth in the npm plugin and artifcatory can use modern auth with more recent versions
2023-03-31 15:09:10 -05:00
4a943a5651 chore(deps): pin dependencies (#2744)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-27 19:16:38 +00:00
f47a5102d6 chore(deps): lock file maintenance (#2737)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-27 14:50:11 +00:00
05596bce72 chore(deps): update dependency prettier to ^2.8.4 (#2746)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-27 08:52:21 +00:00
c6e84efc28 chore(deps): update dependency sinon to v15.0.3 (#2748)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-27 03:27:20 +00:00
0cbe8046af chore(deps): update dependency fs-extra to ^11.1.0 (#2745)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-25 01:36:14 +00:00
ea32d10fa6 chore(deps): update dependency testdouble to v3.17.1 (#2740)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-24 20:51:08 +00:00
Matt TraviandGitHub deb1b7f9cb Merge pull request #2741 from semantic-release/beta
upgraded to next major version of the npm plugin
2023-03-24 14:30:48 -05:00
Matt Travi 2d7f607649 chore(lint): ran prettier against the release workflow file 2023-03-21 22:18:42 -05:00
Matt Travi 91eae117ed ci(release): enabled provenance for publishing to npm 2023-03-21 22:12:37 -05:00
Matt Travi 050412eab8 Merge branch 'master' of github.com:semantic-release/semantic-release into beta 2023-03-21 21:46:58 -05:00
Matt Travi d647433c20 fix(deps): updated to the latest version of the npm plugin 2023-03-21 21:13:25 -05:00
f1d6e65d9a chore(deps): update dependency dockerode to v3.3.5
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-17 13:36:34 -07:00
c38b53a321 fix(deps): update dependency execa to v7.1.1
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-17 13:36:13 -07:00
fbede54388 fix(deps): update dependency cosmiconfig to v8.1.2
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-17 13:33:58 -07:00
6d286cd5d6 chore(deps): update dependency sinon to v15.0.2 (#2730)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-14 05:05:34 +00:00
bc6d8b4411 chore(deps): update dependency testdouble to v3.17.0 (#2731)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-14 01:22:13 +00:00
9986f6fe20 chore(deps): lock file maintenance
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-06 21:15:28 -08:00
Justin MartinandGitHub 6bd6afd8f7 docs: add new to create WritableStreamBuffer instances (#2724) 2023-03-06 23:10:48 -06:00
00714c0fc8 chore(deps): lock file maintenance (#2684)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-04 14:40:56 -06:00
Chris. WebsterandGitHub c71d5d94ce test: Windows support in integration tests (#2722)
* ci: win32 escape slash as doubleslash for test

Pathing in stderr output has double backslash in the filename.  The test
will now use double backslash in the existence test.

Signed-off-by: Chris. Webster <chris@webstech.net>

* ci: avoid Windows pop-up in credential tests

Windows uses a `credential.helper` that will open a pop-up for
credentials if they are missing.  A git config parameter will now be set
to avoid the pop-up.

Signed-off-by: Chris. Webster <chris@webstech.net>

---------

Signed-off-by: Chris. Webster <chris@webstech.net>
2023-03-04 12:37:05 -06:00
Chris. WebsterandGitHub c04e827757 test: update docker config for windows support (#2721
There is legacy support for PortBindings and Binds at the root level of
the config.  Currently (including Windows) these reside under the
HostConfig.  ExposedPorts is now used to identify the externally
available ports.

Signed-off-by: Chris. Webster <chris@webstech.net>
2023-03-03 17:09:19 -06:00
Chris. WebsterandGitHub 6ead75bf73 test: index test should reset testdouble (#2723) 2023-03-03 15:58:42 -06:00
ab3dfe4aba chore(deps): update dependency c8 to v7.13.0 (#2716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-28 23:29:06 -06:00
Matt Travi df6dbf0295 docs(navigation): removed the hash from the configuration usage page 2023-02-28 22:59:01 -06:00
Matt Travi ea8ed80e71 docs(navigation): removed the hash from the ci usage page 2023-02-28 22:57:29 -06:00
Matt Travi e47ea08255 docs(ci-configurations): removed hash from the links 2023-02-28 22:27:15 -06:00
Matt Travi 4e5b181ffb docs(node-version): linked to proper recipe page for ci-configurations 2023-02-28 22:23:21 -06:00
Matt Travi 5acdaabaaf docs(ci-configuration): further fixed the format of links to recipes 2023-02-28 22:15:15 -06:00
Matt Travi 724dc823fa docs(ci-configuration): fixed the format of links to recipes 2023-02-28 22:09:16 -06:00
31d9bfe00a fix(deps): update dependency execa to v7 (#2709)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-27 23:18:19 -06:00
7bbaaf9a48 chore(deps): update dependency ava to v5.2.0 (#2702)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-02-27 23:05:07 -06:00
42b67ce994 ci: set test workflow timeout to 10 minutes (#2720)
Co-authored-by: Matt Travi <programmer@travi.org>
2023-02-27 22:17:40 -06:00
Chris. WebsterandGitHub f991a599f5 test(integration): fix package name conflict (#2719) 2023-02-27 22:01:57 -06:00
Lars TrieloffandGitHub 1775ed80b9 docs(extending): add link to semantic-release-coralogix (#2710) 2023-02-16 00:45:54 -06:00
1beeb84c90 build(deps): bump http-cache-semantics from 4.1.0 to 4.1.1
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-03 10:08:15 -08:00
18 changed files with 4331 additions and 8337 deletions
+12 -8
View File
@@ -7,23 +7,27 @@ name: Release
- beta
- "*.x"
permissions:
contents: read # for checkout
contents: read # for checkout
jobs:
release:
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
cache: npm
node-version: lts/*
- run: npm ci
- run: npx semantic-release
- run: npm clean-install
- run: npm audit signatures
# pinned version updated automatically by Renovate.
# details at https://semantic-release.gitbook.io/semantic-release/usage/installation#global-installation
- run: npx semantic-release@21.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
+6 -4
View File
@@ -24,13 +24,14 @@ jobs:
- 19
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- run: git config --global user.name github-actions
- run: git config --global user.email github-actions@github.com
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
@@ -45,10 +46,11 @@ jobs:
runs-on: ubuntu-latest
needs: test_matrix
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
node-version: lts/*
cache: npm
- run: npm clean-install
- run: npm audit signatures
- run: npm run lint
+1
View File
@@ -41,6 +41,7 @@ This removes the immediate connection between human emotions and version numbers
- Avoid potential errors associated with manual releases
- Support any [package managers and languages](docs/recipes/release-workflow/README.md#package-managers-and-languages) via [plugins](docs/usage/plugins.md)
- Simple and reusable configuration via [shareable configurations](docs/usage/shareable-configurations.md)
- Support for [npm package provenance](https://github.com/semantic-release/npm#npm-provenance) that promotes increased supply-chain security via signed attestations on GitHub Actions
## How does it work?
+3 -3
View File
@@ -3,9 +3,9 @@
## Usage
- [Getting started](docs/usage/getting-started.md#getting-started)
- [Installation](docs/usage/installation.md#installation)
- [CI Configuration](docs/usage/ci-configuration.md#ci-configuration)
- [Configuration](docs/usage/configuration.md#configuration)
- [Installation](docs/usage/installation.md)
- [CI Configuration](docs/usage/ci-configuration.md)
- [Configuration](docs/usage/configuration.md)
- [Plugins](docs/usage/plugins.md)
- [Workflow configuration](docs/usage/workflow-configuration.md)
- [Shareable configurations](docs/usage/shareable-configurations.md)
+3 -3
View File
@@ -6,8 +6,8 @@
const semanticRelease = require("semantic-release");
const { WritableStreamBuffer } = require("stream-buffers");
const stdoutBuffer = WritableStreamBuffer();
const stderrBuffer = WritableStreamBuffer();
const stdoutBuffer = new WritableStreamBuffer();
const stderrBuffer = new WritableStreamBuffer();
try {
const result = await semanticRelease(
@@ -142,7 +142,7 @@ Information related to the last release found:
| gitTag | `String` | The [Git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) associated with the last release. |
| channel | `String` | The distribution channel on which the last release was initially made available (`undefined` for the default distribution channel). |
**Notes**: If no previous release is found, `lastRelease` will be an empty `Object`.
**Note**: If no previous release is found, `lastRelease` will be an empty `Object`.
Example:
+11
View File
@@ -171,3 +171,14 @@
- `verifyConditions` Validate configuration, `Cargo.toml`, and local cargo executable. Also, logs in into `crates.io`.
- `prepare` Write the new version number into `Cargo.toml` file and perform `cargo check` if configured.
- `publish` Publish the Rust crate to `crates.io`
- [semantic-release-coralogix](https://github.com/adobe/semantic-release-coralogix)
- `verifyConditions` Verified that required credentials are provided and API is accessible
- `publish` add a release tag to Coralogix
- [semantic-release-major-tag](https://github.com/doteric/semantic-release-major-tag)
- `success` Create major version tag, for example `v1`.
- [semantic-release-yarn](https://github.com/hongaar/semantic-release-yarn)
- **Note**: this is an alternative to the default `@semantic-release/npm` plugin and adds support for monorepos.
- `verifyConditions` Verify Yarn 2 or higher is installed, verify the presence of a NPM auth token (either in an environment variable or a `.yarnrc.yml` file) and verify the authentication method is valid.
- `prepare` Update the `package.json` version and create the package tarball.
- `addChannel` Add a tag for the release.
- `publish` Publish to the npm registry.
@@ -6,6 +6,11 @@ The [Authentication](../../usage/ci-configuration.md#authentication) environment
In this example a publish type [`NPM_TOKEN`](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) is required to publish a package to the npm registry. GitHub Actions [automatically populate](https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secret) a [`GITHUB_TOKEN`](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) environment variable which can be used in Workflows.
## npm provenance
Since GitHub Actions is a [supported provider](https://docs.npmjs.com/generating-provenance-statements#provenance-limitations) for [npm provenance](https://docs.npmjs.com/generating-provenance-statements), it is recommended to enable this to increase supply-chain security for your npm packages.
Find more detail about configuring npm to publish with provenance through semantic-release [in the documentation for our npm plugin](https://github.com/semantic-release/npm#npm-provenance).
## Node project configuration
[GitHub Actions](https://github.com/features/actions) support [Workflows](https://help.github.com/en/articles/configuring-workflows), allowing to run tests on multiple Node versions and publish a release only when all test pass.
@@ -23,10 +28,19 @@ on:
push:
branches:
- master
permissions:
contents: read # for checkout
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -37,7 +51,9 @@ jobs:
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-8
View File
@@ -158,14 +158,6 @@ Or with the `publishConfig.access` key in your project's `package.json`:
}
```
## Can I use semantic-release to publish a package on Artifactory?
Any npm compatible registry is supported with the [`@semantic-release/npm`](https://github.com/semantic-release/npm) plugin. For Artifactory versions prior to 5.4, the legacy authentication has to be used (with `NPM_USERNAME`, `NPM_PASSWORD` and `NPM_EMAIL` [environment variables](https://github.com/semantic-release/npm#environment-variables)).
See [npm registry authentication](https://github.com/semantic-release/npm#npm-registry-authentication) for more details.
See [Artifactory - npm Registry](https://www.jfrog.com/confluence/display/RTF/Npm+Registry#NpmRegistry-AuthenticatingthenpmClient) documentation for Artifactory configuration.
## Can I manually trigger the release of a specific version?
You can trigger a release by pushing to your Git repository. You deliberately cannot trigger a _specific_ version release, because this is the whole point of semantic-release.
+1 -1
View File
@@ -14,7 +14,7 @@ See our [Node Support Policy](node-support-policy.md) for our long-term promise
The recommended approach is to run the `semantic-release` command from a CI job running on the latest available LTS version of node.
This can either be a job used by your project to test on the latest Node LTS version or a dedicated job for the release steps.
See [CI configuration](../usage/ci-configuration.md) and [CI configuration recipes](../recipes/release-workflow/README.md#ci-configurations) for more details.
See [CI configuration](../usage/ci-configuration.md) and [CI configuration recipes](../recipes/ci-configurations/README.md#ci-configurations) for more details.
## Alternative solutions
+2 -2
View File
@@ -14,7 +14,7 @@ Here are a few examples of the CI services that can be used to achieve this:
- [Wercker Workflows](http://devcenter.wercker.com/docs/workflows)
- [GoCD Pipelines](https://docs.gocd.org/current/introduction/concepts_in_go.html#pipeline).
See [CI configuration recipes](../recipes/ci-configurations#ci-configurations) for more details.
See [CI configuration recipes](../recipes/ci-configurations/README.md) for more details.
## Authentication
@@ -45,6 +45,6 @@ See each plugin's documentation for the environment variables required.
The authentication token/credentials have to be made available in the CI service via environment variables.
See [CI configuration recipes](../recipes/ci-configurations#ci-configurations) for more details on how to configure environment variables in your CI service.
See [CI configuration recipes](../recipes/ci-configurations/README.md) for more details on how to configure environment variables in your CI service.
**Note**: The environment variables `GH_TOKEN`, `GITHUB_TOKEN`, `GL_TOKEN` and `GITLAB_TOKEN` can be used for both the Git authentication and the API authentication required by [@semantic-release/github](https://github.com/semantic-release/github) and [@semantic-release/gitlab](https://github.com/semantic-release/gitlab).
+24 -5
View File
@@ -24,9 +24,28 @@ For other type of projects we recommend installing **semantic-release** directly
$ npx semantic-release
```
**Note**: For a global installation, it's recommended to specify the major **semantic-release** version to install (for example with `npx semantic-release@18`).
This way your build will not automatically use the next major **semantic-release** release that could possibly break your build.
You will have to upgrade manually when a new major version is released.
### Notes
**Note**: `npx` is a tool bundled with `npm@>=5.2.0`. It is used to conveniently install the semantic-release binary and to execute it.
See [What is npx](../support/FAQ.md#what-is-npx) for more details.
1. If you've globally installed **semantic-release** then we recommend that you set the major **semantic-release** version to install.
For example, by using `npx semantic-release@18`.
This way you control which major version of **semantic-release** is used by your build, and thus avoid breaking the build when there's a new major version of **semantic-release**.
This also means you, or a bot, must upgrade **semantic-release** when a new major version is released.
2. Pinning **semantic-release** to an exact version makes your releases even more deterministic.
But pinning also means you, or a bot, must update to newer versions of **semantic-release** more often.
3. You can use [Renovate's regex manager](https://docs.renovatebot.com/modules/manager/regex/) to get automatic updates for **semantic-release** in either of the above scenarios.
Put this in your Renovate configuration file:
```json
{
"regexManagers": [
{
"description": "Update semantic-release version used by npx",
"fileMatch": ["^\\.github/workflows/[^/]+\\.ya?ml$"],
"matchStrings": ["\\srun: npx semantic-release@(?<currentValue>.*?)\\s"],
"datasourceTemplate": "npm",
"depNameTemplate": "semantic-release"
}
]
}
```
4. `npx` is a tool bundled with `npm@>=5.2.0`. You can use it to install (and run) the **semantic-release** binary.
See [What is npx](../support/FAQ.md#what-is-npx) for more details.
+4204 -8270
View File
File diff suppressed because it is too large Load Diff
+20 -20
View File
@@ -26,16 +26,16 @@
"Matt Travi <npm@travi.org> (https://matt.travi.org/)"
],
"dependencies": {
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/commit-analyzer": "^10.0.0-beta.1",
"@semantic-release/error": "^3.0.0",
"@semantic-release/github": "^8.0.0",
"@semantic-release/npm": "^10.0.0-beta.4",
"@semantic-release/release-notes-generator": "^10.0.0",
"@semantic-release/github": "9.0.0-beta.2",
"@semantic-release/npm": "^10.0.2",
"@semantic-release/release-notes-generator": "^11.0.0",
"aggregate-error": "^4.0.1",
"cosmiconfig": "^8.0.0",
"debug": "^4.0.0",
"env-ci": "^8.0.0",
"execa": "^6.1.0",
"env-ci": "^9.0.0",
"execa": "^7.0.0",
"figures": "^5.0.0",
"find-versions": "^5.1.0",
"get-stream": "^6.0.0",
@@ -56,24 +56,23 @@
"yargs": "^17.5.1"
},
"devDependencies": {
"ava": "5.1.0",
"c8": "7.12.0",
"ava": "5.2.0",
"c8": "7.14.0",
"clear-module": "4.1.2",
"codecov": "3.8.3",
"delay": "5.0.0",
"dockerode": "3.3.4",
"file-url": "^4.0.0",
"fs-extra": "^11.0.0",
"got": "^12.5.0",
"dockerode": "3.3.5",
"file-url": "4.0.0",
"fs-extra": "11.1.1",
"got": "12.6.0",
"js-yaml": "4.1.0",
"mockserver-client": "5.15.0",
"nock": "13.3.0",
"p-retry": "^5.1.1",
"prettier": "^2.7.1",
"sinon": "15.0.1",
"nock": "13.3.1",
"p-retry": "5.1.2",
"prettier": "2.8.8",
"sinon": "15.1.0",
"stream-buffers": "3.0.2",
"tempy": "^3.0.0",
"testdouble": "3.16.8"
"tempy": "3.0.0",
"testdouble": "3.18.0"
},
"engines": {
"node": ">=18"
@@ -117,7 +116,8 @@
"trailingComma": "es5"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"repository": {
"type": "git",
+4 -1
View File
@@ -23,7 +23,10 @@ export async function start() {
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
PortBindings: { [`${SERVER_PORT}/tcp`]: [{ HostPort: `${HOST_PORT}` }] },
HostConfig: {
PortBindings: { [`${SERVER_PORT}/tcp`]: [{ HostPort: `${HOST_PORT}` }] },
},
ExposedPorts: { [`${SERVER_PORT}/tcp`]: {} },
});
await container.start();
+4 -1
View File
@@ -19,7 +19,10 @@ export async function start() {
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
PortBindings: { [`${MOCK_SERVER_PORT}/tcp`]: [{ HostPort: `${MOCK_SERVER_PORT}` }] },
HostConfig: {
PortBindings: { [`${MOCK_SERVER_PORT}/tcp`]: [{ HostPort: `${MOCK_SERVER_PORT}` }] },
},
ExposedPorts: { [`${MOCK_SERVER_PORT}/tcp`]: {} },
});
await container.start();
+7 -4
View File
@@ -1,9 +1,9 @@
import path, { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { setTimeout } from "node:timers/promises";
import Docker from "dockerode";
import getStream from "get-stream";
import got from "got";
import delay from "delay";
import pRetry from "p-retry";
const IMAGE = "verdaccio/verdaccio:5";
@@ -25,12 +25,15 @@ export async function start() {
container = await docker.createContainer({
Tty: true,
Image: IMAGE,
PortBindings: { [`${REGISTRY_PORT}/tcp`]: [{ HostPort: `${REGISTRY_PORT}` }] },
Binds: [`${path.join(__dirname, "config.yaml")}:/verdaccio/conf/config.yaml`],
HostConfig: {
PortBindings: { [`${REGISTRY_PORT}/tcp`]: [{ HostPort: `${REGISTRY_PORT}` }] },
Binds: [`${path.join(__dirname, "config.yaml")}:/verdaccio/conf/config.yaml`],
},
ExposedPorts: { [`${REGISTRY_PORT}/tcp`]: {} },
});
await container.start();
await delay(4000);
await setTimeout(4000);
try {
// Wait for the registry to be ready
+5 -1
View File
@@ -39,7 +39,11 @@ test.beforeEach((t) => {
};
});
test("Plugins are called with expected values", async (t) => {
test.afterEach.always((t) => {
td.reset();
});
test.serial("Plugins are called with expected values", async (t) => {
// Create a git repository, set the current working directory at the root of the repo
const { cwd, repositoryUrl } = await gitRepo(true);
// Add commits to the master branch
+7 -5
View File
@@ -1,11 +1,11 @@
import path from "path";
import path from "node:path";
import { setTimeout } from "node:timers/promises";
import test from "ava";
import * as td from "testdouble";
import { escapeRegExp } from "lodash-es";
import fsExtra from "fs-extra";
import { execa } from "execa";
import { WritableStreamBuffer } from "stream-buffers";
import delay from "delay";
import getAuthUrl from "../lib/get-git-auth-url.js";
import { SECRET_REPLACEMENT } from "../lib/definitions/constants.js";
@@ -295,7 +295,7 @@ test("Release patch, minor and major versions", async (t) => {
t.is(exitCode, 0);
// Wait for 3s as the change of dist-tag takes time to be reflected in the registry
await delay(3000);
await setTimeout(3000);
// Retrieve the published package from the registry and check version and gitHead
({
"dist-tags": { latest: releasedVersion },
@@ -598,7 +598,7 @@ test("Log unexpected errors from plugins and exit with 1", async (t) => {
// Verify the type and message are logged
t.regex(stderr, /Error: a/);
// Verify the the stacktrace is logged
t.regex(stderr, new RegExp(pluginError));
t.regex(stderr, new RegExp(process.platform === "win32" ? pluginError.replace(/\\/g, "\\\\") : pluginError));
// Verify the Error properties are logged
t.regex(stderr, /errorProperty: 'errorProperty'/);
t.is(exitCode, 1);
@@ -687,6 +687,7 @@ test("Use the valid git credentials when multiple are provided", async (t) => {
BB_TOKEN_BASIC_AUTH: gitbox.gitCredential,
GIT_ASKPASS: "echo",
GIT_TERMINAL_PROMPT: 0,
GIT_CONFIG_PARAMETERS: "'credential.helper='",
},
branch: { name: "master" },
options: { repositoryUrl: "http://toto@localhost:2080/git/test-auth.git" },
@@ -707,6 +708,7 @@ test("Use the repository URL as is if none of the given git credentials are vali
GITLAB_TOKEN: "trash",
GIT_ASKPASS: "echo",
GIT_TERMINAL_PROMPT: 0,
GIT_CONFIG_PARAMETERS: "'credential.helper='",
},
branch: { name: "master" },
options: { repositoryUrl: dummyUrl },
@@ -716,7 +718,7 @@ test("Use the repository URL as is if none of the given git credentials are vali
});
test("ESM Plugin with named exports", async (t) => {
const packageName = "log-secret";
const packageName = "plugin-exports";
// Create a git repository, set the current working directory at the root of the repo
t.log("Create git repository");
const { cwd, repositoryUrl } = await gitbox.createRepo(packageName);