release-it 15.9.1 → 15.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +5 -2
- package/lib/plugin/npm/npm.js +3 -1
- package/package.json +5 -4
- package/test/npm.js +1 -1
package/lib/index.js
CHANGED
|
@@ -6,7 +6,6 @@ import Shell from './shell.js';
|
|
|
6
6
|
import Prompt from './prompt.js';
|
|
7
7
|
import Spinner from './spinner.js';
|
|
8
8
|
import { reduceUntil, parseVersion } from './util.js';
|
|
9
|
-
import Plugin from './plugin/Plugin.js';
|
|
10
9
|
|
|
11
10
|
const runTasks = async (opts, di) => {
|
|
12
11
|
let container = {};
|
|
@@ -138,4 +137,8 @@ const runTasks = async (opts, di) => {
|
|
|
138
137
|
|
|
139
138
|
export default runTasks;
|
|
140
139
|
|
|
141
|
-
|
|
140
|
+
/** @public */
|
|
141
|
+
export { default as Config } from './config.js';
|
|
142
|
+
|
|
143
|
+
/** @public */
|
|
144
|
+
export { default as Plugin } from './plugin/Plugin.js';
|
package/lib/plugin/npm/npm.js
CHANGED
|
@@ -238,11 +238,13 @@ class npm extends Plugin {
|
|
|
238
238
|
const { private: isPrivate, tag = DEFAULT_TAG } = this.getContext();
|
|
239
239
|
const otpArg = otp ? `--otp ${otp}` : '';
|
|
240
240
|
const dryRunArg = this.config.isDryRun ? '--dry-run' : '';
|
|
241
|
+
const registry = this.getRegistry();
|
|
242
|
+
const registryArg = registry ? `--registry ${registry}` : '';
|
|
241
243
|
if (isPrivate) {
|
|
242
244
|
this.log.warn('Skip publish: package is private.');
|
|
243
245
|
return false;
|
|
244
246
|
}
|
|
245
|
-
const args = [publishPath, `--tag ${tag}`, otpArg, dryRunArg, ...fixArgs(publishArgs)].filter(Boolean);
|
|
247
|
+
const args = [publishPath, `--tag ${tag}`, otpArg, dryRunArg, registryArg, ...fixArgs(publishArgs)].filter(Boolean);
|
|
246
248
|
return this.exec(`npm publish ${args.join(' ')}`, { options })
|
|
247
249
|
.then(() => {
|
|
248
250
|
this.setContext({ isReleased: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-it",
|
|
3
|
-
"version": "15.9.
|
|
3
|
+
"version": "15.9.2",
|
|
4
4
|
"description": "Generic CLI tool to automate versioning and package publishing related tasks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
],
|
|
50
50
|
"scripts": {
|
|
51
51
|
"lint": "eslint lib test",
|
|
52
|
+
"knip": "knip",
|
|
52
53
|
"format": "prettier --write \"{lib,test}/**/*.js\"",
|
|
53
54
|
"test": "ava --no-worker-threads",
|
|
54
55
|
"release": "./bin/release-it.js"
|
|
@@ -75,7 +76,7 @@
|
|
|
75
76
|
"new-github-release-url": "2.0.0",
|
|
76
77
|
"node-fetch": "3.3.1",
|
|
77
78
|
"open": "9.0.0",
|
|
78
|
-
"ora": "6.
|
|
79
|
+
"ora": "6.3.0",
|
|
79
80
|
"os-name": "5.1.0",
|
|
80
81
|
"promise.allsettled": "1.0.6",
|
|
81
82
|
"proxy-agent": "5.0.0",
|
|
@@ -94,11 +95,11 @@
|
|
|
94
95
|
"eslint-plugin-ava": "14.0.0",
|
|
95
96
|
"eslint-plugin-import": "2.27.5",
|
|
96
97
|
"eslint-plugin-prettier": "4.2.1",
|
|
98
|
+
"knip": "2.1.1",
|
|
97
99
|
"mock-fs": "5.2.0",
|
|
98
100
|
"mock-stdio": "1.0.3",
|
|
99
101
|
"nock": "13.3.0",
|
|
100
|
-
"
|
|
101
|
-
"prettier": "2.8.6",
|
|
102
|
+
"prettier": "2.8.7",
|
|
102
103
|
"sinon": "15.0.2",
|
|
103
104
|
"strip-ansi": "7.0.1"
|
|
104
105
|
},
|
package/test/npm.js
CHANGED
|
@@ -328,7 +328,7 @@ test('should publish to a different/scoped registry', async t => {
|
|
|
328
328
|
'npm show @my-scope/my-pkg@latest version --registry https://gitlab.com/api/v4/projects/my-scope%2Fmy-pkg/packages/npm/',
|
|
329
329
|
'npm --version',
|
|
330
330
|
'npm version 1.0.1 --no-git-tag-version',
|
|
331
|
-
'npm publish . --tag latest'
|
|
331
|
+
'npm publish . --tag latest --registry https://gitlab.com/api/v4/projects/my-scope%2Fmy-pkg/packages/npm/'
|
|
332
332
|
]);
|
|
333
333
|
|
|
334
334
|
exec.restore();
|