Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
lower version
Browse files Browse the repository at this point in the history
test push eslint

Version Packages (#5)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

fix private bool

fix private bool

test publish:prepare

add empty readme

Update pnpm to v8.7.0 (#2)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

format

codeql on pr only

add tmp description

add CHANGELOG to npmignore

add peerDependencies

fix lock

test snapshot command (#7)

add env variables

Update peter-evans/create-or-update-comment action to v3 (#8)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

add npm variable

add npm tag

edit message

save output

regex 😅

test multiline ?

test multiline ?

more logs

double space ?

gnegne

test with newline ?

simpler this way
  • Loading branch information
Vahor committed Aug 27, 2023
1 parent f0fa819 commit 1f71bb9
Show file tree
Hide file tree
Showing 19 changed files with 231 additions and 143 deletions.
5 changes: 5 additions & 0 deletions .changeset/brave-hotels-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@pedaki/prettier-config": patch
---

add prettier in peerDependencies
5 changes: 5 additions & 0 deletions .changeset/rude-fans-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@pedaki/eslint-config": patch
---

add eslint in peerDependencies
6 changes: 0 additions & 6 deletions .changeset/sweet-badgers-brush.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ jobs:
- name: Install deps
run: pnpm install --child-concurrency 3 --frozen-lockfile --prefer-offline

- name: Create Release Pull Request
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
131 changes: 131 additions & 0 deletions .github/workflows/snapshot-release.yml
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.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
node_modules
node_modules
.envrc
36 changes: 19 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{
"name": "pedaki",
"version": "1.0.0",
"description": "",
"main": "index.js",
"private": "true",
"packageManager": "pnpm@8.6.10",
"engines": {
"node": ">=18.0.0 <19.0.0",
"pnpm": ">=8.0.0",
"yarn": "use-pnpm",
"npm": "use-pnpm"
},
"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": {
"start": "dotenv -- turbo run start",
"format:check": "turbo run format:check",
Expand All @@ -20,17 +18,21 @@
"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": [
"pedaki"
],
"author": "Nathan David <me@vahor.fr>",
"license": "CC-BY-NC-SA-4.0",
"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"
}
1 change: 1 addition & 0 deletions packages/eslint-config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
7 changes: 7 additions & 0 deletions packages/eslint-config/CHANGELOG.md
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
1 change: 1 addition & 0 deletions packages/eslint-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @pedaki/eslint-config
15 changes: 12 additions & 3 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"name": "@pedaki/eslint-config",
"version": "1.0.0",
"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",
"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": "^8.47.0",
"eslint-config-next": "^13.4.19",
"eslint-config-prettier": "^9.0.0"
},
"peerDependencies": {
"eslint": "^8.47.0"
}
}
1 change: 1 addition & 0 deletions packages/prettier-config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
7 changes: 7 additions & 0 deletions packages/prettier-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @pedaki/prettier-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
1 change: 1 addition & 0 deletions packages/prettier-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @pedaki/prettier-config
8 changes: 4 additions & 4 deletions packages/prettier-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
/** @type { PrettierConfig | SortImportsConfig | TailwindConfig } */
const config = {
plugins: [
require.resolve('@ianvs/prettier-plugin-sort-imports'),
require.resolve("prettier-plugin-tailwindcss")
require.resolve("@ianvs/prettier-plugin-sort-imports"),
require.resolve("prettier-plugin-tailwindcss"),
],
semi: true,
trailingComma: "all",
singleQuote: true,
printWidth: 100,
tailwindConfig: './tailwind.config.cjs',
arrowParens: 'avoid',
tailwindConfig: "./tailwind.config.cjs",
arrowParens: "avoid",
tabWidth: 2,
};

Expand Down
15 changes: 12 additions & 3 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
{
"name": "@pedaki/prettier-config",
"version": "0.0.0",
"version": "0.0.1",
"main": "index.js",
"author": "Nathan David <me@vahor.fr>",
"repository": "https://github.com/PedakiHQ/pedaki/tree/main/packages/prettier-config",
"homepage": "https://www.pedaki.fr",
"description": "Prettier configuration for Pedaki projects",
"license": "MIT",
"private": "false",
"private": false,
"scripts": {
"format": "prettier --write . --cache",
"format:check": "prettier --check . --cache"
},
"devDependencies": {
"prettier-plugin-tailwindcss": "^0.5.3",
"@types/prettier": "^2.7.3",
"prettier": "^3.0.2",
"@ianvs/prettier-plugin-sort-imports": "^4.1.0"
},
"peerDependencies": {
"prettier": "^3.0.2"
}
}
Loading

0 comments on commit 1f71bb9

Please sign in to comment.