Skip to content

Releases: aurelia/aurelia

v2.0.0-beta.21

08 Aug 12:57
Compare
Choose a tag to compare
v2.0.0-beta.21 Pre-release
Pre-release

2.0.0-beta.21 (2024-08-08)

Features:

Bug Fixes:

Refactorings:

Full Changelog: v2.0.0-beta.20...v2.0.0-beta.21

v2.0.0-beta.20

07 Jul 14:15
Compare
Choose a tag to compare
v2.0.0-beta.20 Pre-release
Pre-release

2.0.0-beta.20 (2024-07-07)

BREAKING CHANGES:

  • router-lite: can* hook semantics by @Sayan751 (#2002) (ac5359f)
    canLoad/canUnload hooks now only treat false as false.
    Previously canLoad and canUnload only consider true as can do, which means if a routing component has either the hook canLoad/canUnload,
    those hooks must return true to load/unload. This is not consistent with the rest of the framework, and generally will be easier to miss during refactoring.
  • router: navigation coordinator refactor by @jwx (#1997) (1b97340)
    canLoad/canUnload hooks now only treat false as false.
    Move responsibilities and recursive code from routing scope to iterative code in navigation coordinator.
    Refresh, browser back and forward now behave the same way deep links do: if a viewport with a default component/route has been emptied/cleared the mentioned browser actions will now load the default (instead of keeping the viewport empty).
  • tooling: bindable inheritance (bb1fe26)
    When generating code for .html file with convention, bindables export will be a record, instead of an array.
    Applications migrating from beta.15-beta.19 will need to change the types for .html modules in resource.d.ts like the following example:
    ...
    export const bindables: Record<string, Partial<BindableDefinition>>
    ...
    or if it doesn't matter to your applications, simply having
    ...
    export const bindables: Record<string, any>
    ...
    will also work.
  • metadata: metadata is defined on the immediate target class, instead of the first available metadata source (i.e inherited from parent) by @Sayan751 (#1992) (bb1fe26)

Bug Fixes:

Refactorings:

  • validation: state rule using record to declare messages by @Sayan751 (9df93e0)

v2.0.0-beta.19

12 Jun 12:14
Compare
Choose a tag to compare
v2.0.0-beta.19 Pre-release
Pre-release

What's Changed

Features:

  • feat(dialog): ability to animate not using lifecycles by @ekzobrain & @bigopon in #1986
  • feat(plugin-conventions): support foo.module.css CSS module convention by @3cp in #1988
  • feat(validation): state rule by @Sayan751 in #1985
  • feat(kernel): add ability to deregister di dependencies by @Vheissu in #1981
  • feat(event): support common event modifier on all events by @bigopon in #1994

Bug fixes:

  • fix(router-lite): replace transition plan for same component with different paths by @Sayan751 in #1982
  • fix(css-modules): avoid duplicate registrations by @bigopon & @hdzcalmir in #1989

Refactorings:

  • refactor(projection): use $all instead of * to include all node types by @bigopon in #1987

Docs:

Chores:

Full Changelog: v2.0.0-beta.18...v2.0.0-beta.19

v2.0.0-beta.18

23 May 00:58
Compare
Choose a tag to compare
v2.0.0-beta.18 Pre-release
Pre-release

What's Changed

BREAKING CHANGES:

  • refactor(dom-queue): merge dom read and write queue by @bigopon in #1970

    when first started, we went overboard with optimization & many other trends, which resulted in a cumbersome dom queue system. Simplifying them to reduce the number of APIs as well as potential issues.

Features:

Bug Fixes:

  • fix(convention): typings - use array for bindables isntead of object by @bigopon in #1967
  • fix(di): use metadata instead of weakmap @Sayan751 in #1977

Refactoring:

  • refactor(fetch-client): extract error codes and cleanup by @bigopon in #1974
  • refactor(i18n-validation): replace errors with error codes by @bigopon in #1972
  • refactor: define map & set overrides on the instance instead of prototype by @bigopon in #1975

Docs:

Full Changelog: v2.0.0-beta.17...v2.0.0-beta.18

v2.0.0-beta.17

11 May 03:09
Compare
Choose a tag to compare
v2.0.0-beta.17 Pre-release
Pre-release

What's Changed

BREAKING CHANGES:

  • template: auto infer binding expression when empty by @bigopon in #1963

    Previously only the expression of binding to element bindables get auto inferred, now it's expanded to all bindings
    with .bind/.to-view/.from-view/.two-way/.one-time
    Examples:

    <div some-prop.bind=""> means <div some-prop.bind="someProp">
    <div some-prop.bind> means <div some-prop.bind="someProp">
    <div some-prop.one-time> means <div some-prop.one-time="someProp">
    ...
  • convention: rewrite runtime-html decorators by @Sayan751 in #1960

    With tooling in the instable state for the tc39 decorator support, we will generate standard fn call code instead of decorator.
    This will likely be changed when browsers start officially supporting it, or at least when the tooling (both spec & tooling stability + compat) gets better

    If you are using convention plugin in an existing app, to migrate, update the resource.d.ts declaration like the following for *.html:

    declare module '*.html' {
      import { IContainer, PartialBindableDefinition } from 'aurelia';
      export const name: string;
      export const template: string;
      export default template;
      export const dependencies: string[];
      export const containerless: boolean | undefined;
      export const bindables: (
        | string
        | (PartialBindableDefinition & { name: string })
      )[];
      export const shadowOptions: { mode: 'open' | 'closed' } | undefined;
      export function register(container: IContainer): void;
    }
    
    // ... other declaration like css etc..

Features:

Bug fixes:

  • fix(au-slot): separate parent scope selection from host scope selection by @bigopon in #1961

Refactoring:

Full Changelog: v2.0.0-beta.16...v2.0.0-beta.17

v2.0.0-beta.16

03 May 11:05
Compare
Choose a tag to compare
v2.0.0-beta.16 Pre-release
Pre-release

What's Changed

Bug fixes:

  • fix(rendering): correctly handle compilation cache by @bigopon in #1955
  • fix(au-slot): ensure passthrough slot get the right host value by @bigopon in #1959

Refactorings:

  • refactor: move scope to runtime html by @bigopon in #1945
  • refactor: cleanup deco code by @bigopon in #1947
  • refactor(compiler): simplify definition creation by @bigopon in #1950
  • refactor: extract template compiler into own package by @bigopon in #1954
  • refactor(router-lite): avoided duplicate CE defn reg to same container by @Sayan751 in #1956

Docs:

Chores:

Full Changelog: v2.0.0-beta.15...v2.0.0-beta.16

v2.0.0-beta.15

17 Apr 03:34
Compare
Choose a tag to compare
v2.0.0-beta.15 Pre-release
Pre-release

What's Changed

BREAKING CHANGES:

  • refactor(runtime): migration to TC39 decorators + metadata simplification by @Sayan751 in #1932
  • refactor(exp-parser): move to own package by @bigopon in #1943
  • refactor(bindings): move binding infra to runtime html by @bigopon in #1944

Features:

  • feat(resources): support static $au property for definition by @bigopon in #1939

Bug fixes:

  • fix(vite-plugin): when using ShadowDOM, need to load css as string by @3cp in #1934
  • fix(vite-plugin): missed some default options in "load" preprocess by @3cp in #1936
  • chore: default options for internal ts-jest instance by @3cp in #1941

Full Changelog: v2.0.0-beta.14...v2.0.0-beta.15

Decorator migration guide

For the Aurelia 2 codebase, the usage of experimental decorators is turned off in #1932, and all the decorators are migrated to the TC39 decorators. This means when you update your Aurelia2 dependencies to v2.0.0-beta.15 or higher, you need to do the following.

  • Ensure that you are using the latest TypeScript version, if you are a TypeScript user.
  • Remove the following 2 properties from the effective tsconfig.json: "emitDecoratorMetadata": true and "experimentalDecorators": true. This activates the native/TC39 decorator.
  • Ensure that the target property is set to something lower than esnext. If this is set to esnext, then TypeScript assumes reasonably that the target runtime supports decorators natively, and hence does not transpile those.
  • The decorator proposal does not support parameter decorators (yet). Hence, the following code won't work any longer.
    class MyClass {
      public constructor(
        @IBar private readonly bar: IBar,
        @IFoo foo: IFoo,
      ) {}
    }
    Instead, use the resolve function.
    import { resolve } from 'aurelia'; // also can be exported from `@aurelia/kernel`.
    class MyClass {
      private readonly bar: IBar = resolve(IBar);
      public constructor(
        // alternative#1
        foo: IFoo = resolve(IFoo)
      ) {
        // alternative#2
        const foo: IFoo = resolve(IFoo)
      }
    }
  • If you are a TypeScript user, and were already using bindable coercers, it might not work after the update. Previously, this feature depended on the emission of design time type metadata. However, TypeScript does not emit this metadata any more with the standardized decorators (yet). Refer microsoft/TypeScript#55788 and microsoft/TypeScript#57533 for more information. For now, you can explicitly specify the type when declaring bindables.
  • If you are using only Aurelia decorators in your code, it should be fine if the aforementioned changes are performed. In case you have developed your own decorators, then you need to migrate those by yourself. Here are a couple of resources that can be helpful:
  • If you are using the Aurelia2 convention plugin, in most case it should work as it supposed to. In case it does not, please inform us.
  • If you are not using TypeScript and were already using decorators somehow, consult your transpiler tool docs on how to use the new standard/native decorators.

v2.0.0-beta.14

03 Apr 03:51
Compare
Choose a tag to compare
v2.0.0-beta.14 Pre-release
Pre-release

What's Changed

Features:

  • feat(i18n): support multiple versions of i18next by @bigopon in #1927
  • feat(custom-attribute): ability to find closest attr by name or ctor by @bigopon in #1928

Refactoring:

  • refactor(attr): treat empty string as no binding by @bigopon in #1930

Bug fixes:

  • fix(form): prevent actionless submission by @bigopon in #1931
  • fix(enhance): dont call app tasks from parent container by @bigopon in #1933

Full Changelog: v2.0.0-beta.13...v2.0.0-beta.14

v2.0.0-beta.13

15 Mar 05:32
Compare
Choose a tag to compare
v2.0.0-beta.13 Pre-release
Pre-release

What's Changed

BREAKING CHANGES:

  • refactor(event): no longer call prevent default by default by @bigopon in #1926

Features:

  • feat(template-controller): ability to have a container per factory by @bigopon in #1924
  • feat(process-content): ability to add information to a data object by @bigopon in #1925
  • feat(dev): better DI error messages for instantiation by @bigopon in #1917
  • feat(convention): add import as support by @bigopon in #1920

Refactoring:

  • refactor(resource): cleanup registration, APIs by @bigopon in #1918
  • chore: cleanup, better router error messages by @bigopon in #1922

Docs:

  • chore(docs): add key documentation for the repeater by @Vheissu in #1921

Full Changelog: v2.0.0-beta.12...v2.0.0-beta.13

v2.0.0-beta.12

02 Mar 10:28
Compare
Choose a tag to compare
v2.0.0-beta.12 Pre-release
Pre-release

What's Changed

BREAKING CHANGES:

  • refactor(au-compose): always create host for non custom element composition by @bigopon in #1906
  • feat(enhance): call app tasks with .enhance API by @bigopon in #1916

Features:

  • feat(au-compose): ability to compose string as element name by @bigopon in #1913
  • feat(au-compose): ability to transfer bindings for non custom element composition @bigopon in #1906

Bug fixes:

  • fix(di): new instance resolver by @bigopon in #1909
  • fix(router): properly handle false in conditional router hooks by @jwx in #1900
  • fix(router): prevent multiple navigation at the same time by @aegenet in #1895

Refactoring:

Docs:

Full Changelog: v2.0.0-beta.11...v2.0.0-beta.12