release-it 16.1.2 → 16.1.4

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.
Files changed (2) hide show
  1. package/package.json +13 -12
  2. package/test/npm.js +15 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-it",
3
- "version": "16.1.2",
3
+ "version": "16.1.4",
4
4
  "description": "Generic CLI tool to automate versioning and package publishing-related tasks.",
5
5
  "keywords": [
6
6
  "build",
@@ -66,22 +66,22 @@
66
66
  "async-retry": "1.3.3",
67
67
  "chalk": "5.3.0",
68
68
  "cosmiconfig": "8.2.0",
69
- "execa": "7.1.1",
69
+ "execa": "7.2.0",
70
70
  "git-url-parse": "13.1.0",
71
71
  "globby": "13.2.2",
72
72
  "got": "13.0.0",
73
- "inquirer": "9.2.8",
73
+ "inquirer": "9.2.10",
74
74
  "is-ci": "3.0.1",
75
75
  "issue-parser": "6.0.0",
76
76
  "lodash": "4.17.21",
77
77
  "mime-types": "2.1.35",
78
78
  "new-github-release-url": "2.0.0",
79
- "node-fetch": "3.3.1",
79
+ "node-fetch": "3.3.2",
80
80
  "open": "9.1.0",
81
- "ora": "6.3.1",
81
+ "ora": "7.0.1",
82
82
  "os-name": "5.1.0",
83
83
  "promise.allsettled": "1.0.6",
84
- "proxy-agent": "6.2.2",
84
+ "proxy-agent": "6.3.0",
85
85
  "semver": "7.5.4",
86
86
  "shelljs": "0.8.5",
87
87
  "update-notifier": "6.0.2",
@@ -92,16 +92,17 @@
92
92
  "devDependencies": {
93
93
  "@octokit/request-error": "3.0.3",
94
94
  "ava": "5.3.1",
95
- "eslint": "8.45.0",
96
- "eslint-config-prettier": "8.8.0",
95
+ "eslint": "8.46.0",
96
+ "eslint-config-prettier": "9.0.0",
97
97
  "eslint-plugin-ava": "14.0.0",
98
- "eslint-plugin-import": "2.27.5",
98
+ "eslint-plugin-import": "2.28.0",
99
99
  "eslint-plugin-prettier": "5.0.0",
100
- "knip": "2.15.5",
101
- "mock-fs": "5.2.0",
100
+ "fs-monkey": "1.0.4",
101
+ "knip": "2.19.1",
102
+ "memfs": "4.2.1",
102
103
  "mock-stdio": "1.0.3",
103
104
  "nock": "13.3.2",
104
- "prettier": "3.0.0",
105
+ "prettier": "3.0.1",
105
106
  "remark-cli": "11.0.0",
106
107
  "remark-preset-webpro": "0.0.3",
107
108
  "sinon": "15.2.0",
package/test/npm.js CHANGED
@@ -1,11 +1,21 @@
1
1
  import path from 'node:path';
2
+ import { patchFs } from 'fs-monkey';
2
3
  import test from 'ava';
3
4
  import sinon from 'sinon';
4
- import mock from 'mock-fs';
5
+ import { vol } from 'memfs';
5
6
  import npm from '../lib/plugin/npm/npm.js';
6
7
  import { factory, runTasks } from './util/index.js';
7
8
  import { getArgs } from './util/helpers.js';
8
9
 
10
+ const mockFs = volume => {
11
+ vol.fromJSON(volume);
12
+ const unpatch = patchFs(vol);
13
+ return () => {
14
+ vol.reset();
15
+ unpatch();
16
+ };
17
+ };
18
+
9
19
  test('should return npm package url', t => {
10
20
  const options = { npm: { name: 'my-cool-package' } };
11
21
  const npmClient = factory(npm, { options });
@@ -315,7 +325,7 @@ test('should skip checks', async t => {
315
325
  });
316
326
 
317
327
  test('should publish to a different/scoped registry', async t => {
318
- mock({
328
+ const resetFs = mockFs({
319
329
  [path.resolve('package.json')]: JSON.stringify({
320
330
  name: '@my-scope/my-pkg',
321
331
  version: '1.0.0',
@@ -349,10 +359,11 @@ test('should publish to a different/scoped registry', async t => {
349
359
  ]);
350
360
 
351
361
  exec.restore();
362
+ resetFs();
352
363
  });
353
364
 
354
365
  test('should not publish when `npm version` fails', async t => {
355
- mock({
366
+ const resetFs = mockFs({
356
367
  [path.resolve('package.json')]: JSON.stringify({
357
368
  name: '@my-scope/my-pkg',
358
369
  version: '1.0.0'
@@ -384,6 +395,7 @@ test('should not publish when `npm version` fails', async t => {
384
395
  ]);
385
396
 
386
397
  exec.restore();
398
+ resetFs();
387
399
  });
388
400
 
389
401
  test('should add allow-same-version argument', async t => {