porffor 0.1.0
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/CNAME +1 -0
- package/LICENSE +21 -0
- package/README.md +275 -0
- package/compiler/builtins/base64.js +92 -0
- package/compiler/builtins.js +770 -0
- package/compiler/codeGen.js +2027 -0
- package/compiler/decompile.js +102 -0
- package/compiler/embedding.js +19 -0
- package/compiler/encoding.js +217 -0
- package/compiler/expression.js +70 -0
- package/compiler/index.js +67 -0
- package/compiler/opt.js +436 -0
- package/compiler/parse.js +8 -0
- package/compiler/prototype.js +272 -0
- package/compiler/sections.js +154 -0
- package/compiler/wasmSpec.js +200 -0
- package/compiler/wrap.js +119 -0
- package/index.html +1264 -0
- package/logo.png +0 -0
- package/package.json +23 -0
- package/porf.cmd +2 -0
- package/runner/compare.js +35 -0
- package/runner/index.js +32 -0
- package/runner/info.js +54 -0
- package/runner/profile.js +47 -0
- package/runner/repl.js +99 -0
- package/runner/sizes.js +38 -0
- package/runner/transform.js +36 -0
- package/sw.js +26 -0
- package/test/array_1.js +8 -0
- package/test/array_push.js +8 -0
- package/test/assignop_1.js +15 -0
- package/test/bitwise_1.js +6 -0
- package/test/bool_1.js +3 -0
- package/test/boolean.js +6 -0
- package/test/break_1.js +6 -0
- package/test/break_2.js +12 -0
- package/test/conditional_1.js +3 -0
- package/test/conditional_2.js +4 -0
- package/test/console_1.js +2 -0
- package/test/continue_1.js +6 -0
- package/test/continue_2.js +10 -0
- package/test/empty.js +1 -0
- package/test/ending_exp_1.js +2 -0
- package/test/ending_exp_2.js +6 -0
- package/test/eq_1.js +4 -0
- package/test/eq_2.js +4 -0
- package/test/eq_3.js +5 -0
- package/test/export_1.js +9 -0
- package/test/factorial.js +3 -0
- package/test/fibonacci.js +16 -0
- package/test/float_div0.js +2 -0
- package/test/float_frac.js +2 -0
- package/test/float_isfinite.js +29 -0
- package/test/float_isinteger.js +13 -0
- package/test/float_isnan.js +20 -0
- package/test/float_issafeinteger.js +11 -0
- package/test/float_large.js +2 -0
- package/test/float_math_funcs.js +24 -0
- package/test/float_math_random.js +6 -0
- package/test/float_nan.js +3 -0
- package/test/float_number_values.js +12 -0
- package/test/for_1.js +4 -0
- package/test/for_2.js +4 -0
- package/test/func_1.js +16 -0
- package/test/func_2.js +6 -0
- package/test/func_3.js +10 -0
- package/test/global_1.js +8 -0
- package/test/global_2.js +10 -0
- package/test/if_1.js +6 -0
- package/test/if_2.js +9 -0
- package/test/if_3.js +7 -0
- package/test/iife_1.js +8 -0
- package/test/iife_2.js +8 -0
- package/test/index.js +93 -0
- package/test/int_number_values.js +6 -0
- package/test/logic_1.js +7 -0
- package/test/logic_2.js +7 -0
- package/test/math_1.js +6 -0
- package/test/math_2.js +12 -0
- package/test/math_3.js +6 -0
- package/test/number_func.js +4 -0
- package/test/return_1.js +8 -0
- package/test/return_2.js +11 -0
- package/test/tailcall_1.js +10 -0
- package/test/throw_1.js +2 -0
- package/test/throw_2.js +4 -0
- package/test/throw_3.js +2 -0
- package/test/throw_4.js +3 -0
- package/test/try_1.js +7 -0
- package/test/unary_1.js +4 -0
- package/test/unary_2.js +5 -0
- package/test/unary_3.js +6 -0
- package/test/unary_4.js +12 -0
- package/test/unary_5.js +8 -0
- package/test/undefined_1.js +8 -0
- package/test/undefined_2.js +10 -0
- package/test/updateexp_1.js +9 -0
- package/test/vars_1.js +5 -0
- package/test/vars_2.js +9 -0
- package/test/while_1.js +6 -0
- package/test262/compare.js +30 -0
- package/test262/index.js +314 -0
- package/test262/node_modules/.bin/esparse +12 -0
- package/test262/node_modules/.bin/esparse.cmd +17 -0
- package/test262/node_modules/.bin/esparse.ps1 +28 -0
- package/test262/node_modules/.bin/esvalidate +12 -0
- package/test262/node_modules/.bin/esvalidate.cmd +17 -0
- package/test262/node_modules/.bin/esvalidate.ps1 +28 -0
- package/test262/node_modules/.bin/js-yaml +12 -0
- package/test262/node_modules/.bin/js-yaml.cmd +17 -0
- package/test262/node_modules/.bin/js-yaml.ps1 +28 -0
- package/test262/node_modules/.package-lock.json +0 -0
- package/test262/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
- package/test262/node_modules/@nodelib/fs.scandir/README.md +171 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
- package/test262/node_modules/@nodelib/fs.scandir/package.json +44 -0
- package/test262/node_modules/@nodelib/fs.stat/LICENSE +21 -0
- package/test262/node_modules/@nodelib/fs.stat/README.md +126 -0
- package/test262/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/test262/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
- package/test262/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/test262/node_modules/@nodelib/fs.stat/out/index.js +26 -0
- package/test262/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/test262/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
- package/test262/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
- package/test262/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
- package/test262/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/test262/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
- package/test262/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/test262/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
- package/test262/node_modules/@nodelib/fs.stat/package.json +37 -0
- package/test262/node_modules/@nodelib/fs.walk/LICENSE +21 -0
- package/test262/node_modules/@nodelib/fs.walk/README.md +215 -0
- package/test262/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/test262/node_modules/@nodelib/fs.walk/out/index.js +34 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
- package/test262/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/test262/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
- package/test262/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/test262/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
- package/test262/node_modules/@nodelib/fs.walk/package.json +44 -0
- package/test262/node_modules/argparse/CHANGELOG.md +185 -0
- package/test262/node_modules/argparse/LICENSE +21 -0
- package/test262/node_modules/argparse/README.md +257 -0
- package/test262/node_modules/argparse/index.js +3 -0
- package/test262/node_modules/argparse/lib/action/append/constant.js +47 -0
- package/test262/node_modules/argparse/lib/action/append.js +53 -0
- package/test262/node_modules/argparse/lib/action/count.js +40 -0
- package/test262/node_modules/argparse/lib/action/help.js +47 -0
- package/test262/node_modules/argparse/lib/action/store/constant.js +43 -0
- package/test262/node_modules/argparse/lib/action/store/false.js +27 -0
- package/test262/node_modules/argparse/lib/action/store/true.js +26 -0
- package/test262/node_modules/argparse/lib/action/store.js +50 -0
- package/test262/node_modules/argparse/lib/action/subparsers.js +149 -0
- package/test262/node_modules/argparse/lib/action/version.js +47 -0
- package/test262/node_modules/argparse/lib/action.js +146 -0
- package/test262/node_modules/argparse/lib/action_container.js +482 -0
- package/test262/node_modules/argparse/lib/argparse.js +14 -0
- package/test262/node_modules/argparse/lib/argument/error.js +50 -0
- package/test262/node_modules/argparse/lib/argument/exclusive.js +54 -0
- package/test262/node_modules/argparse/lib/argument/group.js +75 -0
- package/test262/node_modules/argparse/lib/argument_parser.js +1161 -0
- package/test262/node_modules/argparse/lib/const.js +21 -0
- package/test262/node_modules/argparse/lib/help/added_formatters.js +87 -0
- package/test262/node_modules/argparse/lib/help/formatter.js +795 -0
- package/test262/node_modules/argparse/lib/namespace.js +76 -0
- package/test262/node_modules/argparse/lib/utils.js +57 -0
- package/test262/node_modules/argparse/package.json +34 -0
- package/test262/node_modules/braces/CHANGELOG.md +184 -0
- package/test262/node_modules/braces/LICENSE +21 -0
- package/test262/node_modules/braces/README.md +593 -0
- package/test262/node_modules/braces/index.js +170 -0
- package/test262/node_modules/braces/lib/compile.js +57 -0
- package/test262/node_modules/braces/lib/constants.js +57 -0
- package/test262/node_modules/braces/lib/expand.js +113 -0
- package/test262/node_modules/braces/lib/parse.js +333 -0
- package/test262/node_modules/braces/lib/stringify.js +32 -0
- package/test262/node_modules/braces/lib/utils.js +112 -0
- package/test262/node_modules/braces/package.json +77 -0
- package/test262/node_modules/esprima/ChangeLog +235 -0
- package/test262/node_modules/esprima/LICENSE.BSD +21 -0
- package/test262/node_modules/esprima/README.md +46 -0
- package/test262/node_modules/esprima/bin/esparse.js +139 -0
- package/test262/node_modules/esprima/bin/esvalidate.js +236 -0
- package/test262/node_modules/esprima/dist/esprima.js +6709 -0
- package/test262/node_modules/esprima/package.json +112 -0
- package/test262/node_modules/fast-glob/LICENSE +21 -0
- package/test262/node_modules/fast-glob/README.md +859 -0
- package/test262/node_modules/fast-glob/out/index.d.ts +40 -0
- package/test262/node_modules/fast-glob/out/index.js +102 -0
- package/test262/node_modules/fast-glob/out/managers/tasks.d.ts +22 -0
- package/test262/node_modules/fast-glob/out/managers/tasks.js +110 -0
- package/test262/node_modules/fast-glob/out/providers/async.d.ts +9 -0
- package/test262/node_modules/fast-glob/out/providers/async.js +23 -0
- package/test262/node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0
- package/test262/node_modules/fast-glob/out/providers/filters/deep.js +62 -0
- package/test262/node_modules/fast-glob/out/providers/filters/entry.d.ts +16 -0
- package/test262/node_modules/fast-glob/out/providers/filters/entry.js +63 -0
- package/test262/node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0
- package/test262/node_modules/fast-glob/out/providers/filters/error.js +15 -0
- package/test262/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0
- package/test262/node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0
- package/test262/node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0
- package/test262/node_modules/fast-glob/out/providers/matchers/partial.js +38 -0
- package/test262/node_modules/fast-glob/out/providers/provider.d.ts +19 -0
- package/test262/node_modules/fast-glob/out/providers/provider.js +48 -0
- package/test262/node_modules/fast-glob/out/providers/stream.d.ts +11 -0
- package/test262/node_modules/fast-glob/out/providers/stream.js +31 -0
- package/test262/node_modules/fast-glob/out/providers/sync.d.ts +9 -0
- package/test262/node_modules/fast-glob/out/providers/sync.js +23 -0
- package/test262/node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0
- package/test262/node_modules/fast-glob/out/providers/transformers/entry.js +26 -0
- package/test262/node_modules/fast-glob/out/readers/async.d.ts +10 -0
- package/test262/node_modules/fast-glob/out/readers/async.js +35 -0
- package/test262/node_modules/fast-glob/out/readers/reader.d.ts +15 -0
- package/test262/node_modules/fast-glob/out/readers/reader.js +33 -0
- package/test262/node_modules/fast-glob/out/readers/stream.d.ts +14 -0
- package/test262/node_modules/fast-glob/out/readers/stream.js +55 -0
- package/test262/node_modules/fast-glob/out/readers/sync.d.ts +12 -0
- package/test262/node_modules/fast-glob/out/readers/sync.js +43 -0
- package/test262/node_modules/fast-glob/out/settings.d.ts +164 -0
- package/test262/node_modules/fast-glob/out/settings.js +57 -0
- package/test262/node_modules/fast-glob/out/types/index.d.ts +31 -0
- package/test262/node_modules/fast-glob/out/types/index.js +2 -0
- package/test262/node_modules/fast-glob/out/utils/array.d.ts +2 -0
- package/test262/node_modules/fast-glob/out/utils/array.js +22 -0
- package/test262/node_modules/fast-glob/out/utils/errno.d.ts +2 -0
- package/test262/node_modules/fast-glob/out/utils/errno.js +7 -0
- package/test262/node_modules/fast-glob/out/utils/fs.d.ts +4 -0
- package/test262/node_modules/fast-glob/out/utils/fs.js +19 -0
- package/test262/node_modules/fast-glob/out/utils/index.d.ts +8 -0
- package/test262/node_modules/fast-glob/out/utils/index.js +17 -0
- package/test262/node_modules/fast-glob/out/utils/path.d.ts +13 -0
- package/test262/node_modules/fast-glob/out/utils/path.js +68 -0
- package/test262/node_modules/fast-glob/out/utils/pattern.d.ts +47 -0
- package/test262/node_modules/fast-glob/out/utils/pattern.js +188 -0
- package/test262/node_modules/fast-glob/out/utils/stream.d.ts +4 -0
- package/test262/node_modules/fast-glob/out/utils/stream.js +17 -0
- package/test262/node_modules/fast-glob/out/utils/string.d.ts +2 -0
- package/test262/node_modules/fast-glob/out/utils/string.js +11 -0
- package/test262/node_modules/fast-glob/package.json +81 -0
- package/test262/node_modules/fastq/.github/dependabot.yml +11 -0
- package/test262/node_modules/fastq/.github/workflows/ci.yml +50 -0
- package/test262/node_modules/fastq/LICENSE +13 -0
- package/test262/node_modules/fastq/README.md +309 -0
- package/test262/node_modules/fastq/bench.js +66 -0
- package/test262/node_modules/fastq/example.js +14 -0
- package/test262/node_modules/fastq/example.mjs +11 -0
- package/test262/node_modules/fastq/index.d.ts +37 -0
- package/test262/node_modules/fastq/package.json +52 -0
- package/test262/node_modules/fastq/queue.js +289 -0
- package/test262/node_modules/fastq/test/example.ts +81 -0
- package/test262/node_modules/fastq/test/promise.js +248 -0
- package/test262/node_modules/fastq/test/test.js +566 -0
- package/test262/node_modules/fastq/test/tsconfig.json +11 -0
- package/test262/node_modules/fill-range/LICENSE +21 -0
- package/test262/node_modules/fill-range/README.md +237 -0
- package/test262/node_modules/fill-range/index.js +249 -0
- package/test262/node_modules/fill-range/package.json +69 -0
- package/test262/node_modules/glob-parent/CHANGELOG.md +110 -0
- package/test262/node_modules/glob-parent/LICENSE +15 -0
- package/test262/node_modules/glob-parent/README.md +137 -0
- package/test262/node_modules/glob-parent/index.js +42 -0
- package/test262/node_modules/glob-parent/package.json +48 -0
- package/test262/node_modules/graceful-fs/LICENSE +15 -0
- package/test262/node_modules/graceful-fs/README.md +143 -0
- package/test262/node_modules/graceful-fs/clone.js +23 -0
- package/test262/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/test262/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/test262/node_modules/graceful-fs/package.json +53 -0
- package/test262/node_modules/graceful-fs/polyfills.js +355 -0
- package/test262/node_modules/is-extglob/LICENSE +21 -0
- package/test262/node_modules/is-extglob/README.md +107 -0
- package/test262/node_modules/is-extglob/index.js +20 -0
- package/test262/node_modules/is-extglob/package.json +69 -0
- package/test262/node_modules/is-glob/LICENSE +21 -0
- package/test262/node_modules/is-glob/README.md +206 -0
- package/test262/node_modules/is-glob/index.js +150 -0
- package/test262/node_modules/is-glob/package.json +81 -0
- package/test262/node_modules/is-number/LICENSE +21 -0
- package/test262/node_modules/is-number/README.md +187 -0
- package/test262/node_modules/is-number/index.js +18 -0
- package/test262/node_modules/is-number/package.json +82 -0
- package/test262/node_modules/js-yaml/CHANGELOG.md +557 -0
- package/test262/node_modules/js-yaml/LICENSE +21 -0
- package/test262/node_modules/js-yaml/README.md +299 -0
- package/test262/node_modules/js-yaml/bin/js-yaml.js +132 -0
- package/test262/node_modules/js-yaml/dist/js-yaml.js +3989 -0
- package/test262/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
- package/test262/node_modules/js-yaml/index.js +7 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/loader.js +1644 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
- package/test262/node_modules/js-yaml/lib/js-yaml.js +39 -0
- package/test262/node_modules/js-yaml/package.json +49 -0
- package/test262/node_modules/klaw/CHANGELOG.md +62 -0
- package/test262/node_modules/klaw/LICENSE +15 -0
- package/test262/node_modules/klaw/README.md +252 -0
- package/test262/node_modules/klaw/package.json +40 -0
- package/test262/node_modules/klaw/src/index.js +56 -0
- package/test262/node_modules/merge2/LICENSE +21 -0
- package/test262/node_modules/merge2/README.md +144 -0
- package/test262/node_modules/merge2/index.js +144 -0
- package/test262/node_modules/merge2/package.json +43 -0
- package/test262/node_modules/micromatch/LICENSE +21 -0
- package/test262/node_modules/micromatch/README.md +1011 -0
- package/test262/node_modules/micromatch/index.js +467 -0
- package/test262/node_modules/micromatch/package.json +119 -0
- package/test262/node_modules/picomatch/CHANGELOG.md +136 -0
- package/test262/node_modules/picomatch/LICENSE +21 -0
- package/test262/node_modules/picomatch/README.md +708 -0
- package/test262/node_modules/picomatch/index.js +3 -0
- package/test262/node_modules/picomatch/lib/constants.js +179 -0
- package/test262/node_modules/picomatch/lib/parse.js +1091 -0
- package/test262/node_modules/picomatch/lib/picomatch.js +342 -0
- package/test262/node_modules/picomatch/lib/scan.js +391 -0
- package/test262/node_modules/picomatch/lib/utils.js +64 -0
- package/test262/node_modules/picomatch/package.json +81 -0
- package/test262/node_modules/queue-microtask/LICENSE +20 -0
- package/test262/node_modules/queue-microtask/README.md +90 -0
- package/test262/node_modules/queue-microtask/index.d.ts +2 -0
- package/test262/node_modules/queue-microtask/index.js +9 -0
- package/test262/node_modules/queue-microtask/package.json +55 -0
- package/test262/node_modules/reusify/.coveralls.yml +1 -0
- package/test262/node_modules/reusify/.travis.yml +28 -0
- package/test262/node_modules/reusify/LICENSE +22 -0
- package/test262/node_modules/reusify/README.md +145 -0
- package/test262/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
- package/test262/node_modules/reusify/benchmarks/fib.js +13 -0
- package/test262/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
- package/test262/node_modules/reusify/package.json +45 -0
- package/test262/node_modules/reusify/reusify.js +33 -0
- package/test262/node_modules/reusify/test.js +66 -0
- package/test262/node_modules/run-parallel/LICENSE +20 -0
- package/test262/node_modules/run-parallel/README.md +85 -0
- package/test262/node_modules/run-parallel/index.js +51 -0
- package/test262/node_modules/run-parallel/package.json +58 -0
- package/test262/node_modules/sprintf-js/LICENSE +24 -0
- package/test262/node_modules/sprintf-js/README.md +88 -0
- package/test262/node_modules/sprintf-js/bower.json +14 -0
- package/test262/node_modules/sprintf-js/demo/angular.html +20 -0
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
- package/test262/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
- package/test262/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
- package/test262/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
- package/test262/node_modules/sprintf-js/gruntfile.js +36 -0
- package/test262/node_modules/sprintf-js/package.json +22 -0
- package/test262/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
- package/test262/node_modules/sprintf-js/src/sprintf.js +208 -0
- package/test262/node_modules/sprintf-js/test/test.js +82 -0
- package/test262/node_modules/test262-stream/.jshintignore +2 -0
- package/test262/node_modules/test262-stream/.jshintrc +6 -0
- package/test262/node_modules/test262-stream/.travis.yml +5 -0
- package/test262/node_modules/test262-stream/CONTRIBUTING.md +37 -0
- package/test262/node_modules/test262-stream/LICENSE-MICROSOFT.txt +27 -0
- package/test262/node_modules/test262-stream/LICENSE.txt +27 -0
- package/test262/node_modules/test262-stream/README.md +71 -0
- package/test262/node_modules/test262-stream/lib/builder.js +46 -0
- package/test262/node_modules/test262-stream/lib/compile.js +24 -0
- package/test262/node_modules/test262-stream/lib/create-scenarios.js +29 -0
- package/test262/node_modules/test262-stream/lib/index.js +187 -0
- package/test262/node_modules/test262-stream/lib/test-file.js +150 -0
- package/test262/node_modules/test262-stream/package.json +26 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-missing-harness/fake-test262/test/a-test-file.js +16 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/package.json +3 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/package.json +3 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/asyncNegative_default.js +49 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/asyncNegative_strict_mode.js +50 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/async_default.js +48 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/async_strict_mode.js +49 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/bothStrict_default.js +46 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/error_default.js +39 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/error_strict_mode.js +40 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/module_default.js +37 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/module_strict_mode.js +38 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/negative-empty_default.js +37 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/negative-empty_strict_mode.js +38 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/noStrict_default.js +36 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/rawNoStrict_default.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/rawStrict_default.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/strict_strict_mode.js +41 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/asyncNegative_default.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/asyncNegative_strict_mode.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/async_default.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/async_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/bothStrict_default.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/error_default.json +19 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/error_strict_mode.json +19 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/module_default.json +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/module_strict_mode.json +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/negative-empty_default.json +19 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/negative-empty_strict_mode.json +19 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/noStrict_default.json +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/rawNoStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/rawStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/async.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/asyncNegative.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/error.js +8 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/module.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/module_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/negative-empty.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/noStrict.js +5 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/rawNoStrict.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/rawStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-content/test/bothStrict_default.js +46 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_default.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-0_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-1_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-2_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-3_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-4_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-5_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-6_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-7_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-8_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-9_FIXTURE.txt +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/raw_default.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_default.js +38 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_strict_mode.js +39 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/raw_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_default.json +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_strict_mode.json +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/raw.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/runtime.js +7 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_default.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_strict_mode.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/async_default.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/async_strict_mode.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_default.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_strict_mode.js +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/error_default.js +8 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/error_strict_mode.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/module_default.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/module_strict_mode.js +7 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_default.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_strict_mode.js +7 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/noStrict_default.js +5 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/rawNoStrict_default.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/rawStrict_default.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/strict_strict_mode.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_default.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/async_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/async_strict_mode.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_strict_mode.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/error_default.json +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/error_strict_mode.json +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/module_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/module_strict_mode.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_default.json +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_strict_mode.json +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/noStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/rawNoStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/rawStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/strict_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/async.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/asyncNegative.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/error.js +8 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/module.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/module_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/negative-empty.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/noStrict.js +5 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/rawNoStrict.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/rawStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/expected-content/test/strict_strict_mode.js +41 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/package.json +3 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/expected-content/test/strict_strict_mode.js +41 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/package.json +3 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_default.js +44 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_strict_mode.js +45 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-and-license-on-same-line_default.js +20 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-multiline-block_default.js +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls_default.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-and-license-on-same-line_default.js +20 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-multiline-block_default.js +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps_default.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/rawWithLicense_default.js +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw_default.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_default.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_strict_mode.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-and-license-on-same-line_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-multiline-block_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-and-license-on-same-line_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-multiline-block_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/rawWithLicense_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/missing-raw-flag.js +13 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-and-license-on-same-line.js +20 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-multiline-block.js +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-and-license-on-same-line.js +20 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-multiline-block.js +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/rawWithLicense.js +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/doneprintHandle.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/sta.js +13 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/async_default.js +52 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/async_strict_mode.js +53 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/bothStrict_default.js +47 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/bothStrict_strict_mode.js +48 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/async_default.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/async_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_default.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/test/async.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_default.js +49 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_strict_mode.js +50 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/async_default.js +48 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/async_strict_mode.js +49 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/bothStrict_default.js +46 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/strict/no/noStrict_default.js +36 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/strict/no/rawNoStrict_default.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_default.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_strict_mode.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/async_default.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/async_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_default.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/strict/no/noStrict_default.json +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/strict/no/rawNoStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/async/async.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/async/asyncNegative.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/error.js +8 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/negative-empty.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/no/noStrict.js +5 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/no/rawNoStrict.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/rawStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/test.js +319 -0
- package/test262/node_modules/to-regex-range/LICENSE +21 -0
- package/test262/node_modules/to-regex-range/README.md +305 -0
- package/test262/node_modules/to-regex-range/index.js +288 -0
- package/test262/node_modules/to-regex-range/package.json +88 -0
- package/test262/package-lock.json +279 -0
- package/test262/package.json +6 -0
- package/test262/prelude.js +75 -0
- package/test262/results.json +1 -0
- package/util/enum.js +20 -0
@@ -0,0 +1,137 @@
|
|
1
|
+
<p align="center">
|
2
|
+
<a href="https://gulpjs.com">
|
3
|
+
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
4
|
+
</a>
|
5
|
+
</p>
|
6
|
+
|
7
|
+
# glob-parent
|
8
|
+
|
9
|
+
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
|
10
|
+
|
11
|
+
Extract the non-magic parent path from a glob string.
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```js
|
16
|
+
var globParent = require('glob-parent');
|
17
|
+
|
18
|
+
globParent('path/to/*.js'); // 'path/to'
|
19
|
+
globParent('/root/path/to/*.js'); // '/root/path/to'
|
20
|
+
globParent('/*.js'); // '/'
|
21
|
+
globParent('*.js'); // '.'
|
22
|
+
globParent('**/*.js'); // '.'
|
23
|
+
globParent('path/{to,from}'); // 'path'
|
24
|
+
globParent('path/!(to|from)'); // 'path'
|
25
|
+
globParent('path/?(to|from)'); // 'path'
|
26
|
+
globParent('path/+(to|from)'); // 'path'
|
27
|
+
globParent('path/*(to|from)'); // 'path'
|
28
|
+
globParent('path/@(to|from)'); // 'path'
|
29
|
+
globParent('path/**/*'); // 'path'
|
30
|
+
|
31
|
+
// if provided a non-glob path, returns the nearest dir
|
32
|
+
globParent('path/foo/bar.js'); // 'path/foo'
|
33
|
+
globParent('path/foo/'); // 'path/foo'
|
34
|
+
globParent('path/foo'); // 'path' (see issue #3 for details)
|
35
|
+
```
|
36
|
+
|
37
|
+
## API
|
38
|
+
|
39
|
+
### `globParent(maybeGlobString, [options])`
|
40
|
+
|
41
|
+
Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below.
|
42
|
+
|
43
|
+
#### options
|
44
|
+
|
45
|
+
```js
|
46
|
+
{
|
47
|
+
// Disables the automatic conversion of slashes for Windows
|
48
|
+
flipBackslashes: true
|
49
|
+
}
|
50
|
+
```
|
51
|
+
|
52
|
+
## Escaping
|
53
|
+
|
54
|
+
The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:
|
55
|
+
|
56
|
+
- `?` (question mark) unless used as a path segment alone
|
57
|
+
- `*` (asterisk)
|
58
|
+
- `|` (pipe)
|
59
|
+
- `(` (opening parenthesis)
|
60
|
+
- `)` (closing parenthesis)
|
61
|
+
- `{` (opening curly brace)
|
62
|
+
- `}` (closing curly brace)
|
63
|
+
- `[` (opening bracket)
|
64
|
+
- `]` (closing bracket)
|
65
|
+
|
66
|
+
**Example**
|
67
|
+
|
68
|
+
```js
|
69
|
+
globParent('foo/[bar]/') // 'foo'
|
70
|
+
globParent('foo/\\[bar]/') // 'foo/[bar]'
|
71
|
+
```
|
72
|
+
|
73
|
+
## Limitations
|
74
|
+
|
75
|
+
### Braces & Brackets
|
76
|
+
This library attempts a quick and imperfect method of determining which path
|
77
|
+
parts have glob magic without fully parsing/lexing the pattern. There are some
|
78
|
+
advanced use cases that can trip it up, such as nested braces where the outer
|
79
|
+
pair is escaped and the inner one contains a path separator. If you find
|
80
|
+
yourself in the unlikely circumstance of being affected by this or need to
|
81
|
+
ensure higher-fidelity glob handling in your library, it is recommended that you
|
82
|
+
pre-process your input with [expand-braces] and/or [expand-brackets].
|
83
|
+
|
84
|
+
### Windows
|
85
|
+
Backslashes are not valid path separators for globs. If a path with backslashes
|
86
|
+
is provided anyway, for simple cases, glob-parent will replace the path
|
87
|
+
separator for you and return the non-glob parent path (now with
|
88
|
+
forward-slashes, which are still valid as Windows path separators).
|
89
|
+
|
90
|
+
This cannot be used in conjunction with escape characters.
|
91
|
+
|
92
|
+
```js
|
93
|
+
// BAD
|
94
|
+
globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)'
|
95
|
+
|
96
|
+
// GOOD
|
97
|
+
globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)'
|
98
|
+
```
|
99
|
+
|
100
|
+
If you are using escape characters for a pattern without path parts (i.e.
|
101
|
+
relative to `cwd`), prefix with `./` to avoid confusing glob-parent.
|
102
|
+
|
103
|
+
```js
|
104
|
+
// BAD
|
105
|
+
globParent('foo \\[bar]') // 'foo '
|
106
|
+
globParent('foo \\[bar]*') // 'foo '
|
107
|
+
|
108
|
+
// GOOD
|
109
|
+
globParent('./foo \\[bar]') // 'foo [bar]'
|
110
|
+
globParent('./foo \\[bar]*') // '.'
|
111
|
+
```
|
112
|
+
|
113
|
+
## License
|
114
|
+
|
115
|
+
ISC
|
116
|
+
|
117
|
+
[expand-braces]: https://github.com/jonschlinkert/expand-braces
|
118
|
+
[expand-brackets]: https://github.com/jonschlinkert/expand-brackets
|
119
|
+
|
120
|
+
[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg
|
121
|
+
[npm-url]: https://www.npmjs.com/package/glob-parent
|
122
|
+
[npm-image]: https://img.shields.io/npm/v/glob-parent.svg
|
123
|
+
|
124
|
+
[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master
|
125
|
+
[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master
|
126
|
+
|
127
|
+
[travis-url]: https://travis-ci.org/gulpjs/glob-parent
|
128
|
+
[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci
|
129
|
+
|
130
|
+
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent
|
131
|
+
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor
|
132
|
+
|
133
|
+
[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent
|
134
|
+
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg
|
135
|
+
|
136
|
+
[gitter-url]: https://gitter.im/gulpjs/gulp
|
137
|
+
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
|
@@ -0,0 +1,42 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var isGlob = require('is-glob');
|
4
|
+
var pathPosixDirname = require('path').posix.dirname;
|
5
|
+
var isWin32 = require('os').platform() === 'win32';
|
6
|
+
|
7
|
+
var slash = '/';
|
8
|
+
var backslash = /\\/g;
|
9
|
+
var enclosure = /[\{\[].*[\}\]]$/;
|
10
|
+
var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
|
11
|
+
var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @param {string} str
|
15
|
+
* @param {Object} opts
|
16
|
+
* @param {boolean} [opts.flipBackslashes=true]
|
17
|
+
* @returns {string}
|
18
|
+
*/
|
19
|
+
module.exports = function globParent(str, opts) {
|
20
|
+
var options = Object.assign({ flipBackslashes: true }, opts);
|
21
|
+
|
22
|
+
// flip windows path separators
|
23
|
+
if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
|
24
|
+
str = str.replace(backslash, slash);
|
25
|
+
}
|
26
|
+
|
27
|
+
// special case for strings ending in enclosure containing path separator
|
28
|
+
if (enclosure.test(str)) {
|
29
|
+
str += slash;
|
30
|
+
}
|
31
|
+
|
32
|
+
// preserves full path in case of trailing path separator
|
33
|
+
str += 'a';
|
34
|
+
|
35
|
+
// remove path parts that are globby
|
36
|
+
do {
|
37
|
+
str = pathPosixDirname(str);
|
38
|
+
} while (isGlob(str) || globby.test(str));
|
39
|
+
|
40
|
+
// remove escape chars and return result
|
41
|
+
return str.replace(escaped, '$1');
|
42
|
+
};
|
@@ -0,0 +1,48 @@
|
|
1
|
+
{
|
2
|
+
"name": "glob-parent",
|
3
|
+
"version": "5.1.2",
|
4
|
+
"description": "Extract the non-magic parent path from a glob string.",
|
5
|
+
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
|
6
|
+
"contributors": [
|
7
|
+
"Elan Shanker (https://github.com/es128)",
|
8
|
+
"Blaine Bublitz <blaine.bublitz@gmail.com>"
|
9
|
+
],
|
10
|
+
"repository": "gulpjs/glob-parent",
|
11
|
+
"license": "ISC",
|
12
|
+
"engines": {
|
13
|
+
"node": ">= 6"
|
14
|
+
},
|
15
|
+
"main": "index.js",
|
16
|
+
"files": [
|
17
|
+
"LICENSE",
|
18
|
+
"index.js"
|
19
|
+
],
|
20
|
+
"scripts": {
|
21
|
+
"lint": "eslint .",
|
22
|
+
"pretest": "npm run lint",
|
23
|
+
"test": "nyc mocha --async-only",
|
24
|
+
"azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit",
|
25
|
+
"coveralls": "nyc report --reporter=text-lcov | coveralls"
|
26
|
+
},
|
27
|
+
"dependencies": {
|
28
|
+
"is-glob": "^4.0.1"
|
29
|
+
},
|
30
|
+
"devDependencies": {
|
31
|
+
"coveralls": "^3.0.11",
|
32
|
+
"eslint": "^2.13.1",
|
33
|
+
"eslint-config-gulp": "^3.0.1",
|
34
|
+
"expect": "^1.20.2",
|
35
|
+
"mocha": "^6.0.2",
|
36
|
+
"nyc": "^13.3.0"
|
37
|
+
},
|
38
|
+
"keywords": [
|
39
|
+
"glob",
|
40
|
+
"parent",
|
41
|
+
"strip",
|
42
|
+
"path",
|
43
|
+
"dirname",
|
44
|
+
"directory",
|
45
|
+
"base",
|
46
|
+
"wildcard"
|
47
|
+
]
|
48
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
The ISC License
|
2
|
+
|
3
|
+
Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
|
4
|
+
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
@@ -0,0 +1,143 @@
|
|
1
|
+
# graceful-fs
|
2
|
+
|
3
|
+
graceful-fs functions as a drop-in replacement for the fs module,
|
4
|
+
making various improvements.
|
5
|
+
|
6
|
+
The improvements are meant to normalize behavior across different
|
7
|
+
platforms and environments, and to make filesystem access more
|
8
|
+
resilient to errors.
|
9
|
+
|
10
|
+
## Improvements over [fs module](https://nodejs.org/api/fs.html)
|
11
|
+
|
12
|
+
* Queues up `open` and `readdir` calls, and retries them once
|
13
|
+
something closes if there is an EMFILE error from too many file
|
14
|
+
descriptors.
|
15
|
+
* fixes `lchmod` for Node versions prior to 0.6.2.
|
16
|
+
* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
|
17
|
+
* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
|
18
|
+
`lchown` if the user isn't root.
|
19
|
+
* makes `lchmod` and `lchown` become noops, if not available.
|
20
|
+
* retries reading a file if `read` results in EAGAIN error.
|
21
|
+
|
22
|
+
On Windows, it retries renaming a file for up to one second if `EACCESS`
|
23
|
+
or `EPERM` error occurs, likely because antivirus software has locked
|
24
|
+
the directory.
|
25
|
+
|
26
|
+
## USAGE
|
27
|
+
|
28
|
+
```javascript
|
29
|
+
// use just like fs
|
30
|
+
var fs = require('graceful-fs')
|
31
|
+
|
32
|
+
// now go and do stuff with it...
|
33
|
+
fs.readFile('some-file-or-whatever', (err, data) => {
|
34
|
+
// Do stuff here.
|
35
|
+
})
|
36
|
+
```
|
37
|
+
|
38
|
+
## Sync methods
|
39
|
+
|
40
|
+
This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync
|
41
|
+
methods. If you use sync methods which open file descriptors then you are
|
42
|
+
responsible for dealing with any errors.
|
43
|
+
|
44
|
+
This is a known limitation, not a bug.
|
45
|
+
|
46
|
+
## Global Patching
|
47
|
+
|
48
|
+
If you want to patch the global fs module (or any other fs-like
|
49
|
+
module) you can do this:
|
50
|
+
|
51
|
+
```javascript
|
52
|
+
// Make sure to read the caveat below.
|
53
|
+
var realFs = require('fs')
|
54
|
+
var gracefulFs = require('graceful-fs')
|
55
|
+
gracefulFs.gracefulify(realFs)
|
56
|
+
```
|
57
|
+
|
58
|
+
This should only ever be done at the top-level application layer, in
|
59
|
+
order to delay on EMFILE errors from any fs-using dependencies. You
|
60
|
+
should **not** do this in a library, because it can cause unexpected
|
61
|
+
delays in other parts of the program.
|
62
|
+
|
63
|
+
## Changes
|
64
|
+
|
65
|
+
This module is fairly stable at this point, and used by a lot of
|
66
|
+
things. That being said, because it implements a subtle behavior
|
67
|
+
change in a core part of the node API, even modest changes can be
|
68
|
+
extremely breaking, and the versioning is thus biased towards
|
69
|
+
bumping the major when in doubt.
|
70
|
+
|
71
|
+
The main change between major versions has been switching between
|
72
|
+
providing a fully-patched `fs` module vs monkey-patching the node core
|
73
|
+
builtin, and the approach by which a non-monkey-patched `fs` was
|
74
|
+
created.
|
75
|
+
|
76
|
+
The goal is to trade `EMFILE` errors for slower fs operations. So, if
|
77
|
+
you try to open a zillion files, rather than crashing, `open`
|
78
|
+
operations will be queued up and wait for something else to `close`.
|
79
|
+
|
80
|
+
There are advantages to each approach. Monkey-patching the fs means
|
81
|
+
that no `EMFILE` errors can possibly occur anywhere in your
|
82
|
+
application, because everything is using the same core `fs` module,
|
83
|
+
which is patched. However, it can also obviously cause undesirable
|
84
|
+
side-effects, especially if the module is loaded multiple times.
|
85
|
+
|
86
|
+
Implementing a separate-but-identical patched `fs` module is more
|
87
|
+
surgical (and doesn't run the risk of patching multiple times), but
|
88
|
+
also imposes the challenge of keeping in sync with the core module.
|
89
|
+
|
90
|
+
The current approach loads the `fs` module, and then creates a
|
91
|
+
lookalike object that has all the same methods, except a few that are
|
92
|
+
patched. It is safe to use in all versions of Node from 0.8 through
|
93
|
+
7.0.
|
94
|
+
|
95
|
+
### v4
|
96
|
+
|
97
|
+
* Do not monkey-patch the fs module. This module may now be used as a
|
98
|
+
drop-in dep, and users can opt into monkey-patching the fs builtin
|
99
|
+
if their app requires it.
|
100
|
+
|
101
|
+
### v3
|
102
|
+
|
103
|
+
* Monkey-patch fs, because the eval approach no longer works on recent
|
104
|
+
node.
|
105
|
+
* fixed possible type-error throw if rename fails on windows
|
106
|
+
* verify that we *never* get EMFILE errors
|
107
|
+
* Ignore ENOSYS from chmod/chown
|
108
|
+
* clarify that graceful-fs must be used as a drop-in
|
109
|
+
|
110
|
+
### v2.1.0
|
111
|
+
|
112
|
+
* Use eval rather than monkey-patching fs.
|
113
|
+
* readdir: Always sort the results
|
114
|
+
* win32: requeue a file if error has an OK status
|
115
|
+
|
116
|
+
### v2.0
|
117
|
+
|
118
|
+
* A return to monkey patching
|
119
|
+
* wrap process.cwd
|
120
|
+
|
121
|
+
### v1.1
|
122
|
+
|
123
|
+
* wrap readFile
|
124
|
+
* Wrap fs.writeFile.
|
125
|
+
* readdir protection
|
126
|
+
* Don't clobber the fs builtin
|
127
|
+
* Handle fs.read EAGAIN errors by trying again
|
128
|
+
* Expose the curOpen counter
|
129
|
+
* No-op lchown/lchmod if not implemented
|
130
|
+
* fs.rename patch only for win32
|
131
|
+
* Patch fs.rename to handle AV software on Windows
|
132
|
+
* Close #4 Chown should not fail on einval or eperm if non-root
|
133
|
+
* Fix isaacs/fstream#1 Only wrap fs one time
|
134
|
+
* Fix #3 Start at 1024 max files, then back off on EMFILE
|
135
|
+
* lutimes that doens't blow up on Linux
|
136
|
+
* A full on-rewrite using a queue instead of just swallowing the EMFILE error
|
137
|
+
* Wrap Read/Write streams as well
|
138
|
+
|
139
|
+
### 1.0
|
140
|
+
|
141
|
+
* Update engines for node 0.6
|
142
|
+
* Be lstat-graceful on Windows
|
143
|
+
* first
|
@@ -0,0 +1,23 @@
|
|
1
|
+
'use strict'
|
2
|
+
|
3
|
+
module.exports = clone
|
4
|
+
|
5
|
+
var getPrototypeOf = Object.getPrototypeOf || function (obj) {
|
6
|
+
return obj.__proto__
|
7
|
+
}
|
8
|
+
|
9
|
+
function clone (obj) {
|
10
|
+
if (obj === null || typeof obj !== 'object')
|
11
|
+
return obj
|
12
|
+
|
13
|
+
if (obj instanceof Object)
|
14
|
+
var copy = { __proto__: getPrototypeOf(obj) }
|
15
|
+
else
|
16
|
+
var copy = Object.create(null)
|
17
|
+
|
18
|
+
Object.getOwnPropertyNames(obj).forEach(function (key) {
|
19
|
+
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
|
20
|
+
})
|
21
|
+
|
22
|
+
return copy
|
23
|
+
}
|