Skip to content

Commit b42d0d6

Browse files
committed
🤖 ci(.github/workflows/release.yml): add GitHub Actions workflow for automated releases on tag push
🎨 style(.vscode/settings.json): configure VSCode settings for ESLint and disable Prettier as formatter 🧪 test(test/fixtures/lockfile/unknown/future-package-manager.json, test/programmatic/__snapshots__/detect.spec.ts.snap): add test fixtures and snapshots for future package manager detection and various package managers
1 parent ca6f1b2 commit b42d0d6

File tree

10 files changed

+93
-0
lines changed

10 files changed

+93
-0
lines changed

‎.github/workflows/release.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: 16.x
19+
20+
- run: npx changelogithub
21+
env:
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

‎.vscode/settings.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
// Enable the ESlint flat config support
3+
"eslint.experimental.useFlatConfig": true,
4+
5+
// Disable the default formatter, use eslint instead
6+
"prettier.enable": false,
7+
"editor.formatOnSave": false,
8+
9+
// Auto fix
10+
"editor.codeActionsOnSave": {
11+
"source.fixAll": "explicit",
12+
"source.organizeImports": "never"
13+
},
14+
15+
// Silent the stylistic rules in you IDE, but still auto fix them
16+
"eslint.rules.customizations": [
17+
{ "rule": "style/*", "severity": "off" },
18+
{ "rule": "*-indent", "severity": "off" },
19+
{ "rule": "*-spacing", "severity": "off" },
20+
{ "rule": "*-spaces", "severity": "off" },
21+
{ "rule": "*-order", "severity": "off" },
22+
{ "rule": "*-dangle", "severity": "off" },
23+
{ "rule": "*-newline", "severity": "off" },
24+
{ "rule": "*quotes", "severity": "off" },
25+
{ "rule": "*semi", "severity": "off" }
26+
],
27+
28+
// Enable eslint for all supported languages
29+
"eslint.validate": [
30+
"javascript",
31+
"javascriptreact",
32+
"typescript",
33+
"typescriptreact",
34+
"vue",
35+
"html",
36+
"markdown",
37+
"json",
38+
"jsonc",
39+
"yaml"
40+
]
41+
}

‎test/fixtures/lockfile/bun/bun.lockb

Whitespace-only changes.

‎test/fixtures/lockfile/npm/package-lock.json

Whitespace-only changes.

‎test/fixtures/lockfile/pnpm/pnpm-lock.yaml

Whitespace-only changes.

‎test/fixtures/lockfile/pnpm@6/pnpm-lock.yaml

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

‎test/fixtures/lockfile/yarn/yarn.lock

Whitespace-only changes.

‎test/fixtures/lockfile/yarn@berry/yarn.lock

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2+
3+
exports[`lockfile > bun 1`] = `"bun"`;
4+
5+
exports[`lockfile > npm 1`] = `"npm"`;
6+
7+
exports[`lockfile > pnpm 1`] = `"pnpm"`;
8+
9+
exports[`lockfile > pnpm@6 1`] = `"pnpm"`;
10+
11+
exports[`lockfile > unknown 1`] = `null`;
12+
13+
exports[`lockfile > yarn 1`] = `"yarn"`;
14+
15+
exports[`lockfile > yarn@berry 1`] = `"yarn"`;
16+
17+
exports[`packager > bun 1`] = `"bun"`;
18+
19+
exports[`packager > npm 1`] = `"npm"`;
20+
21+
exports[`packager > pnpm 1`] = `"pnpm"`;
22+
23+
exports[`packager > pnpm@6 1`] = `"pnpm@6"`;
24+
25+
exports[`packager > unknown 1`] = `null`;
26+
27+
exports[`packager > yarn 1`] = `"yarn"`;
28+
29+
exports[`packager > yarn@berry 1`] = `"yarn@berry"`;

0 commit comments

Comments
 (0)