Skip to content

Commit

Permalink
chore: update all (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-guibert authored Jan 26, 2024
1 parent 2ac2799 commit c904ad0
Show file tree
Hide file tree
Showing 24 changed files with 27,709 additions and 27,123 deletions.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Miscellaneous
about: "Miscellaneous task (development only)"
---

### Description

<!-- ✍️ A clear and concise description of the task. -->

### Notes

<!-- ✍️ Any detail, screenshots, links... -->
14 changes: 10 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ runs:
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v3
- name: Get Node version
id: nvm
shell: bash
run: |
echo "node-version=$(cat ./.nvmrc)" >> $GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ steps.nvm.outputs.node-version }}
cache: "pnpm"
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
run: |
pnpm install --frozen-lockfile
22 changes: 0 additions & 22 deletions .github/dependabot.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"labels": ["type: dependencies"],
"reviewersFromCodeOwners": true,
"dependencyDashboardLabels": ["type: dependencies"],
"rebaseWhen": "conflicted",
"semanticCommits": "enabled",
"enabledManagers": ["npm", "github-actions"],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"automerge": true,
"automergeStrategy": "squash"
},
{
"packageNames": ["node"],
"enabled": false
}
]
}
39 changes: 39 additions & 0 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Code Check

on:
push:
branches:
- main
pull_request:
branches:
- main
types: [opened, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

permissions:
contents: read

jobs:
code:
name: Check Code
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup
- name: Run prettier
run: pnpm run format:check
- name: Run lint
run: pnpm run lint
- name: Run type check
run: pnpm run check
- name: Run test
run: pnpm test
- name: Build
run: pnpm build
- name: Check if there is any difference
run: git diff --exit-code dist/
26 changes: 26 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PR Check

on:
pull_request:
branches:
- main
types: [opened, synchronize, edited]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
pr:
name: Check Pull Request
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup project
uses: ./.github/actions/setup
- name: Lint PR title
run: echo "${{ github.event.pull_request.title }}" | pnpm commitlint --verbose
71 changes: 0 additions & 71 deletions .github/workflows/check.yml

This file was deleted.

11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ on:
default: ""
description: Pre-release
options:
- ""
- " "
- alpha
- beta
- rc

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

permissions:
contents: write
pull-requests: write
packages: read

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -31,10 +34,12 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
is-released: ${{ steps.action.outputs.is-released }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Execute action
- name: Release
id: action
uses: cyberspace7/release-action@v0.3.1
with:
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
save-exact=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.18
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SemVer } from "semver";
import {
createNewNodePackageEncodedContent,
getNodePackage,
} from "../../src/libs/nodePackage";
} from "../../src/libs/node-package";
import { fileSystem } from "../../tests/mocks";

describe("getNodePackage()", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
createReleasePullRequestBody,
getDiffMarkdown,
} from "../../src/libs/releaseNotes";
} from "../../src/libs/release-notes";

describe("createReleasePullRequestBody()", () => {
it("should return notes", () => {
Expand Down
8 changes: 8 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { UserConfig } from "@commitlint/types";

const configuration = {
extends: ["@commitlint/config-conventional"],
defaultIgnores: !process.env["CI"],
} satisfies UserConfig;

export default configuration;
Loading

0 comments on commit c904ad0

Please sign in to comment.