Releases: yantrajs/yantra
Releases · yantrajs/yantra
v1.2.209
v1.2.206
Full Changelog: v1.2.203...v1.2.206
- String Performance Improved by removing StringSpan
v1.2.203
Full Changelog: v1.2.202...v1.2.203
- Performance of appending string improved.
v1.2.202
Full Changelog: v1.2.201...v1.2.202
- Fixed String Object's length property access.
- Speed improved by increasing memory usage.
v1.2.201
v1.2.195
v1.2.192
v1.2.188
New Features
Explicit Resource Management
- Support for
Symbol.dispose
andSymbol.asyncDisposable
. - Support for
using constResource =
andawait using constResource =
syntax to enable disposable stack in current scope. - Support for CLR
IDisposable
andIAsyncDisposable
marshaling with automatic mapping for JavaScript's disposable symbols.
Example
Disposable implementation
class File {
[Symbol.dispose]() {
// close the file handle...
}
}
function writeText(filePath, text) {
using s = new File(filePath);
s.writeText(text);
}
AsyncDisposable implementation
class File {
async [Symbol.asyncDispose]() {
// close the file handle...
}
}
async function writeText(filePath, text) {
await using s = new File(filePath);
s.writeText(text);
}
What's Changed
- Bump NuGet.Protocol from 5.9.3 to 5.11.5 in /YantraJS by @dependabot in #86
- Feature/disposable by @ackava in #88
Full Changelog: v1.2.176...v1.2.188