Skip to content

Releases: rviscomi/capo.js

v2.1.0

21 Feb 17:05
9832ff5

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.0.0...v.2.1.0

v2.0.0

25 Nov 21:49
8bcc780

Choose a tag to compare

⚠️ Breaking Changes

Programmatic API Restructuring

The library has been refactored to provide a more direct and modern API. The previous version exported modules as namespaces, whereas v2.0.0 exports functions and constants directly.

Before (v1):

import { rules, validation } from '@rviscomi/capo.js';

const weight = rules.getWeight(element);
const isValid = validation.isValidElement(element);

After (v2):

import { getWeight, isValidElement, BrowserAdapter } from '@rviscomi/capo.js';

const adapter = new BrowserAdapter();
const weight = getWeight(element, adapter);
const isValid = isValidElement(element, adapter);

Removal of WebPageTest and BigQuery Support

Support for WebPageTest and BigQuery has been removed from the core library to reduce maintenance burden and focus on the core analysis engine.

Removal of Capo.js Snippet

The standalone Capo.js snippet has been removed. Users are encouraged to use the Chrome extension or the programmatic API.

🚀 New Features & Improvements

New Adapter System

Capo.js now supports a flexible adapter system, allowing it to run on different DOM implementations.

  • Built-in adapter: The BrowserAdapter is provided for standard browser DOM environments.
  • Custom adapters: Consumers can implement their own adapters by extending the base AdapterInterface class. This enables Capo.js to work with different parsers (like JSDOM or ASTs), unlocking its use in static analysis tools.

New Validation Rules

  • Font preload missing crossorigin: Capo.js now validates that font preloads include the crossorigin attribute.

Virtual Console

The demo page now includes a virtual console, making it easier to see Capo output right in the docs, without needing to open the browser console.

🛠️ Internal Improvements

  • Refactored Core Logic: Core analysis logic has been moved to a dedicated analyzer and adapter-based architecture.
  • Improved Test Coverage: Significant increase in test coverage with new integration and unit tests.
  • Modernized Build Tooling: Updated dependencies and build configuration.

For detailed migration instructions, refer to the Migration Guide.

Full Changelog: v.1.5.3...v2.0.0

v1.5.3

25 May 13:58
4adf681

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.5.2...v.1.5.3

v1.5.2

24 Apr 13:54
84691c9

Choose a tag to compare

What's Changed

New Contributors

  • @radum made their first contribution in #76

Full Changelog: v1.4.4...v1.5.2

v1.4.4

26 Jul 01:34
70ed8d1

Choose a tag to compare

What's Changed

Full Changelog: v1.4.3...v1.4.4

v1.4.3

12 Jul 17:35
815b7a9

Choose a tag to compare

What's Changed

Full Changelog: v1.3.2...v1.4.3

v1.3.2

29 Jun 17:08
4292559

Choose a tag to compare

What's Changed

Full Changelog: v1.3.0...v1.3.2

v1.3.0

27 Jun 13:50
886d051

Choose a tag to compare

What's Changed

Full Changelog: v1.2.0...v1.3.0

v1.2.0

22 Jun 19:15
9144237

Choose a tag to compare

What's Changed

Full Changelog: v1.1.1...v1.2.0

v1.1.1

20 Jun 15:16
9c40a1d

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/rviscomi/capo.js/commits/v1.1.1