Skip to content

Commit

Permalink
Rebase development (#647)
Browse files Browse the repository at this point in the history
* fix: related articles schema

* perf: fix unused types

* feat: add TS stylelint support

* style: reused test cmd

* perf: improved stylelint rules

* perf: improved lint-staged

* perf: improved promises fetch

* perf: hardcoded strings unification

* perf: hardcoded strings unification

* perf: add const improvements

* feat: type improvements

* style: minor improvements

* style: improve naming

* feat: add map animations

* feat: stable astro actions

* fix: improved accessibility

* fix: restore cmd

* chore(deps): bump yarn

* chore: bump deps

* fix: minor type improvements

* chore(deps): update dependency @types/three to ^0.168.0 (#621)

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

* chore(deps): update dependency @types/react to v18.3.5 (#620)

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

* docs: add todo

* feat: add anti spam check

* feat: improve isolation

* perf: add better exception control

* ci: drop JS support

* perf: remove boilerplate

* feat: major improvements on contact form

* feat: add shared button component

* style: aliased paths

* chore(deps): bump Node

* style: remove CLRF

* style: small improvements + rename

* feat: improve a11

* feat: improve a11

* fix: minor style improvements

* fix: minor style improvements

* chore(deps): bump deps

* style: minor improvements

* feat: add method to get article variant

* feat: add slider for related articles

* fix: minor patch

* chore: bump fonts monorepo

* chore: bump deps

* ci: add ut and e2e actions

* fix: housekeeping

* ci: add release

* feat: add ci and useSyncExternalStore improvements

* perf: remove unnecessary callback

* feat: add prefetch support

* ci: fix style

* ci: fix conditions

* ci: fix var names (#630)

* ci: fix names (#631)

* chore: Update package.json version to 2.0.1

* ci: minor fixes

* ci: fix packagemanager

* ci: fix packagemanager

* chore(deps): bump dset from 3.1.3 to 3.1.4 (#632)

Bumps [dset](https://github.com/lukeed/dset) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/lukeed/dset/releases)
- [Commits](lukeed/dset@v3.1.3...v3.1.4)

---
updated-dependencies:
- dependency-name: dset
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci: add dependabot config support

* chore: bump deps

* style: add ci order

* ci: fix concurrency

* chore: bump deps

* feat: add a11y support for focusable elements

* chore: add codeowners

* chore: bump deps

* chore(deps): bump path-to-regexp from 6.2.2 to 6.3.0 (#633)

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 6.2.2 to 6.3.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](pillarjs/path-to-regexp@v6.2.2...v6.3.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: major update

* style: format

* ci: fix CI name

* ci: fix CI name

* ci: test PR workflow

* fix: add github token

* ci: add linear history

* ci: add merge strategy

* ci: update stragetgy

* ci: restore changes

* chore: update package.json version to 2.0.2

* ci: fix playwright flag

* style: fix spacing

* ci: fix identation

* ci: add assignees

* ci: fix format

* ci: fix format

* chore(deps): bump deps

* style: remove quotation

* fix: renovate config

* chore: bump deps

* ci: remove assignees as per codeowner

* fix: a11y

* chore: bump yarn

* chore: add biome rule

* chore: bump deps

* chore: bump deps

* chore: bump deps

* chore(deps): bump vite from 5.4.3 to 5.4.6 (#646)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.3 to 5.4.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump deps

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 18, 2024
1 parent 728b4d1 commit c742cf7
Show file tree
Hide file tree
Showing 274 changed files with 5,594 additions and 5,511 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @fbuireu
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github: [fbuireu]
patreon: fbuireu
ko_fi: ferranbuireu
patreon: fbuireu
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: saturday
assignees: [fbuireu]
labels: [dependencies, dependabot, bot]
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: saturday
assignees: [fbuireu]
labels: [dependencies, dependabot, bot]
6 changes: 2 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
analyze:
name: Analyze
Expand All @@ -32,5 +30,5 @@ jobs:
queries: security-extended, security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
- name: Run CodeQL Analysis
uses: github/codeql-action/analyze@v3
1 change: 1 addition & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ permissions:
contents: read
jobs:
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: E2E Tests
on:
workflow_dispatch:
pull_request:
branches: [main]
env:
CI: true
E2E_URL: ${{ github.event_name == 'workflow_dispatch' && vars.E2E_PRODUCTION_URL || vars.E2E_SELF_HOSTED_URL }}
E2E_COMMAND: ${{ github.event_name == 'workflow_dispatch' && 'yarn test:e2e' || 'yarn test:e2e:changed' }}
jobs:
e2e-tests:
name: Run E2E tests
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js version from .nvmrc
id: nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Enable Corepack
run: corepack enable
- name: Get Yarn version from package.json
id: yarn_version
run: |
YARN_VERSION=$(jq -r '.packageManager' package.json | grep -o 'yarn@[0-9]*\.[0-9]*\.[0-9]*')
echo "YARN_VERSION=${YARN_VERSION}" >> $GITHUB_ENV
- name: Install correct Yarn version
run: corepack prepare ${{ env.YARN_VERSION }} --activate
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run E2E Tests
run: ${{ env.E2E_COMMAND }}
env:
CI: ${{ env.CI }}
E2E_URL: ${{ env.E2E_URL }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
106 changes: 106 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Release
run-name: Release ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name || github.ref_name }}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for the release (semver format required: x.x.x)'
required: true
push:
tags:
- '*'
workflow_run:
workflows: ["E2E Tests", "Unit Tests"]
types: [completed]
env:
TAG_NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name || github.ref_name }}
jobs:
validate-tag:
name: Validate tag
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Validate tag Format
run: |
if [[ ! "${{ env.TAG_NAME }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Invalid tag format. Please use semver format (x.x.x)."
exit 1
fi
check-tag:
name: Check tag
runs-on: ubuntu-latest
needs: validate-tag
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Check if tag exists
id: check_tag
run: |
git fetch --tags
if git rev-parse "${{ env.TAG_NAME }}" >/dev/null 2>&1; then
echo "Tag already exists. Cancelling the release."
exit 1
fi
check-version:
name: Check Version
runs-on: ubuntu-latest
needs: check-tag
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Install semver
run: npm install -g semver
- name: Verify new version
run: |
CURRENT_VERSION=$(jq -r '.version' package.json)
echo "Current version: $CURRENT_VERSION"
if ! semver -r ">$CURRENT_VERSION" "${{ env.TAG_NAME }}"; then
echo "Error: The new version ${{ env.TAG_NAME }} is not greater than the current version $CURRENT_VERSION."
exit 1
fi
shell: bash
update-version:
name: Update version
runs-on: ubuntu-latest
needs: check-version
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Update package.json version to match tag
run: |
VERSION="${{ env.TAG_NAME }}"
jq --arg version "$VERSION" '.version = $version' package.json > package.json.tmp && mv package.json.tmp package.json
- name: Commit version update
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git commit -am "chore: update package.json version to ${{ env.TAG_NAME }}"
git push origin HEAD
create-release:
name: Create Release
runs-on: ubuntu-latest
needs: update-version
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Create tag (only for workflow_dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git tag ${{ env.TAG_NAME }}
git push origin ${{ env.TAG_NAME }}
- name: Set up GitHub CLI
run: |
sudo apt-get install -y gh
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Create Release with GitHub CLI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.TAG_NAME }} --title "Release ${{ env.TAG_NAME }}" --notes "Release notes generated automatically." --generate-notes
32 changes: 32 additions & 0 deletions .github/workflows/ut.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Unit Tests
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ut-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js version from .nvmrc
id: nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Enable Corepack
run: corepack enable
- name: Get Yarn version from package.json
id: yarn_version
run: |
YARN_VERSION=$(jq -r '.packageManager' package.json | grep -o 'yarn@[0-9]*\.[0-9]*\.[0-9]*')
echo "YARN_VERSION=${YARN_VERSION}" >> $GITHUB_ENV
- name: Install correct Yarn version
run: corepack prepare ${{ env.YARN_VERSION }} --activate
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Execute Unit tests
run: yarn test:ut
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ logs/
*.log
yarn-debug.log*
yarn-error.log*
# eslint cache
.eslintcache

# Coverage directory used by testing tools
coverage/
# Test-related directories
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

# Dependency directories
node_modules/
Expand Down
4 changes: 4 additions & 0 deletions .imgbotconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"schedule": "weekly",
"compressWiki": "true"
}
6 changes: 2 additions & 4 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"src/**/*.{ts,tsx,css,astro}": ["yarn format:changed"],
"src/**/*.{ts,tsx,astro}": ["yarn lint:ts:changed"],
"src/**/*.css": ["yarn lint:styles"],
"src/**/*.{test,spec}.{ts,tsx}": ["yarn test --bail --findRelatedTests"]
"src/**/*.{ts,tsx,css,astro}": ["yarn format:changed", "yarn lint:changed"],
"src/**/*.{test,spec}.{ts,tsx}": ["yarn test:ut:changed"]
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.7.0
22.8.0
4 changes: 0 additions & 4 deletions .stylelintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .stylelintrc.cjs

This file was deleted.

9 changes: 8 additions & 1 deletion astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const isProd = import.meta.env.PROD;

export default defineConfig({
experimental: {
actions: true,
contentLayer: true,
contentCollectionCache: true,
env: {
validateSecrets: true,
schema: {
Expand Down Expand Up @@ -114,6 +114,7 @@ export default defineConfig({
},
},
site: "https://biancafiore.me",
prefetch: true,
vite: {
ssr: {
external: ["firebase-admin", "node:async_hooks", "contentful"],
Expand All @@ -130,6 +131,12 @@ export default defineConfig({
},
}),
],
redirects: {
"/home": {
status: 301,
destination: "/",
},
},
output: "hybrid",
adapter: cloudflare({
platformProxy: {
Expand Down
13 changes: 11 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.1/schema.json",
"files": {
"ignore": ["src/data/*"]
},
"vcs": {
"enabled": true,
"useIgnoreFile": true,
"clientKind": "git",
"defaultBranch": "main"
},
"formatter": {
"lineWidth": 120
},
"css": {
"formatter": {
"enabled": true
}
},
"linter": {
"ignore": ["*.d.ts*"],
"rules": {
"recommended": true
"recommended": true,
"suspicious": {
"noConsole": "error"
}
}
}
}
4 changes: 2 additions & 2 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { UserConfig } from "@commitlint/types";

const Configuration: UserConfig = {
const configuration: UserConfig = {
extends: ["@commitlint/config-conventional"],
parserPreset: "conventional-changelog-atom",
formatter: "@commitlint/format",
Expand All @@ -11,4 +11,4 @@ const Configuration: UserConfig = {
},
};

export default Configuration;
export default configuration;
Loading

0 comments on commit c742cf7

Please sign in to comment.