Skip to content

Commit

Permalink
Merge branch 'next' into docs/v9-redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Apr 29, 2024
2 parents 6b9f5ca + f2bf707 commit ffa4de7
Show file tree
Hide file tree
Showing 16 changed files with 1,247 additions and 1,283 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
name: 'Build & Unit Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
# Required for docs/versions tests
fetch-depth: 0
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
run: date

- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
# Required for docs/versions tests
fetch-depth: 0
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
name: 'E2E Doc Test: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Install pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
Expand All @@ -125,7 +125,7 @@ jobs:
name: 'Lint: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0

Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
name: 'TS-Check: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0

Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
name: 'Codecov: node-20, ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Semantic Pull Request
steps:
- name: Validate PR title
uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0
uses: amannn/action-semantic-pull-request@cfb60706e18bc85e8aec535e3c577abe8f70378e # v5.5.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
133 changes: 49 additions & 84 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,71 @@ const description =
'Generate massive amounts of fake (but reasonable) data for testing and development.';
const image = 'https://fakerjs.dev/social-image.png';

function extendSideNav(current: SidebarItem): SidebarItem[] {
function getSideBarWithExpandedEntry(entryToExpand: string): SidebarItem[] {
const links: SidebarItem[] = [
{
text: 'Guide',
items: [
{
text: 'Usage Guide',
text: 'Getting Started',
link: '/guide/',
},
{
text: 'Usage',
link: '/guide/usage',
},
{
text: 'Localization',
link: '/guide/localization',
},
{
text: 'Frameworks',
link: '/guide/frameworks',
},
{
text: 'Randomizer',
link: '/guide/randomizer',
},
{
text: 'Unique Values',
link: '/guide/unique',
},
{
text: 'Upgrading to v9',
link: '/guide/upgrading',
},
],
},
{
text: 'API',
items: [
{
text: 'API Reference',
link: '/api/',
},
],
items: apiPages,
},
{
text: 'About',
items: [
{
text: 'Announcements',
link: '/about/announcements',
items: [
{ text: '2022-09-08', link: '/about/announcements/2022-09-08' },
{ text: '2022-01-14', link: '/about/announcements/2022-01-14' },
],
},
{
text: 'Roadmap',
link: '/about/roadmap/',
items: [
{
text: 'v9 - Tree-Shakeable Module-Functions',
link: '/about/roadmap/v9',
},
{ text: 'v8 - Make Faker Handier', link: '/about/roadmap/v8' },
{
text: 'v7 - Cleanup & Improvements',
link: '/about/roadmap/v7',
},
{ text: 'v6 - Continue Faker', link: '/about/roadmap/v6' },
],
},
{
text: 'Team',
Expand All @@ -56,7 +91,9 @@ function extendSideNav(current: SidebarItem): SidebarItem[] {
],
},
];
links[links.findIndex((group) => group.text === current.text)] = current;
for (const entry of links) {
entry.collapsed = entry.text !== entryToExpand;
}
return links;
}

Expand Down Expand Up @@ -197,81 +234,9 @@ const config: UserConfig<DefaultTheme.Config> = {
],

sidebar: {
'/guide/': extendSideNav({
text: 'Guide',
items: [
{
text: 'Getting Started',
link: '/guide/',
},
{
text: 'Usage',
link: '/guide/usage',
},
{
text: 'Localization',
link: '/guide/localization',
},
{
text: 'Frameworks',
link: '/guide/frameworks',
},
{
text: 'Randomizer',
link: '/guide/randomizer',
},
{
text: 'Unique Values',
link: '/guide/unique',
},
{
text: 'Upgrading to v9',
link: '/guide/upgrading',
},
],
}),
'/api/': extendSideNav({
text: 'API',
items: apiPages,
}),

'/about/': extendSideNav({
text: 'About',
items: [
{
text: 'Announcements',
link: '/about/announcements',
items: [
{ text: '2022-09-08', link: '/about/announcements/2022-09-08' },
{ text: '2022-01-14', link: '/about/announcements/2022-01-14' },
],
},
{
text: 'Roadmap',
link: '/about/roadmap/',
items: [
{
text: 'v9 - Tree-Shakeable Module-Functions',
link: '/about/roadmap/v9',
},
{ text: 'v8 - Make Faker Handier', link: '/about/roadmap/v8' },
{
text: 'v7 - Cleanup & Improvements',
link: '/about/roadmap/v7',
},
{ text: 'v6 - Continue Faker', link: '/about/roadmap/v6' },
],
},
{
text: 'Team',
link: '/about/team',
},
{
text: 'Contributing',
link: '/about/contributing',
},
],
}),
'/guide/': getSideBarWithExpandedEntry('Guide'),
'/api/': getSideBarWithExpandedEntry('API'),
'/about/': getSideBarWithExpandedEntry('About'),
},
},

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"@vitest/ui": "1.5.0",
"@vueuse/core": "10.9.0",
"conventional-changelog-cli": "4.1.0",
"cypress": "13.8.0",
"cypress": "13.8.1",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-define-config": "2.1.0",
Expand All @@ -127,15 +127,15 @@
"standard-version": "9.5.0",
"ts-morph": "22.0.0",
"tsup": "8.0.2",
"tsx": "4.7.2",
"tsx": "4.7.3",
"typescript": "5.4.5",
"validator": "13.11.0",
"vite": "5.2.10",
"vitepress": "1.1.3",
"vitest": "1.5.0",
"vue": "3.4.24"
"vue": "3.4.25"
},
"packageManager": "pnpm@9.0.5",
"packageManager": "pnpm@9.0.6",
"engines": {
"node": ">=18.0.0",
"npm": ">=9.0.0"
Expand Down
Loading

0 comments on commit ffa4de7

Please sign in to comment.