Registry / web-framework / aurelia-framework

aurelia-framework

JSON →
library1.4.1jsnpmunverified

Aurelia is a modern, client-side JavaScript framework designed for building browser, mobile, and desktop applications. It emphasizes web platform alignment, convention over configuration, and minimal framework intrusion, allowing developers to write more standard JavaScript/TypeScript code. The current stable version is 1.4.1, primarily receiving maintenance updates to address dependency vulnerabilities as seen in recent releases. Key differentiators include its powerful reactive binding engine, robust templating, and a focus on composing simple, standard components, typically a vanilla JavaScript/TypeScript class paired with an HTML template. It integrates core Aurelia libraries into a unified platform for application development.

npm install aurelia-framework
INSTALL
IMPORT
SIG · AURELIA-FRAMEWORK
A
aurelia-framework
web-frameworkjavascriptv1.4.1
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Aurelia
✓ import { Aurelia } from 'aurelia-framework';
✗ const Aurelia = require('aurelia-framework');
Aurelia 1.x is primarily designed for ES Modules with transpilation or direct browser import. CommonJS `require` is generally not idiomatic or supported for core framework classes.
FrameworkConfiguration
✓ import { FrameworkConfiguration } from 'aurelia-framework';
✗ import FrameworkConfiguration from 'aurelia-framework';
FrameworkConfiguration is a named export, essential for configuring plugins and features within the Aurelia application lifecycle.
configure
✓ import * as environment from './environment'; aurelia.use.globalResources([PLATFORM.moduleName('path/to/component')]);
✗ aurelia.use.plugin(PLATFORM.moduleName('./my-plugin'));
When configuring plugins or resources, always wrap module paths with `PLATFORM.moduleName()` for correct module resolution, especially in environments that don't auto-resolve based on convention.

This quickstart demonstrates a basic Aurelia application with a root component (`App`) and its corresponding HTML template, showcasing two-way data binding and list rendering.

import { Aurelia } from 'aurelia-framework'; import { PLATFORM } from 'aurelia-pal'; // app.js export class App { welcome = "Welcome to Aurelia"; quests = [ "To seek the holy grail", "To take the ring to Mordor", "To rescue princess Leia" ]; name = ''; quest = ''; } // main.ts (or main.js) export function configure(aurelia: Aurelia) { aurelia.use .standardConfiguration() // Optionally install a plugin, e.g., for routing or validation // .feature(PLATFORM.moduleName('aurelia-router')) .developmentLogging(); aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app'))); } /* <!-- app.html --> <template> <form> <label for="name-field">What is your name?</label> <input id="name-field" value.bind="name & debounce:500"> <label for="quest-field">What is your quest?</label> <select id="quest-field" value.bind="quest"> <option></option> <option repeat.for="q of quests">${q}</option> </select> </form> <p if.bind="name">${welcome}, ${name}!</p> <p if.bind="quest">Now set forth ${quest.toLowerCase()}!</p> </template> */
Debug
Known issues
breakingAurelia 1.3.0-rc.1 introduced changes allowing the root component to be defined with a constructor and the `config` method to accept classes in addition to module ID strings for better type safety and flexibility. Existing configurations relying solely on string IDs for root components or configuration objects might need slight adjustments if migrating from older versions.
fix
Review `aurelia.setRoot()` calls and plugin configurations. Consider passing actual class references or ensuring string module IDs are correctly resolved via `PLATFORM.moduleName()`.
affects: >=1.3.0-rc.1
breakingStarting with Aurelia 1.3.1, the `package.json` includes a `module` field. While generally beneficial for bundlers to use ESM builds, older build setups or specific CommonJS environments might encounter unexpected module resolution if not configured to respect this field, potentially causing issues with tree-shaking or module loading.
fix
Ensure your bundler (e.g., Webpack, Rollup) is configured to correctly handle the `module` field in `package.json` for optimal ESM consumption. If using older CommonJS environments, verify module resolution.
affects: >=1.3.1
gotchaRecent versions 1.4.0 and 1.4.1 addressed vulnerabilities in underlying dependencies (e.g., `aurelia-templating`). While these are patch releases, failing to update can leave your application exposed to known security issues, particularly those related to chained dependencies.
fix
Always update to the latest patch version (e.g., `npm install aurelia-framework@latest`) to ensure all known dependency vulnerabilities are patched. Regularly audit your dependencies.
affects: >=1.0.0 <1.4.1
gotchaAurelia heavily relies on `aurelia-pal` (Platform Abstraction Layer) for environment-specific functionality. Incorrectly configuring or importing `PLATFORM` (e.g., `PLATFORM.moduleName`) can lead to module resolution failures or runtime errors, especially when deploying to different environments (browser, Node, Electron).
fix
Always import `PLATFORM` from `aurelia-pal` and use `PLATFORM.moduleName('module-id')` for all module string references in `aurelia.use` configuration or `setRoot` calls. Ensure `aurelia-pal` is correctly resolved by your bundler.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'app'
The root component's module name is not correctly resolved by Aurelia's loader.
fix
Ensure that your `aurelia.setRoot()` call uses `PLATFORM.moduleName('app')` and that `app.js`/`app.ts` is located in a path discoverable by your build system and Aurelia's loader. Check `aurelia.json` or your Webpack/Rollup config.
TypeError: Cannot read properties of undefined (reading 'registerPlugin')
Attempting to use `aurelia.use.plugin()` or `aurelia.use.feature()` without a properly initialized Aurelia instance or before the `aurelia.use.standardConfiguration()`.
fix
Ensure `new Aurelia().use.standardConfiguration()` is called before attempting to register any custom plugins or features. Verify the `aurelia` instance is correctly passed to your `configure` function.
Error: You must configure 'aurelia-templating' (or a dependency of it) to use 'view-engine'.
A core templating dependency or `aurelia-templating` itself is missing or not properly configured within the Aurelia application.
fix
Verify that `aurelia-templating` is listed in your `package.json` dependencies and installed. Ensure `aurelia.use.standardConfiguration()` is called, as it sets up essential core plugins including templating.
Upgrade
Version history
1.4.1latest on npm
Audit
Dependencies
aurelia-templatingrequiredCore dependency for UI composition and binding, as highlighted by recent vulnerability fixes.
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
aurelia-framework — npm install aurelia-framework · libregistry