Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onflow/cadence-language-server

Package Overview
Dependencies
Maintainers
11
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/cadence-language-server - npm Package Versions

1234

0.18.2

Diff

turbolent_flow
published 0.18.1 •

turbolent_flow
published 0.18.0 •

Changelog

Source

v0.18.0 - 15 Jun 2021

💥 Breaking Changes

  • Add HashAlgorithm hash and hashWithTag functions (#1002) @turbolent
  • Update the Crypto contract (#999) @turbolent

⭐ Features

🛠 Improvements

  • Make PublicKey type importable (#995) @SupunS
  • Update the Crypto contract (#999) @turbolent
  • Add dynamic type importability check for arguments (#1007) @SupunS
  • Language Server NPM package: Add support for Node environment, add tests (#1006) @turbolent
  • Embed markdown templates to docgen tool at compile time (#1004) @SupunS
  • No need for checking resource loss when function definitely halted (#1000) @turbolent
  • Remove the result declaration kind (#1001) @turbolent
  • Update for changes in Flowkit API (#962) @sideninja
  • Add Supun as code owner (#997) @turbolent
  • Disable the wasmtime VM for now (#991) @turbolent

🐞 Bug Fixes

📖 Documentation

  • Add documentation for the Cadence documentation generator (#1003) @SupunS

[Changes][v0.18.0]

<a name="v0.17.0"></a>

turbolent_flow
published 0.17.0 •

Changelog

Source

v0.17.0 - 09 Jun 2021

⭐ Features

🛠 Improvements

  • Add deferred decoding support for dictionary values (#925) @SupunS
  • Improve type inference for binary expressions (#957) @turbolent
  • Update language server to Cadence v0.16.0 (#926) @turbolent
  • [Doc-Gen Tool] Add documentation generation support for event declarations (#985) @SupunS
  • [Doc-Gen Tool] Group declarations based on their kind (#984) @SupunS
  • Check 'importability' instead of 'storability' for transaction arguments (#983) @SupunS
  • Allow native composite types to be passed as script arguments (#973) @SupunS
  • Validate UTF-8 compatibility in string value constructor (#972) @SupunS
  • Cache type ID for composite types (#950) @SupunS
  • [Optimization] Make dynamic types singleton for simple types (#963) @SupunS
  • Include docstrings in value and type variables, improve hover markup (#945) @turbolent
  • Always check arguments and record the argument types in the elaboration (#951) @turbolent
  • Optimize qualified identifier creation (#948) @SupunS
  • Optimize Type function declaration (#949) @turbolent
  • [Optimization] Re-use converter functions across interpreters (#947) @SupunS
  • Update and extend the source compatibility suite (#977) @turbolent
  • Update to Go 1.16.3's libexec/misc/wasm/wasm_exec.js (#929) @turbolent

🐞 Bug Fixes

🧪 Tests

📖 Documentation

🏗 Chore

[Changes][v0.17.0]

<a name="v0.16.1"></a>

turbolent_flow
published 0.16.0 •

Changelog

Source

v0.16.0 - 18 May 2021

💥 Breaking Changes

  • Add new crypto features (#852) @SupunS

    Renamed the ECDSA_Secp256k1 signature algorithm to ECDSA_secp256k1.

    Please update existing contracts, transactions, and scripts to use the new name.

  • Remove the high-level storage API (#877) @turbolent

    The internal interface's SetCadenceValue function was removed.

    This change does not affect Cadence programs (contracts, transactions, scripts).

⭐ Features

  • Add non-local type inference for expressions (#875) @SupunS

    The type of most declarations and expressions is now inferred in a uni-directional way, instead of only locally.

    For example, this allows the following declarations to type-check without having to add static casts:

    let numbers: [Int8] = [1, 2, 3]
    let nestedNumbers: [[Int8]] = [[1, 2], [3, 4]]
    let numberNames: {Int64: String} = {0: "zero", 1: "one"}
    let sum: Int8 = 1 + 2
    
  • Add new crypto features (#852) @SupunS

    Hash Algorithms

    Signature Algorithms

    PublicKey Type

    • Added the field let isValid: Bool. For example:

      let publicKey = PublicKey(publicKey: [], signatureAlgorithm: SignatureAlgorithm.ECDSA_P256)
      
      let valid = publicKey.isValid
      
    • Added the function verify, which allows validating signatures:

      pub fun verify(
          signature: [UInt8],
          signedData: [UInt8],
          domainSeparationTag: String,
          hashAlgorithm: HashAlgorithm
      ): Bool
      

      For example:

      let valid = publicKey.verify(
          signature: [],
          signedData: [],
          domainSeparationTag: "something",
          hashAlgorithm: HashAlgorithm.SHA2_256
      )
      
    • Added the function hashWithTag, which allows hashing with a tag:

      pub fun hashWithTag(
          _ data: [UInt8],
          tag: string,
          algorithm: HashAlgorithm
      ): [UInt8]
      
  • Direct contract function invoke (#878) @janezpodhostnik

    Cadence now supports an additional function to allow the host environment to call contract functions directly.

  • Language Server: Add support for access check mode (#868) @turbolent

  • Record variable declaration ranges (#880) @turbolent

⚡️ Performance

The performance of decoding and encoding values was significantly improved by @fxamacker and @SupunS:

  • Optimize encoding by using CBOR lib's StreamEncoder (#830) @fxamacker
  • Optimize decoding by using CBOR StreamDecoder (#885) @fxamacker
  • Add deferred decoding for array values (#871) @SupunS
  • Add deferred decoding support for composite values (#896) @SupunS
  • Pre-allocate and reuse value-path for encoding (#858) @fxamacker
  • Pre-allocate and reuse value-path for decoding (#869) @turbolent
  • Optimize Address.Bytes() to inline fast path (#848) @fxamacker
  • Remove call to Valid() during encoding to boost speed by about 13-18% (#857) @fxamacker
  • Directly create int subtype value at interpreter (#913) @SupunS

🛠 Improvements

🔒 Security

This release contains major security fixes:

  • Declare post-condition result variable as reference if return type is a resource (#905) @turbolent

    We would like to thank Deniz Mert Edincik for finding and reporting this critical issue responsibly through our Responsible Disclosure Policy.

    See https://forum.onflow.org/t/fixed-cadence-vulnerability-2021-04-13

  • Fix dynamic subtype test for reference values (#914) @turbolent

    We would like to thank Deniz Mert Edincik for finding and reporting this critical issue responsibly through our Responsible Disclosure Policy.

    We would also like to thank Mikey Lemmon for finding this issue independently and reporting it responsibly, too.

    See https://forum.onflow.org/t/fixed-cadence-vulnerability-2021-04-20

  • Check storability when value is written (before it is encoded) (#915) @turbolent

    We would like to thank Deniz Mert Edincik for finding and reporting this medium issue responsibly through our Responsible Disclosure Policy.

    See https://forum.onflow.org/t/fixed-cadence-vulnerability-2021-04-20

  • Check the index bounds for arrays (#917) @turbolent

    We would like to thank Mário Silva for finding and reporting this medium issue responsibly through our Responsible Disclosure Policy.

🐞 Bug Fixes

🧪 Tests

📖 Documentation

🏗 Chores

[Changes][v0.16.0]

<a name="v0.15.1"></a>

turbolent_flow
published 0.14.4 •

Changelog

Source

v0.14.4 - 25 Mar 2021

⭐ Features

🐞 Bug Fixes

  • Fix runtime representation of native HashAlgorithm/SignAlgorithm enums (#725) @SupunS
  • Fix error range when reporting a type error for an indexing reference expression (#719) @turbolent

🧪 Tests

[Changes][v0.14.4]

<a name="v0.13.10"></a>

turbolent_flow
published 0.12.6 •

Changelog

Source

v0.12.6 - 02 Feb 2021

🛠 Improvements

  • Optimize activations (#571)
  • Make occurrences and origins optional (#570)
  • Update to hamt 37930cf9f7d8, which contains ForEach, optimize activations (#569)
  • Move global values, global types, and transaction types to elaboration (#558)
  • Improve AST indices (#556)
  • Cache programs before checking succeeded, properly wrap returned error (#557)

Performance of checking and interpretation has been improved, e.g. for BenchmarkCheckContractInterfaceFungibleTokenConformance:

| Commit | Description | Ops | Time | |----------|------------------------------------------------|------:|--------------:| | 21764d89 | Baseline, v0.12.5 | 595 | 2018162 ns/op | | df2ba05d | Update hamt, use ForEach everywhere | 1821 | 658515 ns/op | | 6088ce01 | Optional occurrences and origins recording | 2258 | 530121 ns/op | | 429a7796 | Optimize activations, replace use of HAMT map | 3667 | 327368 ns/op |

⭐ Features

  • Optionally run checker tests concurrently (#554)

🐞 Bug Fixes

  • Fix runtime type of Block.timestamp (#575)
  • Use correct CommandSubmitTransaction command in entrypoint code lens (#568)
  • Revert "always find the declared variable (#408)" (#561)
  • Make parameter list thread-safe (#555)

📖 Documentation

  • More developer documentation (#535)
  • Update the roadmap (#553)
  • Document how to inject value declarations (#547)

[Changes][v0.12.6]

<a name="v0.10.6"></a>

turbolent_flow
published 0.12.4 •

Changelog

Source

v0.12.4 - 20 Jan 2021

⭐ Features

  • Argument list parsing and transaction declaration docstrings (#528)
  • Add support for name section in WASM binary (#388)
  • Add more WASM instructions (#381)
  • Add support for export section in WASM binary writer and reader (#377)
  • Generate code for instructions (#372)

🛠 Improvements

  • WebAssembly package improvements (#542)
  • Generate code for instructions (#372)

🐞 Bug Fixes

  • Add support for multiple contracts per account to the language server (#540)

[Changes][v0.12.4]

<a name="v0.12.3"></a>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc