Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a7befe96b | ||
|
|
993bf59af9 | ||
|
|
94d50ed934 | ||
|
|
bd4725b041 | ||
|
|
041e4f7e37 | ||
|
|
1c8d848a4f | ||
|
|
2822fbee5d | ||
|
|
2a67c65328 | ||
|
|
87f0c12cf6 | ||
|
|
11788ed5dc | ||
|
|
b93bef4eea | ||
|
|
6604153812 | ||
|
|
e623cc642a | ||
|
|
42f7b8269e | ||
|
|
a23b71890b | ||
|
|
fb850ff26d | ||
|
|
b9f294d179 | ||
|
|
03a687b3ea | ||
|
|
de8e4e05e9 | ||
|
|
72ab317bb0 | ||
|
|
07a79ea7e9 |
@@ -18,7 +18,7 @@ jobs:
|
|||||||
name: release
|
name: release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
|
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
|
||||||
with:
|
with:
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
id-token: write
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- name: Run analysis
|
- name: Run analysis
|
||||||
@@ -31,6 +31,6 @@ jobs:
|
|||||||
path: results.sarif
|
path: results.sarif
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
- name: Upload to code-scanning
|
- name: Upload to code-scanning
|
||||||
uses: github/codeql-action/upload-sarif@04daf014b50eaf774287bf3f0f1869d4b4c4b913 # v2.21.7
|
uses: github/codeql-action/upload-sarif@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
@@ -15,19 +15,24 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read # to fetch code (actions/checkout)
|
contents: read # to fetch code (actions/checkout)
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORCE_COLOR: 1
|
||||||
|
NPM_CONFIG_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_matrix:
|
test_matrix:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version:
|
node-version:
|
||||||
- 18.0.0
|
- 18.17.0
|
||||||
- 19
|
- 20.6.1
|
||||||
|
- 20
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
- run: git config --global user.name github-actions
|
- run: git config --global user.name github-actions
|
||||||
- run: git config --global user.email github-actions@github.com
|
- run: git config --global user.email github-actions@github.com
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
@@ -45,8 +50,9 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test_matrix
|
needs: test_matrix
|
||||||
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
|
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
@@ -54,3 +60,9 @@ jobs:
|
|||||||
- run: npm clean-install
|
- run: npm clean-install
|
||||||
- run: npm audit signatures
|
- run: npm audit signatures
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
|
- name: All matrix versions passed
|
||||||
|
if: ${{ !(contains(needs.*.result, 'failure')) }}
|
||||||
|
run: exit 0
|
||||||
|
- name: Some matrix version failed
|
||||||
|
if: ${{ contains(needs.*.result, 'failure') }}
|
||||||
|
run: exit 1
|
||||||
|
|||||||
Generated
+648
-822
File diff suppressed because it is too large
Load Diff
+9
-7
@@ -8,6 +8,7 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"test/**/*.test.js"
|
"test/**/*.test.js"
|
||||||
],
|
],
|
||||||
|
"failFast": true,
|
||||||
"nodeArguments": [
|
"nodeArguments": [
|
||||||
"--loader=testdouble",
|
"--loader=testdouble",
|
||||||
"--no-warnings"
|
"--no-warnings"
|
||||||
@@ -26,11 +27,11 @@
|
|||||||
"Matt Travi <npm@travi.org> (https://matt.travi.org/)"
|
"Matt Travi <npm@travi.org> (https://matt.travi.org/)"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@semantic-release/commit-analyzer": "^10.0.0",
|
"@semantic-release/commit-analyzer": "^11.0.0",
|
||||||
"@semantic-release/error": "^4.0.0",
|
"@semantic-release/error": "^4.0.0",
|
||||||
"@semantic-release/github": "^9.0.0",
|
"@semantic-release/github": "^9.0.0",
|
||||||
"@semantic-release/npm": "^10.0.2",
|
"@semantic-release/npm": "^11.0.0",
|
||||||
"@semantic-release/release-notes-generator": "^11.0.0",
|
"@semantic-release/release-notes-generator": "^12.0.0",
|
||||||
"aggregate-error": "^5.0.0",
|
"aggregate-error": "^5.0.0",
|
||||||
"cosmiconfig": "^8.0.0",
|
"cosmiconfig": "^8.0.0",
|
||||||
"debug": "^4.0.0",
|
"debug": "^4.0.0",
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
"hosted-git-info": "^7.0.0",
|
"hosted-git-info": "^7.0.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"marked": "^5.0.0",
|
"marked": "^5.0.0",
|
||||||
"marked-terminal": "^5.1.1",
|
"marked-terminal": "^6.0.0",
|
||||||
"micromatch": "^4.0.2",
|
"micromatch": "^4.0.2",
|
||||||
"p-each-series": "^3.0.0",
|
"p-each-series": "^3.0.0",
|
||||||
"p-reduce": "^3.0.0",
|
"p-reduce": "^3.0.0",
|
||||||
@@ -72,11 +73,12 @@
|
|||||||
"sinon": "16.0.0",
|
"sinon": "16.0.0",
|
||||||
"stream-buffers": "3.0.2",
|
"stream-buffers": "3.0.2",
|
||||||
"tempy": "3.1.0",
|
"tempy": "3.1.0",
|
||||||
"testdouble": "3.18.0"
|
"testdouble": "3.19.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": "^18.17 || >=20.6.1"
|
||||||
},
|
},
|
||||||
|
"exports": "./index.js",
|
||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"bin",
|
||||||
"docs",
|
"docs",
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
"version"
|
"version"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "index.js",
|
"main": "./index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"c8": {
|
"c8": {
|
||||||
"include": [
|
"include": [
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export async function initGit(withRemote) {
|
|||||||
*
|
*
|
||||||
* @param {Boolean} withRemote `true` to create a shallow clone of a bare repository.
|
* @param {Boolean} withRemote `true` to create a shallow clone of a bare repository.
|
||||||
* @param {String} [branch='master'] The branch to initialize.
|
* @param {String} [branch='master'] The branch to initialize.
|
||||||
* @return {String} The path of the clone if `withRemote` is `true`, the path of the repository otherwise.
|
* @return {Promise<Object>} The path of the clone if `withRemote` is `true`, the path of the repository otherwise.
|
||||||
*/
|
*/
|
||||||
export async function gitRepo(withRemote, branch = "master") {
|
export async function gitRepo(withRemote, branch = "master") {
|
||||||
let { cwd, repositoryUrl } = await initGit(withRemote);
|
let { cwd, repositoryUrl } = await initGit(withRemote);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ let env;
|
|||||||
|
|
||||||
// Environment variables used only for the local npm command used to do verification
|
// Environment variables used only for the local npm command used to do verification
|
||||||
const npmTestEnv = {
|
const npmTestEnv = {
|
||||||
...process.env,
|
...processEnvWithoutGitHubActionsVariables,
|
||||||
...npmRegistry.authEnv(),
|
...npmRegistry.authEnv(),
|
||||||
npm_config_registry: npmRegistry.url,
|
npm_config_registry: npmRegistry.url,
|
||||||
};
|
};
|
||||||
@@ -516,8 +516,8 @@ test("Pass options via CLI arguments", async (t) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("Run via JS API", async (t) => {
|
test("Run via JS API", async (t) => {
|
||||||
td.replace("../lib/logger", { log: () => {}, error: () => {}, stdout: () => {} });
|
await td.replaceEsm("../lib/logger", null, { log: () => {}, error: () => {}, stdout: () => {} });
|
||||||
td.replace("env-ci", () => ({ isCi: true, branch: "master", isPr: false }));
|
await td.replaceEsm("env-ci", null, () => ({ isCi: true, branch: "master", isPr: false }));
|
||||||
const semanticRelease = (await import("../index.js")).default;
|
const semanticRelease = (await import("../index.js")).default;
|
||||||
const packageName = "test-js-api";
|
const packageName = "test-js-api";
|
||||||
const owner = "git";
|
const owner = "git";
|
||||||
|
|||||||
Reference in New Issue
Block a user