diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 341c4e4..b17673e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,6 @@ on: permissions: contents: write - discussions: write env: PLUGIN_ID: ace-code-editor @@ -54,7 +53,6 @@ jobs: draft: false prerelease: ${{ contains(github.ref, 'beta') }} generate_release_notes: true - discussion_category_name: "Announcements" body: | ${{ contains(github.ref, 'beta') && '🚧 This is a beta release' || '🎉 This is a stable release' }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 555ee76..ae3423a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# [2.0.0](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/compare/1.5.2...2.0.0) (2026-01-25) + + +### 🐛 Bug Fixes + +* 修复安全问题 ([84b70fb](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/commit/84b70fb4971de7dad9ba401f9cdd3935850dce02)) + + +### 🔨 Chore + +* 转移仓库所有权给 Raven-Pensieve ([116140e](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/commit/116140e6da1f97cb40430323ad79616f24b2bc17)) + + + ## [1.5.2](https://github.com/RavenHogWarts/obsidian-ace-code-editor/compare/1.5.1...1.5.2) (2026-01-02) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 298781d..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,287 +0,0 @@ -# Contribution Guidelines English Version - -Thank you for your interest in contributing to Ace Code Editor! This document provides guidelines and instructions for contributing to this project. - -## Table of Contents - -- [Contribution Guidelines English Version](#contribution-guidelines-english-version) - - [Table of Contents](#table-of-contents) - - [Code of Conduct](#code-of-conduct) - - [Getting Started](#getting-started) - - [Development Workflow](#development-workflow) - - [Pull Request Process](#pull-request-process) - - [Coding Standards](#coding-standards) - - [Commit Guidelines](#commit-guidelines) - - [Reporting Bugs](#reporting-bugs) - - [Feature Requests](#feature-requests) -- [贡献指南中文版本](#贡献指南中文版本) - - [目录](#目录) - - [行为准则](#行为准则) - - [入门指南](#入门指南) - - [开发工作流程](#开发工作流程) - - [拉取请求流程](#拉取请求流程) - - [编码标准](#编码标准) - - [提交指南](#提交指南) - - [报告错误](#报告错误) - - [功能请求](#功能请求) - -## Code of Conduct - -By participating in this project, you are expected to uphold our Code of Conduct: - -- Use welcoming and inclusive language -- Be respectful of differing viewpoints and experiences -- Gracefully accept constructive criticism -- Focus on what is best for the community -- Show empathy towards other community members - -## Getting Started - -1. **Fork the repository** on GitHub -2. **Clone your fork** locally - ```bash - git clone https://github.com/RavenHogwarts/ace-code-editor.git - cd ace-code-editor - ``` -3. **Install dependencies** - ```bash - npm install - ``` -4. **Set up development environment** - - Create a `.env` file following the example in `.env.example` - - For local testing with Obsidian, you can use the build:local script - ```.env.example - VAULT_PATH=/path/to/your/vault - ``` - -## Development Workflow - -1. **Create a branch** for your feature or bugfix: - ```bash - git checkout -b feature/your-feature-name - ``` - or - ```bash - git checkout -b fix/issue-you-are-fixing - ``` - -2. **Make your changes** and test them thoroughly - -3. **Build and test locally**: - ```bash - npm run build:local - ``` - -4. **Commit your changes** following our [commit guidelines](#commit-guidelines) - -## Pull Request Process - -1. **Update documentation** if necessary -2. **Ensure tests pass** if applicable -3. **Make sure your code lints** without errors(no-explicit-any / no-unused-vars / no-non-null-assertion can be ignore): - ```bash - npm run lint - ``` -4. **Push your branch** to your fork: - ```bash - git push origin feature/your-feature-name - ``` -5. **Create a Pull Request** against the `master` branch of the original repository -6. **Describe your changes** in detail, referencing any related issues - -## Coding Standards - -- Follow the existing code style in the project -- Use TypeScript for type safety -- Document your code with appropriate comments -- Write clear, descriptive variable and function names -- Fix any linting errors before submitting(no-explicit-any / no-unused-vars / no-non-null-assertion can be ignore): - ```bash - npm run lint:fix - ``` - -## Commit Guidelines - -We use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages: - -``` -(): - -[optional body] - -[optional footer] -``` - -Common types include: -- `feat`: A new feature -- `fix`: A bug fix -- `docs`: Documentation changes -- `style`: Code style changes (formatting, etc.) -- `refactor`: Code changes that neither fix bugs nor add features -- `perf`: Performance improvements -- `test`: Adding or updating tests -- `chore`: Changes to the build process or auxiliary tools - -You can use our commitizen setup to help format commits correctly: -```bash -git add . -npx cz -``` - -## Reporting Bugs - -When reporting bugs, please include: - -- A clear, descriptive title -- Steps to reproduce the issue -- Expected behavior -- Actual behavior -- Screenshots if applicable -- Your environment (OS, Obsidian version, plugin version) - -## Feature Requests - -Feature requests are welcome. Please provide: - -- A clear description of the feature -- Why this feature would be beneficial -- Any implementation ideas you might have - ---- - -# 贡献指南中文版本 - -感谢您有兴趣为 Ace Code Editor 做出贡献!本文档提供了为该项目做出贡献的指南和说明。 - -## 目录 - -- [行为准则](#行为准则) -- [入门指南](#入门指南) -- [开发工作流程](#开发工作流程) -- [拉取请求流程](#拉取请求流程) -- [编码标准](#编码标准) -- [提交指南](#提交指南) -- [报告错误](#报告错误) -- [功能请求](#功能请求) - -## 行为准则 - -通过参与此项目,您应当遵守我们的行为准则: - -- 使用友好和包容的语言 -- 尊重不同的观点和经验 -- 优雅地接受建设性批评 -- 关注对社区最有利的事情 -- 对其他社区成员表示同理心 - -## 入门指南 - -1. **在 GitHub 上 Fork 仓库** -2. **在本地克隆您的 Fork** - ```bash - git clone https://github.com/RavenHogwarts/ace-code-editor.git - cd ace-code-editor - ``` -3. **安装依赖** - ```bash - npm install - ``` -4. **设置开发环境** - - 按照 `.env.example`的示例创建 `.env` 文件 - - 对于与 Obsidian 的本地测试,您可以使用 build:local 脚本 - ```.env.example - VAULT_PATH=/path/to/your/vault - ``` - -## 开发工作流程 - -1. **为您的功能或错误修复创建分支**: - ```bash - git checkout -b feature/您的功能名称 - ``` - 或 - ```bash - git checkout -b fix/您要修复的问题 - ``` - -2. **进行更改** 并彻底测试 - -3. **在本地构建和测试**: - ```bash - npm run build:local - ``` - -4. **提交您的更改**,遵循我们的[提交指南](#提交指南) - -## 拉取请求流程 - -1. **必要时更新文档** -2. **确保测试通过**(如果适用) -3. **确保您的代码没有 lint 错误**(no-explicit-any / no-unused-vars / no-non-null-assertion 可以忽略): - ```bash - npm run lint - ``` -4. **将您的分支推送**到您的 Fork: - ```bash - git push origin feature/您的功能名称 - ``` -5. **对原始仓库的 `master` 分支创建拉取请求** -6. **详细描述您的更改**,引用任何相关问题 - -## 编码标准 - -- 遵循项目中现有的代码风格 -- 使用 TypeScript 确保类型安全 -- 用适当的注释记录您的代码 -- 编写清晰、描述性的变量和函数名 -- 在提交前修复任何 lint 错误(no-explicit-any / no-unused-vars / no-non-null-assertion 可以忽略): - ```bash - npm run lint:fix - ``` - -## 提交指南 - -我们使用 [Conventional Commits](https://www.conventionalcommits.org/) 作为提交消息规范: - -``` -<类型>(<范围>): <描述> - -[可选的正文] - -[可选的页脚] -``` - -常见类型包括: -- `feat`: 新功能 -- `fix`: 错误修复 -- `docs`: 文档变更 -- `style`: 代码风格变更(格式化等) -- `refactor`: 既不修复错误也不添加功能的代码变更 -- `perf`: 性能改进 -- `test`: 添加或更新测试 -- `chore`: 构建过程或辅助工具的变更 - -您可以使用我们的 commitizen 设置来帮助正确格式化提交: -```bash -git add . -npx cz -``` - -## 报告错误 - -报告错误时,请包括: - -- 清晰、描述性的标题 -- 重现问题的步骤 -- 预期行为 -- 实际行为 -- 截图(如适用) -- 您的环境(操作系统、Obsidian 版本、插件版本) - -## 功能请求 - -欢迎功能请求。请提供: - -- 功能的清晰描述 -- 为什么这个功能会有益 -- 您可能有的任何实现想法 diff --git a/README.ZH.md b/README.ZH.md index fbc8fd8..695ceab 100644 --- a/README.ZH.md +++ b/README.ZH.md @@ -1,15 +1,15 @@ -中文 | [English](https://github.com/RavenHogWarts/obsidian-ace-code-editor/blob/master/README.md) +中文 | [English](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/blob/master/README.md) # ACE 代码编辑器 一个基于 Ace 编辑器增强的代码编辑器,提供语法高亮、代码折叠等高级编辑功能。 -[![GitHub stars](https://img.shields.io/github/stars/RavenHogWarts/obsidian-ace-code-editor?style=flat&label=星标)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/stargazers) -[![Total Downloads](https://img.shields.io/github/downloads/RavenHogWarts/obsidian-ace-code-editor/total?style=flat&label=总下载量)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/releases) -[![Latest Downloads](https://img.shields.io/github/downloads/RavenHogWarts/obsidian-ace-code-editor/latest/total?style=flat&label=最新版下载量)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/releases/latest) -[![GitHub License](https://img.shields.io/github/license/RavenHogWarts/obsidian-ace-code-editor?style=flat&label=许可证)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/blob/master/LICENSE) -[![GitHub Issues](https://img.shields.io/github/issues/RavenHogWarts/obsidian-ace-code-editor?style=flat&label=问题)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/issues) -[![GitHub Last Commit](https://img.shields.io/github/last-commit/RavenHogWarts/obsidian-ace-code-editor?style=flat&label=最后提交)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/commits/master) +[![GitHub stars](https://img.shields.io/github/stars/Raven-Pensieve/obsidian-ace-code-editor?style=flat&label=星标)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/stargazers) +[![Total Downloads](https://img.shields.io/github/downloads/Raven-Pensieve/obsidian-ace-code-editor/total?style=flat&label=总下载量)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/releases) +[![Latest Downloads](https://img.shields.io/github/downloads/Raven-Pensieve/obsidian-ace-code-editor/latest/total?style=flat&label=最新版下载量)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/releases/latest) +[![GitHub License](https://img.shields.io/github/license/Raven-Pensieve/obsidian-ace-code-editor?style=flat&label=许可证)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/blob/master/LICENSE) +[![GitHub Issues](https://img.shields.io/github/issues/Raven-Pensieve/obsidian-ace-code-editor?style=flat&label=问题)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/issues) +[![GitHub Last Commit](https://img.shields.io/github/last-commit/Raven-Pensieve/obsidian-ace-code-editor?style=flat&label=最后提交)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/commits/master) ## 功能介绍 @@ -27,47 +27,25 @@ ## 安装 -### 手动安装 +### 社区插件市场安装 -1. 下载最新版本 -2. 将 `main.js`、`styles.css` 和 `manifest.json` 复制到你的仓库插件文件夹中:`/.obsidian/plugins/obsidian-ace-code-editor/` -3. 重新加载 Obsidian -4. 在设置 → 社区插件中启用插件 +[点击安装](obsidian://show-plugin?id=ace-code-editor),或按以下步骤操作: + +1. 打开 Obsidian 并前往 `设置 > 第三方插件`。 +2. 搜索 “Ace Code Editor”。 +3. 点击 “安装”。 ### BRAT(推荐给测试用户) 1. 安装 [BRAT](https://github.com/TfTHacker/obsidian42-brat) 插件 2. 在 BRAT 设置中点击"添加测试插件" -3. 输入 `RavenHogWarts/obsidian-ace-code-editor` +3. 输入 `Raven-Pensieve/obsidian-ace-code-editor` 4. 启用插件 -## 开发指南 - -- 克隆此仓库 -- 确保你的 NodeJS 版本至少为 v16 (`node --version`) -- 使用 `npm i` 或 `yarn` 安装依赖 -- 使用 `npm run dev` 启动开发模式并进行实时编译 -- 运行 `npm run build` 构建插件 -- 运行 `npm run build:local` 构建插件并将其复制到您的 vault 插件文件夹(需要在项目根目录创建一个 `.env` 文件并添加:`VAULT_PATH=/path/to/your/vault`) -- 运行 `npm run version` 更新版本号并更新 manifest.json、version.json、package.json -- 运行 `npm run release` 构建插件并更新版本号 - -## 支持与帮助 - -如果你遇到任何问题或有建议: - -- [在 GitHub 上提交问题](https://github.com/RavenHogWarts/obsidian-ace-code-editor/issues) -- [加入讨论](https://github.com/RavenHogWarts/obsidian-ace-code-editor/discussions) 提出问题或分享想法 -- [查看贡献指南](./CONTRIBUTING.md) 如果你想为项目做出贡献 - -如果你觉得这个插件对你有帮助,可以通过以下方式支持开发: - -- [爱发电](https://afdian.com/a/ravenhogwarts) - ## 许可证 此项目基于 MIT LICENSE 许可 - 详情请参阅 [LICENSE](LICENSE) 文件。 ## Star 历史 -[![Star 历史图表](https://api.star-history.com/svg?repos=RavenHogWarts/obsidian-ace-code-editor&type=Timeline)](https://www.star-history.com/#RavenHogWarts/obsidian-ace-code-editor&Timeline) +[![Star 历史图表](https://api.star-history.com/svg?repos=Raven-Pensieve/obsidian-ace-code-editor&type=Timeline)](https://www.star-history.com/#Raven-Pensieve/obsidian-ace-code-editor&Timeline) diff --git a/README.md b/README.md index ebb008a..06e3b24 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -English | [中文](https://github.com/RavenHogWarts/obsidian-ace-code-editor/blob/master/README-zh.md) +English | [中文](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/blob/master/README-zh.md) # ACE CODE EDITOR An enhanced code editor using Ace editor, providing syntax highlighting, code folding, and other advanced editing features. -[![GitHub stars](https://img.shields.io/github/stars/RavenHogWarts/obsidian-ace-code-editor?style=flat&label=Stars)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/stargazers) -[![Total Downloads](https://img.shields.io/github/downloads/RavenHogWarts/obsidian-ace-code-editor/total?style=flat&label=Total%20Downloads)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/releases) -[![Latest Downloads](https://img.shields.io/github/downloads/RavenHogWarts/obsidian-ace-code-editor/latest/total?style=flat&label=Latest%20Downloads)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/releases/latest) -[![GitHub License](https://img.shields.io/github/license/RavenHogWarts/obsidian-ace-code-editor?style=flat&label=License)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/blob/master/LICENSE) -[![GitHub Issues](https://img.shields.io/github/issues/RavenHogWarts/obsidian-ace-code-editor?style=flat&label=Issues)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/issues) -[![GitHub Last Commit](https://img.shields.io/github/last-commit/RavenHogWarts/obsidian-ace-code-editor?style=flat&label=Last%20Commit)](https://github.com/RavenHogWarts/obsidian-ace-code-editor/commits/master) +[![GitHub stars](https://img.shields.io/github/stars/Raven-Pensieve/obsidian-ace-code-editor?style=flat&label=Stars)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/stargazers) +[![Total Downloads](https://img.shields.io/github/downloads/Raven-Pensieve/obsidian-ace-code-editor/total?style=flat&label=Total%20Downloads)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/releases) +[![Latest Downloads](https://img.shields.io/github/downloads/Raven-Pensieve/obsidian-ace-code-editor/latest/total?style=flat&label=Latest%20Downloads)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/releases/latest) +[![GitHub License](https://img.shields.io/github/license/Raven-Pensieve/obsidian-ace-code-editor?style=flat&label=License)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/blob/master/LICENSE) +[![GitHub Issues](https://img.shields.io/github/issues/Raven-Pensieve/obsidian-ace-code-editor?style=flat&label=Issues)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/issues) +[![GitHub Last Commit](https://img.shields.io/github/last-commit/Raven-Pensieve/obsidian-ace-code-editor?style=flat&label=Last%20Commit)](https://github.com/Raven-Pensieve/obsidian-ace-code-editor/commits/master) ## Features @@ -26,49 +26,25 @@ An enhanced code editor using Ace editor, providing syntax highlighting, code fo ![](./assets/code_file_preview.png) ## Installation +### Community plugin market installation -### Manual Installation +[Click to install](obsidian://show-plugin?id=ace-code-editor), or: -1. Download the latest release -2. Copy `main.js`, `styles.css`, and `manifest.json` to your vault's plugins folder: `/.obsidian/plugins/obsidian-ace-code-editor/` -3. Reload Obsidian -4. Enable the plugin in Settings → Community Plugins +1. Open Obsidian and go to `Settings > Community Plugins`. +2. Search for "Ace Code Editor". +3. Click "Install". ### BRAT (Recommended for Beta Users) 1. Install [BRAT](https://github.com/TfTHacker/obsidian42-brat) plugin 2. Click "Add Beta plugin" in BRAT settings -3. Enter `RavenHogWarts/obsidian-ace-code-editor` +3. Enter `Raven-Pensieve/obsidian-ace-code-editor` 4. Enable the plugin -## Development - -- Clone this repo -- Make sure your NodeJS is at least v16 (`node --version`) -- `npm i` or `yarn` to install dependencies -- `npm run dev` to start compilation in watch mode -- `npm run build` to build the plugin -- `npm run build:local` to build the plugin and copy it to your vault's plugins folder(need create a .env file in the project root and add the line: VAULT_PATH=/path/to/your/vault) -- `npm run version` to bump the version number and update the manifest.json, version.json, package.json -- `npm run release` to build the plugin and bump the version number - -## Support - -If you encounter any issues or have suggestions: - -- [Open an issue](https://github.com/RavenHogWarts/obsidian-ace-code-editor/issues) on GitHub -- [Join the discussion](https://github.com/RavenHogWarts/obsidian-ace-code-editor/discussions) for questions and ideas -- [Check the contributing guidelines](./CONTRIBUTING.md) if you'd like to contribute to the project - -If you find this plugin helpful, you can support the development through: - -- [ko-fi](https://ko-fi.com/ravenhogwarts) -- [afdian](https://afdian.com/a/ravenhogwarts) - ## License This project is licensed under the MIT LICENSE - see the [LICENSE](LICENSE) file for details. ## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=RavenHogWarts/obsidian-ace-code-editor&type=Timeline)](https://www.star-history.com/#RavenHogWarts/obsidian-ace-code-editor&Timeline) +[![Star History Chart](https://api.star-history.com/svg?repos=Raven-Pensieve/obsidian-ace-code-editor&type=Timeline)](https://www.star-history.com/#Raven-Pensieve/obsidian-ace-code-editor&Timeline) diff --git a/manifest-beta.json b/manifest-beta.json index 427d37b..1293703 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -5,7 +5,7 @@ "minAppVersion": "1.8.0", "description": "An enhanced code editor using Ace editor, providing syntax highlighting, code folding, and other advanced editing features.", "author": "RavenHogWarts", - "authorUrl": "https://github.com/RavenHogWarts", + "authorUrl": "https://github.com/Raven-Pensieve", "fundingUrl": { "ko-fi": "https://ko-fi.com/ravenhogwarts", "afdian": "https://afdian.com/a/ravenhogwarts" diff --git a/manifest.json b/manifest.json index 484ffed..dc86f89 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "ace-code-editor", "name": "Ace Code Editor", - "version": "1.5.2", + "version": "2.0.0", "minAppVersion": "1.8.0", "description": "An enhanced code editor using Ace editor, providing syntax highlighting, code folding, and other advanced editing features.", "author": "RavenHogWarts", diff --git a/package-lock.json b/package-lock.json index 725aa65..e48c29a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ace-code-editor", - "version": "1.5.2", + "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ace-code-editor", - "version": "1.5.2", + "version": "2.0.0", "license": "GPL-3.0-only", "dependencies": { "@types/ace": "^0.0.52", diff --git a/package.json b/package.json index 5179659..6669326 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ace-code-editor", - "version": "1.5.2", + "version": "2.0.0", "description": "An enhanced code editor using Ace editor, providing syntax highlighting, code folding, and other advanced editing features.", "main": "main.js", "scripts": { diff --git a/versions.json b/versions.json index e1a43a1..6fa5a27 100644 --- a/versions.json +++ b/versions.json @@ -17,5 +17,6 @@ "1.4.0": "1.8.0", "1.5.0": "1.8.0", "1.5.1": "1.8.0", - "1.5.2": "1.8.0" + "1.5.2": "1.8.0", + "2.0.0": "1.8.0" }