semantic-release-vsce 5.7.4 → 6.0.1

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/README.md CHANGED
@@ -96,11 +96,12 @@ The directory of the extension relative to the current working directory. Defaul
96
96
 
97
97
  The following environment variables are supported by this plugin:
98
98
 
99
- | Variable | Description |
100
- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
101
- | `OVSX_PAT` | _Optional_. The personal access token to push to Open VSX Registry |
102
- | `VSCE_PAT` | _Optional_. The personal access token to publish to Visual Studio Marketplace |
103
- | `VSCE_TARGET` | _Optional_. The target to use when packaging or publishing the extension (used as `vsce package --target ${VSCE_TARGET}`). When set to `universal`, behave as if `VSCE_TARGET` was not set (i.e. build the universal/generic `vsix`). See [the platform-specific example](#platform-specific-on-github-actions) |
99
+ | Variable | Description |
100
+ | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
101
+ | `OVSX_PAT` | _Optional_. The personal access token to push to Open VSX Registry |
102
+ | `VSCE_PAT` | _Optional_. The personal access token to publish to Visual Studio Marketplace. _Note:_ Cannot be set at the same time as `VSCE_AZURE_CREDENTIAL`. |
103
+ | `VSCE_AZURE_CREDENTIAL` | _Optional_. When set to `true` or `1`, `vsce` will use the `--azure-credential` flag to authenticate. _Note:_ Cannot be set at the same time as `VSCE_PAT`. |
104
+ | `VSCE_TARGET` | _Optional_. The target to use when packaging or publishing the extension (used as `vsce package --target ${VSCE_TARGET}`). When set to `universal`, behave as if `VSCE_TARGET` was not set (i.e. build the universal/generic `vsix`). See [the platform-specific example](#platform-specific-on-github-actions) |
104
105
 
105
106
  ### Configuring `vsce`
106
107
 
@@ -193,7 +194,10 @@ jobs:
193
194
 
194
195
  ```js
195
196
  // package.release.config.js
196
- module.exports = {
197
+ /**
198
+ * @type {import('semantic-release').GlobalConfig}
199
+ */
200
+ export default {
197
201
  plugins: [
198
202
  '@semantic-release/commit-analyzer',
199
203
  '@semantic-release/release-notes-generator',
@@ -213,7 +217,10 @@ jobs:
213
217
 
214
218
  ```js
215
219
  // publish.release.config.js
216
- module.exports = {
220
+ /**
221
+ * @type {import('semantic-release').GlobalConfig}
222
+ */
223
+ export default {
217
224
  plugins: [
218
225
  '@semantic-release/commit-analyzer',
219
226
  '@semantic-release/release-notes-generator',
@@ -254,9 +261,6 @@ jobs:
254
261
  - os: windows-latest
255
262
  target: win32-x64
256
263
  npm_config_arch: x64
257
- - os: windows-latest
258
- target: win32-ia32
259
- npm_config_arch: ia32
260
264
  - os: windows-latest
261
265
  target: win32-arm64
262
266
  npm_config_arch: arm
@@ -336,4 +340,37 @@ jobs:
336
340
  OVSX_PAT: ${{ secrets.OVSX_PAT }}
337
341
  ```
338
342
 
343
+ ### GitHub Actions - Release to VS Marketplace with Azure credentials
344
+
345
+ ```yaml
346
+ name: release
347
+
348
+ on:
349
+ push:
350
+ branches: [master]
351
+
352
+ jobs:
353
+ release:
354
+ runs-on: ubuntu-latest
355
+ steps:
356
+ - uses: actions/checkout@v3
357
+ - uses: actions/setup-node@v3
358
+ with:
359
+ node-version: 16
360
+ - run: npm ci
361
+
362
+ # Log into Azure CLI to get VSCE credentials
363
+ - name: Azure login
364
+ uses: azure/login@v2
365
+ with:
366
+ client-id: ${{ secrets.AZURE_CLIENT_ID }}
367
+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}
368
+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
369
+
370
+ - run: npx semantic-release
371
+ env:
372
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
373
+ VSCE_AZURE_CREDENTIAL: 'true'
374
+ ```
375
+
339
376
  A reference implementation can also be found in the [VS Code ShellCheck extension](https://github.com/vscode-shellcheck/vscode-shellcheck/pull/805).
package/index.js CHANGED
@@ -1,27 +1,27 @@
1
1
  // @ts-check
2
2
 
3
- const path = require('path');
4
- const verifyVsce = require('./lib/verify');
5
- const vscePublish = require('./lib/publish');
6
- const vscePrepare = require('./lib/prepare');
3
+ import { join } from 'node:path';
4
+ import { prepare as vscePrepare } from './lib/prepare.js';
5
+ import { publish as vscePublish } from './lib/publish.js';
6
+ import { verify as vsceVerify } from './lib/verify.js';
7
7
 
8
8
  let verified = false;
9
9
  let prepared = false;
10
10
  let packagePath;
11
11
 
12
- async function verifyConditions(pluginConfig, { logger, cwd }) {
12
+ export async function verifyConditions(pluginConfig, { logger, cwd }) {
13
13
  cwd = getPackageRoot(pluginConfig, cwd);
14
- await verifyVsce(pluginConfig, { logger, cwd });
14
+ await vsceVerify(pluginConfig, { logger, cwd });
15
15
  verified = true;
16
16
  }
17
17
 
18
- async function prepare(
18
+ export async function prepare(
19
19
  pluginConfig,
20
20
  { nextRelease: { version }, logger, cwd },
21
21
  ) {
22
22
  cwd = getPackageRoot(pluginConfig, cwd);
23
23
  if (!verified) {
24
- await verifyVsce(pluginConfig, { logger, cwd });
24
+ await vsceVerify(pluginConfig, { logger, cwd });
25
25
  verified = true;
26
26
  }
27
27
  packagePath = await vscePrepare(
@@ -33,13 +33,13 @@ async function prepare(
33
33
  prepared = true;
34
34
  }
35
35
 
36
- async function publish(
36
+ export async function publish(
37
37
  pluginConfig,
38
38
  { nextRelease: { version }, logger, cwd },
39
39
  ) {
40
40
  cwd = getPackageRoot(pluginConfig, cwd);
41
41
  if (!verified) {
42
- await verifyVsce(pluginConfig, { logger, cwd });
42
+ await vsceVerify(pluginConfig, { logger, cwd });
43
43
  verified = true;
44
44
  }
45
45
 
@@ -60,21 +60,13 @@ async function publish(
60
60
 
61
61
  if (pluginConfig?.publishPackagePath) {
62
62
  // Expand glob
63
- const globSync = require('glob').glob.sync;
64
- packagePath = globSync(pluginConfig.publishPackagePath, { cwd });
63
+ const glob = (await import('glob')).glob;
64
+ packagePath = await glob(pluginConfig.publishPackagePath, { cwd });
65
65
  }
66
66
 
67
67
  return vscePublish(version, packagePath, logger, cwd);
68
68
  }
69
69
 
70
70
  function getPackageRoot(pluginConfig, cwd) {
71
- return pluginConfig.packageRoot
72
- ? path.join(cwd, pluginConfig.packageRoot)
73
- : cwd;
71
+ return pluginConfig.packageRoot ? join(cwd, pluginConfig.packageRoot) : cwd;
74
72
  }
75
-
76
- module.exports = {
77
- verifyConditions,
78
- prepare,
79
- publish,
80
- };
package/lib/prepare.js CHANGED
@@ -1,11 +1,12 @@
1
1
  // @ts-check
2
2
 
3
- const execa = require('execa');
4
- const { readJson } = require('fs-extra');
5
- const path = require('path');
6
- const { isOvsxPublishEnabled, isTargetEnabled } = require('./utils');
3
+ import { execa } from 'execa';
4
+ import { readJson } from 'fs-extra/esm';
5
+ import { join } from 'node:path';
6
+ import process from 'node:process';
7
+ import { isOvsxPublishEnabled, isTargetEnabled } from './utils.js';
7
8
 
8
- module.exports = async (version, packageVsix, logger, cwd) => {
9
+ export async function prepare(version, packageVsix, logger, cwd) {
9
10
  if (packageVsix === false) {
10
11
  return;
11
12
  }
@@ -24,7 +25,7 @@ module.exports = async (version, packageVsix, logger, cwd) => {
24
25
  if (typeof packageVsix === 'string') {
25
26
  packagePath = packageVsix;
26
27
  } else {
27
- const { name } = await readJson(path.join(cwd, './package.json'));
28
+ const { name } = await readJson(join(cwd, './package.json'));
28
29
  if (isTargetEnabled()) {
29
30
  packagePath = `${name}-${process.env.VSCE_TARGET}-${version}.vsix`;
30
31
  } else {
@@ -49,4 +50,4 @@ module.exports = async (version, packageVsix, logger, cwd) => {
49
50
 
50
51
  return packagePath;
51
52
  }
52
- };
53
+ }
package/lib/publish.js CHANGED
@@ -1,16 +1,18 @@
1
1
  // @ts-check
2
2
 
3
- const execa = require('execa');
4
- const { readJson } = require('fs-extra');
5
- const path = require('path');
6
- const {
3
+ import { execa } from 'execa';
4
+ import { readJson } from 'fs-extra/esm';
5
+ import { join } from 'node:path';
6
+ import process from 'node:process';
7
+ import {
8
+ isAzureCredentialEnabled,
7
9
  isOvsxPublishEnabled,
8
10
  isTargetEnabled,
9
11
  isVscePublishEnabled,
10
- } = require('./utils');
12
+ } from './utils.js';
11
13
 
12
- module.exports = async (version, packagePath, logger, cwd) => {
13
- const { publisher, name } = await readJson(path.join(cwd, './package.json'));
14
+ export async function publish(version, packagePath, logger, cwd) {
15
+ const { publisher, name } = await readJson(join(cwd, './package.json'));
14
16
 
15
17
  const options = ['publish'];
16
18
 
@@ -33,6 +35,10 @@ module.exports = async (version, packagePath, logger, cwd) => {
33
35
  }
34
36
  }
35
37
 
38
+ if (isAzureCredentialEnabled()) {
39
+ options.push('--azure-credential');
40
+ }
41
+
36
42
  const releases = [];
37
43
  if (isVscePublishEnabled()) {
38
44
  logger.log(message + ' to Visual Studio Marketplace');
@@ -64,4 +70,4 @@ module.exports = async (version, packagePath, logger, cwd) => {
64
70
  // TODO: uncomment after https://github.com/semantic-release/semantic-release/issues/2123
65
71
  // return releases;
66
72
  return releases.shift();
67
- };
73
+ }
package/lib/utils.js CHANGED
@@ -1,21 +1,25 @@
1
1
  // @ts-check
2
2
 
3
- const isOvsxPublishEnabled = () => {
3
+ import process from 'node:process';
4
+
5
+ function envToBoolean(name) {
6
+ return process.env[name] === 'true' || process.env[name] === '1';
7
+ }
8
+
9
+ export function isOvsxPublishEnabled() {
4
10
  return 'OVSX_PAT' in process.env;
5
- };
11
+ }
6
12
 
7
- const isVscePublishEnabled = () => {
8
- return 'VSCE_PAT' in process.env;
9
- };
13
+ export function isAzureCredentialEnabled() {
14
+ return envToBoolean('VSCE_AZURE_CREDENTIAL');
15
+ }
10
16
 
11
- const isTargetEnabled = () => {
17
+ export function isVscePublishEnabled() {
18
+ return 'VSCE_PAT' in process.env || isAzureCredentialEnabled();
19
+ }
20
+
21
+ export function isTargetEnabled() {
12
22
  return (
13
23
  'VSCE_TARGET' in process.env && process.env.VSCE_TARGET !== 'universal'
14
24
  );
15
- };
16
-
17
- module.exports = {
18
- isTargetEnabled,
19
- isOvsxPublishEnabled,
20
- isVscePublishEnabled,
21
- };
25
+ }
@@ -1,9 +1,10 @@
1
1
  // @ts-check
2
2
 
3
- const SemanticReleaseError = require('@semantic-release/error');
4
- const execa = require('execa');
3
+ import SemanticReleaseError from '@semantic-release/error';
4
+ import { execa } from 'execa';
5
+ import process from 'node:process';
5
6
 
6
- module.exports = async (logger, cwd) => {
7
+ export async function verifyOvsxAuth(logger, cwd) {
7
8
  logger.log('Verifying authentication for ovsx');
8
9
 
9
10
  if (!process.env.OVSX_PAT) {
@@ -21,4 +22,4 @@ module.exports = async (logger, cwd) => {
21
22
  'EINVALIDOVSXPAT',
22
23
  );
23
24
  }
24
- };
25
+ }
package/lib/verify-pkg.js CHANGED
@@ -1,14 +1,13 @@
1
1
  // @ts-check
2
2
 
3
- const SemanticReleaseError = require('@semantic-release/error');
4
- const { readJson } = require('fs-extra');
5
- const fs = require('fs');
6
- const path = require('path');
3
+ import SemanticReleaseError from '@semantic-release/error';
4
+ import { pathExists, readJson } from 'fs-extra/esm';
5
+ import { join } from 'node:path';
7
6
 
8
- module.exports = async (cwd) => {
9
- const packagePath = path.join(cwd, './package.json');
7
+ export async function verifyPkg(cwd) {
8
+ const packagePath = join(cwd, './package.json');
10
9
 
11
- if (!fs.existsSync(packagePath)) {
10
+ if (!(await pathExists(packagePath))) {
12
11
  throw new SemanticReleaseError(
13
12
  `${packagePath} was not found. A \`package.json\` is required to release with vsce.`,
14
13
  'ENOPKG',
@@ -40,4 +39,4 @@ module.exports = async (cwd) => {
40
39
  'ENOPUBLISHER',
41
40
  );
42
41
  }
43
- };
42
+ }
@@ -1,9 +1,10 @@
1
1
  // @ts-check
2
2
 
3
- const SemanticReleaseError = require('@semantic-release/error');
4
- const { isTargetEnabled } = require('./utils');
3
+ import SemanticReleaseError from '@semantic-release/error';
4
+ import process from 'node:process';
5
+ import { isTargetEnabled } from './utils.js';
5
6
 
6
- module.exports = async () => {
7
+ export async function verifyTarget() {
7
8
  if (!isTargetEnabled()) {
8
9
  return;
9
10
  }
@@ -16,7 +17,7 @@ module.exports = async () => {
16
17
  }
17
18
 
18
19
  if (process.env.VSCE_TARGET !== 'universal') {
19
- const targets = require('@vscode/vsce/out/package').Targets;
20
+ const targets = (await import('@vscode/vsce/out/package.js')).Targets;
20
21
 
21
22
  // Throw if the target is not supported
22
23
  if (!targets.has(process.env.VSCE_TARGET)) {
@@ -28,4 +29,4 @@ module.exports = async () => {
28
29
  );
29
30
  }
30
31
  }
31
- };
32
+ }
@@ -1,24 +1,39 @@
1
1
  // @ts-check
2
2
 
3
- const SemanticReleaseError = require('@semantic-release/error');
4
- const execa = require('execa');
3
+ import SemanticReleaseError from '@semantic-release/error';
4
+ import { execa } from 'execa';
5
+ import process from 'node:process';
6
+ import { isAzureCredentialEnabled } from './utils.js';
5
7
 
6
- module.exports = async (logger, cwd) => {
7
- logger.log('Verifying authentication for vsce');
8
+ export async function verifyVsceAuth(logger, cwd) {
9
+ const pat = 'VSCE_PAT' in process.env && process.env.VSCE_PAT;
10
+ const azureCredential = isAzureCredentialEnabled();
8
11
 
9
- if (!process.env.VSCE_PAT) {
12
+ if (!pat && !azureCredential) {
10
13
  throw new SemanticReleaseError(
11
- 'Empty vsce personal access token (`VSCE_PAT` environment variable) specified.',
12
- 'EEMPTYVSCEPAT',
14
+ 'Neither vsce personal access token (`VSCE_PAT` environment variable) or azure credential flag (`VSCE_AZURE_CREDENTIAL` environment variable) specified.',
15
+ 'EVSCEAUTHNOTPROVIDED',
13
16
  );
14
17
  }
15
18
 
19
+ if (pat && azureCredential) {
20
+ throw new SemanticReleaseError(
21
+ 'Both vsce personal access token (`VSCE_PAT` environment variable) and azure credential flag (`VSCE_AZURE_CREDENTIAL` environment variable) specified. Please use only one.',
22
+ 'EVSCEDUPLICATEAUTHPROVIDED',
23
+ );
24
+ }
25
+
26
+ const vsceArgs = ['verify-pat'];
27
+ if (azureCredential) {
28
+ vsceArgs.push('--azure-credential');
29
+ }
30
+
16
31
  try {
17
- await execa('vsce', ['verify-pat'], { preferLocal: true, cwd });
32
+ await execa('vsce', vsceArgs, { preferLocal: true, cwd });
18
33
  } catch (e) {
19
34
  throw new SemanticReleaseError(
20
- `Invalid vsce personal access token. Additional information:\n\n${e}`,
35
+ `Invalid vsce personal access token or azure credential. Additional information:\n\n${e}`,
21
36
  'EINVALIDVSCEPAT',
22
37
  );
23
38
  }
24
- };
39
+ }
package/lib/verify.js CHANGED
@@ -1,13 +1,13 @@
1
1
  // @ts-check
2
2
 
3
- const SemanticReleaseError = require('@semantic-release/error');
4
- const verifyPkg = require('./verify-pkg');
5
- const verifyVsceAuth = require('./verify-vsce-auth');
6
- const verifyOvsxAuth = require('./verify-ovsx-auth');
7
- const verifyTarget = require('./verify-target');
8
- const { isOvsxPublishEnabled, isVscePublishEnabled } = require('./utils');
3
+ import SemanticReleaseError from '@semantic-release/error';
4
+ import { isOvsxPublishEnabled, isVscePublishEnabled } from './utils.js';
5
+ import { verifyOvsxAuth } from './verify-ovsx-auth.js';
6
+ import { verifyPkg } from './verify-pkg.js';
7
+ import { verifyTarget } from './verify-target.js';
8
+ import { verifyVsceAuth } from './verify-vsce-auth.js';
9
9
 
10
- module.exports = async (pluginConfig, { logger, cwd }) => {
10
+ export async function verify(pluginConfig, { logger, cwd }) {
11
11
  await verifyPkg(cwd);
12
12
  await verifyTarget();
13
13
 
@@ -16,7 +16,7 @@ module.exports = async (pluginConfig, { logger, cwd }) => {
16
16
  const ovsxPublishEnabled = isOvsxPublishEnabled();
17
17
  if (!vscePublishEnabled && !ovsxPublishEnabled) {
18
18
  throw new SemanticReleaseError(
19
- 'No personal access token was detected. Set the `VSCE_PAT` or the `OVSX_PAT` environment variable, at least one of them must be present when publish is enabled.\nLearn more at https://github.com/felipecrs/semantic-release-vsce#publishing',
19
+ 'No personal access token was detected. Set `VSCE_PAT`, `VSCE_AZURE_CREDENTIAL`, or the `OVSX_PAT` environment variable. At least one of them must be present when publish is enabled.\nLearn more at https://github.com/felipecrs/semantic-release-vsce#publishing',
20
20
  'ENOPAT',
21
21
  );
22
22
  }
@@ -24,7 +24,7 @@ module.exports = async (pluginConfig, { logger, cwd }) => {
24
24
  await verifyVsceAuth(logger, cwd);
25
25
  } else {
26
26
  logger.log(
27
- 'Skipping verification of the vsce personal access token as the `VSCE_PAT` environment variable is not set.\n\nDid you know you can easily start publishing to Visual Studio Marketplace with `semantic-release-vsce`?\nLearn more at https://github.com/felipecrs/semantic-release-vsce#publishing-to-visual-studio-marketplace',
27
+ 'Skipping verification of the vsce personal access token as the `VSCE_PAT` or `VSCE_AZURE_CREDENTIAL` environment variables are not set.\n\nDid you know you can easily start publishing to Visual Studio Marketplace with `semantic-release-vsce`?\nLearn more at https://github.com/felipecrs/semantic-release-vsce#publishing-to-visual-studio-marketplace',
28
28
  );
29
29
  }
30
30
  if (ovsxPublishEnabled) {
@@ -35,4 +35,4 @@ module.exports = async (pluginConfig, { logger, cwd }) => {
35
35
  );
36
36
  }
37
37
  }
38
- };
38
+ }
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "semantic-release-vsce",
3
- "version": "5.7.4",
3
+ "version": "6.0.1",
4
4
  "description": "semantic-release plugin to package and publish VS Code extensions",
5
5
  "license": "MIT",
6
+ "type": "module",
6
7
  "engines": {
7
- "node": "^14.17.0 || >=16.0.0"
8
+ "node": "^20.8.1 || >=22.0.0"
8
9
  },
9
10
  "repository": "https://github.com/felipecrs/semantic-release-vsce.git",
10
11
  "bugs": "https://github.com/felipecrs/semantic-release-vsce/issues",
@@ -20,11 +21,13 @@
20
21
  "vsce"
21
22
  ],
22
23
  "main": "index.js",
24
+ "files": [
25
+ "lib/**/*.js"
26
+ ],
23
27
  "scripts": {
24
- "lint": "prettier --check . && eslint . ",
25
- "release": "semantic-release",
26
- "test": "nyc ava",
27
- "posttest": "npm run lint && installed-check --ignore-dev --ignore=semantic-release",
28
+ "lint": "prettier --check . && eslint . && installed-check --ignore-dev",
29
+ "test": "c8 ava",
30
+ "posttest": "npm run lint",
28
31
  "prepare": "husky"
29
32
  },
30
33
  "ava": {
@@ -43,39 +46,38 @@
43
46
  ]
44
47
  },
45
48
  "volta": {
46
- "node": "20.11.1",
47
- "npm": "10.5.0"
49
+ "node": "22.12.0",
50
+ "npm": "11.0.0"
48
51
  },
49
52
  "dependencies": {
50
- "@semantic-release/error": "^3.0.0",
51
- "@vscode/vsce": "^2.15.0",
52
- "execa": "^5.0.0",
53
+ "@semantic-release/error": "^4.0.0",
54
+ "@vscode/vsce": "^3.0.0",
55
+ "execa": "^9.5.2",
53
56
  "fs-extra": "^11.1.0",
54
- "glob": "^10.2.1",
55
- "ovsx": "^0.8.0"
57
+ "glob": "^11.0.0",
58
+ "ovsx": "^0.10.0"
56
59
  },
57
60
  "peerDependencies": {
58
- "semantic-release": ">=18"
61
+ "semantic-release": ">=20"
59
62
  },
60
63
  "devDependencies": {
61
64
  "ava": "^6.1.2",
62
- "conventional-changelog-conventionalcommits": "^7.0.2",
63
- "eslint": "^8.7.0",
64
- "eslint-config-prettier": "^9.0.0",
65
- "eslint-config-standard": "^17.0.0",
66
- "eslint-plugin-import": "^2.20.1",
67
- "eslint-plugin-n": "^16.6.2",
68
- "eslint-plugin-promise": "^6.0.0",
65
+ "c8": "^10.1.3",
66
+ "conventional-changelog-conventionalcommits": "^8.0.0",
67
+ "eslint": "^9.12.0",
68
+ "esmock": "^2.6.9",
69
69
  "husky": "^9.0.11",
70
70
  "installed-check": "^9.0.0",
71
71
  "lint-staged": "^15.0.1",
72
- "nyc": "^15.1.0",
72
+ "neostandard": "^0.12.0",
73
73
  "prettier": "^3.2.5",
74
- "proxyquire": "^2.1.3",
75
- "semantic-release": "^23.0.2",
76
- "sinon": "^17.0.1"
74
+ "semantic-release": "^24.0.0",
75
+ "sinon": "^19.0.2"
77
76
  },
78
77
  "lint-staged": {
79
78
  "**/*": "prettier --write --ignore-unknown"
79
+ },
80
+ "publishConfig": {
81
+ "provenance": true
80
82
  }
81
83
  }
package/.eslintrc DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "env": {
3
- "es6": true,
4
- "node": true
5
- },
6
- "extends": ["standard", "prettier"],
7
- "rules": {
8
- "no-console": "off",
9
- "indent": ["error", 2],
10
- "linebreak-style": ["error", "unix"],
11
- "quotes": ["error", "single"],
12
- "semi": ["error", "always"]
13
- }
14
- }
@@ -1 +0,0 @@
1
- github: [felipecrs]
@@ -1,14 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: /
5
- schedule:
6
- interval: daily
7
- open-pull-requests-limit: 100
8
- - package-ecosystem: github-actions
9
- directory: /
10
- schedule:
11
- interval: daily
12
- open-pull-requests-limit: 100
13
- commit-message:
14
- prefix: ci
@@ -1,44 +0,0 @@
1
- name: ci
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - next
8
- pull_request:
9
- branches:
10
- - master
11
- - next
12
-
13
- jobs:
14
- test:
15
- runs-on: ubuntu-latest
16
-
17
- strategy:
18
- matrix:
19
- node-version:
20
- - 16
21
- - 18
22
- - 20
23
-
24
- steps:
25
- - uses: actions/checkout@v4
26
- - uses: volta-cli/action@v4
27
- with:
28
- node-version: ${{ matrix.node-version }}
29
- - run: npm ci
30
- - run: npm test
31
-
32
- release:
33
- runs-on: ubuntu-latest
34
-
35
- needs: test
36
-
37
- steps:
38
- - uses: actions/checkout@v4
39
- - uses: volta-cli/action@v4
40
- - run: npm ci
41
- - run: npm run release
42
- env:
43
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,22 +0,0 @@
1
- name: dependabot-auto-merge
2
- on: pull_request
3
-
4
- permissions:
5
- contents: write
6
-
7
- jobs:
8
- dependabot-auto-merge:
9
- runs-on: ubuntu-latest
10
- if: github.actor == 'dependabot[bot]'
11
- steps:
12
- - name: Get Dependabot metadata
13
- id: metadata
14
- uses: dependabot/fetch-metadata@v2
15
- with:
16
- github-token: ${{ secrets.GITHUB_TOKEN }}
17
- - name: Enable auto-merge for Dependabot PRs
18
- if: steps.metadata.outputs.dependency-type == 'direct:development' && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch')
19
- run: gh pr merge --auto --squash "$PR_URL"
20
- env:
21
- PR_URL: ${{ github.event.pull_request.html_url }}
22
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}