Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb45d27726 | ||
|
|
f914c1ed86 | ||
|
|
c4da008e29 | ||
|
|
b707475b85 | ||
|
|
b9579349ca | ||
|
|
4b74f005c4 | ||
|
|
bbb5e5ade6 | ||
|
|
a1e0467f04 | ||
|
|
b9b5c7689f | ||
|
|
91bcb6b988 | ||
|
|
0716d62fd1 | ||
|
|
caa8b95f7b | ||
|
|
097351304e | ||
|
|
fa241a2a06 | ||
|
|
ba05e08303 | ||
|
|
eddbbb812b | ||
|
|
aa0c9d6a75 | ||
|
|
7365012002 |
@@ -1,6 +1,6 @@
|
||||
# Node version requirement
|
||||
|
||||
**semantic-release** is written using the latest [ECMAScript 2017](https://www.ecma-international.org/publications/standards/Ecma-262.htm) features, without transpilation which **requires Node version 14.17 or higher**.
|
||||
**semantic-release** is written using the latest [ECMAScript 2017](https://www.ecma-international.org/publications/standards/Ecma-262.htm) features, without transpilation which **requires Node version 18.0.0 or higher**.
|
||||
|
||||
**semantic-release** is meant to be used in a CI environment as a development support tool, not as a production dependency.
|
||||
Therefore, the only constraint is to run the `semantic-release` in a CI environment providing version of Node that meets our version requirement.
|
||||
|
||||
Generated
+1003
-378
File diff suppressed because it is too large
Load Diff
+7
-10
@@ -32,7 +32,7 @@
|
||||
"@semantic-release/npm": "^9.0.0",
|
||||
"@semantic-release/release-notes-generator": "^10.0.0",
|
||||
"aggregate-error": "^4.0.1",
|
||||
"cosmiconfig": "^7.0.0",
|
||||
"cosmiconfig": "^8.0.0",
|
||||
"debug": "^4.0.0",
|
||||
"env-ci": "^8.0.0",
|
||||
"execa": "^6.1.0",
|
||||
@@ -41,7 +41,7 @@
|
||||
"get-stream": "^6.0.0",
|
||||
"git-log-parser": "^1.2.0",
|
||||
"hook-std": "^3.0.0",
|
||||
"hosted-git-info": "^5.1.0",
|
||||
"hosted-git-info": "^6.0.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"marked": "^4.1.0",
|
||||
"marked-terminal": "^5.1.1",
|
||||
@@ -51,32 +51,29 @@
|
||||
"read-pkg-up": "^9.1.0",
|
||||
"resolve-from": "^5.0.0",
|
||||
"semver": "^7.3.2",
|
||||
"semver-diff": "^3.1.1",
|
||||
"semver-diff": "^4.0.0",
|
||||
"signale": "^1.2.1",
|
||||
"yargs": "^17.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "4.3.3",
|
||||
"ava": "5.1.0",
|
||||
"c8": "7.12.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": "^10.1.0",
|
||||
"fs-extra": "^11.0.0",
|
||||
"got": "^12.5.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"mockserver-client": "5.14.0",
|
||||
"nock": "13.2.9",
|
||||
"p-retry": "^5.1.1",
|
||||
"prettier": "^2.7.1",
|
||||
"sinon": "14.0.0",
|
||||
"sinon": "15.0.1",
|
||||
"stream-buffers": "3.0.2",
|
||||
"tempy": "^3.0.0",
|
||||
"testdouble": "3.16.6"
|
||||
},
|
||||
"overrides": {
|
||||
"semantic-release": "20.0.0-beta.1"
|
||||
"testdouble": "3.16.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
||||
@@ -6,7 +6,7 @@ import got from 'got';
|
||||
import delay from 'delay';
|
||||
import pRetry from 'p-retry';
|
||||
|
||||
const IMAGE = 'verdaccio/verdaccio:4';
|
||||
const IMAGE = 'verdaccio/verdaccio:5';
|
||||
const REGISTRY_PORT = 4873;
|
||||
const REGISTRY_HOST = 'localhost';
|
||||
const NPM_USERNAME = 'integration';
|
||||
@@ -14,7 +14,7 @@ const NPM_PASSWORD = 'suchsecure';
|
||||
const NPM_EMAIL = 'integration@test.com';
|
||||
const docker = new Docker();
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
let container;
|
||||
let container, npmToken;
|
||||
|
||||
/**
|
||||
* Download the `npm-registry-docker` Docker image, create a new container and start it.
|
||||
@@ -55,16 +55,23 @@ export async function start() {
|
||||
email: NPM_EMAIL,
|
||||
},
|
||||
});
|
||||
|
||||
// Create token for user
|
||||
({token: npmToken} = await got(`http://${REGISTRY_HOST}:${REGISTRY_PORT}/-/npm/v1/tokens`, {
|
||||
username: NPM_USERNAME,
|
||||
password: NPM_PASSWORD,
|
||||
method: 'POST',
|
||||
headers: {'content-type': 'application/json'},
|
||||
json: {password: NPM_PASSWORD, readonly: false, cidr_whitelist: []}
|
||||
}).json());
|
||||
}
|
||||
|
||||
export const url = `http://${REGISTRY_HOST}:${REGISTRY_PORT}/`;
|
||||
|
||||
export const authEnv = {
|
||||
export const authEnv = () => ({
|
||||
npm_config_registry: url, // eslint-disable-line camelcase
|
||||
NPM_USERNAME,
|
||||
NPM_PASSWORD,
|
||||
NPM_EMAIL,
|
||||
};
|
||||
NPM_TOKEN: npmToken,
|
||||
});
|
||||
|
||||
/**
|
||||
* Stop and remote the `npm-registry-docker` Docker container.
|
||||
|
||||
+13
-12
@@ -31,23 +31,13 @@ const { readJson, writeJson } = fsExtra;
|
||||
|
||||
// Environment variables used with semantic-release cli (similar to what a user would setup)
|
||||
const { GITHUB_ACTION, GITHUB_ACTIONS, GITHUB_TOKEN, ...processEnvWithoutGitHubActionsVariables } = process.env;
|
||||
const env = {
|
||||
...processEnvWithoutGitHubActionsVariables,
|
||||
...npmRegistry.authEnv,
|
||||
CI: "true",
|
||||
GH_TOKEN: gitbox.gitCredential,
|
||||
TRAVIS: "true",
|
||||
TRAVIS_BRANCH: "master",
|
||||
TRAVIS_PULL_REQUEST: "false",
|
||||
GITHUB_API_URL: mockServer.url,
|
||||
};
|
||||
let env;
|
||||
|
||||
// Environment variables used only for the local npm command used to do verification
|
||||
const npmTestEnv = {
|
||||
...process.env,
|
||||
...npmRegistry.authEnv,
|
||||
...npmRegistry.authEnv(),
|
||||
npm_config_registry: npmRegistry.url,
|
||||
LEGACY_TOKEN: Buffer.from(`${env.NPM_USERNAME}:${env.NPM_PASSWORD}`, "utf8").toString("base64"),
|
||||
};
|
||||
|
||||
const cli = path.resolve("./bin/semantic-release.js");
|
||||
@@ -57,6 +47,17 @@ const pluginLogEnv = path.resolve("./test/fixtures/plugin-log-env");
|
||||
|
||||
test.before(async () => {
|
||||
await Promise.all([gitbox.start(), npmRegistry.start(), mockServer.start()]);
|
||||
|
||||
env = {
|
||||
...processEnvWithoutGitHubActionsVariables,
|
||||
...npmRegistry.authEnv(),
|
||||
CI: "true",
|
||||
GH_TOKEN: gitbox.gitCredential,
|
||||
TRAVIS: "true",
|
||||
TRAVIS_BRANCH: "master",
|
||||
TRAVIS_PULL_REQUEST: "false",
|
||||
GITHUB_API_URL: mockServer.url,
|
||||
};
|
||||
});
|
||||
|
||||
test.after.always(async () => {
|
||||
|
||||
Reference in New Issue
Block a user