Skip to content

Update TypeScript and add SCSS module declarations - #46

Merged
Vanessa219 merged 5 commits into
siyuan-note:mainfrom
Zuoqiu-Yingyi:chore/update-typescript
May 31, 2026
Merged

Update TypeScript and add SCSS module declarations#46
Vanessa219 merged 5 commits into
siyuan-note:mainfrom
Zuoqiu-Yingyi:chore/update-typescript

Conversation

@Zuoqiu-Yingyi

Copy link
Copy Markdown
Contributor

REL: #42 (comment)

This pull request updates several build tool dependencies to their latest versions, focusing on typescript, sass-loader, webpack-cli, and related packages. These upgrades ensure compatibility with newer Node.js versions and provide the latest features and bug fixes.

Dependency upgrades:

  • Upgraded typescript from version 4.9.5 to 5.9.3, along with all related TypeScript ESLint packages and utilities to ensure compatibility. [1] [2] [3] [4] [5] [6] [7] [8]
  • Upgraded sass-loader from 16.0.8 to 17.0.0, updating its peer dependencies and removing optional support for node-sass. [1] [2] [3] [4]
  • Upgraded webpack-cli from 7.0.2 to 7.0.3 and updated all references to this version in the lockfile. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Upgraded terser-webpack-plugin from 5.6.0 to 5.6.1. [1] [2] [3]

Minor dependency updates and cleanup:

  • Updated minor dependencies such as electron-to-chromium (1.5.361 → 1.5.363) and which-typed-array (1.1.20 → 1.1.21), and removed unused packages like fastest-levenshtein. [1] [2] [3] [4] [5] [6] [7]

These updates help keep the project secure and compatible with the latest tooling and environments.

@Vanessa219

Copy link
Copy Markdown
Member

为什么不升级到 6.x。

可以使用这个:
"strictNullChecks": false

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s TypeScript/tooling dependencies and adds TypeScript declarations for importing SCSS, with additional TypeScript non-null/definite-assignment assertions applied in the sample plugin code.

Changes:

  • Upgraded build/dev dependencies (notably typescript, sass-loader, webpack-cli) and updated the pnpm lockfile accordingly.
  • Added a *.scss TypeScript module declaration file for SCSS imports.
  • Updated src/index.ts with definite-assignment (!:) and non-null (!) assertions for TypeScript compatibility.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 8 comments.

File Description
src/index.ts Adds TypeScript assertions around DOM queries and editor access to satisfy stricter typing.
src/declarations.d.ts Introduces a TS declaration for importing *.scss files.
package.json Bumps key toolchain dependencies (TypeScript / loaders / webpack CLI).
pnpm-lock.yaml Lockfile updates reflecting the dependency upgrades/removals.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.ts Outdated
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts Outdated
Comment thread package.json
@Zuoqiu-Yingyi

Copy link
Copy Markdown
Contributor Author

@Vanessa219

  • 已修复报告的问题
  • 已将 typescrit 升级到 6.x 版本

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread src/index.ts Outdated
Comment thread src/index.ts
Comment thread package.json
Comment thread package.json
@Zuoqiu-Yingyi

Copy link
Copy Markdown
Contributor Author

@Vanessa219
已修复报告的问题

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 6 changed files in this pull request and generated 8 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
Comment thread src/index.ts
@Zuoqiu-Yingyi

Copy link
Copy Markdown
Contributor Author

@Vanessa219
已修复非误报的问题

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment thread src/index.ts
Comment on lines 472 to +476
click: () => {
openAttributePanel({
nodeElement: this.getEditor().protyle.wysiwyg.element.firstElementChild as HTMLElement,
protyle: this.getEditor().protyle,
nodeElement: this.getEditor()?.protyle?.wysiwyg?.element.firstElementChild as
| HTMLElement
| undefined,
@Vanessa219
Vanessa219 merged commit 652221a into siyuan-note:main May 31, 2026
Vanessa219 added a commit that referenced this pull request May 31, 2026
@Vanessa219 Vanessa219 added the enhancement New feature or request label May 31, 2026
@Zuoqiu-Yingyi
Zuoqiu-Yingyi deleted the chore/update-typescript branch May 31, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants