chore: bump up oxlint version to v0.16.9 (#12122)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [oxlint](https://oxc.rs) ([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxlint)) | [`0.16.8` -> `0.16.9`](https://renovatebot.com/diffs/npm/oxlint/0.16.8/0.16.9) | [![age](https://developer.mend.io/api/mc/badges/age/npm/oxlint/0.16.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/oxlint/0.16.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/oxlint/0.16.8/0.16.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/oxlint/0.16.8/0.16.9?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>oxc-project/oxc (oxlint)</summary>

### [`v0.16.9`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.16.9): oxlint v0.16.9

[Compare Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.16.8...oxlint_v0.16.9)

#### \[0.16.9] - 2025-05-03

##### Features

-   [`63f02a8`](https://redirect.github.com/oxc-project/oxc/commit/63f02a8) linter: Add react/forward_ref_uses_ref ([#&#8203;10506](https://redirect.github.com/oxc-project/oxc/issues/10506)) (x6eull)
-   [`a3ada34`](https://redirect.github.com/oxc-project/oxc/commit/a3ada34) linter: Implement fixer for unicorn/prefer-number-properties ([#&#8203;10693](https://redirect.github.com/oxc-project/oxc/issues/10693)) (camc314)
-   [`e97a4e0`](https://redirect.github.com/oxc-project/oxc/commit/e97a4e0) linter: Add fixer to unicorn/prefer-spread ([#&#8203;10691](https://redirect.github.com/oxc-project/oxc/issues/10691)) (camc314)
-   [`a69a0ee`](https://redirect.github.com/oxc-project/oxc/commit/a69a0ee) linter: Add eslint/block-scoped-var ([#&#8203;10237](https://redirect.github.com/oxc-project/oxc/issues/10237)) (yefan)
-   [`387af3a`](https://redirect.github.com/oxc-project/oxc/commit/387af3a) linter: Report vars only used as types ([#&#8203;10664](https://redirect.github.com/oxc-project/oxc/issues/10664)) (camc314)
-   [`eac205f`](https://redirect.github.com/oxc-project/oxc/commit/eac205f) linter: Add unicorn/consistent-assert rule ([#&#8203;10653](https://redirect.github.com/oxc-project/oxc/issues/10653)) (Shota Kitahara)
-   [`0e6a727`](https://redirect.github.com/oxc-project/oxc/commit/0e6a727) linter: Add autofixer for eslint/radix ([#&#8203;10652](https://redirect.github.com/oxc-project/oxc/issues/10652)) (yefan)
-   [`fb070c4`](https://redirect.github.com/oxc-project/oxc/commit/fb070c4) linter/no-extra-boolean-cast: Implement auto-fixer ([#&#8203;10682](https://redirect.github.com/oxc-project/oxc/issues/10682)) (DonIsaac)
-   [`432cd77`](https://redirect.github.com/oxc-project/oxc/commit/432cd77) linter/no-new-wrapper: Implement auto-fixer ([#&#8203;10680](https://redirect.github.com/oxc-project/oxc/issues/10680)) (DonIsaac)

##### Bug Fixes

-   [`4ee95ec`](https://redirect.github.com/oxc-project/oxc/commit/4ee95ec) editor: Activate extension when astro files are opened too ([#&#8203;10725](https://redirect.github.com/oxc-project/oxc/issues/10725)) (Sysix)
-   [`46665bd`](https://redirect.github.com/oxc-project/oxc/commit/46665bd) langage_server: Fix initialize nested configs ([#&#8203;10698](https://redirect.github.com/oxc-project/oxc/issues/10698)) (Sysix)
-   [`eb3f37c`](https://redirect.github.com/oxc-project/oxc/commit/eb3f37c) language_server: On configuration change, send updated diagnostics to the client ([#&#8203;10764](https://redirect.github.com/oxc-project/oxc/issues/10764)) (Sysix)
-   [`8c499c6`](https://redirect.github.com/oxc-project/oxc/commit/8c499c6) linter: Fix panic when doing code gen on regexp ([#&#8203;10769](https://redirect.github.com/oxc-project/oxc/issues/10769)) (camc314)
-   [`8e99abf`](https://redirect.github.com/oxc-project/oxc/commit/8e99abf) linter: Fix grammer in no unused vars diagnostic msg ([#&#8203;10770](https://redirect.github.com/oxc-project/oxc/issues/10770)) (camc314)
-   [`b38338a`](https://redirect.github.com/oxc-project/oxc/commit/b38338a) linter: Make require post message target origin a fixer a suggestion ([#&#8203;10754](https://redirect.github.com/oxc-project/oxc/issues/10754)) (camc314)
-   [`48c542d`](https://redirect.github.com/oxc-project/oxc/commit/48c542d) linter: Skip linting vue <script> where `lang` is not js / ts ([#&#8203;10740](https://redirect.github.com/oxc-project/oxc/issues/10740)) (Boshen)
-   [`c9575f6`](https://redirect.github.com/oxc-project/oxc/commit/c9575f6) linter: Fix false positive in react/exhaustive deps ([#&#8203;10727](https://redirect.github.com/oxc-project/oxc/issues/10727)) (camc314)
-   [`d8d8f64`](https://redirect.github.com/oxc-project/oxc/commit/d8d8f64) linter: Shorten span of promise/prefer-await-to-then ([#&#8203;10717](https://redirect.github.com/oxc-project/oxc/issues/10717)) (camc314)
-   [`a88e349`](https://redirect.github.com/oxc-project/oxc/commit/a88e349) linter: Mark `isNan` and `isFinite` as dangerous fixes in `unicorn/prefer-number-properties` ([#&#8203;10706](https://redirect.github.com/oxc-project/oxc/issues/10706)) (Sysix)
-   [`f4ab05f`](https://redirect.github.com/oxc-project/oxc/commit/f4ab05f) linter: Panic in unicorn/no-useless-spread ([#&#8203;10715](https://redirect.github.com/oxc-project/oxc/issues/10715)) (camc314)
-   [`06f1717`](https://redirect.github.com/oxc-project/oxc/commit/06f1717) linter: False positive in no unused vars when importing value used as type ([#&#8203;10690](https://redirect.github.com/oxc-project/oxc/issues/10690)) (camc314)
-   [`746b318`](https://redirect.github.com/oxc-project/oxc/commit/746b318) linter: False positive in typescript/explicit-function-return-type with `satisfies` ([#&#8203;10668](https://redirect.github.com/oxc-project/oxc/issues/10668)) (camc314)
-   [`cce1043`](https://redirect.github.com/oxc-project/oxc/commit/cce1043) linter: False positive in typescript/explicit-function-return-type ([#&#8203;10667](https://redirect.github.com/oxc-project/oxc/issues/10667)) (camc314)
-   [`c89da93`](https://redirect.github.com/oxc-project/oxc/commit/c89da93) linter: False positive in eslint/curly on windows ([#&#8203;10671](https://redirect.github.com/oxc-project/oxc/issues/10671)) (camc314)
-   [`374e19e`](https://redirect.github.com/oxc-project/oxc/commit/374e19e) linter: False positive in react/jsx-curly-brace-presence ([#&#8203;10663](https://redirect.github.com/oxc-project/oxc/issues/10663)) (camc314)
-   [`e7c2b32`](https://redirect.github.com/oxc-project/oxc/commit/e7c2b32) linter: Move `consistent-assert` to `pedantic` ([#&#8203;10665](https://redirect.github.com/oxc-project/oxc/issues/10665)) (camc314)
-   [`344ef88`](https://redirect.github.com/oxc-project/oxc/commit/344ef88) linter: False positive in `eslint/no-unused-vars` when calling inside sequence expression ([#&#8203;10646](https://redirect.github.com/oxc-project/oxc/issues/10646)) (Ulrich Stark)
-   [`98bcd5f`](https://redirect.github.com/oxc-project/oxc/commit/98bcd5f) lsp: Incorrect quick fix offset in vue files ([#&#8203;10742](https://redirect.github.com/oxc-project/oxc/issues/10742)) (camc314)

##### Documentation

-   [`275fe71`](https://redirect.github.com/oxc-project/oxc/commit/275fe71) editor: `oxc.flags` are not related to `oxlint` ([#&#8203;10645](https://redirect.github.com/oxc-project/oxc/issues/10645)) (Sysix)

##### Refactor

-   [`2efe3f0`](https://redirect.github.com/oxc-project/oxc/commit/2efe3f0) linter: Move run on regex node to utils ([#&#8203;10772](https://redirect.github.com/oxc-project/oxc/issues/10772)) (camc314)

##### Testing

-   [`1c4f90f`](https://redirect.github.com/oxc-project/oxc/commit/1c4f90f) editor: Add test for nested config serverity ([#&#8203;10697](https://redirect.github.com/oxc-project/oxc/issues/10697)) (Sysix)
-   [`9ebf3d4`](https://redirect.github.com/oxc-project/oxc/commit/9ebf3d4) language_server: Refactor tester to use WorkspaceWorker ([#&#8203;10730](https://redirect.github.com/oxc-project/oxc/issues/10730)) (Sysix)
-   [`5a709ad`](https://redirect.github.com/oxc-project/oxc/commit/5a709ad) language_server: Add test for `init_nested_configs` ([#&#8203;10728](https://redirect.github.com/oxc-project/oxc/issues/10728)) (Sysix)
-   [`2615758`](https://redirect.github.com/oxc-project/oxc/commit/2615758) language_server: Fix slow test ([#&#8203;10659](https://redirect.github.com/oxc-project/oxc/issues/10659)) (Alexander S.)
-   [`fd18aaa`](https://redirect.github.com/oxc-project/oxc/commit/fd18aaa) language_server: Skip slow test ([#&#8203;10658](https://redirect.github.com/oxc-project/oxc/issues/10658)) (overlookmotel)
-   [`f6f1c5c`](https://redirect.github.com/oxc-project/oxc/commit/f6f1c5c) lsp: Include fixed content in lsp snapshots ([#&#8203;10744](https://redirect.github.com/oxc-project/oxc/issues/10744)) (camc314)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjQuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI2NC4wIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
This commit is contained in:
renovate
2025-05-04 05:34:35 +00:00
parent 55a5321c0c
commit 846350bbb1
9 changed files with 184 additions and 192 deletions

View File

@@ -82,7 +82,7 @@
"husky": "^9.1.7", "husky": "^9.1.7",
"lint-staged": "^15.2.11", "lint-staged": "^15.2.11",
"msw": "^2.6.8", "msw": "^2.6.8",
"oxlint": "0.16.8", "oxlint": "0.16.9",
"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

@@ -76,7 +76,7 @@ const CopilotProviderOptionsSchema = z.object({
user: z.string().optional(), user: z.string().optional(),
}); });
const CopilotChatOptionsSchema = CopilotProviderOptionsSchema.merge( export const CopilotChatOptionsSchema = CopilotProviderOptionsSchema.merge(
PromptConfigStrictSchema PromptConfigStrictSchema
) )
.extend({ .extend({
@@ -87,15 +87,16 @@ const CopilotChatOptionsSchema = CopilotProviderOptionsSchema.merge(
export type CopilotChatOptions = z.infer<typeof CopilotChatOptionsSchema>; export type CopilotChatOptions = z.infer<typeof CopilotChatOptionsSchema>;
const CopilotEmbeddingOptionsSchema = CopilotProviderOptionsSchema.extend({ export const CopilotEmbeddingOptionsSchema =
dimensions: z.number(), CopilotProviderOptionsSchema.extend({
}).optional(); dimensions: z.number(),
}).optional();
export type CopilotEmbeddingOptions = z.infer< export type CopilotEmbeddingOptions = z.infer<
typeof CopilotEmbeddingOptionsSchema typeof CopilotEmbeddingOptionsSchema
>; >;
const CopilotImageOptionsSchema = CopilotProviderOptionsSchema.merge( export const CopilotImageOptionsSchema = CopilotProviderOptionsSchema.merge(
PromptConfigStrictSchema PromptConfigStrictSchema
) )
.extend({ .extend({

View File

@@ -15,13 +15,6 @@ type ToasterToast = ToastProps & {
action?: ToastActionElement; action?: ToastActionElement;
}; };
const actionTypes = {
ADD_TOAST: 'ADD_TOAST',
UPDATE_TOAST: 'UPDATE_TOAST',
DISMISS_TOAST: 'DISMISS_TOAST',
REMOVE_TOAST: 'REMOVE_TOAST',
} as const;
let count = 0; let count = 0;
function genId() { function genId() {
@@ -29,7 +22,12 @@ function genId() {
return count.toString(); return count.toString();
} }
type ActionType = typeof actionTypes; type ActionType = {
ADD_TOAST: 'ADD_TOAST';
UPDATE_TOAST: 'UPDATE_TOAST';
DISMISS_TOAST: 'DISMISS_TOAST';
REMOVE_TOAST: 'REMOVE_TOAST';
};
type Action = type Action =
| { | {

View File

@@ -8,11 +8,8 @@ import {
MailWarningIcon, MailWarningIcon,
UploadCloudIcon, UploadCloudIcon,
} from 'lucide-react'; } from 'lucide-react';
import { z } from 'zod';
const appChannelSchema = z.enum(['stable', 'canary', 'beta', 'internal']); type Channel = 'stable' | 'canary' | 'beta' | 'internal';
type Channel = z.infer<typeof appChannelSchema>;
const appNames = { const appNames = {
stable: 'AFFiNE', stable: 'AFFiNE',

View File

@@ -8,10 +8,8 @@ export const appSchemes = z.enum([
'affine-dev', 'affine-dev',
]); ]);
const appChannelSchemes = z.enum(['stable', 'canary', 'beta', 'internal']);
export type Scheme = z.infer<typeof appSchemes>; export type Scheme = z.infer<typeof appSchemes>;
export type Channel = z.infer<typeof appChannelSchemes>; export type Channel = 'stable' | 'canary' | 'beta' | 'internal';
export const schemeToChannel = { export const schemeToChannel = {
affine: 'stable', affine: 'stable',

View File

@@ -214,7 +214,7 @@ interface PageDivision {
}; };
} }
const PageEvents = { interface PageEvents extends PageDivision {
// page: { // page: {
// $: {} // $: {}
// ^ if empty // ^ if empty
@@ -225,9 +225,9 @@ const PageEvents = {
// to: page.$.segment.module.event1() // to: page.$.segment.module.event1()
$: { $: {
$: { $: {
$: ['createWorkspace', 'checkout'], $: ['createWorkspace', 'checkout'];
auth: ['requestSignIn', 'signIn', 'signedIn', 'signInFail', 'signOut'], auth: ['requestSignIn', 'signIn', 'signedIn', 'signInFail', 'signOut'];
}, };
sharePanel: { sharePanel: {
$: [ $: [
'createShareLink', 'createShareLink',
@@ -237,29 +237,29 @@ const PageEvents = {
'modifyDocDefaultRole', 'modifyDocDefaultRole',
'modifyUserDocRole', 'modifyUserDocRole',
'inviteUserDocRole', 'inviteUserDocRole',
], ];
}, };
docInfoPanel: { docInfoPanel: {
$: ['open'], $: ['open'];
property: ['editProperty', 'addProperty', 'editPropertyMeta'], property: ['editProperty', 'addProperty', 'editPropertyMeta'];
databaseProperty: ['editProperty'], databaseProperty: ['editProperty'];
}, };
settingsPanel: { settingsPanel: {
menu: ['openSettings'], menu: ['openSettings'];
workspace: [ workspace: [
'viewPlans', 'viewPlans',
'export', 'export',
'addProperty', 'addProperty',
'editPropertyMeta', 'editPropertyMeta',
'deleteUnusedBlob', 'deleteUnusedBlob',
], ];
archivedWorkspaces: [ archivedWorkspaces: [
'recoverArchivedWorkspace', 'recoverArchivedWorkspace',
'deleteArchivedWorkspace', 'deleteArchivedWorkspace',
], ];
profileAndBadge: ['viewPlans'], profileAndBadge: ['viewPlans'];
accountUsage: ['viewPlans'], accountUsage: ['viewPlans'];
accountSettings: ['uploadAvatar', 'removeAvatar', 'updateUserName'], accountSettings: ['uploadAvatar', 'removeAvatar', 'updateUserName'];
plans: [ plans: [
'checkout', 'checkout',
'subscribe', 'subscribe',
@@ -269,9 +269,9 @@ const PageEvents = {
'confirmCancelingSubscription', 'confirmCancelingSubscription',
'resumeSubscription', 'resumeSubscription',
'confirmResumingSubscription', 'confirmResumingSubscription',
], ];
billing: ['viewPlans', 'bookDemo'], billing: ['viewPlans', 'bookDemo'];
about: ['checkUpdates', 'downloadUpdate', 'changeAppSetting'], about: ['checkUpdates', 'downloadUpdate', 'changeAppSetting'];
integrationList: [ integrationList: [
'connectIntegration', 'connectIntegration',
'disconnectIntegration', 'disconnectIntegration',
@@ -281,17 +281,17 @@ const PageEvents = {
'confirmIntegrationImport', 'confirmIntegrationImport',
'abortIntegrationImport', 'abortIntegrationImport',
'completeIntegrationImport', 'completeIntegrationImport',
], ];
meetings: ['toggleMeetingFeatureFlag'], meetings: ['toggleMeetingFeatureFlag'];
}, };
cmdk: { cmdk: {
recent: ['recentDocs'], recent: ['recentDocs'];
results: ['searchResultsDocs'], results: ['searchResultsDocs'];
general: ['copyShareLink', 'goBack', 'goForward', 'findInPage'], general: ['copyShareLink', 'goBack', 'goForward', 'findInPage'];
creation: ['createDoc'], creation: ['createDoc'];
workspace: ['createWorkspace'], workspace: ['createWorkspace'];
settings: ['openSettings', 'changeAppSetting'], settings: ['openSettings', 'changeAppSetting'];
navigation: ['navigate'], navigation: ['navigate'];
editor: [ editor: [
'toggleFavorite', 'toggleFavorite',
'switchPageMode', 'switchPageMode',
@@ -299,14 +299,14 @@ const PageEvents = {
'export', 'export',
'deleteDoc', 'deleteDoc',
'restoreDoc', 'restoreDoc',
], ];
docInfo: ['open'], docInfo: ['open'];
docHistory: ['open'], docHistory: ['open'];
updates: ['quitAndInstall'], updates: ['quitAndInstall'];
help: ['contactUs', 'openChangelog'], help: ['contactUs', 'openChangelog'];
}, };
navigationPanel: { navigationPanel: {
$: ['quickSearch', 'createDoc', 'navigate', 'openSettings', 'toggle'], $: ['quickSearch', 'createDoc', 'navigate', 'openSettings', 'toggle'];
organize: [ organize: [
'createOrganizeItem', 'createOrganizeItem',
'renameOrganizeItem', 'renameOrganizeItem',
@@ -317,54 +317,54 @@ const PageEvents = {
'openInSplitView', 'openInSplitView',
'toggleFavorite', 'toggleFavorite',
'drop', 'drop',
], ];
docs: ['createDoc', 'deleteDoc', 'linkDoc', 'drop'], docs: ['createDoc', 'deleteDoc', 'linkDoc', 'drop'];
collections: [ collections: [
'createDoc', 'createDoc',
'addDocToCollection', 'addDocToCollection',
'removeOrganizeItem', 'removeOrganizeItem',
'drop', 'drop',
], ];
folders: ['createDoc', 'drop'], folders: ['createDoc', 'drop'];
tags: ['createDoc', 'tagDoc', 'drop'], tags: ['createDoc', 'tagDoc', 'drop'];
favorites: ['createDoc', 'drop'], favorites: ['createDoc', 'drop'];
migrationData: ['openMigrationDataHelp'], migrationData: ['openMigrationDataHelp'];
bottomButtons: [ bottomButtons: [
'downloadApp', 'downloadApp',
'quitAndInstall', 'quitAndInstall',
'openChangelog', 'openChangelog',
'dismissChangelog', 'dismissChangelog',
], ];
others: ['navigate'], others: ['navigate'];
importModal: ['open'], importModal: ['open'];
workspaceList: [ workspaceList: [
'requestSignIn', 'requestSignIn',
'open', 'open',
'createWorkspace', 'createWorkspace',
'createDoc', 'createDoc',
'openSettings', 'openSettings',
], ];
profileAndBadge: ['openSettings'], profileAndBadge: ['openSettings'];
journal: ['navigate'], journal: ['navigate'];
}, };
aiOnboarding: { aiOnboarding: {
dialog: ['viewPlans'], dialog: ['viewPlans'];
}, };
docHistory: { docHistory: {
$: ['open', 'close', 'switchPageMode', 'viewPlans'], $: ['open', 'close', 'switchPageMode', 'viewPlans'];
}, };
importModal: { importModal: {
$: ['open', 'import', 'createDoc'], $: ['open', 'import', 'createDoc'];
}, };
paywall: { paywall: {
storage: ['viewPlans'], storage: ['viewPlans'];
aiAction: ['viewPlans'], aiAction: ['viewPlans'];
}, };
appTabsHeader: { appTabsHeader: {
$: ['tabAction', 'dragStart'], $: ['tabAction', 'dragStart'];
}, };
header: { header: {
$: ['dragStart'], $: ['dragStart'];
actions: [ actions: [
'createDoc', 'createDoc',
'createWorkspace', 'createWorkspace',
@@ -372,7 +372,7 @@ const PageEvents = {
'toggleFavorite', 'toggleFavorite',
'openDocInfo', 'openDocInfo',
'renameDoc', 'renameDoc',
], ];
docOptions: [ docOptions: [
'open', 'open',
'deleteDoc', 'deleteDoc',
@@ -382,15 +382,15 @@ const PageEvents = {
'import', 'import',
'toggleFavorite', 'toggleFavorite',
'export', 'export',
], ];
history: ['open'], history: ['open'];
pageInfo: ['open'], pageInfo: ['open'];
importModal: ['open'], importModal: ['open'];
snapshot: ['import', 'export'], snapshot: ['import', 'export'];
}, };
chatPanel: { chatPanel: {
chatPanelInput: ['addEmbeddingDoc'], chatPanelInput: ['addEmbeddingDoc'];
}, };
attachment: { attachment: {
$: [ $: [
'openAttachmentInFullscreen', 'openAttachmentInFullscreen',
@@ -398,57 +398,57 @@ const PageEvents = {
'openAttachmentInPeekView', 'openAttachmentInPeekView',
'openAttachmentInSplitView', 'openAttachmentInSplitView',
'openPDFRendererFail', 'openPDFRendererFail',
], ];
}, };
sidebar: { sidebar: {
newDoc: ['quickStart'], newDoc: ['quickStart'];
template: ['openTemplateListMenu', 'quickStart'], template: ['openTemplateListMenu', 'quickStart'];
notifications: ['openInbox', 'clickNotification'], notifications: ['openInbox', 'clickNotification'];
}, };
splitViewIndicator: { splitViewIndicator: {
$: ['splitViewAction', 'openInSplitView', 'openInPeekView'], $: ['splitViewAction', 'openInSplitView', 'openInPeekView'];
}, };
}, };
doc: { doc: {
$: { $: {
$: ['loadDoc'], $: ['loadDoc'];
}, };
editor: { editor: {
slashMenu: ['linkDoc', 'createDoc', 'bookmark'], slashMenu: ['linkDoc', 'createDoc', 'bookmark'];
atMenu: [ atMenu: [
'linkDoc', 'linkDoc',
'import', 'import',
'createDoc', 'createDoc',
'mentionMember', 'mentionMember',
'noAccessPrompted', 'noAccessPrompted',
], ];
quickSearch: ['createDoc'], quickSearch: ['createDoc'];
formatToolbar: ['bold'], formatToolbar: ['bold'];
pageRef: ['navigate'], pageRef: ['navigate'];
toolbar: [ toolbar: [
'copyBlockToLink', 'copyBlockToLink',
'openInSplitView', 'openInSplitView',
'openInNewTab', 'openInNewTab',
'openInPeekView', 'openInPeekView',
], ];
aiActions: ['requestSignIn'], aiActions: ['requestSignIn'];
starterBar: ['quickStart', 'openTemplateListMenu'], starterBar: ['quickStart', 'openTemplateListMenu'];
audioBlock: ['transcribeRecording', 'openTranscribeNotes'], audioBlock: ['transcribeRecording', 'openTranscribeNotes'];
}, };
inlineDocInfo: { inlineDocInfo: {
$: ['toggle'], $: ['toggle'];
property: ['editProperty', 'editPropertyMeta', 'addProperty'], property: ['editProperty', 'editPropertyMeta', 'addProperty'];
databaseProperty: ['editProperty'], databaseProperty: ['editProperty'];
}, };
sidepanel: { sidepanel: {
property: ['addProperty', 'editPropertyMeta'], property: ['addProperty', 'editPropertyMeta'];
}, };
biDirectionalLinksPanel: { biDirectionalLinksPanel: {
$: ['toggle'], $: ['toggle'];
backlinkTitle: ['toggle', 'navigate'], backlinkTitle: ['toggle', 'navigate'];
backlinkPreview: ['navigate'], backlinkPreview: ['navigate'];
}, };
}, };
edgeless: { edgeless: {
pageBlock: { pageBlock: {
headerToolbar: [ headerToolbar: [
@@ -456,18 +456,18 @@ const PageEvents = {
'openDocInfo', 'openDocInfo',
'copyBlockToLink', 'copyBlockToLink',
'switchPageMode', 'switchPageMode',
], ];
}, };
}, };
workspace: { workspace: {
$: { $: {
$: ['upgradeWorkspace'], $: ['upgradeWorkspace'];
}, };
}, };
allDocs: { allDocs: {
header: { header: {
actions: ['createDoc', 'createWorkspace'], actions: ['createDoc', 'createWorkspace'];
}, };
list: { list: {
docMenu: [ docMenu: [
'createDoc', 'createDoc',
@@ -475,26 +475,26 @@ const PageEvents = {
'openInSplitView', 'openInSplitView',
'toggleFavorite', 'toggleFavorite',
'openInNewTab', 'openInNewTab',
], ];
}, };
}, };
collection: { collection: {
docList: { docList: {
docMenu: ['removeOrganizeItem'], docMenu: ['removeOrganizeItem'];
}, };
}, };
tag: {}, tag: {};
trash: {}, trash: {};
subscriptionLanding: { subscriptionLanding: {
$: { $: {
$: ['checkout'], $: ['checkout'];
}, };
}, };
menubarApp: { menubarApp: {
menubarActionsMenu: { menubarActionsMenu: {
menubarActionsList: ['activeMenubarAppItem', 'startRecording'], menubarActionsList: ['activeMenubarAppItem', 'startRecording'];
}, };
}, };
popup: { popup: {
$: { $: {
recordingBar: [ recordingBar: [
@@ -502,10 +502,10 @@ const PageEvents = {
'startRecording', 'startRecording',
'dismissRecording', 'dismissRecording',
'finishRecording', 'finishRecording',
], ];
}, };
}, };
} as const satisfies PageDivision; }
type OrganizeItemType = 'doc' | 'folder' | 'collection' | 'tag' | 'favorite'; type OrganizeItemType = 'doc' | 'folder' | 'collection' | 'tag' | 'favorite';
type OrganizeItemArgs = type OrganizeItemArgs =
@@ -732,4 +732,4 @@ export const YOU_MUST_DEFINE_ARGS_WITH_WRONG_EVENT_NAME: keyof EventArgs extends
? true ? true
: false = true; : false = true;
export type Events = typeof PageEvents; export type Events = PageEvents;

View File

@@ -1,10 +1,10 @@
import { enableAutoTrack, makeTracker } from './auto'; import { enableAutoTrack, makeTracker } from './auto';
import { type Events } from './events';
import { mixpanel } from './mixpanel'; import { mixpanel } from './mixpanel';
import { sentry } from './sentry'; import { sentry } from './sentry';
export const track = makeTracker((event, props) => { export const track = makeTracker((event, props) => {
mixpanel.track(event, props); mixpanel.track(event, props);
}); });
export { enableAutoTrack, mixpanel, sentry }; export { enableAutoTrack, type Events, mixpanel, sentry };
export default track; export default track;

View File

@@ -11,7 +11,6 @@ export type CallableEventsChain = {
[Page in keyof Events]: { [Page in keyof Events]: {
[Segment in keyof Events[Page]]: { [Segment in keyof Events[Page]]: {
[Module in keyof Events[Page][Segment]]: { [Module in keyof Events[Page][Segment]]: {
// @ts-expect-error ignore `symbol | number` as key
[Event in Events[Page][Segment][Module][number]]: Event extends keyof EventArgs [Event in Events[Page][Segment][Module][number]]: Event extends keyof EventArgs
? ( ? (
// we make all args partial to simply satisfies nullish type checking // we make all args partial to simply satisfies nullish type checking
@@ -29,7 +28,6 @@ export type EventsUnion = {
[Module in keyof Events[Page][Segment]]: { [Module in keyof Events[Page][Segment]]: {
// @ts-expect-error ignore `symbol | number` as key // @ts-expect-error ignore `symbol | number` as key
[Event in Events[Page][Segment][Module][number]]: `${Page}.${Segment}.${Module}.${Event}`; [Event in Events[Page][Segment][Module][number]]: `${Page}.${Segment}.${Module}.${Event}`;
// @ts-expect-error ignore `symbol | number` as key
}[Events[Page][Segment][Module][number]]; }[Events[Page][Segment][Module][number]];
}[keyof Events[Page][Segment]]; }[keyof Events[Page][Segment]];
}[keyof Events[Page]]; }[keyof Events[Page]];

View File

@@ -787,7 +787,7 @@ __metadata:
husky: "npm:^9.1.7" husky: "npm:^9.1.7"
lint-staged: "npm:^15.2.11" lint-staged: "npm:^15.2.11"
msw: "npm:^2.6.8" msw: "npm:^2.6.8"
oxlint: "npm:0.16.8" oxlint: "npm:0.16.9"
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"
@@ -10520,58 +10520,58 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/darwin-arm64@npm:0.16.8": "@oxlint/darwin-arm64@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "@oxlint/darwin-arm64@npm:0.16.8" resolution: "@oxlint/darwin-arm64@npm:0.16.9"
conditions: os=darwin & cpu=arm64 conditions: os=darwin & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/darwin-x64@npm:0.16.8": "@oxlint/darwin-x64@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "@oxlint/darwin-x64@npm:0.16.8" resolution: "@oxlint/darwin-x64@npm:0.16.9"
conditions: os=darwin & cpu=x64 conditions: os=darwin & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/linux-arm64-gnu@npm:0.16.8": "@oxlint/linux-arm64-gnu@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "@oxlint/linux-arm64-gnu@npm:0.16.8" resolution: "@oxlint/linux-arm64-gnu@npm:0.16.9"
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:0.16.8": "@oxlint/linux-arm64-musl@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "@oxlint/linux-arm64-musl@npm:0.16.8" resolution: "@oxlint/linux-arm64-musl@npm:0.16.9"
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:0.16.8": "@oxlint/linux-x64-gnu@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "@oxlint/linux-x64-gnu@npm:0.16.8" resolution: "@oxlint/linux-x64-gnu@npm:0.16.9"
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:0.16.8": "@oxlint/linux-x64-musl@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "@oxlint/linux-x64-musl@npm:0.16.8" resolution: "@oxlint/linux-x64-musl@npm:0.16.9"
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:0.16.8": "@oxlint/win32-arm64@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "@oxlint/win32-arm64@npm:0.16.8" resolution: "@oxlint/win32-arm64@npm:0.16.9"
conditions: os=win32 & cpu=arm64 conditions: os=win32 & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@oxlint/win32-x64@npm:0.16.8": "@oxlint/win32-x64@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "@oxlint/win32-x64@npm:0.16.8" resolution: "@oxlint/win32-x64@npm:0.16.9"
conditions: os=win32 & cpu=x64 conditions: os=win32 & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
@@ -27977,18 +27977,18 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"oxlint@npm:0.16.8": "oxlint@npm:0.16.9":
version: 0.16.8 version: 0.16.9
resolution: "oxlint@npm:0.16.8" resolution: "oxlint@npm:0.16.9"
dependencies: dependencies:
"@oxlint/darwin-arm64": "npm:0.16.8" "@oxlint/darwin-arm64": "npm:0.16.9"
"@oxlint/darwin-x64": "npm:0.16.8" "@oxlint/darwin-x64": "npm:0.16.9"
"@oxlint/linux-arm64-gnu": "npm:0.16.8" "@oxlint/linux-arm64-gnu": "npm:0.16.9"
"@oxlint/linux-arm64-musl": "npm:0.16.8" "@oxlint/linux-arm64-musl": "npm:0.16.9"
"@oxlint/linux-x64-gnu": "npm:0.16.8" "@oxlint/linux-x64-gnu": "npm:0.16.9"
"@oxlint/linux-x64-musl": "npm:0.16.8" "@oxlint/linux-x64-musl": "npm:0.16.9"
"@oxlint/win32-arm64": "npm:0.16.8" "@oxlint/win32-arm64": "npm:0.16.9"
"@oxlint/win32-x64": "npm:0.16.8" "@oxlint/win32-x64": "npm:0.16.9"
dependenciesMeta: dependenciesMeta:
"@oxlint/darwin-arm64": "@oxlint/darwin-arm64":
optional: true optional: true
@@ -28009,7 +28009,7 @@ __metadata:
bin: bin:
oxc_language_server: bin/oxc_language_server oxc_language_server: bin/oxc_language_server
oxlint: bin/oxlint oxlint: bin/oxlint
checksum: 10/f49bba9ca742ecae611443b5450a7bd58789b0deb3f853f9de2cccbf8b38d714726ef669d59400de3333107ecd122b1f7ab9368b5dd2c2e41edad3b32afb60b8 checksum: 10/94231e74a8484d48b886e9773152870d2481fa7f770f4c7d12666230a697d6a4c5ca277f6ecd9e6c725abc40052d6adcb6bfa5e5ed565df49e5f875a340e0793
languageName: node languageName: node
linkType: hard linkType: hard