firefly-compiler 0.4.91 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ capability Compression {}
5
5
  extend self: Compression {
6
6
 
7
7
  compressBrotli(uncompressed: Buffer, level: Int = 4): Buffer {
8
- internalCompress("brotli", level, uncompressed)
8
+ internalCompress(self, "brotli", level, uncompressed)
9
9
  }
10
10
 
11
11
  decompressBrotli(compressed: Buffer): Buffer {
@@ -13,7 +13,7 @@ extend self: Compression {
13
13
  }
14
14
 
15
15
  compressGzip(uncompressed: Buffer, level: Int = 6): Buffer {
16
- internalCompress("gzip", level, uncompressed)
16
+ internalCompress(self, "gzip", level, uncompressed)
17
17
  }
18
18
 
19
19
  decompressGzip(compressed: Buffer): Buffer {
@@ -21,7 +21,7 @@ extend self: Compression {
21
21
  }
22
22
 
23
23
  compressDeflate(uncompressed: Buffer, level: Int = 6): Buffer {
24
- internalCompress("deflate", level, uncompressed)
24
+ internalCompress(self, "deflate", level, uncompressed)
25
25
  }
26
26
 
27
27
  decompressDeflate(compressed: Buffer): Buffer {
@@ -36,9 +36,9 @@ newForBrowserSystem(browserSystem: BrowserSystem): Compression
36
36
  newForNodeSystem(nodeSystem: NodeSystem): Compression
37
37
  target js async "return globalThis"
38
38
 
39
- internalCompress(algorithm: String, level: Int, buffer: Buffer): Buffer {
39
+ internalCompress(compression: Compression, algorithm: String, level: Int, buffer: Buffer): Buffer {
40
40
  let js = UnsafeJs.jsSystem()
41
- let dataView = UnsafeJs.toJsValue(buffer)
41
+ let dataView = js.value(buffer)
42
42
  let uint8Array = js->Uint8Array->(dataView->buffer, dataView->byteOffset, dataView->byteLength)
43
43
  let stream = js->ReadableStream->(js->(
44
44
  start = js->{controller =>
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.91",
7
+ "version": "0.5.1",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -18,6 +18,5 @@ cancelled(): Bool
18
18
  // Replaced by the compiler
19
19
  target js sync "return false"
20
20
 
21
- toJsValue[T](value: T): JsValue
21
+ value[T](value: T): JsValue
22
22
  target js sync "return value_"
23
-
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.4.91",
7
+ "version": "0.5.1",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"