semantic-release-vsce 5.2.0 → 5.2.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.
@@ -22,7 +22,7 @@ jobs:
22
22
 
23
23
  steps:
24
24
  - uses: actions/checkout@v3
25
- - uses: volta-cli/action@v3.0.2
25
+ - uses: volta-cli/action@v4.0.0
26
26
  with:
27
27
  node-version: ${{ matrix.node-version }}
28
28
  - run: npm ci
@@ -35,7 +35,7 @@ jobs:
35
35
 
36
36
  steps:
37
37
  - uses: actions/checkout@v3
38
- - uses: volta-cli/action@v3.0.2
38
+ - uses: volta-cli/action@v4.0.0
39
39
  - run: npm ci
40
40
  - run: npm run release
41
41
  env:
package/lib/prepare.js CHANGED
@@ -22,7 +22,7 @@ module.exports = async (version, packageVsix, logger) => {
22
22
 
23
23
  const options = ['package', version, '--no-git-tag-version', '--out', packagePath];
24
24
 
25
- await execa('vsce', options, { stdio: 'inherit' });
25
+ await execa('vsce', options, { stdio: 'inherit', preferLocal: true });
26
26
 
27
27
  return packagePath;
28
28
  }
package/lib/publish.js CHANGED
@@ -15,7 +15,7 @@ module.exports = async (version, packagePath, logger) => {
15
15
  options.push(...[version, '--no-git-tag-version']);
16
16
  }
17
17
 
18
- await execa('vsce', options, { stdio: 'inherit' });
18
+ await execa('vsce', options, { stdio: 'inherit', preferLocal: true });
19
19
 
20
20
  const vsceUrl = `https://marketplace.visualstudio.com/items?itemName=${publisher}.${name}`;
21
21
  logger.log(`The new version is available at ${vsceUrl}.`);
@@ -28,7 +28,7 @@ module.exports = async (version, packagePath, logger) => {
28
28
  if (isOvsxEnabled()) {
29
29
  logger.log('Now publishing to OpenVSX');
30
30
 
31
- await execa('ovsx', ['publish', packagePath], { stdio: 'inherit' });
31
+ await execa('ovsx', ['publish', packagePath], { stdio: 'inherit', preferLocal: true });
32
32
  const ovsxUrl = `https://open-vsx.org/extension/${publisher}/${name}/${version}`;
33
33
 
34
34
  logger.log(`The new ovsx version is available at ${ovsxUrl}`);
@@ -9,7 +9,7 @@ module.exports = async (logger) => {
9
9
  }
10
10
 
11
11
  try {
12
- await execa('vsce', ['verify-pat']);
12
+ await execa('vsce', ['verify-pat'], { preferLocal: true });
13
13
  } catch (e) {
14
14
  throw new SemanticReleaseError(`Invalid vsce token. Additional information:\n\n${e}`, 'EINVALIDVSCETOKEN');
15
15
  }
@@ -18,7 +18,7 @@ module.exports = async (logger) => {
18
18
 
19
19
  // TODO: waiting for https://github.com/eclipse/openvsx/issues/313
20
20
  // try {
21
- // await execa('ovsx', ['verify-pat']);
21
+ // await execa('ovsx', ['verify-pat'], { preferLocal: true });
22
22
  // } catch (e) {
23
23
  // throw new SemanticReleaseError(`Invalid ovsx personal access token. Additional information:\n\n${e}`, 'EINVALIDOVSXPAT');
24
24
  // }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semantic-release-vsce",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "description": "semantic-release plugin to package and publish VS Code extensions",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -40,7 +40,7 @@ test('packageVsix is a string', async t => {
40
40
  const result = await prepare(version, packageVsix, logger);
41
41
 
42
42
  t.deepEqual(result, packagePath);
43
- t.deepEqual(execaStub.getCall(0).args, ['vsce', ['package', version, '--no-git-tag-version', '--out', packagePath], { stdio: 'inherit' }]);
43
+ t.deepEqual(execaStub.getCall(0).args, ['vsce', ['package', version, '--no-git-tag-version', '--out', packagePath], { stdio: 'inherit', preferLocal: true }]);
44
44
  });
45
45
 
46
46
  test('packageVsix is true', async t => {
@@ -63,7 +63,7 @@ test('packageVsix is true', async t => {
63
63
  const result = await prepare(version, packageVsix, logger);
64
64
 
65
65
  t.deepEqual(result, packagePath);
66
- t.deepEqual(execaStub.getCall(0).args, ['vsce', ['package', version, '--no-git-tag-version', '--out', packagePath], { stdio: 'inherit' }]);
66
+ t.deepEqual(execaStub.getCall(0).args, ['vsce', ['package', version, '--no-git-tag-version', '--out', packagePath], { stdio: 'inherit', preferLocal: true }]);
67
67
  });
68
68
 
69
69
  test('packageVsix is not set but OVSX_PAT is', async t => {
@@ -90,5 +90,5 @@ test('packageVsix is not set but OVSX_PAT is', async t => {
90
90
  const result = await prepare(version, packageVsix, logger);
91
91
 
92
92
  t.deepEqual(result, packagePath);
93
- t.deepEqual(execaStub.getCall(0).args, ['vsce', ['package', version, '--no-git-tag-version', '--out', packagePath], { stdio: 'inherit' }]);
93
+ t.deepEqual(execaStub.getCall(0).args, ['vsce', ['package', version, '--no-git-tag-version', '--out', packagePath], { stdio: 'inherit', preferLocal: true }]);
94
94
  });
@@ -41,7 +41,7 @@ test('publish', async t => {
41
41
  name: 'Visual Studio Marketplace',
42
42
  url: `https://marketplace.visualstudio.com/items?itemName=${publisher}.${name}`
43
43
  });
44
- t.deepEqual(execaStub.getCall(0).args, ['vsce', ['publish', version, '--no-git-tag-version'], { stdio: 'inherit' }]);
44
+ t.deepEqual(execaStub.getCall(0).args, ['vsce', ['publish', version, '--no-git-tag-version'], { stdio: 'inherit', preferLocal: true }]);
45
45
  });
46
46
 
47
47
  test('publish with packagePath', async t => {
@@ -70,7 +70,7 @@ test('publish with packagePath', async t => {
70
70
  name: 'Visual Studio Marketplace',
71
71
  url: `https://marketplace.visualstudio.com/items?itemName=${publisher}.${name}`
72
72
  });
73
- t.deepEqual(execaStub.getCall(0).args, ['vsce', ['publish', '--packagePath', packagePath], { stdio: 'inherit' }]);
73
+ t.deepEqual(execaStub.getCall(0).args, ['vsce', ['publish', '--packagePath', packagePath], { stdio: 'inherit', preferLocal: true }]);
74
74
  });
75
75
 
76
76
  test('publish to OpenVSX', async t => {
@@ -100,11 +100,11 @@ test('publish to OpenVSX', async t => {
100
100
  name: 'Visual Studio Marketplace',
101
101
  url: `https://marketplace.visualstudio.com/items?itemName=${publisher}.${name}`
102
102
  });
103
- t.deepEqual(execaStub.getCall(0).args, ['vsce', ['publish', '--packagePath', packagePath], { stdio: 'inherit' }]);
103
+ t.deepEqual(execaStub.getCall(0).args, ['vsce', ['publish', '--packagePath', packagePath], { stdio: 'inherit', preferLocal: true }]);
104
104
 
105
105
  // t.deepEqual(result[1], {
106
106
  // name: 'Open VSX Registry',
107
107
  // url: `https://open-vsx.org/extension/${publisher}/${name}/${version}`
108
108
  // });
109
- t.deepEqual(execaStub.getCall(1).args, ['ovsx', ['publish', packagePath], { stdio: 'inherit' }]);
109
+ t.deepEqual(execaStub.getCall(1).args, ['ovsx', ['publish', packagePath], { stdio: 'inherit', preferLocal: true }]);
110
110
  });
@@ -13,7 +13,7 @@ test('VSCE_PAT is set', async t => {
13
13
  });
14
14
 
15
15
  const verifyAuth = proxyquire('../lib/verify-auth', {
16
- execa: sinon.stub().withArgs('vsce', ['verify-pat']).resolves()
16
+ execa: sinon.stub().withArgs('vsce', ['verify-pat'], { preferLocal: true }).resolves()
17
17
  });
18
18
 
19
19
  await t.notThrowsAsync(() => verifyAuth(logger));
@@ -23,7 +23,7 @@ test('VSCE_PAT is not set', async t => {
23
23
  sinon.stub(process, 'env').value({});
24
24
 
25
25
  const verifyAuth = proxyquire('../lib/verify-auth', {
26
- execa: sinon.stub().withArgs('vsce', ['verify-pat']).resolves()
26
+ execa: sinon.stub().withArgs('vsce', ['verify-pat'], { preferLocal: true }).resolves()
27
27
  });
28
28
 
29
29
  await t.throwsAsync(() => verifyAuth(logger), { instanceOf: SemanticReleaseError, code: 'ENOVSCEPAT' });
@@ -35,7 +35,7 @@ test('VSCE_PAT is valid', async t => {
35
35
  });
36
36
 
37
37
  const verifyAuth = proxyquire('../lib/verify-auth', {
38
- execa: sinon.stub().withArgs('vsce', ['verify-pat']).resolves()
38
+ execa: sinon.stub().withArgs('vsce', ['verify-pat'], { preferLocal: true }).resolves()
39
39
  });
40
40
 
41
41
  await t.notThrowsAsync(() => verifyAuth(logger));
@@ -47,7 +47,7 @@ test('VSCE_PAT is invalid', async t => {
47
47
  });
48
48
 
49
49
  const verifyAuth = proxyquire('../lib/verify-auth', {
50
- execa: sinon.stub().withArgs('vsce', ['verify-pat']).rejects()
50
+ execa: sinon.stub().withArgs('vsce', ['verify-pat'], { preferLocal: true }).rejects()
51
51
  });
52
52
 
53
53
  await t.throwsAsync(() => verifyAuth(logger), { instanceOf: SemanticReleaseError, code: 'EINVALIDVSCETOKEN' });