Added some tests

This commit is contained in:
2021-06-23 22:30:45 +02:00
parent 24f897e907
commit 3d3d7fae48
3796 changed files with 218744 additions and 3 deletions

20
tests/node_modules/deep-equal/.editorconfig generated vendored Normal file
View File

@@ -0,0 +1,20 @@
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 150
[CHANGELOG.md]
indent_style = space
indent_size = 2
[*.json]
max_line_length = off
[Makefile]
max_line_length = off

1
tests/node_modules/deep-equal/.eslintignore generated vendored Normal file
View File

@@ -0,0 +1 @@
coverage

38
tests/node_modules/deep-equal/.eslintrc generated vendored Normal file
View File

@@ -0,0 +1,38 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"complexity": 0,
"eqeqeq": [2, "always", { "null": "ignore" }],
"func-style": [2, "declaration"],
"id-length": 0,
"indent": [2, 2],
"max-params": [2, 6],
"max-statements-per-line": [2, { "max": 2 }],
"new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }],
"no-magic-numbers": [2, { "ignore": [0, 1] }],
"operator-linebreak": [2, "before"],
},
"globals": {
"WeakMap": false,
"WeakSet": false,
},
"overrides": [
{
"files": "example/**",
"rules": {
"no-console": 0,
"no-magic-numbers": 0,
}
},
{
"files": "test/**",
"rules": {
"max-lines-per-function": 0,
"max-params": 0,
"no-magic-numbers": 0,
"operator-linebreak": [2, "before"],
},
},
],
}

View File

@@ -0,0 +1,54 @@
name: 'Tests: node.js'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
preset: '>=4'
latest:
needs: [matrix]
name: 'latest minors'
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
node:
name: 'node 4+'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

View File

@@ -0,0 +1,56 @@
name: 'Tests: node.js `assert`'
on: [pull_request, push]
jobs:
assert-required:
name: 'assert: required'
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- "15"
- "14"
- "13"
- "12"
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
env:
ASSERT: true
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
assert-optional:
name: 'assert: optional'
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
node-version:
- "11"
- "10"
- "9"
- "8"
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
env:
ASSERT: true
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
assert:
name: 'node: assert'
needs: [assert-required, assert-optional]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

View File

@@ -0,0 +1,58 @@
name: 'Tests: node.js (io.js)'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
preset: 'iojs'
latest:
needs: [matrix]
name: 'latest minors'
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
skip-ls-check: true
minors:
needs: [matrix, latest]
name: 'non-latest minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run tests-only'
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
skip-ls-check: true
node:
name: 'io.js'
needs: [latest, minors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

View File

@@ -0,0 +1,26 @@
name: 'Tests: pretest/posttest'
on: [pull_request, push]
jobs:
pretest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run pretest'
with:
node-version: 'lts/*'
command: 'pretest'
posttest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
name: 'npm install && npm run posttest'
with:
node-version: 'lts/*'
command: 'posttest'

View File

@@ -0,0 +1,58 @@
name: 'Tests: node.js (0.x)'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
stable: ${{ steps.set-matrix.outputs.requireds }}
unstable: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
preset: '0.x'
stable:
needs: [matrix]
name: 'stable minors'
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.matrix.outputs.stable) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
unstable:
needs: [matrix, stable]
name: 'unstable minors'
continue-on-error: true
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.matrix.outputs.unstable) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/run@main
with:
node-version: ${{ matrix.node-version }}
command: 'tests-only'
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
skip-ls-check: true
node:
name: 'node 0.x'
needs: [stable, unstable]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

View File

@@ -0,0 +1,15 @@
name: Automatic Rebase
on: [pull_request_target]
jobs:
_:
name: "Automatic Rebase"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,12 @@
name: Require “Allow Edits”
on: [pull_request_target]
jobs:
_:
name: "Require “Allow Edits”"
runs-on: ubuntu-latest
steps:
- uses: ljharb/require-allow-edits@main

28
tests/node_modules/deep-equal/.nycrc generated vendored Normal file
View File

@@ -0,0 +1,28 @@
{
"extension": [
".js",
".cjs",
".mjs"
],
"include": [
"*"
],
"exclude": [
"coverage",
"test"
],
"reporter": [
"text",
"html",
"json",
"lcov"
],
"all": false,
"check-coverage": false,
"statements": 100,
"branches": 100,
"lines": 100,
"functions": 100,
"sourceMap": true,
"instrument": true
}

229
tests/node_modules/deep-equal/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,229 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.5](https://github.com/inspect-js/node-deep-equal/compare/v2.0.4...v2.0.5) - 2020-12-01
### Commits
- [Tests] migrate tests to Github Actions [`4051a18`](https://github.com/inspect-js/node-deep-equal/commit/4051a1811612fd1b107743a092402361f597f89a)
- [meta] add Automatic Rebase and Require Allow Edits workflows [`6682b15`](https://github.com/inspect-js/node-deep-equal/commit/6682b15417630d6c57c854d088dfcd6023b3e185)
- [Deps] use `call-bind` and `get-intrinsic` instead of `es-abstract`; update `es-get-iterator`, `object-is`, `object.assign` [`a1d6d93`](https://github.com/inspect-js/node-deep-equal/commit/a1d6d931ebc80db8a6dba1bd453165356458f9e1)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object.getownpropertydescriptors` [`b142f4b`](https://github.com/inspect-js/node-deep-equal/commit/b142f4b9458c320b944dc06f57b9339530cf404e)
## [v2.0.4](https://github.com/inspect-js/node-deep-equal/compare/v2.0.3...v2.0.4) - 2020-10-01
### Fixed
- [meta] fix incorrect `./package.json` exports entry [`#89`](https://github.com/inspect-js/node-deep-equal/issues/89)
### Commits
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog` [`d6bfee3`](https://github.com/inspect-js/node-deep-equal/commit/d6bfee329e2a430a12e6a4aba7006c5d7c36020e)
- [Tests] account for node 14+ making two NaNs loosely deep equal [`9367954`](https://github.com/inspect-js/node-deep-equal/commit/93679546d97dbd92d615b0f758d733ea1fb4eb4b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`86a159b`](https://github.com/inspect-js/node-deep-equal/commit/86a159b72c3e3620285498113251220d3c5d05f0)
- [Deps] update `es-abstract`, `object-is`, `object.assign` [`e87979d`](https://github.com/inspect-js/node-deep-equal/commit/e87979d311faa537622a6c9faee6e91cf9a08bcd)
- [Deps] update `es-abstract`, `is-regex` [`d0cacca`](https://github.com/inspect-js/node-deep-equal/commit/d0cacca140b963d8abbe10f6bf640f22ef11f7b0)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`375a9e1`](https://github.com/inspect-js/node-deep-equal/commit/375a9e1e4911b3210e328365432c8cf946d0a7e2)
- [Dev Deps] update `eslint`, `auto-changelog` [`e562d4f`](https://github.com/inspect-js/node-deep-equal/commit/e562d4fadebf09b1fca02d6f43e1c933c6ef8242)
- [Deps] update `side-channel` [`f092342`](https://github.com/inspect-js/node-deep-equal/commit/f092342373d4a33b3f679042f357fd800185caad)
## [v2.0.3](https://github.com/inspect-js/node-deep-equal/compare/v2.0.2...v2.0.3) - 2020-04-23
### Commits
- [Deps] update `object-is`, `which-typed-array` [`c232374`](https://github.com/inspect-js/node-deep-equal/commit/c2323741001f7cb2414f4fa26301f1b9705e6b46)
- [Dev Deps] update `auto-changelog`; add `aud` [`c80a91d`](https://github.com/inspect-js/node-deep-equal/commit/c80a91d8b9815300fc9e24f08094cac8942d9da7)
- [Dev Deps] update `auto-changelog` [`295d195`](https://github.com/inspect-js/node-deep-equal/commit/295d19529365a87ed663eecf26f19effe5b06f3c)
- [Dev Deps] update `aud` [`1134cc2`](https://github.com/inspect-js/node-deep-equal/commit/1134cc26fd112e3679a6973f4d418c4495e3358d)
- [Deps] Fix classification of `object.assign` [`32695dd`](https://github.com/inspect-js/node-deep-equal/commit/32695dd88c3eb86c87e162830e0e1c55447a4b9f)
## [v2.0.2](https://github.com/inspect-js/node-deep-equal/compare/v2.0.1...v2.0.2) - 2020-04-01
### Commits
- [Fix] properly pass `strict` option through internals [`4e2919d`](https://github.com/inspect-js/node-deep-equal/commit/4e2919d7c403413a9cf094b2f3be095653670e97)
- [Tests] add more coverage [`a3d8677`](https://github.com/inspect-js/node-deep-equal/commit/a3d86774fa39e1a00b3371a32fbe42c7b38743ff)
- [Tests] add coverage reporting [`3174e33`](https://github.com/inspect-js/node-deep-equal/commit/3174e33f952a4bdd57c43e3b40dea705d3d61e68)
- [Refactor] add strict pragma; remove unused try/catch [`c1d173e`](https://github.com/inspect-js/node-deep-equal/commit/c1d173ebadfcc4a2574f28b17727239dcd2737be)
- [Fix] the `prototype` property is not special on non-functions [`1c3cc25`](https://github.com/inspect-js/node-deep-equal/commit/1c3cc2526766e52cc32b9c1859b7073d5dbb70aa)
- [Deps] update `es-abstract`, `es-get-iterator`, `is-date-object`, `is-regex`, `object-is`, `regexp.prototype.flags`, `side-channel` [`7787bdc`](https://github.com/inspect-js/node-deep-equal/commit/7787bdc1268620ef12d17777fce3682abc4e364e)
- [Deps] update `es-abstract`, `es-get-iterator`, `which-collection` [`87624cf`](https://github.com/inspect-js/node-deep-equal/commit/87624cf96f2ca00bf5200aa860c4574dba96f4aa)
- [Fix] robustly distinguish Typed Arrays [`7ccb2b0`](https://github.com/inspect-js/node-deep-equal/commit/7ccb2b0f88136516cd58cad74d9c0a20daad824c)
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`c1814a1`](https://github.com/inspect-js/node-deep-equal/commit/c1814a1256e373ac6e7953b354f9f56ff5b7fe89)
- [Dev Deps] update `@ljharb/eslint-config`, `object.getownpropertydescriptors`, `tape` [`7a0d819`](https://github.com/inspect-js/node-deep-equal/commit/7a0d819e5b3807eab873d7961eb34e30ff615943)
- [Dev Deps] update `auto-changelog`, `tape` [`f248756`](https://github.com/inspect-js/node-deep-equal/commit/f2487567b092d90005a7d09b084f7ffb9ba71257)
- [Tests] fix `tag` helper, from bb50ea2e6d7906cd58683fdc7d327660e71612f4 [`469f008`](https://github.com/inspect-js/node-deep-equal/commit/469f0089d16d8678ee4c5f57016d40f072b3f7be)
- [Dev Deps] update `eslint`, `tape` [`6537dce`](https://github.com/inspect-js/node-deep-equal/commit/6537dcef16c792546c3a40ea5b53ab43861cf719)
- [Fix] make `isBuffer` check slightly more robust [`c21e14d`](https://github.com/inspect-js/node-deep-equal/commit/c21e14d7afe7d53391fa95fd8c59f85affc02ac6)
- [meta] disable greenkeeper updates for semver [`724f051`](https://github.com/inspect-js/node-deep-equal/commit/724f051213e159d5a021d0649e6a2cafd4c13458)
- [Deps] update `es-abstract` [`942ad86`](https://github.com/inspect-js/node-deep-equal/commit/942ad8699442dd83207bb04ae079997b3433ca60)
- [Deps] update `es-abstract` [`8724052`](https://github.com/inspect-js/node-deep-equal/commit/8724052e10d2e897626af6f46e0bce9d35523b04)
## [v2.0.1](https://github.com/inspect-js/node-deep-equal/compare/v2.0.0...v2.0.1) - 2019-12-08
### Fixed
- [Fix] `Map` and `Set` comparison: keys are loosely compared also [`#75`](https://github.com/inspect-js/node-deep-equal/issues/75)
### Commits
- [Fix] check extra properties on regexps [`1eac46b`](https://github.com/inspect-js/node-deep-equal/commit/1eac46b69c7b499cecb7e3b555b6e260de2043fd)
- [Tests] update test skipping logic [`8adf08d`](https://github.com/inspect-js/node-deep-equal/commit/8adf08dcb91146590f2c57b614de6a853054f297)
## [v2.0.0](https://github.com/inspect-js/node-deep-equal/compare/v1.1.1...v2.0.0) - 2019-12-03
### Fixed
- [Fix] handle circular references [`#19`](https://github.com/inspect-js/node-deep-equal/issues/19)
- [Breaking] compare `Map`, `Set`, `WeakMap`, `WeakSet` matching node assert [`#54`](https://github.com/inspect-js/node-deep-equal/issues/54) [`#46`](https://github.com/inspect-js/node-deep-equal/issues/46)
- [Breaking] compare `Map`, `Set`, `WeakMap`, `WeakSet` matching node assert [`#54`](https://github.com/inspect-js/node-deep-equal/issues/54) [`#46`](https://github.com/inspect-js/node-deep-equal/issues/46)
- [Breaking] comparing arrays and objects should always fail, per nodes assert.deepEqual [`#12`](https://github.com/inspect-js/node-deep-equal/issues/12)
### Commits
- [Tests] add passing tests from node core [`91a6472`](https://github.com/inspect-js/node-deep-equal/commit/91a6472719331eca1b13472db798e7f3188af9f7)
- [Tests] convert remaining tests to use the custom assertion [`2bb7269`](https://github.com/inspect-js/node-deep-equal/commit/2bb7269013574a9a4e84ec5e34a04258f3ecd94a)
- [Tests] add tests for getters, fake arrays, overriding getTime on Dates [`1b66d90`](https://github.com/inspect-js/node-deep-equal/commit/1b66d90232a5a576d0334f0c109f8c79da487c9f)
- [Breaking] non-Date objects with different [[Prototypes]] are not equal [`5f2f2e5`](https://github.com/inspect-js/node-deep-equal/commit/5f2f2e55a3cfea251ca502a7846489a9133b4347)
- [Breaking] boxed primitives are not silently unboxed [`e207bc3`](https://github.com/inspect-js/node-deep-equal/commit/e207bc352f338a5c57b2ef2ce59d78b821fb2b58)
- [Tests] run tests with assert, as well [`ccaf3ea`](https://github.com/inspect-js/node-deep-equal/commit/ccaf3eabb081d255f9fafcf2cc2631eafaa9b2a7)
- [Breaking] boxed primitives are unwrapped for comparisons [`a159a3a`](https://github.com/inspect-js/node-deep-equal/commit/a159a3a0660a2da9a8ff6392aba4b2de81bc8391)
- [Refactor] use `side-channel` for memoizing circular refs [`983780a`](https://github.com/inspect-js/node-deep-equal/commit/983780aec338b8d909c3f6a5b1e0f4d7fe1d78b5)
- [Tests] Failing tests for Map equality [`4856185`](https://github.com/inspect-js/node-deep-equal/commit/4856185d989914e2f440fe3fd3bac4d977365fe2)
- [Tests] add `toStringTag` helper [`bb50ea2`](https://github.com/inspect-js/node-deep-equal/commit/bb50ea2e6d7906cd58683fdc7d327660e71612f4)
- [Fix] robustly unbox boxed primitives, using `unbox-primitive` [`c455998`](https://github.com/inspect-js/node-deep-equal/commit/c45599893f02f349604a7b39b39f45036ea2e499)
- [Breaking] two objects with different `Symbol.toStringTag`s are not equal [`45431b6`](https://github.com/inspect-js/node-deep-equal/commit/45431b67b5e7e9cb91d5ff8706dc55348d59184e)
- [Tests] add more Error tests [`c0ae38c`](https://github.com/inspect-js/node-deep-equal/commit/c0ae38c43872621da83aba608cd62b951de7c4c6)
- [Breaking] ensure `Error` objects compare properly [`ffb2522`](https://github.com/inspect-js/node-deep-equal/commit/ffb2522eb94afe46a8ccc23faebdcee23ea6f170)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`737031e`](https://github.com/inspect-js/node-deep-equal/commit/737031e9ac09812ec7181040e857d8b73b573970)
- [readme] update URLs, readme [`9d300da`](https://github.com/inspect-js/node-deep-equal/commit/9d300da78ce21dcca7259bb557765cfac0db3e16)
- [Tests] use `Buffer.from` when available [`43fa5da`](https://github.com/inspect-js/node-deep-equal/commit/43fa5dafe17b1287f56c2566c487a9c05946fe4f)
- [Breaking] add `exports` to `package.json` [`ecd15ae`](https://github.com/inspect-js/node-deep-equal/commit/ecd15aedeeddc8f386ed8b54296648ee4a73af9b)
- [Tests] require ASSERT tests to pass [`7ac77cf`](https://github.com/inspect-js/node-deep-equal/commit/7ac77cf21081b30eeadb5ac5201b30ad0d4dcbe4)
- [Robustness] use `callBound` from `es-abstract` [`4dc3477`](https://github.com/inspect-js/node-deep-equal/commit/4dc347792be1f7131b3095ba98590a599cce7e20)
- [patch] [[Prototype]]s are only compared in strict mode [`43b1eef`](https://github.com/inspect-js/node-deep-equal/commit/43b1eef2eb7bc3045fb160bf5d755bce44cbfd52)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols` [`89228df`](https://github.com/inspect-js/node-deep-equal/commit/89228df447b174008e163f1c83c8f0f559e30fa0)
- [Tests] up to `node` `v12.9` [`595c81a`](https://github.com/inspect-js/node-deep-equal/commit/595c81a2e2c1baab216b2dac640ed020f49033bf)
- [Fix] pass options when comparing Collection keys/values [`9859584`](https://github.com/inspect-js/node-deep-equal/commit/9859584ae2f4f46ec602e18bac9610c71ff00e2f)
- [Breaking] `false` and `[]` are no longer equal, even non-strictly [`5c3accc`](https://github.com/inspect-js/node-deep-equal/commit/5c3acccf541ba0b77342c2a441b32a43acebc73e)
- [Tests] only use `Buffer.from` when it has a length of > 1 [`3645129`](https://github.com/inspect-js/node-deep-equal/commit/3645129d7692c5195ae4b94ba83d2fe84d9538d7)
- [Breaking] remove `lib/is-arguments` and `lib/keys` entrypoints [`783d47e`](https://github.com/inspect-js/node-deep-equal/commit/783d47e3092b7a62aaecbf6836b18a0dfca96662)
- [Dev Deps] update `eslint` [`7cc1dd9`](https://github.com/inspect-js/node-deep-equal/commit/7cc1dd986fc30946ca06ba6496ef856cfb911cf3)
- Merge tag 'v1.1.1' [`f9d3c6d`](https://github.com/inspect-js/node-deep-equal/commit/f9d3c6d1e4a895c448ba7d8766f8616d0e235c9a)
- Merge tag 'v1.1.0' [`0aeca99`](https://github.com/inspect-js/node-deep-equal/commit/0aeca9988dba6fe3318f46c47c933e6926175278)
## [v1.1.1](https://github.com/inspect-js/node-deep-equal/compare/v1.1.0...v1.1.1) - 2019-11-12
### Commits
- [Tests] use shared travis-ci configs [`678cb2a`](https://github.com/inspect-js/node-deep-equal/commit/678cb2a34ef920eab563af69bdf402b9273c3e2c)
- [meta] add `auto-changelog` [`569bcce`](https://github.com/inspect-js/node-deep-equal/commit/569bcce030784f7506367055122c54c6cac00ebc)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` [`9dedd40`](https://github.com/inspect-js/node-deep-equal/commit/9dedd409cb74c538153287db546a14f2fa583e6f)
- [Tests] add `npx aud` in `posttest` [`0b76639`](https://github.com/inspect-js/node-deep-equal/commit/0b766394504f74d002ad85e7b8244ce89bb27130)
- [meta] add `funding` field [`3e519e3`](https://github.com/inspect-js/node-deep-equal/commit/3e519e36998ea82120cfe9a509dc0090a87d7063)
## [v1.1.0](https://github.com/inspect-js/node-deep-equal/compare/v1.0.1...v1.1.0) - 2019-08-27
### Commits
- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v7.10`, `v6.17`, `4.9`; use `nvm install-latest-npm` [`ba11166`](https://github.com/inspect-js/node-deep-equal/commit/ba111664928f3a9279528dd05330b974950003b4)
- [Tests] make a `tape` helper, to easily compare loose/strict, and (a,b)/(b,a) arg order [`0c25e94`](https://github.com/inspect-js/node-deep-equal/commit/0c25e9438b2d4a96e75c3c2e6fbb353ae450ed1f)
- [Tests] add `npm run lint` [`8590816`](https://github.com/inspect-js/node-deep-equal/commit/8590816be6bc57a07fbc160985f5f04f11c7fa97)
- test: Fails simple array tests on IE < 9 #10 [`bc37498`](https://github.com/inspect-js/node-deep-equal/commit/bc374988ee763a881ef39d8f6949838ec4df4e64)
- [Tests] clean up/flesh out test cases [`3fffed9`](https://github.com/inspect-js/node-deep-equal/commit/3fffed9a7e095bbf922561fa0b18681422861af8)
- [Fix] (array,arguments) now behaves the same as (arguments,array) [`a9528ff`](https://github.com/inspect-js/node-deep-equal/commit/a9528ff71561c303e722eb5ae0a3b9b2ecae4a3b)
- [Refactor] move Date and RegExp tests into `objEquiv` [`5b3bf31`](https://github.com/inspect-js/node-deep-equal/commit/5b3bf315b603f00bab49e78c05c075cdc0dfd506)
- [Fix] properly compare RegExp objects [`b8c179c`](https://github.com/inspect-js/node-deep-equal/commit/b8c179c5aa91c8a2f71f053e2d9e2d477780250e)
- [Refactor] Use `object-keys` and `is-arguments` instead of a homegrown shim. [`3b503fb`](https://github.com/inspect-js/node-deep-equal/commit/3b503fb262c431df72a6c91cbb384be557315645)
- [Fix] use `object-is` to support `NaN` and `-0` properly [`28fde4a`](https://github.com/inspect-js/node-deep-equal/commit/28fde4a411073e3131d3637248f8c25aac9329f2)
- [meta] fix license text so GitHub can detect it [`7000403`](https://github.com/inspect-js/node-deep-equal/commit/700040347119ce46b3e917e800d87628af1384f9)
- [Tests] add array/object tests [`558eecf`](https://github.com/inspect-js/node-deep-equal/commit/558eecf9daa815468f0bc4c9799041507b7ffa15)
- [Fix] ensure Buffer + non-Buffer comparison order does not matter [`de4e75c`](https://github.com/inspect-js/node-deep-equal/commit/de4e75ce7f0621cdc09ae8cbdc82de9e4c17578e)
- [Refactor] `objEquiv`: bail early if typeofs are different [`410e2d6`](https://github.com/inspect-js/node-deep-equal/commit/410e2d63730763e7e92c9b45b916f97058ab31f7)
- [Tests] add tests for `Object.create(null)` [`ed266e8`](https://github.com/inspect-js/node-deep-equal/commit/ed266e8571d1efdbb4ece0a01f849cbc57461076)
- [Refactor] there is no need to do further compareation when two types are not equal [`6a5efc1`](https://github.com/inspect-js/node-deep-equal/commit/6a5efc130e96398de55cf517969746c52735f34b)
- Only apps should have lockfiles [`f60442f`](https://github.com/inspect-js/node-deep-equal/commit/f60442fa6fd10004366d80481ada7df668bd6adb)
- [Tests] clean up redundant test [`cbbef21`](https://github.com/inspect-js/node-deep-equal/commit/cbbef21045e3b2e1ee30f6d0a83381d489df296e)
- [Fix] use `is-date-object` to properly detect cross-realm Dates [`0c5b21a`](https://github.com/inspect-js/node-deep-equal/commit/0c5b21ad245d1427caefe20b2bace752cbe5e493)
- [meta] Add copyright statements [`56a7746`](https://github.com/inspect-js/node-deep-equal/commit/56a774674f55bb3e0627aaec4dda90e4a06df7d6)
- [Dev Deps] update `tape` [`3e9c1b9`](https://github.com/inspect-js/node-deep-equal/commit/3e9c1b903703e32bbed45fddcae815eb25822fd4)
## [v1.0.1](https://github.com/inspect-js/node-deep-equal/compare/v1.0.0...v1.0.1) - 2015-08-29
### Fixed
- Null should == undefined [`#23`](https://github.com/inspect-js/node-deep-equal/issues/23)
### Commits
- Update travis.yml to modern node [`5055802`](https://github.com/inspect-js/node-deep-equal/commit/5055802274a85a3e1493fa1b7378499554c6a4dc)
## [v1.0.0](https://github.com/inspect-js/node-deep-equal/compare/v0.2.2...v1.0.0) - 2015-02-07
## [v0.2.2](https://github.com/inspect-js/node-deep-equal/compare/v0.2.1...v0.2.2) - 2015-02-07
### Commits
- latest tape [`1d18617`](https://github.com/inspect-js/node-deep-equal/commit/1d18617608316a034c8ee6727838c9b82614f0f9)
- add type check to support browsers [`3acb0d7`](https://github.com/inspect-js/node-deep-equal/commit/3acb0d7fb8915fb7f1ca97701b5761793738bad3)
## [v0.2.1](https://github.com/inspect-js/node-deep-equal/compare/v0.2.0...v0.2.1) - 2014-01-29
### Commits
- license file [`b3431d4`](https://github.com/inspect-js/node-deep-equal/commit/b3431d48e0f7c406a08d0e077f2dd9580d4561ae)
## [v0.2.0](https://github.com/inspect-js/node-deep-equal/compare/v0.1.2...v0.2.0) - 2014-01-29
### Commits
- buffer check without Buffer [`5271f39`](https://github.com/inspect-js/node-deep-equal/commit/5271f39f3ce61fecb71fa6ca28cb4a8a8b963bbd)
- failing test for buffer comparison [`cc8990b`](https://github.com/inspect-js/node-deep-equal/commit/cc8990b9d84a2267d84253e21c9f7db238e961e9)
## [v0.1.2](https://github.com/inspect-js/node-deep-equal/compare/v0.1.1...v0.1.2) - 2013-12-20
### Commits
- test the arguments shim and properly factor out the arguments handling [`cf88b9c`](https://github.com/inspect-js/node-deep-equal/commit/cf88b9c2e87d6050ba1a46a82be216d0244ee428)
- more coverage for the keys shim [`7a41f0e`](https://github.com/inspect-js/node-deep-equal/commit/7a41f0ec813616b0e1272c2bf463028a84d51c99)
- test coverage for the non-object case [`abd3358`](https://github.com/inspect-js/node-deep-equal/commit/abd33586af0006e8492bbcdb1eb27a306359b03c)
- fix the argument comparisons to properly call equal() [`0114a10`](https://github.com/inspect-js/node-deep-equal/commit/0114a10398e386ab0e073966e8525cd2ce125de4)
- more code coverage for date comparisons [`41ac40e`](https://github.com/inspect-js/node-deep-equal/commit/41ac40e844b10833a75a39ea92e73bcdb1ae3cd9)
- use the latest version of tape [`f8341cb`](https://github.com/inspect-js/node-deep-equal/commit/f8341cbff475ee7ee1ec651662cb5bd621c75838)
- use https: for the badges [`514b332`](https://github.com/inspect-js/node-deep-equal/commit/514b332e9c2390c89c5beac8cf866c2f9a4afa9e)
- 100% coverage [`e55aac7`](https://github.com/inspect-js/node-deep-equal/commit/e55aac78a6e013d6f5a10febc7009476a8f10ca5)
## [v0.1.1](https://github.com/inspect-js/node-deep-equal/compare/v0.1.0...v0.1.1) - 2013-12-20
### Commits
- Fixed arguments support for IE8- [`174d41a`](https://github.com/inspect-js/node-deep-equal/commit/174d41a5559820458648d237ebedfe78e44f7430)
## [v0.1.0](https://github.com/inspect-js/node-deep-equal/compare/v0.0.0...v0.1.0) - 2013-10-14
### Commits
- upgrade the markdown [`30e1f8f`](https://github.com/inspect-js/node-deep-equal/commit/30e1f8fe5b1fb7d5d68b156bf69bb04a7bb807a3)
- opts.strict instead of a boolean arg [`58cbdb2`](https://github.com/inspect-js/node-deep-equal/commit/58cbdb2a97e623a68310833218af5ada6c97c2ce)
- using testling-ci [`064af17`](https://github.com/inspect-js/node-deep-equal/commit/064af170f895fc67ec4bbf654e7de27721cf40c0)
- Add optional strict parameter [`f3413b1`](https://github.com/inspect-js/node-deep-equal/commit/f3413b1d95e261f735939fbcaee65e598fe92852)
- strict equality test [`281189b`](https://github.com/inspect-js/node-deep-equal/commit/281189b6962c9c57105474d01a8127da3318f555)
- document opts.strict [`69fae5a`](https://github.com/inspect-js/node-deep-equal/commit/69fae5ab4b9278e28d09864c62dcfe9b4f00c1d8)
- using tape [`4384db8`](https://github.com/inspect-js/node-deep-equal/commit/4384db8a9cc7af1cf79e1976d1b36e66934b2b4c)
- using travis [`e508692`](https://github.com/inspect-js/node-deep-equal/commit/e5086928e1edf120d227d5e7f5e6ac4d755248a1)
- deepEquals comparing nulls seems to break in ie6-8 [`b2cfeb9`](https://github.com/inspect-js/node-deep-equal/commit/b2cfeb95da6982f8bc2e676231820a3a47385db3)
- performance note in the readme [`da9bfc9`](https://github.com/inspect-js/node-deep-equal/commit/da9bfc9aadfb9045bbf8157e9403de7184b404fd)
- more firefoxes [`3d60ec5`](https://github.com/inspect-js/node-deep-equal/commit/3d60ec58d6fe269c13c5be04b749f01972aa5b1c)
## v0.0.0 - 2012-02-10
### Commits
- implementation with an example [`2dd56f9`](https://github.com/inspect-js/node-deep-equal/commit/2dd56f9e6d42e841c74289c2e2d489047d077622)
- readme [`4a44f99`](https://github.com/inspect-js/node-deep-equal/commit/4a44f99bea3277e32d9842d9d49ac21f316ac74d)
- and a test [`357ccd3`](https://github.com/inspect-js/node-deep-equal/commit/357ccd37d23ba7814c8fe284d36d6e86a39b7526)
- actually just MIT [`3d348c8`](https://github.com/inspect-js/node-deep-equal/commit/3d348c88fc92ce1d69a3fedbb2aa8cb6ea1480f7)

21
tests/node_modules/deep-equal/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2012, 2013, 2014 James Halliday <mail@substack.net>, 2009 Thomas Robinson <280north.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

3
tests/node_modules/deep-equal/assert.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('assert');

13
tests/node_modules/deep-equal/example/cmp.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
'use strict';
var equal = require('../');
console.dir([
equal(
{ a: [2, 3], b: [4] },
{ a: [2, 3], b: [4] }
),
equal(
{ x: 5, y: [6] },
{ x: 5, y: 6 }
)
]);

362
tests/node_modules/deep-equal/index.js generated vendored Normal file
View File

@@ -0,0 +1,362 @@
'use strict';
var objectKeys = require('object-keys');
var isArguments = require('is-arguments');
var is = require('object-is');
var isRegex = require('is-regex');
var flags = require('regexp.prototype.flags');
var isArray = require('isarray');
var isDate = require('is-date-object');
var whichBoxedPrimitive = require('which-boxed-primitive');
var GetIntrinsic = require('get-intrinsic');
var callBound = require('call-bind/callBound');
var whichCollection = require('which-collection');
var getIterator = require('es-get-iterator');
var getSideChannel = require('side-channel');
var whichTypedArray = require('which-typed-array');
var assign = require('object.assign');
var $getTime = callBound('Date.prototype.getTime');
var gPO = Object.getPrototypeOf;
var $objToString = callBound('Object.prototype.toString');
var $Set = GetIntrinsic('%Set%', true);
var $mapHas = callBound('Map.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSize = callBound('Map.prototype.size', true);
var $setAdd = callBound('Set.prototype.add', true);
var $setDelete = callBound('Set.prototype.delete', true);
var $setHas = callBound('Set.prototype.has', true);
var $setSize = callBound('Set.prototype.size', true);
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
function setHasEqualElement(set, val1, opts, channel) {
var i = getIterator(set);
var result;
while ((result = i.next()) && !result.done) {
if (internalDeepEqual(val1, result.value, opts, channel)) { // eslint-disable-line no-use-before-define
// Remove the matching element to make sure we do not check that again.
$setDelete(set, result.value);
return true;
}
}
return false;
}
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
function findLooseMatchingPrimitives(prim) {
if (typeof prim === 'undefined') {
return null;
}
if (typeof prim === 'object') { // Only pass in null as object!
return void 0;
}
if (typeof prim === 'symbol') {
return false;
}
if (typeof prim === 'string' || typeof prim === 'number') {
// Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
return +prim === +prim; // eslint-disable-line no-implicit-coercion
}
return true;
}
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
var altValue = findLooseMatchingPrimitives(prim);
if (altValue != null) {
return altValue;
}
var curB = $mapGet(b, altValue);
var looseOpts = assign({}, opts, { strict: false });
if (
(typeof curB === 'undefined' && !$mapHas(b, altValue))
// eslint-disable-next-line no-use-before-define
|| !internalDeepEqual(item, curB, looseOpts, channel)
) {
return false;
}
// eslint-disable-next-line no-use-before-define
return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
}
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
function setMightHaveLoosePrim(a, b, prim) {
var altValue = findLooseMatchingPrimitives(prim);
if (altValue != null) {
return altValue;
}
return $setHas(b, altValue) && !$setHas(a, altValue);
}
// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
var i = getIterator(set);
var result;
var key2;
while ((result = i.next()) && !result.done) {
key2 = result.value;
if (
// eslint-disable-next-line no-use-before-define
internalDeepEqual(key1, key2, opts, channel)
// eslint-disable-next-line no-use-before-define
&& internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
) {
$setDelete(set, key2);
return true;
}
}
return false;
}
function internalDeepEqual(actual, expected, options, channel) {
var opts = options || {};
// 7.1. All identical values are equivalent, as determined by ===.
if (opts.strict ? is(actual, expected) : actual === expected) {
return true;
}
var actualBoxed = whichBoxedPrimitive(actual);
var expectedBoxed = whichBoxedPrimitive(expected);
if (actualBoxed !== expectedBoxed) {
return false;
}
// 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
}
/*
* 7.4. For all other Object pairs, including Array objects, equivalence is
* determined by having the same number of owned properties (as verified
* with Object.prototype.hasOwnProperty.call), the same set of keys
* (although not necessarily the same order), equivalent values for every
* corresponding key, and an identical 'prototype' property. Note: this
* accounts for both named and indexed properties on Arrays.
*/
// see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration
var hasActual = channel.has(actual);
var hasExpected = channel.has(expected);
var sentinel;
if (hasActual && hasExpected) {
if (channel.get(actual) === channel.get(expected)) {
return true;
}
} else {
sentinel = {};
}
if (!hasActual) { channel.set(actual, sentinel); }
if (!hasExpected) { channel.set(expected, sentinel); }
// eslint-disable-next-line no-use-before-define
return objEquiv(actual, expected, opts, channel);
}
function isBuffer(x) {
if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
return false;
}
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
return false;
}
if (x.length > 0 && typeof x[0] !== 'number') {
return false;
}
return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
}
function setEquiv(a, b, opts, channel) {
if ($setSize(a) !== $setSize(b)) {
return false;
}
var iA = getIterator(a);
var iB = getIterator(b);
var resultA;
var resultB;
var set;
while ((resultA = iA.next()) && !resultA.done) {
if (resultA.value && typeof resultA.value === 'object') {
if (!set) { set = new $Set(); }
$setAdd(set, resultA.value);
} else if (!$setHas(b, resultA.value)) {
if (opts.strict) { return false; }
if (!setMightHaveLoosePrim(a, b, resultA.value)) {
return false;
}
if (!set) { set = new $Set(); }
$setAdd(set, resultA.value);
}
}
if (set) {
while ((resultB = iB.next()) && !resultB.done) {
// We have to check if a primitive value is already matching and only if it's not, go hunting for it.
if (resultB.value && typeof resultB.value === 'object') {
if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
return false;
}
} else if (
!opts.strict
&& !$setHas(a, resultB.value)
&& !setHasEqualElement(set, resultB.value, opts.strict, channel)
) {
return false;
}
}
return $setSize(set) === 0;
}
return true;
}
function mapEquiv(a, b, opts, channel) {
if ($mapSize(a) !== $mapSize(b)) {
return false;
}
var iA = getIterator(a);
var iB = getIterator(b);
var resultA;
var resultB;
var set;
var key;
var item1;
var item2;
while ((resultA = iA.next()) && !resultA.done) {
key = resultA.value[0];
item1 = resultA.value[1];
if (key && typeof key === 'object') {
if (!set) { set = new $Set(); }
$setAdd(set, key);
} else {
item2 = $mapGet(b, key);
if ((typeof item2 === 'undefined' && !$mapHas(b, key)) || !internalDeepEqual(item1, item2, opts, channel)) {
if (opts.strict) {
return false;
}
if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
return false;
}
if (!set) { set = new $Set(); }
$setAdd(set, key);
}
}
}
if (set) {
while ((resultB = iB.next()) && !resultB.done) {
key = resultB.value[0];
item2 = resultB.value[1];
if (key && typeof key === 'object') {
if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
return false;
}
} else if (
!opts.strict
&& (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel))
&& !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)
) {
return false;
}
}
return $setSize(set) === 0;
}
return true;
}
function objEquiv(a, b, opts, channel) {
/* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5] */
var i, key;
if (typeof a !== typeof b) { return false; }
if (a == null || b == null) { return false; }
if ($objToString(a) !== $objToString(b)) { return false; }
if (isArguments(a) !== isArguments(b)) { return false; }
var aIsArray = isArray(a);
var bIsArray = isArray(b);
if (aIsArray !== bIsArray) { return false; }
// TODO: replace when a cross-realm brand check is available
var aIsError = a instanceof Error;
var bIsError = b instanceof Error;
if (aIsError !== bIsError) { return false; }
if (aIsError || bIsError) {
if (a.name !== b.name || a.message !== b.message) { return false; }
}
var aIsRegex = isRegex(a);
var bIsRegex = isRegex(b);
if (aIsRegex !== bIsRegex) { return false; }
if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
return false;
}
var aIsDate = isDate(a);
var bIsDate = isDate(b);
if (aIsDate !== bIsDate) { return false; }
if (aIsDate || bIsDate) { // && would work too, because both are true or both false here
if ($getTime(a) !== $getTime(b)) { return false; }
}
if (opts.strict && gPO && gPO(a) !== gPO(b)) { return false; }
if (whichTypedArray(a) !== whichTypedArray(b)) {
return false;
}
var aIsBuffer = isBuffer(a);
var bIsBuffer = isBuffer(b);
if (aIsBuffer !== bIsBuffer) { return false; }
if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
if (a.length !== b.length) { return false; }
for (i = 0; i < a.length; i++) {
if (a[i] !== b[i]) { return false; }
}
return true;
}
if (typeof a !== typeof b) { return false; }
var ka = objectKeys(a);
var kb = objectKeys(b);
// having the same number of owned properties (keys incorporates hasOwnProperty)
if (ka.length !== kb.length) { return false; }
// the same set of keys (although not necessarily the same order),
ka.sort();
kb.sort();
// ~~~cheap key test
for (i = ka.length - 1; i >= 0; i--) {
if (ka[i] != kb[i]) { return false; } // eslint-disable-line eqeqeq
}
// equivalent values for every corresponding key, and ~~~possibly expensive deep test
for (i = ka.length - 1; i >= 0; i--) {
key = ka[i];
if (!internalDeepEqual(a[key], b[key], opts, channel)) { return false; }
}
var aCollection = whichCollection(a);
var bCollection = whichCollection(b);
if (aCollection !== bCollection) {
return false;
}
if (aCollection === 'Set' || bCollection === 'Set') { // aCollection === bCollection
return setEquiv(a, b, opts, channel);
}
if (aCollection === 'Map') { // aCollection === bCollection
return mapEquiv(a, b, opts, channel);
}
return true;
}
module.exports = function deepEqual(a, b, opts) {
return internalDeepEqual(a, b, opts, getSideChannel());
};

162
tests/node_modules/deep-equal/package.json generated vendored Normal file
View File

@@ -0,0 +1,162 @@
{
"_from": "deep-equal@^2.0.5",
"_id": "deep-equal@2.0.5",
"_inBundle": false,
"_integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==",
"_location": "/deep-equal",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "deep-equal@^2.0.5",
"name": "deep-equal",
"escapedName": "deep-equal",
"rawSpec": "^2.0.5",
"saveSpec": null,
"fetchSpec": "^2.0.5"
},
"_requiredBy": [
"/tape"
],
"_resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.5.tgz",
"_shasum": "55cd2fe326d83f9cbf7261ef0e060b3f724c5cb9",
"_spec": "deep-equal@^2.0.5",
"_where": "/home/lilleman/go/src/gitlab.larvit.se/power-plan/auth/tests/node_modules/tape",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"browser": {
"assert.js": false
},
"bugs": {
"url": "https://github.com/inspect-js/node-deep-equal/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "James Halliday",
"email": "mail@substack.net",
"url": "https://substack.net"
},
{
"name": "Jordan Harband",
"email": "ljharb@gmail.com"
}
],
"dependencies": {
"call-bind": "^1.0.0",
"es-get-iterator": "^1.1.1",
"get-intrinsic": "^1.0.1",
"is-arguments": "^1.0.4",
"is-date-object": "^1.0.2",
"is-regex": "^1.1.1",
"isarray": "^2.0.5",
"object-is": "^1.1.4",
"object-keys": "^1.1.1",
"object.assign": "^4.1.2",
"regexp.prototype.flags": "^1.3.0",
"side-channel": "^1.0.3",
"which-boxed-primitive": "^1.0.1",
"which-collection": "^1.0.1",
"which-typed-array": "^1.1.2"
},
"deprecated": false,
"description": "node's assert.deepEqual algorithm",
"devDependencies": {
"@ljharb/eslint-config": "^17.3.0",
"aud": "^1.1.3",
"auto-changelog": "^2.2.1",
"eslint": "^7.14.0",
"has-symbols": "^1.0.1",
"has-typed-arrays": "^1.0.0",
"nyc": "^10.3.2",
"object.getownpropertydescriptors": "^2.1.1",
"safe-publish-latest": "^1.1.4",
"semver": "^6.3.0",
"tape": "^5.0.1"
},
"directories": {
"lib": ".",
"example": "example",
"test": "test"
},
"exports": {
".": [
{
"default": "./index.js"
},
"./index.js"
],
"./package": "./package.json",
"./package.json": "./package.json"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"greenkeeper": {
"ignore": [
"nyc",
"semver"
]
},
"homepage": "https://github.com/inspect-js/node-deep-equal#readme",
"keywords": [
"equality",
"equal",
"compare"
],
"license": "MIT",
"main": "index.js",
"name": "deep-equal",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/inspect-js/node-deep-equal.git"
},
"scripts": {
"lint": "eslint .",
"posttest": "npx aud --production",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prepublish": "safe-publish-latest",
"pretest": "npm run lint",
"test": "npm run tests-only",
"tests-only": "nyc tape 'test/**/*.js'",
"version": "auto-changelog && git add CHANGELOG.md"
},
"testling": {
"files": "test/*.js",
"browsers": {
"ie": [
6,
7,
8,
9
],
"ff": [
3.5,
10,
15
],
"chrome": [
10,
22
],
"safari": [
5.1
],
"opera": [
12
]
}
},
"version": "2.0.5"
}

54
tests/node_modules/deep-equal/readme.markdown generated vendored Normal file
View File

@@ -0,0 +1,54 @@
# deep-equal
Node's `assert.deepEqual() algorithm` as a standalone module.
This module is around [46 times faster](https://gist.github.com/substack/2790507#gistcomment-3099862) than wrapping `assert.deepEqual()` in a `try/catch`.
[![build status](https://secure.travis-ci.com/inspect-js/node-deep-equal.png)](https://travis-ci.org/inspect-js/node-deep-equal)
# example
``` js
var equal = require('deep-equal');
console.dir([
equal(
{ a : [ 2, 3 ], b : [ 4 ] },
{ a : [ 2, 3 ], b : [ 4 ] }
),
equal(
{ x : 5, y : [6] },
{ x : 5, y : 6 }
)
]);
```
# methods
``` js
var deepEqual = require('deep-equal')
```
## deepEqual(a, b, opts)
Compare objects `a` and `b`, returning whether they are equal according to a
recursive equality algorithm.
If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes.
The default is to use coercive equality (`==`) because that's how
`assert.deepEqual()` works by default.
# install
With [npm](https://npmjs.org) do:
```
npm install deep-equal
```
# test
With [npm](https://npmjs.org) do:
```
npm test
```

42
tests/node_modules/deep-equal/test/_tape.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
'use strict';
var Test = require('tape/lib/test');
var is = require('object-is');
var deepEqual = require('../');
var assert = require('../assert');
var equal = process.env.ASSERT ? function assertDeepEqual(a, b, options) {
try {
if (options && options.strict) {
assert.deepStrictEqual(a, b);
} else {
assert.deepEqual(a, b);
}
} catch (e) {
return false;
}
return true;
} : deepEqual;
function equalReversed(t, a, b, isEqual, msg, isStrict, skipReversed) {
var actual = isStrict
? equal(a, b, { strict: true })
: equal(a, b);
var suffix = isEqual ? ' are equal' : ' are not equal';
t.equal(actual, !!isEqual, msg + suffix);
if (typeof skipReversed === 'boolean' ? !skipReversed : !is(a, b)) {
var actualReverse = isStrict
? equal(b, a, { strict: true })
: equal(b, a);
t.equal(actualReverse, !!isEqual, msg + suffix + ' (reversed)');
}
}
function deepEqualTest(t, a, b, msg, isEqual, isStrictEqual, skipReversed) {
equalReversed(t, a, b, isEqual, msg, false, skipReversed);
equalReversed(t, a, b, isStrictEqual, 'strict: ' + msg, true, skipReversed);
}
Test.prototype.deepEqualTest = function (a, b, message, isEqual, isStrictEqual, skipReversed) {
return deepEqualTest(this, a, b, message, !!isEqual, !!isStrictEqual, skipReversed);
};

1169
tests/node_modules/deep-equal/test/cmp.js generated vendored Normal file

File diff suppressed because it is too large Load Diff