Skip to content

Commit

Permalink
Merge branch 'azero-id:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKheops authored Oct 22, 2024
2 parents 1b1857e + 80ec259 commit 749a185
Show file tree
Hide file tree
Showing 83 changed files with 6,696 additions and 9,746 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Lint and Test

on:
push:
branches:
- main
- develop
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest

- name: Run Biome
run: biome ci .

checks:
name: Checks & Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
pnpm-version: [9.6.0]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm ${{ matrix.pnpm-version }}
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}

- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: pnpm i

- name: Build
run: pnpm run build

- name: Typecheck
run: pnpm run typecheck

- name: Tests
run: pnpm run test
25 changes: 16 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,52 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Release

on:
push:
branches:
- main

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

jobs:
release:
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
pnpm-version: [8.3.1]
node-version: [20]
pnpm-version: [9.6.0]

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
submodules: true

- uses: pnpm/[email protected]
- name: Setup pnpm ${{ matrix.pnpm-version }}
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}

- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: pnpm i
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1.4.1
uses: changesets/action@v1
with:
title: 'chore(changeset): Bump package version'
commit: 'chore(changeset): Bump package version'
version: pnpm changeset:version
publish: pnpm changeset:publish
version: pnpm run changeset:version
publish: pnpm run changeset:publish
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v20
19 changes: 18 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
package-lock.json
pnpm-lock.yaml
bun.lockb
yarn.lock

LICENSE

node_modules
out
.next
dist
docs
LICENSE

*.ts
*.js
*.tsx
*.jsx
*.cjs
*.mjs
*.json
*.jsonc
*.code-workspace
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ module.exports = {
printWidth: 100,
tabWidth: 2,
useTabs: false,
plugins: [require('prettier-plugin-tailwindcss')],
plugins: [],
}
7 changes: 6 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "jayfong.generate-index"]
"recommendations": [
"biomejs.biome",
"esbenp.prettier-vscode",
"dotenv.dotenv-vscode",
"jayfong.generate-index"
]
}
28 changes: 24 additions & 4 deletions .vscode/resolver.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
],
"settings": {
"search.exclude": {
"**/*.{jpg,png,svg,webm,mp4,woff,woff2}": true,
"docs": true
},
"search.useIgnoreFiles": true,
Expand All @@ -31,11 +32,30 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true
"source.organizeImports": "always",
"source.fixAll.eslint": "never",
"quickfix.biome": "always",
"source.organizeImports.biome": "never"
},
"biome.enabled": true,
"eslint.enable": false,
"[javascriptreact][typescriptreact][javascript][typescript][json][jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[markdown][mdx][html][css][scss][sass][yml][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"files.associations": {
".env.*": "dotenv"
}
"*.css": "tailwindcss"
},
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
],
"github-actions.use-enterprise": true
}
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"todo-tree.tree.scanMode": "workspace"
}
}
69 changes: 69 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"formatter": {
"enabled": true,
"ignore": [".next", "docs", "dist", "deployments"],
"indentStyle": "space",
"formatWithErrors": true,
"indentWidth": 2,
"lineWidth": 100
},
"organizeImports": {
"enabled": true,
"ignore": [".next", "docs", "dist"]
},
"linter": {
"enabled": true,
"ignore": [".next", "docs", "dist"],
"rules": {
"recommended": true,
"a11y": {
"useAriaPropsForRole": "off"
},
"complexity": {
"noForEach": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
},
"nursery": {
"useSortedClasses": {
"level": "info",
"fix": "safe",
"options": {
"functions": ["clsx", "cva", "tw"]
}
},
"noRestrictedImports": {
"level": "error",
"options": {
"paths": {
"process": "Import from '@config/environment' instead"
}
}
}
},
"security": {
"noDangerouslySetInnerHtml": "off"
},
"suspicious": {
"noExplicitAny": "off"
},
"style": {
"noUnusedTemplateLiteral": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all",
"semicolons": "asNeeded"
}
}
}
44 changes: 8 additions & 36 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
:root {
--light-hl-0: #000000;
--dark-hl-0: #D4D4D4;
--light-hl-1: #A31515;
--dark-hl-1: #CE9178;
--light-hl-2: #008000;
--dark-hl-2: #6A9955;
--light-hl-3: #AF00DB;
--dark-hl-3: #C586C0;
--light-hl-4: #001080;
--dark-hl-4: #9CDCFE;
--light-hl-5: #0000FF;
--dark-hl-5: #569CD6;
--light-hl-6: #0070C1;
--dark-hl-6: #4FC1FF;
--light-hl-7: #795E26;
--dark-hl-7: #DCDCAA;
--light-hl-0: #008000;
--dark-hl-0: #6A9955;
--light-hl-1: #795E26;
--dark-hl-1: #DCDCAA;
--light-hl-2: #000000;
--dark-hl-2: #D4D4D4;
--light-hl-3: #A31515;
--dark-hl-3: #CE9178;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -24,10 +16,6 @@
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--code-background: var(--light-code-background);
} }

Expand All @@ -36,10 +24,6 @@
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--code-background: var(--dark-code-background);
} }

Expand All @@ -48,10 +32,6 @@
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--code-background: var(--light-code-background);
}

Expand All @@ -60,19 +40,11 @@
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--code-background: var(--dark-code-background);
}

.hl-0 { color: var(--hl-0); }
.hl-1 { color: var(--hl-1); }
.hl-2 { color: var(--hl-2); }
.hl-3 { color: var(--hl-3); }
.hl-4 { color: var(--hl-4); }
.hl-5 { color: var(--hl-5); }
.hl-6 { color: var(--hl-6); }
.hl-7 { color: var(--hl-7); }
pre, code { background: var(--code-background); }
Loading

0 comments on commit 749a185

Please sign in to comment.