Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
a76f7e4
Migrate renderer to Vue 3 and Vite
mchoo7 Jul 28, 2026
66410c3
Remove Vue compatibility runtime
mchoo7 Jul 28, 2026
d25a7fa
Update packages
mchoo7 Jul 28, 2026
41bd3fd
Upgrade Vue Router to 5
mchoo7 Jul 28, 2026
16b34c9
Upgrade ESLint to 10 and use flat config
mchoo7 Jul 28, 2026
750727c
Replace Jest with Vitest
mchoo7 Jul 28, 2026
4975d3a
Remove Babel
mchoo7 Jul 28, 2026
3789997
Fix Vite development runtime
mchoo7 Jul 28, 2026
d9aa76f
Improve Vite development diagnostics
mchoo7 Jul 28, 2026
3a0c7d5
Upgrade Tree-sitter dependencies to 0.25
mchoo7 Jul 28, 2026
3d2e77c
Remove IntersectionObserver polyfill
mchoo7 Jul 28, 2026
5c0bf02
Remove obsolete dependency overrides
mchoo7 Jul 28, 2026
63072e9
Update packages
mchoo7 Jul 28, 2026
28f0cfd
Eliminate unit test warnings
mchoo7 Jul 28, 2026
18af0f7
Sync Vue3 template
mchoo7 Jul 28, 2026
22cd4a4
Add .vscode
mchoo7 Jul 29, 2026
c7374fd
Remove core-js from NOTICE.txt
mchoo7 Jul 29, 2026
b2b7172
docs: rename pnpm serve to pnpm dev
mchoo7 Jul 29, 2026
5d43d5e
Migrate vue-i18n to composition mode
mchoo7 Jul 29, 2026
36e42a8
Fix Vite dev navigation and styles
mchoo7 Jul 29, 2026
1aa3616
Avoid empty navigator translations
mchoo7 Jul 29, 2026
5b0c906
Add vitest ui
mchoo7 Jul 29, 2026
dc6b7aa
Update unit tests for Vue 3 runtime changes
mchoo7 Jul 29, 2026
65a52ed
vitest: enable parallelism
mchoo7 Jul 29, 2026
661b168
package.json: restore main
mchoo7 Jul 29, 2026
1f1926f
Restore BreakpointEmitter invalid-scope coverage
mchoo7 Jul 30, 2026
ec5fd3e
Fix plural translation interpolation
mchoo7 Aug 1, 2026
a7e937d
Fix named fallback route paths
mchoo7 Aug 1, 2026
08adc6d
Update serve to dev
mchoo7 Aug 1, 2026
59c9a43
Fix overview card named slot rendering
mchoo7 Aug 1, 2026
327dd55
Preserve rejected route guard outcomes
mchoo7 Aug 1, 2026
62748f4
Declare component events after Vue 3 migration
mchoo7 Aug 1, 2026
e84a7c4
Preserve legacy router history configuration
mchoo7 Aug 1, 2026
5894f86
Migrate router scroll position objects
mchoo7 Aug 1, 2026
2212b13
Update packages, revert to npm, fix build, and use vmThreads for testing
mchoo7 Oct 14, 2026
fcc9448
Fix short-page layout after Vue 3 mount
mchoo7 Oct 16, 2026
563bc7d
Restore documentation sidebar title color
mchoo7 Oct 16, 2026
c353163
Preserve encoded linkable heading anchors
mchoo7 Oct 16, 2026
8c6a794
Fix documentation sidebar title color
mchoo7 Oct 21, 2026
b2beb2b
Restore tutorial navbar title styling
mchoo7 Oct 21, 2026
40f4334
Restore custom dropdown styling and hit area
mchoo7 Oct 21, 2026
8b9f2d2
Restore TutorialsOverview chapter menu spacing
mchoo7 Oct 21, 2026
10a4e5c
Forward call-to-action button attributes
mchoo7 Oct 21, 2026
83ea2f3
Avoid retranslating mentions navigation title
mchoo7 Oct 21, 2026
afd9320
Apply sample download spacing to wrapper
mchoo7 Oct 21, 2026
85141b9
Restore word breaks through forwarded slots
mchoo7 Oct 21, 2026
fc9db85
Fix tutorial chapter fragment links
mchoo7 Oct 21, 2026
1ea0b3f
Return not found for missing archive data
mchoo7 Oct 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 0 additions & 12 deletions .browserslistrc

This file was deleted.

17 changes: 5 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for Swift project authors

[*.{js,jsx,ts,tsx,vue,scss}]
indent_style = space
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
charset = utf-8
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
max_line_length = 100
74 changes: 0 additions & 74 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
48 changes: 35 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,52 @@
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIBUTORS.txt for Swift project authors

.DS_Store
node_modules
/dist
/docs
/tmp

# local env files
.env.local
.env.*.local

# Log files
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
*.sw?

*.tsbuildinfo

.eslintcache

# Cypress
/cypress/videos/
/cypress/screenshots/

# Vitest
__screenshots__/

# Vite
*.timestamp-*-*.mjs

# local env files
.env.local
.env.*.local

__pycache__

.docc-build
/docs
/tmp
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.17.0
24
28 changes: 28 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": [
"coverage/**",
"dist/**",
"docs/**",
"node_modules/**",
"tmp/**"
],
"plugins": ["eslint", "unicorn", "oxc", "vue", "vitest"],
"env": {
"browser": true,
"node": true
},
"categories": {
"correctness": "error"
},
"rules": {
"no-unused-vars": "off",
"unicorn/no-thenable": "off",
"vitest/expect-expect": "off",
"vitest/no-conditional-expect": "off",
"vitest/require-to-throw-message": "off",
"vitest/valid-expect": "off",
"vitest/valid-title": "off",
"vue/no-reserved-component-names": "off"
}
}
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"Vue.volar",
"vitest.explorer",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"oxc.oxc-vscode"
]
}
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ more details.

### Run Steps

> Note: requires [Node.js](https://nodejs.org/en/download/) v18
> and [npm](https://www.npmjs.com/package/npm) v9.5. An easy way to set these up is to install
> Note: requires [Node.js](https://nodejs.org/en/download/) v24
> and [npm](https://www.npmjs.com/package/npm) v11.19. An easy way to set these up is to install
> [nvm](https://github.com/nvm-sh/nvm) and run `nvm install` from within the Swift-DocC-Render
> repository. To use these versions as the default, add `--default` to the installation command.

Expand All @@ -73,15 +73,15 @@ more details.
npm install
```

4. Run a local server with hot reload at [localhost:8080](http://localhost:8080/)
4. Run a local server with hot reload at [localhost:5173](http://localhost:5173/)

You may want to set an http endpoint as a proxy to handle data requests while developing locally.

```shell
VUE_APP_DEV_SERVER_PROXY=https://localhost:8000 npm run serve
VITE_DEV_SERVER_PROXY=https://localhost:8000 npm run dev
```

As an alternative you can just create a `.env.development.local` file on the root of the project to add the `VUE_APP_DEV_SERVER_PROXY` env varible so you don't have to set it in the `npm run serve` script each time.
As an alternative you can just create a `.env.development.local` file on the root of the project to add the `VITE_DEV_SERVER_PROXY` environment variable so you don't have to set it in the `npm run dev` script each time.

### Build Steps

Expand Down Expand Up @@ -149,7 +149,7 @@ Before opening a pull request, we ask that you:
### Tests and linting

Run the following script to:
- Run unit tests with [Jest](https://jestjs.io/)
- Run unit tests with [Vitest](https://vitest.dev/)
- Find syntax errors with [ESLint](https://eslint.org/)
- Check that all files have license headers

Expand Down
18 changes: 0 additions & 18 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ This product depends on vue-router.

---

This product depends on core-js.

* LICENSE (MIT):
* https://github.com/zloirock/core-js/blob/master/LICENSE
* HOMEPAGE:
* https://github.com/zloirock/core-js

---

This product depends on Highlight.js.

* LICENSE (BSD-3-Clause):
Expand All @@ -57,15 +48,6 @@ This product depends on Highlight.js.

---

This product depends on the IntersectionObserver polyfill.

* LICENSE (W3C Software and Document):
* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
* HOMEPAGE:
* https://github.com/w3c/IntersectionObserver/tree/main/polyfill

---

This product depends on PortalVue.

* LICENSE (MIT):
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ SPAs are web apps that render dynamically at runtime entirely in the browser, us

## Getting Started

> Note: requires [Node.js](https://nodejs.org/en/download/) v22.17.0
> and [npm](https://www.npmjs.com/package/npm) v10.9.2. An easy way to set these up is to install
> Note: requires [Node.js](https://nodejs.org/en/download/) v24.12.0
> and [npm](https://www.npmjs.com/package/npm) v11.19. An easy way to set these up is to install
> [nvm](https://github.com/nvm-sh/nvm) and run `nvm install` from within the Swift-DocC-Render
> repository. To use these versions as the default, add `--default` to the installation command.

Expand All @@ -25,15 +25,26 @@ SPAs are web apps that render dynamically at runtime entirely in the browser, us
npm install
```

3. **Run a local server with hot reload at [localhost:8080](http://localhost:8080/)**
3. **Run a local server with hot reload at [localhost:5173](http://localhost:5173/)**

You may want to set a proxy to handle data requests while developing locally by setting the VUE_APP_DEV_SERVER_PROXY env variable to a documentation archive (.doccarchive or .docc-build) on your disk or served in a HTTP endpoint:
You may want to set a proxy to handle data requests while developing locally by setting the VITE_DEV_SERVER_PROXY environment variable to a documentation archive (.doccarchive or .docc-build) on your disk or served at an HTTP endpoint:

```shell
VUE_APP_DEV_SERVER_PROXY=[path to documentation archive] npm run serve
VITE_DEV_SERVER_PROXY=[path to documentation archive] npm run dev
```

As an alternative you can just create a `.env.development.local` file on the root of the project to add the `VUE_APP_DEV_SERVER_PROXY` env variable so you don't have to set it in the `npm run serve` script each time.
As an alternative you can just create a `.env.development.local` file on the root of the project to add the `VITE_DEV_SERVER_PROXY` env variable so you don't have to set it in the `npm run dev` script each time.

`SwiftDocCRender.docc` is a source catalog, not a rendered documentation archive.
To use this repository's documentation while developing the renderer, generate its
data first and open the documentation route rather than the site root:

```shell
npm run docs:build
VITE_DEV_SERVER_PROXY=docs npm run dev
```

Then visit [localhost:5173/documentation/swiftdoccrender](http://localhost:5173/documentation/swiftdoccrender).

## Using Swift-DocC-Render to render documentation

Expand Down
18 changes: 9 additions & 9 deletions SwiftDocCRender.docc/contributing/Internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ If you need access to a global mixin or var, from `_core.scss` you have to impor

#### Unit tests

DocC-Render is unit tested, using the [Jest](https://jestjs.io/) testing framework. All components and utilities strive to have a corresponding test file inside the `tests` folder, mirroring the file's location.
DocC-Render is unit tested using the [Vitest](https://vitest.dev/) testing framework. All components and utilities strive to have a corresponding test file inside the `tests` folder, mirroring the file's location.

Unit tests can be run via:

* `npm run test:unit` - run all unittests
* `npm run test:unit` - run all unit tests
* `npm run test:unit:watch` - run only the modified files and watch for changes
* `npx run test:unit tests/unit/path/to/spec.js` - run an individual test file
* `npm run test:unit tests/unit/path/to/spec.js` - run an individual test file

#### Code style

Expand All @@ -166,23 +166,23 @@ To automatically fix any error, run:

`npm run lint:fix`

If you use the development server via `npm run serve`, files are linted on each change. Read more about configuring your linter [here](https://cli.vuejs.org/core-plugins/eslint.html#configuration).
Read more about configuring the linter in the [ESLint configuration documentation](https://eslint.org/docs/latest/use/configure/).

#### Environment flags

DocC-Render has a few build-time environment flags, that allow you to set configuration parameters before building. Read [How to set Environment Variables in Vue CLI](https://cli.vuejs.org/guide/mode-and-env.html#environment-variables).
DocC-Render has a few build-time environment flags that allow you to set configuration parameters before building. Read [Vite's environment variable documentation](https://vite.dev/guide/env-and-mode.html).

**List of env variables:**

* **VUE_APP_DEV_SERVER_PROXY** - The HTTP endpoint or local filepath to read render JSON from when using the development server
* **VUE_APP_TITLE** - An optional default page title to apply to pages
* **VUE_APP_HLJS_LANGUAGES** - An optional comma-separated list of highlight.js languages to include in the build
* **VITE_DEV_SERVER_PROXY** - The HTTP endpoint or local filepath to read render JSON from when using the development server
* **VITE_APP_TITLE** - An optional default page title to apply to pages
* **VITE_APP_HLJS_LANGUAGES** - An optional comma-separated list of highlight.js languages to include in the build

#### Available Scripts

These are the most commonly used npm scripts you would need to develop DocC-Render:

* **serve** - used while developing DocC-Render or a theme. Starts up a custom live-reloading server, which serves a local DocC-Render instance.
* **dev** - used while developing DocC-Render or a theme. Starts up a custom live-reloading server, which serves a local DocC-Render instance.
* **build** - builds DocC-Render, in a state ready for `docc`.
* **test** - run the entire DocC-Render test suite.
* **lint** - run the linter, to check for code styling errors.
Expand Down
Loading