Releases: yantrajs/yantra
Releases · yantrajs/yantra
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
v1.2.176
v1.2.171
v1.2.165
v1.2.162
- JSString moved to Generated Class
Full Changelog: v1.2.161...v1.2.162
v1.2.161
v1.2.160
v1.2.155
Full Changelog: v1.2.146...v1.2.155
- Moved Typed Arrays, RegExp classes to Generated Classes