Skip to content

Commit

Permalink
Merge pull request #89 from gaelj/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
gaelj authored Feb 1, 2024
2 parents 9754465 + 20b104a commit 294acbe
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 22 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.2.2 - 2024-02-01

### ⚡️ Improve performance

- Call js module dispose on blazor component dispose

### ⬆️ Upgrade dependencies

- Update @codemirror/lint

### 🐛 Fix a bug

- Ensure the js init of an editor is done only once

## 0.2.1 - 2024-01-31

### ✨ Introduce new features
Expand Down
2 changes: 1 addition & 1 deletion CodeMirror6/CodeMirror6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>GaelJ.BlazorCodeMirror6</AssemblyName>
<IsPackable>true</IsPackable>
<PackageId>GaelJ.BlazorCodeMirror6</PackageId>
<Version>0.2.1</Version>
<Version>0.2.2</Version>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
1 change: 1 addition & 0 deletions CodeMirror6/CodeMirror6WrapperInternal.razor
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
>
</div>
</div>

@if (ContentAfter is not null && CmJsInterop is not null && Config is not null && CommandDispatcher is not null) {
@ContentAfter((CommandDispatcher, Config, State))
}
7 changes: 7 additions & 0 deletions CodeMirror6/CodeMirror6WrapperInternal.razor.JsInterop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ public async ValueTask DisposeAsync()
{
if (IsJSReady) {
var module = await _moduleTask.Value;
try {
await ModuleInvokeVoidAsync("dispose");
}
catch (ObjectDisposedException) { }
catch (JSDisconnectedException) { }
catch (Exception) { }

try {
await module.DisposeAsync();
}
Expand Down
14 changes: 7 additions & 7 deletions CodeMirror6/NodeLib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CodeMirror6/NodeLib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@codemirror/lang-sql": "^6.5.5",
"@codemirror/lang-xml": "^6.0.2",
"@codemirror/language-data": "^6.4.0",
"@codemirror/lint": "^6.4.2",
"@codemirror/lint": "^6.5.0",
"@codemirror/merge": "^6.6.0",
"@codemirror/theme-one-dark": "^6.1.2",
"@microsoft/dotnet-js-interop": "^8.0.0",
Expand Down
3 changes: 3 additions & 0 deletions CodeMirror6/NodeLib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ export async function initCodeMirror(
initialConfig: CmConfiguration,
setup: CmSetup
) {
if (CMInstances[id] !== undefined)
return;

try {
const minDelay = new Promise(res => setTimeout(res, 100))

Expand Down
2 changes: 1 addition & 1 deletion Examples.BlazorServer/Examples.BlazorServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.2.1</Version>
<Version>0.2.2</Version>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<Version>0.2.1</Version>
<Version>0.2.2</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Sentry.AspNetCore" Version="3.41.4" />
Expand Down
2 changes: 1 addition & 1 deletion Examples.BlazorWasm/Examples.BlazorWasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<Version>0.2.1</Version>
<Version>0.2.2</Version>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser-wasm" />
Expand Down
2 changes: 1 addition & 1 deletion Examples.Common/Examples.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<Version>0.2.1</Version>
<Version>0.2.2</Version>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
Expand Down
15 changes: 6 additions & 9 deletions NEW_CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
### ✨ Introduce new features
### ⚡️ Improve performance

- Add DisplayName() extension to CodeMirrorLanguage enum
- Allow scrolling past the end of the document
- Implement white space & trailing white space highlighting
- Call js module dispose on blazor component dispose

### 🐛 Fix a bug
### ⬆️ Upgrade dependencies

- Fix dragging text was highjacked by the file drag overlay
- Fix empty language definitions in example
- Update @codemirror/lint

### ✏️ Fix typos
### 🐛 Fix a bug

- Display Plain Text language name with space
- Ensure the js init of an editor is done only once

0 comments on commit 294acbe

Please sign in to comment.