All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
1.14.2 - 2021-04-11
- Added blog post link in
README.md
- Decreasing bundle size of main bundle and
perf-marks/marks
entry-point 🎉
1.14.1 - 2021-02-12
- Removing jest warning for typescript configuration in
jest.config.js
- Updating package dependencies
- Updating project to use NodeJS v15.8.0
1.14.0 - 2020-09-30
- Updating package dependencies
end()
: Adding built-in mark to compare if the application is not passing the values. This will give us all the required information for the consumers.
Without passing a mark to compare
import * as PerfMarks from 'perf-marks';
...
PerfMarks.start('name-of-your-mark');
...
const markResults: PerfMarks.PerfMarksPerformanceEntry = PerfMarks.end('name-of-your-mark');
Passing a mark to compare
import * as PerfMarks from 'perf-marks';
...
PerfMarks.start('name-of-your-mark');
PerfMarks.start('name-of-your-mark-to-be-compared-with');
...
const markResults: PerfMarks.PerfMarksPerformanceEntry = PerfMarks.end(
'name-of-your-mark',
'name-of-your-mark-to-be-compared-with'
);
1.13.4 - 2020-08-21
- Fixing package distribution issue
1.13.3 - 2020-08-21
- Adding dependency check via
depcheck
package
- Updating dependencies to latest
- Removing unnecessary files from content to be published
- Checking if
module
andmodule.require
are available globally before confirm the package is running in a NodeJS environment.
1.13.2 - 2020-08-01
- Removing mark to compare if passed into
end()
method
1.13.1 - 2020-08-01
- Updating bundle options for
perf-marks/entries
entry point - Updating bundle options for
perf-marks/marks
entry point - Updating bundle options for
perf-marks/profiler
entry point - Updating bundle options for
perf-marks/utils
entry point
1.13.0 - 2020-08-01
- Adding
ES2020
bundle on published content. Now the package supportsCommonJS
,UMD
,ESM
,ES2015
andES2020
📦
1.12.2 - 2020-08-01
- Fixing UMD bundle by using Rollup. Typescript was required in the package and one of the TS functions is required in the bundle.
1.12.1 - 2020-07-31
- Small bundle fix
1.12.0 - 2020-07-31
- Adding entry points checks in bundlesize task
- New method
profiler()
to profile functions using perf-marks. The idea here is to avoid boilerplates on consumer's side by having an easy way to do that. So instead of doing this
import { start, end } from 'perf-marks/marks';
const markName = 'name-of-the-mark-for-this-method';
const methodToBeMeasured = () => {
/** method content */
};
// ...
start(markName);
const data = methodToBeMeasured();
const mark = end(markName);
return { data, mark };
The consumers can have same effect by doing this
const methodToBeMeasured = () => {
/** method content */
};
// `res` will contain `mark` with the information and `data`
// if `methodToBeMeasured` returns something
const res = profiler(methodToBeMeasured, 'name-of-the-mark-for-this-method');
- Fixing entry point for
perf-marks/utils
1.11.0 - 2020-07-25
- Adding new entry point for checkers. These checkers are exposing
isNodeJSEnv
: Boolean with the result of the check if package is running on the browser or in a NodeJS environmentisPerformanceObservableSupported
: Boolean with the result of the check ifPerformanceObservable
is supported for the current browser/NodeJS versionisUserTimingAPISupported
: Boolean with the result of the check if User Timing API is supported for the current browser/NodeJS version
1.10.1 - 2020-07-25
- Checking entrypoints bundle size in
yarn bundlesize
command
1.10.0 - 2020-07-24
- Using PerformanceObserver as first-class data if code is running in NodeJS
1.9.0 - 2020-07-24
- Adding support for NodeJS and VanillaJS. Now it runs in frontend and backend 🎉
1.8.1 - 2020-05-13
- Upgrading devDependencies to the latest version
- Upgrading
tslib
tov1.12.0
- Upgrading
nodejs
tov12.16.2
- Upgrading
engines
inpackage.json
to accept NodeJS versions only greater or equal than>=12
1.8.0 - 2020-02-16
- Adding new
isPerformanceObservableSupported
boolean for check ifPerformanceObservable
is supported for the current browser/NodeJS version
import * as PerfMarks from 'perf-marks';
...
// Checking if `PerformanceObservable` is supported for the current browser/NodeJS version
if (PerfMarks.isPerformanceObservableSupported) {
try {
// If yes, start the PerformanceObserver
const observer: PerformanceObserver = new PerformanceObserver(list => {
// ... Do something
});
// register observer based on the entryTypes
// E.G. for long task notifications
observer.observe({ entryTypes: ['longtask'] });
} catch (e) {}
// ... Finishing the observer
observer.disconnect();
}
...
- Updating jsdom to v16
- Updating lint-staged to v10.0.2
- Updating dev dependencies
- Migrating from
uglifyjs
touglify-js
due to package deprecation
1.7.0 - 2020-01-18
- Updating
README.md
docs with latest changes - Decreasing bundle size of the package to
176B
🎉 - Updating NodeJS Version to 12.14.1
1.6.0 - 2019-11-14
- Adding support for CJS and ESM in entry points via build tool. By definition it will use CJS. However, this can be changed in the consumer's bundle step - built-in scenario if the consumer uses toolings such as
Webpack
,Rollup
, orParcel
. - Removing
babel
packages from dependencies. Not needed anymore after move torollup
build
1.5.1 - 2019-11-08
- Updated UMD bundle module to use
rollup
as UMD resolver
1.5.0 - 2019-11-06
- Adding
sideEffects: false
to allow consumer's to tree-shake
- Updated
main
entry point inpackage.json
to point tocjs
bundle content - Updated UMD bundle module to use
browser
key
1.4.1 - 2019-10-26
- Adding docs for bundle optimization and how to use different bundles in web apps
1.4.0 - 2019-10-26
- Fixing ignored files list
- Updating UMD id for package
- Adding
tslib
for CJS bundle version
1.3.1 - 2019-10-23
- Fixing ignored files list
1.3.0 - 2019-10-22
- Adding
UMD
bundle as main entry for the package
- Removing
tslib
for Stackblitz examples - Updated entrypoints logic to remove files after
yarn bundlesize
command
- Adding different bundles for
CommonJS
,UMD
,ESM
andES2015
- Using
ESM
definition for entry points for better tree shaking - Exposing new methods in entry points
- Adding docs for entry points
- Adding docs yarn usage and installation
1.2.1 - 2019-10-22
- Removing scripts and jest config from
.gitignore
file
1.2.0 - 2019-10-22
- Removing
package.js
for meteor modules
- Adding more info in
ISSUE_TEMPLATE.md
- Removing unnecessary files from npm pack
- ignoring main
src/index.ts
entry file on code coverage - Adding
src/index.ts
entry file as main package route for resources
- Adding gif showing the package usage
- Adding ESLint rule for polyfills
- Adding entrypoints:
perf-marks/marks
andperf-marks/entries
1.1.0 - 2019-10-20
- Improving CircleCI pipeline and npm scripts to run on it
- Updating dependencies
- Moving from Travis-CI to CircleCI to fix pipeline
- Fixing coveralls integration
- Fixing eslint in
scripts/generate-banner.js
file
- Adding
contributing.md
file and section inREADME.md
- Adding package logo
- Adding types for
PerfMarks.end()
response
1.0.1 - 2019-10-16
- Removing sufix in
performance.measure
call - Removing
src/index.tx
from code coverage evaluation - Replacing local demo in favour of Stackblitz playground
https://stackblitz.com/edit/perf-marks-playground
1.0.0 - 2019-10-16
- Created
perf-marks
package - Adding
perf-marks
demo page