From 16eb16f90cf24fb9da127609dd09e29d75f7b492 Mon Sep 17 00:00:00 2001 From: Leonardo Zizzamia Date: Wed, 11 Jul 2018 17:09:20 -0700 Subject: [PATCH] chore: release v0.8.0 --- CHANGELOG.md | 8 ++++ README.md | 2 +- docs/package.json | 2 +- docs/src/app/app.component.html | 6 +-- docs/src/assets/perfume-logo-v0-8-0.webp | Bin 0 -> 6882 bytes package.json | 6 +-- rollup.config.ts | 57 +++++++++++------------ src/perfume.ts | 2 +- 8 files changed, 44 insertions(+), 39 deletions(-) create mode 100644 docs/src/assets/perfume-logo-v0-8-0.webp diff --git a/CHANGELOG.md b/CHANGELOG.md index c0269ac..f6c1b9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.8.0 (2018-7-11) + +### Bug Fixes + +* **fix:** 'PerformanceObserver is undefined' on Edge [#37](https://github.com/Zizzamia/perfume.js/pull/37) +* **fix:** All console logging is now disabled when the `config.logging` flag is set to false [#35](https://github.com/Zizzamia/perfume.js/issues/35) +* **build:** export library with the same name for all bundles [#32](https://github.com/Zizzamia/perfume.js/pull/32) + ## 0.7.1 (2018-5-17) ### Feat diff --git a/README.md b/README.md index 9ed8ccf..613b3ef 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# [Perfume.js v0.7.1](http://zizzamia.github.io/perfume/) +# [Perfume.js v0.8.0](http://zizzamia.github.io/perfume/) [![NPM version](https://badge.fury.io/js/perfume.js.svg)](https://www.npmjs.org/package/perfume.js) [![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) [![Test Coverage](https://api.codeclimate.com/v1/badges/f813d2f45b274d93b8c5/test_coverage)](https://codeclimate.com/github/Zizzamia/perfume.js/test_coverage) [![JS gzip size](https://img.badgesize.io/https://unpkg.com/perfume.js?compression=gzip&label=JS+gzip+size)](https://unpkg.com/perfume.js) diff --git a/docs/package.json b/docs/package.json index 0266c61..793364a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "0.7.1", + "version": "0.8.0", "license": "MIT", "scripts": { "ng": "ng", diff --git a/docs/src/app/app.component.html b/docs/src/app/app.component.html index 712400e..d73bf32 100644 --- a/docs/src/app/app.component.html +++ b/docs/src/app/app.component.html @@ -3,9 +3,9 @@

Perfume.js

diff --git a/docs/src/assets/perfume-logo-v0-8-0.webp b/docs/src/assets/perfume-logo-v0-8-0.webp new file mode 100644 index 0000000000000000000000000000000000000000..156a49d5fbe68e7bd66bbe8ec0c6f0a9fdeb2a2f GIT binary patch literal 6882 zcmV<88Xe_QNk&H68UO%SMM6+kP&il$0000G000050RUbB06|PpNI3!k00E#?+fHTM ziiAi&0uqo=5|B_5kgy~~LPrC-sbgFrd4>;94 zOM#}C=Q)63^-Mb~te)!y3ack;6%tlY*D4^ap0F|;te&zm7_6SOfT5nYKp~#^4TN~= z9R~5_8wldrTZKS8e=7ipBdDC-?HFo$0|Y<*``6zEf~7|v2(0Eu0)SOQP}8$Y5V9tx zOdztQrc5waOH7%7Ybi|DDs~c`@U71T%WVX`uCJltAZbI%+h7 zVc70igkUeRT)5F2$xFb0BKaWKBB{uc#qkpK632~QkE3A6VJLyGQQYW_C<=Nl2qpL} zhJoJ`Lj|Mu@ywt7jbZ-m<8Fafc^&De$JD07ZG*!p(;5a!n(yPi)Uy#*7An4zve3O1Ue=j=@ma_B z(w1qP;cb<^8)KER8}k>z`-{Mj|BnBT|BnBT|BnBT|BnBT|BnBT|Ndj+-i>#awi|O5 z-i@&e>1MQLK6_!bY~72`I;2}s7V0}8w6gAlm8IG~3|jlM3zJsYJy2ebbqB1{`mFeA zr3iVVH<^MQ(AiCK)`^=G3bjqlq)@o!o?zM2nS!qE8X#Y-(DDC&w*vrHP&goZ7ytke zegK^TDh2^x0X|V6jzy!Pp%b_@;5Y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xVQuqe0Uz{J6ig+@n ze#m3zZwDHt7qg*wKV(mzRVO6~EvV{51S12XqHzA#OU7H_^v1!`;B%zq2JzbO|Jp&b1#x4n82+SoW_|5O1+{m4*a zIUlF~hPELP8YJAKDmT?y5KbeqF(sJ)0$Q$qgPj|rn&8)J6zs?ez!qJ5|3<$5g@DmH z$4YXj`E?(-dd~4#eOYBuo~UBz4&T=#fRH;B91^WQ8(Mi8O+8$wUF^d z;{rZBGMQ;2qN505j;45f`d2`#JRM z>x;wbmE$#>yE>DEsv3n1?GLv1=>!RO{z368nBoNc%0k;vKMs(Dfsnaw0^5yexXVh} zV)#1EA_;$g?>IxeiR_uebqY*An*bsIPn*_bZS_w6Rh`Ao&zH%8rk)o*6y?lAbEB0@ zQW#>~g@&~L;=MF1Sx$dtSk0FL|3bE4XIQ+qc`c<0C0^E&zzSg{0j3d2XM&lKHAEG>slX z93OQtVgcT*eJTB^Rkcjnt{mZqZiX>B3~CB)`wdlm0qVTWSICwevK&I@wa_$`)zAO{ c07F5!3{{x=0jxG;X#ghD_}bg<&;S4c0KWZmKL7v# literal 0 HcmV?d00001 diff --git a/package.json b/package.json index be4e963..143f955 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "perfume.js", - "version": "0.7.1", + "version": "0.8.0", "description": "JavaScript library for measuring Short and Long Script, First Contentful Paint (FCP), Time to Interactive (TTI), Component First Paint (CFM), annotating them to the DevTools timeline and reporting the results to Google Analytics.", "keywords": [ "performance-metrics", @@ -90,8 +90,8 @@ ], "coverageThreshold": { "global": { - "branches": 98, - "functions": 97, + "branches": 98.6, + "functions": 97.6, "lines": 100, "statements": 100 } diff --git a/rollup.config.ts b/rollup.config.ts index 35529d8..81c8a29 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -4,33 +4,33 @@ import sourceMaps from 'rollup-plugin-sourcemaps'; import uglify from 'rollup-plugin-uglify'; import pkg from './package.json'; -const ensureArray = (maybeArr) => - Array.isArray(maybeArr) ? maybeArr : [maybeArr]; +const ensureArray = maybeArr => (Array.isArray(maybeArr) ? maybeArr : [maybeArr]); const createConfig = ({ output, includeExternals = false, min = false }) => { - const minify = min && uglify({ - output: { - comments(node, { text, type }) { - if (type === 'comment2') { - // multiline comment - return /@preserve|@license|@cc_on/i.test(text); + const minify = + min && + uglify({ + output: { + comments(node, { text, type }) { + if (type === 'comment2') { + // multiline comment + return /@preserve|@license|@cc_on/i.test(text); + } } - }, - }, - }); + } + }); return { input: 'dist/es/perfume.js', - output: ensureArray(output).map((format) => ({ + output: ensureArray(output).map(format => ({ ...format, name: 'Perfume', - sourcemap: true, + sourcemap: true })), // Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash') - external: includeExternals ? [] : [ - ...Object.keys(pkg.dependencies || {}), - ...Object.keys(pkg.peerDependencies || {}), - ], + external: includeExternals + ? [] + : [...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {})], watch: { include: 'dist/es/**' }, plugins: [ // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs) @@ -39,42 +39,39 @@ const createConfig = ({ output, includeExternals = false, min = false }) => { resolve(), // Resolve source maps to the original source sourceMaps(), - minify, - ].filter(Boolean), + minify + ].filter(Boolean) }; }; export default [ createConfig({ - output: [ - { file: pkg.module, format: 'es' }, - { file: pkg.main, format: 'cjs' }, - ], + output: [{ file: pkg.module, format: 'es' }, { file: pkg.main, format: 'cjs' }] }), createConfig({ output: { file: 'dist/perfume.es5.min.js', format: 'es' }, - min: true, + min: true }), createConfig({ output: { file: 'dist/perfume.min.js', format: 'cjs' }, - min: true, + min: true }), createConfig({ output: { file: pkg.iife, format: 'iife' }, - includeExternals: true, + includeExternals: true }), createConfig({ output: { file: 'dist/perfume.iife.min.js', format: 'iife' }, includeExternals: true, - min: true, + min: true }), createConfig({ output: { file: pkg.unpkg, format: 'umd' }, - includeExternals: true, + includeExternals: true }), createConfig({ output: { file: 'dist/perfume.umd.min.js', format: 'umd' }, includeExternals: true, - min: true, - }), + min: true + }) ]; diff --git a/src/perfume.ts b/src/perfume.ts index 0d62ac3..0a1a799 100644 --- a/src/perfume.ts +++ b/src/perfume.ts @@ -1,5 +1,5 @@ /*! - * Perfume.js v0.7.1 (http://zizzamia.github.io/perfume) + * Perfume.js v0.8.0 (http://zizzamia.github.io/perfume) * Copyright 2018 The Perfume Authors (https://github.com/Zizzamia/perfume.js/graphs/contributors) * Licensed under MIT (https://github.com/Zizzamia/perfume.js/blob/master/LICENSE) * @license