New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aiken-lang/aiken

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aiken-lang/aiken - npm Package Versions

1

1.1.0

Diff

Changelog

Source

v1.1.0 - 2024-09-03

Added

  • aiken-lang: also authorize (complete) patterns in function arguments list instead of only variable names. @KtorZ

  • aiken-lang: new syntax for soft casting otherwise known as if/is. See #959 or Control Flow - soft casting for more details. @rvcas

  • aiken-lang: optimization: pre-evaluate constant arguments to lambdas when safe to do so. @MicroProofs

  • aiken-lang: infer type when immediately possible during a patterned type-cast. See #969. @KtorZ

  • aiken-lang: add support for mk_cons and mk_pair_data builtins. See #964. @KtorZ

  • aiken-lang: pattern-matching on bytearrays is now available. See #989. @KtorZ

  • aiken-project: conditional configuration and environment. See #937. @KtorZ

  • aiken-project: warning on compiler version mismatch. See de870e2. @rvcas

  • aiken-project: source links to generated documentation for types, constants and functions. @KtorZ

  • aiken-project: comments containing Markdown section headings (#, ##, ### etc.) will now be preserved and rendered in generated documentation. @KtorZ

  • aiken-project: modules starting with @hidden in their docs will be skipped from docs generation. @KtorZ

  • aiken-project: preserve type-aliases as titles in blueprint generated schemas. @KtorZ

  • uplc: support evaluation of Plutus V3 transactions, including new purposes introduced in Conway. @KtorZ

Changed

  • aiken-lang: zero-arg functions are no longer evaluated at compile-time. However, constants can now hold any expression and are fully evaluated at compile-time. Use const whenever a zero-arg function was used, unless you do want to defer execution. @KtorZ @MicroProofs.

  • aiken-lang: fix zero-arg builtins mk_nil_data and mk_nil_pair_data invokation. @KtorZ

  • aiken-lang: rename some builtins. @KtorZ

    | old name | new name | | ------------------ | ----------- | | mk_nil_data | new_list | | mk_pair_data | new_pair | | mk_nil_pair_data | new_pairs |

  • aiken-lang: duplicate import lines are now automatically merged instead of raising a warning. However, imports can no longer appear anywhere in the file and must come as the first definitions. @KtorZ

  • aiken-lang: remove warning on discarded expect, allowing to keep 'side-effects' when necessary. See #967. @KtorZ

  • aiken-lang: allow expect as last (or only) expression in function body, when clauses and if branches. Such expressions unify with Void. See #1000. @KtorZ

  • aiken-lang: allow tests to return Void. Tests that return Void are treated the same as tests that return True. See #1000. @KtorZ

  • aiken-lang: rework traces to be (1) variadic, (2) generic in its arguments and (3) structured. @KtorZ

    In more details:

    1. Enables the trace keyword to take one, two or any argument really separated by comma after the first. For example:

      trace @"a classic trace"
      
      // ..
      
      trace @"condition_1": @"foo"
      
      // ...
      
      trace @"condition_2": @"foo", @"bar"
      
    2. Enables the trace keyword to not only take strings as arguments; but any data-type that is serialisable (i.e. that can be cast to Data). It is fundamentally identical to calling the cbor.diagnostic function from the standard lib; except that this is done and glued with the rest of the trace automatically.

      trace @"condition_1": [1, 2, 3]
      
      // ...
      
      let my_var = Some("foo")
      trace my_var
      
    3. Changes the behavior of the --trace-level compact mode to now:

    • remove trace-if-false (? operator) traces entirely in this mode;
    • only keep the label (first trace argument) and error when it isn't a string.

    See also #978.

  • aiken-lang: rework formatter behaviour on long-lines, especially in the presence of binary operators. @KtorZ

  • aiken-lang: provide better errors for unknown types used in cyclic type definitions. @KtorZ

  • aiken-project: fix blueprint's apply truncating last character of outputs. See #987. @KtorZ

  • aiken-project: provide better error (include input ref) when inputs are missing during transaction evaluation. See #974. @KtorZ

  • aiken-project: module inhabitants are no longer alphabetically sorted when generating documentation. Instead, the order in which they are defined in the module is used. @KtorZ

  • aiken-project: the sidebar links to modules within a package is now fully hierarchical and (hopefully) better-looking. @KtorZ

Removed

  • aiken-lang: clause guards are no longer part of the language. See #886. @KtorZ.
rvcas
published 1.0.31-alpha •

rvcas
published 1.0.30-alpha •

rvcas
published 1.0.29-alpha •

Changelog

Source

v1.0.29-alpha - 2024-06-06

Added

  • aiken-lang: new LSP quickfix for 'use let' warning. @KtorZ

Changed

  • aiken-lang: the keyword fail on property-based test semantic has changed and now consider a test to succeed only if every execution of the test failed (instead of just one). The previous behavior can be recovered by adding the keyword once after fail. @KtorZ

Fixed

  • aiken-lang: fixed the number of 'after x tests' number reported on property test failure, which was off by one. @KtorZ
  • aiken-lang: fixed parsing of single hex digits. @KtorZ
rvcas
published 1.0.28-alpha •

Changelog

Source

v1.0.28-alpha - 2024-05-23

Added

  • aiken: install shell completions automatically. @freexploit
  • aiken: added export command that exports regular function definitons. @rvcas
  • aiken-project: compiler version field to aiken.toml @rvcas
  • aiken-project: plutus version field to aiken.toml @rvcas
  • aiken-lsp: hover and goto definition support on list tail. @rvcas
  • aiken-lsp: hover on prop test via expression. @rvcas
  • aiken-lang: new builtin types in the prelude Pair and Pairs. @KtorZ @Microproofs
  • aiken-lang: Codegen now generates uplc version 1.1.0 scripts when running build with plutus v3.

Fixed

  • aiken-lang: formatter should not erase pub on validators. @rvcas
  • aiken-lang: error on using tuple index when a tuple is returned by a generic function. @rvcas
  • aiken-lang: backpassing with expect gives a warning on pattern matches. @rvcas
  • aiken-lang: fix a regression in the Type-checker introduced in v1.0.25-alpha regarding types comparison. See #917. @KtorZ
  • aiken-lang: fix incongruous generics after type-checking which caused [] to be treated as a list in cases where it needed to be an empty map primitive. See #922. @KtorZ
  • aiken-lang: fix for generic constrs being used as functions causing type mismatch errors. @Microproofs
  • aiken-lang: fix for error occuring when a field holds Data that is not a constr type when compiler traces are on. @Microproofs
  • aiken-lang: fix for curry optimization involving 2 constants #945. @MicroProofs
  • aiken-lang: fix compiler wrongly requiring MillerLoopResult to be 'serialisable' when manipulated as a top-level value. See #921. @KtorZ
  • aiken-lang: fix type-checker oversight regarding serialisation of generics. See #939. @KtorZ
  • aiken-lang: fix type-checker not raising error when comparing non-serialisable types. See #940. @KtorZ
  • aiken-project: show a warning when ignoring modules in lib/validator because they have an invalid name. See #916. @KtorZ

Changed

[!WARNING]

BREAKING-CHANGE

2-tuples (a, b) are now treated the same as 3+ tuples -- which directly impacts the way that Aiken now deserialise those, especially when nested inside a List.

To deserialize into a list of 2-tuple (List<(a, b)>), one is now expected to provide a CBOR array of arrays (of 2 elements). Previously, this would require to provide a CBOR map! The downside of the latter is that CBOR serialization libraries do not necessarily preserve the order of keys in a map which could cause issues down the line, in particular with Aiken's dictionnaries.

To recover the old behavior when desired, Aiken introduces a new type Pair<a, b> to the language. So any existing program can be migrated by switching any occurences of (a, b) to Pair<a, b>.

However, it is often preferable to use 2-tuples where possible. The main place you will see usage of Pair is in the script context because its form is imposed by the ledger.

  • aiken-lang: altered internal representation of 2-tuples to distinguish them from pairs. @KtorZ @Microproofs
  • aiken-lang: some more code gen cleanup. @Microproofs
  • aiken-lang: new optimization for wrapped builtins found in the stdlib. @Microproofs
  • aiken-project: slightly restyle warnings to be less noisy. @KtorZ
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