Releases: aurelia/aurelia
v2.0.0-beta.18
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:
- feat(router-lite): current route by @Sayan751 in #1966
- feat(kernel): add last resolver by @Vheissu in #1976
- feat(dialog): ability to specify dialog per open call by @bigopon in #1978
- feat(dialog): ability to customize dialog event management @bigopon in #1978
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:
- Updated ISignaler documentation example by @ivanbacher in #1973
Full Changelog: v2.0.0-beta.17...v2.0.0-beta.18
v2.0.0-beta.17
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 betterIf 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:
- feat(repeat): allow custom repeatable value by @bigopon in #1962
- feat(template): support spread syntax ... by @bigopon in #1965
Bug fixes:
Refactoring:
Full Changelog: v2.0.0-beta.16...v2.0.0-beta.17
v2.0.0-beta.16
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
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:
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 thanesnext
. If this is set toesnext
, 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.
Instead, use the
class MyClass { public constructor( @IBar private readonly bar: IBar, @IFoo foo: IFoo, ) {} }
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:
- JavaScript metaprogramming with the 2022-03 decorators API by Dr. Axel Rauschmayer
- TypeScript 5.0 release notes.
- Use the TypeScript playground to check the transpiled code to make you aware of the timings, at which different parts of your decorators are invoked.
- 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
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:
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
What's Changed
BREAKING CHANGES:
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:
Full Changelog: v2.0.0-beta.12...v2.0.0-beta.13
v2.0.0-beta.12
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:
- refactor: cleanup by @bigopon in #1912
- feat(runtime): delay overriding array prototypes by @tomtomau in #1914
Docs:
- rename load() hook to loading() in docs by @elitastic in #1904
- Remove define hook from documentation by @ivanbacher in #1903
- Added JS examples using resolve for
IHttpClient
by @ivanbacher in #1907
Full Changelog: v2.0.0-beta.11...v2.0.0-beta.12
v2.0.0-beta.11
What's Changed
BREAKING CHANGES
- fix(convention): no longer process shadowdom + by @bigopon in #1889
- refactor(controller): remove define lifecycle hook by @bigopon in #1899
- refactor(fetch-client): cleanup, add tests, tweak doc & prepare cache interceptor by @brandonseydel in #1756
- fix(templating): custom element takes priority over custom attribute by @bigopon in #1897
Features
- feat(event): ability to add modifier by @bigopon in #1891
- feat(runtime): impl 'this' / AccessBoundary by @fkleuver in #1892
- feat(dev): support redux devtools for the state plugin by @bigopon in #1888
Full Changelog: v2.0.0-beta.10...v2.0.0-beta.11
v2.0.0-beta.10
What's Changed
- BREAKING CHANGE: string literal types replace const enums by @Sayan751 in #1870
- feat(route-recognizer): support for route parameter constraints by @Sayan751 in #1862
- feat(build): add development subpath to package exports (#1856) by @mxjp in #1858
- fix(i18n): handle change of key in t.bind by @Sayan751 in #1868
- fix(router-lite): Router injection and ignoring null/undefined values for query parameters by @Sayan751 in #1859
- fix(runtime-html): template wrapping by @Sayan751 in #1875
- fix(router): store root/default page instruction correctly by @aegenet in #1869
- fix(validation): property parsing with lambda and istanbul by @Sayan751 in #1877
- fix(validation): evaluation of tagged rules from bindings by @Sayan751 in #1878
- fix(portal): remove target marker when deactivated by @bigopon in #1883
- fix:: upgrade ts jest to 29 by @bigopon in #1885
- fix(kernel): stack preserving error logging for console by @Sayan751 in #1884
- fix(au-slot): properly handle nested projection registration by @bigopon in #1881
- refactor: cleanup call binding command by @Sayan751 in #1866
- refactor: some small cleanup by @bigopon in #1887
- docs: custom binding command by @Sayan751 in #1863
- docs: attribute mapper by @Sayan751 in #1864
- docs(attr-mapping): corrected typo by @Sayan751 in #1865
- docs: added back the misplaced processContent docs by @Sayan751 in #1867
- doc: remove call binding (some-prop.call="...") in documentation by @ivanbacher in #1882
New Contributors
Full Changelog: v2.0.0-beta.9...v2.0.0-beta.10
v2.0.0-beta.9
Features:
- vite plugin: allow all the options to be passed for the plugin (#1830) (3d87341)
- template: support popover apis (#1851) (f4b552b)
Bug Fixes:
- build: fix generative native modules, examples (#1854) (9a7cc65)
- au-slot: ensure work with shadow dom (#1841) (c750d4f)
- repeater: duplicate primitive handling, batched mutation fix (#1840) (703d275)
- repeat: fix sort+splice batched operation bug (703d275)
- validation: property accessor ignore instrumenter (342847f)
- validation: allowed rules.off on object w/o rules (342847f)
- i18n: translating camelCased bindables (#1838) (ff761fb)
- router-lite: invoke-lifecycles transition plan (#1821) (8e961af)
- router-lite: transition plan selection (#1817) (d214fdc)
- router-lite: excluded redirectTo from nav-model (#1816) (085a491)
- dialog: use startingZIndex (#1809) (de79aea)