diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..b7223055e --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +eslint.config.js linguist-vendored diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml new file mode 100644 index 000000000..64bb9bcbd --- /dev/null +++ b/.github/actions/install-dependencies/action.yml @@ -0,0 +1,8 @@ +name: Dependencies + +runs: + using: composite + steps: + - name: Install dependencies + run: yarn install --frozen-lockfile + shell: bash diff --git a/.github/actions/install-tools/action.yml b/.github/actions/install-tools/action.yml new file mode 100644 index 000000000..29d351255 --- /dev/null +++ b/.github/actions/install-tools/action.yml @@ -0,0 +1,9 @@ +name: Install Tools + +runs: + using: composite + steps: + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: 20 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7e2a81c79..1fb2be1e3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: docs +name: Docs on: push: @@ -7,30 +7,23 @@ on: jobs: deploy: + name: Deploy runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 - - name: install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: install node - uses: actions/setup-node@v3 - with: - node-version: 20 - cache: pnpm + - name: Install Tools + uses: ./.github/actions/install-tools - - name: install dependencies - run: pnpm install --frozen-lockfile --ignore-scripts + - name: Install Dependencies + uses: ./.github/actions/install-dependencies - - name: build - run: pnpm run docs:build + - name: Build Docs + run: yarn run docs:build - - name: deploy to netlify + - name: Deploy to Netlify uses: nwtgck/actions-netlify@v1.2 with: publish-dir: './docs/.vitepress/dist' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9097516dc..7d62e4335 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: release +name: Release on: push: @@ -8,24 +8,19 @@ on: jobs: release: + name: Release runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: install node - uses: actions/setup-node@v3 - with: - node-version: 20 + - name: Install Tools + uses: ./.github/actions/install-tools - - run: pnpx changelogithub + - name: Create GitHub Release + run: pnpx changelogithub env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f6026915..a46f1cbce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: test +name: Test on: push: @@ -7,29 +7,53 @@ on: pull_request: jobs: - test: + format: + name: Format runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 - - name: install pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + - name: Install Tools + uses: ./.github/actions/install-tools - - name: install node - uses: actions/setup-node@v3 - with: - node-version: 20 - cache: pnpm + - name: Install Dependencies + uses: ./.github/actions/install-dependencies - - name: install dependencies - run: pnpm install --frozen-lockfile --ignore-scripts + - name: Test + run: yarn run test:format - - name: build - run: pnpm build + js: + name: JS + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Tools + uses: ./.github/actions/install-tools + + - name: Install Dependencies + uses: ./.github/actions/install-dependencies + + - name: Test + run: yarn run test:js + + types: + name: Types + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Tools + uses: ./.github/actions/install-tools + + - name: Install Dependencies + uses: ./.github/actions/install-dependencies - - name: test - run: pnpm test + - name: Test + run: yarn run test:types diff --git a/.simple-git-hooks.json b/.simple-git-hooks.json index d522facb3..3d6af4e06 100644 --- a/.simple-git-hooks.json +++ b/.simple-git-hooks.json @@ -1,3 +1,3 @@ { - "commit-msg": "pnpm exec commitlint -e \"$@\"" + "commit-msg": "yarn run commitlint -e \"$@\"" } diff --git a/.vitepress/theme/components/code-samples-align.vue b/.vitepress/theme/components/code-samples-align.vue index ab358b338..4898055e5 100644 --- a/.vitepress/theme/components/code-samples-align.vue +++ b/.vitepress/theme/components/code-samples-align.vue @@ -76,64 +76,67 @@ export default {