Skip to content

Commit 4db2216

Browse files
authored
chore: release v9.1.0 ⚡ (#255)
1 parent 27d08d2 commit 4db2216

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

Diff for: CHANGELOG.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
# Changelog
22

3-
## 9.0.0 (2023-11-30)
3+
## 9.1.0 (2023-11-30)
44

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

8+
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.
9+
10+
```javascript
11+
import { initPerfume } from 'perfume.js';
12+
13+
initPerfume({
14+
analyticsTracker: ({ metricName, data }) => {
15+
myAnalyticsTool.track(metricName, data);
16+
})
17+
});
18+
```
19+
820
### Breaking Changes
921
* **feat** remove `enableNavigationTracking` and have the behavior as the default.
1022
* **feat** `getRating` has been consolidated into `getVitalsScore`.
1123
* **chore** rename `incrementUjNavigation` to `trackUJNavigation`.
12-
* **chore** deprecate `startPaint` and `endPaint`.
24+
* **chore** deprecate `endPaint`.
1325

1426
## 8.4.0 (2023-2-3)
1527

Diff for: README.md

+7-21
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
align="left" width="200" alt="Perfume.js logo" />
44
</a>
55

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

88
[![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)
99

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

7676
```javascript
77-
import { Perfume } from 'perfume.js';
77+
import { initPerfume } from 'perfume.js';
7878
```
7979

8080
Universal Module Definition:
8181

8282
```javascript
83-
import { Perfume } from 'node_modules/perfume.js/dist/perfume.umd.min.js';
83+
import { initPerfume } from 'node_modules/perfume.js/dist/perfume.umd.min.js';
8484
```
8585

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

9494
```javascript
95+
import { initPerfume } from 'perfume.js';
96+
9597
initPerfume({
9698
analyticsTracker: options => {
9799
const {
@@ -250,6 +252,8 @@ initPerfume({
250252
**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.
251253

252254
```javascript
255+
import { start, end } from 'perfume.js';
256+
253257
initPerfume({
254258
analyticsTracker: ({ metricName, data }) => {
255259
myAnalyticsTool.track(metricName, data);
@@ -263,24 +267,6 @@ end('fibonacci');
263267

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

266-
### Component First Paint
267-
268-
This metric mark the point, immediately after creating a **new component**, when the browser renders pixels to the screen.
269-
270-
```javascript
271-
initPerfume({
272-
analyticsTracker: ({ metricName, data }) => {
273-
myAnalyticsTool.track(metricName, data);
274-
})
275-
});
276-
perfume.start('togglePopover');
277-
$(element).popover('toggle');
278-
perfume.endPaint('togglePopover');
279-
// Perfume.js: togglePopover 10.54 ms
280-
```
281-
282-
![Performance](https://github.com/Zizzamia/perfume.js/blob/master/docs/src/assets/performance-cfp.png)
283-
284270
### Element Timing
285271

286272
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:

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "perfume.js",
3-
"version": "9.0.0",
3+
"version": "9.1.0",
44
"description": "Web performance library for measuring all User-centric performance metrics, including the latest Web Vitals.",
55
"keywords": [
66
"performance",

Diff for: src/initPerfume.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Perfume.js v9.0.0-rc.3 (http://zizzamia.github.io/perfume)
2+
* Perfume.js v9.1.0 (http://zizzamia.github.io/perfume)
33
* Copyright 2022 Leonardo Zizzamia (https://github.com/Zizzamia/perfume.js/graphs/contributors)
44
* Licensed under MIT (https://github.com/Zizzamia/perfume.js/blob/master/LICENSE)
55
*

Diff for: src/perfume.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { initPerfume } from './initPerfume';
22

3-
import { clear, markStep } from './steps/markStep';
3+
import { clear, end, markStep, start } from './steps/markStep';
44
import { markStepOnce } from './steps/markStepOnce';
55
import { trackUJNavigation } from './steps/navigationSteps';
66

7-
export { clear, initPerfume, markStep, markStepOnce, trackUJNavigation };
7+
export * from './types';
8+
9+
export { clear, end, initPerfume, markStep, markStepOnce, start, trackUJNavigation };

0 commit comments

Comments
 (0)