Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unassert

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unassert - npm Package Versions

2

2.0.2

Diff

Changelog

Source

2.0.2 (2023-04-20)

Bug Fixes
twada
published 2.0.1 •

Changelog

Source
twada
published 2.0.0 •

Changelog

Source

2.0.0 (2022-08-01)

Features
Bug Fixes
Breaking Changes

unassert function is removed in favor of named exports aiming ESM era. Please use unassert.unassertAst instead.

before:

const unassert = require('unassert');

after:

const { unassertAst } = require('unassert');

Configuration options are simplified a lot. Patterns are aggregated into modules.

before:

{
  assertionPatterns: [
    'assert(value, [message])',
    'assert.ok(value, [message])',
    'assert.equal(actual, expected, [message])',
    'assert.notEqual(actual, expected, [message])',
    'assert.strictEqual(actual, expected, [message])',
    'assert.notStrictEqual(actual, expected, [message])',
    'assert.deepEqual(actual, expected, [message])',
    'assert.notDeepEqual(actual, expected, [message])',
    'assert.deepStrictEqual(actual, expected, [message])',
    'assert.notDeepStrictEqual(actual, expected, [message])',
    'assert.fail(actual, expected, message, operator)',
    'assert.throws(block, [error], [message])',
    'assert.doesNotThrow(block, [message])',
    'assert.ifError(value)',
    'console.assert(value, [message])'
  ],
  requirePatterns: [
    'assert = require("assert")'
  ],
  importPatterns: [
    'import assert from "assert"',
    'import * as assert from "assert"'
  ]
}

after:

{
  modules: [
    'assert',
    'assert/strict',
    'node:assert',
    'node:assert/strict'
  ]
}

Move power-assert support away from default patterns since power-assert empowers default assert function transparently, so should not be required explicitly. If power-assert is still required explicitly, add 'power-assert' to modules in customized configuration.

after:

{
  modules: [
    'assert',
    'assert/strict',
    'node:assert',
    'node:assert/strict',
    'power-assert'
  ]
}
twada
published 1.6.0 •

twada
published 1.5.1 •

Changelog

Source

1.5.1 (2017-01-01)

Chores
twada
published 1.5.0 •

Changelog

Source

1.5.0 (2016-12-19)

Features
twada
published 1.4.1 •

twada
published 1.4.0 •

Changelog

Source
twada
published 1.3.1 •

Changelog

Source

1.3.1 (2015-12-08)

Bug Fixes
  • remove assertion if and only if its parent is an ExpressionStatement (6515857a, closes #4)
twada
published 1.3.0 •

2
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc