Skip to content

Commit

Permalink
chore: apply stack with pnpm migration
Browse files Browse the repository at this point in the history
  • Loading branch information
adbayb committed Aug 15, 2023
0 parents commit bbc70e7
Show file tree
Hide file tree
Showing 60 changed files with 8,815 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
12 changes: 12 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/changesets/changesets/main/packages/config/schema.json",
"access": "public",
"baseBranch": "main",
"changelog": ["@changesets/changelog-github", { "repo": "adbayb/termost" }],
"commit": false,
"updateInternalDependencies": "patch",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true,
"updateInternalDependents": "out-of-range"
}
}
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root = true

[*]
indent_size = 4
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: "🐛 Bug Report"
about: Report a reproducible bug or regression.
title: "Bug: "
labels: ["bug", "triage"]
---

## Description

<!--
Please provide a clear and concise description of what the bug is with the current and expected behavior(s). Include
screenshots if needed. Please test using the latest version of the relevant package to make sure your issue has not already been fixed.
-->

## Reproduction

<!--
Issues without reproduction steps or code examples may be immediately closed as not actionable. Your bug will get fixed much faster if we can run your code. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve.
-->

## Environment

<!--
Please provide the environment you discovered this bug in.
It must include following informations:
- OS [eg. Android, iOS, mac OS, Windows, ...]
- Browser [eg. Chrome@110, Safari@16, ...]
-->

## Additional context

<!--
Add any other context about the problem (eg. issue URL, related issues, documentation, etc...)
-->
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
blank_issues_enabled: false
contact_links:
- name: 🤔 Questions and Help
about: Issues are dedicated to bugs, if you have any question, please use the dedicated GitHub discussion category.
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Before requesting reviews, please make sure that:
1. Your contribution follows coding conventions
2. Some valuable tests have been added
3. For non-internal change, a changelog entry is added
Learn more about contributing [here](https://github.com/adbayb/termost/blob/main/CONTRIBUTING.md)
-->

## Description

Please include a concise summary of the change with the relevant context and main highlights:

- [ ] What I've done 1
- [ ] What I've done 2...

## Screenshots

| Before | After |
| ------ | ----- |
| Image | Image |

## Resources

- Issue (GitHub, ...)
- Specification (ADRs, RFCs, ...)
- ...
65 changes: 65 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
":automergeRequireAllStatusChecks",
":dependencyDashboard",
":enableVulnerabilityAlerts",
":maintainLockFilesMonthly",
":prConcurrentLimit10",
":rebaseStalePrs",
":semanticCommits",
":semanticPrefixFixDepsChoreOthers",
":semanticCommitScopeDisabled",
":separateMultipleMajorReleases",
"schedule:automergeMonthly",
"workarounds:typesNodeVersioning"
],
"labels": ["dependencies"],
"timezone": "Europe/Paris",
"packageRules": [
{
"matchPackagePatterns": ["*"],
"rangeStrategy": "auto"
},
{
"matchDepTypes": ["devDependencies"],
"rangeStrategy": "pin"
},
{
"matchDepTypes": ["dependencies"],
"rangeStrategy": "bump"
},
{
"description": "Synchronize CircleCI Docker image version with the Node.js one",
"matchPackageNames": ["cimg/node"],
"versioning": "node"
},
{
"groupName": "package dependencies",
"matchManagers": ["npm"],
"matchDepTypes": [
"dependencies",
"devDependencies",
"optionalDependencies",
"peerDependencies"
]
},
{
"groupName": "infrastructure dependencies",
"matchManagers": [
"circleci",
"github-actions",
"dockerfile",
"terraform",
"terraform-version",
"docker-compose",
"kubernetes"
]
},
{
"groupName": "engine dependencies",
"matchPackagePatterns": ["node", "pnpm"]
}
],
"ignoreDeps": []
}
65 changes: 65 additions & 0 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Continuous Integration

on: [push, pull_request]

jobs:
install:
timeout-minutes: 5
name: Install
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Get node version
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: node
- name: Setup node ${{ steps.node.outputs.version }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node.outputs.version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
check:
timeout-minutes: 5
needs: install
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Get node version
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: node
- name: Setup node ${{ steps.node.outputs.version }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node.outputs.version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Check (lint, test, types)
run: pnpm check
build:
timeout-minutes: 5
needs: install
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Get node version
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: node
- name: Setup node ${{ steps.node.outputs.version }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node.outputs.version }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
48 changes: 48 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check pull request

on:
pull_request:
types: [opened, edited]

jobs:
pr_title:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
id: check_pr_rule
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: The subject must start with a lowercase character
# Create a sticky comment to display the detailed error
- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.check_pr_rule.outputs.error_message != null)
with:
header: check_pr_comment
message: |
Pull request titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/).
Please adjust your title following:
```
${{ steps.check_pr_rule.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.check_pr_rule.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: check_pr_comment
delete: true
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Get node version
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: node
- name: Setup node ${{ steps.node.outputs.version }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node.outputs.version }}
cache: pnpm
- name: Setup .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create release pull request
uses: changesets/action@v1
with:
commit: "chore: release package(s)"
title: "chore: release package(s)"
version: pnpm release:version
publish: pnpm release:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit bbc70e7

Please sign in to comment.