Socket
Socket
Sign inDemoInstall

perf-marks

Package Overview
Dependencies
1
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
Previous13Next

1.12.0

Diff

Changelog

Source

[1.12.0][] - 2020-07-31

Added

  • 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');

Fixed

  • Fixing entry point for perf-marks/utils
willmendesneto
published 1.11.0 •

Changelog

Source

[1.11.0][] - 2020-07-25

Added

  • 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 environment
    • isPerformanceObservableSupported: Boolean with the result of the check if PerformanceObservable is supported for the current browser/NodeJS version
    • isUserTimingAPISupported: Boolean with the result of the check if User Timing API is supported for the current browser/NodeJS version
willmendesneto
published 1.10.1 •

Changelog

Source

[1.10.1][] - 2020-07-25

Updated

  • Checking entrypoints bundle size in yarn bundlesize command
willmendesneto
published 1.10.0 •

Changelog

Source

[1.10.0][] - 2020-07-24

Updated

  • Using PerformanceObserver as first-class data if code is running in NodeJS
willmendesneto
published 1.9.0 •

Changelog

Source

[1.9.0][] - 2020-07-24

Added

  • Adding support for NodeJS and VanillaJS. Now it runs in frontend and backend 🎉
willmendesneto
published 1.8.1 •

Changelog

Source

[1.8.1][] - 2020-05-13

Updated

  • Upgrading devDependencies to the latest version
  • Upgrading tslib to v1.12.0
  • Upgrading nodejs to v12.16.2
  • Upgrading engines in package.json to accept NodeJS versions only greater or equal than >=12
willmendesneto
published 1.8.0 •

Changelog

Source

[1.8.0][] - 2020-02-16

Added

  • Adding new isPerformanceObservableSupported boolean for check if PerformanceObservable 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();
}
...

Updated

  • Updating jsdom to v16
  • Updating lint-staged to v10.0.2
  • Updating dev dependencies

Fixed

  • Migrating from uglifyjs to uglify-js due to package deprecation
willmendesneto
published 1.7.0 •

Changelog

Source

[1.7.0][] - 2020-01-18

Updated

  • Updating README.md docs with latest changes
  • Decreasing bundle size of the package to 176B 🎉
  • Updating NodeJS Version to 12.14.1
willmendesneto
published 1.6.0 •

Changelog

Source

[1.6.0][] - 2019-11-14

Updated

  • 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, or Parcel.
  • Removing babel packages from dependencies. Not needed anymore after move to rollup build
willmendesneto
published 1.5.1 •

Changelog

Source

[1.5.1][] - 2019-11-08

Updated

  • Updated UMD bundle module to use rollup as UMD resolver
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc