porffor 0.1.0 → 0.2.0-77e30e8
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/README.md +184 -204
- package/compiler/2c.js +377 -0
- package/compiler/builtins/base64.js +91 -91
- package/compiler/builtins.js +19 -13
- package/compiler/codeGen.js +1313 -418
- package/compiler/decompile.js +35 -9
- package/compiler/embedding.js +9 -5
- package/compiler/encoding.js +8 -2
- package/compiler/index.js +55 -17
- package/compiler/log.js +15 -0
- package/compiler/opt.js +357 -258
- package/compiler/parse.js +24 -1
- package/compiler/prototype.js +263 -56
- package/compiler/sections.js +51 -8
- package/compiler/wasmSpec.js +3 -0
- package/compiler/wrap.js +21 -7
- package/package.json +6 -1
- package/porf.cmd +1 -1
- package/rhemyn/README.md +37 -0
- package/rhemyn/compile.js +214 -0
- package/rhemyn/parse.js +321 -0
- package/rhemyn/test/parse.js +59 -0
- package/runner/index.js +54 -31
- package/runner/info.js +37 -2
- package/runner/profile.js +1 -2
- package/runner/repl.js +13 -11
- package/runner/results.json +1 -0
- package/runner/transform.js +15 -36
- package/runner/version.js +10 -0
- package/CNAME +0 -1
- package/index.html +0 -1264
- package/logo.png +0 -0
- package/sw.js +0 -26
- package/test/array_1.js +0 -8
- package/test/array_push.js +0 -8
- package/test/assignop_1.js +0 -15
- package/test/bitwise_1.js +0 -6
- package/test/bool_1.js +0 -3
- package/test/boolean.js +0 -6
- package/test/break_1.js +0 -6
- package/test/break_2.js +0 -12
- package/test/conditional_1.js +0 -3
- package/test/conditional_2.js +0 -4
- package/test/console_1.js +0 -2
- package/test/continue_1.js +0 -6
- package/test/continue_2.js +0 -10
- package/test/empty.js +0 -1
- package/test/ending_exp_1.js +0 -2
- package/test/ending_exp_2.js +0 -6
- package/test/eq_1.js +0 -4
- package/test/eq_2.js +0 -4
- package/test/eq_3.js +0 -5
- package/test/export_1.js +0 -9
- package/test/factorial.js +0 -3
- package/test/fibonacci.js +0 -16
- package/test/float_div0.js +0 -2
- package/test/float_frac.js +0 -2
- package/test/float_isfinite.js +0 -29
- package/test/float_isinteger.js +0 -13
- package/test/float_isnan.js +0 -20
- package/test/float_issafeinteger.js +0 -11
- package/test/float_large.js +0 -2
- package/test/float_math_funcs.js +0 -24
- package/test/float_math_random.js +0 -6
- package/test/float_nan.js +0 -3
- package/test/float_number_values.js +0 -12
- package/test/for_1.js +0 -4
- package/test/for_2.js +0 -4
- package/test/func_1.js +0 -16
- package/test/func_2.js +0 -6
- package/test/func_3.js +0 -10
- package/test/global_1.js +0 -8
- package/test/global_2.js +0 -10
- package/test/if_1.js +0 -6
- package/test/if_2.js +0 -9
- package/test/if_3.js +0 -7
- package/test/iife_1.js +0 -8
- package/test/iife_2.js +0 -8
- package/test/index.js +0 -93
- package/test/int_number_values.js +0 -6
- package/test/logic_1.js +0 -7
- package/test/logic_2.js +0 -7
- package/test/math_1.js +0 -6
- package/test/math_2.js +0 -12
- package/test/math_3.js +0 -6
- package/test/number_func.js +0 -4
- package/test/return_1.js +0 -8
- package/test/return_2.js +0 -11
- package/test/tailcall_1.js +0 -10
- package/test/throw_1.js +0 -2
- package/test/throw_2.js +0 -4
- package/test/throw_3.js +0 -2
- package/test/throw_4.js +0 -3
- package/test/try_1.js +0 -7
- package/test/unary_1.js +0 -4
- package/test/unary_2.js +0 -5
- package/test/unary_3.js +0 -6
- package/test/unary_4.js +0 -12
- package/test/unary_5.js +0 -8
- package/test/undefined_1.js +0 -8
- package/test/undefined_2.js +0 -10
- package/test/updateexp_1.js +0 -9
- package/test/vars_1.js +0 -5
- package/test/vars_2.js +0 -9
- package/test/while_1.js +0 -6
- package/test262/compare.js +0 -30
- package/test262/index.js +0 -314
- package/test262/node_modules/.bin/esparse +0 -12
- package/test262/node_modules/.bin/esparse.cmd +0 -17
- package/test262/node_modules/.bin/esparse.ps1 +0 -28
- package/test262/node_modules/.bin/esvalidate +0 -12
- package/test262/node_modules/.bin/esvalidate.cmd +0 -17
- package/test262/node_modules/.bin/esvalidate.ps1 +0 -28
- package/test262/node_modules/.bin/js-yaml +0 -12
- package/test262/node_modules/.bin/js-yaml.cmd +0 -17
- package/test262/node_modules/.bin/js-yaml.ps1 +0 -28
- package/test262/node_modules/.package-lock.json +0 -0
- package/test262/node_modules/@nodelib/fs.scandir/LICENSE +0 -21
- package/test262/node_modules/@nodelib/fs.scandir/README.md +0 -171
- package/test262/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +0 -20
- package/test262/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +0 -19
- package/test262/node_modules/@nodelib/fs.scandir/out/constants.d.ts +0 -4
- package/test262/node_modules/@nodelib/fs.scandir/out/constants.js +0 -17
- package/test262/node_modules/@nodelib/fs.scandir/out/index.d.ts +0 -12
- package/test262/node_modules/@nodelib/fs.scandir/out/index.js +0 -26
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +0 -7
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/async.js +0 -104
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +0 -1
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/common.js +0 -13
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +0 -5
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/sync.js +0 -54
- package/test262/node_modules/@nodelib/fs.scandir/out/settings.d.ts +0 -20
- package/test262/node_modules/@nodelib/fs.scandir/out/settings.js +0 -24
- package/test262/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +0 -20
- package/test262/node_modules/@nodelib/fs.scandir/out/types/index.js +0 -2
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +0 -2
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/fs.js +0 -19
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +0 -2
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/index.js +0 -5
- package/test262/node_modules/@nodelib/fs.scandir/package.json +0 -44
- package/test262/node_modules/@nodelib/fs.stat/LICENSE +0 -21
- package/test262/node_modules/@nodelib/fs.stat/README.md +0 -126
- package/test262/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +0 -13
- package/test262/node_modules/@nodelib/fs.stat/out/adapters/fs.js +0 -17
- package/test262/node_modules/@nodelib/fs.stat/out/index.d.ts +0 -12
- package/test262/node_modules/@nodelib/fs.stat/out/index.js +0 -26
- package/test262/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +0 -4
- package/test262/node_modules/@nodelib/fs.stat/out/providers/async.js +0 -36
- package/test262/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +0 -3
- package/test262/node_modules/@nodelib/fs.stat/out/providers/sync.js +0 -23
- package/test262/node_modules/@nodelib/fs.stat/out/settings.d.ts +0 -16
- package/test262/node_modules/@nodelib/fs.stat/out/settings.js +0 -16
- package/test262/node_modules/@nodelib/fs.stat/out/types/index.d.ts +0 -4
- package/test262/node_modules/@nodelib/fs.stat/out/types/index.js +0 -2
- package/test262/node_modules/@nodelib/fs.stat/package.json +0 -37
- package/test262/node_modules/@nodelib/fs.walk/LICENSE +0 -21
- package/test262/node_modules/@nodelib/fs.walk/README.md +0 -215
- package/test262/node_modules/@nodelib/fs.walk/out/index.d.ts +0 -14
- package/test262/node_modules/@nodelib/fs.walk/out/index.js +0 -34
- package/test262/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +0 -12
- package/test262/node_modules/@nodelib/fs.walk/out/providers/async.js +0 -30
- package/test262/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +0 -4
- package/test262/node_modules/@nodelib/fs.walk/out/providers/index.js +0 -9
- package/test262/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +0 -12
- package/test262/node_modules/@nodelib/fs.walk/out/providers/stream.js +0 -34
- package/test262/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +0 -10
- package/test262/node_modules/@nodelib/fs.walk/out/providers/sync.js +0 -14
- package/test262/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +0 -30
- package/test262/node_modules/@nodelib/fs.walk/out/readers/async.js +0 -97
- package/test262/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +0 -7
- package/test262/node_modules/@nodelib/fs.walk/out/readers/common.js +0 -31
- package/test262/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +0 -6
- package/test262/node_modules/@nodelib/fs.walk/out/readers/reader.js +0 -11
- package/test262/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +0 -15
- package/test262/node_modules/@nodelib/fs.walk/out/readers/sync.js +0 -59
- package/test262/node_modules/@nodelib/fs.walk/out/settings.d.ts +0 -30
- package/test262/node_modules/@nodelib/fs.walk/out/settings.js +0 -26
- package/test262/node_modules/@nodelib/fs.walk/out/types/index.d.ts +0 -8
- package/test262/node_modules/@nodelib/fs.walk/out/types/index.js +0 -2
- package/test262/node_modules/@nodelib/fs.walk/package.json +0 -44
- package/test262/node_modules/argparse/CHANGELOG.md +0 -185
- package/test262/node_modules/argparse/LICENSE +0 -21
- package/test262/node_modules/argparse/README.md +0 -257
- package/test262/node_modules/argparse/index.js +0 -3
- package/test262/node_modules/argparse/lib/action/append/constant.js +0 -47
- package/test262/node_modules/argparse/lib/action/append.js +0 -53
- package/test262/node_modules/argparse/lib/action/count.js +0 -40
- package/test262/node_modules/argparse/lib/action/help.js +0 -47
- package/test262/node_modules/argparse/lib/action/store/constant.js +0 -43
- package/test262/node_modules/argparse/lib/action/store/false.js +0 -27
- package/test262/node_modules/argparse/lib/action/store/true.js +0 -26
- package/test262/node_modules/argparse/lib/action/store.js +0 -50
- package/test262/node_modules/argparse/lib/action/subparsers.js +0 -149
- package/test262/node_modules/argparse/lib/action/version.js +0 -47
- package/test262/node_modules/argparse/lib/action.js +0 -146
- package/test262/node_modules/argparse/lib/action_container.js +0 -482
- package/test262/node_modules/argparse/lib/argparse.js +0 -14
- package/test262/node_modules/argparse/lib/argument/error.js +0 -50
- package/test262/node_modules/argparse/lib/argument/exclusive.js +0 -54
- package/test262/node_modules/argparse/lib/argument/group.js +0 -75
- package/test262/node_modules/argparse/lib/argument_parser.js +0 -1161
- package/test262/node_modules/argparse/lib/const.js +0 -21
- package/test262/node_modules/argparse/lib/help/added_formatters.js +0 -87
- package/test262/node_modules/argparse/lib/help/formatter.js +0 -795
- package/test262/node_modules/argparse/lib/namespace.js +0 -76
- package/test262/node_modules/argparse/lib/utils.js +0 -57
- package/test262/node_modules/argparse/package.json +0 -34
- package/test262/node_modules/braces/CHANGELOG.md +0 -184
- package/test262/node_modules/braces/LICENSE +0 -21
- package/test262/node_modules/braces/README.md +0 -593
- package/test262/node_modules/braces/index.js +0 -170
- package/test262/node_modules/braces/lib/compile.js +0 -57
- package/test262/node_modules/braces/lib/constants.js +0 -57
- package/test262/node_modules/braces/lib/expand.js +0 -113
- package/test262/node_modules/braces/lib/parse.js +0 -333
- package/test262/node_modules/braces/lib/stringify.js +0 -32
- package/test262/node_modules/braces/lib/utils.js +0 -112
- package/test262/node_modules/braces/package.json +0 -77
- package/test262/node_modules/esprima/ChangeLog +0 -235
- package/test262/node_modules/esprima/LICENSE.BSD +0 -21
- package/test262/node_modules/esprima/README.md +0 -46
- package/test262/node_modules/esprima/bin/esparse.js +0 -139
- package/test262/node_modules/esprima/bin/esvalidate.js +0 -236
- package/test262/node_modules/esprima/dist/esprima.js +0 -6709
- package/test262/node_modules/esprima/package.json +0 -112
- package/test262/node_modules/fast-glob/LICENSE +0 -21
- package/test262/node_modules/fast-glob/README.md +0 -859
- package/test262/node_modules/fast-glob/out/index.d.ts +0 -40
- package/test262/node_modules/fast-glob/out/index.js +0 -102
- package/test262/node_modules/fast-glob/out/managers/tasks.d.ts +0 -22
- package/test262/node_modules/fast-glob/out/managers/tasks.js +0 -110
- package/test262/node_modules/fast-glob/out/providers/async.d.ts +0 -9
- package/test262/node_modules/fast-glob/out/providers/async.js +0 -23
- package/test262/node_modules/fast-glob/out/providers/filters/deep.d.ts +0 -16
- package/test262/node_modules/fast-glob/out/providers/filters/deep.js +0 -62
- package/test262/node_modules/fast-glob/out/providers/filters/entry.d.ts +0 -16
- package/test262/node_modules/fast-glob/out/providers/filters/entry.js +0 -63
- package/test262/node_modules/fast-glob/out/providers/filters/error.d.ts +0 -8
- package/test262/node_modules/fast-glob/out/providers/filters/error.js +0 -15
- package/test262/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +0 -33
- package/test262/node_modules/fast-glob/out/providers/matchers/matcher.js +0 -45
- package/test262/node_modules/fast-glob/out/providers/matchers/partial.d.ts +0 -4
- package/test262/node_modules/fast-glob/out/providers/matchers/partial.js +0 -38
- package/test262/node_modules/fast-glob/out/providers/provider.d.ts +0 -19
- package/test262/node_modules/fast-glob/out/providers/provider.js +0 -48
- package/test262/node_modules/fast-glob/out/providers/stream.d.ts +0 -11
- package/test262/node_modules/fast-glob/out/providers/stream.js +0 -31
- package/test262/node_modules/fast-glob/out/providers/sync.d.ts +0 -9
- package/test262/node_modules/fast-glob/out/providers/sync.js +0 -23
- package/test262/node_modules/fast-glob/out/providers/transformers/entry.d.ts +0 -8
- package/test262/node_modules/fast-glob/out/providers/transformers/entry.js +0 -26
- package/test262/node_modules/fast-glob/out/readers/async.d.ts +0 -10
- package/test262/node_modules/fast-glob/out/readers/async.js +0 -35
- package/test262/node_modules/fast-glob/out/readers/reader.d.ts +0 -15
- package/test262/node_modules/fast-glob/out/readers/reader.js +0 -33
- package/test262/node_modules/fast-glob/out/readers/stream.d.ts +0 -14
- package/test262/node_modules/fast-glob/out/readers/stream.js +0 -55
- package/test262/node_modules/fast-glob/out/readers/sync.d.ts +0 -12
- package/test262/node_modules/fast-glob/out/readers/sync.js +0 -43
- package/test262/node_modules/fast-glob/out/settings.d.ts +0 -164
- package/test262/node_modules/fast-glob/out/settings.js +0 -57
- package/test262/node_modules/fast-glob/out/types/index.d.ts +0 -31
- package/test262/node_modules/fast-glob/out/types/index.js +0 -2
- package/test262/node_modules/fast-glob/out/utils/array.d.ts +0 -2
- package/test262/node_modules/fast-glob/out/utils/array.js +0 -22
- package/test262/node_modules/fast-glob/out/utils/errno.d.ts +0 -2
- package/test262/node_modules/fast-glob/out/utils/errno.js +0 -7
- package/test262/node_modules/fast-glob/out/utils/fs.d.ts +0 -4
- package/test262/node_modules/fast-glob/out/utils/fs.js +0 -19
- package/test262/node_modules/fast-glob/out/utils/index.d.ts +0 -8
- package/test262/node_modules/fast-glob/out/utils/index.js +0 -17
- package/test262/node_modules/fast-glob/out/utils/path.d.ts +0 -13
- package/test262/node_modules/fast-glob/out/utils/path.js +0 -68
- package/test262/node_modules/fast-glob/out/utils/pattern.d.ts +0 -47
- package/test262/node_modules/fast-glob/out/utils/pattern.js +0 -188
- package/test262/node_modules/fast-glob/out/utils/stream.d.ts +0 -4
- package/test262/node_modules/fast-glob/out/utils/stream.js +0 -17
- package/test262/node_modules/fast-glob/out/utils/string.d.ts +0 -2
- package/test262/node_modules/fast-glob/out/utils/string.js +0 -11
- package/test262/node_modules/fast-glob/package.json +0 -81
- package/test262/node_modules/fastq/.github/dependabot.yml +0 -11
- package/test262/node_modules/fastq/.github/workflows/ci.yml +0 -50
- package/test262/node_modules/fastq/LICENSE +0 -13
- package/test262/node_modules/fastq/README.md +0 -309
- package/test262/node_modules/fastq/bench.js +0 -66
- package/test262/node_modules/fastq/example.js +0 -14
- package/test262/node_modules/fastq/example.mjs +0 -11
- package/test262/node_modules/fastq/index.d.ts +0 -37
- package/test262/node_modules/fastq/package.json +0 -52
- package/test262/node_modules/fastq/queue.js +0 -289
- package/test262/node_modules/fastq/test/example.ts +0 -81
- package/test262/node_modules/fastq/test/promise.js +0 -248
- package/test262/node_modules/fastq/test/test.js +0 -566
- package/test262/node_modules/fastq/test/tsconfig.json +0 -11
- package/test262/node_modules/fill-range/LICENSE +0 -21
- package/test262/node_modules/fill-range/README.md +0 -237
- package/test262/node_modules/fill-range/index.js +0 -249
- package/test262/node_modules/fill-range/package.json +0 -69
- package/test262/node_modules/glob-parent/CHANGELOG.md +0 -110
- package/test262/node_modules/glob-parent/LICENSE +0 -15
- package/test262/node_modules/glob-parent/README.md +0 -137
- package/test262/node_modules/glob-parent/index.js +0 -42
- package/test262/node_modules/glob-parent/package.json +0 -48
- package/test262/node_modules/graceful-fs/LICENSE +0 -15
- package/test262/node_modules/graceful-fs/README.md +0 -143
- package/test262/node_modules/graceful-fs/clone.js +0 -23
- package/test262/node_modules/graceful-fs/graceful-fs.js +0 -448
- package/test262/node_modules/graceful-fs/legacy-streams.js +0 -118
- package/test262/node_modules/graceful-fs/package.json +0 -53
- package/test262/node_modules/graceful-fs/polyfills.js +0 -355
- package/test262/node_modules/is-extglob/LICENSE +0 -21
- package/test262/node_modules/is-extglob/README.md +0 -107
- package/test262/node_modules/is-extglob/index.js +0 -20
- package/test262/node_modules/is-extglob/package.json +0 -69
- package/test262/node_modules/is-glob/LICENSE +0 -21
- package/test262/node_modules/is-glob/README.md +0 -206
- package/test262/node_modules/is-glob/index.js +0 -150
- package/test262/node_modules/is-glob/package.json +0 -81
- package/test262/node_modules/is-number/LICENSE +0 -21
- package/test262/node_modules/is-number/README.md +0 -187
- package/test262/node_modules/is-number/index.js +0 -18
- package/test262/node_modules/is-number/package.json +0 -82
- package/test262/node_modules/js-yaml/CHANGELOG.md +0 -557
- package/test262/node_modules/js-yaml/LICENSE +0 -21
- package/test262/node_modules/js-yaml/README.md +0 -299
- package/test262/node_modules/js-yaml/bin/js-yaml.js +0 -132
- package/test262/node_modules/js-yaml/dist/js-yaml.js +0 -3989
- package/test262/node_modules/js-yaml/dist/js-yaml.min.js +0 -1
- package/test262/node_modules/js-yaml/index.js +0 -7
- package/test262/node_modules/js-yaml/lib/js-yaml/common.js +0 -59
- package/test262/node_modules/js-yaml/lib/js-yaml/dumper.js +0 -850
- package/test262/node_modules/js-yaml/lib/js-yaml/exception.js +0 -43
- package/test262/node_modules/js-yaml/lib/js-yaml/loader.js +0 -1644
- package/test262/node_modules/js-yaml/lib/js-yaml/mark.js +0 -76
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/core.js +0 -18
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +0 -25
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +0 -28
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +0 -17
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/json.js +0 -25
- package/test262/node_modules/js-yaml/lib/js-yaml/schema.js +0 -108
- package/test262/node_modules/js-yaml/lib/js-yaml/type/binary.js +0 -138
- package/test262/node_modules/js-yaml/lib/js-yaml/type/bool.js +0 -35
- package/test262/node_modules/js-yaml/lib/js-yaml/type/float.js +0 -116
- package/test262/node_modules/js-yaml/lib/js-yaml/type/int.js +0 -173
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/function.js +0 -93
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +0 -60
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +0 -28
- package/test262/node_modules/js-yaml/lib/js-yaml/type/map.js +0 -8
- package/test262/node_modules/js-yaml/lib/js-yaml/type/merge.js +0 -12
- package/test262/node_modules/js-yaml/lib/js-yaml/type/null.js +0 -34
- package/test262/node_modules/js-yaml/lib/js-yaml/type/omap.js +0 -44
- package/test262/node_modules/js-yaml/lib/js-yaml/type/pairs.js +0 -53
- package/test262/node_modules/js-yaml/lib/js-yaml/type/seq.js +0 -8
- package/test262/node_modules/js-yaml/lib/js-yaml/type/set.js +0 -29
- package/test262/node_modules/js-yaml/lib/js-yaml/type/str.js +0 -8
- package/test262/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +0 -88
- package/test262/node_modules/js-yaml/lib/js-yaml/type.js +0 -61
- package/test262/node_modules/js-yaml/lib/js-yaml.js +0 -39
- package/test262/node_modules/js-yaml/package.json +0 -49
- package/test262/node_modules/klaw/CHANGELOG.md +0 -62
- package/test262/node_modules/klaw/LICENSE +0 -15
- package/test262/node_modules/klaw/README.md +0 -252
- package/test262/node_modules/klaw/package.json +0 -40
- package/test262/node_modules/klaw/src/index.js +0 -56
- package/test262/node_modules/merge2/LICENSE +0 -21
- package/test262/node_modules/merge2/README.md +0 -144
- package/test262/node_modules/merge2/index.js +0 -144
- package/test262/node_modules/merge2/package.json +0 -43
- package/test262/node_modules/micromatch/LICENSE +0 -21
- package/test262/node_modules/micromatch/README.md +0 -1011
- package/test262/node_modules/micromatch/index.js +0 -467
- package/test262/node_modules/micromatch/package.json +0 -119
- package/test262/node_modules/picomatch/CHANGELOG.md +0 -136
- package/test262/node_modules/picomatch/LICENSE +0 -21
- package/test262/node_modules/picomatch/README.md +0 -708
- package/test262/node_modules/picomatch/index.js +0 -3
- package/test262/node_modules/picomatch/lib/constants.js +0 -179
- package/test262/node_modules/picomatch/lib/parse.js +0 -1091
- package/test262/node_modules/picomatch/lib/picomatch.js +0 -342
- package/test262/node_modules/picomatch/lib/scan.js +0 -391
- package/test262/node_modules/picomatch/lib/utils.js +0 -64
- package/test262/node_modules/picomatch/package.json +0 -81
- package/test262/node_modules/queue-microtask/LICENSE +0 -20
- package/test262/node_modules/queue-microtask/README.md +0 -90
- package/test262/node_modules/queue-microtask/index.d.ts +0 -2
- package/test262/node_modules/queue-microtask/index.js +0 -9
- package/test262/node_modules/queue-microtask/package.json +0 -55
- package/test262/node_modules/reusify/.coveralls.yml +0 -1
- package/test262/node_modules/reusify/.travis.yml +0 -28
- package/test262/node_modules/reusify/LICENSE +0 -22
- package/test262/node_modules/reusify/README.md +0 -145
- package/test262/node_modules/reusify/benchmarks/createNoCodeFunction.js +0 -30
- package/test262/node_modules/reusify/benchmarks/fib.js +0 -13
- package/test262/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +0 -38
- package/test262/node_modules/reusify/package.json +0 -45
- package/test262/node_modules/reusify/reusify.js +0 -33
- package/test262/node_modules/reusify/test.js +0 -66
- package/test262/node_modules/run-parallel/LICENSE +0 -20
- package/test262/node_modules/run-parallel/README.md +0 -85
- package/test262/node_modules/run-parallel/index.js +0 -51
- package/test262/node_modules/run-parallel/package.json +0 -58
- package/test262/node_modules/sprintf-js/LICENSE +0 -24
- package/test262/node_modules/sprintf-js/README.md +0 -88
- package/test262/node_modules/sprintf-js/bower.json +0 -14
- package/test262/node_modules/sprintf-js/demo/angular.html +0 -20
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.js +0 -4
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +0 -1
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.map +0 -1
- package/test262/node_modules/sprintf-js/dist/sprintf.min.js +0 -4
- package/test262/node_modules/sprintf-js/dist/sprintf.min.js.map +0 -1
- package/test262/node_modules/sprintf-js/dist/sprintf.min.map +0 -1
- package/test262/node_modules/sprintf-js/gruntfile.js +0 -36
- package/test262/node_modules/sprintf-js/package.json +0 -22
- package/test262/node_modules/sprintf-js/src/angular-sprintf.js +0 -18
- package/test262/node_modules/sprintf-js/src/sprintf.js +0 -208
- package/test262/node_modules/sprintf-js/test/test.js +0 -82
- package/test262/node_modules/test262-stream/.jshintignore +0 -2
- package/test262/node_modules/test262-stream/.jshintrc +0 -6
- package/test262/node_modules/test262-stream/.travis.yml +0 -5
- package/test262/node_modules/test262-stream/CONTRIBUTING.md +0 -37
- package/test262/node_modules/test262-stream/LICENSE-MICROSOFT.txt +0 -27
- package/test262/node_modules/test262-stream/LICENSE.txt +0 -27
- package/test262/node_modules/test262-stream/README.md +0 -71
- package/test262/node_modules/test262-stream/lib/builder.js +0 -46
- package/test262/node_modules/test262-stream/lib/compile.js +0 -24
- package/test262/node_modules/test262-stream/lib/create-scenarios.js +0 -29
- package/test262/node_modules/test262-stream/lib/index.js +0 -187
- package/test262/node_modules/test262-stream/lib/test-file.js +0 -150
- package/test262/node_modules/test262-stream/package.json +0 -26
- package/test262/node_modules/test262-stream/test/collateral/invalid-missing-harness/fake-test262/test/a-test-file.js +0 -16
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/package.json +0 -3
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/package.json +0 -3
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/asyncNegative_default.js +0 -49
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/asyncNegative_strict_mode.js +0 -50
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/async_default.js +0 -48
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/async_strict_mode.js +0 -49
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/bothStrict_default.js +0 -46
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/bothStrict_strict_mode.js +0 -47
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/error_default.js +0 -39
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/error_strict_mode.js +0 -40
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/module_default.js +0 -37
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/module_strict_mode.js +0 -38
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/negative-empty_default.js +0 -37
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/negative-empty_strict_mode.js +0 -38
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/noStrict_default.js +0 -36
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/rawNoStrict_default.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/rawStrict_default.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/strict_strict_mode.js +0 -41
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/asyncNegative_default.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/asyncNegative_strict_mode.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/async_default.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/async_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/bothStrict_default.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/bothStrict_strict_mode.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/error_default.json +0 -19
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/error_strict_mode.json +0 -19
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/module_default.json +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/module_strict_mode.json +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/negative-empty_default.json +0 -19
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/negative-empty_strict_mode.json +0 -19
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/noStrict_default.json +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/rawNoStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/rawStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/strict_strict_mode.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/async.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/asyncNegative.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/error.js +0 -8
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/module.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/module_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/negative-empty.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/noStrict.js +0 -5
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/rawNoStrict.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/rawStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-content/test/bothStrict_default.js +0 -46
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-content/test/bothStrict_strict_mode.js +0 -47
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_default.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_strict_mode.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-0_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-1_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-2_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-3_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-4_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-5_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-6_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-7_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-8_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-9_FIXTURE.txt +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/raw_default.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_default.js +0 -38
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_strict_mode.js +0 -39
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/raw_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_default.json +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_strict_mode.json +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/raw.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/runtime.js +0 -7
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_default.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_strict_mode.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/async_default.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/async_strict_mode.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_default.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_strict_mode.js +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/error_default.js +0 -8
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/error_strict_mode.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/module_default.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/module_strict_mode.js +0 -7
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_default.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_strict_mode.js +0 -7
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/noStrict_default.js +0 -5
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/rawNoStrict_default.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/rawStrict_default.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/strict_strict_mode.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_default.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/async_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/async_strict_mode.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_strict_mode.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/error_default.json +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/error_strict_mode.json +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/module_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/module_strict_mode.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_default.json +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_strict_mode.json +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/noStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/rawNoStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/rawStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/strict_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/async.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/asyncNegative.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/error.js +0 -8
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/module.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/module_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/negative-empty.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/noStrict.js +0 -5
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/rawNoStrict.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/rawStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/expected-content/test/strict_strict_mode.js +0 -41
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/expected-metadata/test/strict_strict_mode.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/package.json +0 -3
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/expected-content/test/strict_strict_mode.js +0 -41
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/expected-metadata/test/strict_strict_mode.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/package.json +0 -3
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_default.js +0 -44
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_strict_mode.js +0 -45
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-and-license-on-same-line_default.js +0 -20
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-multiline-block_default.js +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls_default.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-and-license-on-same-line_default.js +0 -20
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-multiline-block_default.js +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps_default.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/rawWithLicense_default.js +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw_default.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_default.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_strict_mode.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-and-license-on-same-line_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-multiline-block_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-and-license-on-same-line_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-multiline-block_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/rawWithLicense_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/missing-raw-flag.js +0 -13
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-and-license-on-same-line.js +0 -20
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-multiline-block.js +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-and-license-on-same-line.js +0 -20
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-multiline-block.js +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/rawWithLicense.js +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/doneprintHandle.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/sta.js +0 -13
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/async_default.js +0 -52
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/async_strict_mode.js +0 -53
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/bothStrict_default.js +0 -47
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/bothStrict_strict_mode.js +0 -48
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/async_default.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/async_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_default.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_strict_mode.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/test/async.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_default.js +0 -49
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_strict_mode.js +0 -50
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/async_default.js +0 -48
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/async_strict_mode.js +0 -49
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/bothStrict_default.js +0 -46
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/bothStrict_strict_mode.js +0 -47
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/strict/no/noStrict_default.js +0 -36
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/strict/no/rawNoStrict_default.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_default.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_strict_mode.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/async_default.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/async_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_default.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_strict_mode.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/strict/no/noStrict_default.json +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/strict/no/rawNoStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/async/async.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/async/asyncNegative.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/error.js +0 -8
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/negative-empty.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/no/noStrict.js +0 -5
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/no/rawNoStrict.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/rawStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/test.js +0 -319
- package/test262/node_modules/to-regex-range/LICENSE +0 -21
- package/test262/node_modules/to-regex-range/README.md +0 -305
- package/test262/node_modules/to-regex-range/index.js +0 -288
- package/test262/node_modules/to-regex-range/package.json +0 -88
- package/test262/package-lock.json +0 -279
- package/test262/package.json +0 -6
- package/test262/prelude.js +0 -75
- package/test262/results.json +0 -1
@@ -1,448 +0,0 @@
|
|
1
|
-
var fs = require('fs')
|
2
|
-
var polyfills = require('./polyfills.js')
|
3
|
-
var legacy = require('./legacy-streams.js')
|
4
|
-
var clone = require('./clone.js')
|
5
|
-
|
6
|
-
var util = require('util')
|
7
|
-
|
8
|
-
/* istanbul ignore next - node 0.x polyfill */
|
9
|
-
var gracefulQueue
|
10
|
-
var previousSymbol
|
11
|
-
|
12
|
-
/* istanbul ignore else - node 0.x polyfill */
|
13
|
-
if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
|
14
|
-
gracefulQueue = Symbol.for('graceful-fs.queue')
|
15
|
-
// This is used in testing by future versions
|
16
|
-
previousSymbol = Symbol.for('graceful-fs.previous')
|
17
|
-
} else {
|
18
|
-
gracefulQueue = '___graceful-fs.queue'
|
19
|
-
previousSymbol = '___graceful-fs.previous'
|
20
|
-
}
|
21
|
-
|
22
|
-
function noop () {}
|
23
|
-
|
24
|
-
function publishQueue(context, queue) {
|
25
|
-
Object.defineProperty(context, gracefulQueue, {
|
26
|
-
get: function() {
|
27
|
-
return queue
|
28
|
-
}
|
29
|
-
})
|
30
|
-
}
|
31
|
-
|
32
|
-
var debug = noop
|
33
|
-
if (util.debuglog)
|
34
|
-
debug = util.debuglog('gfs4')
|
35
|
-
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
|
36
|
-
debug = function() {
|
37
|
-
var m = util.format.apply(util, arguments)
|
38
|
-
m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
|
39
|
-
console.error(m)
|
40
|
-
}
|
41
|
-
|
42
|
-
// Once time initialization
|
43
|
-
if (!fs[gracefulQueue]) {
|
44
|
-
// This queue can be shared by multiple loaded instances
|
45
|
-
var queue = global[gracefulQueue] || []
|
46
|
-
publishQueue(fs, queue)
|
47
|
-
|
48
|
-
// Patch fs.close/closeSync to shared queue version, because we need
|
49
|
-
// to retry() whenever a close happens *anywhere* in the program.
|
50
|
-
// This is essential when multiple graceful-fs instances are
|
51
|
-
// in play at the same time.
|
52
|
-
fs.close = (function (fs$close) {
|
53
|
-
function close (fd, cb) {
|
54
|
-
return fs$close.call(fs, fd, function (err) {
|
55
|
-
// This function uses the graceful-fs shared queue
|
56
|
-
if (!err) {
|
57
|
-
resetQueue()
|
58
|
-
}
|
59
|
-
|
60
|
-
if (typeof cb === 'function')
|
61
|
-
cb.apply(this, arguments)
|
62
|
-
})
|
63
|
-
}
|
64
|
-
|
65
|
-
Object.defineProperty(close, previousSymbol, {
|
66
|
-
value: fs$close
|
67
|
-
})
|
68
|
-
return close
|
69
|
-
})(fs.close)
|
70
|
-
|
71
|
-
fs.closeSync = (function (fs$closeSync) {
|
72
|
-
function closeSync (fd) {
|
73
|
-
// This function uses the graceful-fs shared queue
|
74
|
-
fs$closeSync.apply(fs, arguments)
|
75
|
-
resetQueue()
|
76
|
-
}
|
77
|
-
|
78
|
-
Object.defineProperty(closeSync, previousSymbol, {
|
79
|
-
value: fs$closeSync
|
80
|
-
})
|
81
|
-
return closeSync
|
82
|
-
})(fs.closeSync)
|
83
|
-
|
84
|
-
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
|
85
|
-
process.on('exit', function() {
|
86
|
-
debug(fs[gracefulQueue])
|
87
|
-
require('assert').equal(fs[gracefulQueue].length, 0)
|
88
|
-
})
|
89
|
-
}
|
90
|
-
}
|
91
|
-
|
92
|
-
if (!global[gracefulQueue]) {
|
93
|
-
publishQueue(global, fs[gracefulQueue]);
|
94
|
-
}
|
95
|
-
|
96
|
-
module.exports = patch(clone(fs))
|
97
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
|
98
|
-
module.exports = patch(fs)
|
99
|
-
fs.__patched = true;
|
100
|
-
}
|
101
|
-
|
102
|
-
function patch (fs) {
|
103
|
-
// Everything that references the open() function needs to be in here
|
104
|
-
polyfills(fs)
|
105
|
-
fs.gracefulify = patch
|
106
|
-
|
107
|
-
fs.createReadStream = createReadStream
|
108
|
-
fs.createWriteStream = createWriteStream
|
109
|
-
var fs$readFile = fs.readFile
|
110
|
-
fs.readFile = readFile
|
111
|
-
function readFile (path, options, cb) {
|
112
|
-
if (typeof options === 'function')
|
113
|
-
cb = options, options = null
|
114
|
-
|
115
|
-
return go$readFile(path, options, cb)
|
116
|
-
|
117
|
-
function go$readFile (path, options, cb, startTime) {
|
118
|
-
return fs$readFile(path, options, function (err) {
|
119
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
120
|
-
enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])
|
121
|
-
else {
|
122
|
-
if (typeof cb === 'function')
|
123
|
-
cb.apply(this, arguments)
|
124
|
-
}
|
125
|
-
})
|
126
|
-
}
|
127
|
-
}
|
128
|
-
|
129
|
-
var fs$writeFile = fs.writeFile
|
130
|
-
fs.writeFile = writeFile
|
131
|
-
function writeFile (path, data, options, cb) {
|
132
|
-
if (typeof options === 'function')
|
133
|
-
cb = options, options = null
|
134
|
-
|
135
|
-
return go$writeFile(path, data, options, cb)
|
136
|
-
|
137
|
-
function go$writeFile (path, data, options, cb, startTime) {
|
138
|
-
return fs$writeFile(path, data, options, function (err) {
|
139
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
140
|
-
enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
|
141
|
-
else {
|
142
|
-
if (typeof cb === 'function')
|
143
|
-
cb.apply(this, arguments)
|
144
|
-
}
|
145
|
-
})
|
146
|
-
}
|
147
|
-
}
|
148
|
-
|
149
|
-
var fs$appendFile = fs.appendFile
|
150
|
-
if (fs$appendFile)
|
151
|
-
fs.appendFile = appendFile
|
152
|
-
function appendFile (path, data, options, cb) {
|
153
|
-
if (typeof options === 'function')
|
154
|
-
cb = options, options = null
|
155
|
-
|
156
|
-
return go$appendFile(path, data, options, cb)
|
157
|
-
|
158
|
-
function go$appendFile (path, data, options, cb, startTime) {
|
159
|
-
return fs$appendFile(path, data, options, function (err) {
|
160
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
161
|
-
enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
|
162
|
-
else {
|
163
|
-
if (typeof cb === 'function')
|
164
|
-
cb.apply(this, arguments)
|
165
|
-
}
|
166
|
-
})
|
167
|
-
}
|
168
|
-
}
|
169
|
-
|
170
|
-
var fs$copyFile = fs.copyFile
|
171
|
-
if (fs$copyFile)
|
172
|
-
fs.copyFile = copyFile
|
173
|
-
function copyFile (src, dest, flags, cb) {
|
174
|
-
if (typeof flags === 'function') {
|
175
|
-
cb = flags
|
176
|
-
flags = 0
|
177
|
-
}
|
178
|
-
return go$copyFile(src, dest, flags, cb)
|
179
|
-
|
180
|
-
function go$copyFile (src, dest, flags, cb, startTime) {
|
181
|
-
return fs$copyFile(src, dest, flags, function (err) {
|
182
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
183
|
-
enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])
|
184
|
-
else {
|
185
|
-
if (typeof cb === 'function')
|
186
|
-
cb.apply(this, arguments)
|
187
|
-
}
|
188
|
-
})
|
189
|
-
}
|
190
|
-
}
|
191
|
-
|
192
|
-
var fs$readdir = fs.readdir
|
193
|
-
fs.readdir = readdir
|
194
|
-
var noReaddirOptionVersions = /^v[0-5]\./
|
195
|
-
function readdir (path, options, cb) {
|
196
|
-
if (typeof options === 'function')
|
197
|
-
cb = options, options = null
|
198
|
-
|
199
|
-
var go$readdir = noReaddirOptionVersions.test(process.version)
|
200
|
-
? function go$readdir (path, options, cb, startTime) {
|
201
|
-
return fs$readdir(path, fs$readdirCallback(
|
202
|
-
path, options, cb, startTime
|
203
|
-
))
|
204
|
-
}
|
205
|
-
: function go$readdir (path, options, cb, startTime) {
|
206
|
-
return fs$readdir(path, options, fs$readdirCallback(
|
207
|
-
path, options, cb, startTime
|
208
|
-
))
|
209
|
-
}
|
210
|
-
|
211
|
-
return go$readdir(path, options, cb)
|
212
|
-
|
213
|
-
function fs$readdirCallback (path, options, cb, startTime) {
|
214
|
-
return function (err, files) {
|
215
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
216
|
-
enqueue([
|
217
|
-
go$readdir,
|
218
|
-
[path, options, cb],
|
219
|
-
err,
|
220
|
-
startTime || Date.now(),
|
221
|
-
Date.now()
|
222
|
-
])
|
223
|
-
else {
|
224
|
-
if (files && files.sort)
|
225
|
-
files.sort()
|
226
|
-
|
227
|
-
if (typeof cb === 'function')
|
228
|
-
cb.call(this, err, files)
|
229
|
-
}
|
230
|
-
}
|
231
|
-
}
|
232
|
-
}
|
233
|
-
|
234
|
-
if (process.version.substr(0, 4) === 'v0.8') {
|
235
|
-
var legStreams = legacy(fs)
|
236
|
-
ReadStream = legStreams.ReadStream
|
237
|
-
WriteStream = legStreams.WriteStream
|
238
|
-
}
|
239
|
-
|
240
|
-
var fs$ReadStream = fs.ReadStream
|
241
|
-
if (fs$ReadStream) {
|
242
|
-
ReadStream.prototype = Object.create(fs$ReadStream.prototype)
|
243
|
-
ReadStream.prototype.open = ReadStream$open
|
244
|
-
}
|
245
|
-
|
246
|
-
var fs$WriteStream = fs.WriteStream
|
247
|
-
if (fs$WriteStream) {
|
248
|
-
WriteStream.prototype = Object.create(fs$WriteStream.prototype)
|
249
|
-
WriteStream.prototype.open = WriteStream$open
|
250
|
-
}
|
251
|
-
|
252
|
-
Object.defineProperty(fs, 'ReadStream', {
|
253
|
-
get: function () {
|
254
|
-
return ReadStream
|
255
|
-
},
|
256
|
-
set: function (val) {
|
257
|
-
ReadStream = val
|
258
|
-
},
|
259
|
-
enumerable: true,
|
260
|
-
configurable: true
|
261
|
-
})
|
262
|
-
Object.defineProperty(fs, 'WriteStream', {
|
263
|
-
get: function () {
|
264
|
-
return WriteStream
|
265
|
-
},
|
266
|
-
set: function (val) {
|
267
|
-
WriteStream = val
|
268
|
-
},
|
269
|
-
enumerable: true,
|
270
|
-
configurable: true
|
271
|
-
})
|
272
|
-
|
273
|
-
// legacy names
|
274
|
-
var FileReadStream = ReadStream
|
275
|
-
Object.defineProperty(fs, 'FileReadStream', {
|
276
|
-
get: function () {
|
277
|
-
return FileReadStream
|
278
|
-
},
|
279
|
-
set: function (val) {
|
280
|
-
FileReadStream = val
|
281
|
-
},
|
282
|
-
enumerable: true,
|
283
|
-
configurable: true
|
284
|
-
})
|
285
|
-
var FileWriteStream = WriteStream
|
286
|
-
Object.defineProperty(fs, 'FileWriteStream', {
|
287
|
-
get: function () {
|
288
|
-
return FileWriteStream
|
289
|
-
},
|
290
|
-
set: function (val) {
|
291
|
-
FileWriteStream = val
|
292
|
-
},
|
293
|
-
enumerable: true,
|
294
|
-
configurable: true
|
295
|
-
})
|
296
|
-
|
297
|
-
function ReadStream (path, options) {
|
298
|
-
if (this instanceof ReadStream)
|
299
|
-
return fs$ReadStream.apply(this, arguments), this
|
300
|
-
else
|
301
|
-
return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
|
302
|
-
}
|
303
|
-
|
304
|
-
function ReadStream$open () {
|
305
|
-
var that = this
|
306
|
-
open(that.path, that.flags, that.mode, function (err, fd) {
|
307
|
-
if (err) {
|
308
|
-
if (that.autoClose)
|
309
|
-
that.destroy()
|
310
|
-
|
311
|
-
that.emit('error', err)
|
312
|
-
} else {
|
313
|
-
that.fd = fd
|
314
|
-
that.emit('open', fd)
|
315
|
-
that.read()
|
316
|
-
}
|
317
|
-
})
|
318
|
-
}
|
319
|
-
|
320
|
-
function WriteStream (path, options) {
|
321
|
-
if (this instanceof WriteStream)
|
322
|
-
return fs$WriteStream.apply(this, arguments), this
|
323
|
-
else
|
324
|
-
return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
|
325
|
-
}
|
326
|
-
|
327
|
-
function WriteStream$open () {
|
328
|
-
var that = this
|
329
|
-
open(that.path, that.flags, that.mode, function (err, fd) {
|
330
|
-
if (err) {
|
331
|
-
that.destroy()
|
332
|
-
that.emit('error', err)
|
333
|
-
} else {
|
334
|
-
that.fd = fd
|
335
|
-
that.emit('open', fd)
|
336
|
-
}
|
337
|
-
})
|
338
|
-
}
|
339
|
-
|
340
|
-
function createReadStream (path, options) {
|
341
|
-
return new fs.ReadStream(path, options)
|
342
|
-
}
|
343
|
-
|
344
|
-
function createWriteStream (path, options) {
|
345
|
-
return new fs.WriteStream(path, options)
|
346
|
-
}
|
347
|
-
|
348
|
-
var fs$open = fs.open
|
349
|
-
fs.open = open
|
350
|
-
function open (path, flags, mode, cb) {
|
351
|
-
if (typeof mode === 'function')
|
352
|
-
cb = mode, mode = null
|
353
|
-
|
354
|
-
return go$open(path, flags, mode, cb)
|
355
|
-
|
356
|
-
function go$open (path, flags, mode, cb, startTime) {
|
357
|
-
return fs$open(path, flags, mode, function (err, fd) {
|
358
|
-
if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
|
359
|
-
enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])
|
360
|
-
else {
|
361
|
-
if (typeof cb === 'function')
|
362
|
-
cb.apply(this, arguments)
|
363
|
-
}
|
364
|
-
})
|
365
|
-
}
|
366
|
-
}
|
367
|
-
|
368
|
-
return fs
|
369
|
-
}
|
370
|
-
|
371
|
-
function enqueue (elem) {
|
372
|
-
debug('ENQUEUE', elem[0].name, elem[1])
|
373
|
-
fs[gracefulQueue].push(elem)
|
374
|
-
retry()
|
375
|
-
}
|
376
|
-
|
377
|
-
// keep track of the timeout between retry() calls
|
378
|
-
var retryTimer
|
379
|
-
|
380
|
-
// reset the startTime and lastTime to now
|
381
|
-
// this resets the start of the 60 second overall timeout as well as the
|
382
|
-
// delay between attempts so that we'll retry these jobs sooner
|
383
|
-
function resetQueue () {
|
384
|
-
var now = Date.now()
|
385
|
-
for (var i = 0; i < fs[gracefulQueue].length; ++i) {
|
386
|
-
// entries that are only a length of 2 are from an older version, don't
|
387
|
-
// bother modifying those since they'll be retried anyway.
|
388
|
-
if (fs[gracefulQueue][i].length > 2) {
|
389
|
-
fs[gracefulQueue][i][3] = now // startTime
|
390
|
-
fs[gracefulQueue][i][4] = now // lastTime
|
391
|
-
}
|
392
|
-
}
|
393
|
-
// call retry to make sure we're actively processing the queue
|
394
|
-
retry()
|
395
|
-
}
|
396
|
-
|
397
|
-
function retry () {
|
398
|
-
// clear the timer and remove it to help prevent unintended concurrency
|
399
|
-
clearTimeout(retryTimer)
|
400
|
-
retryTimer = undefined
|
401
|
-
|
402
|
-
if (fs[gracefulQueue].length === 0)
|
403
|
-
return
|
404
|
-
|
405
|
-
var elem = fs[gracefulQueue].shift()
|
406
|
-
var fn = elem[0]
|
407
|
-
var args = elem[1]
|
408
|
-
// these items may be unset if they were added by an older graceful-fs
|
409
|
-
var err = elem[2]
|
410
|
-
var startTime = elem[3]
|
411
|
-
var lastTime = elem[4]
|
412
|
-
|
413
|
-
// if we don't have a startTime we have no way of knowing if we've waited
|
414
|
-
// long enough, so go ahead and retry this item now
|
415
|
-
if (startTime === undefined) {
|
416
|
-
debug('RETRY', fn.name, args)
|
417
|
-
fn.apply(null, args)
|
418
|
-
} else if (Date.now() - startTime >= 60000) {
|
419
|
-
// it's been more than 60 seconds total, bail now
|
420
|
-
debug('TIMEOUT', fn.name, args)
|
421
|
-
var cb = args.pop()
|
422
|
-
if (typeof cb === 'function')
|
423
|
-
cb.call(null, err)
|
424
|
-
} else {
|
425
|
-
// the amount of time between the last attempt and right now
|
426
|
-
var sinceAttempt = Date.now() - lastTime
|
427
|
-
// the amount of time between when we first tried, and when we last tried
|
428
|
-
// rounded up to at least 1
|
429
|
-
var sinceStart = Math.max(lastTime - startTime, 1)
|
430
|
-
// backoff. wait longer than the total time we've been retrying, but only
|
431
|
-
// up to a maximum of 100ms
|
432
|
-
var desiredDelay = Math.min(sinceStart * 1.2, 100)
|
433
|
-
// it's been long enough since the last retry, do it again
|
434
|
-
if (sinceAttempt >= desiredDelay) {
|
435
|
-
debug('RETRY', fn.name, args)
|
436
|
-
fn.apply(null, args.concat([startTime]))
|
437
|
-
} else {
|
438
|
-
// if we can't do this job yet, push it to the end of the queue
|
439
|
-
// and let the next iteration check again
|
440
|
-
fs[gracefulQueue].push(elem)
|
441
|
-
}
|
442
|
-
}
|
443
|
-
|
444
|
-
// schedule our next run if one isn't already scheduled
|
445
|
-
if (retryTimer === undefined) {
|
446
|
-
retryTimer = setTimeout(retry, 0)
|
447
|
-
}
|
448
|
-
}
|
@@ -1,118 +0,0 @@
|
|
1
|
-
var Stream = require('stream').Stream
|
2
|
-
|
3
|
-
module.exports = legacy
|
4
|
-
|
5
|
-
function legacy (fs) {
|
6
|
-
return {
|
7
|
-
ReadStream: ReadStream,
|
8
|
-
WriteStream: WriteStream
|
9
|
-
}
|
10
|
-
|
11
|
-
function ReadStream (path, options) {
|
12
|
-
if (!(this instanceof ReadStream)) return new ReadStream(path, options);
|
13
|
-
|
14
|
-
Stream.call(this);
|
15
|
-
|
16
|
-
var self = this;
|
17
|
-
|
18
|
-
this.path = path;
|
19
|
-
this.fd = null;
|
20
|
-
this.readable = true;
|
21
|
-
this.paused = false;
|
22
|
-
|
23
|
-
this.flags = 'r';
|
24
|
-
this.mode = 438; /*=0666*/
|
25
|
-
this.bufferSize = 64 * 1024;
|
26
|
-
|
27
|
-
options = options || {};
|
28
|
-
|
29
|
-
// Mixin options into this
|
30
|
-
var keys = Object.keys(options);
|
31
|
-
for (var index = 0, length = keys.length; index < length; index++) {
|
32
|
-
var key = keys[index];
|
33
|
-
this[key] = options[key];
|
34
|
-
}
|
35
|
-
|
36
|
-
if (this.encoding) this.setEncoding(this.encoding);
|
37
|
-
|
38
|
-
if (this.start !== undefined) {
|
39
|
-
if ('number' !== typeof this.start) {
|
40
|
-
throw TypeError('start must be a Number');
|
41
|
-
}
|
42
|
-
if (this.end === undefined) {
|
43
|
-
this.end = Infinity;
|
44
|
-
} else if ('number' !== typeof this.end) {
|
45
|
-
throw TypeError('end must be a Number');
|
46
|
-
}
|
47
|
-
|
48
|
-
if (this.start > this.end) {
|
49
|
-
throw new Error('start must be <= end');
|
50
|
-
}
|
51
|
-
|
52
|
-
this.pos = this.start;
|
53
|
-
}
|
54
|
-
|
55
|
-
if (this.fd !== null) {
|
56
|
-
process.nextTick(function() {
|
57
|
-
self._read();
|
58
|
-
});
|
59
|
-
return;
|
60
|
-
}
|
61
|
-
|
62
|
-
fs.open(this.path, this.flags, this.mode, function (err, fd) {
|
63
|
-
if (err) {
|
64
|
-
self.emit('error', err);
|
65
|
-
self.readable = false;
|
66
|
-
return;
|
67
|
-
}
|
68
|
-
|
69
|
-
self.fd = fd;
|
70
|
-
self.emit('open', fd);
|
71
|
-
self._read();
|
72
|
-
})
|
73
|
-
}
|
74
|
-
|
75
|
-
function WriteStream (path, options) {
|
76
|
-
if (!(this instanceof WriteStream)) return new WriteStream(path, options);
|
77
|
-
|
78
|
-
Stream.call(this);
|
79
|
-
|
80
|
-
this.path = path;
|
81
|
-
this.fd = null;
|
82
|
-
this.writable = true;
|
83
|
-
|
84
|
-
this.flags = 'w';
|
85
|
-
this.encoding = 'binary';
|
86
|
-
this.mode = 438; /*=0666*/
|
87
|
-
this.bytesWritten = 0;
|
88
|
-
|
89
|
-
options = options || {};
|
90
|
-
|
91
|
-
// Mixin options into this
|
92
|
-
var keys = Object.keys(options);
|
93
|
-
for (var index = 0, length = keys.length; index < length; index++) {
|
94
|
-
var key = keys[index];
|
95
|
-
this[key] = options[key];
|
96
|
-
}
|
97
|
-
|
98
|
-
if (this.start !== undefined) {
|
99
|
-
if ('number' !== typeof this.start) {
|
100
|
-
throw TypeError('start must be a Number');
|
101
|
-
}
|
102
|
-
if (this.start < 0) {
|
103
|
-
throw new Error('start must be >= zero');
|
104
|
-
}
|
105
|
-
|
106
|
-
this.pos = this.start;
|
107
|
-
}
|
108
|
-
|
109
|
-
this.busy = false;
|
110
|
-
this._queue = [];
|
111
|
-
|
112
|
-
if (this.fd === null) {
|
113
|
-
this._open = fs.open;
|
114
|
-
this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
|
115
|
-
this.flush();
|
116
|
-
}
|
117
|
-
}
|
118
|
-
}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "graceful-fs",
|
3
|
-
"description": "A drop-in replacement for fs, making various improvements.",
|
4
|
-
"version": "4.2.11",
|
5
|
-
"repository": {
|
6
|
-
"type": "git",
|
7
|
-
"url": "https://github.com/isaacs/node-graceful-fs"
|
8
|
-
},
|
9
|
-
"main": "graceful-fs.js",
|
10
|
-
"directories": {
|
11
|
-
"test": "test"
|
12
|
-
},
|
13
|
-
"scripts": {
|
14
|
-
"preversion": "npm test",
|
15
|
-
"postversion": "npm publish",
|
16
|
-
"postpublish": "git push origin --follow-tags",
|
17
|
-
"test": "nyc --silent node test.js | tap -c -",
|
18
|
-
"posttest": "nyc report"
|
19
|
-
},
|
20
|
-
"keywords": [
|
21
|
-
"fs",
|
22
|
-
"module",
|
23
|
-
"reading",
|
24
|
-
"retry",
|
25
|
-
"retries",
|
26
|
-
"queue",
|
27
|
-
"error",
|
28
|
-
"errors",
|
29
|
-
"handling",
|
30
|
-
"EMFILE",
|
31
|
-
"EAGAIN",
|
32
|
-
"EINVAL",
|
33
|
-
"EPERM",
|
34
|
-
"EACCESS"
|
35
|
-
],
|
36
|
-
"license": "ISC",
|
37
|
-
"devDependencies": {
|
38
|
-
"import-fresh": "^2.0.0",
|
39
|
-
"mkdirp": "^0.5.0",
|
40
|
-
"rimraf": "^2.2.8",
|
41
|
-
"tap": "^16.3.4"
|
42
|
-
},
|
43
|
-
"files": [
|
44
|
-
"fs.js",
|
45
|
-
"graceful-fs.js",
|
46
|
-
"legacy-streams.js",
|
47
|
-
"polyfills.js",
|
48
|
-
"clone.js"
|
49
|
-
],
|
50
|
-
"tap": {
|
51
|
-
"reporter": "classic"
|
52
|
-
}
|
53
|
-
}
|