Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@sinonjs/commons

sinonjs169.7mBSD-3-Clause4.0.0-alpha.0TypeScript support: included

Simple functions shared among the sinon end user libraries

readme

commons

CircleCI codecov Contributor Covenant

Simple functions shared among the sinon end user libraries

Rules

  • Follows the Sinon.JS compatibility
  • 100% test coverage
  • Code formatted using Prettier
  • No side effects welcome! (only pure functions)
  • No platform specific functions
  • One export per file (any bundler can do tree shaking)

changelog

Changes

4.0.0-alpha.0

  • 775439f chore: replace nyc with c8 (Morgan Roderick)

    nyc doesn't support ESM, but c8 does and is a drop in replacement

    See https://github.com/bcoe/c8

  • 715083e chore: consolidate lib/prototypes/ into lib/prototypes.mjs (Morgan Roderick)

    This avoids creating another index file

  • f6e7108 chore: move copy-prototype-methods up one level (Morgan Roderick)
  • 2561540 Move throws-on-prototype up one level (Morgan Roderick)
  • 3fdb119 chore: convert prototypes to ESM (Morgan Roderick)
  • 33adb63 chore: convert valueToString to ESM (Morgan Roderick)
  • 22d4635 chore: convert typeOf to ESM (Morgan Roderick)
  • d1ee17e chore: convert orderByFirstCall to ESM (Morgan Roderick)
  • d7205c7 chore: convert global to ESM (Morgan Roderick)
  • 4895e4a chore: convert functionName to ESM (Morgan Roderick)
  • bcd5a9f chore: convert every to ESM (Morgan Roderick)
  • 3221331 chore: convert deprecated to ESM (Morgan Roderick)
  • 654c546 chore: set project type to module (Morgan Roderick)
  • 7e578a3 chore: convert className to ESM (Morgan Roderick)
  • a84e58c chore: convert called-in-order to ESM (Morgan Roderick)
  • 0aa0cd9 chore: convert index.js to ESM (Morgan Roderick)
  • 2c3ce62 chore: use .cjs extension (Morgan Roderick)
    • Prepare build for both CommonJS and ESM support
    • Export CommonJS bundled as default
  • d23fc83 chore: Update actions/setup-node (Morgan Roderick)
  • 05e3092 chore: Update actions/checkout (Morgan Roderick)

Released by Morgan Roderick on 2024-01-20.

3.0.1

  • f82068f chore: remove obsolete IE11 code (Morgan Roderick)

    When we upgraed to @sinonjs/eslint-config@4 in 09e99f4e310c20408df50330124e4d68a60e9b6a we effectively removed support for IE11.

    That means that this code branch is obsolete and is safe to remove.

Released by Morgan Roderick on 2024-01-20.

3.0.0

  • b0253f8 Drop node 12, hello node 18 (Morgan Roderick)

Released by Morgan Roderick on 2022-11-28.

2.0.0

  • f890f87 Prefer ES2017 (Morgan Roderick)

    See v1.8.5 for backwards compatibility with ES5

Released by Morgan Roderick on 2022-11-07.

1.8.5

  • 06fb4d4 [Fix] use indexOf instead of includes (Jordan Harband)

    This restores ES5 compatibility for use with sinon@9

Released by Morgan Roderick on 2022-11-07.

1.8.4

  • 9305715 Fix #89: detect error on access to proto (Morgan Roderick)

Released by Morgan Roderick on 2022-11-02.

1.8.3

Released on 2021-04-08.

1.8.2

  • 6b7a796 Add .d.ts files to package (Morgan Roderick)

    In order to improve the experience of TypeScript users, we are compiling .d.ts files from the JSDoc and distributing them with the package

Released on 2021-01-13.

1.8.1

  • 07b9e7a Optimize npm package size (Uladzimir Havenchyk)

Released on 2020-07-17.

1.8.0

  • 4282205 Emit deprecationg warnings in node, and keep console info in browsers (mshaaban0)

Released on 2020-05-20.

1.7.2

  • 76ad9c1 Fix generators causing exceptions in function-name (Sebastian Mayr)

Released on 2020-04-08.

1.7.1

  • 0486d25 Upgrade eslint-config-sinon, add eslint-plugin-jsdoc (Morgan Roderick)

    This adds linting of jsdoc

Released on 2020-02-19.