Skip to content

Commit

Permalink
🤖 ci(.github/workflows/release.yml): add GitHub Actions workflow for …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
nyxb committed May 23, 2024
1 parent ca6f1b2 commit b42d0d6
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 16.x

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
41 changes: 41 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
}
Empty file.
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions test/fixtures/lockfile/unknown/future-package-manager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Empty file.
Empty file.
29 changes: 29 additions & 0 deletions test/programmatic/__snapshots__/detect.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`lockfile > bun 1`] = `"bun"`;

exports[`lockfile > npm 1`] = `"npm"`;

exports[`lockfile > pnpm 1`] = `"pnpm"`;

exports[`lockfile > pnpm@6 1`] = `"pnpm"`;

exports[`lockfile > unknown 1`] = `null`;

exports[`lockfile > yarn 1`] = `"yarn"`;

exports[`lockfile > yarn@berry 1`] = `"yarn"`;

exports[`packager > bun 1`] = `"bun"`;

exports[`packager > npm 1`] = `"npm"`;

exports[`packager > pnpm 1`] = `"pnpm"`;

exports[`packager > pnpm@6 1`] = `"pnpm@6"`;

exports[`packager > unknown 1`] = `null`;

exports[`packager > yarn 1`] = `"yarn"`;

exports[`packager > yarn@berry 1`] = `"yarn@berry"`;

0 comments on commit b42d0d6

Please sign in to comment.