Compare commits

..

5 Commits

Author SHA1 Message Date
L-Sun
34a3c83d84 fix(editor): prevent SwiftKey IME double input (#13590)
Close
[BS-3610](https://linear.app/affine-design/issue/BS-3610/bug-每次按空格会出现重复单词-,特定输入法,比如swiftkey)

#### PR Dependency Tree

* **PR #13591**
  * **PR #13590** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- Bug Fixes
- Android: More reliable Backspace/delete handling, preventing missed
inputs and double-deletions.
- Android: Cursor/selection is correctly restored after merging a
paragraph with the previous block.
- Android: Smoother IME composition input; captures correct composition
range.
- Deletion across lines and around embeds/empty lines is more
consistent.
- Chores
- Internal event handling updated to improve Android compatibility and
stability (no user-facing changes).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->





#### PR Dependency Tree


* **PR #13591**
  * **PR #13590** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
2025-09-16 17:02:54 +08:00
L-Sun
fd717af3db fix(core): update and fix oxlint error (#13591)
#### PR Dependency Tree


* **PR #13591** 👈
  * **PR #13590**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- Bug Fixes
- Improved drag-and-drop stability: draggables, drop targets, and
monitors now respond when option sources or external data change.
- Improved async actions and permission checks to always use the latest
callbacks and error handlers.

- Chores
  - Lint/Prettier configs updated to ignore the Git directory.
  - Upgraded oxlint dev dependency.

- Tests
- Updated several end-to-end tests for more reliable text selection,
focus handling, and timing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-16 16:47:43 +08:00
renovate[bot]
039976ee6d chore: bump up vite version to v6.3.6 [SECURITY] (#13573)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [vite](https://vite.dev)
([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite))
| [`6.3.5` ->
`6.3.6`](https://renovatebot.com/diffs/npm/vite/6.3.5/6.3.6) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/6.3.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/6.3.5/6.3.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

### GitHub Vulnerability Alerts

####
[CVE-2025-58751](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c)

### Summary
Files starting with the same name with the public directory were served
bypassing the `server.fs` settings.

### Impact
Only apps that match the following conditions are affected:

- explicitly exposes the Vite dev server to the network (using --host or
[`server.host` config
option](https://vitejs.dev/config/server-options.html#server-host))
- uses [the public directory
feature](https://vite.dev/guide/assets.html#the-public-directory)
(enabled by default)
- a symlink exists in the public directory

### Details
The
[servePublicMiddleware](9719497ade/packages/vite/src/node/server/middlewares/static.ts (L79))
function is in charge of serving public files from the server. It
returns the
[viteServePublicMiddleware](9719497ade/packages/vite/src/node/server/middlewares/static.ts (L106))
function which runs the needed tests and serves the page. The
viteServePublicMiddleware function [checks if the publicFiles variable
is
defined](9719497ade/packages/vite/src/node/server/middlewares/static.ts (L111)),
and then uses it to determine if the requested page is public. In the
case that the publicFiles is undefined, the code will treat the
requested page as a public page, and go on with the serving function.
[publicFiles may be undefined if there is a symbolic link anywhere
inside the public
directory](9719497ade/packages/vite/src/node/publicDir.ts (L21)).
In that case, every requested page will be passed to the public serving
function. The serving function is based on the
[sirv](https://redirect.github.com/lukeed/sirv) library. Vite patches
the library to add the possibility to test loading access to pages, but
when the public page middleware [disables this
functionality](9719497ade/packages/vite/src/node/server/middlewares/static.ts (L89))
since public pages are meant to be available always, regardless of
whether they are in the allow or deny list.

In the case of public pages, the serving function is [provided with the
path to the public
directory](9719497ade/packages/vite/src/node/server/middlewares/static.ts (L85))
as a root directory. The code of the sirv library [uses the join
function to get the full path to the requested
file](d061616827/packages/sirv/index.mjs (L42)).
For example, if the public directory is "/www/public", and the requested
file is "myfile", the code will join them to the string
"/www/public/myfile". The code will then pass this string to the
normalize function. Afterwards, the code will [use the string's
startsWith
function](d061616827/packages/sirv/index.mjs (L43))
to determine whether the created path is within the given directory or
not. Only if it is, it will be served.

Since [sirv trims the trailing slash of the public
directory](d061616827/packages/sirv/index.mjs (L119)),
the string's startsWith function may return true even if the created
path is not within the public directory. For example, if the server's
root is at "/www", and the public directory is at "/www/p", if the
created path will be "/www/private.txt", the startsWith function will
still return true, because the string "/www/private.txt" starts with 
"/www/p". To achieve this, the attacker will use ".." to ask for the
file "../private.txt". The code will then join it to the "/www/p"
string, and will receive "/www/p/../private.txt". Then, the normalize
function will return "/www/private.txt", which will then be passed to
the startsWith function, which will return true, and the processing of
the page will continue without checking the deny list (since this is the
public directory middleware which doesn't check that).

### PoC
Execute the following shell commands:

```
npm  create  vite@latest
cd vite-project/
mkdir p
cd p
ln -s a b
cd ..
echo  'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({publicDir: path.resolve(__dirname, "p/"), server: {fs: {deny: [path.resolve(__dirname, "private.txt")]}}})' > vite.config.js
echo  "secret" > private.txt
npm install
npm run dev
```

Then, in a different shell, run the following command:

`curl -v --path-as-is 'http://localhost:5173/private.txt'`

You will receive a 403 HTTP Response,  because private.txt is denied.

Now in the same shell run the following command:

`curl -v --path-as-is 'http://localhost:5173/../private.txt'`

You will receive the contents of private.txt.

### Related links
-
f0113f3f82

####
[CVE-2025-58752](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-jqfw-vq24-v9c3)

### Summary
Any HTML files on the machine were served regardless of the `server.fs`
settings.

### Impact

Only apps that match the following conditions are affected:

- explicitly exposes the Vite dev server to the network (using --host or
[server.host config
option](https://vitejs.dev/config/server-options.html#server-host))
- `appType: 'spa'` (default) or `appType: 'mpa'` is used

This vulnerability also affects the preview server. The preview server
allowed HTML files not under the output directory to be served.

### Details
The
[serveStaticMiddleware](9719497ade/packages/vite/src/node/server/middlewares/static.ts (L123))
function is in charge of serving static files from the server. It
returns the
[viteServeStaticMiddleware](9719497ade/packages/vite/src/node/server/middlewares/static.ts (L136))
function which runs the needed tests and serves the page. The
viteServeStaticMiddleware function [checks if the extension of the
requested file is
".html"](9719497ade/packages/vite/src/node/server/middlewares/static.ts (L144)).
If so, it doesn't serve the page. Instead, the server will go on to the
next middlewares, in this case
[htmlFallbackMiddleware](9719497ade/packages/vite/src/node/server/middlewares/htmlFallback.ts (L14)),
and then to
[indexHtmlMiddleware](9719497ade/packages/vite/src/node/server/middlewares/indexHtml.ts (L438)).
These middlewares don't perform any test against allow or deny rules,
and they don't make sure that the accessed file is in the root directory
of the server. They just find the file and send back its contents to the
client.

### PoC
Execute the following shell commands:

```
npm  create  vite@latest
cd vite-project/
echo  "secret" > /tmp/secret.html
npm install
npm run dev
```

Then, in a different shell, run the following command:

`curl -v --path-as-is
'http://localhost:5173/../../../../../../../../../../../tmp/secret.html'`

The contents of /tmp/secret.html will be returned.

This will also work for HTML files that are in the root directory of the
project, but are in the deny list (or not in the allow list). Test that
by stopping the running server (CTRL+C), and running the following
commands in the server's shell:

```
echo  'import path from "node:path"; import { defineConfig } from "vite"; export default defineConfig({server: {fs: {deny: [path.resolve(__dirname, "secret_files/*")]}}})'  >  [vite.config.js](http://vite.config.js)
mkdir secret_files
echo "secret txt" > secret_files/secret.txt
echo "secret html" > secret_files/secret.html
npm run dev

```

Then, in a different shell, run the following command:

`curl -v --path-as-is 'http://localhost:5173/secret_files/secret.txt'`

You will receive a 403 HTTP Response,  because everything in the
secret_files directory is denied.

Now in the same shell run the following command:

`curl -v --path-as-is 'http://localhost:5173/secret_files/secret.html'`

You will receive the contents of secret_files/secret.html.

---

### Release Notes

<details>
<summary>vitejs/vite (vite)</summary>

###
[`v6.3.6`](https://redirect.github.com/vitejs/vite/releases/tag/v6.3.6)

[Compare
Source](https://redirect.github.com/vitejs/vite/compare/v6.3.5...v6.3.6)

Please refer to
[CHANGELOG.md](https://redirect.github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
for details.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no
schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/toeverything/AFFiNE).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-14 01:55:54 +08:00
dependabot[bot]
e158e11608 chore: bump sha.js from 2.4.11 to 2.4.12 (#13560)
Bumps [sha.js](https://github.com/crypto-browserify/sha.js) from 2.4.11
to 2.4.12.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/browserify/sha.js/blob/master/CHANGELOG.md">sha.js's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/browserify/sha.js/compare/v2.4.11...v2.4.12">v2.4.12</a>
- 2025-07-01</h2>
<h3>Commits</h3>
<ul>
<li>[eslint] switch to eslint <a
href="7acadfbd3a"><code>7acadfb</code></a></li>
<li>[meta] add <code>auto-changelog</code> <a
href="b46e7116eb"><code>b46e711</code></a></li>
<li>[eslint] fix package.json indentation <a
href="df9d521e16"><code>df9d521</code></a></li>
<li>[Tests] migrate from travis to GHA <a
href="c43c64adc6"><code>c43c64a</code></a></li>
<li>[Fix] support multi-byte wide typed arrays <a
href="f2a258e9f2"><code>f2a258e</code></a></li>
<li>[meta] reorder package.json <a
href="d8d77c0a72"><code>d8d77c0</code></a></li>
<li>[meta] add <code>npmignore</code> <a
href="35aec35c66"><code>35aec35</code></a></li>
<li>[Tests] avoid console logs <a
href="73e33ae0ca"><code>73e33ae</code></a></li>
<li>[Tests] fix tests run in batch <a
href="262913006e"><code>2629130</code></a></li>
<li>[Tests] drop node requirement to 0.10 <a
href="00c7f234aa"><code>00c7f23</code></a></li>
<li>[Dev Deps] update <code>buffer</code>,
<code>hash-test-vectors</code>, <code>standard</code>,
<code>tape</code>, <code>typedarray</code> <a
href="92b5de5f67"><code>92b5de5</code></a></li>
<li>[Tests] drop node requirement to v3 <a
href="9b5eca80fd"><code>9b5eca8</code></a></li>
<li>[meta] set engines to <code>&amp;gt;= 4</code> <a
href="807084c5c0"><code>807084c</code></a></li>
<li>Only apps should have lockfiles <a
href="c72789c7a1"><code>c72789c</code></a></li>
<li>[Deps] update <code>inherits</code>, <code>safe-buffer</code> <a
href="5428cfc6f7"><code>5428cfc</code></a></li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code> <a
href="2dbe0aab41"><code>2dbe0aa</code></a></li>
<li>update README to reflect LICENSE <a
href="8938256dbb"><code>8938256</code></a></li>
<li>[Dev Deps] add missing peer dep <a
href="d52889688c"><code>d528896</code></a></li>
<li>[Dev Deps] remove unused <code>buffer</code> dep <a
href="94ca7247f4"><code>94ca724</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eb4ea2fd3d"><code>eb4ea2f</code></a>
v2.4.12</li>
<li><a
href="d8d77c0a72"><code>d8d77c0</code></a>
[meta] reorder package.json</li>
<li><a
href="df9d521e16"><code>df9d521</code></a>
[eslint] fix package.json indentation</li>
<li><a
href="35aec35c66"><code>35aec35</code></a>
[meta] add <code>npmignore</code></li>
<li><a
href="d52889688c"><code>d528896</code></a>
[Dev Deps] add missing peer dep</li>
<li><a
href="b46e7116eb"><code>b46e711</code></a>
[meta] add <code>auto-changelog</code></li>
<li><a
href="94ca7247f4"><code>94ca724</code></a>
[Dev Deps] remove unused <code>buffer</code> dep</li>
<li><a
href="2dbe0aab41"><code>2dbe0aa</code></a>
[Dev Deps] update <code>@ljharb/eslint-config</code></li>
<li><a
href="73e33ae0ca"><code>73e33ae</code></a>
[Tests] avoid console logs</li>
<li><a
href="f2a258e9f2"><code>f2a258e</code></a>
[Fix] support multi-byte wide typed arrays</li>
<li>Additional commits viewable in <a
href="https://github.com/crypto-browserify/sha.js/compare/v2.4.11...v2.4.12">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~ljharb">ljharb</a>, a new releaser for
sha.js since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sha.js&package-manager=npm_and_yarn&previous-version=2.4.11&new-version=2.4.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/toeverything/AFFiNE/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-07 00:17:51 +08:00
renovate[bot]
18faaa38a0 chore: bump up mermaid version to v10.9.4 [SECURITY] (#13518)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [mermaid](https://redirect.github.com/mermaid-js/mermaid) | [`10.9.3`
-> `10.9.4`](https://renovatebot.com/diffs/npm/mermaid/10.9.3/10.9.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/mermaid/10.9.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mermaid/10.9.3/10.9.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

### GitHub Vulnerability Alerts

####
[CVE-2025-54881](https://redirect.github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh)

### Summary
In the default configuration of mermaid 11.9.0, user supplied input for
sequence diagram labels is passed to `innerHTML` during calculation of
element size, causing XSS.

### Details
Sequence diagram node labels with KaTeX delimiters are passed through
`calculateMathMLDimensions`. This method passes the full label to
`innerHTML` which allows allows malicious users to inject arbitrary HTML
and cause XSS when mermaid-js is used in it's default configuration
(with KaTeX support enabled).

The vulnerability lies here:

```ts
export const calculateMathMLDimensions = async (text: string, config: MermaidConfig) => {
  text = await renderKatex(text, config);
  const divElem = document.createElement('div');
  divElem.innerHTML = text; // XSS sink, text has not been sanitized.
  divElem.id = 'katex-temp';
  divElem.style.visibility = 'hidden';
  divElem.style.position = 'absolute';
  divElem.style.top = '0';
  const body = document.querySelector('body');
  body?.insertAdjacentElement('beforeend', divElem);
  const dim = { width: divElem.clientWidth, height: divElem.clientHeight };
  divElem.remove();
  return dim;
};
```

The `calculateMathMLDimensions` method was introduced in
5c69e5fdb004a6d0a2abe97e23d26e223a059832 two years ago, which was
released in [Mermaid
10.9.0](https://redirect.github.com/mermaid-js/mermaid/releases/tag/v10.9.0).

### PoC
Render the following diagram and observe the modified DOM.

```
sequenceDiagram
    participant A as Alice<img src="x" onerror="document.write(`xss on ${document.domain}`)">$$\\text{Alice}$$
    A->>John: Hello John, how are you?
    Alice-)John: See you later!
```

Here is a PoC on mermaid.live:
https://mermaid.live/edit#pako:eNpVUMtOwzAQ_BWzyoFKaRTyaFILiio4IK7ckA-1km1iKbaLY6spUf4dJ0AF68uOZ2dm7REqXSNQ6PHDoarwWfDGcMkUudaJGysqceLKkj3hPdl3osJ7IRvSm-qBwcCAaIXGaONRrSsnUdnobITF28PQ954lwXglai25UNNhxWAXBMyXxcGOi-3kL_5k79e73atuFSUv2HWazH1IWn0m3CC5aPf4b3p2WK--BW-4DJCOWzQ3TM0HQmiMqIFa4zAEicZv4iGMsw0D26JEBtS3NR656ywDpiYv869_11r-Ko12TQv0yLveI3eqfcjP111HUNVonrRTFuhdsVgAHWEAmuRxlG7SuEzKMi-yJAnhAjTLIk_EcbFJtuk2y9MphM8lM47KIp--AOZghtU

### Impact
XSS on all sites that use mermaid and render user supplied diagrams
without further sanitization.

### Remediation
The value of the `text` argument for the `calculateMathMLDimensions`
method needs to be sanitized before getting passed on to `innerHTML`.

---

### Release Notes

<details>
<summary>mermaid-js/mermaid (mermaid)</summary>

###
[`v10.9.4`](https://redirect.github.com/mermaid-js/mermaid/releases/tag/v10.9.4)

[Compare
Source](https://redirect.github.com/mermaid-js/mermaid/compare/v10.9.3...v10.9.4)

This release backports the fix for GHSA-7rqq-prvp-x9jh from
[v11.10.0](https://redirect.github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.10.0),
preventing a potential XSS attack in labels in sequence diagrams.

See:
[`9d68517`](9d685178d2)
(on `main` branch)
See:
[`7509b06`](7509b066f1)
(backported commit)

**Full Changelog**:
<https://github.com/mermaid-js/mermaid/compare/v10.9.3...v10.9.4>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no
schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/toeverything/AFFiNE).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44MS4yIiwidXBkYXRlZEluVmVyIjoiNDEuODIuNyIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 14:37:24 +08:00
20 changed files with 329 additions and 829 deletions

View File

@@ -2,6 +2,7 @@
**/node_modules **/node_modules
.yarn .yarn
.github/helm .github/helm
.git
.vscode .vscode
.yarnrc.yml .yarnrc.yml
.docker .docker

View File

@@ -1,53 +0,0 @@
# Ten Most Recent Bug Issues in toeverything/AFFiNE
This is a simple list of the ten most recent bug issues from the toeverything/AFFiNE GitHub repository:
## 🐛 Open Issues
1. **#12128** - [Bug]: Edgeless Export Frames as Image (PNG/SVG)
- Created: May 5, 2025 by @fallsdevil
- https://github.com/toeverything/AFFiNE/issues/12128
2. **#12115** - [Bugt]: add a way to zoom without needing a middle mouse button
- Created: May 2, 2025 by @gabrielcamilo0321
- https://github.com/toeverything/AFFiNE/issues/12115
3. **#11656** - [Bug]: Attachment in database view is not visible on the shared view of the page
- Created: Apr 13, 2025 by @wikinikiwings
- https://github.com/toeverything/AFFiNE/issues/11656
4. **#11515** - [Bug]: Input text exceeds before character selection
- Created: Apr 7, 2025 by @Edit-Mr
- https://github.com/toeverything/AFFiNE/issues/11515
## ✅ Recently Closed Issues
5. **#11719** - [Bug]: Web frontend ignores AFFINE_SERVER_SUB_PATH
- Created: Apr 15, 2025 by @jorne
- https://github.com/toeverything/AFFiNE/issues/11719
6. **#9526** - journals's title(and its property) get lost after exporting and importing
- Created: Jan 5, 2025 by @happyZYM
- https://github.com/toeverything/AFFiNE/issues/9526
7. **#8559** - Loss folder information when import Workspace
- Created: Oct 21, 2024 by @Markche1985
- https://github.com/toeverything/AFFiNE/issues/8559
8. **#7937** - Linux App version bugged - JavaScript errors since last update
- Created: Aug 21, 2024 by @MindHack
- https://github.com/toeverything/AFFiNE/issues/7937
9. **#7881** - [bug] Opening Docs in new tabs redirects to app.affine.pro
- Created: Aug 15, 2024 by @compgeniuses
- https://github.com/toeverything/AFFiNE/issues/7881
10. **#7822** - Linked docs in the sidebar cannot be sorted or ordered
- Created: Aug 9, 2024 by @JimmFly
- https://github.com/toeverything/AFFiNE/issues/7822
---
**Summary**: 4 open issues, 6 closed issues
*This list was generated using the bug-issues tool in tools/bug-issues/*

View File

@@ -24,7 +24,7 @@ import {
getPrevContentBlock, getPrevContentBlock,
matchModels, matchModels,
} from '@blocksuite/affine-shared/utils'; } from '@blocksuite/affine-shared/utils';
import { IS_MOBILE } from '@blocksuite/global/env'; import { IS_ANDROID, IS_MOBILE } from '@blocksuite/global/env';
import { BlockSelection, type EditorHost } from '@blocksuite/std'; import { BlockSelection, type EditorHost } from '@blocksuite/std';
import type { BlockModel, Text } from '@blocksuite/store'; import type { BlockModel, Text } from '@blocksuite/store';
@@ -79,6 +79,28 @@ export function mergeWithPrev(editorHost: EditorHost, model: BlockModel) {
index: lengthBeforeJoin, index: lengthBeforeJoin,
length: 0, length: 0,
}).catch(console.error); }).catch(console.error);
// due to some IME like Microsoft Swift IME on Android will reset range after join text,
// for example:
//
// $ZERO_WIDTH_FOR_EMPTY_LINE <--- p1
// |aaa <--- p2
//
// after pressing backspace, during beforeinput event, the native range is (p1, 1) -> (p2, 0)
// and after browser and IME handle the event, the native range is (p1, 1) -> (p1, 1)
//
// a|aa <--- p1
//
// so we need to set range again after join text.
if (IS_ANDROID) {
setTimeout(() => {
asyncSetInlineRange(editorHost.std, prevBlock, {
index: lengthBeforeJoin,
length: 0,
}).catch(console.error);
});
}
return true; return true;
} }

View File

@@ -1,4 +1,5 @@
import { IS_MAC } from '@blocksuite/global/env'; import { DisposableGroup } from '@blocksuite/global/disposable';
import { IS_ANDROID, IS_MAC } from '@blocksuite/global/env';
import { import {
type UIEventHandler, type UIEventHandler,
@@ -6,7 +7,7 @@ import {
UIEventStateContext, UIEventStateContext,
} from '../base.js'; } from '../base.js';
import type { EventOptions, UIEventDispatcher } from '../dispatcher.js'; import type { EventOptions, UIEventDispatcher } from '../dispatcher.js';
import { bindKeymap } from '../keymap.js'; import { androidBindKeymapPatch, bindKeymap } from '../keymap.js';
import { KeyboardEventState } from '../state/index.js'; import { KeyboardEventState } from '../state/index.js';
import { EventScopeSourceType, EventSourceState } from '../state/source.js'; import { EventScopeSourceType, EventSourceState } from '../state/source.js';
@@ -87,15 +88,29 @@ export class KeyboardControl {
} }
bindHotkey(keymap: Record<string, UIEventHandler>, options?: EventOptions) { bindHotkey(keymap: Record<string, UIEventHandler>, options?: EventOptions) {
return this._dispatcher.add( const disposables = new DisposableGroup();
'keyDown', if (IS_ANDROID) {
ctx => { disposables.add(
if (this.composition) return false; this._dispatcher.add('beforeInput', ctx => {
const binding = bindKeymap(keymap); if (this.composition) return false;
return binding(ctx); const binding = androidBindKeymapPatch(keymap);
}, return binding(ctx);
options })
);
}
disposables.add(
this._dispatcher.add(
'keyDown',
ctx => {
if (this.composition) return false;
const binding = bindKeymap(keymap);
return binding(ctx);
},
options
)
); );
return () => disposables.dispose();
} }
listen() { listen() {

View File

@@ -103,3 +103,25 @@ export function bindKeymap(
return false; return false;
}; };
} }
// In some IME of Android like, the keypress event dose not contain
// the information about what key is pressed. See
// https://stackoverflow.com/a/68188679
// https://stackoverflow.com/a/66724830
export function androidBindKeymapPatch(
bindings: Record<string, UIEventHandler>
): UIEventHandler {
return ctx => {
const event = ctx.get('defaultState').event;
if (!(event instanceof InputEvent)) return;
if (
event.inputType === 'deleteContentBackward' &&
'Backspace' in bindings
) {
return bindings['Backspace'](ctx);
}
return false;
};
}

View File

@@ -1,3 +1,4 @@
import { IS_ANDROID } from '@blocksuite/global/env';
import type { BaseTextAttributes } from '@blocksuite/store'; import type { BaseTextAttributes } from '@blocksuite/store';
import type { InlineEditor } from '../inline-editor.js'; import type { InlineEditor } from '../inline-editor.js';
@@ -41,11 +42,10 @@ export class EventService<TextAttributes extends BaseTextAttributes> {
} }
}; };
private readonly _onBeforeInput = (event: InputEvent) => { private readonly _onBeforeInput = async (event: InputEvent) => {
const range = this.editor.rangeService.getNativeRange(); const range = this.editor.rangeService.getNativeRange();
if ( if (
this.editor.isReadonly || this.editor.isReadonly ||
this._isComposing ||
!range || !range ||
!this._isRangeCompletelyInRoot(range) !this._isRangeCompletelyInRoot(range)
) )
@@ -54,33 +54,29 @@ export class EventService<TextAttributes extends BaseTextAttributes> {
let inlineRange = this.editor.toInlineRange(range); let inlineRange = this.editor.toInlineRange(range);
if (!inlineRange) return; if (!inlineRange) return;
if (this._isComposing) {
if (IS_ANDROID && event.inputType === 'insertCompositionText') {
this._compositionInlineRange = inlineRange;
}
return;
}
let ifHandleTargetRange = true; let ifHandleTargetRange = true;
if (event.inputType.startsWith('delete')) { if (
if ( event.inputType.startsWith('delete') &&
isInEmbedGap(range.commonAncestorContainer) && (isInEmbedGap(range.commonAncestorContainer) ||
inlineRange.length === 0 &&
inlineRange.index > 0
) {
inlineRange = {
index: inlineRange.index - 1,
length: 1,
};
ifHandleTargetRange = false;
} else if (
isInEmptyLine(range.commonAncestorContainer) &&
inlineRange.length === 0 &&
inlineRange.index > 0
// eslint-disable-next-line sonarjs/no-duplicated-branches
) {
// do not use target range when deleting across lines
// https://github.com/toeverything/blocksuite/issues/5381 // https://github.com/toeverything/blocksuite/issues/5381
inlineRange = { isInEmptyLine(range.commonAncestorContainer)) &&
index: inlineRange.index - 1, inlineRange.length === 0 &&
length: 1, inlineRange.index > 0
}; ) {
ifHandleTargetRange = false; // do not use target range when deleting across lines
} inlineRange = {
index: inlineRange.index - 1,
length: 1,
};
ifHandleTargetRange = false;
} }
if (ifHandleTargetRange) { if (ifHandleTargetRange) {
@@ -97,11 +93,24 @@ export class EventService<TextAttributes extends BaseTextAttributes> {
} }
} }
} }
if (!inlineRange) return; if (!inlineRange) return;
event.preventDefault(); event.preventDefault();
if (IS_ANDROID) {
this.editor.rerenderWholeEditor();
await this.editor.waitForUpdate();
if (
event.inputType === 'deleteContentBackward' &&
!(inlineRange.index === 0 && inlineRange.length === 0)
) {
// when press backspace at offset 1, double characters will be removed.
// because we mock backspace key event `androidBindKeymapPatch` in blocksuite/framework/std/src/event/keymap.ts
// so we need to stop the event propagation to prevent the double characters removal.
event.stopPropagation();
}
}
const ctx: BeforeinputHookCtx<TextAttributes> = { const ctx: BeforeinputHookCtx<TextAttributes> = {
inlineEditor: this.editor, inlineEditor: this.editor,
raw: event, raw: event,
@@ -346,11 +355,9 @@ export class EventService<TextAttributes extends BaseTextAttributes> {
return; return;
} }
this.editor.disposables.addFromEvent( this.editor.disposables.addFromEvent(eventSource, 'beforeinput', e => {
eventSource, this._onBeforeInput(e).catch(console.error);
'beforeinput', });
this._onBeforeInput
);
this.editor.disposables.addFromEvent( this.editor.disposables.addFromEvent(
eventSource, eventSource,
'compositionstart', 'compositionstart',

View File

@@ -9,6 +9,7 @@
"**/node_modules", "**/node_modules",
".yarn", ".yarn",
".github/helm", ".github/helm",
".git",
".vscode", ".vscode",
".yarnrc.yml", ".yarnrc.yml",
".docker", ".docker",

View File

@@ -82,7 +82,7 @@
"husky": "^9.1.7", "husky": "^9.1.7",
"lint-staged": "^16.0.0", "lint-staged": "^16.0.0",
"msw": "^2.6.8", "msw": "^2.6.8",
"oxlint": "^1.11.1", "oxlint": "^1.15.0",
"prettier": "^3.4.2", "prettier": "^3.4.2",
"semver": "^7.6.3", "semver": "^7.6.3",
"serve": "^14.2.4", "serve": "^14.2.4",

View File

@@ -84,7 +84,7 @@ export const useDraggable = <D extends DNDData = DNDData>(
: undefined, : undefined,
}; };
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [...deps, context.toExternalData]); }, [...deps, getOptions, context.toExternalData]);
useEffect(() => { useEffect(() => {
if ( if (

View File

@@ -207,7 +207,7 @@ export const useDropTarget = <D extends DNDData = DNDData>(
: undefined, : undefined,
}; };
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [...deps, dropTargetContext.fromExternalData]); }, [...deps, getOptions, dropTargetContext.fromExternalData]);
const getDropTargetOptions = useCallback(() => { const getDropTargetOptions = useCallback(() => {
const wrappedCanDrop = dropTargetGet(options.canDrop, options); const wrappedCanDrop = dropTargetGet(options.canDrop, options);

View File

@@ -95,7 +95,7 @@ export const useDndMonitor = <D extends DNDData = DNDData>(
: undefined, : undefined,
}; };
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [...deps, getOptions]); }, [...deps, getOptions, dropTargetContext.fromExternalData]);
const monitorOptions = useMemo(() => { const monitorOptions = useMemo(() => {
return { return {

View File

@@ -14,12 +14,16 @@ export const useGuard = <
) => { ) => {
const guardService = useService(GuardService); const guardService = useService(GuardService);
useEffect(() => { useEffect(() => {
// oxlint-disable-next-line exhaustive-deps
guardService.revalidateCan(action, ...args); guardService.revalidateCan(action, ...args);
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [action, guardService, ...args]); }, [action, guardService, ...args]);
const livedata$ = useMemo( const livedata$ = useMemo(
() => guardService.can$(action, ...args), () => {
// oxlint-disable-next-line exhaustive-deps
return guardService.can$(action, ...args);
},
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
[action, guardService, ...args] [action, guardService, ...args]
); );

View File

@@ -24,6 +24,6 @@ export function useAsyncCallback<T extends any[]>(
(...args: any) => { (...args: any) => {
callback(...args).catch(e => handleAsyncError(e)); callback(...args).catch(e => handleAsyncError(e));
}, },
[...deps] // eslint-disable-line react-hooks/exhaustive-deps [callback, handleAsyncError, ...deps] // eslint-disable-line react-hooks/exhaustive-deps
); );
} }

View File

@@ -59,27 +59,9 @@ test.describe('comments', () => {
{ delay: 50 } { delay: 50 }
); );
// Select some text using triple-click and then refine selection for (let i = 0; i < 11; i++) {
// Triple-click to select the entire paragraph await page.keyboard.press('Shift+ArrowLeft');
await page.locator('affine-paragraph').first().click({ clickCount: 3 }); }
// Wait for selection
await page.waitForTimeout(100);
// Now we have the whole paragraph selected, let's use mouse to select just "some text"
const paragraph = page.locator('affine-paragraph').first();
const bbox = await paragraph.boundingBox();
if (!bbox) throw new Error('Paragraph not found');
// Click and drag to select "some text" portion
// Start roughly where "some" begins (estimated position)
await page.mouse.move(bbox.x + bbox.width * 0.45, bbox.y + bbox.height / 2);
await page.mouse.down();
await page.mouse.move(bbox.x + bbox.width * 0.58, bbox.y + bbox.height / 2);
await page.mouse.up();
// Wait a bit for selection to stabilize
await page.waitForTimeout(200);
// Wait for the toolbar to appear after text selection // Wait for the toolbar to appear after text selection
const toolbar = page.locator('editor-toolbar'); const toolbar = page.locator('editor-toolbar');
@@ -97,11 +79,14 @@ test.describe('comments', () => {
await page.waitForTimeout(300); // Wait for sidebar animation await page.waitForTimeout(300); // Wait for sidebar animation
// Find the comment editor // Find the comment editor
const commentEditor = page.locator('.comment-editor-viewport'); const commentEditor = page.locator(
'.comment-editor-viewport .page-editor-container'
);
await expect(commentEditor).toBeVisible(); await expect(commentEditor).toBeVisible();
// Enter comment text // Enter comment text
await commentEditor.click(); await commentEditor.click();
await commentEditor.focus();
await page.keyboard.type('This is my first comment on this text', { await page.keyboard.type('This is my first comment on this text', {
delay: 50, delay: 50,
}); });
@@ -125,11 +110,7 @@ test.describe('comments', () => {
// The preview should show the selected text that was commented on // The preview should show the selected text that was commented on
// Target specifically the sidebar tab content to avoid conflicts with editor content // Target specifically the sidebar tab content to avoid conflicts with editor content
const sidebarTab = page.getByTestId('sidebar-tab-content-comment'); const sidebarTab = page.getByTestId('sidebar-tab-content-comment');
await expect( await expect(sidebarTab.locator('text=comment on.')).toBeVisible();
sidebarTab.locator(
'text=This is a test paragraph with some text that we will comment on.'
)
).toBeVisible();
// This text should appear in the sidebar as the preview of what was commented on // This text should appear in the sidebar as the preview of what was commented on

View File

@@ -281,6 +281,7 @@ test('link bar should not be appear when the range is collapsed', async ({
await expect(linkPopoverLocator).toBeVisible(); await expect(linkPopoverLocator).toBeVisible();
await focusRichText(page); // click to cancel the link popover await focusRichText(page); // click to cancel the link popover
await waitNextFrame(page);
await focusRichTextEnd(page); await focusRichTextEnd(page);
await pressShiftEnter(page); await pressShiftEnter(page);
await waitNextFrame(page); await waitNextFrame(page);

View File

@@ -1,86 +0,0 @@
# Bug Issues Tool
A simple Node.js tool to list the ten most recent bug issues from the toeverything/AFFiNE GitHub repository.
## Usage
### Demo Mode (Recommended)
To see the tool in action with pre-fetched data:
```bash
# From the root of the AFFiNE repository
node tools/bug-issues/demo.js
```
### Live Data Mode
To fetch live data from GitHub API:
```bash
# From the root of the AFFiNE repository
node tools/bug-issues/index.js
# Or with GitHub token for higher rate limits
GITHUB_TOKEN=your_token_here node tools/bug-issues/index.js
```
Or from the tools/bug-issues directory:
```bash
# Demo mode
node demo.js
# Live mode
node index.js
```
## Features
- 📋 Lists the 10 most recent bug issues (both open and closed)
- 🐛 Shows issue state with emojis (🐛 for open, ✅ for closed)
- 📅 Displays creation date, author, and current state
- 🔗 Provides direct links to issues
- 📝 Shows truncated descriptions
- 📊 Provides a summary with open/closed counts
## Output Format
The tool displays issues in a formatted table with:
- Issue number and title
- Creation date and author
- Current state (open/closed)
- Direct link to the GitHub issue
- Brief description
- Summary statistics
## Files
- `demo.js` - Demo version with pre-fetched data (no API calls)
- `index.js` - Live version that fetches data from GitHub API
- `README.md` - This documentation
- `package.json` - Package configuration
## Requirements
- Node.js (version specified in package.json engines)
- Internet connection to access GitHub API (for live mode)
- Optional: GitHub token for higher rate limits (for live mode)
## Configuration
The tool is configured to:
- Target repository: `toeverything/AFFiNE`
- Look for issues with the "Bug" label
- Return the 10 most recent issues
- Sort by creation date (newest first)
These settings can be modified in the source code if needed.
## Rate Limits
GitHub's API has rate limits:
- Without authentication: 60 requests per hour
- With GitHub token: 5000 requests per hour
The demo mode doesn't make any API calls, so it always works.

View File

@@ -1,198 +0,0 @@
#!/usr/bin/env node
/**
* Tool to list the ten most recent bug issues from the toeverything/AFFiNE repository
* This demo version uses pre-fetched data to show functionality
*/
// Demo data based on actual GitHub API results (fetched previously)
const DEMO_BUG_ISSUES = [
{
"id": 3038375593,
"number": 12128,
"state": "open",
"title": "[Bug]: Edgeless Export Frames as Image (PNG/SVG)",
"user": {"login": "fallsdevil"},
"created_at": "2025-05-05T01:02:39Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/12128",
"body": "A dedicated Export as Image action in Edgeless mode (whiteboard) that lets users download their canvas as PNG or SVG. It should offer: Export entire canvas, a specific frame, or custom selection..."
},
{
"id": 3036740744,
"number": 12115,
"state": "open",
"title": "[Bugt]: add a way to zoom without needing a middle mouse button",
"user": {"login": "gabrielcamilo0321"},
"created_at": "2025-05-02T19:59:44Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/12115",
"body": "add a way to zoom in edgeless mode without needing a middle mouse button, like a shortcut, for example shift or alt + left mouse button to zoom."
},
{
"id": 2997331918,
"number": 11719,
"state": "closed",
"title": "[Bug]: Web frontend ignores AFFINE_SERVER_SUB_PATH",
"user": {"login": "jorne"},
"created_at": "2025-04-15T19:03:06Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/11719",
"body": "I'm trying to make AFFiNE available under https://sub.mydomain.com/affine, using NPM as proxy. I've set AFFINE_SERVER_SUB_PATH=/affine in the env file."
},
{
"id": 2991436697,
"number": 11656,
"state": "open",
"title": "[Bug]: Attachment in database view is not visible on the shared view of the page",
"user": {"login": "wikinikiwings"},
"created_at": "2025-04-13T19:28:47Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/11656",
"body": "all types of attachments are visible on the shared page, but attachments in the database view - are not showing"
},
{
"id": 2976574946,
"number": 11515,
"state": "open",
"title": "[Bug]: Input text exceeds before character selection",
"user": {"login": "Edit-Mr"},
"created_at": "2025-04-07T11:40:45Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/11515",
"body": "When using a Chinese input method in the mind map, the input text exceeds the text box before character selection is completed."
},
{
"id": 2769179704,
"number": 9526,
"state": "closed",
"title": "journals's title(and its property) get lost after exporting and importing",
"user": {"login": "happyZYM"},
"created_at": "2025-01-05T09:00:48Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/9526",
"body": "I'm using the AppImage version. When I export a space and import it again, all the titles of journals are lost."
},
{
"id": 2601277065,
"number": 8559,
"state": "closed",
"title": "Loss folder information when import Workspace",
"user": {"login": "Markche1985"},
"created_at": "2024-10-21T04:23:25Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/8559",
"body": "when export and import workspace, the folder will loss(tag and documents are fine, but no folder)"
},
{
"id": 2478006065,
"number": 7937,
"state": "closed",
"title": "Linux App version bugged - JavaScript errors since last update",
"user": {"login": "MindHack"},
"created_at": "2024-08-21T13:09:50Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/7937",
"body": "Hi ! I am using the Linux app in up-to-date Fedora 40. It has ceased to work properly following the last update."
},
{
"id": 2467318206,
"number": 7881,
"state": "closed",
"title": "[bug] Opening Docs in new tabs redirects to app.affine.pro",
"user": {"login": "compgeniuses"},
"created_at": "2024-08-15T03:36:26Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/7881",
"body": "when you click the 3 dotted menu on a docs, and chose the option to open in new tab, the link tries to open using app.affine.pro instead of the localhosted instance"
},
{
"id": 2458040625,
"number": 7822,
"state": "closed",
"title": "Linked docs in the sidebar cannot be sorted or ordered",
"user": {"login": "JimmFly"},
"created_at": "2024-08-09T14:21:38Z",
"html_url": "https://github.com/toeverything/AFFiNE/issues/7822",
"body": "The order of Linked Docs in the sidebar does not match their original order in the article, and it is also not possible to rearrange them by dragging in the sidebar."
}
];
/**
* Format a date to a readable string
* @param {string} dateString - ISO date string
* @returns {string} Formatted date
*/
function formatDate(dateString) {
const date = new Date(dateString);
return date.toLocaleDateString('en-US', {
year: 'numeric',
month: 'short',
day: 'numeric',
});
}
/**
* Truncate text to a specified length
* @param {string} text - Text to truncate
* @param {number} maxLength - Maximum length
* @returns {string} Truncated text
*/
function truncateText(text, maxLength = 100) {
if (text.length <= maxLength) return text;
return text.substring(0, maxLength - 3) + '...';
}
/**
* Get issue state emoji
* @param {string} state - Issue state (open/closed)
* @returns {string} Emoji representation
*/
function getStateEmoji(state) {
return state === 'open' ? '🐛' : '✅';
}
/**
* Display issues in a formatted table
* @param {Array} issues - Array of issue objects
*/
function displayIssues(issues) {
console.log('📋 Ten Most Recent Bug Issues in toeverything/AFFiNE\n');
console.log('═'.repeat(100));
issues.forEach((issue, index) => {
const stateEmoji = getStateEmoji(issue.state);
const createdDate = formatDate(issue.created_at);
const title = truncateText(issue.title, 60);
const author = issue.user.login;
console.log(`${index + 1}. ${stateEmoji} #${issue.number} - ${title}`);
console.log(` 📅 Created: ${createdDate} | 👤 Author: ${author} | 🏷️ State: ${issue.state}`);
console.log(` 🔗 ${issue.html_url}`);
if (issue.body) {
const description = truncateText(issue.body.replace(/\r?\n/g, ' '), 80);
console.log(` 📝 ${description}`);
}
console.log('');
});
console.log('═'.repeat(100));
console.log(`\n📊 Summary: Found ${issues.length} bug issues`);
console.log(`🐛 Open: ${issues.filter(issue => issue.state === 'open').length}`);
console.log(`✅ Closed: ${issues.filter(issue => issue.state === 'closed').length}`);
}
/**
* Main function
*/
function main() {
console.log('🔧 Bug Issues Tool (Demo Mode)');
console.log('Note: This demo uses pre-fetched data from the GitHub API\n');
displayIssues(DEMO_BUG_ISSUES);
console.log('\n💡 To use with live data, you can:');
console.log(' - Set a GITHUB_TOKEN environment variable');
console.log(' - Use the full version in index.js');
console.log(' - Or run: node tools/bug-issues/index.js');
}
// Run the script
if (import.meta.url === `file://${process.argv[1]}`) {
main();
}
export { displayIssues, DEMO_BUG_ISSUES };

View File

@@ -1,162 +0,0 @@
#!/usr/bin/env node
import { readFileSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
/**
* Tool to list the ten most recent bug issues from the toeverything/AFFiNE repository
*/
// Configuration
const OWNER = 'toeverything';
const REPO = 'AFFiNE';
const BUG_LABEL = 'Bug';
const LIMIT = 10;
/**
* Make a request to GitHub API using fetch
* @param {string} url - API endpoint URL
* @returns {Promise<any>} Response data
*/
async function githubApiRequest(url) {
try {
const headers = {
'Accept': 'application/vnd.github.v3+json',
'User-Agent': 'AFFiNE-Bug-Issues-Tool',
};
// Add GitHub token if available
if (process.env.GITHUB_TOKEN) {
headers['Authorization'] = `token ${process.env.GITHUB_TOKEN}`;
}
const response = await fetch(url, { headers });
if (!response.ok) {
if (response.status === 403) {
throw new Error(`Rate limit exceeded. Please set GITHUB_TOKEN environment variable or try again later.`);
}
throw new Error(`HTTP error! status: ${response.status} - ${response.statusText}`);
}
return await response.json();
} catch (error) {
throw new Error(`GitHub API request failed: ${error.message}`);
}
}
/**
* Format a date to a readable string
* @param {string} dateString - ISO date string
* @returns {string} Formatted date
*/
function formatDate(dateString) {
const date = new Date(dateString);
return date.toLocaleDateString('en-US', {
year: 'numeric',
month: 'short',
day: 'numeric',
});
}
/**
* Truncate text to a specified length
* @param {string} text - Text to truncate
* @param {number} maxLength - Maximum length
* @returns {string} Truncated text
*/
function truncateText(text, maxLength = 100) {
if (text.length <= maxLength) return text;
return text.substring(0, maxLength - 3) + '...';
}
/**
* Get issue state emoji
* @param {string} state - Issue state (open/closed)
* @returns {string} Emoji representation
*/
function getStateEmoji(state) {
return state === 'open' ? '🐛' : '✅';
}
/**
* Fetch the most recent bug issues
* @returns {Promise<Array>} Array of issue objects
*/
async function fetchBugIssues() {
try {
console.log(`Fetching the ${LIMIT} most recent bug issues from ${OWNER}/${REPO}...\n`);
// GitHub API endpoint for issues with label filter
const url = `https://api.github.com/repos/${OWNER}/${REPO}/issues?labels=${encodeURIComponent(BUG_LABEL)}&state=all&sort=created&direction=desc&per_page=${LIMIT}`;
const issues = await githubApiRequest(url);
return issues;
} catch (error) {
console.error('Error fetching issues:', error.message);
process.exit(1);
}
}
/**
* Display issues in a formatted table
* @param {Array} issues - Array of issue objects
*/
function displayIssues(issues) {
console.log('📋 Ten Most Recent Bug Issues in toeverything/AFFiNE\n');
console.log('═'.repeat(100));
issues.forEach((issue, index) => {
const stateEmoji = getStateEmoji(issue.state);
const createdDate = formatDate(issue.created_at);
const title = truncateText(issue.title, 60);
const author = issue.user.login;
console.log(`${index + 1}. ${stateEmoji} #${issue.number} - ${title}`);
console.log(` 📅 Created: ${createdDate} | 👤 Author: ${author} | 🏷️ State: ${issue.state}`);
console.log(` 🔗 ${issue.html_url}`);
if (issue.body) {
const description = truncateText(issue.body.replace(/\r?\n/g, ' '), 80);
console.log(` 📝 ${description}`);
}
console.log('');
});
console.log('═'.repeat(100));
console.log(`\n📊 Summary: Found ${issues.length} bug issues`);
console.log(`🐛 Open: ${issues.filter(issue => issue.state === 'open').length}`);
console.log(`✅ Closed: ${issues.filter(issue => issue.state === 'closed').length}`);
}
/**
* Main function
*/
async function main() {
try {
const issues = await fetchBugIssues();
if (issues.length === 0) {
console.log('No bug issues found.');
return;
}
displayIssues(issues);
} catch (error) {
console.error('An unexpected error occurred:', error.message);
process.exit(1);
}
}
// Run the script
if (import.meta.url === `file://${process.argv[1]}`) {
main();
}
export { fetchBugIssues, displayIssues };

View File

@@ -1,17 +0,0 @@
{
"name": "@affine/bug-issues",
"version": "0.22.4",
"type": "module",
"main": "index.js",
"private": true,
"description": "List the ten most recent bug issues from the GitHub repository",
"scripts": {
"demo": "node demo.js",
"live": "node index.js",
"start": "node demo.js"
},
"dependencies": {},
"devDependencies": {
"@types/node": "^22.0.0"
}
}

436
yarn.lock
View File

@@ -803,7 +803,7 @@ __metadata:
husky: "npm:^9.1.7" husky: "npm:^9.1.7"
lint-staged: "npm:^16.0.0" lint-staged: "npm:^16.0.0"
msw: "npm:^2.6.8" msw: "npm:^2.6.8"
oxlint: "npm:^1.11.1" oxlint: "npm:^1.15.0"
prettier: "npm:^3.4.2" prettier: "npm:^3.4.2"
semver: "npm:^7.6.3" semver: "npm:^7.6.3"
serve: "npm:^14.2.4" serve: "npm:^14.2.4"
@@ -10698,100 +10698,58 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint-tsgolint/darwin-arm64@npm:0.0.1": "@oxlint/darwin-arm64@npm:1.15.0":
version: 0.0.1 version: 1.15.0
resolution: "@oxlint-tsgolint/darwin-arm64@npm:0.0.1" resolution: "@oxlint/darwin-arm64@npm:1.15.0"
conditions: os=darwin
languageName: node
linkType: hard
"@oxlint-tsgolint/darwin-x64@npm:0.0.1":
version: 0.0.1
resolution: "@oxlint-tsgolint/darwin-x64@npm:0.0.1"
conditions: os=darwin
languageName: node
linkType: hard
"@oxlint-tsgolint/linux-arm64@npm:0.0.1":
version: 0.0.1
resolution: "@oxlint-tsgolint/linux-arm64@npm:0.0.1"
conditions: os=linux
languageName: node
linkType: hard
"@oxlint-tsgolint/linux-x64@npm:0.0.1":
version: 0.0.1
resolution: "@oxlint-tsgolint/linux-x64@npm:0.0.1"
conditions: os=linux
languageName: node
linkType: hard
"@oxlint-tsgolint/win32-arm64@npm:0.0.1":
version: 0.0.1
resolution: "@oxlint-tsgolint/win32-arm64@npm:0.0.1"
conditions: os=win32
languageName: node
linkType: hard
"@oxlint-tsgolint/win32-x64@npm:0.0.1":
version: 0.0.1
resolution: "@oxlint-tsgolint/win32-x64@npm:0.0.1"
conditions: os=win32
languageName: node
linkType: hard
"@oxlint/darwin-arm64@npm:1.11.1":
version: 1.11.1
resolution: "@oxlint/darwin-arm64@npm:1.11.1"
conditions: os=darwin & cpu=arm64 conditions: os=darwin & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/darwin-x64@npm:1.11.1": "@oxlint/darwin-x64@npm:1.15.0":
version: 1.11.1 version: 1.15.0
resolution: "@oxlint/darwin-x64@npm:1.11.1" resolution: "@oxlint/darwin-x64@npm:1.15.0"
conditions: os=darwin & cpu=x64 conditions: os=darwin & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/linux-arm64-gnu@npm:1.11.1": "@oxlint/linux-arm64-gnu@npm:1.15.0":
version: 1.11.1 version: 1.15.0
resolution: "@oxlint/linux-arm64-gnu@npm:1.11.1" resolution: "@oxlint/linux-arm64-gnu@npm:1.15.0"
conditions: os=linux & cpu=arm64 & libc=glibc conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/linux-arm64-musl@npm:1.11.1": "@oxlint/linux-arm64-musl@npm:1.15.0":
version: 1.11.1 version: 1.15.0
resolution: "@oxlint/linux-arm64-musl@npm:1.11.1" resolution: "@oxlint/linux-arm64-musl@npm:1.15.0"
conditions: os=linux & cpu=arm64 & libc=musl conditions: os=linux & cpu=arm64 & libc=musl
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/linux-x64-gnu@npm:1.11.1": "@oxlint/linux-x64-gnu@npm:1.15.0":
version: 1.11.1 version: 1.15.0
resolution: "@oxlint/linux-x64-gnu@npm:1.11.1" resolution: "@oxlint/linux-x64-gnu@npm:1.15.0"
conditions: os=linux & cpu=x64 & libc=glibc conditions: os=linux & cpu=x64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/linux-x64-musl@npm:1.11.1": "@oxlint/linux-x64-musl@npm:1.15.0":
version: 1.11.1 version: 1.15.0
resolution: "@oxlint/linux-x64-musl@npm:1.11.1" resolution: "@oxlint/linux-x64-musl@npm:1.15.0"
conditions: os=linux & cpu=x64 & libc=musl conditions: os=linux & cpu=x64 & libc=musl
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/win32-arm64@npm:1.11.1": "@oxlint/win32-arm64@npm:1.15.0":
version: 1.11.1 version: 1.15.0
resolution: "@oxlint/win32-arm64@npm:1.11.1" resolution: "@oxlint/win32-arm64@npm:1.15.0"
conditions: os=win32 & cpu=arm64 conditions: os=win32 & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/win32-x64@npm:1.11.1": "@oxlint/win32-x64@npm:1.15.0":
version: 1.11.1 version: 1.15.0
resolution: "@oxlint/win32-x64@npm:1.11.1" resolution: "@oxlint/win32-x64@npm:1.15.0"
conditions: os=win32 & cpu=x64 conditions: os=win32 & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
@@ -12592,142 +12550,149 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-android-arm-eabi@npm:4.43.0": "@rollup/rollup-android-arm-eabi@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-android-arm-eabi@npm:4.43.0" resolution: "@rollup/rollup-android-arm-eabi@npm:4.50.1"
conditions: os=android & cpu=arm conditions: os=android & cpu=arm
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-android-arm64@npm:4.43.0": "@rollup/rollup-android-arm64@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-android-arm64@npm:4.43.0" resolution: "@rollup/rollup-android-arm64@npm:4.50.1"
conditions: os=android & cpu=arm64 conditions: os=android & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-darwin-arm64@npm:4.43.0": "@rollup/rollup-darwin-arm64@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-darwin-arm64@npm:4.43.0" resolution: "@rollup/rollup-darwin-arm64@npm:4.50.1"
conditions: os=darwin & cpu=arm64 conditions: os=darwin & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-darwin-x64@npm:4.43.0": "@rollup/rollup-darwin-x64@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-darwin-x64@npm:4.43.0" resolution: "@rollup/rollup-darwin-x64@npm:4.50.1"
conditions: os=darwin & cpu=x64 conditions: os=darwin & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-freebsd-arm64@npm:4.43.0": "@rollup/rollup-freebsd-arm64@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-freebsd-arm64@npm:4.43.0" resolution: "@rollup/rollup-freebsd-arm64@npm:4.50.1"
conditions: os=freebsd & cpu=arm64 conditions: os=freebsd & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-freebsd-x64@npm:4.43.0": "@rollup/rollup-freebsd-x64@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-freebsd-x64@npm:4.43.0" resolution: "@rollup/rollup-freebsd-x64@npm:4.50.1"
conditions: os=freebsd & cpu=x64 conditions: os=freebsd & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-arm-gnueabihf@npm:4.43.0": "@rollup/rollup-linux-arm-gnueabihf@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.43.0" resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.50.1"
conditions: os=linux & cpu=arm & libc=glibc conditions: os=linux & cpu=arm & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-arm-musleabihf@npm:4.43.0": "@rollup/rollup-linux-arm-musleabihf@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.43.0" resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.50.1"
conditions: os=linux & cpu=arm & libc=musl conditions: os=linux & cpu=arm & libc=musl
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-arm64-gnu@npm:4.43.0": "@rollup/rollup-linux-arm64-gnu@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.43.0" resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.50.1"
conditions: os=linux & cpu=arm64 & libc=glibc conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-arm64-musl@npm:4.43.0": "@rollup/rollup-linux-arm64-musl@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-arm64-musl@npm:4.43.0" resolution: "@rollup/rollup-linux-arm64-musl@npm:4.50.1"
conditions: os=linux & cpu=arm64 & libc=musl conditions: os=linux & cpu=arm64 & libc=musl
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-loongarch64-gnu@npm:4.43.0": "@rollup/rollup-linux-loongarch64-gnu@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.43.0" resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.50.1"
conditions: os=linux & cpu=loong64 & libc=glibc conditions: os=linux & cpu=loong64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-powerpc64le-gnu@npm:4.43.0": "@rollup/rollup-linux-ppc64-gnu@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.43.0" resolution: "@rollup/rollup-linux-ppc64-gnu@npm:4.50.1"
conditions: os=linux & cpu=ppc64 & libc=glibc conditions: os=linux & cpu=ppc64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-riscv64-gnu@npm:4.43.0": "@rollup/rollup-linux-riscv64-gnu@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.43.0" resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.50.1"
conditions: os=linux & cpu=riscv64 & libc=glibc conditions: os=linux & cpu=riscv64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-riscv64-musl@npm:4.43.0": "@rollup/rollup-linux-riscv64-musl@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.43.0" resolution: "@rollup/rollup-linux-riscv64-musl@npm:4.50.1"
conditions: os=linux & cpu=riscv64 & libc=musl conditions: os=linux & cpu=riscv64 & libc=musl
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-s390x-gnu@npm:4.43.0": "@rollup/rollup-linux-s390x-gnu@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.43.0" resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.50.1"
conditions: os=linux & cpu=s390x & libc=glibc conditions: os=linux & cpu=s390x & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-x64-gnu@npm:4.43.0": "@rollup/rollup-linux-x64-gnu@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-x64-gnu@npm:4.43.0" resolution: "@rollup/rollup-linux-x64-gnu@npm:4.50.1"
conditions: os=linux & cpu=x64 & libc=glibc conditions: os=linux & cpu=x64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-linux-x64-musl@npm:4.43.0": "@rollup/rollup-linux-x64-musl@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-linux-x64-musl@npm:4.43.0" resolution: "@rollup/rollup-linux-x64-musl@npm:4.50.1"
conditions: os=linux & cpu=x64 & libc=musl conditions: os=linux & cpu=x64 & libc=musl
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-win32-arm64-msvc@npm:4.43.0": "@rollup/rollup-openharmony-arm64@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.43.0" resolution: "@rollup/rollup-openharmony-arm64@npm:4.50.1"
conditions: os=openharmony & cpu=arm64
languageName: node
linkType: hard
"@rollup/rollup-win32-arm64-msvc@npm:4.50.1":
version: 4.50.1
resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.50.1"
conditions: os=win32 & cpu=arm64 conditions: os=win32 & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-win32-ia32-msvc@npm:4.43.0": "@rollup/rollup-win32-ia32-msvc@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.43.0" resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.50.1"
conditions: os=win32 & cpu=ia32 conditions: os=win32 & cpu=ia32
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/rollup-win32-x64-msvc@npm:4.43.0": "@rollup/rollup-win32-x64-msvc@npm:4.50.1":
version: 4.43.0 version: 4.50.1
resolution: "@rollup/rollup-win32-x64-msvc@npm:4.43.0" resolution: "@rollup/rollup-win32-x64-msvc@npm:4.50.1"
conditions: os=win32 & cpu=x64 conditions: os=win32 & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
@@ -14899,10 +14864,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/estree@npm:*, @types/estree@npm:1.0.7, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.6": "@types/estree@npm:*, @types/estree@npm:1.0.8, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.6":
version: 1.0.7 version: 1.0.8
resolution: "@types/estree@npm:1.0.7" resolution: "@types/estree@npm:1.0.8"
checksum: 10/419c845ece767ad4b21171e6e5b63dabb2eb46b9c0d97361edcd9cabbf6a95fcadb91d89b5fa098d1336fa0b8fceaea82fca97a2ef3971f5c86e53031e157b21 checksum: 10/25a4c16a6752538ffde2826c2cc0c6491d90e69cd6187bef4a006dd2c3c45469f049e643d7e516c515f21484dc3d48fd5c870be158a5beb72f5baf3dc43e4099
languageName: node languageName: node
linkType: hard linkType: hard
@@ -22041,15 +22006,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"fdir@npm:^6.4.4, fdir@npm:^6.4.5": "fdir@npm:^6.4.4, fdir@npm:^6.5.0":
version: 6.4.6 version: 6.5.0
resolution: "fdir@npm:6.4.6" resolution: "fdir@npm:6.5.0"
peerDependencies: peerDependencies:
picomatch: ^3 || ^4 picomatch: ^3 || ^4
peerDependenciesMeta: peerDependenciesMeta:
picomatch: picomatch:
optional: true optional: true
checksum: 10/c186ba387e7b75ccf874a098d9bc5fe0af0e9c52fc56f8eac8e80aa4edb65532684bf2bf769894ff90f53bf221d6136692052d31f07a9952807acae6cbe7ee50 checksum: 10/14ca1c9f0a0e8f4f2e9bf4e8551065a164a09545dae548c12a18d238b72e51e5a7b39bd8e5494b56463a0877672d0a6c1ef62c6fa0677db1b0c847773be939b1
languageName: node languageName: node
linkType: hard linkType: hard
@@ -26700,8 +26665,8 @@ __metadata:
linkType: hard linkType: hard
"mermaid@npm:^10.9.1": "mermaid@npm:^10.9.1":
version: 10.9.3 version: 10.9.4
resolution: "mermaid@npm:10.9.3" resolution: "mermaid@npm:10.9.4"
dependencies: dependencies:
"@braintree/sanitize-url": "npm:^6.0.1" "@braintree/sanitize-url": "npm:^6.0.1"
"@types/d3-scale": "npm:^4.0.3" "@types/d3-scale": "npm:^4.0.3"
@@ -26723,7 +26688,7 @@ __metadata:
ts-dedent: "npm:^2.2.0" ts-dedent: "npm:^2.2.0"
uuid: "npm:^9.0.0" uuid: "npm:^9.0.0"
web-worker: "npm:^1.2.0" web-worker: "npm:^1.2.0"
checksum: 10/ca6ed9e6a24a7d8777ea9f145d7dc5b66e2070cfb7afa39b77532ebe6ebf6e7a1e9ae617ccc9b47ca493d862a27487ea13f841ccd1184107e4ac689d4b3d4c38 checksum: 10/1d51839345cbb3e54171be73549afa4dba77df56cf3693fb57dd7ff24c2806310dc7b829f2ab2e87b7beb15cf5a89c8029d8d7cfd206258ed97bddfa03b54a97
languageName: node languageName: node
linkType: hard linkType: hard
@@ -28678,48 +28643,20 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"oxlint-tsgolint@npm:>=0.0.1": "oxlint@npm:^1.15.0":
version: 0.0.1 version: 1.15.0
resolution: "oxlint-tsgolint@npm:0.0.1" resolution: "oxlint@npm:1.15.0"
dependencies: dependencies:
"@oxlint-tsgolint/darwin-arm64": "npm:0.0.1" "@oxlint/darwin-arm64": "npm:1.15.0"
"@oxlint-tsgolint/darwin-x64": "npm:0.0.1" "@oxlint/darwin-x64": "npm:1.15.0"
"@oxlint-tsgolint/linux-arm64": "npm:0.0.1" "@oxlint/linux-arm64-gnu": "npm:1.15.0"
"@oxlint-tsgolint/linux-x64": "npm:0.0.1" "@oxlint/linux-arm64-musl": "npm:1.15.0"
"@oxlint-tsgolint/win32-arm64": "npm:0.0.1" "@oxlint/linux-x64-gnu": "npm:1.15.0"
"@oxlint-tsgolint/win32-x64": "npm:0.0.1" "@oxlint/linux-x64-musl": "npm:1.15.0"
dependenciesMeta: "@oxlint/win32-arm64": "npm:1.15.0"
"@oxlint-tsgolint/darwin-arm64": "@oxlint/win32-x64": "npm:1.15.0"
optional: true peerDependencies:
"@oxlint-tsgolint/darwin-x64": oxlint-tsgolint: ">=0.2.0"
optional: true
"@oxlint-tsgolint/linux-arm64":
optional: true
"@oxlint-tsgolint/linux-x64":
optional: true
"@oxlint-tsgolint/win32-arm64":
optional: true
"@oxlint-tsgolint/win32-x64":
optional: true
bin:
tsgolint: bin/tsgolint.js
checksum: 10/2cadb04d5597f425564ed080ca608edb1014aebc85a7a9336a49285c2cb4289379f3eb614694666c8802618a28f619ab2f37dd1ac86cba33a309bc69d8ff47f1
languageName: node
linkType: hard
"oxlint@npm:^1.11.1":
version: 1.11.1
resolution: "oxlint@npm:1.11.1"
dependencies:
"@oxlint/darwin-arm64": "npm:1.11.1"
"@oxlint/darwin-x64": "npm:1.11.1"
"@oxlint/linux-arm64-gnu": "npm:1.11.1"
"@oxlint/linux-arm64-musl": "npm:1.11.1"
"@oxlint/linux-x64-gnu": "npm:1.11.1"
"@oxlint/linux-x64-musl": "npm:1.11.1"
"@oxlint/win32-arm64": "npm:1.11.1"
"@oxlint/win32-x64": "npm:1.11.1"
oxlint-tsgolint: "npm:>=0.0.1"
dependenciesMeta: dependenciesMeta:
"@oxlint/darwin-arm64": "@oxlint/darwin-arm64":
optional: true optional: true
@@ -28737,12 +28674,13 @@ __metadata:
optional: true optional: true
"@oxlint/win32-x64": "@oxlint/win32-x64":
optional: true optional: true
peerDependenciesMeta:
oxlint-tsgolint: oxlint-tsgolint:
optional: true optional: true
bin: bin:
oxc_language_server: bin/oxc_language_server oxc_language_server: bin/oxc_language_server
oxlint: bin/oxlint oxlint: bin/oxlint
checksum: 10/bdf6cb7f6d74b1d6c63ddfdc9597f5394857b1bbee2fb5ab6b86bae9bb58e3ca707ce345f488ae6087ffd909122b615c6020843f7669f6dade14e0396c107a9c checksum: 10/1ee632ad359b3e63a3a5fccadfcab23ac4b0881b06f2e6c29431db56377858571592005459f247b2eef822d1da4c9d68afdf23965afe6ec6a5fe092f60239fa8
languageName: node languageName: node
linkType: hard linkType: hard
@@ -29394,10 +29332,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"picomatch@npm:^4.0.2": "picomatch@npm:^4.0.2, picomatch@npm:^4.0.3":
version: 4.0.2 version: 4.0.3
resolution: "picomatch@npm:4.0.2" resolution: "picomatch@npm:4.0.3"
checksum: 10/ce617b8da36797d09c0baacb96ca8a44460452c89362d7cb8f70ca46b4158ba8bc3606912de7c818eb4a939f7f9015cef3c766ec8a0c6bfc725fdc078e39c717 checksum: 10/57b99055f40b16798f2802916d9c17e9744e620a0db136554af01d19598b96e45e2f00014c91d1b8b13874b80caa8c295b3d589a3f72373ec4aaf54baa5962d5
languageName: node languageName: node
linkType: hard linkType: hard
@@ -29917,14 +29855,14 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"postcss@npm:^8.4.33, postcss@npm:^8.4.38, postcss@npm:^8.4.41, postcss@npm:^8.4.49, postcss@npm:^8.5.3, postcss@npm:^8.5.4": "postcss@npm:^8.4.33, postcss@npm:^8.4.38, postcss@npm:^8.4.41, postcss@npm:^8.4.49, postcss@npm:^8.5.3, postcss@npm:^8.5.6":
version: 8.5.5 version: 8.5.6
resolution: "postcss@npm:8.5.5" resolution: "postcss@npm:8.5.6"
dependencies: dependencies:
nanoid: "npm:^3.3.11" nanoid: "npm:^3.3.11"
picocolors: "npm:^1.1.1" picocolors: "npm:^1.1.1"
source-map-js: "npm:^1.2.1" source-map-js: "npm:^1.2.1"
checksum: 10/c80f723c754b656bf7c983e34841fa35fe0c37a13edd27e24de64e7962cfab11ea081b3b1c900838d2dbe576a045fdecad4f17862c488f12735742f525d22cf0 checksum: 10/9e4fbe97574091e9736d0e82a591e29aa100a0bf60276a926308f8c57249698935f35c5d2f4e80de778d0cbb8dcffab4f383d85fd50c5649aca421c3df729b86
languageName: node languageName: node
linkType: hard linkType: hard
@@ -31386,31 +31324,32 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"rollup@npm:^4.34.9, rollup@npm:^4.40.0": "rollup@npm:^4.34.9, rollup@npm:^4.43.0":
version: 4.43.0 version: 4.50.1
resolution: "rollup@npm:4.43.0" resolution: "rollup@npm:4.50.1"
dependencies: dependencies:
"@rollup/rollup-android-arm-eabi": "npm:4.43.0" "@rollup/rollup-android-arm-eabi": "npm:4.50.1"
"@rollup/rollup-android-arm64": "npm:4.43.0" "@rollup/rollup-android-arm64": "npm:4.50.1"
"@rollup/rollup-darwin-arm64": "npm:4.43.0" "@rollup/rollup-darwin-arm64": "npm:4.50.1"
"@rollup/rollup-darwin-x64": "npm:4.43.0" "@rollup/rollup-darwin-x64": "npm:4.50.1"
"@rollup/rollup-freebsd-arm64": "npm:4.43.0" "@rollup/rollup-freebsd-arm64": "npm:4.50.1"
"@rollup/rollup-freebsd-x64": "npm:4.43.0" "@rollup/rollup-freebsd-x64": "npm:4.50.1"
"@rollup/rollup-linux-arm-gnueabihf": "npm:4.43.0" "@rollup/rollup-linux-arm-gnueabihf": "npm:4.50.1"
"@rollup/rollup-linux-arm-musleabihf": "npm:4.43.0" "@rollup/rollup-linux-arm-musleabihf": "npm:4.50.1"
"@rollup/rollup-linux-arm64-gnu": "npm:4.43.0" "@rollup/rollup-linux-arm64-gnu": "npm:4.50.1"
"@rollup/rollup-linux-arm64-musl": "npm:4.43.0" "@rollup/rollup-linux-arm64-musl": "npm:4.50.1"
"@rollup/rollup-linux-loongarch64-gnu": "npm:4.43.0" "@rollup/rollup-linux-loongarch64-gnu": "npm:4.50.1"
"@rollup/rollup-linux-powerpc64le-gnu": "npm:4.43.0" "@rollup/rollup-linux-ppc64-gnu": "npm:4.50.1"
"@rollup/rollup-linux-riscv64-gnu": "npm:4.43.0" "@rollup/rollup-linux-riscv64-gnu": "npm:4.50.1"
"@rollup/rollup-linux-riscv64-musl": "npm:4.43.0" "@rollup/rollup-linux-riscv64-musl": "npm:4.50.1"
"@rollup/rollup-linux-s390x-gnu": "npm:4.43.0" "@rollup/rollup-linux-s390x-gnu": "npm:4.50.1"
"@rollup/rollup-linux-x64-gnu": "npm:4.43.0" "@rollup/rollup-linux-x64-gnu": "npm:4.50.1"
"@rollup/rollup-linux-x64-musl": "npm:4.43.0" "@rollup/rollup-linux-x64-musl": "npm:4.50.1"
"@rollup/rollup-win32-arm64-msvc": "npm:4.43.0" "@rollup/rollup-openharmony-arm64": "npm:4.50.1"
"@rollup/rollup-win32-ia32-msvc": "npm:4.43.0" "@rollup/rollup-win32-arm64-msvc": "npm:4.50.1"
"@rollup/rollup-win32-x64-msvc": "npm:4.43.0" "@rollup/rollup-win32-ia32-msvc": "npm:4.50.1"
"@types/estree": "npm:1.0.7" "@rollup/rollup-win32-x64-msvc": "npm:4.50.1"
"@types/estree": "npm:1.0.8"
fsevents: "npm:~2.3.2" fsevents: "npm:~2.3.2"
dependenciesMeta: dependenciesMeta:
"@rollup/rollup-android-arm-eabi": "@rollup/rollup-android-arm-eabi":
@@ -31435,7 +31374,7 @@ __metadata:
optional: true optional: true
"@rollup/rollup-linux-loongarch64-gnu": "@rollup/rollup-linux-loongarch64-gnu":
optional: true optional: true
"@rollup/rollup-linux-powerpc64le-gnu": "@rollup/rollup-linux-ppc64-gnu":
optional: true optional: true
"@rollup/rollup-linux-riscv64-gnu": "@rollup/rollup-linux-riscv64-gnu":
optional: true optional: true
@@ -31447,6 +31386,8 @@ __metadata:
optional: true optional: true
"@rollup/rollup-linux-x64-musl": "@rollup/rollup-linux-x64-musl":
optional: true optional: true
"@rollup/rollup-openharmony-arm64":
optional: true
"@rollup/rollup-win32-arm64-msvc": "@rollup/rollup-win32-arm64-msvc":
optional: true optional: true
"@rollup/rollup-win32-ia32-msvc": "@rollup/rollup-win32-ia32-msvc":
@@ -31457,7 +31398,7 @@ __metadata:
optional: true optional: true
bin: bin:
rollup: dist/bin/rollup rollup: dist/bin/rollup
checksum: 10/c7f436880dfd5bd54e9ac579625b5355be58b5437ebb386eb88d709d6bed733a4411673cc80fd64dc5514cd71794544bc83775842108c86ed2b51827e11b33b8 checksum: 10/99f47dc64ea5bc15056a9af49a10a287ec1c49550563ce7827d85d2c03a4a46e42ad2fd48f91b647193e849a22e01a66a782c8311bcefd4246932f02cc437e74
languageName: node languageName: node
linkType: hard linkType: hard
@@ -31909,14 +31850,15 @@ __metadata:
linkType: hard linkType: hard
"sha.js@npm:^2.4.11": "sha.js@npm:^2.4.11":
version: 2.4.11 version: 2.4.12
resolution: "sha.js@npm:2.4.11" resolution: "sha.js@npm:2.4.12"
dependencies: dependencies:
inherits: "npm:^2.0.1" inherits: "npm:^2.0.4"
safe-buffer: "npm:^5.0.1" safe-buffer: "npm:^5.2.1"
to-buffer: "npm:^1.2.0"
bin: bin:
sha.js: ./bin.js sha.js: bin.js
checksum: 10/d833bfa3e0a67579a6ce6e1bc95571f05246e0a441dd8c76e3057972f2a3e098465687a4369b07e83a0375a88703577f71b5b2e966809e67ebc340dbedb478c7 checksum: 10/39c0993592c2ab34eb2daae2199a2a1d502713765aecb611fd97c0c4ab7cd53e902d628e1962aaf384bafd28f55951fef46dcc78799069ce41d74b03aa13b5a7
languageName: node languageName: node
linkType: hard linkType: hard
@@ -33530,13 +33472,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13, tinyglobby@npm:^0.2.14": "tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15":
version: 0.2.14 version: 0.2.15
resolution: "tinyglobby@npm:0.2.14" resolution: "tinyglobby@npm:0.2.15"
dependencies: dependencies:
fdir: "npm:^6.4.4" fdir: "npm:^6.5.0"
picomatch: "npm:^4.0.2" picomatch: "npm:^4.0.3"
checksum: 10/3d306d319718b7cc9d79fb3f29d8655237aa6a1f280860a217f93417039d0614891aee6fc47c5db315f4fcc6ac8d55eb8e23e2de73b2c51a431b42456d9e5764 checksum: 10/d72bd826a8b0fa5fa3929e7fe5ba48fceb2ae495df3a231b6c5408cd7d8c00b58ab5a9c2a76ba56a62ee9b5e083626f1f33599734bed1ffc4b792406408f0ca2
languageName: node languageName: node
linkType: hard linkType: hard
@@ -33643,6 +33585,17 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"to-buffer@npm:^1.2.0":
version: 1.2.1
resolution: "to-buffer@npm:1.2.1"
dependencies:
isarray: "npm:^2.0.5"
safe-buffer: "npm:^5.2.1"
typed-array-buffer: "npm:^1.0.3"
checksum: 10/f8d03f070b8567d9c949f1b59c8d47c83ed2e59b50b5449258f931df9a1fcb751aa8bb8756a9345adc529b6b1822521157c48e1a7d01779a47185060d7bf96d4
languageName: node
linkType: hard
"to-data-view@npm:^1.1.0": "to-data-view@npm:^1.1.0":
version: 1.1.0 version: 1.1.0
resolution: "to-data-view@npm:1.1.0" resolution: "to-data-view@npm:1.1.0"
@@ -33984,6 +33937,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"typed-array-buffer@npm:@nolyfill/typed-array-buffer@^1":
version: 1.0.44
resolution: "@nolyfill/typed-array-buffer@npm:1.0.44"
dependencies:
"@nolyfill/shared": "npm:1.0.44"
checksum: 10/712b97d7ef06b00205cd90d6c5a6bbd54b5381fc6f8deb9fb1a8ddd8e538a29178f9ddb267f13cfbf468096c6340f53706039f88ecd0c6d9277bd95114573e47
languageName: node
linkType: hard
"typedarray@npm:@nolyfill/typedarray@^1": "typedarray@npm:@nolyfill/typedarray@^1":
version: 1.0.44 version: 1.0.44
resolution: "@nolyfill/typedarray@npm:1.0.44" resolution: "@nolyfill/typedarray@npm:1.0.44"
@@ -34797,16 +34759,16 @@ __metadata:
linkType: hard linkType: hard
"vite@npm:^5.0.0 || ^6.0.0 || ^7.0.0-0": "vite@npm:^5.0.0 || ^6.0.0 || ^7.0.0-0":
version: 7.0.0-beta.1 version: 7.1.5
resolution: "vite@npm:7.0.0-beta.1" resolution: "vite@npm:7.1.5"
dependencies: dependencies:
esbuild: "npm:^0.25.0" esbuild: "npm:^0.25.0"
fdir: "npm:^6.4.5" fdir: "npm:^6.5.0"
fsevents: "npm:~2.3.3" fsevents: "npm:~2.3.3"
picomatch: "npm:^4.0.2" picomatch: "npm:^4.0.3"
postcss: "npm:^8.5.4" postcss: "npm:^8.5.6"
rollup: "npm:^4.40.0" rollup: "npm:^4.43.0"
tinyglobby: "npm:^0.2.14" tinyglobby: "npm:^0.2.15"
peerDependencies: peerDependencies:
"@types/node": ^20.19.0 || >=22.12.0 "@types/node": ^20.19.0 || >=22.12.0
jiti: ">=1.21.0" jiti: ">=1.21.0"
@@ -34847,13 +34809,13 @@ __metadata:
optional: true optional: true
bin: bin:
vite: bin/vite.js vite: bin/vite.js
checksum: 10/59dc57a531214dfd477147050718e6661f85421adbd47fc4cc22d6e7320fa354f7099c18e0b3c4cfd4e03f32a9999f872909ebd8c35408610920c5c0d17a546d checksum: 10/59edeef7e98757a668b2ad8a1731a5657fa83e22a165a36b7359225ea98a9be39b2f486710c0cf5085edb85daee7c8b6b6b0bd85d0ef32a1aa84aef71aabd0f0
languageName: node languageName: node
linkType: hard linkType: hard
"vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.0.3, vite@npm:^6.1.0": "vite@npm:^5.0.0 || ^6.0.0, vite@npm:^6.0.3, vite@npm:^6.1.0":
version: 6.3.5 version: 6.3.6
resolution: "vite@npm:6.3.5" resolution: "vite@npm:6.3.6"
dependencies: dependencies:
esbuild: "npm:^0.25.0" esbuild: "npm:^0.25.0"
fdir: "npm:^6.4.4" fdir: "npm:^6.4.4"
@@ -34902,7 +34864,7 @@ __metadata:
optional: true optional: true
bin: bin:
vite: bin/vite.js vite: bin/vite.js
checksum: 10/7bc3a1c5ef79413ad70daeeaf69b76cd1218d16aa18ed8ee08d74648ef17284f4a17c11f5cf42b573b6dc5e3d5f115110b67b1d23c2c699cfe404757764a634a checksum: 10/8b8b6fe12318ca457396bf2053df7056cf4810f1d4a43b36b6afe59860e32b749c0685a290fe8a973b0d3da179ceec4c30cebbd3c91d0c47fbcf6436b17bdeef
languageName: node languageName: node
linkType: hard linkType: hard