Skip to content

Commit

Permalink
chore: release v9.1.0 ⚡
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia committed Dec 1, 2023
1 parent 27d08d2 commit 63365cb
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
# Changelog

## 9.0.0 (2023-11-30)
## 9.1.0 (2023-11-30)

A long time coming, but we are back :)
We did some internal cleanup, making the library more accessible for tracking Critical User Journeys.

The most significant change is that we moved away from being Object-oriented and everything is Functional-oriented, which means to start Perfume, you can do.

```javascript
import { initPerfume } from 'perfume.js';

initPerfume({
analyticsTracker: ({ metricName, data }) => {
myAnalyticsTool.track(metricName, data);
})
});
```

### Breaking Changes
* **feat** remove `enableNavigationTracking` and have the behavior as the default.
* **feat** `getRating` has been consolidated into `getVitalsScore`.
* **chore** rename `incrementUjNavigation` to `trackUJNavigation`.
* **chore** deprecate `startPaint` and `endPaint`.
* **chore** deprecate `endPaint`.

## 8.4.0 (2023-2-3)

Expand Down
28 changes: 7 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
align="left" width="200" alt="Perfume.js logo" />
</a>

# [Perfume.js v9.0.0-rc.3](http://perfumejs.com)
# [Perfume.js v9.1.0](http://perfumejs.com)

[![Current version](https://img.shields.io/github/tag/zizzamia/perfume.js?color=3498DB&label=version)](https://www.npmjs.org/package/perfume.js) [![Test Coverage](https://api.codeclimate.com/v1/badges/f813d2f45b274d93b8c5/test_coverage)](https://codeclimate.com/github/Zizzamia/perfume.js/test_coverage) <img alt="No dependencies" src="https://img.shields.io/badge/dependencies-none-27ae60.svg"> [![Build Status](https://travis-ci.org/Zizzamia/perfume.js.svg?branch=master)](https://travis-ci.org/Zizzamia/perfume.js) [![NPM Downloads](http://img.shields.io/npm/dm/perfume.js.svg)](https://www.npmjs.org/package/perfume.js) [![gzip size](https://img.badgesize.io/https://unpkg.com/perfume.js?compression=gzip&label=JS+gzip+size)](https://unpkg.com/perfume.js) [![brotli size](https://img.badgesize.io/https://unpkg.com/perfume.js?compression=brotli&label=JS+brotli+size)](https://unpkg.com/perfume.js)

Expand Down Expand Up @@ -74,13 +74,13 @@ npm (https://www.npmjs.com/package/perfume.js):
You can import the generated bundle to use the whole library generated:

```javascript
import { Perfume } from 'perfume.js';
import { initPerfume } from 'perfume.js';
```

Universal Module Definition:

```javascript
import { Perfume } from 'node_modules/perfume.js/dist/perfume.umd.min.js';
import { initPerfume } from 'node_modules/perfume.js/dist/perfume.umd.min.js';
```

<br />
Expand All @@ -92,6 +92,8 @@ Metrics like **Navigation Timing**, **Network Information**, **TTFB**, **FCP**,
🚀 Visit [perfumejs.com](http://perfumejs.com/) for a live demo on how the metrics work. 🌕

```javascript
import { initPerfume } from 'perfume.js';

initPerfume({
analyticsTracker: options => {
const {
Expand Down Expand Up @@ -250,6 +252,8 @@ initPerfume({
**Performance.mark** ([User Timing API](https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API)) is used to create an application-defined peformance entry in the browser's performance entry buffer.

```javascript
import { start, end } from 'perfume.js';

initPerfume({
analyticsTracker: ({ metricName, data }) => {
myAnalyticsTool.track(metricName, data);
Expand All @@ -263,24 +267,6 @@ end('fibonacci');

![Performance Mark](https://github.com/Zizzamia/perfume.js/blob/master/docs/src/assets/performance-mark.png)

### Component First Paint

This metric mark the point, immediately after creating a **new component**, when the browser renders pixels to the screen.

```javascript
initPerfume({
analyticsTracker: ({ metricName, data }) => {
myAnalyticsTool.track(metricName, data);
})
});
perfume.start('togglePopover');
$(element).popover('toggle');
perfume.endPaint('togglePopover');
// Perfume.js: togglePopover 10.54 ms
```

![Performance](https://github.com/Zizzamia/perfume.js/blob/master/docs/src/assets/performance-cfp.png)

### Element Timing

Track when image elements and text nodes are displayed on screen using the [emerging](https://chromestatus.com/features#elementtiming) [Element Timing API](https://wicg.github.io/element-timing/) specification by simply adding the `elementtiming` attribute with a descriptive value of your choice to HTML elements you would like to measure:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "perfume.js",
"version": "9.0.0",
"version": "9.1.0",
"description": "Web performance library for measuring all User-centric performance metrics, including the latest Web Vitals.",
"keywords": [
"performance",
Expand Down
2 changes: 1 addition & 1 deletion src/initPerfume.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Perfume.js v9.0.0-rc.3 (http://zizzamia.github.io/perfume)
* Perfume.js v9.1.0 (http://zizzamia.github.io/perfume)
* Copyright 2022 Leonardo Zizzamia (https://github.com/Zizzamia/perfume.js/graphs/contributors)
* Licensed under MIT (https://github.com/Zizzamia/perfume.js/blob/master/LICENSE)
*
Expand Down
6 changes: 4 additions & 2 deletions src/perfume.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { initPerfume } from './initPerfume';

import { clear, markStep } from './steps/markStep';
import { clear, end, markStep, start } from './steps/markStep';
import { markStepOnce } from './steps/markStepOnce';
import { trackUJNavigation } from './steps/navigationSteps';

export { clear, initPerfume, markStep, markStepOnce, trackUJNavigation };
export * from './types';

export { clear, end, initPerfume, markStep, markStepOnce, start, trackUJNavigation };

0 comments on commit 63365cb

Please sign in to comment.