@contrast/agent 4.32.11 → 4.32.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/file-stream-rotator/FileStreamRotator.js +200 -41
- package/node_modules/file-stream-rotator/LICENSE.txt +17 -0
- package/node_modules/file-stream-rotator/README.md +16 -1
- package/node_modules/file-stream-rotator/package.json +5 -5
- package/node_modules/file-stream-rotator/tests/every-minute-test.js +32 -15
- package/node_modules/file-stream-rotator/tests/every-second-test.js +16 -7
- package/node_modules/file-stream-rotator/tests/large-test.js +33 -0
- package/node_modules/file-stream-rotator/tests/rotate-on-size-without-date.js +103 -0
- package/node_modules/object-hash/dist/object_hash.js +1 -2
- package/node_modules/object-hash/index.js +33 -21
- package/node_modules/object-hash/package.json +20 -18
- package/node_modules/object-hash/readme.markdown +20 -5
- package/node_modules/winston-daily-rotate-file/README.md +81 -12
- package/node_modules/winston-daily-rotate-file/daily-rotate-file.js +69 -30
- package/node_modules/winston-daily-rotate-file/index.d.ts +119 -72
- package/node_modules/winston-daily-rotate-file/package.json +20 -19
- package/node_modules/winston-transport/.eslintrc +1 -1
- package/node_modules/winston-transport/.nyc_output/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
- package/node_modules/winston-transport/.nyc_output/processinfo/c3d7ddb9-cc26-466b-a4f6-993ad69e86f6.json +1 -0
- package/node_modules/winston-transport/.nyc_output/processinfo/index.json +1 -1
- package/node_modules/winston-transport/CHANGELOG.md +11 -0
- package/node_modules/winston-transport/dist/index.js +2 -2
- package/node_modules/winston-transport/index.d.ts +2 -0
- package/node_modules/winston-transport/index.js +2 -2
- package/node_modules/winston-transport/node_modules/readable-stream/README.md +106 -0
- package/node_modules/winston-transport/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/winston-transport/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/winston-transport/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_duplex.js +41 -46
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_passthrough.js +1 -11
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_readable.js +271 -263
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_transform.js +18 -42
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/_stream_writable.js +101 -147
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/winston-transport/node_modules/readable-stream/package.json +72 -0
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/readable-browser.js +2 -0
- package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/readable.js +5 -8
- package/node_modules/winston-transport/package.json +16 -14
- package/package.json +6 -6
- package/node_modules/colors/LICENSE +0 -25
- package/node_modules/colors/README.md +0 -221
- package/node_modules/colors/examples/normal-usage.js +0 -82
- package/node_modules/colors/examples/safe-string.js +0 -79
- package/node_modules/colors/index.d.ts +0 -136
- package/node_modules/colors/lib/colors.js +0 -211
- package/node_modules/colors/lib/custom/trap.js +0 -46
- package/node_modules/colors/lib/custom/zalgo.js +0 -110
- package/node_modules/colors/lib/extendStringPrototype.js +0 -110
- package/node_modules/colors/lib/index.js +0 -13
- package/node_modules/colors/lib/maps/america.js +0 -10
- package/node_modules/colors/lib/maps/rainbow.js +0 -12
- package/node_modules/colors/lib/maps/random.js +0 -11
- package/node_modules/colors/lib/maps/zebra.js +0 -5
- package/node_modules/colors/lib/styles.js +0 -95
- package/node_modules/colors/lib/system/has-flag.js +0 -35
- package/node_modules/colors/lib/system/supports-colors.js +0 -151
- package/node_modules/colors/package.json +0 -49
- package/node_modules/colors/safe.d.ts +0 -48
- package/node_modules/colors/safe.js +0 -10
- package/node_modules/colors/themes/generic-logging.js +0 -12
- package/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/core-util-is/README.md +0 -3
- package/node_modules/core-util-is/float.patch +0 -604
- package/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/core-util-is/package.json +0 -36
- package/node_modules/core-util-is/test.js +0 -68
- package/node_modules/cycle/README.md +0 -49
- package/node_modules/cycle/cycle.js +0 -170
- package/node_modules/cycle/package.json +0 -16
- package/node_modules/fast-safe-stringify/.travis.yml +0 -8
- package/node_modules/fast-safe-stringify/CHANGELOG.md +0 -17
- package/node_modules/fast-safe-stringify/LICENSE +0 -23
- package/node_modules/fast-safe-stringify/benchmark.js +0 -137
- package/node_modules/fast-safe-stringify/index.d.ts +0 -8
- package/node_modules/fast-safe-stringify/index.js +0 -161
- package/node_modules/fast-safe-stringify/package.json +0 -50
- package/node_modules/fast-safe-stringify/readme.md +0 -154
- package/node_modules/fast-safe-stringify/test-stable.js +0 -311
- package/node_modules/fast-safe-stringify/test.js +0 -304
- package/node_modules/isarray/.npmignore +0 -1
- package/node_modules/isarray/.travis.yml +0 -4
- package/node_modules/isarray/Makefile +0 -6
- package/node_modules/isarray/README.md +0 -60
- package/node_modules/isarray/component.json +0 -19
- package/node_modules/isarray/index.js +0 -5
- package/node_modules/isarray/package.json +0 -49
- package/node_modules/isarray/test.js +0 -20
- package/node_modules/object-hash/.jshintrc +0 -19
- package/node_modules/object-hash/.travis.yml +0 -35
- package/node_modules/object-hash/bower.json +0 -15
- package/node_modules/object-hash/dist/object_hash.js.map +0 -1
- package/node_modules/object-hash/dist/object_hash_test.js +0 -4737
- package/node_modules/object-hash/gulpfile.js +0 -97
- package/node_modules/object-hash/karma.conf.js +0 -69
- package/node_modules/object-hash/test/blob.js +0 -41
- package/node_modules/object-hash/test/index.js +0 -290
- package/node_modules/object-hash/test/object-classes.js +0 -106
- package/node_modules/object-hash/test/old-crypto.js +0 -60
- package/node_modules/object-hash/test/replacer.js +0 -36
- package/node_modules/object-hash/test/types.js +0 -174
- package/node_modules/object-hash/test/writeToStream.js +0 -27
- package/node_modules/process-nextick-args/index.js +0 -45
- package/node_modules/process-nextick-args/license.md +0 -19
- package/node_modules/process-nextick-args/package.json +0 -29
- package/node_modules/process-nextick-args/readme.md +0 -18
- package/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/readable-stream/README.md +0 -58
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -79
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -74
- package/node_modules/readable-stream/package.json +0 -56
- package/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/winston-compat/.gitattributes +0 -1
- package/node_modules/winston-compat/.node-version +0 -1
- package/node_modules/winston-compat/CHANGELOG.md +0 -17
- package/node_modules/winston-compat/LICENSE +0 -22
- package/node_modules/winston-compat/README.md +0 -2
- package/node_modules/winston-compat/index.js +0 -295
- package/node_modules/winston-compat/lib/transport.js +0 -135
- package/node_modules/winston-compat/node_modules/fecha/CHANGELOG.md +0 -11
- package/node_modules/winston-compat/node_modules/fecha/LICENSE +0 -22
- package/node_modules/winston-compat/node_modules/fecha/README.md +0 -259
- package/node_modules/winston-compat/node_modules/fecha/fecha.d.ts +0 -47
- package/node_modules/winston-compat/node_modules/fecha/fecha.js +0 -334
- package/node_modules/winston-compat/node_modules/fecha/fecha.min.js +0 -1
- package/node_modules/winston-compat/node_modules/fecha/package.json +0 -44
- package/node_modules/winston-compat/node_modules/logform/.babelrc +0 -3
- package/node_modules/winston-compat/node_modules/logform/.eslintrc +0 -7
- package/node_modules/winston-compat/node_modules/logform/.gitattributes +0 -1
- package/node_modules/winston-compat/node_modules/logform/.travis.yml +0 -17
- package/node_modules/winston-compat/node_modules/logform/CHANGELOG.md +0 -103
- package/node_modules/winston-compat/node_modules/logform/LICENSE +0 -21
- package/node_modules/winston-compat/node_modules/logform/README.md +0 -170
- package/node_modules/winston-compat/node_modules/logform/align.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/browser.js +0 -36
- package/node_modules/winston-compat/node_modules/logform/cli.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/colorize.js +0 -118
- package/node_modules/winston-compat/node_modules/logform/combine.js +0 -66
- package/node_modules/winston-compat/node_modules/logform/dist/align.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/dist/browser.js +0 -37
- package/node_modules/winston-compat/node_modules/logform/dist/cli.js +0 -75
- package/node_modules/winston-compat/node_modules/logform/dist/colorize.js +0 -147
- package/node_modules/winston-compat/node_modules/logform/dist/combine.js +0 -66
- package/node_modules/winston-compat/node_modules/logform/dist/format.js +0 -69
- package/node_modules/winston-compat/node_modules/logform/dist/index.js +0 -54
- package/node_modules/winston-compat/node_modules/logform/dist/json.js +0 -27
- package/node_modules/winston-compat/node_modules/logform/dist/label.js +0 -19
- package/node_modules/winston-compat/node_modules/logform/dist/levels.js +0 -15
- package/node_modules/winston-compat/node_modules/logform/dist/logstash.js +0 -32
- package/node_modules/winston-compat/node_modules/logform/dist/metadata.js +0 -63
- package/node_modules/winston-compat/node_modules/logform/dist/ms.js +0 -18
- package/node_modules/winston-compat/node_modules/logform/dist/pad-levels.js +0 -118
- package/node_modules/winston-compat/node_modules/logform/dist/pretty-print.js +0 -20
- package/node_modules/winston-compat/node_modules/logform/dist/printf.js +0 -40
- package/node_modules/winston-compat/node_modules/logform/dist/simple.js +0 -36
- package/node_modules/winston-compat/node_modules/logform/dist/splat.js +0 -147
- package/node_modules/winston-compat/node_modules/logform/dist/timestamp.js +0 -28
- package/node_modules/winston-compat/node_modules/logform/dist/uncolorize.js +0 -31
- package/node_modules/winston-compat/node_modules/logform/examples/combine.js +0 -14
- package/node_modules/winston-compat/node_modules/logform/examples/filter.js +0 -30
- package/node_modules/winston-compat/node_modules/logform/examples/invalid.js +0 -6
- package/node_modules/winston-compat/node_modules/logform/examples/metadata.js +0 -78
- package/node_modules/winston-compat/node_modules/logform/examples/padLevels.js +0 -39
- package/node_modules/winston-compat/node_modules/logform/examples/volume.js +0 -25
- package/node_modules/winston-compat/node_modules/logform/format.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/index.d.ts +0 -53
- package/node_modules/winston-compat/node_modules/logform/index.js +0 -52
- package/node_modules/winston-compat/node_modules/logform/json.js +0 -26
- package/node_modules/winston-compat/node_modules/logform/label.js +0 -19
- package/node_modules/winston-compat/node_modules/logform/levels.js +0 -12
- package/node_modules/winston-compat/node_modules/logform/logstash.js +0 -29
- package/node_modules/winston-compat/node_modules/logform/metadata.js +0 -61
- package/node_modules/winston-compat/node_modules/logform/ms.js +0 -18
- package/node_modules/winston-compat/node_modules/logform/package.json +0 -51
- package/node_modules/winston-compat/node_modules/logform/pad-levels.js +0 -83
- package/node_modules/winston-compat/node_modules/logform/pretty-print.js +0 -16
- package/node_modules/winston-compat/node_modules/logform/printf.js +0 -26
- package/node_modules/winston-compat/node_modules/logform/simple.js +0 -33
- package/node_modules/winston-compat/node_modules/logform/splat.js +0 -125
- package/node_modules/winston-compat/node_modules/logform/timestamp.js +0 -30
- package/node_modules/winston-compat/node_modules/logform/tsconfig.json +0 -22
- package/node_modules/winston-compat/node_modules/logform/uncolorize.js +0 -27
- package/node_modules/winston-compat/package.json +0 -46
- package/node_modules/winston-compat/test/clone.test.js +0 -25
- package/node_modules/winston-compat/test/helpers.js +0 -256
- package/node_modules/winston-compat/test/timestamp.test.js +0 -14
- package/node_modules/winston-compat/test/transports/transport.js +0 -205
- package/node_modules/winston-compat/test/winston-compat.test.js +0 -18
- package/node_modules/winston-daily-rotate-file/.eslintrc.js +0 -11
- package/node_modules/winston-daily-rotate-file/.node-version +0 -1
- package/node_modules/winston-daily-rotate-file/.travis.yml +0 -15
- package/node_modules/winston-daily-rotate-file/node_modules/semver/CHANGELOG.md +0 -70
- package/node_modules/winston-daily-rotate-file/node_modules/semver/LICENSE +0 -15
- package/node_modules/winston-daily-rotate-file/node_modules/semver/README.md +0 -443
- package/node_modules/winston-daily-rotate-file/node_modules/semver/bin/semver.js +0 -174
- package/node_modules/winston-daily-rotate-file/node_modules/semver/package.json +0 -32
- package/node_modules/winston-daily-rotate-file/node_modules/semver/range.bnf +0 -16
- package/node_modules/winston-daily-rotate-file/node_modules/semver/semver.js +0 -1596
- package/node_modules/winston-daily-rotate-file/test/memory-stream.js +0 -38
- package/node_modules/winston-daily-rotate-file/test/random-string.js +0 -31
- package/node_modules/winston-daily-rotate-file/test/transport-tests.js +0 -250
- package/node_modules/winston-transport/.nyc_output/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
- package/node_modules/winston-transport/.nyc_output/processinfo/1c69f3e4-4c25-457d-9df5-dfa761729528.json +0 -1
- package/node_modules/winston-transport/.travis.yml +0 -17
- package/node_modules/winston-transport/tsconfig.json +0 -22
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/CONTRIBUTING.md +0 -0
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/GOVERNANCE.md +0 -0
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/LICENSE +0 -0
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/internal/streams/stream-browser.js +0 -0
- /package/node_modules/{readable-stream → winston-transport/node_modules/readable-stream}/lib/internal/streams/stream.js +0 -0
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
const test = require('tap').test
|
|
2
|
-
const fss = require('./')
|
|
3
|
-
const clone = require('clone')
|
|
4
|
-
const s = JSON.stringify
|
|
5
|
-
|
|
6
|
-
test('circular reference to root', function (assert) {
|
|
7
|
-
const fixture = { name: 'Tywin Lannister' }
|
|
8
|
-
fixture.circle = fixture
|
|
9
|
-
const expected = s(
|
|
10
|
-
{ name: 'Tywin Lannister', circle: '[Circular]' }
|
|
11
|
-
)
|
|
12
|
-
const actual = fss(fixture)
|
|
13
|
-
assert.is(actual, expected)
|
|
14
|
-
assert.end()
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
test('circular getter reference to root', function (assert) {
|
|
18
|
-
const fixture = {
|
|
19
|
-
name: 'Tywin Lannister',
|
|
20
|
-
get circle () {
|
|
21
|
-
return fixture
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
const expected = s(
|
|
25
|
-
{ name: 'Tywin Lannister', circle: '[Circular]' }
|
|
26
|
-
)
|
|
27
|
-
const actual = fss(fixture)
|
|
28
|
-
assert.is(actual, expected)
|
|
29
|
-
assert.end()
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
test('nested circular reference to root', function (assert) {
|
|
33
|
-
const fixture = { name: 'Tywin Lannister' }
|
|
34
|
-
fixture.id = { circle: fixture }
|
|
35
|
-
const expected = s(
|
|
36
|
-
{ name: 'Tywin Lannister', id: { circle: '[Circular]' } }
|
|
37
|
-
)
|
|
38
|
-
const actual = fss(fixture)
|
|
39
|
-
assert.is(actual, expected)
|
|
40
|
-
assert.end()
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
test('child circular reference', function (assert) {
|
|
44
|
-
const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } }
|
|
45
|
-
fixture.child.dinklage = fixture.child
|
|
46
|
-
const expected = s({
|
|
47
|
-
name: 'Tywin Lannister',
|
|
48
|
-
child: {
|
|
49
|
-
name: 'Tyrion Lannister', dinklage: '[Circular]'
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
const actual = fss(fixture)
|
|
53
|
-
assert.is(actual, expected)
|
|
54
|
-
assert.end()
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
test('nested child circular reference', function (assert) {
|
|
58
|
-
const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } }
|
|
59
|
-
fixture.child.actor = { dinklage: fixture.child }
|
|
60
|
-
const expected = s({
|
|
61
|
-
name: 'Tywin Lannister',
|
|
62
|
-
child: {
|
|
63
|
-
name: 'Tyrion Lannister', actor: { dinklage: '[Circular]' }
|
|
64
|
-
}
|
|
65
|
-
})
|
|
66
|
-
const actual = fss(fixture)
|
|
67
|
-
assert.is(actual, expected)
|
|
68
|
-
assert.end()
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
test('circular objects in an array', function (assert) {
|
|
72
|
-
const fixture = { name: 'Tywin Lannister' }
|
|
73
|
-
fixture.hand = [fixture, fixture]
|
|
74
|
-
const expected = s({
|
|
75
|
-
name: 'Tywin Lannister', hand: ['[Circular]', '[Circular]']
|
|
76
|
-
})
|
|
77
|
-
const actual = fss(fixture)
|
|
78
|
-
assert.is(actual, expected)
|
|
79
|
-
assert.end()
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
test('nested circular references in an array', function (assert) {
|
|
83
|
-
const fixture = {
|
|
84
|
-
name: 'Tywin Lannister',
|
|
85
|
-
offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }]
|
|
86
|
-
}
|
|
87
|
-
fixture.offspring[0].dinklage = fixture.offspring[0]
|
|
88
|
-
fixture.offspring[1].headey = fixture.offspring[1]
|
|
89
|
-
|
|
90
|
-
const expected = s({
|
|
91
|
-
name: 'Tywin Lannister',
|
|
92
|
-
offspring: [
|
|
93
|
-
{ name: 'Tyrion Lannister', dinklage: '[Circular]' },
|
|
94
|
-
{ name: 'Cersei Lannister', headey: '[Circular]' }
|
|
95
|
-
]
|
|
96
|
-
})
|
|
97
|
-
const actual = fss(fixture)
|
|
98
|
-
assert.is(actual, expected)
|
|
99
|
-
assert.end()
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
test('circular arrays', function (assert) {
|
|
103
|
-
const fixture = []
|
|
104
|
-
fixture.push(fixture, fixture)
|
|
105
|
-
const expected = s(['[Circular]', '[Circular]'])
|
|
106
|
-
const actual = fss(fixture)
|
|
107
|
-
assert.is(actual, expected)
|
|
108
|
-
assert.end()
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
test('nested circular arrays', function (assert) {
|
|
112
|
-
const fixture = []
|
|
113
|
-
fixture.push(
|
|
114
|
-
{ name: 'Jon Snow', bastards: fixture },
|
|
115
|
-
{ name: 'Ramsay Bolton', bastards: fixture }
|
|
116
|
-
)
|
|
117
|
-
const expected = s([
|
|
118
|
-
{ name: 'Jon Snow', bastards: '[Circular]' },
|
|
119
|
-
{ name: 'Ramsay Bolton', bastards: '[Circular]' }
|
|
120
|
-
])
|
|
121
|
-
const actual = fss(fixture)
|
|
122
|
-
assert.is(actual, expected)
|
|
123
|
-
assert.end()
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
test('repeated non-circular references in objects', function (assert) {
|
|
127
|
-
const daenerys = { name: 'Daenerys Targaryen' }
|
|
128
|
-
const fixture = {
|
|
129
|
-
motherOfDragons: daenerys,
|
|
130
|
-
queenOfMeereen: daenerys
|
|
131
|
-
}
|
|
132
|
-
const expected = s(fixture)
|
|
133
|
-
const actual = fss(fixture)
|
|
134
|
-
assert.is(actual, expected)
|
|
135
|
-
assert.end()
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
test('repeated non-circular references in arrays', function (assert) {
|
|
139
|
-
const daenerys = { name: 'Daenerys Targaryen' }
|
|
140
|
-
const fixture = [daenerys, daenerys]
|
|
141
|
-
const expected = s(fixture)
|
|
142
|
-
const actual = fss(fixture)
|
|
143
|
-
assert.is(actual, expected)
|
|
144
|
-
assert.end()
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
test('double child circular reference', function (assert) {
|
|
148
|
-
// create circular reference
|
|
149
|
-
const child = { name: 'Tyrion Lannister' }
|
|
150
|
-
child.dinklage = child
|
|
151
|
-
|
|
152
|
-
// include it twice in the fixture
|
|
153
|
-
const fixture = { name: 'Tywin Lannister', childA: child, childB: child }
|
|
154
|
-
const cloned = clone(fixture)
|
|
155
|
-
const expected = s({
|
|
156
|
-
name: 'Tywin Lannister',
|
|
157
|
-
childA: {
|
|
158
|
-
name: 'Tyrion Lannister', dinklage: '[Circular]'
|
|
159
|
-
},
|
|
160
|
-
childB: {
|
|
161
|
-
name: 'Tyrion Lannister', dinklage: '[Circular]'
|
|
162
|
-
}
|
|
163
|
-
})
|
|
164
|
-
const actual = fss(fixture)
|
|
165
|
-
assert.is(actual, expected)
|
|
166
|
-
|
|
167
|
-
// check if the fixture has not been modified
|
|
168
|
-
assert.deepEqual(fixture, cloned)
|
|
169
|
-
assert.end()
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
test('child circular reference with toJSON', function (assert) {
|
|
173
|
-
// Create a test object that has an overriden `toJSON` property
|
|
174
|
-
TestObject.prototype.toJSON = function () { return { special: 'case' } }
|
|
175
|
-
function TestObject (content) {}
|
|
176
|
-
|
|
177
|
-
// Creating a simple circular object structure
|
|
178
|
-
const parentObject = {}
|
|
179
|
-
parentObject.childObject = new TestObject()
|
|
180
|
-
parentObject.childObject.parentObject = parentObject
|
|
181
|
-
|
|
182
|
-
// Creating a simple circular object structure
|
|
183
|
-
const otherParentObject = new TestObject()
|
|
184
|
-
otherParentObject.otherChildObject = {}
|
|
185
|
-
otherParentObject.otherChildObject.otherParentObject = otherParentObject
|
|
186
|
-
|
|
187
|
-
// Making sure our original tests work
|
|
188
|
-
assert.deepEqual(parentObject.childObject.parentObject, parentObject)
|
|
189
|
-
assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject)
|
|
190
|
-
|
|
191
|
-
// Should both be idempotent
|
|
192
|
-
assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}')
|
|
193
|
-
assert.equal(fss(otherParentObject), '{"special":"case"}')
|
|
194
|
-
|
|
195
|
-
// Therefore the following assertion should be `true`
|
|
196
|
-
assert.deepEqual(parentObject.childObject.parentObject, parentObject)
|
|
197
|
-
assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject)
|
|
198
|
-
|
|
199
|
-
assert.end()
|
|
200
|
-
})
|
|
201
|
-
|
|
202
|
-
test('null object', function (assert) {
|
|
203
|
-
const expected = s(null)
|
|
204
|
-
const actual = fss(null)
|
|
205
|
-
assert.is(actual, expected)
|
|
206
|
-
assert.end()
|
|
207
|
-
})
|
|
208
|
-
|
|
209
|
-
test('null property', function (assert) {
|
|
210
|
-
const expected = s({ f: null })
|
|
211
|
-
const actual = fss({ f: null })
|
|
212
|
-
assert.is(actual, expected)
|
|
213
|
-
assert.end()
|
|
214
|
-
})
|
|
215
|
-
|
|
216
|
-
test('nested child circular reference in toJSON', function (assert) {
|
|
217
|
-
const circle = { some: 'data' }
|
|
218
|
-
circle.circle = circle
|
|
219
|
-
const a = {
|
|
220
|
-
b: {
|
|
221
|
-
toJSON: function () {
|
|
222
|
-
a.b = 2
|
|
223
|
-
return '[Redacted]'
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
baz: {
|
|
227
|
-
circle,
|
|
228
|
-
toJSON: function () {
|
|
229
|
-
a.baz = circle
|
|
230
|
-
return '[Redacted]'
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
const o = {
|
|
235
|
-
a,
|
|
236
|
-
bar: a
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
const expected = s({
|
|
240
|
-
a: {
|
|
241
|
-
b: '[Redacted]',
|
|
242
|
-
baz: '[Redacted]'
|
|
243
|
-
},
|
|
244
|
-
bar: {
|
|
245
|
-
b: 2,
|
|
246
|
-
baz: {
|
|
247
|
-
some: 'data',
|
|
248
|
-
circle: '[Circular]'
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
})
|
|
252
|
-
const actual = fss(o)
|
|
253
|
-
assert.is(actual, expected)
|
|
254
|
-
assert.end()
|
|
255
|
-
})
|
|
256
|
-
|
|
257
|
-
test('circular getters are restored when stringified', function (assert) {
|
|
258
|
-
const fixture = {
|
|
259
|
-
name: 'Tywin Lannister',
|
|
260
|
-
get circle () {
|
|
261
|
-
return fixture
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
fss(fixture)
|
|
265
|
-
|
|
266
|
-
assert.is(fixture.circle, fixture)
|
|
267
|
-
assert.end()
|
|
268
|
-
})
|
|
269
|
-
|
|
270
|
-
test('non-configurable circular getters use a replacer instead of markers', function (assert) {
|
|
271
|
-
const fixture = { name: 'Tywin Lannister' }
|
|
272
|
-
Object.defineProperty(fixture, 'circle', {
|
|
273
|
-
configurable: false,
|
|
274
|
-
get: function () { return fixture },
|
|
275
|
-
enumerable: true
|
|
276
|
-
})
|
|
277
|
-
|
|
278
|
-
fss(fixture)
|
|
279
|
-
|
|
280
|
-
assert.is(fixture.circle, fixture)
|
|
281
|
-
assert.end()
|
|
282
|
-
})
|
|
283
|
-
|
|
284
|
-
test('getter child circular reference are replaced instead of marked', function (assert) {
|
|
285
|
-
const fixture = {
|
|
286
|
-
name: 'Tywin Lannister',
|
|
287
|
-
child: {
|
|
288
|
-
name: 'Tyrion Lannister',
|
|
289
|
-
get dinklage () { return fixture.child }
|
|
290
|
-
},
|
|
291
|
-
get self () { return fixture }
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
const expected = s({
|
|
295
|
-
name: 'Tywin Lannister',
|
|
296
|
-
child: {
|
|
297
|
-
name: 'Tyrion Lannister', dinklage: '[Circular]'
|
|
298
|
-
},
|
|
299
|
-
self: '[Circular]'
|
|
300
|
-
})
|
|
301
|
-
const actual = fss(fixture)
|
|
302
|
-
assert.is(actual, expected)
|
|
303
|
-
assert.end()
|
|
304
|
-
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node_modules
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# isarray
|
|
3
|
-
|
|
4
|
-
`Array#isArray` for older browsers.
|
|
5
|
-
|
|
6
|
-
[](http://travis-ci.org/juliangruber/isarray)
|
|
7
|
-
[](https://www.npmjs.org/package/isarray)
|
|
8
|
-
|
|
9
|
-
[
|
|
10
|
-
](https://ci.testling.com/juliangruber/isarray)
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
var isArray = require('isarray');
|
|
16
|
-
|
|
17
|
-
console.log(isArray([])); // => true
|
|
18
|
-
console.log(isArray({})); // => false
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
With [npm](http://npmjs.org) do
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
$ npm install isarray
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Then bundle for the browser with
|
|
30
|
-
[browserify](https://github.com/substack/browserify).
|
|
31
|
-
|
|
32
|
-
With [component](http://component.io) do
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
$ component install juliangruber/isarray
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## License
|
|
39
|
-
|
|
40
|
-
(MIT)
|
|
41
|
-
|
|
42
|
-
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
|
43
|
-
|
|
44
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
45
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
46
|
-
the Software without restriction, including without limitation the rights to
|
|
47
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
48
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
|
49
|
-
so, subject to the following conditions:
|
|
50
|
-
|
|
51
|
-
The above copyright notice and this permission notice shall be included in all
|
|
52
|
-
copies or substantial portions of the Software.
|
|
53
|
-
|
|
54
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
55
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
56
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
57
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
58
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
59
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
60
|
-
SOFTWARE.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name" : "isarray",
|
|
3
|
-
"description" : "Array#isArray for older browsers",
|
|
4
|
-
"version" : "0.0.1",
|
|
5
|
-
"repository" : "juliangruber/isarray",
|
|
6
|
-
"homepage": "https://github.com/juliangruber/isarray",
|
|
7
|
-
"main" : "index.js",
|
|
8
|
-
"scripts" : [
|
|
9
|
-
"index.js"
|
|
10
|
-
],
|
|
11
|
-
"dependencies" : {},
|
|
12
|
-
"keywords": ["browser","isarray","array"],
|
|
13
|
-
"author": {
|
|
14
|
-
"name": "Julian Gruber",
|
|
15
|
-
"email": "mail@juliangruber.com",
|
|
16
|
-
"url": "http://juliangruber.com"
|
|
17
|
-
},
|
|
18
|
-
"license": "MIT"
|
|
19
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "isarray",
|
|
3
|
-
"description": "Array#isArray for older browsers",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "git://github.com/juliangruber/isarray.git"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/juliangruber/isarray",
|
|
10
|
-
"main": "index.js",
|
|
11
|
-
"dependencies": {},
|
|
12
|
-
"devDependencies": {
|
|
13
|
-
"tape": "~2.13.4"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"browser",
|
|
17
|
-
"isarray",
|
|
18
|
-
"array"
|
|
19
|
-
],
|
|
20
|
-
"author": {
|
|
21
|
-
"name": "Julian Gruber",
|
|
22
|
-
"email": "mail@juliangruber.com",
|
|
23
|
-
"url": "http://juliangruber.com"
|
|
24
|
-
},
|
|
25
|
-
"license": "MIT",
|
|
26
|
-
"testling": {
|
|
27
|
-
"files": "test.js",
|
|
28
|
-
"browsers": [
|
|
29
|
-
"ie/8..latest",
|
|
30
|
-
"firefox/17..latest",
|
|
31
|
-
"firefox/nightly",
|
|
32
|
-
"chrome/22..latest",
|
|
33
|
-
"chrome/canary",
|
|
34
|
-
"opera/12..latest",
|
|
35
|
-
"opera/next",
|
|
36
|
-
"safari/5.1..latest",
|
|
37
|
-
"ipad/6.0..latest",
|
|
38
|
-
"iphone/6.0..latest",
|
|
39
|
-
"android-browser/4.2..latest"
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"test": "tape test.js"
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
,"_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
|
|
47
|
-
,"_integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
|
48
|
-
,"_from": "isarray@1.0.0"
|
|
49
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
var isArray = require('./');
|
|
2
|
-
var test = require('tape');
|
|
3
|
-
|
|
4
|
-
test('is array', function(t){
|
|
5
|
-
t.ok(isArray([]));
|
|
6
|
-
t.notOk(isArray({}));
|
|
7
|
-
t.notOk(isArray(null));
|
|
8
|
-
t.notOk(isArray(false));
|
|
9
|
-
|
|
10
|
-
var obj = {};
|
|
11
|
-
obj[0] = true;
|
|
12
|
-
t.notOk(isArray(obj));
|
|
13
|
-
|
|
14
|
-
var arr = [];
|
|
15
|
-
arr.foo = 'bar';
|
|
16
|
-
t.ok(isArray(arr));
|
|
17
|
-
|
|
18
|
-
t.end();
|
|
19
|
-
});
|
|
20
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"curly": true,
|
|
3
|
-
"expr": true,
|
|
4
|
-
"eqeqeq": true,
|
|
5
|
-
"immed": true,
|
|
6
|
-
"newcap": true,
|
|
7
|
-
"noarg": true,
|
|
8
|
-
"sub": true,
|
|
9
|
-
"undef": true,
|
|
10
|
-
"unused": true,
|
|
11
|
-
"boss": true,
|
|
12
|
-
"eqnull": true,
|
|
13
|
-
"node": true,
|
|
14
|
-
"globals": {
|
|
15
|
-
"require": true,
|
|
16
|
-
"exports": true,
|
|
17
|
-
"console": true
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
language: node_js
|
|
2
|
-
node_js:
|
|
3
|
-
- "0.10"
|
|
4
|
-
- "0.12"
|
|
5
|
-
- "4"
|
|
6
|
-
- "6"
|
|
7
|
-
- "8"
|
|
8
|
-
sudo: false
|
|
9
|
-
# use g++-4.8 for karma
|
|
10
|
-
cache:
|
|
11
|
-
- apt
|
|
12
|
-
addons:
|
|
13
|
-
apt:
|
|
14
|
-
sources:
|
|
15
|
-
- ubuntu-toolchain-r-test
|
|
16
|
-
packages:
|
|
17
|
-
- g++-4.8
|
|
18
|
-
- libstdc++-4.8-dev
|
|
19
|
-
firefox: "39.0"
|
|
20
|
-
before_install:
|
|
21
|
-
- export CXX="g++-4.8" CC="gcc-4.8"
|
|
22
|
-
- export "PATH=./node_modules/.bin:$PATH"
|
|
23
|
-
install: npm install
|
|
24
|
-
# start X server for firefox
|
|
25
|
-
before_script:
|
|
26
|
-
- "export DISPLAY=:99.0"
|
|
27
|
-
- "sh -e /etc/init.d/xvfb start"
|
|
28
|
-
- sleep 3 # give xvfb some time to start
|
|
29
|
-
script:
|
|
30
|
-
- gulp lint
|
|
31
|
-
- gulp dist
|
|
32
|
-
- gulp test karma
|
|
33
|
-
after_success:
|
|
34
|
-
- gulp coveralls
|
|
35
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "object-hash",
|
|
3
|
-
"homepage": "https://github.com/puleos/object-hash",
|
|
4
|
-
"description": "Generate hashes from javascript objects in node and the browser",
|
|
5
|
-
"main": "dist/object_hash.js",
|
|
6
|
-
"author": "Scott Puleo <puleos@gmail.com>",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"ignore": [
|
|
9
|
-
"**/.*",
|
|
10
|
-
"node_modules",
|
|
11
|
-
"bower_components",
|
|
12
|
-
"test",
|
|
13
|
-
"tests"
|
|
14
|
-
]
|
|
15
|
-
}
|