This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
2,385 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@pedaki/prettier-config": patch | ||
--- | ||
|
||
add prettier in peerDependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@pedaki/eslint-config": patch | ||
--- | ||
|
||
add eslint in peerDependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
'todo': | ||
'📦 packages': | ||
- any: | ||
- 'packages/**' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["main"] | ||
schedule: | ||
# Run at 19:26 UTC every Tuesday | ||
- cron: "26 19 * * 2" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
# Runner size impacts CodeQL analysis time. To learn more, please see: | ||
# - https://gh.io/recommended-hardware-resources-for-running-codeql | ||
# - https://gh.io/supported-runners-and-hardware-resources | ||
# - https://gh.io/using-larger-runners | ||
# Consider using larger runners for possible analysis time improvements. | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ["typescript"] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] | ||
# Use only 'java' to analyze code written in Java, Kotlin or both | ||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# Based on https://github.com/Shopify/polaris | ||
|
||
name: Snapshot Release | ||
|
||
on: | ||
issue_comment: | ||
types: | ||
- created | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
snapshot: | ||
name: Snapshot Release | ||
runs-on: ubuntu-latest | ||
if: | | ||
github.event.issue.pull_request && | ||
github.event.comment.body == '/snapshot' && | ||
github.repository == 'pedakihq/pedaki' | ||
steps: | ||
- name: Add initial reaction | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
comment-id: ${{ github.event.comment.id }} | ||
reactions: eyes | ||
edit-mode: replace | ||
body: | | ||
@${{ github.actor }} your snapshot release is being processed. | ||
:hourglass_flowing_sand: This may take a few minutes... | ||
- name: Enforce permission requirement | ||
id: check-permissions | ||
continue-on-error: true | ||
uses: prince-chrismc/check-actor-permissions-action@v2 | ||
with: | ||
permission: write | ||
|
||
- name: Add reaction if permission requirement not met | ||
if: steps.check-permissions.outcome == 'failure' | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
comment-id: ${{ github.event.comment.id }} | ||
reactions: confused | ||
edit-mode: replace | ||
body: | | ||
@${{ github.actor }} you do not have permission to run this command. | ||
Please ask a maintainer to run this command for you. | ||
- name: Exit if permission requirement not met | ||
if: steps.check-permissions.outcome == 'failure' | ||
run: exit 1 | ||
|
||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Because changeset entries are consumed and removed on the | ||
# 'changeset-release/main' branch, we need to reset the files | ||
# so the following 'changeset version --snapshot' command will | ||
# regenerate the package version bumps with the snapshot releases | ||
- name: Reset changeset entries on changeset-release/main branch | ||
run: | | ||
if [[ $(git branch --show-current) == 'changeset-release/main' ]]; then | ||
git checkout origin/main -- .changeset | ||
fi | ||
- uses: pnpm/action-setup@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
cache-dependency-path: pnpm-lock.yaml | ||
|
||
- name: Install deps | ||
run: pnpm install --child-concurrency 3 --frozen-lockfile --prefer-offline | ||
|
||
- name: Create an .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
cat << EOF > "$HOME/.npmrc" | ||
//registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
EOF | ||
- name: Run Changeset | ||
id: changeset | ||
run: | | ||
pnpm exec changeset version --snapshot | ||
pnpm run publish:prepare | ||
output=$(pnpm exec changeset publish --tag next) | ||
echo "$output" | ||
version=$(echo "$output" | grep -zoE 'New tag: *.*@([^ \n]+)' | head -n 1 | sed -E 's/New tag: *.*@([^ \n]+)/\1/') | ||
echo "VERSION=$version" | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Send success comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
if: success() | ||
with: | ||
comment-id: ${{ github.event.comment.id }} | ||
reactions: rocket | ||
reactions-edit-mode: replace | ||
edit-mode: replace | ||
body: | | ||
@${{ github.actor }} your snapshot release has been published! | ||
:rocket: `${{ steps.changeset.outputs.version }}` | ||
- name: Send failure comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
if: failure() | ||
with: | ||
comment-id: ${{ github.event.comment.id }} | ||
reactions: -1 | ||
reactions-edit-mode: replace | ||
edit-mode: replace | ||
body: | | ||
@${{ github.actor }} your snapshot release failed to publish. | ||
Please check the logs for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
node_modules | ||
node_modules | ||
.envrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,38 @@ | ||
{ | ||
"name": "pedaki", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"version": "0.0.0", | ||
"private": true, | ||
"repository": "https://github.com/PedakiHQ/pedaki", | ||
"homepage": "https://www.pedaki.fr", | ||
"author": "Nathan David <me@vahor.fr>", | ||
"license": "CC-BY-NC-SA-4.0", | ||
"keywords": [ | ||
"pedaki" | ||
], | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"start": "dotenv -- turbo run start", | ||
"format:check": "turbo run format:check", | ||
"format": "turbo run format", | ||
"clean": "turbo run clean", | ||
"build": "dotenv -- turbo run build", | ||
"test": "NODE_ENV=test dotenv -- turbo run test", | ||
"dev": "dotenv -- turbo run dev", | ||
"lint": "SKIP_ENV_VALIDATION=true && turbo run lint", | ||
"publish:prepare": "turbo run publish:prepare", | ||
"publish": "pnpm run publish:prepare && changeset publish", | ||
"typecheck": "turbo run typecheck" | ||
}, | ||
"keywords": [], | ||
"author": "Nathan David <me@vahor.fr>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@changesets/cli": "^2.26.2" | ||
} | ||
"devDependencies": { | ||
"@changesets/changelog-github": "^0.4.8", | ||
"@changesets/cli": "^2.26.2", | ||
"@types/node": "^18.17.11", | ||
"turbo": "^1.10.13" | ||
}, | ||
"engines": { | ||
"node": ">=18.0.0 <19.0.0", | ||
"pnpm": ">=8.0.0", | ||
"yarn": "use-pnpm", | ||
"npm": "use-pnpm" | ||
}, | ||
"packageManager": "pnpm@8.7.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# @pedaki/eslint-config | ||
|
||
## 0.0.1 | ||
|
||
### Patch Changes | ||
|
||
- [#3](https://github.com/PedakiHQ/pedaki/pull/3) [`b35c14e`](https://github.com/PedakiHQ/pedaki/commit/b35c14ed0deee6070b064f9a7c145ee9ca000936) Thanks [@Vahor](https://github.com/Vahor)! - add prettier and eslint packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# @pedaki/eslint-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["@typescript-eslint", "import"], | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
"next", | ||
"prettier", | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended-type-checked", | ||
"plugin:@typescript-eslint/stylistic-type-checked", | ||
], | ||
ignorePatterns: ["*.tsbuildinfo", "node_modules", "dist", "coverage"], | ||
rules: { | ||
"@next/next/no-html-link-for-pages": "off", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"warn", | ||
{ | ||
prefer: "type-imports", | ||
fixStyle: "inline-type-imports", | ||
}, | ||
], | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], | ||
"@typescript-eslint/ban-ts-comment": "warn", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{ checksVoidReturn: false }, | ||
], | ||
"import/consistent-type-specifier-style": ["error", "prefer-top-level"], | ||
}, | ||
reportUnusedDisableDirectives: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "@pedaki/eslint-config", | ||
"version": "0.0.1", | ||
"main": "index.js", | ||
"author": "Nathan David <me@vahor.fr>", | ||
"repository": "https://github.com/PedakiHQ/pedaki/tree/main/packages/eslint-config", | ||
"homepage": "https://www.pedaki.fr", | ||
"description": "ESLint configuration for Pedaki projects", | ||
"license": "MIT", | ||
"private": false, | ||
"scripts": { | ||
"format": "prettier --write . --cache", | ||
"format:check": "prettier --check . --cache" | ||
}, | ||
"devDependencies": { | ||
"@types/eslint": "^8.44.2", | ||
"@typescript-eslint/eslint-plugin": "6.4.1", | ||
"@typescript-eslint/parser": "6.4.1", | ||
"eslint-config-next": "^13.4.19", | ||
"eslint-config-prettier": "^9.0.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^8.47.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CHANGELOG.md |
Oops, something went wrong.