diff --git a/Changelog.md b/Changelog.md index 808567d9..f20ab694 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,9 +1,45 @@ # Changelog -## 2.8.3 - 2022-07-04 🦅 +## 3.0.0 - 2022-10-01 👻 + +This is "The Kyklish Release" because Kyklish wrote most of this code. Thank you! + +The `#nnn` values in this release are links to PRs, not to issues. + +Breaking changes: + +- Update file template: Add `#NoEnv` and `SetBatchLines, -1` (#202) + +> Formatter bugfixes may be considered breaking if you wanted the old behaviors. If you want the old behavior, please [open an issue](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/new?assignees=mark-wiemer&labels=bug%2C+formatter&template=formatting-bug.md&title=). + +Features: + +- Add [formatter directive](./README.md#formatter-directives) for "Format Block Comment" (#164) +- Add "allowed number of empty lines" setting to preserve any number of lines. Defaults to `1`, `-1` means "preserve all empty lines" (#194) +- Add "preserve indent" setting to preserve spaces before a comment. Defaults to `false`. (#192) +- Add "trim extra spaces" to trim spaces between words. Defaults to `true`. (#191) +- Trim end of line when formatting (#190) + +Fixes: + +- Fix some snippets (#138, #201, #210) +- Fix formatting bugs with semi-colon as part of a string (#159) +- Fix some formatting bugs with `if`, `else`, etc. without braces (#181) +- Fix formatter issue with non-label colon at end of line (#162) +- Even more formatter fixes (#164) + +## 2.8.4 - 2022-07-07 + +- Revert to v2.8.2 due to unexpected breaking change in v2.8.3 + +## 2.8.3 (YANKED) - 2022-07-04 🦅 + +> This release has been yanked, meaning it's not supported. Use v2.8.2 instead. - Change to use default debug icon ([#100](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/100)) +- Unexpected change: Break "step into" function of debugger. :( + ## 2.8.2 - 2022-06-11 🎂 - No user-facing changes diff --git a/README.md b/README.md index 6ed4ef53..eba95d56 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ AutoHotkey Plus Plus (AHK++) provides AutoHotkey language support for VS Code. T - code formatting - ...and more! -> Currently, AHK++ officially supports only AHK v1. AHK v2 will likely work, but please open issues and be patient if complex workflows are not supported. See [issue #146: Support AHK v2](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/146) +> Currently, AHK++ officially supports only AHK v1. AHK v2 will likely work, but please open issues and be patient if complex workflows are not supported. See [issue 146: Support AHK v2](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/issues/146) AHK++ is a fork of [AutoHotkey Plus by cweijan](https://github.com/AutoHotkey-Plus/vscode-autohotkey), with the primary goal of fixing bugs and adding user-requested features. @@ -29,7 +29,7 @@ AHK++ is a fork of [AutoHotkey Plus by cweijan](https://github.com/AutoHotkey-Pl - [Outline](#outline) - [Folding](#folding) - [Code Format](#code-format) - - [Formatter Directives](#formatter-directives) + - [Formatter Directives](#formatter-directives) - [Credits](#credits) ## Why AutoHotkey Plus Plus? @@ -129,13 +129,15 @@ Collapse me! ### Code Format -Supports standard VS Code formatting. - -> The formatter is not currently customizable. +Supports standard VS Code formatting with a few options. ![Code Format](image/codeFormat.jpg) -### Formatter Directives +#### Formatter Directives + +Formatter directives instruct the formatter to behave a certain way on sections of code. + +The only directive currently supported is `FormatBlockComment` and it's used as below: ```autohotkey ;@AHK++FormatBlockCommentOn diff --git a/SECURITY.md b/SECURITY.md index 36ac7ffd..e68d91a0 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ ## Supported Versions -All versions +All non-[yanked](./Changelog.md#283-yanked---2022-07-04-🦅) versions. ## Reporting a Vulnerability diff --git a/docs/Development.md b/docs/Development.md index 9f5d5aab..7985c148 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -31,8 +31,8 @@ The tests should run automatically, and you should see passing output in the Deb 1. Update the changelog. 1. Open a draft PR to merge to `main`. The title of the PR should be e.g. `v2.8.2`, lowercase 'v'. The PR description should contain the changelog entry. 1. Fix any remaining issues with the code (but only make changes already logged in the changelog). Use the draft PR to easily detect issues. -1. Bump the version in `package.json`. The message of the commit should be e.g. `v2.8.2`. -1. Push the changes. +1. Bump the version in `package.json`. +1. Commit and push the changes. Commit message doesn't matter. 1. Merge the PR. The body of the commit message should be the changelog entry. 1. `git checkout main && git pull` 1. Package the new version using `vsce package`. diff --git a/package.json b/package.json index 91216eac..678ee30c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vscode-autohotkey-plus-plus", "displayName": "AutoHotkey Plus Plus", - "version": "2.8.3", + "version": "3.0.0", "description": "AutoHotkey IntelliSense, debug, and language support for VS Code, forked from AutoHotkey Plus by cweijan", "categories": [ "Programming Languages", diff --git a/src/debugger/struct/command.ts b/src/debugger/struct/command.ts index 872bed67..175eb085 100644 --- a/src/debugger/struct/command.ts +++ b/src/debugger/struct/command.ts @@ -1,3 +1,4 @@ +// These enum values are sent directly to AHK. Do not change! export enum Continue { break = 'break', run = 'run', diff --git a/src/test/suite/common/codeUtil.test.ts b/src/test/suite/common/codeUtil.test.ts index 6616ba3e..983add27 100644 --- a/src/test/suite/common/codeUtil.test.ts +++ b/src/test/suite/common/codeUtil.test.ts @@ -4,7 +4,7 @@ import { CodeUtil } from '../../../common/codeUtil'; suite('Code utils', () => { suite('purify', () => { // List of test data - let dataList = [ + const dataList = [ // { // in: , // input test string // rs: , // expected result @@ -44,4 +44,25 @@ suite('Code utils', () => { }); }); }); + + // Test against length for now + suite('matchAll', () => { + const tests = [ + { + name: 'no match', + regex: /hi/g, + text: 'bye', + expected: [], + }, + ]; + + tests.forEach((myTest) => { + test(myTest.name, () => { + assert.strictEqual( + CodeUtil.matchAll(myTest.regex, myTest.text).length, + myTest.expected.length, + ); + }); + }); + }); }); diff --git a/src/test/suite/extension.test.ts b/src/test/suite/extension.test.ts deleted file mode 100644 index 9337fdf2..00000000 --- a/src/test/suite/extension.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import * as assert from 'assert'; - -// You can import and use all API from the 'vscode' module -// as well as import your extension to test it -// import * as vscode from 'vscode'; -// import * as myExtension from '../../extension'; - -suite('Extension', () => { - test('Sample test', () => { - assert.strictEqual(1 + 1, 2); - }); -});