From fbf62b4830b35af2c906e092e91635a33d919fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=C2=A0S=2E=C2=A0Choi?= Date: Sun, 8 Jul 2018 15:57:43 -0400 Subject: [PATCH 001/563] Implement Smart Pipeline proposal in @babel/parser --- .../babel-parser/src/parser/expression.js | 298 ++++++++++- packages/babel-parser/src/parser/statement.js | 156 ++++-- packages/babel-parser/src/plugin-utils.js | 2 +- packages/babel-parser/src/tokenizer/index.js | 60 ++- packages/babel-parser/src/tokenizer/state.js | 9 + packages/babel-parser/src/tokenizer/types.js | 15 + packages/babel-parser/src/types.js | 26 + .../invalid-proposal/options.json | 2 +- .../input.js | 6 + .../options.json | 5 + .../output.json | 401 ++++++++++++++ .../input.js | 3 + .../options.json | 3 + .../output.json | 249 +++++++++ .../input.js | 3 + .../options.json | 3 + .../output.json | 234 +++++++++ .../input.js | 3 + .../options.json | 3 + .../output.json | 168 ++++++ .../input.js | 4 + .../options.json | 3 + .../output.json | 348 ++++++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 233 +++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 152 ++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 185 +++++++ .../input.js | 4 + .../options.json | 3 + .../output.json | 348 ++++++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 233 +++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 115 ++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 214 ++++++++ .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 3 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 4 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../input.js | 1 + .../options.json | 3 + .../output.json | 184 +++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 251 +++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 165 ++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 214 ++++++++ .../input.js | 7 + .../options.json | 3 + .../output.json | 384 ++++++++++++++ .../input.js | 3 + .../options.json | 3 + .../output.json | 298 +++++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 149 ++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 149 ++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 262 +++++++++ .../input.js | 3 + .../options.json | 3 + .../output.json | 298 +++++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 357 +++++++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 210 ++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 211 ++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 161 ++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 256 +++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 223 ++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 194 +++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 231 ++++++++ .../input.js | 7 + .../options.json | 3 + .../output.json | 419 +++++++++++++++ .../input.js | 7 + .../options.json | 3 + .../output.json | 360 +++++++++++++ .../input.js | 5 + .../options.json | 3 + .../output.json | 495 ++++++++++++++++++ .../input.js | 5 + .../options.json | 3 + .../output.json | 477 +++++++++++++++++ .../input.js | 4 + .../options.json | 3 + .../output.json | 412 +++++++++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 262 +++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 147 ++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 215 ++++++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 117 +++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 113 ++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 113 ++++ .../input.js | 1 + .../options.json | 3 + .../output.json | 172 ++++++ 184 files changed, 11221 insertions(+), 76 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-bare-style,-head-with-topic-reference-pair/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-bare-style,-head-with-topic-reference-pair/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-bare-style,-no-outer-topic-reference/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-bare-style,-no-outer-topic-reference/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-inner-topic-reference/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-inner-topic-reference/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-outer-topic-reference/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-outer-topic-reference/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-inner-topic-reference/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-inner-topic-reference/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-outer-topic-reference/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-outer-topic-reference/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-followed-by-bare-style-pipeline-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-followed-by-bare-style-pipeline-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-then-end/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-then-end/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-addition/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-addition/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-class-expression/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-class-expression/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-function-expression/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-function-expression/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-try-statement,-outer-topic-reference-in-catch-clause/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-try-statement,-outer-topic-reference-in-catch-clause/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-while-loop,-outer-topic-reference-in-loop-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-while-loop,-outer-topic-reference-in-loop-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-with-statement,-outer-topic-reference-in-with-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-with-statement,-outer-topic-reference-in-with-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unparenthesized-arrow-function-with-bare-parameter-and-bare-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unparenthesized-arrow-function-with-bare-parameter-and-bare-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-class-in-pipeline-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-class-in-pipeline-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-function-in-pipeline-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-function-in-pipeline-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-pipeline-head-in-inner-function-in-pipeline-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-pipeline-head-in-inner-function-in-pipeline-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index ab51bd0c90c1..ca2e6d8c2ffe 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -296,18 +296,19 @@ export default class ExpressionParser extends LValParser { } const op = this.state.type; - if (op === tt.nullishCoalescing) { + + if (op === tt.pipeline) { + this.checkPipelineAtInfixOperator(left, leftStartPos); + } else if (op === tt.nullishCoalescing) { this.expectPlugin("nullishCoalescingOperator"); - } else if (op === tt.pipeline) { - this.expectPlugin("pipelineOperator"); } this.next(); - const startPos = this.state.start; - const startLoc = this.state.startLoc; - - if (op === tt.pipeline) { + if ( + op === tt.pipeline && + "minimal" === this.getPluginOption("pipelineOperator", "proposal") + ) { if ( this.match(tt.name) && this.state.value === "await" && @@ -320,13 +321,7 @@ export default class ExpressionParser extends LValParser { } } - node.right = this.parseExprOp( - this.parseMaybeUnary(), - startPos, - startLoc, - op.rightAssociative ? prec - 1 : prec, - noIn, - ); + node.right = this.parseExprOpRightExpr(op, prec, noIn); this.finishNode( node, @@ -336,6 +331,7 @@ export default class ExpressionParser extends LValParser { ? "LogicalExpression" : "BinaryExpression", ); + return this.parseExprOp( node, leftStartPos, @@ -348,6 +344,55 @@ export default class ExpressionParser extends LValParser { return left; } + // Helper function for `parseExprOp`. Parse the right-hand side of binary- + // operator expressions, then apply any operator-specific functions. + + parseExprOpRightExpr( + op: TokenType, + prec: number, + noIn: ?boolean, + ): N.Expression { + switch (op) { + case tt.pipeline: + if ("smart" === this.getPluginOption("pipelineOperator", "proposal")) { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + return this.withTopicPermittingContext(() => { + return this.parseSmartPipelineBody( + this.parseExprOpBaseRightExpr(op, prec, noIn), + startPos, + startLoc, + ); + }); + } else { + return this.parseExprOpBaseRightExpr(op, prec, noIn); + } + + default: + return this.parseExprOpBaseRightExpr(op, prec, noIn); + } + } + + // Helper function for `parseExprOpRightExpr`. Parse the right-hand side of + // binary-operator expressions without applying any operator-specific functions. + + parseExprOpBaseRightExpr( + op: TokenType, + prec: number, + noIn: ?boolean, + ): N.Expression { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + + return this.parseExprOp( + this.parseMaybeUnary(), + startPos, + startLoc, + op.rightAssociative ? prec - 1 : prec, + noIn, + ); + } + // Parse unary operators, both prefix and postfix. parseMaybeUnary(refShorthandDefaultPos: ?Pos): N.Expression { @@ -886,6 +931,29 @@ export default class ExpressionParser extends LValParser { } } + case tt.primaryTopicReference: { + this.expectPlugin("pipelineOperator"); + node = this.startNode(); + + if ("smart" !== this.getPluginOption("pipelineOperator", "proposal")) { + this.raise( + node.start, + "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.", + ); + } + + this.next(); + if (this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) { + this.registerTopicReference(); + return this.finishNode(node, "PrimaryTopicReference"); + } else { + throw this.raise( + node.start, + `Topic reference was used in a lexical context without topic binding`, + ); + } + } + default: throw this.unexpected(); } @@ -1920,4 +1988,206 @@ export default class ExpressionParser extends LValParser { } return this.finishNode(node, "YieldExpression"); } + + // Validates a pipeline (for any of the pipeline Babylon plugins) at the point + // of the infix operator `|>`. + + checkPipelineAtInfixOperator(left: N.Expression, leftStartPos: number) { + this.expectPlugin("pipelineOperator"); + + if ("smart" === this.getPluginOption("pipelineOperator", "proposal")) { + this.checkSmartPipelineHeadEarlyErrors(left, leftStartPos); + } + } + + checkSmartPipelineHeadEarlyErrors(left: N.Expression, leftStartPos: number) { + if (left.type === "SequenceExpression") { + // Ensure that the pipeline head is not a comma-delimited + // sequence expression. + throw this.raise( + leftStartPos, + `Pipeline head may not be a comma-separated sequence expression`, + ); + } + } + + parseSmartPipelineBody( + childExpression: N.Expression, + startPos: number, + startLoc: Position, + ): N.PipelineBody { + const pipelineStyle = this.checkSmartPipelineBodyStyle(childExpression); + + this.checkSmartPipelineBodyEarlyErrors( + childExpression, + pipelineStyle, + startPos, + ); + + return this.parseSmartPipelineBodyInStyle( + childExpression, + pipelineStyle, + startPos, + startLoc, + ); + } + + checkSmartPipelineBodyEarlyErrors( + childExpression: N.Expression, + pipelineStyle: PipelineStyle, + startPos: number, + ): void { + if (this.match(tt.arrow)) { + // If the following token is invalidly `=>`, then throw a human-friendly error + // instead of something like 'Unexpected token, expected ";"'. + throw this.raise( + this.state.start, + `Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized`, + ); + } else if ( + pipelineStyle === "PipelineTopicExpression" && + childExpression.type === "SequenceExpression" + ) { + throw this.raise( + startPos, + `Pipeline body may not be a comma-separated sequence expression`, + ); + } + } + + parseSmartPipelineBodyInStyle( + childExpression: N.Expression, + pipelineStyle: PipelineStyle, + startPos: number, + startLoc: Position, + ): N.PipelineBody { + const bodyNode = this.startNodeAt(startPos, startLoc); + switch (pipelineStyle) { + case "PipelineBareFunction": + bodyNode.callee = childExpression; + break; + case "PipelineBareConstructor": + bodyNode.callee = childExpression.callee; + break; + case "PipelineBareAwaitedFunction": + bodyNode.callee = childExpression.argument; + break; + case "PipelineTopicExpression": + if (!this.topicReferenceWasUsedInCurrentTopicContext()) { + throw this.raise( + startPos, + `Pipeline is in topic style but does not use topic reference`, + ); + } + bodyNode.expression = childExpression; + break; + default: + throw this.raise(startPos, `Unknown pipeline style ${pipelineStyle}`); + } + return this.finishNode(bodyNode, pipelineStyle); + } + + checkSmartPipelineBodyStyle( + expression: N.Expression, + ): + | "PipelineBareFunction" + | "PipelineBareConstructor" + | "PipelineBareAwaitedFunction" + | "PipelineTopicExpression" { + switch (expression.type) { + case "NewExpression": + return this.isSimpleReference(expression.callee) + ? "PipelineBareConstructor" + : "PipelineTopicExpression"; + case "AwaitExpression": + return this.isSimpleReference(expression.argument) + ? "PipelineBareAwaitedFunction" + : "PipelineTopicExpression"; + default: + return this.isSimpleReference(expression) + ? "PipelineBareFunction" + : "PipelineTopicExpression"; + } + } + + isSimpleReference(expression: N.Expression): boolean { + switch (expression.type) { + case "MemberExpression": + return this.isSimpleReference(expression.object); + case "Identifier": + return true; + default: + return false; + } + } + + // Enable topic references from outer contexts within smart pipeline bodies. + // The function modifies the parser's topic-context state to enable or disable + // the use of topic references with the smartPipelines plugin. They then run a + // callback, then they reset the parser to the old topic-context state that it + // had before the function was called. + + withTopicPermittingContext(callback: () => T): T { + const outerContextTopicState = this.readTopicContextState(); + this.state.topicContextState = { + // Enable the use of the primary topic reference. + maxNumOfResolvableTopics: 1, + // Hide the use of any topic references from outer contexts. + maxTopicIndex: null, + }; + + const callbackResult = callback(); + + this.state.topicContextState = outerContextTopicState; + return callbackResult; + } + + // Disable topic references from outer contexts within syntax constructs + // such as the bodies of iteration statements. + // The function modifies the parser's topic-context state to enable or disable + // the use of topic references with the smartPipelines plugin. They then run a + // callback, then they reset the parser to the old topic-context state that it + // had before the function was called. + + withTopicForbiddingContext(callback: () => T): T { + const outerContextTopicState = this.readTopicContextState(); + this.state.topicContextState = { + // Disable the use of the primary topic reference. + maxNumOfResolvableTopics: 0, + // Hide the use of any topic references from outer contexts. + maxTopicIndex: null, + }; + + const callbackResult = callback(); + + this.state.topicContextState = outerContextTopicState; + return callbackResult; + } + + readTopicContextState(): tt.TopicContextState { + return this.state.topicContextState; + } + + // Register the use of a primary topic reference (`#`) within the current + // topic context. + registerTopicReference(): void { + this.state.topicContextState.maxTopicIndex = 0; + } + + primaryTopicReferenceIsAllowedInCurrentTopicContext(): boolean { + return this.state.topicContextState.maxNumOfResolvableTopics >= 1; + } + + topicReferenceWasUsedInCurrentTopicContext(): boolean { + return ( + this.state.topicContextState.maxTopicIndex != null && + this.state.topicContextState.maxTopicIndex >= 0 + ); + } } + +type PipelineStyle = + | "PipelineBareFunction" + | "PipelineBareConstructor" + | "PipelineBareAwaitedFunction" + | "PipelineTopicExpression"; diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 7bf7f55d07b5..041d8813e49d 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -364,8 +364,18 @@ export default class StatementParser extends ExpressionParser { parseDoStatement(node: N.DoWhileStatement): N.DoWhileStatement { this.next(); this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); + + node.body = + // For the smartPipelines plugin: Disable topic references from outer + // contexts within the loop body. They are permitted in test expressions, + // outside of the loop body. + this.withTopicForbiddingContext(() => + // Parse the loop body's body. + this.parseStatement(false), + ); + this.state.labels.pop(); + this.expect(tt._while); node.test = this.parseParenExpression(); this.eat(tt.semi); @@ -554,7 +564,17 @@ export default class StatementParser extends ExpressionParser { this.expectPlugin("optionalCatchBinding"); clause.param = null; } - clause.body = this.parseBlock(); + + clause.body = + // For the smartPipelines plugin: Disable topic references from outer + // contexts within the function body. They are permitted in function + // default-parameter expressions, which are part of the outer context, + // outside of the function body. + this.withTopicForbiddingContext(() => + // Parse the catch clause's body. + this.parseBlock(false), + ); + node.handler = this.finishNode(clause, "CatchClause"); } @@ -582,8 +602,18 @@ export default class StatementParser extends ExpressionParser { this.next(); node.test = this.parseParenExpression(); this.state.labels.push(loopLabel); - node.body = this.parseStatement(false); + + node.body = + // For the smartPipelines plugin: + // Disable topic references from outer contexts within the loop body. + // They are permitted in test expressions, outside of the loop body. + this.withTopicForbiddingContext(() => + // Parse loop body. + this.parseStatement(false), + ); + this.state.labels.pop(); + return this.finishNode(node, "WhileStatement"); } @@ -593,7 +623,17 @@ export default class StatementParser extends ExpressionParser { } this.next(); node.object = this.parseParenExpression(); - node.body = this.parseStatement(false); + + node.body = + // For the smartPipelines plugin: + // Disable topic references from outer contexts within the function body. + // They are permitted in function default-parameter expressions, which are + // part of the outer context, outside of the function body. + this.withTopicForbiddingContext(() => + // Parse the statement body. + this.parseStatement(false), + ); + return this.finishNode(node, "WithStatement"); } @@ -750,8 +790,18 @@ export default class StatementParser extends ExpressionParser { this.expect(tt.semi); node.update = this.match(tt.parenR) ? null : this.parseExpression(); this.expect(tt.parenR); - node.body = this.parseStatement(false); + + node.body = + // For the smartPipelines plugin: Disable topic references from outer + // contexts within the loop body. They are permitted in test expressions, + // outside of the loop body. + this.withTopicForbiddingContext(() => + // Parse the loop body. + this.parseStatement(false), + ); + this.state.labels.pop(); + return this.finishNode(node, "ForStatement"); } @@ -775,8 +825,18 @@ export default class StatementParser extends ExpressionParser { node.left = init; node.right = this.parseExpression(); this.expect(tt.parenR); - node.body = this.parseStatement(false); + + node.body = + // For the smartPipelines plugin: + // Disable topic references from outer contexts within the loop body. + // They are permitted in test expressions, outside of the loop body. + this.withTopicForbiddingContext(() => + // Parse loop body. + this.parseStatement(false), + ); + this.state.labels.pop(); + return this.finishNode(node, type); } @@ -879,11 +939,18 @@ export default class StatementParser extends ExpressionParser { if (isStatement) this.state.inGenerator = node.generator; this.parseFunctionParams(node); - this.parseFunctionBodyAndFinish( - node, - isStatement ? "FunctionDeclaration" : "FunctionExpression", - allowExpressionBody, - ); + + // For the smartPipelines plugin: Disable topic references from outer + // contexts within the function body. They are permitted in test + // expressions, outside of the function body. + this.withTopicForbiddingContext(() => { + // Parse the function body. + this.parseFunctionBodyAndFinish( + node, + isStatement ? "FunctionDeclaration" : "FunctionExpression", + allowExpressionBody, + ); + }); this.state.inFunction = oldInFunc; this.state.inMethod = oldInMethod; @@ -957,44 +1024,49 @@ export default class StatementParser extends ExpressionParser { this.expect(tt.braceL); - while (!this.eat(tt.braceR)) { - if (this.eat(tt.semi)) { - if (decorators.length > 0) { - this.raise( - this.state.lastTokEnd, - "Decorators must not be followed by a semicolon", - ); + // For the smartPipelines plugin: Disable topic references from outer + // contexts within the class body. They are permitted in test expressions, + // outside of the class body. + this.withTopicForbiddingContext(() => { + while (!this.eat(tt.braceR)) { + if (this.eat(tt.semi)) { + if (decorators.length > 0) { + this.raise( + this.state.lastTokEnd, + "Decorators must not be followed by a semicolon", + ); + } + continue; } - continue; - } - if (this.match(tt.at)) { - decorators.push(this.parseDecorator()); - continue; - } + if (this.match(tt.at)) { + decorators.push(this.parseDecorator()); + continue; + } - const member = this.startNode(); + const member = this.startNode(); - // steal the decorators if there are any - if (decorators.length) { - member.decorators = decorators; - this.resetStartLocationFromNode(member, decorators[0]); - decorators = []; - } + // steal the decorators if there are any + if (decorators.length) { + member.decorators = decorators; + this.resetStartLocationFromNode(member, decorators[0]); + decorators = []; + } - this.parseClassMember(classBody, member, state); + this.parseClassMember(classBody, member, state); - if ( - member.kind === "constructor" && - member.decorators && - member.decorators.length > 0 - ) { - this.raise( - member.start, - "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", - ); + if ( + member.kind === "constructor" && + member.decorators && + member.decorators.length > 0 + ) { + this.raise( + member.start, + "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?", + ); + } } - } + }); if (decorators.length) { this.raise( diff --git a/packages/babel-parser/src/plugin-utils.js b/packages/babel-parser/src/plugin-utils.js index 69cc39f7acb2..000507c8d715 100644 --- a/packages/babel-parser/src/plugin-utils.js +++ b/packages/babel-parser/src/plugin-utils.js @@ -38,7 +38,7 @@ export function getPluginOption( return null; } -const PIPELINE_PROPOSALS = ["minimal"]; +const PIPELINE_PROPOSALS = ["minimal", "smart"]; export function validatePlugins(plugins: PluginList) { if ( diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index a5655cadb465..658760c32e61 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -404,6 +404,43 @@ export default class Tokenizer extends LocationParser { // // All in the name of speed. // + readToken_numberSign(code: number): void { + if (this.state.pos === 0 && this.readToken_interpreter()) { + return; + } + + const nextPos = this.state.pos + 1; + const next = this.input.charCodeAt(nextPos); + // if (isIdentifierStart(next)) { + if ( + (this.hasPlugin("classPrivateProperties") || + this.hasPlugin("classPrivateMethods")) && + this.state.classLevel > 0 + ) { + ++this.state.pos; + this.finishToken(tt.hash); + return; + } else if ( + "smart" === this.getPluginOption("pipelineOperator", "proposal") + ) { + if (next >= charCodes.digit0 && next <= charCodes.digit9) { + this.raise( + this.state.pos, + `Unexpected digit after topic reference: '#${String.fromCodePoint( + next, + )}'`, + ); + } else { + this.finishOp(tt.primaryTopicReference, 1); + } + } else { + this.raise( + this.state.pos, + `Unexpected character '${codePointToString(code)}'`, + ); + } + } + readToken_dot(): void { const next = this.input.charCodeAt(this.state.pos + 1); if (next >= charCodes.digit0 && next <= charCodes.digit9) { @@ -651,25 +688,12 @@ export default class Tokenizer extends LocationParser { getTokenFromCode(code: number): void { switch (code) { - case charCodes.numberSign: - if (this.state.pos === 0 && this.readToken_interpreter()) { - return; - } + // The interpretation of a number sign "#" depends on whether it is + // followed by an identifier or not. - if ( - (this.hasPlugin("classPrivateProperties") || - this.hasPlugin("classPrivateMethods")) && - this.state.classLevel > 0 - ) { - ++this.state.pos; - this.finishToken(tt.hash); - return; - } else { - this.raise( - this.state.pos, - `Unexpected character '${codePointToString(code)}'`, - ); - } + case charCodes.numberSign: + this.readToken_numberSign(code); + return; // The interpretation of a dot depends on whether it is followed // by a digit or another two dots. diff --git a/packages/babel-parser/src/tokenizer/state.js b/packages/babel-parser/src/tokenizer/state.js index 364ceec96d32..536d81592434 100644 --- a/packages/babel-parser/src/tokenizer/state.js +++ b/packages/babel-parser/src/tokenizer/state.js @@ -33,6 +33,12 @@ export default class State { this.hasFlowComment = false; this.isIterator = false; + // Used by smartPipelines. + this.topicContextState = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: undefined, + }; + this.classLevel = 0; this.labels = []; @@ -111,6 +117,9 @@ export default class State { hasFlowComment: boolean; isIterator: boolean; + // For the smartPipelines plugin: + topicContextState: tt.TopicContextState; + // Check whether we are in a (nested) class or not. classLevel: number; diff --git a/packages/babel-parser/src/tokenizer/types.js b/packages/babel-parser/src/tokenizer/types.js index 050ca6c82065..1142a47f2446 100644 --- a/packages/babel-parser/src/tokenizer/types.js +++ b/packages/babel-parser/src/tokenizer/types.js @@ -86,6 +86,7 @@ export const types: { [name: string]: TokenType } = { regexp: new TokenType("regexp", { startsExpr }), string: new TokenType("string", { startsExpr }), name: new TokenType("name", { startsExpr }), + primaryTopicReference: new TokenType("#", { startsExpr }), eof: new TokenType("eof"), // Punctuation token types. @@ -199,3 +200,17 @@ export const keywords = { Object.keys(keywords).forEach(name => { types["_" + name] = keywords[name]; }); + +// A type for the smartPipelines plugin. +export type TopicContextState = { + // When a topic binding has been currently established, + // then this is 1. Otherwise, it is 0. This is forwards compatible + // with a future plugin for multiple lexical topics. + maxNumOfResolvableTopics: number, + + // When a topic binding has been currently established, and if that binding + // has been used as a topic reference `#`, then this is 0. Otherwise, it is + // `null`. This is forwards compatible with a future plugin for multiple + // lexical topics. + maxTopicIndex: null | 0, +}; diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 0a7d2d0f5271..7524c232b256 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -565,6 +565,32 @@ export type SequenceExpression = NodeBase & { expressions: $ReadOnlyArray, }; +// Pipelines + +export type PipelineBody = NodeBase & { + type: "PipelineBody", +}; + +export type PipelineBareFunctionBody = PipelineBody & { + type: "PipelineBareFunctionBody", + callee: Expression, +}; + +export type PipelineBareConstructorBody = PipelineBody & { + type: "PipelineBareConstructorBody", + callee: Expression, +}; + +export type PipelineBareAwaitedFunctionBody = PipelineBody & { + type: "PipelineBareAwaitedFunctionBody", + callee: Expression, +}; + +export type PipelineTopicBody = PipelineBody & { + type: "PipelineTopicBody", + expression: Expression, +}; + // Template Literals export type TemplateLiteral = NodeBase & { diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json index 188385c5ab0d..1697b4bdb73b 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json @@ -2,5 +2,5 @@ "plugins": [ ["pipelineOperator", { "proposal": "invalid" }] ], - "throws": "'pipelineOperator' requires 'proposal' option whose value should be one of: minimal" + "throws": "'pipelineOperator' requires 'proposal' option whose value should be one of: minimal, smart" } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/input.js new file mode 100644 index 000000000000..dfbeff94f212 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/input.js @@ -0,0 +1,6 @@ +async function af () { + let result = "hello" + |> await doubleSay + |> await text.capitalize + |> await a.b.exclaim; +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/options.json new file mode 100644 index 000000000000..8b9d7913160a --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/options.json @@ -0,0 +1,5 @@ +{ + "plugins": [ + ["pipelineOperator", { "proposal": "smart" }] + ] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/output.json new file mode 100644 index 000000000000..fd6424d6361a --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/output.json @@ -0,0 +1,401 @@ +{ + "type": "File", + "start": 0, + "end": 119, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 119, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 119, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "af" + }, + "name": "af" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, + "end": 119, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 25, + "end": 117, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 5, + "column": 23 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 29, + "end": 116, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 5, + "column": 22 + } + }, + "id": { + "type": "Identifier", + "start": 29, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "result" + }, + "name": "result" + }, + "init": { + "type": "BinaryExpression", + "start": 38, + "end": 116, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 5, + "column": 22 + } + }, + "left": { + "type": "BinaryExpression", + "start": 38, + "end": 93, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 4, + "column": 26 + } + }, + "left": { + "type": "BinaryExpression", + "start": 38, + "end": 66, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 3, + "column": 20 + } + }, + "left": { + "type": "StringLiteral", + "start": 38, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 51, + "end": 66, + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 20 + } + }, + "callee": { + "type": "Identifier", + "start": 57, + "end": 66, + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + }, + "identifierName": "doubleSay" + }, + "name": "doubleSay" + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 72, + "end": 93, + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 26 + } + }, + "callee": { + "type": "MemberExpression", + "start": 78, + "end": 93, + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 26 + } + }, + "object": { + "type": "Identifier", + "start": 78, + "end": 82, + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 15 + }, + "identifierName": "text" + }, + "name": "text" + }, + "property": { + "type": "Identifier", + "start": 83, + "end": 93, + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 26 + }, + "identifierName": "capitalize" + }, + "name": "capitalize" + }, + "computed": false + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 99, + "end": 116, + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 22 + } + }, + "callee": { + "type": "MemberExpression", + "start": 105, + "end": 116, + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 22 + } + }, + "object": { + "type": "MemberExpression", + "start": 105, + "end": 108, + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 14 + } + }, + "object": { + "type": "Identifier", + "start": 105, + "end": 106, + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 107, + "end": 108, + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + }, + "identifierName": "b" + }, + "name": "b" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 109, + "end": 116, + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 22 + }, + "identifierName": "exclaim" + }, + "name": "exclaim" + }, + "computed": false + } + } + } + } + ], + "kind": "let" + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/input.js new file mode 100644 index 000000000000..a78a3ae84428 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/input.js @@ -0,0 +1,3 @@ +async function af () { + x |> await number.inc |> await double; +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/output.json new file mode 100644 index 000000000000..5e0aa503463d --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/output.json @@ -0,0 +1,249 @@ +{ + "type": "File", + "start": 0, + "end": 65, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 65, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 65, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "af" + }, + "name": "af" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, + "end": 65, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 25, + "end": 63, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 40 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 25, + "end": 62, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 39 + } + }, + "left": { + "type": "BinaryExpression", + "start": 25, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "left": { + "type": "Identifier", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 30, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "callee": { + "type": "MemberExpression", + "start": 36, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 36, + "end": 42, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + }, + "identifierName": "number" + }, + "name": "number" + }, + "property": { + "type": "Identifier", + "start": 43, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 23 + }, + "identifierName": "inc" + }, + "name": "inc" + }, + "computed": false + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 50, + "end": 62, + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 39 + } + }, + "callee": { + "type": "Identifier", + "start": 56, + "end": 62, + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 39 + }, + "identifierName": "double" + }, + "name": "double" + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/input.js new file mode 100644 index 000000000000..c86dda49df36 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/input.js @@ -0,0 +1,3 @@ +async function af () { + value |> await a.b.f +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/output.json new file mode 100644 index 000000000000..aaf050332d53 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/output.json @@ -0,0 +1,234 @@ +{ + "type": "File", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "af" + }, + "name": "af" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 25, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 25, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "left": { + "type": "Identifier", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 34, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "callee": { + "type": "MemberExpression", + "start": 40, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "object": { + "type": "MemberExpression", + "start": 40, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 40, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 42, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + }, + "identifierName": "b" + }, + "name": "b" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 44, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + }, + "identifierName": "f" + }, + "name": "f" + }, + "computed": false + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/input.js new file mode 100644 index 000000000000..ff9045bd7262 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/input.js @@ -0,0 +1,3 @@ +async function af () { + value |> await f +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/output.json new file mode 100644 index 000000000000..50b19d2d745b --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/output.json @@ -0,0 +1,168 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "af" + }, + "name": "af" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 25, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 25, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "left": { + "type": "Identifier", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 34, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 40, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + }, + "identifierName": "f" + }, + "name": "f" + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/input.js new file mode 100644 index 000000000000..07827f96fbcd --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/input.js @@ -0,0 +1,4 @@ +let result = "hello" +|> new DoubleSay +|> new text.Capitalize +|> new a.b.Exclaim; diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/output.json new file mode 100644 index 000000000000..cdf86d3125da --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/output.json @@ -0,0 +1,348 @@ +{ + "type": "File", + "start": 0, + "end": 80, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 19 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 80, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 19 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 80, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 19 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 79, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "result" + }, + "name": "result" + }, + "init": { + "type": "BinaryExpression", + "start": 13, + "end": 79, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "left": { + "type": "BinaryExpression", + "start": 13, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 3, + "column": 22 + } + }, + "left": { + "type": "BinaryExpression", + "start": 13, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "left": { + "type": "StringLiteral", + "start": 13, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" + }, + "operator": "|>", + "right": { + "type": "PipelineBareConstructor", + "start": 24, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "callee": { + "type": "Identifier", + "start": 28, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + }, + "identifierName": "DoubleSay" + }, + "name": "DoubleSay" + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareConstructor", + "start": 41, + "end": 60, + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 22 + } + }, + "callee": { + "type": "MemberExpression", + "start": 45, + "end": 60, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 22 + } + }, + "object": { + "type": "Identifier", + "start": 45, + "end": 49, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 11 + }, + "identifierName": "text" + }, + "name": "text" + }, + "property": { + "type": "Identifier", + "start": 50, + "end": 60, + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 22 + }, + "identifierName": "Capitalize" + }, + "name": "Capitalize" + }, + "computed": false + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareConstructor", + "start": 64, + "end": 79, + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "callee": { + "type": "MemberExpression", + "start": 68, + "end": 79, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "object": { + "type": "MemberExpression", + "start": 68, + "end": 71, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + }, + "object": { + "type": "Identifier", + "start": 68, + "end": 69, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 70, + "end": 71, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + }, + "identifierName": "b" + }, + "name": "b" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 72, + "end": 79, + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 18 + }, + "identifierName": "Exclaim" + }, + "name": "Exclaim" + }, + "computed": false + } + } + } + } + ], + "kind": "let" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/input.js new file mode 100644 index 000000000000..39c48bad512f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/input.js @@ -0,0 +1 @@ +x => x |> new number.Inc |> new Double diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/output.json new file mode 100644 index 000000000000..4b4a0fb6af89 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/output.json @@ -0,0 +1,233 @@ +{ + "type": "File", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + } + ], + "body": { + "type": "BinaryExpression", + "start": 5, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "left": { + "type": "BinaryExpression", + "start": 5, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "left": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineBareConstructor", + "start": 10, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "callee": { + "type": "MemberExpression", + "start": 14, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "object": { + "type": "Identifier", + "start": 14, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 20 + }, + "identifierName": "number" + }, + "name": "number" + }, + "property": { + "type": "Identifier", + "start": 21, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 24 + }, + "identifierName": "Inc" + }, + "name": "Inc" + }, + "computed": false + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareConstructor", + "start": 28, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "callee": { + "type": "Identifier", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + }, + "identifierName": "Double" + }, + "name": "Double" + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/input.js new file mode 100644 index 000000000000..4a4ec7bcd357 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/input.js @@ -0,0 +1 @@ +x => x |> new F diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/output.json new file mode 100644 index 000000000000..1f6e4945bd06 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + } + ], + "body": { + "type": "BinaryExpression", + "start": 5, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "left": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineBareConstructor", + "start": 10, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "callee": { + "type": "Identifier", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "F" + }, + "name": "F" + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/input.js new file mode 100644 index 000000000000..f6b0bd49964b --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/input.js @@ -0,0 +1 @@ +x => x |> new a.F diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/output.json new file mode 100644 index 000000000000..dc9bbf5eab44 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/output.json @@ -0,0 +1,185 @@ +{ + "type": "File", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + } + ], + "body": { + "type": "BinaryExpression", + "start": 5, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "left": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineBareConstructor", + "start": 10, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "callee": { + "type": "MemberExpression", + "start": 14, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "object": { + "type": "Identifier", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "F" + }, + "name": "F" + }, + "computed": false + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/input.js new file mode 100644 index 000000000000..49a8129b058f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/input.js @@ -0,0 +1,4 @@ +let result = "hello" +|> doubleSay +|> text.capitalize +|> a.b.exclaim; diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/output.json new file mode 100644 index 000000000000..889bb7a69b62 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-multiline/output.json @@ -0,0 +1,348 @@ +{ + "type": "File", + "start": 0, + "end": 68, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 68, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 68, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 67, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "result" + }, + "name": "result" + }, + "init": { + "type": "BinaryExpression", + "start": 13, + "end": 67, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "left": { + "type": "BinaryExpression", + "start": 13, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 3, + "column": 18 + } + }, + "left": { + "type": "BinaryExpression", + "start": 13, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "left": { + "type": "StringLiteral", + "start": 13, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 24, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "callee": { + "type": "Identifier", + "start": 24, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "doubleSay" + }, + "name": "doubleSay" + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 37, + "end": 52, + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 18 + } + }, + "callee": { + "type": "MemberExpression", + "start": 37, + "end": 52, + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 18 + } + }, + "object": { + "type": "Identifier", + "start": 37, + "end": 41, + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 7 + }, + "identifierName": "text" + }, + "name": "text" + }, + "property": { + "type": "Identifier", + "start": 42, + "end": 52, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + }, + "identifierName": "capitalize" + }, + "name": "capitalize" + }, + "computed": false + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 56, + "end": 67, + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "callee": { + "type": "MemberExpression", + "start": 56, + "end": 67, + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "object": { + "type": "MemberExpression", + "start": 56, + "end": 59, + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 6 + } + }, + "object": { + "type": "Identifier", + "start": 56, + "end": 57, + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 4 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 58, + "end": 59, + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + }, + "identifierName": "b" + }, + "name": "b" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 60, + "end": 67, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 14 + }, + "identifierName": "exclaim" + }, + "name": "exclaim" + }, + "computed": false + } + } + } + } + ], + "kind": "let" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/input.js new file mode 100644 index 000000000000..253a8fdfddf9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/input.js @@ -0,0 +1 @@ +x => x |> number.inc |> double diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/output.json new file mode 100644 index 000000000000..71953d9db9ce --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-chained,-single-line-arrow-function/output.json @@ -0,0 +1,233 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + } + ], + "body": { + "type": "BinaryExpression", + "start": 5, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "left": { + "type": "BinaryExpression", + "start": 5, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "left": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 10, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "callee": { + "type": "MemberExpression", + "start": 10, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 10, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "number" + }, + "name": "number" + }, + "property": { + "type": "Identifier", + "start": 17, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 20 + }, + "identifierName": "inc" + }, + "name": "inc" + }, + "computed": false + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 24, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "callee": { + "type": "Identifier", + "start": 24, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 30 + }, + "identifierName": "double" + }, + "name": "double" + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/input.js new file mode 100644 index 000000000000..15a3d7657b9c --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/input.js @@ -0,0 +1 @@ +value |> f diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/output.json new file mode 100644 index 000000000000..0aef90100fb5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-identifier/output.json @@ -0,0 +1,115 @@ +{ + "type": "File", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "f" + }, + "name": "f" + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/input.js new file mode 100644 index 000000000000..9f9ac30d8f48 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/input.js @@ -0,0 +1 @@ +value |> a.b.c.f diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/output.json new file mode 100644 index 000000000000..0fbd40308b71 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-property/output.json @@ -0,0 +1,214 @@ +{ + "type": "File", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "callee": { + "type": "MemberExpression", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "object": { + "type": "MemberExpression", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "object": { + "type": "MemberExpression", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "object": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "b" + }, + "name": "b" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + }, + "identifierName": "c" + }, + "name": "c" + }, + "computed": false + }, + "property": { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "f" + }, + "name": "f" + }, + "computed": false + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-bare-style,-head-with-topic-reference-pair/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-bare-style,-head-with-topic-reference-pair/input.js new file mode 100644 index 000000000000..a93aa77bbd74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-bare-style,-head-with-topic-reference-pair/input.js @@ -0,0 +1 @@ +(1, 2) |> f; diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-bare-style,-head-with-topic-reference-pair/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-bare-style,-head-with-topic-reference-pair/options.json new file mode 100644 index 000000000000..c785202f2a0c --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-bare-style,-head-with-topic-reference-pair/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline head may not be a comma-separated sequence expression (1:0)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/input.js new file mode 100644 index 000000000000..b18a6404b537 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/input.js @@ -0,0 +1 @@ +x |> #42; diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/options.json new file mode 100644 index 000000000000..6d423c8c9d96 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Unexpected digit after topic reference: '#4' (1:5)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-bare-style,-no-outer-topic-reference/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-bare-style,-no-outer-topic-reference/input.js new file mode 100644 index 000000000000..194b4e64ed1f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-bare-style,-no-outer-topic-reference/input.js @@ -0,0 +1 @@ +x |> ($ => $ |> f) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-bare-style,-no-outer-topic-reference/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-bare-style,-no-outer-topic-reference/options.json new file mode 100644 index 000000000000..d2b32f77521a --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-bare-style,-no-outer-topic-reference/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:5)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-inner-topic-reference/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-inner-topic-reference/input.js new file mode 100644 index 000000000000..98e99a4493f1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-inner-topic-reference/input.js @@ -0,0 +1 @@ +x |> ($ => # |> $ + 1) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-inner-topic-reference/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-inner-topic-reference/options.json new file mode 100644 index 000000000000..e9eab6b46fe9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-inner-topic-reference/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:16)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-outer-topic-reference/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-outer-topic-reference/input.js new file mode 100644 index 000000000000..a4723737f3b5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-outer-topic-reference/input.js @@ -0,0 +1 @@ +x |> ($ => $ |> #) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-outer-topic-reference/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-outer-topic-reference/options.json new file mode 100644 index 000000000000..d2b32f77521a --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-arrow-function-with-topic-style,-no-outer-topic-reference/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:5)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-inner-topic-reference/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-inner-topic-reference/input.js new file mode 100644 index 000000000000..50b90bb9adf9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-inner-topic-reference/input.js @@ -0,0 +1 @@ +x |> (# |> f()) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-inner-topic-reference/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-inner-topic-reference/options.json new file mode 100644 index 000000000000..bdf0547df8f9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-inner-topic-reference/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:11)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-outer-topic-reference/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-outer-topic-reference/input.js new file mode 100644 index 000000000000..9d00837048ed --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-outer-topic-reference/input.js @@ -0,0 +1 @@ +x |> ($ |> f) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-outer-topic-reference/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-outer-topic-reference/options.json new file mode 100644 index 000000000000..d2b32f77521a --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-nested-pipelines,-topic-style-with-inner-topic-style,-no-outer-topic-reference/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:5)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-followed-by-bare-style-pipeline-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-followed-by-bare-style-pipeline-body/input.js new file mode 100644 index 000000000000..a6146afadab6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-followed-by-bare-style-pipeline-body/input.js @@ -0,0 +1 @@ +10 |> (#, #) |> h; diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-followed-by-bare-style-pipeline-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-followed-by-bare-style-pipeline-body/options.json new file mode 100644 index 000000000000..fe3873ecc67f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-followed-by-bare-style-pipeline-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline body may not be a comma-separated sequence expression (1:6)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-then-end/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-then-end/input.js new file mode 100644 index 000000000000..7da42e013c11 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-then-end/input.js @@ -0,0 +1 @@ +10 |> (#, #); diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-then-end/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-then-end/options.json new file mode 100644 index 000000000000..fe3873ecc67f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-sequence-style,-body-with-topic-reference-pair-then-end/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline body may not be a comma-separated sequence expression (1:6)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-addition/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-addition/input.js new file mode 100644 index 000000000000..e952adac15fd --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-addition/input.js @@ -0,0 +1 @@ +value |> a + b diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-addition/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-addition/options.json new file mode 100644 index 000000000000..7a4451381c91 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-addition/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:9)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-class-expression/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-class-expression/input.js new file mode 100644 index 000000000000..6ccb6ca13351 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-class-expression/input.js @@ -0,0 +1 @@ +value |> class { } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-class-expression/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-class-expression/options.json new file mode 100644 index 000000000000..7a4451381c91 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-class-expression/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:9)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-function-expression/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-function-expression/input.js new file mode 100644 index 000000000000..faf09879d637 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-function-expression/input.js @@ -0,0 +1 @@ +value |> function (x) { return; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-function-expression/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-function-expression/options.json new file mode 100644 index 000000000000..7a4451381c91 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-no-topic-reference,-function-expression/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:9)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-body/input.js new file mode 100644 index 000000000000..c1005576b7d5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-body/input.js @@ -0,0 +1 @@ +value |> do { do x += # while (x < 50); } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-body/options.json new file mode 100644 index 000000000000..3b7a52d71cf7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"], + "throws": "Topic reference was used in a lexical context without topic binding (1:22)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/input.js new file mode 100644 index 000000000000..261f95e4c7d2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/input.js @@ -0,0 +1,3 @@ +async function af () { + value |> do { for await (const e of sequence) #; } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/options.json new file mode 100644 index 000000000000..d4a1b64b4575 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions", "asyncGenerators"], + "throws": "Topic reference was used in a lexical context without topic binding (2:48)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-body/input.js new file mode 100644 index 000000000000..e0eb815c73fb --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-body/input.js @@ -0,0 +1 @@ +value |> do { for (let i = 0; i < n; i += 1) #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-body/options.json new file mode 100644 index 000000000000..35e8658a93da --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"], + "throws": "Topic reference was used in a lexical context without topic binding (1:45)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-body/input.js new file mode 100644 index 000000000000..f6ebfaf94818 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-body/input.js @@ -0,0 +1 @@ +value |> do { for (e in object) #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-body/options.json new file mode 100644 index 000000000000..6e8b4a6f0d95 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"], + "throws": "Topic reference was used in a lexical context without topic binding (1:32)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-body/input.js new file mode 100644 index 000000000000..b3350a5ad5e0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-body/input.js @@ -0,0 +1 @@ +value |> do { for (e of sequence) #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-body/options.json new file mode 100644 index 000000000000..a3707cc91710 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"], + "throws": "Topic reference was used in a lexical context without topic binding (1:34)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-try-statement,-outer-topic-reference-in-catch-clause/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-try-statement,-outer-topic-reference-in-catch-clause/input.js new file mode 100644 index 000000000000..bd64c4dd8768 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-try-statement,-outer-topic-reference-in-catch-clause/input.js @@ -0,0 +1,4 @@ +value |> do { + try { JSON.parse(#); } + catch (error) { console.error(#); } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-try-statement,-outer-topic-reference-in-catch-clause/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-try-statement,-outer-topic-reference-in-catch-clause/options.json new file mode 100644 index 000000000000..0f40a90d2204 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-try-statement,-outer-topic-reference-in-catch-clause/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"], + "throws": "Topic reference was used in a lexical context without topic binding (3:32)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-while-loop,-outer-topic-reference-in-loop-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-while-loop,-outer-topic-reference-in-loop-body/input.js new file mode 100644 index 000000000000..06cfc1f2bed0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-while-loop,-outer-topic-reference-in-loop-body/input.js @@ -0,0 +1 @@ +value |> do { while (x < 50) x += #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-while-loop,-outer-topic-reference-in-loop-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-while-loop,-outer-topic-reference-in-loop-body/options.json new file mode 100644 index 000000000000..a3707cc91710 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-while-loop,-outer-topic-reference-in-loop-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"], + "throws": "Topic reference was used in a lexical context without topic binding (1:34)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-with-statement,-outer-topic-reference-in-with-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-with-statement,-outer-topic-reference-in-with-body/input.js new file mode 100644 index 000000000000..4872290c9926 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-with-statement,-outer-topic-reference-in-with-body/input.js @@ -0,0 +1 @@ +value |> do { with ({}) #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-with-statement,-outer-topic-reference-in-with-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-with-statement,-outer-topic-reference-in-with-body/options.json new file mode 100644 index 000000000000..fee1ffebc044 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unbound-topic,-do-expression,-with-statement,-outer-topic-reference-in-with-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"], + "throws": "Topic reference was used in a lexical context without topic binding (1:24)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unparenthesized-arrow-function-with-bare-parameter-and-bare-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unparenthesized-arrow-function-with-bare-parameter-and-bare-body/input.js new file mode 100644 index 000000000000..00d1c2320d2f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unparenthesized-arrow-function-with-bare-parameter-and-bare-body/input.js @@ -0,0 +1 @@ +10 |> x => x + #; diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unparenthesized-arrow-function-with-bare-parameter-and-bare-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unparenthesized-arrow-function-with-bare-parameter-and-bare-body/options.json new file mode 100644 index 000000000000..a684795fbfb9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-unparenthesized-arrow-function-with-bare-parameter-and-bare-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized (1:8)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-class-in-pipeline-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-class-in-pipeline-body/input.js new file mode 100644 index 000000000000..a905d1b71159 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-class-in-pipeline-body/input.js @@ -0,0 +1 @@ +x |> class { constructor () { this.x = #; } } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-class-in-pipeline-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-class-in-pipeline-body/options.json new file mode 100644 index 000000000000..6401af97db12 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-class-in-pipeline-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Topic reference was used in a lexical context without topic binding (1:39)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-function-in-pipeline-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-function-in-pipeline-body/input.js new file mode 100644 index 000000000000..8af92dbefe4a --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-function-in-pipeline-body/input.js @@ -0,0 +1 @@ +x |> function () { # } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-function-in-pipeline-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-function-in-pipeline-body/options.json new file mode 100644 index 000000000000..e6731253189f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-inner-function-in-pipeline-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Topic reference was used in a lexical context without topic binding (1:19)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-pipeline-head-in-inner-function-in-pipeline-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-pipeline-head-in-inner-function-in-pipeline-body/input.js new file mode 100644 index 000000000000..818748040ed7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-pipeline-head-in-inner-function-in-pipeline-body/input.js @@ -0,0 +1 @@ +x |> function () { # |> # } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-pipeline-head-in-inner-function-in-pipeline-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-pipeline-head-in-inner-function-in-pipeline-body/options.json new file mode 100644 index 000000000000..e6731253189f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-pipeline-head-in-inner-function-in-pipeline-body/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Topic reference was used in a lexical context without topic binding (1:19)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/input.js new file mode 100644 index 000000000000..2d07bd7883dc --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/input.js @@ -0,0 +1 @@ +1 + # diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/options.json new file mode 100644 index 000000000000..79a8e0a3852e --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Topic reference was used in a lexical context without topic binding (1:4)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/input.js new file mode 100644 index 000000000000..a5a21763a8eb --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/input.js @@ -0,0 +1 @@ +x |> (() => # |> f) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/output.json new file mode 100644 index 000000000000..619f4e61b22b --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-bare-style/output.json @@ -0,0 +1,184 @@ +{ + "type": "File", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 5, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 6, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BinaryExpression", + "start": 12, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + }, + "identifierName": "f" + }, + "name": "f" + } + } + }, + "extra": { + "parenthesized": true, + "parenStart": 5 + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/input.js new file mode 100644 index 000000000000..e8fc8e430b8e --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/input.js @@ -0,0 +1 @@ +x |> ($ => # |> f(#, $)) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/output.json new file mode 100644 index 000000000000..b83895f5f4c3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-arrow-function-with-topic-style/output.json @@ -0,0 +1,251 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 5, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 6, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "$" + }, + "name": "$" + } + ], + "body": { + "type": "BinaryExpression", + "start": 11, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 16, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "CallExpression", + "start": 16, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "callee": { + "type": "Identifier", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "f" + }, + "name": "f" + }, + "arguments": [ + { + "type": "PrimaryTopicReference", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + }, + "identifierName": "$" + }, + "name": "$" + } + ] + } + } + }, + "extra": { + "parenthesized": true, + "parenStart": 5 + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/input.js new file mode 100644 index 000000000000..a462b80cbbd8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/input.js @@ -0,0 +1 @@ +x |> (# |> f) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/output.json new file mode 100644 index 000000000000..c2bc9ec1b75c --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-bare-style/output.json @@ -0,0 +1,165 @@ +{ + "type": "File", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 5, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "callee": { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "f" + }, + "name": "f" + } + }, + "extra": { + "parenthesized": true, + "parenStart": 5 + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/input.js new file mode 100644 index 000000000000..2668daa465d1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/input.js @@ -0,0 +1 @@ +x |> (# |> f(#, x)) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/output.json new file mode 100644 index 000000000000..683de81b9c6a --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-nested-pipelines,-topic-style-with-inner-topic-style/output.json @@ -0,0 +1,214 @@ +{ + "type": "File", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 5, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 6, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 11, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "expression": { + "type": "CallExpression", + "start": 11, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "f" + }, + "name": "f" + }, + "arguments": [ + { + "type": "PrimaryTopicReference", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Identifier", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "x" + }, + "name": "x" + } + ] + } + }, + "extra": { + "parenthesized": true, + "parenStart": 5 + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/input.js new file mode 100644 index 000000000000..0045c931d1e3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/input.js @@ -0,0 +1,7 @@ +async function af () { + let result = "hello" + |> # + '' + |> new DoubleSay + |> capitalize + |> await exclaim; +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/output.json new file mode 100644 index 000000000000..8f5a0c112d2e --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/output.json @@ -0,0 +1,384 @@ +{ + "type": "File", + "start": 0, + "end": 114, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 114, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 114, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "af" + }, + "name": "af" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, + "end": 114, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 25, + "end": 112, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 6, + "column": 19 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 29, + "end": 111, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + }, + "id": { + "type": "Identifier", + "start": 29, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "result" + }, + "name": "result" + }, + "init": { + "type": "BinaryExpression", + "start": 38, + "end": 111, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 6, + "column": 18 + } + }, + "left": { + "type": "BinaryExpression", + "start": 38, + "end": 92, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 5, + "column": 15 + } + }, + "left": { + "type": "BinaryExpression", + "start": 38, + "end": 76, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "left": { + "type": "BinaryExpression", + "start": 38, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "left": { + "type": "StringLiteral", + "start": 38, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 51, + "end": 57, + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 51, + "end": 57, + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 51, + "end": 52, + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "operator": "+", + "right": { + "type": "StringLiteral", + "start": 55, + "end": 57, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "extra": { + "rawValue": "", + "raw": "''" + }, + "value": "" + } + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareConstructor", + "start": 63, + "end": 76, + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 67, + "end": 76, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 18 + }, + "identifierName": "DoubleSay" + }, + "name": "DoubleSay" + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 82, + "end": 92, + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 15 + } + }, + "callee": { + "type": "Identifier", + "start": 82, + "end": 92, + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 15 + }, + "identifierName": "capitalize" + }, + "name": "capitalize" + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 98, + "end": 111, + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 18 + } + }, + "callee": { + "type": "Identifier", + "start": 104, + "end": 111, + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 18 + }, + "identifierName": "exclaim" + }, + "name": "exclaim" + } + } + } + } + ], + "kind": "let" + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/input.js new file mode 100644 index 000000000000..ed1cd16aad0f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/input.js @@ -0,0 +1,3 @@ +async function af () { + x |> inc |> await double |> # + 1 +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/output.json new file mode 100644 index 000000000000..2fa260909358 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/output.json @@ -0,0 +1,298 @@ +{ + "type": "File", + "start": 0, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "af" + }, + "name": "af" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, + "end": 60, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 25, + "end": 58, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 25, + "end": 58, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "left": { + "type": "BinaryExpression", + "start": 25, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "left": { + "type": "BinaryExpression", + "start": 25, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "left": { + "type": "Identifier", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 30, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 30, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + }, + "identifierName": "inc" + }, + "name": "inc" + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineBareAwaitedFunction", + "start": 37, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 43, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 26 + }, + "identifierName": "double" + }, + "name": "double" + } + } + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 53, + "end": 58, + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 53, + "end": 58, + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 53, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "operator": "+", + "right": { + "type": "NumericLiteral", + "start": 57, + "end": 58, + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/input.js new file mode 100644 index 000000000000..9d3fa9212120 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/input.js @@ -0,0 +1 @@ +value |> # + 1 diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/output.json new file mode 100644 index 000000000000..8f9687369fc5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-first/output.json @@ -0,0 +1,149 @@ +{ + "type": "File", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "NumericLiteral", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/input.js new file mode 100644 index 000000000000..64ea7f0bcd1e --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/input.js @@ -0,0 +1 @@ +value |> 1 + # diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/output.json new file mode 100644 index 000000000000..844200b657a3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-addition,-single-line-arrow-function,-topic-reference-last/output.json @@ -0,0 +1,149 @@ +{ + "type": "File", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "left": { + "type": "NumericLiteral", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + }, + "operator": "+", + "right": { + "type": "PrimaryTopicReference", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/input.js new file mode 100644 index 000000000000..e5917937bc70 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/input.js @@ -0,0 +1 @@ +value |> do { do x += 1; while (x < #); } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/output.json new file mode 100644 index 000000000000..338ed0d21c54 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-do-while-loop,-outer-topic-reference-in-loop-head/output.json @@ -0,0 +1,262 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "body": [ + { + "type": "DoWhileStatement", + "start": 14, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": { + "type": "ExpressionStatement", + "start": 17, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 17, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "operator": "+=", + "left": { + "type": "Identifier", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "NumericLiteral", + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + }, + "test": { + "type": "BinaryExpression", + "start": 32, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "left": { + "type": "Identifier", + "start": 32, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 33 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "<", + "right": { + "type": "PrimaryTopicReference", + "start": 36, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 37 + } + } + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/input.js new file mode 100644 index 000000000000..197761dcd742 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/input.js @@ -0,0 +1,3 @@ +async function af () { + value |> do { for await (const e of #) e; } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/options.json new file mode 100644 index 000000000000..791fe8252d11 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions", "asyncGenerators"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/output.json new file mode 100644 index 000000000000..727bcebb1146 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-await-of-loop,-outer-topic-reference-in-loop-head/output.json @@ -0,0 +1,298 @@ +{ + "type": "File", + "start": 0, + "end": 70, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 70, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 70, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "af" + }, + "name": "af" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, + "end": 70, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 25, + "end": 68, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 45 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 25, + "end": 68, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 45 + } + }, + "left": { + "type": "Identifier", + "start": 25, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 34, + "end": 68, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 45 + } + }, + "expression": { + "type": "DoExpression", + "start": 34, + "end": 68, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 45 + } + }, + "body": { + "type": "BlockStatement", + "start": 37, + "end": 68, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 45 + } + }, + "body": [ + { + "type": "ForOfStatement", + "start": 39, + "end": 66, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 43 + } + }, + "await": true, + "left": { + "type": "VariableDeclaration", + "start": 50, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 34 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 56, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 56, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 34 + }, + "identifierName": "e" + }, + "name": "e" + }, + "init": null + } + ], + "kind": "const" + }, + "right": { + "type": "PrimaryTopicReference", + "start": 61, + "end": 62, + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "body": { + "type": "ExpressionStatement", + "start": 64, + "end": 66, + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 43 + } + }, + "expression": { + "type": "Identifier", + "start": 64, + "end": 65, + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 42 + }, + "identifierName": "e" + }, + "name": "e" + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/input.js new file mode 100644 index 000000000000..1e14a50cda84 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/input.js @@ -0,0 +1 @@ +value |> do { for (let i = #; predicate(i, #); i += #) i; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/output.json new file mode 100644 index 000000000000..39abf98f7e6d --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-classic-loop,-outer-topic-reference-in-loop-head/output.json @@ -0,0 +1,357 @@ +{ + "type": "File", + "start": 0, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 59, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 59 + } + }, + "body": [ + { + "type": "ForStatement", + "start": 14, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "init": { + "type": "VariableDeclaration", + "start": 19, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "id": { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + }, + "identifierName": "i" + }, + "name": "i" + }, + "init": { + "type": "PrimaryTopicReference", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + } + } + } + } + ], + "kind": "let" + }, + "test": { + "type": "CallExpression", + "start": 30, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "callee": { + "type": "Identifier", + "start": 30, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 39 + }, + "identifierName": "predicate" + }, + "name": "predicate" + }, + "arguments": [ + { + "type": "Identifier", + "start": 40, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 41 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "PrimaryTopicReference", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 44 + } + } + } + ] + }, + "update": { + "type": "AssignmentExpression", + "start": 47, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 53 + } + }, + "operator": "+=", + "left": { + "type": "Identifier", + "start": 47, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 47 + }, + "end": { + "line": 1, + "column": 48 + }, + "identifierName": "i" + }, + "name": "i" + }, + "right": { + "type": "PrimaryTopicReference", + "start": 52, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 52 + }, + "end": { + "line": 1, + "column": 53 + } + } + } + }, + "body": { + "type": "ExpressionStatement", + "start": 55, + "end": 57, + "loc": { + "start": { + "line": 1, + "column": 55 + }, + "end": { + "line": 1, + "column": 57 + } + }, + "expression": { + "type": "Identifier", + "start": 55, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 55 + }, + "end": { + "line": 1, + "column": 56 + }, + "identifierName": "i" + }, + "name": "i" + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/input.js new file mode 100644 index 000000000000..096c359535e5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/input.js @@ -0,0 +1 @@ +value |> do { for (e in #) e; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/output.json new file mode 100644 index 000000000000..eddca7faa4b9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-in-loop,-outer-topic-reference-in-loop-head/output.json @@ -0,0 +1,210 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "body": [ + { + "type": "ForInStatement", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "left": { + "type": "Identifier", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + }, + "identifierName": "e" + }, + "name": "e" + }, + "right": { + "type": "PrimaryTopicReference", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "body": { + "type": "ExpressionStatement", + "start": 27, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "Identifier", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "e" + }, + "name": "e" + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/input.js new file mode 100644 index 000000000000..b3e5f40ef7fd --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/input.js @@ -0,0 +1 @@ +value |> do { for (e of #) e; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/output.json new file mode 100644 index 000000000000..79f6c6b771be --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-for-of-loop,-outer-topic-reference-in-loop-head/output.json @@ -0,0 +1,211 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "body": [ + { + "type": "ForOfStatement", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "await": false, + "left": { + "type": "Identifier", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + }, + "identifierName": "e" + }, + "name": "e" + }, + "right": { + "type": "PrimaryTopicReference", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "body": { + "type": "ExpressionStatement", + "start": 27, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "expression": { + "type": "Identifier", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "e" + }, + "name": "e" + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/input.js new file mode 100644 index 000000000000..f78ceb724f12 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/input.js @@ -0,0 +1 @@ +value |> do { #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/output.json new file mode 100644 index 000000000000..c1394ed9d8f0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-identity/output.json @@ -0,0 +1,161 @@ +{ + "type": "File", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 14, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "expression": { + "type": "PrimaryTopicReference", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/input.js new file mode 100644 index 000000000000..b4c8778046ed --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/input.js @@ -0,0 +1 @@ +value |> do { if (yes) null; else if (no) #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/output.json new file mode 100644 index 000000000000..7900de3f1399 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-body/output.json @@ -0,0 +1,256 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 14, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "test": { + "type": "Identifier", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "yes" + }, + "name": "yes" + }, + "consequent": { + "type": "ExpressionStatement", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "expression": { + "type": "NullLiteral", + "start": 23, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 27 + } + } + } + }, + "alternate": { + "type": "IfStatement", + "start": 34, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "test": { + "type": "Identifier", + "start": 38, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + }, + "identifierName": "no" + }, + "name": "no" + }, + "consequent": { + "type": "ExpressionStatement", + "start": 42, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "expression": { + "type": "PrimaryTopicReference", + "start": 42, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 42 + }, + "end": { + "line": 1, + "column": 43 + } + } + } + }, + "alternate": null + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/input.js new file mode 100644 index 000000000000..0b1fd66aaa3c --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/input.js @@ -0,0 +1 @@ +value |> do { if (yes) null; else #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/output.json new file mode 100644 index 000000000000..4bd2a955d177 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-else-if-body/output.json @@ -0,0 +1,223 @@ +{ + "type": "File", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 14, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "test": { + "type": "Identifier", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "yes" + }, + "name": "yes" + }, + "consequent": { + "type": "ExpressionStatement", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "expression": { + "type": "NullLiteral", + "start": 23, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 27 + } + } + } + }, + "alternate": { + "type": "ExpressionStatement", + "start": 34, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "expression": { + "type": "PrimaryTopicReference", + "start": 34, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 35 + } + } + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/input.js new file mode 100644 index 000000000000..bd64bfb5b763 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/input.js @@ -0,0 +1 @@ +value |> do { if (yes) #; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/output.json new file mode 100644 index 000000000000..11c2656ea035 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-body/output.json @@ -0,0 +1,194 @@ +{ + "type": "File", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 14, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "test": { + "type": "Identifier", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "yes" + }, + "name": "yes" + }, + "consequent": { + "type": "ExpressionStatement", + "start": 23, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "expression": { + "type": "PrimaryTopicReference", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + } + } + }, + "alternate": null + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/input.js new file mode 100644 index 000000000000..8457c4e57f71 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/input.js @@ -0,0 +1 @@ +value |> do { if (#) 1; else 0; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/output.json new file mode 100644 index 000000000000..48d8f663f2cb --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-if-statement,-outer-topic-reference-in-if-head/output.json @@ -0,0 +1,231 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 14, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "test": { + "type": "PrimaryTopicReference", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "consequent": { + "type": "ExpressionStatement", + "start": 21, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + }, + "alternate": { + "type": "ExpressionStatement", + "start": 29, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 29, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/input.js new file mode 100644 index 000000000000..c9562d43181c --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/input.js @@ -0,0 +1,7 @@ +value |> do { + switch (number) { + case 0: #; + case 1: # + 1; + default: # + 10; + } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/output.json new file mode 100644 index 000000000000..f4e627647b9e --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-body/output.json @@ -0,0 +1,419 @@ +{ + "type": "File", + "start": 0, + "end": 94, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 94, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 94, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 94, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 94, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 94, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 94, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "body": [ + { + "type": "SwitchStatement", + "start": 16, + "end": 92, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + }, + "discriminant": { + "type": "Identifier", + "start": 24, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + }, + "identifierName": "number" + }, + "name": "number" + }, + "cases": [ + { + "type": "SwitchCase", + "start": 38, + "end": 48, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 14 + } + }, + "consequent": [ + { + "type": "ExpressionStatement", + "start": 46, + "end": 48, + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 14 + } + }, + "expression": { + "type": "PrimaryTopicReference", + "start": 46, + "end": 47, + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "test": { + "type": "NumericLiteral", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + }, + { + "type": "SwitchCase", + "start": 53, + "end": 67, + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "consequent": [ + { + "type": "ExpressionStatement", + "start": 61, + "end": 67, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 61, + "end": 66, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 61, + "end": 62, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "operator": "+", + "right": { + "type": "NumericLiteral", + "start": 65, + "end": 66, + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + } + ], + "test": { + "type": "NumericLiteral", + "start": 58, + "end": 59, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + }, + { + "type": "SwitchCase", + "start": 72, + "end": 88, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 20 + } + }, + "consequent": [ + { + "type": "ExpressionStatement", + "start": 81, + "end": 88, + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 20 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 81, + "end": 87, + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 19 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 81, + "end": 82, + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "operator": "+", + "right": { + "type": "NumericLiteral", + "start": 85, + "end": 87, + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 19 + } + }, + "extra": { + "rawValue": 10, + "raw": "10" + }, + "value": 10 + } + } + } + ], + "test": null + } + ] + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/input.js new file mode 100644 index 000000000000..77e4a2ddcf2f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/input.js @@ -0,0 +1,7 @@ +value |> do { + switch (#) { + case 0: 50; + case 1: 60; + default: 70; + } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/output.json new file mode 100644 index 000000000000..c7c865a8e291 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-switch-statement,-outer-topic-reference-in-switch-head/output.json @@ -0,0 +1,360 @@ +{ + "type": "File", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "body": [ + { + "type": "SwitchStatement", + "start": 16, + "end": 81, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + }, + "discriminant": { + "type": "PrimaryTopicReference", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "cases": [ + { + "type": "SwitchCase", + "start": 33, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "consequent": [ + { + "type": "ExpressionStatement", + "start": 41, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 41, + "end": 43, + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 14 + } + }, + "extra": { + "rawValue": 50, + "raw": "50" + }, + "value": 50 + } + } + ], + "test": { + "type": "NumericLiteral", + "start": 38, + "end": 39, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + }, + { + "type": "SwitchCase", + "start": 49, + "end": 60, + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "consequent": [ + { + "type": "ExpressionStatement", + "start": 57, + "end": 60, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 15 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 57, + "end": 59, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "extra": { + "rawValue": 60, + "raw": "60" + }, + "value": 60 + } + } + ], + "test": { + "type": "NumericLiteral", + "start": 54, + "end": 55, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + }, + { + "type": "SwitchCase", + "start": 65, + "end": 77, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 16 + } + }, + "consequent": [ + { + "type": "ExpressionStatement", + "start": 74, + "end": 77, + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 16 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 74, + "end": 76, + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 15 + } + }, + "extra": { + "rawValue": 70, + "raw": "70" + }, + "value": 70 + } + } + ], + "test": null + } + ] + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/input.js new file mode 100644 index 000000000000..46ec28c2e777 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/input.js @@ -0,0 +1,5 @@ +value |> do { + try { JSON.parse(whatever); } + catch (error) { console.error(error); } + finally { something(#); } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/output.json new file mode 100644 index 000000000000..07af94d070ab --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-finally-clause-with-catch-and-finally/output.json @@ -0,0 +1,495 @@ +{ + "type": "File", + "start": 0, + "end": 117, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 117, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 117, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 117, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 117, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 117, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 117, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 16, + "end": 115, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 4, + "column": 27 + } + }, + "block": { + "type": "BlockStatement", + "start": 20, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 31 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 22, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 29 + } + }, + "expression": { + "type": "CallExpression", + "start": 22, + "end": 42, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 28 + } + }, + "callee": { + "type": "MemberExpression", + "start": 22, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "object": { + "type": "Identifier", + "start": 22, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "JSON" + }, + "name": "JSON" + }, + "property": { + "type": "Identifier", + "start": 27, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + }, + "identifierName": "parse" + }, + "name": "parse" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 33, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + }, + "identifierName": "whatever" + }, + "name": "whatever" + } + ] + } + } + ], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 48, + "end": 87, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "param": { + "type": "Identifier", + "start": 55, + "end": 60, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 14 + }, + "identifierName": "error" + }, + "name": "error" + }, + "body": { + "type": "BlockStatement", + "start": 62, + "end": 87, + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 64, + "end": 85, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 39 + } + }, + "expression": { + "type": "CallExpression", + "start": 64, + "end": 84, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 64, + "end": 77, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 31 + } + }, + "object": { + "type": "Identifier", + "start": 64, + "end": 71, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 25 + }, + "identifierName": "console" + }, + "name": "console" + }, + "property": { + "type": "Identifier", + "start": 72, + "end": 77, + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 31 + }, + "identifierName": "error" + }, + "name": "error" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 78, + "end": 83, + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 37 + }, + "identifierName": "error" + }, + "name": "error" + } + ] + } + } + ], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": { + "type": "BlockStatement", + "start": 98, + "end": 115, + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 27 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 100, + "end": 113, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 25 + } + }, + "expression": { + "type": "CallExpression", + "start": 100, + "end": 112, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 24 + } + }, + "callee": { + "type": "Identifier", + "start": 100, + "end": 109, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 21 + }, + "identifierName": "something" + }, + "name": "something" + }, + "arguments": [ + { + "type": "PrimaryTopicReference", + "start": 110, + "end": 111, + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ] + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/input.js new file mode 100644 index 000000000000..dd034b608161 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/input.js @@ -0,0 +1,5 @@ +value |> do { + try { JSON.parse(#); } + catch (error) { console.error(error); } + finally { something(); } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/output.json new file mode 100644 index 000000000000..c9b09e909864 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch-and-finally/output.json @@ -0,0 +1,477 @@ +{ + "type": "File", + "start": 0, + "end": 109, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 109, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 109, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 109, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 109, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 109, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 109, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 16, + "end": 107, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 4, + "column": 26 + } + }, + "block": { + "type": "BlockStatement", + "start": 20, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 24 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 22, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "expression": { + "type": "CallExpression", + "start": 22, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 21 + } + }, + "callee": { + "type": "MemberExpression", + "start": 22, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "object": { + "type": "Identifier", + "start": 22, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "JSON" + }, + "name": "JSON" + }, + "property": { + "type": "Identifier", + "start": 27, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + }, + "identifierName": "parse" + }, + "name": "parse" + }, + "computed": false + }, + "arguments": [ + { + "type": "PrimaryTopicReference", + "start": 33, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ] + } + } + ], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 41, + "end": 80, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "param": { + "type": "Identifier", + "start": 48, + "end": 53, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 14 + }, + "identifierName": "error" + }, + "name": "error" + }, + "body": { + "type": "BlockStatement", + "start": 55, + "end": 80, + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 57, + "end": 78, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 39 + } + }, + "expression": { + "type": "CallExpression", + "start": 57, + "end": 77, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 57, + "end": 70, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 31 + } + }, + "object": { + "type": "Identifier", + "start": 57, + "end": 64, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 25 + }, + "identifierName": "console" + }, + "name": "console" + }, + "property": { + "type": "Identifier", + "start": 65, + "end": 70, + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 31 + }, + "identifierName": "error" + }, + "name": "error" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 71, + "end": 76, + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 37 + }, + "identifierName": "error" + }, + "name": "error" + } + ] + } + } + ], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": { + "type": "BlockStatement", + "start": 91, + "end": 107, + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 26 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 93, + "end": 105, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 24 + } + }, + "expression": { + "type": "CallExpression", + "start": 93, + "end": 104, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 23 + } + }, + "callee": { + "type": "Identifier", + "start": 93, + "end": 102, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 21 + }, + "identifierName": "something" + }, + "name": "something" + }, + "arguments": [] + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/input.js new file mode 100644 index 000000000000..70eb5263f217 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/input.js @@ -0,0 +1,4 @@ +value |> do { + try { JSON.parse(#); } + catch (error) { console.error(error); } +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/output.json new file mode 100644 index 000000000000..976398843dd9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-try-statement,-outer-topic-reference-in-try-clause-with-catch/output.json @@ -0,0 +1,412 @@ +{ + "type": "File", + "start": 0, + "end": 82, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 82, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 82, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 82, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 82, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 82, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 82, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 16, + "end": 80, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "block": { + "type": "BlockStatement", + "start": 20, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 24 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 22, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "expression": { + "type": "CallExpression", + "start": 22, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 21 + } + }, + "callee": { + "type": "MemberExpression", + "start": 22, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "object": { + "type": "Identifier", + "start": 22, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "JSON" + }, + "name": "JSON" + }, + "property": { + "type": "Identifier", + "start": 27, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + }, + "identifierName": "parse" + }, + "name": "parse" + }, + "computed": false + }, + "arguments": [ + { + "type": "PrimaryTopicReference", + "start": 33, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ] + } + } + ], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 41, + "end": 80, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "param": { + "type": "Identifier", + "start": 48, + "end": 53, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 14 + }, + "identifierName": "error" + }, + "name": "error" + }, + "body": { + "type": "BlockStatement", + "start": 55, + "end": 80, + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 41 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 57, + "end": 78, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 39 + } + }, + "expression": { + "type": "CallExpression", + "start": 57, + "end": 77, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 57, + "end": 70, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 31 + } + }, + "object": { + "type": "Identifier", + "start": 57, + "end": 64, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 25 + }, + "identifierName": "console" + }, + "name": "console" + }, + "property": { + "type": "Identifier", + "start": 65, + "end": 70, + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 31 + }, + "identifierName": "error" + }, + "name": "error" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 71, + "end": 76, + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 37 + }, + "identifierName": "error" + }, + "name": "error" + } + ] + } + } + ], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/input.js new file mode 100644 index 000000000000..be802107159e --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/input.js @@ -0,0 +1 @@ +value |> do { while (x < #) x += 1; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/output.json new file mode 100644 index 000000000000..6c5dbb28a304 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-do-expression,-while-loop,-outer-topic-reference-in-loop-head/output.json @@ -0,0 +1,262 @@ +{ + "type": "File", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "expression": { + "type": "DoExpression", + "start": 9, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "body": { + "type": "BlockStatement", + "start": 12, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "body": [ + { + "type": "WhileStatement", + "start": 14, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "test": { + "type": "BinaryExpression", + "start": 21, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "left": { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 22 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "<", + "right": { + "type": "PrimaryTopicReference", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + }, + "body": { + "type": "ExpressionStatement", + "start": 28, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 28, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "operator": "+=", + "left": { + "type": "Identifier", + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 29 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "NumericLiteral", + "start": 33, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/input.js new file mode 100644 index 000000000000..e8678f6a2bb1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/input.js @@ -0,0 +1 @@ +value |> f(#) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/output.json new file mode 100644 index 000000000000..3c4b198f1d9c --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-call,-identifier-with-topic-reference/output.json @@ -0,0 +1,147 @@ +{ + "type": "File", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "expression": { + "type": "CallExpression", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "callee": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "f" + }, + "name": "f" + }, + "arguments": [ + { + "type": "PrimaryTopicReference", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ] + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/input.js new file mode 100644 index 000000000000..432d1c9ed8c7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/input.js @@ -0,0 +1 @@ +value |> function (x = #) { return x; } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/output.json new file mode 100644 index 000000000000..6aea657b9d0c --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-function-definition,-outer-topic-reference-in-default-parameter-expression/output.json @@ -0,0 +1,215 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "expression": { + "type": "FunctionExpression", + "start": 9, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "AssignmentPattern", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "left": { + "type": "Identifier", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 20 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "PrimaryTopicReference", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 24 + } + } + } + } + ], + "body": { + "type": "BlockStatement", + "start": 26, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 28, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "argument": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + }, + "identifierName": "x" + }, + "name": "x" + } + } + ], + "directives": [] + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/input.js new file mode 100644 index 000000000000..a7abc2dc18f7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/input.js @@ -0,0 +1 @@ +value |> (#) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/output.json new file mode 100644 index 000000000000..e3c00951e0ca --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-parenthesized/output.json @@ -0,0 +1,117 @@ +{ + "type": "File", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "expression": { + "type": "PrimaryTopicReference", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "extra": { + "parenthesized": true, + "parenStart": 9 + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/input.js new file mode 100644 index 000000000000..a18cbd0f1bb2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/input.js @@ -0,0 +1 @@ +value |> # diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/output.json new file mode 100644 index 000000000000..24779f851b61 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-identity,-unparenthesized/output.json @@ -0,0 +1,113 @@ +{ + "type": "File", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "PrimaryTopicReference", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/input.js new file mode 100644 index 000000000000..a18cbd0f1bb2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/input.js @@ -0,0 +1 @@ +value |> # diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/options.json new file mode 100644 index 000000000000..887155e27e68 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "pipelineOperator"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/output.json new file mode 100644 index 000000000000..24779f851b61 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-mixed-pipeline-plugins/output.json @@ -0,0 +1,113 @@ +{ + "type": "File", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "PrimaryTopicReference", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/input.js new file mode 100644 index 000000000000..7f3f814efd71 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/input.js @@ -0,0 +1 @@ +value |> (() => # + 1) diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/output.json new file mode 100644 index 000000000000..6d82768d86bc --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-parenthesized-single-line-arrow-function,-with-empty-parameter-list-and-bare-addition-body/output.json @@ -0,0 +1,172 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 9, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 10, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BinaryExpression", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "left": { + "type": "PrimaryTopicReference", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "operator": "+", + "right": { + "type": "NumericLiteral", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + }, + "extra": { + "parenthesized": true, + "parenStart": 9 + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file From ef0f723fc53285ef87699f7a74999055e8e1ff45 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 12 Jul 2018 22:46:34 -0400 Subject: [PATCH 002/563] Reverse yoda conditions If "smart" proposal is, we'll no longer say. --- packages/babel-parser/src/parser/expression.js | 6 +++--- packages/babel-parser/src/tokenizer/index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index ca2e6d8c2ffe..33cc0b8eabd6 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -307,7 +307,7 @@ export default class ExpressionParser extends LValParser { if ( op === tt.pipeline && - "minimal" === this.getPluginOption("pipelineOperator", "proposal") + this.getPluginOption("pipelineOperator", "proposal") === "minimal" ) { if ( this.match(tt.name) && @@ -354,7 +354,7 @@ export default class ExpressionParser extends LValParser { ): N.Expression { switch (op) { case tt.pipeline: - if ("smart" === this.getPluginOption("pipelineOperator", "proposal")) { + if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { const startPos = this.state.start; const startLoc = this.state.startLoc; return this.withTopicPermittingContext(() => { @@ -1995,7 +1995,7 @@ export default class ExpressionParser extends LValParser { checkPipelineAtInfixOperator(left: N.Expression, leftStartPos: number) { this.expectPlugin("pipelineOperator"); - if ("smart" === this.getPluginOption("pipelineOperator", "proposal")) { + if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { this.checkSmartPipelineHeadEarlyErrors(left, leftStartPos); } } diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 658760c32e61..6464167ef849 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -421,7 +421,7 @@ export default class Tokenizer extends LocationParser { this.finishToken(tt.hash); return; } else if ( - "smart" === this.getPluginOption("pipelineOperator", "proposal") + this.getPluginOption("pipelineOperator", "proposal") === "smart" ) { if (next >= charCodes.digit0 && next <= charCodes.digit9) { this.raise( From b50fdc191e745169666286a4bf8cc6b074e31424 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 12 Jul 2018 22:47:45 -0400 Subject: [PATCH 003/563] Inline function checkSmartPipelineHeadEarlyErrors It's only used once. --- .../babel-parser/src/parser/expression.js | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 33cc0b8eabd6..e26f77f1ab78 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -1996,18 +1996,14 @@ export default class ExpressionParser extends LValParser { this.expectPlugin("pipelineOperator"); if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { - this.checkSmartPipelineHeadEarlyErrors(left, leftStartPos); - } - } - - checkSmartPipelineHeadEarlyErrors(left: N.Expression, leftStartPos: number) { - if (left.type === "SequenceExpression") { - // Ensure that the pipeline head is not a comma-delimited - // sequence expression. - throw this.raise( - leftStartPos, - `Pipeline head may not be a comma-separated sequence expression`, - ); + if (left.type === "SequenceExpression") { + // Ensure that the pipeline head is not a comma-delimited + // sequence expression. + throw this.raise( + leftStartPos, + `Pipeline head may not be a comma-separated sequence expression`, + ); + } } } From 00845709ce28c931603e93463fd14bb1162c0705 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 12 Jul 2018 22:48:53 -0400 Subject: [PATCH 004/563] Add comment for number sign --- packages/babel-parser/src/tokenizer/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 6464167ef849..f0cfb9e12ba3 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -403,7 +403,8 @@ export default class Tokenizer extends LocationParser { // into it. // // All in the name of speed. - // + + // number sign is "#" readToken_numberSign(code: number): void { if (this.state.pos === 0 && this.readToken_interpreter()) { return; From 718882015143b990c109b310e24ab2f87a66b48d Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 12 Jul 2018 22:55:01 -0400 Subject: [PATCH 005/563] Delete commented code --- packages/babel-parser/src/tokenizer/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index f0cfb9e12ba3..67346a8bce6b 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -412,7 +412,6 @@ export default class Tokenizer extends LocationParser { const nextPos = this.state.pos + 1; const next = this.input.charCodeAt(nextPos); - // if (isIdentifierStart(next)) { if ( (this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && From cc526940eec42616991b21baba9fee553b639232 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 12 Jul 2018 23:07:09 -0400 Subject: [PATCH 006/563] Quote proposals in error message --- packages/babel-parser/src/plugin-utils.js | 2 +- .../pipeline-operator/invalid-proposal/options.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/babel-parser/src/plugin-utils.js b/packages/babel-parser/src/plugin-utils.js index 000507c8d715..d8ed23d86df9 100644 --- a/packages/babel-parser/src/plugin-utils.js +++ b/packages/babel-parser/src/plugin-utils.js @@ -62,7 +62,7 @@ export function validatePlugins(plugins: PluginList) { ) { throw new Error( "'pipelineOperator' requires 'proposal' option whose value should be one of: " + - PIPELINE_PROPOSALS.join(", "), + PIPELINE_PROPOSALS.map(p => `'${p}'`).join(", "), ); } } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json index 1697b4bdb73b..109111d73a1a 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json @@ -2,5 +2,5 @@ "plugins": [ ["pipelineOperator", { "proposal": "invalid" }] ], - "throws": "'pipelineOperator' requires 'proposal' option whose value should be one of: minimal, smart" + "throws": "'pipelineOperator' requires 'proposal' option whose value should be one of: 'minimal', 'smart'" } From e91a02cc49f80423ee7c931e7711c49c04540f6b Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 12 Jul 2018 23:08:11 -0400 Subject: [PATCH 007/563] Reuse declared type in function return value --- packages/babel-parser/src/parser/expression.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index e26f77f1ab78..285787f12bbf 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -2083,13 +2083,7 @@ export default class ExpressionParser extends LValParser { return this.finishNode(bodyNode, pipelineStyle); } - checkSmartPipelineBodyStyle( - expression: N.Expression, - ): - | "PipelineBareFunction" - | "PipelineBareConstructor" - | "PipelineBareAwaitedFunction" - | "PipelineTopicExpression" { + checkSmartPipelineBodyStyle(expression: N.Expression): PipelineStyle { switch (expression.type) { case "NewExpression": return this.isSimpleReference(expression.callee) From b847d40842ebbdcdfc0c206f943d9af0740eea64 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 12 Jul 2018 23:10:07 -0400 Subject: [PATCH 008/563] Inline readTopicContextState method --- packages/babel-parser/src/parser/expression.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 285787f12bbf..49cd37faf36c 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -2118,7 +2118,7 @@ export default class ExpressionParser extends LValParser { // had before the function was called. withTopicPermittingContext(callback: () => T): T { - const outerContextTopicState = this.readTopicContextState(); + const outerContextTopicState = this.state.topicContextState; this.state.topicContextState = { // Enable the use of the primary topic reference. maxNumOfResolvableTopics: 1, @@ -2140,7 +2140,7 @@ export default class ExpressionParser extends LValParser { // had before the function was called. withTopicForbiddingContext(callback: () => T): T { - const outerContextTopicState = this.readTopicContextState(); + const outerContextTopicState = this.state.topicContextState; this.state.topicContextState = { // Disable the use of the primary topic reference. maxNumOfResolvableTopics: 0, @@ -2154,10 +2154,6 @@ export default class ExpressionParser extends LValParser { return callbackResult; } - readTopicContextState(): tt.TopicContextState { - return this.state.topicContextState; - } - // Register the use of a primary topic reference (`#`) within the current // topic context. registerTopicReference(): void { From 7931f4c241fbde60b38ba589f879f42dc83d9543 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 12 Jul 2018 23:11:55 -0400 Subject: [PATCH 009/563] Rename topicContextState -> .topicContext --- .../babel-parser/src/parser/expression.js | 20 +++++++++---------- packages/babel-parser/src/tokenizer/state.js | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 49cd37faf36c..c71b952ad1c3 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -2118,8 +2118,8 @@ export default class ExpressionParser extends LValParser { // had before the function was called. withTopicPermittingContext(callback: () => T): T { - const outerContextTopicState = this.state.topicContextState; - this.state.topicContextState = { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { // Enable the use of the primary topic reference. maxNumOfResolvableTopics: 1, // Hide the use of any topic references from outer contexts. @@ -2128,7 +2128,7 @@ export default class ExpressionParser extends LValParser { const callbackResult = callback(); - this.state.topicContextState = outerContextTopicState; + this.state.topicContext = outerContextTopicState; return callbackResult; } @@ -2140,8 +2140,8 @@ export default class ExpressionParser extends LValParser { // had before the function was called. withTopicForbiddingContext(callback: () => T): T { - const outerContextTopicState = this.state.topicContextState; - this.state.topicContextState = { + const outerContextTopicState = this.state.topicContext; + this.state.topicContext = { // Disable the use of the primary topic reference. maxNumOfResolvableTopics: 0, // Hide the use of any topic references from outer contexts. @@ -2150,24 +2150,24 @@ export default class ExpressionParser extends LValParser { const callbackResult = callback(); - this.state.topicContextState = outerContextTopicState; + this.state.topicContext = outerContextTopicState; return callbackResult; } // Register the use of a primary topic reference (`#`) within the current // topic context. registerTopicReference(): void { - this.state.topicContextState.maxTopicIndex = 0; + this.state.topicContext.maxTopicIndex = 0; } primaryTopicReferenceIsAllowedInCurrentTopicContext(): boolean { - return this.state.topicContextState.maxNumOfResolvableTopics >= 1; + return this.state.topicContext.maxNumOfResolvableTopics >= 1; } topicReferenceWasUsedInCurrentTopicContext(): boolean { return ( - this.state.topicContextState.maxTopicIndex != null && - this.state.topicContextState.maxTopicIndex >= 0 + this.state.topicContext.maxTopicIndex != null && + this.state.topicContext.maxTopicIndex >= 0 ); } } diff --git a/packages/babel-parser/src/tokenizer/state.js b/packages/babel-parser/src/tokenizer/state.js index 536d81592434..c520f4388322 100644 --- a/packages/babel-parser/src/tokenizer/state.js +++ b/packages/babel-parser/src/tokenizer/state.js @@ -34,7 +34,7 @@ export default class State { this.isIterator = false; // Used by smartPipelines. - this.topicContextState = { + this.topicContext = { maxNumOfResolvableTopics: 0, maxTopicIndex: undefined, }; From 6e41edb90f1b831d474fa53cae14dbd6f194c33f Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Sun, 22 Jul 2018 17:58:51 -0400 Subject: [PATCH 010/563] Fix TopicContextState type in Flow --- packages/babel-parser/src/tokenizer/state.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/babel-parser/src/tokenizer/state.js b/packages/babel-parser/src/tokenizer/state.js index c520f4388322..936d3a5dc2e2 100644 --- a/packages/babel-parser/src/tokenizer/state.js +++ b/packages/babel-parser/src/tokenizer/state.js @@ -6,7 +6,7 @@ import { Position } from "../util/location"; import { types as ct, type TokContext } from "./context"; import type { Token } from "./index"; -import { types as tt, type TokenType } from "./types"; +import { types as tt, type TokenType, type TopicContextState } from "./types"; export default class State { init(options: Options, input: string): void { @@ -36,7 +36,7 @@ export default class State { // Used by smartPipelines. this.topicContext = { maxNumOfResolvableTopics: 0, - maxTopicIndex: undefined, + maxTopicIndex: null, }; this.classLevel = 0; @@ -118,7 +118,7 @@ export default class State { isIterator: boolean; // For the smartPipelines plugin: - topicContextState: tt.TopicContextState; + topicContext: TopicContextState; // Check whether we are in a (nested) class or not. classLevel: number; From afd0638b741602635adcc244aad6668b5e8a7526 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Sun, 22 Jul 2018 18:46:31 -0400 Subject: [PATCH 011/563] Reuse hash token instead of new primaryTopicToken Set whether we're in a pipeline in order to determine how to parse the hash. The error message changes as a result, since the `hash` never enters the block. --- .../babel-parser/src/parser/expression.js | 41 +++++++++++-------- packages/babel-parser/src/tokenizer/index.js | 2 +- packages/babel-parser/src/tokenizer/state.js | 2 + packages/babel-parser/src/tokenizer/types.js | 1 - .../options.json | 2 +- 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index c71b952ad1c3..b04e26bac37c 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -298,6 +298,7 @@ export default class ExpressionParser extends LValParser { const op = this.state.type; if (op === tt.pipeline) { + this.state.inPipeline = true; this.checkPipelineAtInfixOperator(left, leftStartPos); } else if (op === tt.nullishCoalescing) { this.expectPlugin("nullishCoalescingOperator"); @@ -931,26 +932,30 @@ export default class ExpressionParser extends LValParser { } } - case tt.primaryTopicReference: { - this.expectPlugin("pipelineOperator"); - node = this.startNode(); + case tt.hash: { + if (this.state.inPipeline) { + this.expectPlugin("pipelineOperator"); + node = this.startNode(); - if ("smart" !== this.getPluginOption("pipelineOperator", "proposal")) { - this.raise( - node.start, - "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.", - ); - } + if ( + "smart" !== this.getPluginOption("pipelineOperator", "proposal") + ) { + this.raise( + node.start, + "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.", + ); + } - this.next(); - if (this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) { - this.registerTopicReference(); - return this.finishNode(node, "PrimaryTopicReference"); - } else { - throw this.raise( - node.start, - `Topic reference was used in a lexical context without topic binding`, - ); + this.next(); + if (this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) { + this.registerTopicReference(); + return this.finishNode(node, "PrimaryTopicReference"); + } else { + throw this.raise( + node.start, + `Topic reference was used in a lexical context without topic binding`, + ); + } } } diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 67346a8bce6b..69a845b52533 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -431,7 +431,7 @@ export default class Tokenizer extends LocationParser { )}'`, ); } else { - this.finishOp(tt.primaryTopicReference, 1); + this.finishOp(tt.hash, 1); } } else { this.raise( diff --git a/packages/babel-parser/src/tokenizer/state.js b/packages/babel-parser/src/tokenizer/state.js index 936d3a5dc2e2..1c71ada99def 100644 --- a/packages/babel-parser/src/tokenizer/state.js +++ b/packages/babel-parser/src/tokenizer/state.js @@ -26,6 +26,7 @@ export default class State { this.maybeInArrowParameters = false; this.inGenerator = false; this.inAsync = false; + this.inPipeline = false; this.inPropertyName = false; this.inType = false; this.inClassProperty = false; @@ -110,6 +111,7 @@ export default class State { inGenerator: boolean; inMethod: boolean | N.MethodKind; inAsync: boolean; + inPipeline: boolean; inType: boolean; noAnonFunctionType: boolean; inPropertyName: boolean; diff --git a/packages/babel-parser/src/tokenizer/types.js b/packages/babel-parser/src/tokenizer/types.js index 1142a47f2446..3c401f163f87 100644 --- a/packages/babel-parser/src/tokenizer/types.js +++ b/packages/babel-parser/src/tokenizer/types.js @@ -86,7 +86,6 @@ export const types: { [name: string]: TokenType } = { regexp: new TokenType("regexp", { startsExpr }), string: new TokenType("string", { startsExpr }), name: new TokenType("name", { startsExpr }), - primaryTopicReference: new TokenType("#", { startsExpr }), eof: new TokenType("eof"), // Punctuation token types. diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/options.json index 79a8e0a3852e..736cde0e101d 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-unbound-topic,-simple/options.json @@ -1,4 +1,4 @@ { "plugins": [["pipelineOperator", { "proposal": "smart" }]], - "throws": "Topic reference was used in a lexical context without topic binding (1:4)" + "throws": "Unexpected token (1:4)" } From 094ef31c01f7f65a3f44d608a87671fa90eff199 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Sun, 22 Jul 2018 18:50:29 -0400 Subject: [PATCH 012/563] Wrap callback in try/finally This ensures we clean up always if the callback throws. --- packages/babel-parser/src/parser/expression.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index b04e26bac37c..47a34a18eab7 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -2131,10 +2131,11 @@ export default class ExpressionParser extends LValParser { maxTopicIndex: null, }; - const callbackResult = callback(); - - this.state.topicContext = outerContextTopicState; - return callbackResult; + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } } // Disable topic references from outer contexts within syntax constructs @@ -2153,10 +2154,11 @@ export default class ExpressionParser extends LValParser { maxTopicIndex: null, }; - const callbackResult = callback(); - - this.state.topicContext = outerContextTopicState; - return callbackResult; + try { + return callback(); + } finally { + this.state.topicContext = outerContextTopicState; + } } // Register the use of a primary topic reference (`#`) within the current From 39e7ee6e651c73dba1eb68fea52a8a14e7814cc0 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Sun, 22 Jul 2018 18:55:12 -0400 Subject: [PATCH 013/563] Switch Pipeline types to extend NodeBase This doesn't work because the `type` values are not compatible. --- packages/babel-parser/src/types.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 7524c232b256..b658f7b0d715 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -571,22 +571,22 @@ export type PipelineBody = NodeBase & { type: "PipelineBody", }; -export type PipelineBareFunctionBody = PipelineBody & { +export type PipelineBareFunctionBody = NodeBase & { type: "PipelineBareFunctionBody", callee: Expression, }; -export type PipelineBareConstructorBody = PipelineBody & { +export type PipelineBareConstructorBody = NodeBase & { type: "PipelineBareConstructorBody", callee: Expression, }; -export type PipelineBareAwaitedFunctionBody = PipelineBody & { +export type PipelineBareAwaitedFunctionBody = NodeBase & { type: "PipelineBareAwaitedFunctionBody", callee: Expression, }; -export type PipelineTopicBody = PipelineBody & { +export type PipelineTopicBody = NodeBase & { type: "PipelineTopicBody", expression: Expression, }; From 11aee13ff2c3282034807e25ddb93cd98ae37217 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 9 Aug 2018 21:04:47 -0400 Subject: [PATCH 014/563] Swap Yoda condition --- packages/babel-parser/src/parser/expression.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 47a34a18eab7..135aa2bd330b 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -938,7 +938,7 @@ export default class ExpressionParser extends LValParser { node = this.startNode(); if ( - "smart" !== this.getPluginOption("pipelineOperator", "proposal") + this.getPluginOption("pipelineOperator", "proposal") !== "smart" ) { this.raise( node.start, From d1cae2dec292248b4f447c14ad15909b90653d04 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 9 Aug 2018 21:10:43 -0400 Subject: [PATCH 015/563] Remove unneeded comment This is no longer true, now that we return `tt.hash`. --- packages/babel-parser/src/tokenizer/index.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 69a845b52533..138e79d9c2c5 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -688,9 +688,6 @@ export default class Tokenizer extends LocationParser { getTokenFromCode(code: number): void { switch (code) { - // The interpretation of a number sign "#" depends on whether it is - // followed by an identifier or not. - case charCodes.numberSign: this.readToken_numberSign(code); return; From 15e6d844ae14b3312624e9ff49aa8d1b816db78e Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 9 Aug 2018 22:08:23 -0400 Subject: [PATCH 016/563] Remove additional parser logic These are parsable only in follow-on proposals, not in the base proposal, so we'll introduce that in a separate PR. --- .../babel-parser/src/parser/expression.js | 8 - .../input.js | 6 - .../options.json | 5 - .../output.json | 401 ------------------ .../input.js | 3 - .../options.json | 3 - .../output.json | 249 ----------- .../input.js | 3 - .../options.json | 3 - .../output.json | 234 ---------- .../input.js | 3 - .../options.json | 3 - .../output.json | 168 -------- .../input.js | 4 - .../options.json | 3 - .../output.json | 348 --------------- .../input.js | 1 - .../options.json | 3 - .../output.json | 233 ---------- .../input.js | 1 - .../options.json | 3 - .../output.json | 152 ------- .../input.js | 1 - .../options.json | 3 - .../output.json | 185 -------- .../input.js | 7 - .../options.json | 3 - .../output.json | 384 ----------------- .../input.js | 3 - .../options.json | 3 - .../output.json | 298 ------------- 31 files changed, 2724 deletions(-) delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 135aa2bd330b..2e50be642368 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -2090,14 +2090,6 @@ export default class ExpressionParser extends LValParser { checkSmartPipelineBodyStyle(expression: N.Expression): PipelineStyle { switch (expression.type) { - case "NewExpression": - return this.isSimpleReference(expression.callee) - ? "PipelineBareConstructor" - : "PipelineTopicExpression"; - case "AwaitExpression": - return this.isSimpleReference(expression.argument) - ? "PipelineBareAwaitedFunction" - : "PipelineTopicExpression"; default: return this.isSimpleReference(expression) ? "PipelineBareFunction" diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/input.js deleted file mode 100644 index dfbeff94f212..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/input.js +++ /dev/null @@ -1,6 +0,0 @@ -async function af () { - let result = "hello" - |> await doubleSay - |> await text.capitalize - |> await a.b.exclaim; -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/options.json deleted file mode 100644 index 8b9d7913160a..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/options.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "plugins": [ - ["pipelineOperator", { "proposal": "smart" }] - ] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/output.json deleted file mode 100644 index fd6424d6361a..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-multiline/output.json +++ /dev/null @@ -1,401 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 119, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 6, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 119, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 6, - "column": 1 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "FunctionDeclaration", - "start": 0, - "end": 119, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 6, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 15, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "af" - }, - "name": "af" - }, - "generator": false, - "async": true, - "params": [], - "body": { - "type": "BlockStatement", - "start": 21, - "end": 119, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 6, - "column": 1 - } - }, - "body": [ - { - "type": "VariableDeclaration", - "start": 25, - "end": 117, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 5, - "column": 23 - } - }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 29, - "end": 116, - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 5, - "column": 22 - } - }, - "id": { - "type": "Identifier", - "start": 29, - "end": 35, - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 12 - }, - "identifierName": "result" - }, - "name": "result" - }, - "init": { - "type": "BinaryExpression", - "start": 38, - "end": 116, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 5, - "column": 22 - } - }, - "left": { - "type": "BinaryExpression", - "start": 38, - "end": 93, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 4, - "column": 26 - } - }, - "left": { - "type": "BinaryExpression", - "start": 38, - "end": 66, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 3, - "column": 20 - } - }, - "left": { - "type": "StringLiteral", - "start": 38, - "end": 45, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 22 - } - }, - "extra": { - "rawValue": "hello", - "raw": "\"hello\"" - }, - "value": "hello" - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 51, - "end": 66, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 20 - } - }, - "callee": { - "type": "Identifier", - "start": 57, - "end": 66, - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - }, - "identifierName": "doubleSay" - }, - "name": "doubleSay" - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 72, - "end": 93, - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 26 - } - }, - "callee": { - "type": "MemberExpression", - "start": 78, - "end": 93, - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 26 - } - }, - "object": { - "type": "Identifier", - "start": 78, - "end": 82, - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 15 - }, - "identifierName": "text" - }, - "name": "text" - }, - "property": { - "type": "Identifier", - "start": 83, - "end": 93, - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 26 - }, - "identifierName": "capitalize" - }, - "name": "capitalize" - }, - "computed": false - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 99, - "end": 116, - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 22 - } - }, - "callee": { - "type": "MemberExpression", - "start": 105, - "end": 116, - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 22 - } - }, - "object": { - "type": "MemberExpression", - "start": 105, - "end": 108, - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 14 - } - }, - "object": { - "type": "Identifier", - "start": 105, - "end": 106, - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - }, - "identifierName": "a" - }, - "name": "a" - }, - "property": { - "type": "Identifier", - "start": 107, - "end": 108, - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 14 - }, - "identifierName": "b" - }, - "name": "b" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 109, - "end": 116, - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 22 - }, - "identifierName": "exclaim" - }, - "name": "exclaim" - }, - "computed": false - } - } - } - } - ], - "kind": "let" - } - ], - "directives": [] - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/input.js deleted file mode 100644 index a78a3ae84428..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/input.js +++ /dev/null @@ -1,3 +0,0 @@ -async function af () { - x |> await number.inc |> await double; -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/output.json deleted file mode 100644 index 5e0aa503463d..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-chained,-single-line/output.json +++ /dev/null @@ -1,249 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 65, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 65, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "FunctionDeclaration", - "start": 0, - "end": 65, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 15, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "af" - }, - "name": "af" - }, - "generator": false, - "async": true, - "params": [], - "body": { - "type": "BlockStatement", - "start": 21, - "end": 65, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 25, - "end": 63, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 40 - } - }, - "expression": { - "type": "BinaryExpression", - "start": 25, - "end": 62, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 39 - } - }, - "left": { - "type": "BinaryExpression", - "start": 25, - "end": 46, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 23 - } - }, - "left": { - "type": "Identifier", - "start": 25, - "end": 26, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 3 - }, - "identifierName": "x" - }, - "name": "x" - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 30, - "end": 46, - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 23 - } - }, - "callee": { - "type": "MemberExpression", - "start": 36, - "end": 46, - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 23 - } - }, - "object": { - "type": "Identifier", - "start": 36, - "end": 42, - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - }, - "identifierName": "number" - }, - "name": "number" - }, - "property": { - "type": "Identifier", - "start": 43, - "end": 46, - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 23 - }, - "identifierName": "inc" - }, - "name": "inc" - }, - "computed": false - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 50, - "end": 62, - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 39 - } - }, - "callee": { - "type": "Identifier", - "start": 56, - "end": 62, - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 39 - }, - "identifierName": "double" - }, - "name": "double" - } - } - } - } - ], - "directives": [] - } - } - ], - "directives": [] - } -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/input.js deleted file mode 100644 index c86dda49df36..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/input.js +++ /dev/null @@ -1,3 +0,0 @@ -async function af () { - value |> await a.b.f -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/output.json deleted file mode 100644 index aaf050332d53..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-nested-property/output.json +++ /dev/null @@ -1,234 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 47, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 47, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "FunctionDeclaration", - "start": 0, - "end": 47, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 15, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "af" - }, - "name": "af" - }, - "generator": false, - "async": true, - "params": [], - "body": { - "type": "BlockStatement", - "start": 21, - "end": 47, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 25, - "end": 45, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 22 - } - }, - "expression": { - "type": "BinaryExpression", - "start": 25, - "end": 45, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 22 - } - }, - "left": { - "type": "Identifier", - "start": 25, - "end": 30, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 7 - }, - "identifierName": "value" - }, - "name": "value" - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 34, - "end": 45, - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 22 - } - }, - "callee": { - "type": "MemberExpression", - "start": 40, - "end": 45, - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 22 - } - }, - "object": { - "type": "MemberExpression", - "start": 40, - "end": 43, - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 20 - } - }, - "object": { - "type": "Identifier", - "start": 40, - "end": 41, - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 18 - }, - "identifierName": "a" - }, - "name": "a" - }, - "property": { - "type": "Identifier", - "start": 42, - "end": 43, - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 20 - }, - "identifierName": "b" - }, - "name": "b" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 44, - "end": 45, - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 22 - }, - "identifierName": "f" - }, - "name": "f" - }, - "computed": false - } - } - } - } - ], - "directives": [] - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/input.js deleted file mode 100644 index ff9045bd7262..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/input.js +++ /dev/null @@ -1,3 +0,0 @@ -async function af () { - value |> await f -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/output.json deleted file mode 100644 index 50b19d2d745b..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-awaited-function-calls,-single,-single-identifier/output.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 43, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 43, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "FunctionDeclaration", - "start": 0, - "end": 43, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 15, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "af" - }, - "name": "af" - }, - "generator": false, - "async": true, - "params": [], - "body": { - "type": "BlockStatement", - "start": 21, - "end": 43, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 25, - "end": 41, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 18 - } - }, - "expression": { - "type": "BinaryExpression", - "start": 25, - "end": 41, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 18 - } - }, - "left": { - "type": "Identifier", - "start": 25, - "end": 30, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 7 - }, - "identifierName": "value" - }, - "name": "value" - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 34, - "end": 41, - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 18 - } - }, - "callee": { - "type": "Identifier", - "start": 40, - "end": 41, - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 18 - }, - "identifierName": "f" - }, - "name": "f" - } - } - } - } - ], - "directives": [] - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/input.js deleted file mode 100644 index 07827f96fbcd..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/input.js +++ /dev/null @@ -1,4 +0,0 @@ -let result = "hello" -|> new DoubleSay -|> new text.Capitalize -|> new a.b.Exclaim; diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/output.json deleted file mode 100644 index cdf86d3125da..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-multiline/output.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 80, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 19 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 80, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 19 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "VariableDeclaration", - "start": 0, - "end": 80, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 19 - } - }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 4, - "end": 79, - "loc": { - "start": { - "line": 1, - "column": 4 - }, - "end": { - "line": 4, - "column": 18 - } - }, - "id": { - "type": "Identifier", - "start": 4, - "end": 10, - "loc": { - "start": { - "line": 1, - "column": 4 - }, - "end": { - "line": 1, - "column": 10 - }, - "identifierName": "result" - }, - "name": "result" - }, - "init": { - "type": "BinaryExpression", - "start": 13, - "end": 79, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 4, - "column": 18 - } - }, - "left": { - "type": "BinaryExpression", - "start": 13, - "end": 60, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 3, - "column": 22 - } - }, - "left": { - "type": "BinaryExpression", - "start": 13, - "end": 37, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "left": { - "type": "StringLiteral", - "start": 13, - "end": 20, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 20 - } - }, - "extra": { - "rawValue": "hello", - "raw": "\"hello\"" - }, - "value": "hello" - }, - "operator": "|>", - "right": { - "type": "PipelineBareConstructor", - "start": 24, - "end": 37, - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "callee": { - "type": "Identifier", - "start": 28, - "end": 37, - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 16 - }, - "identifierName": "DoubleSay" - }, - "name": "DoubleSay" - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareConstructor", - "start": 41, - "end": 60, - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 22 - } - }, - "callee": { - "type": "MemberExpression", - "start": 45, - "end": 60, - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 22 - } - }, - "object": { - "type": "Identifier", - "start": 45, - "end": 49, - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 11 - }, - "identifierName": "text" - }, - "name": "text" - }, - "property": { - "type": "Identifier", - "start": 50, - "end": 60, - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 22 - }, - "identifierName": "Capitalize" - }, - "name": "Capitalize" - }, - "computed": false - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareConstructor", - "start": 64, - "end": 79, - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 18 - } - }, - "callee": { - "type": "MemberExpression", - "start": 68, - "end": 79, - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 18 - } - }, - "object": { - "type": "MemberExpression", - "start": 68, - "end": 71, - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - }, - "object": { - "type": "Identifier", - "start": 68, - "end": 69, - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - }, - "identifierName": "a" - }, - "name": "a" - }, - "property": { - "type": "Identifier", - "start": 70, - "end": 71, - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - }, - "identifierName": "b" - }, - "name": "b" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 72, - "end": 79, - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 18 - }, - "identifierName": "Exclaim" - }, - "name": "Exclaim" - }, - "computed": false - } - } - } - } - ], - "kind": "let" - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/input.js deleted file mode 100644 index 39c48bad512f..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/input.js +++ /dev/null @@ -1 +0,0 @@ -x => x |> new number.Inc |> new Double diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/output.json deleted file mode 100644 index 4b4a0fb6af89..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-chained,-single-line-arrow-function/output.json +++ /dev/null @@ -1,233 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 38, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 38 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 38, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 38 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 38, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 38 - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "start": 0, - "end": 38, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 38 - } - }, - "id": null, - "generator": false, - "async": false, - "params": [ - { - "type": "Identifier", - "start": 0, - "end": 1, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 1 - }, - "identifierName": "x" - }, - "name": "x" - } - ], - "body": { - "type": "BinaryExpression", - "start": 5, - "end": 38, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 38 - } - }, - "left": { - "type": "BinaryExpression", - "start": 5, - "end": 24, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 24 - } - }, - "left": { - "type": "Identifier", - "start": 5, - "end": 6, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 6 - }, - "identifierName": "x" - }, - "name": "x" - }, - "operator": "|>", - "right": { - "type": "PipelineBareConstructor", - "start": 10, - "end": 24, - "loc": { - "start": { - "line": 1, - "column": 10 - }, - "end": { - "line": 1, - "column": 24 - } - }, - "callee": { - "type": "MemberExpression", - "start": 14, - "end": 24, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 24 - } - }, - "object": { - "type": "Identifier", - "start": 14, - "end": 20, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 20 - }, - "identifierName": "number" - }, - "name": "number" - }, - "property": { - "type": "Identifier", - "start": 21, - "end": 24, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 24 - }, - "identifierName": "Inc" - }, - "name": "Inc" - }, - "computed": false - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareConstructor", - "start": 28, - "end": 38, - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 38 - } - }, - "callee": { - "type": "Identifier", - "start": 32, - "end": 38, - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 38 - }, - "identifierName": "Double" - }, - "name": "Double" - } - } - } - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/input.js deleted file mode 100644 index 4a4ec7bcd357..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/input.js +++ /dev/null @@ -1 +0,0 @@ -x => x |> new F diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/output.json deleted file mode 100644 index 1f6e4945bd06..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-identifier/output.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 15 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 15 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 15 - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "start": 0, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 15 - } - }, - "id": null, - "generator": false, - "async": false, - "params": [ - { - "type": "Identifier", - "start": 0, - "end": 1, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 1 - }, - "identifierName": "x" - }, - "name": "x" - } - ], - "body": { - "type": "BinaryExpression", - "start": 5, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 15 - } - }, - "left": { - "type": "Identifier", - "start": 5, - "end": 6, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 6 - }, - "identifierName": "x" - }, - "name": "x" - }, - "operator": "|>", - "right": { - "type": "PipelineBareConstructor", - "start": 10, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 10 - }, - "end": { - "line": 1, - "column": 15 - } - }, - "callee": { - "type": "Identifier", - "start": 14, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 15 - }, - "identifierName": "F" - }, - "name": "F" - } - } - } - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/input.js deleted file mode 100644 index f6b0bd49964b..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/input.js +++ /dev/null @@ -1 +0,0 @@ -x => x |> new a.F diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/output.json deleted file mode 100644 index dc9bbf5eab44..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-constructor-calls,-single,-property/output.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "start": 0, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "id": null, - "generator": false, - "async": false, - "params": [ - { - "type": "Identifier", - "start": 0, - "end": 1, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 1 - }, - "identifierName": "x" - }, - "name": "x" - } - ], - "body": { - "type": "BinaryExpression", - "start": 5, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "left": { - "type": "Identifier", - "start": 5, - "end": 6, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 6 - }, - "identifierName": "x" - }, - "name": "x" - }, - "operator": "|>", - "right": { - "type": "PipelineBareConstructor", - "start": 10, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 10 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "callee": { - "type": "MemberExpression", - "start": 14, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "object": { - "type": "Identifier", - "start": 14, - "end": 15, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 15 - }, - "identifierName": "a" - }, - "name": "a" - }, - "property": { - "type": "Identifier", - "start": 16, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "F" - }, - "name": "F" - }, - "computed": false - } - } - } - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/input.js deleted file mode 100644 index 0045c931d1e3..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/input.js +++ /dev/null @@ -1,7 +0,0 @@ -async function af () { - let result = "hello" - |> # + '' - |> new DoubleSay - |> capitalize - |> await exclaim; -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/output.json deleted file mode 100644 index 8f5a0c112d2e..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-multiline/output.json +++ /dev/null @@ -1,384 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 114, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 7, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 114, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 7, - "column": 1 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "FunctionDeclaration", - "start": 0, - "end": 114, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 7, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 15, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "af" - }, - "name": "af" - }, - "generator": false, - "async": true, - "params": [], - "body": { - "type": "BlockStatement", - "start": 21, - "end": 114, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 7, - "column": 1 - } - }, - "body": [ - { - "type": "VariableDeclaration", - "start": 25, - "end": 112, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 6, - "column": 19 - } - }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 29, - "end": 111, - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - }, - "id": { - "type": "Identifier", - "start": 29, - "end": 35, - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 12 - }, - "identifierName": "result" - }, - "name": "result" - }, - "init": { - "type": "BinaryExpression", - "start": 38, - "end": 111, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 6, - "column": 18 - } - }, - "left": { - "type": "BinaryExpression", - "start": 38, - "end": 92, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 5, - "column": 15 - } - }, - "left": { - "type": "BinaryExpression", - "start": 38, - "end": 76, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 4, - "column": 18 - } - }, - "left": { - "type": "BinaryExpression", - "start": 38, - "end": 57, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 3, - "column": 11 - } - }, - "left": { - "type": "StringLiteral", - "start": 38, - "end": 45, - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 22 - } - }, - "extra": { - "rawValue": "hello", - "raw": "\"hello\"" - }, - "value": "hello" - }, - "operator": "|>", - "right": { - "type": "PipelineTopicExpression", - "start": 51, - "end": 57, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 11 - } - }, - "expression": { - "type": "BinaryExpression", - "start": 51, - "end": 57, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 11 - } - }, - "left": { - "type": "PrimaryTopicReference", - "start": 51, - "end": 52, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "operator": "+", - "right": { - "type": "StringLiteral", - "start": 55, - "end": 57, - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 11 - } - }, - "extra": { - "rawValue": "", - "raw": "''" - }, - "value": "" - } - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareConstructor", - "start": 63, - "end": 76, - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - }, - "callee": { - "type": "Identifier", - "start": 67, - "end": 76, - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 18 - }, - "identifierName": "DoubleSay" - }, - "name": "DoubleSay" - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareFunction", - "start": 82, - "end": 92, - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 15 - } - }, - "callee": { - "type": "Identifier", - "start": 82, - "end": 92, - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 15 - }, - "identifierName": "capitalize" - }, - "name": "capitalize" - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 98, - "end": 111, - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 18 - } - }, - "callee": { - "type": "Identifier", - "start": 104, - "end": 111, - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 18 - }, - "identifierName": "exclaim" - }, - "name": "exclaim" - } - } - } - } - ], - "kind": "let" - } - ], - "directives": [] - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/input.js deleted file mode 100644 index ed1cd16aad0f..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/input.js +++ /dev/null @@ -1,3 +0,0 @@ -async function af () { - x |> inc |> await double |> # + 1 -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/output.json deleted file mode 100644 index 2fa260909358..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-style-mix,-single-line/output.json +++ /dev/null @@ -1,298 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 60, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 60, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "FunctionDeclaration", - "start": 0, - "end": 60, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 15, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "af" - }, - "name": "af" - }, - "generator": false, - "async": true, - "params": [], - "body": { - "type": "BlockStatement", - "start": 21, - "end": 60, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 25, - "end": 58, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 35 - } - }, - "expression": { - "type": "BinaryExpression", - "start": 25, - "end": 58, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 35 - } - }, - "left": { - "type": "BinaryExpression", - "start": 25, - "end": 49, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 26 - } - }, - "left": { - "type": "BinaryExpression", - "start": 25, - "end": 33, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 10 - } - }, - "left": { - "type": "Identifier", - "start": 25, - "end": 26, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 3 - }, - "identifierName": "x" - }, - "name": "x" - }, - "operator": "|>", - "right": { - "type": "PipelineBareFunction", - "start": 30, - "end": 33, - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - }, - "callee": { - "type": "Identifier", - "start": 30, - "end": 33, - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - }, - "identifierName": "inc" - }, - "name": "inc" - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineBareAwaitedFunction", - "start": 37, - "end": 49, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 26 - } - }, - "callee": { - "type": "Identifier", - "start": 43, - "end": 49, - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 26 - }, - "identifierName": "double" - }, - "name": "double" - } - } - }, - "operator": "|>", - "right": { - "type": "PipelineTopicExpression", - "start": 53, - "end": 58, - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 35 - } - }, - "expression": { - "type": "BinaryExpression", - "start": 53, - "end": 58, - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 35 - } - }, - "left": { - "type": "PrimaryTopicReference", - "start": 53, - "end": 54, - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "operator": "+", - "right": { - "type": "NumericLiteral", - "start": 57, - "end": 58, - "loc": { - "start": { - "line": 2, - "column": 34 - }, - "end": { - "line": 2, - "column": 35 - } - }, - "extra": { - "rawValue": 1, - "raw": "1" - }, - "value": 1 - } - } - } - } - } - ], - "directives": [] - } - } - ], - "directives": [] - } -} \ No newline at end of file From ba5642d4ee33dad7c66051613a85884bbc639736 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Thu, 9 Aug 2018 22:08:39 -0400 Subject: [PATCH 017/563] Add test for computer properties This seems to parse fine. Should it? --- .../input.js | 1 + .../options.json | 3 + .../output.json | 148 ++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/input.js new file mode 100644 index 000000000000..5a02dee8ec60 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/input.js @@ -0,0 +1 @@ +value |> a[b] diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/output.json new file mode 100644 index 000000000000..540ce0ba4002 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/output.json @@ -0,0 +1,148 @@ +{ + "type": "File", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "left": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "value" + }, + "name": "value" + }, + "operator": "|>", + "right": { + "type": "PipelineBareFunction", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "callee": { + "type": "MemberExpression", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "object": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "b" + }, + "name": "b" + }, + "computed": true + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file From 25d01460fdb017fee6ec1b812449f62a432759fb Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Fri, 10 Aug 2018 07:52:55 -0400 Subject: [PATCH 018/563] Fix error message for #4 case This impact private fields as well as smart pipeline, providing a clearer error message for both. --- packages/babel-parser/src/tokenizer/index.js | 15 +++++---------- .../failure-numeric-literal/options.json | 2 +- .../failure-numeric-start-identifier/options.json | 2 +- .../options.json | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 138e79d9c2c5..2c362e0c2467 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -412,6 +412,10 @@ export default class Tokenizer extends LocationParser { const nextPos = this.state.pos + 1; const next = this.input.charCodeAt(nextPos); + if (next >= charCodes.digit0 && next <= charCodes.digit9) { + this.raise(this.state.pos, "Unexpected digit after hash token"); + } + if ( (this.hasPlugin("classPrivateProperties") || this.hasPlugin("classPrivateMethods")) && @@ -423,16 +427,7 @@ export default class Tokenizer extends LocationParser { } else if ( this.getPluginOption("pipelineOperator", "proposal") === "smart" ) { - if (next >= charCodes.digit0 && next <= charCodes.digit9) { - this.raise( - this.state.pos, - `Unexpected digit after topic reference: '#${String.fromCodePoint( - next, - )}'`, - ); - } else { - this.finishOp(tt.hash, 1); - } + this.finishOp(tt.hash, 1); } else { this.raise( this.state.pos, diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json index dfd75111a543..03592e655ab9 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-literal/options.json @@ -1,4 +1,4 @@ { - "throws": "Unexpected token (2:3)", + "throws": "Unexpected digit after hash token (2:2)", "plugins": [ "classPrivateProperties" ] } diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-start-identifier/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-start-identifier/options.json index c1de1d488c13..2ba960820f02 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-start-identifier/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-numeric-start-identifier/options.json @@ -1,4 +1,4 @@ { - "throws": "Identifier directly after number (2:4)", + "throws": "Unexpected digit after hash token (2:2)", "plugins": ["classPrivateProperties"] } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/options.json index 6d423c8c9d96..a2f6f625f90c 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-invalid-hash-token,-followed-by-digit/options.json @@ -1,4 +1,4 @@ { "plugins": [["pipelineOperator", { "proposal": "smart" }]], - "throws": "Unexpected digit after topic reference: '#4' (1:5)" + "throws": "Unexpected digit after hash token (1:5)" } From 122906d5255dfef9075284f5e505dd84b1951535 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Fri, 10 Aug 2018 08:06:38 -0400 Subject: [PATCH 019/563] Verify if MemberExpression is computed If a property access is computed, e.g. a[b], then it's in topic style. Currently, this isn't accounted for. Test & change ensures this doesn't parse. --- .../babel-parser/src/parser/expression.js | 4 +- .../options.json | 3 - .../output.json | 148 ------------------ .../input.js | 0 .../options.json | 4 + 5 files changed, 7 insertions(+), 152 deletions(-) delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/output.json rename packages/babel-parser/test/fixtures/experimental/pipeline-operator/{proposal-smart-bare-style,-function-calls,-single,-computed => proposal-smart-error,-topic-style,-computed,-no-topic-reference}/input.js (100%) create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-computed,-no-topic-reference/options.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 2e50be642368..dd7641990a06 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -2100,7 +2100,9 @@ export default class ExpressionParser extends LValParser { isSimpleReference(expression: N.Expression): boolean { switch (expression.type) { case "MemberExpression": - return this.isSimpleReference(expression.object); + return ( + !expression.computed && this.isSimpleReference(expression.object) + ); case "Identifier": return true; default: diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/options.json deleted file mode 100644 index 17e4e327bbad..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": [["pipelineOperator", { "proposal": "smart" }]] -} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/output.json deleted file mode 100644 index 540ce0ba4002..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/output.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "expression": { - "type": "BinaryExpression", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "left": { - "type": "Identifier", - "start": 0, - "end": 5, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 5 - }, - "identifierName": "value" - }, - "name": "value" - }, - "operator": "|>", - "right": { - "type": "PipelineBareFunction", - "start": 9, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "callee": { - "type": "MemberExpression", - "start": 9, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "object": { - "type": "Identifier", - "start": 9, - "end": 10, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 10 - }, - "identifierName": "a" - }, - "name": "a" - }, - "property": { - "type": "Identifier", - "start": 11, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 12 - }, - "identifierName": "b" - }, - "name": "b" - }, - "computed": true - } - } - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-computed,-no-topic-reference/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-bare-style,-function-calls,-single,-computed/input.js rename to packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-computed,-no-topic-reference/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-computed,-no-topic-reference/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-computed,-no-topic-reference/options.json new file mode 100644 index 000000000000..7a4451381c91 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-error,-topic-style,-computed,-no-topic-reference/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]], + "throws": "Pipeline is in topic style but does not use topic reference (1:9)" +} From 3b0f9a9f1e062200d3832b0415a7ab48cf65b452 Mon Sep 17 00:00:00 2001 From: Logan Smyth Date: Wed, 19 Sep 2018 08:56:40 -0700 Subject: [PATCH 020/563] Delete undefined options so we handle old core versions with new CLI versions. (#8728) --- packages/babel-cli/src/babel/options.js | 69 ++++++++++++++----------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/packages/babel-cli/src/babel/options.js b/packages/babel-cli/src/babel/options.js index 16a9c025bcd9..14ff1b74e032 100644 --- a/packages/babel-cli/src/babel/options.js +++ b/packages/babel-cli/src/babel/options.js @@ -221,36 +221,47 @@ export default function parseArgv(args: Array) { const opts = commander.opts(); + const babelOptions = { + presets: opts.presets, + plugins: opts.plugins, + rootMode: opts.rootMode, + configFile: opts.configFile, + envName: opts.envName, + sourceType: opts.sourceType, + ignore: opts.ignore, + only: opts.only, + retainLines: opts.retainLines, + compact: opts.compact, + minified: opts.minified, + auxiliaryCommentBefore: opts.auxiliaryCommentBefore, + auxiliaryCommentAfter: opts.auxiliaryCommentAfter, + sourceMaps: opts.sourceMaps, + sourceFileName: opts.sourceFileName, + sourceRoot: opts.sourceRoot, + moduleRoot: opts.moduleRoot, + moduleIds: opts.moduleIds, + moduleId: opts.moduleId, + + // Commander will default the "--no-" arguments to true, but we want to + // leave them undefined so that @babel/core can handle the + // default-assignment logic on its own. + babelrc: opts.babelrc === true ? undefined : opts.babelrc, + highlightCode: opts.highlightCode === true ? undefined : opts.highlightCode, + comments: opts.comments === true ? undefined : opts.comments, + }; + + // If the @babel/cli version is newer than the @babel/core version, and we have added + // new options for @babel/core, we'll potentially get option validation errors from + // @babel/core. To avoid that, we delete undefined options, so @babel/core will only + // give the error if users actually pass an unsupported CLI option. + for (const key of Object.keys(babelOptions)) { + if (babelOptions[key] === undefined) { + delete babelOptions[key]; + } + } + return { - babelOptions: { - presets: opts.presets, - plugins: opts.plugins, - rootMode: opts.rootMode, - configFile: opts.configFile, - envName: opts.envName, - sourceType: opts.sourceType, - ignore: opts.ignore, - only: opts.only, - retainLines: opts.retainLines, - compact: opts.compact, - minified: opts.minified, - auxiliaryCommentBefore: opts.auxiliaryCommentBefore, - auxiliaryCommentAfter: opts.auxiliaryCommentAfter, - sourceMaps: opts.sourceMaps, - sourceFileName: opts.sourceFileName, - sourceRoot: opts.sourceRoot, - moduleRoot: opts.moduleRoot, - moduleIds: opts.moduleIds, - moduleId: opts.moduleId, - - // Commander will default the "--no-" arguments to true, but we want to - // leave them undefined so that @babel/core can handle the - // default-assignment logic on its own. - babelrc: opts.babelrc === true ? undefined : opts.babelrc, - highlightCode: - opts.highlightCode === true ? undefined : opts.highlightCode, - comments: opts.comments === true ? undefined : opts.comments, - }, + babelOptions, cliOptions: { filename: opts.filename, filenames, From 9f407e07359280b6e3a556a6e1c13e904348c33b Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Sun, 23 Sep 2018 10:54:13 -0500 Subject: [PATCH 021/563] Fix some missing parens cases with OptionalMemberExpression in generator (#8751) --- packages/babel-generator/src/node/parentheses.js | 8 ++++++++ .../fixtures/types/Optional-MemberExpression/input.js | 4 ++++ .../fixtures/types/Optional-MemberExpression/output.js | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/babel-generator/src/node/parentheses.js b/packages/babel-generator/src/node/parentheses.js index e78391c2bd58..8213fdd92e36 100644 --- a/packages/babel-generator/src/node/parentheses.js +++ b/packages/babel-generator/src/node/parentheses.js @@ -209,6 +209,7 @@ export function ConditionalExpression(node: Object, parent: Object): boolean { t.isBinary(parent) || t.isConditionalExpression(parent, { test: node }) || t.isAwaitExpression(parent) || + t.isOptionalMemberExpression(parent) || t.isTaggedTemplateExpression(parent) || t.isTSTypeAssertion(parent) || t.isTSAsExpression(parent) @@ -219,6 +220,13 @@ export function ConditionalExpression(node: Object, parent: Object): boolean { return UnaryLike(node, parent); } +export function OptionalMemberExpression( + node: Object, + parent: Object, +): boolean { + return t.isCallExpression(parent) || t.isMemberExpression(parent); +} + export function AssignmentExpression(node: Object): boolean { if (t.isObjectPattern(node.left)) { return true; diff --git a/packages/babel-generator/test/fixtures/types/Optional-MemberExpression/input.js b/packages/babel-generator/test/fixtures/types/Optional-MemberExpression/input.js index 1c60f768707d..6e71f9167264 100644 --- a/packages/babel-generator/test/fixtures/types/Optional-MemberExpression/input.js +++ b/packages/babel-generator/test/fixtures/types/Optional-MemberExpression/input.js @@ -14,3 +14,7 @@ foo?.["bar"]?.foo; 0.?.toString(); 0.5?.toString(); 1.000?.toString(); + +(a?.b).c; +(a ? b : c)?.d; +(a?.b)() diff --git a/packages/babel-generator/test/fixtures/types/Optional-MemberExpression/output.js b/packages/babel-generator/test/fixtures/types/Optional-MemberExpression/output.js index be34e83a5833..a99aa9039c18 100644 --- a/packages/babel-generator/test/fixtures/types/Optional-MemberExpression/output.js +++ b/packages/babel-generator/test/fixtures/types/Optional-MemberExpression/output.js @@ -11,4 +11,7 @@ foo?.["bar"].foo; foo?.["bar"]?.foo; 0.?.toString(); 0.5?.toString(); -1.000?.toString(); \ No newline at end of file +1.000?.toString(); +(a?.b).c; +(a ? b : c)?.d; +(a?.b)(); \ No newline at end of file From 5150f5f5003b25d89f8b5041543412839cfde5fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 24 Sep 2018 23:36:32 +0200 Subject: [PATCH 022/563] [decorators] Fields are enumerable (#8761) --- packages/babel-helpers/src/helpers.js | 2 +- .../original-own-field-without-initiailzer/exec.js | 2 +- .../fixtures/element-descriptors/original-own-field/exec.js | 2 +- .../fixtures/element-descriptors/original-static-field/exec.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/babel-helpers/src/helpers.js b/packages/babel-helpers/src/helpers.js index ca0491e99522..7aa8518aec2f 100644 --- a/packages/babel-helpers/src/helpers.js +++ b/packages/babel-helpers/src/helpers.js @@ -1232,7 +1232,7 @@ helpers.decorate = helper("7.0.2")` } else if (def.kind === "set") { descriptor = { set: def.value, configurable: true, enumerable: false }; } else if (def.kind === "field") { - descriptor = { configurable: true, writable: true, enumerable: false }; + descriptor = { configurable: true, writable: true, enumerable: true }; } var element /*: ElementDescriptor */ = { diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-own-field-without-initiailzer/exec.js b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-own-field-without-initiailzer/exec.js index ea1b5dd9843a..1fbbbebda729 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-own-field-without-initiailzer/exec.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-own-field-without-initiailzer/exec.js @@ -10,7 +10,7 @@ expect(el).toEqual(Object.defineProperty({ key: "foo", placement: "own", descriptor: { - enumerable: false, + enumerable: true, configurable: true, writable: true, }, diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-own-field/exec.js b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-own-field/exec.js index 7c823735e55f..b71f4551c25e 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-own-field/exec.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-own-field/exec.js @@ -11,7 +11,7 @@ expect(el).toEqual(Object.defineProperty({ key: "foo", placement: "own", descriptor: { - enumerable: false, + enumerable: true, configurable: true, writable: true, }, diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-static-field/exec.js b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-static-field/exec.js index 4855b30f1b37..01a66d0842d1 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-static-field/exec.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/original-static-field/exec.js @@ -11,7 +11,7 @@ expect(el).toEqual(Object.defineProperty({ key: "foo", placement: "static", descriptor: { - enumerable: false, + enumerable: true, configurable: true, writable: true, }, From be027fd36c0343b076ebe9b547b6143fbff1f3c6 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 24 Sep 2018 17:19:01 -0500 Subject: [PATCH 023/563] Bump babel-related deps (#8763) --- package.json | 14 +-- yarn.lock | 285 +++++++++++++++++++++++++++++---------------------- 2 files changed, 169 insertions(+), 130 deletions(-) diff --git a/package.json b/package.json index 3dd415a9d732..fe6e09210d8b 100644 --- a/package.json +++ b/package.json @@ -10,21 +10,21 @@ "test": "make test" }, "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/cli": "^7.1.0", + "@babel/core": "^7.1.0", + "@babel/plugin-proposal-class-properties": "^7.1.0", "@babel/plugin-proposal-export-namespace-from": "^7.0.0", "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.0.0", + "@babel/plugin-transform-modules-commonjs": "^7.1.0", + "@babel/plugin-transform-runtime": "^7.1.0", + "@babel/preset-env": "^7.1.0", "@babel/preset-flow": "^7.0.0", "@babel/register": "^7.0.0", "@babel/runtime": "^7.0.0", "babel-core": "^7.0.0-0", "babel-eslint": "^9.0.0", "babel-jest": "^23.4.0", - "babel-loader": "8.0.0-beta.4", + "babel-loader": "^8.0.2", "babel-plugin-transform-charcodes": "^0.1.0", "browserify": "^16.2.2", "bundle-collapser": "^1.2.1", diff --git a/yarn.lock b/yarn.lock index 2e2e491bf9bf..deb8da09c01b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@babel/cli@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.0.0.tgz#108b395fd43fff6681d36fb41274df4d8ffeb12e" +"@babel/cli@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.1.0.tgz#a9429fd63911711b0fa93ae50d73beee6c42aef8" dependencies: commander "^2.8.1" convert-source-map "^1.1.0" @@ -30,16 +30,16 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0.tgz#0cb0c0fd2e78a0a2bec97698f549ae9ce0b99515" +"@babel/core@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.0.tgz#08958f1371179f62df6966d8a614003d11faeb04" dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.0.0" - "@babel/helpers" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.0.0" + "@babel/helpers" "^7.1.0" + "@babel/parser" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" convert-source-map "^1.1.0" debug "^3.1.0" @@ -75,34 +75,34 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.0.0.tgz#ba26336beb2abb547d58b6eba5b84d77975a39eb" +"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" dependencies: - "@babel/helper-explode-assignable-expression" "^7.0.0" + "@babel/helper-explode-assignable-expression" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-call-delegate@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0.tgz#e036956bb33d76e59c07a04a1fff144e9f62ab78" +"@babel/helper-call-delegate@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" dependencies: "@babel/helper-hoist-variables" "^7.0.0" - "@babel/traverse" "^7.0.0" + "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-define-map@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.0.0.tgz#a5684dd2adf30f0137cf9b0bde436f8c2db17225" +"@babel/helper-define-map@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" dependencies: - "@babel/helper-function-name" "^7.0.0" + "@babel/helper-function-name" "^7.1.0" "@babel/types" "^7.0.0" lodash "^4.17.10" -"@babel/helper-explode-assignable-expression@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.0.0.tgz#fdfa4c88603ae3e954d0fc3244d5ca82fb468497" +"@babel/helper-explode-assignable-expression@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" dependencies: - "@babel/traverse" "^7.0.0" + "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" "@babel/helper-function-name@7.0.0-beta.40": @@ -121,6 +121,14 @@ "@babel/template" "^7.0.0" "@babel/types" "^7.0.0" +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + "@babel/helper-get-function-arity@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.40.tgz#ac0419cf067b0ec16453e1274f03878195791c6e" @@ -158,14 +166,14 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-module-transforms@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0.tgz#b01ee7d543e81e8c3fc404b19c9f26acb6e4cf4c" +"@babel/helper-module-transforms@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" dependencies: "@babel/helper-module-imports" "^7.0.0" - "@babel/helper-simple-access" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.0.0" + "@babel/template" "^7.1.0" "@babel/types" "^7.0.0" lodash "^4.17.10" @@ -185,30 +193,30 @@ dependencies: lodash "^4.17.10" -"@babel/helper-remap-async-to-generator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.0.0.tgz#6512273c2feb91587822335cf913fdf680c26901" +"@babel/helper-remap-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-wrap-function" "^7.0.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.0.0" + "@babel/helper-wrap-function" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0.tgz#b6f21237280e0be54f591f63a464b66627ced707" +"@babel/helper-replace-supers@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.0.0" + "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-simple-access@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0.tgz#ff36a27983ae4c27122da2f7f294dced80ecbd08" +"@babel/helper-simple-access@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" dependencies: - "@babel/template" "^7.0.0" + "@babel/template" "^7.1.0" "@babel/types" "^7.0.0" "@babel/helper-split-export-declaration@^7.0.0": @@ -217,21 +225,21 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-wrap-function@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0.tgz#1c8e42a2cfb0808e3140189dfe9490782a6fa740" +"@babel/helper-wrap-function@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" dependencies: - "@babel/helper-function-name" "^7.0.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.0.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helpers@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0.tgz#7213388341eeb07417f44710fd7e1d00acfa6ac0" +"@babel/helpers@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.0.tgz#429bf0f0020be56a4242883432084e3d70a8a141" dependencies: - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" "@babel/highlight@7.0.0-beta.40": @@ -254,23 +262,27 @@ version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0.tgz#697655183394facffb063437ddf52c0277698775" -"@babel/plugin-proposal-async-generator-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.0.0.tgz#5d1eb6b44fd388b97f964350007ab9da090b1d70" +"@babel/parser@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" + +"@babel/plugin-proposal-async-generator-functions@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-syntax-async-generators" "^7.0.0" -"@babel/plugin-proposal-class-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.0.0.tgz#a16b5c076ba6c3d87df64d2480a380e979543731" +"@babel/plugin-proposal-class-properties@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.1.0.tgz#9af01856b1241db60ec8838d84691aa0bd1e8df4" dependencies: - "@babel/helper-function-name" "^7.0.0" + "@babel/helper-function-name" "^7.1.0" "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" "@babel/plugin-syntax-class-properties" "^7.0.0" "@babel/plugin-proposal-export-namespace-from@^7.0.0": @@ -370,13 +382,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.0.0.tgz#feaf18f4bfeaf2236eea4b2d4879da83006cc8f5" +"@babel/plugin-transform-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-remap-async-to-generator" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-transform-block-scoped-functions@^7.0.0": version "7.0.0" @@ -391,16 +403,16 @@ "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" -"@babel/plugin-transform-classes@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0.tgz#9e65ca401747dde99e344baea90ab50dccb4c468" +"@babel/plugin-transform-classes@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" - "@babel/helper-define-map" "^7.0.0" - "@babel/helper-function-name" "^7.0.0" + "@babel/helper-define-map" "^7.1.0" + "@babel/helper-function-name" "^7.1.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" globals "^11.1.0" @@ -430,11 +442,11 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-exponentiation-operator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.0.0.tgz#c51b45e090a01876f64d32b5b46c0799c85ea56c" +"@babel/plugin-transform-exponentiation-operator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.0.0" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types@^7.0.0": @@ -450,11 +462,11 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0.tgz#eeda18dc22584e13c3581a68f6be4822bb1d1d81" +"@babel/plugin-transform-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" dependencies: - "@babel/helper-function-name" "^7.0.0" + "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-literals@^7.0.0": @@ -463,20 +475,20 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-amd@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0.tgz#2430ab73db9960c4ca89966f425b803f5d0d0468" +"@babel/plugin-transform-modules-amd@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" dependencies: - "@babel/helper-module-transforms" "^7.0.0" + "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-commonjs@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0.tgz#20b906e5ab130dd8e456b694a94d9575da0fd41f" +"@babel/plugin-transform-modules-commonjs@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" dependencies: - "@babel/helper-module-transforms" "^7.0.0" + "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-simple-access" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" "@babel/plugin-transform-modules-systemjs@^7.0.0": version "7.0.0" @@ -485,11 +497,11 @@ "@babel/helper-hoist-variables" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-umd@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.0.0.tgz#e7bb4f2a6cd199668964241951a25013450349be" +"@babel/plugin-transform-modules-umd@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" dependencies: - "@babel/helper-module-transforms" "^7.0.0" + "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-new-target@^7.0.0": @@ -498,18 +510,18 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-object-super@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.0.0.tgz#b8587d511309b3a0e96e9e38169908b3e392041e" +"@babel/plugin-transform-object-super@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" -"@babel/plugin-transform-parameters@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0.tgz#da864efa111816a6df161d492f33de10e74b1949" +"@babel/plugin-transform-parameters@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" dependencies: - "@babel/helper-call-delegate" "^7.0.0" + "@babel/helper-call-delegate" "^7.1.0" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -519,13 +531,14 @@ dependencies: regenerator-transform "^0.13.3" -"@babel/plugin-transform-runtime@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.0.0.tgz#0f1443c07bac16dba8efa939e0c61d6922740062" +"@babel/plugin-transform-runtime@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.1.0.tgz#9f76920d42551bb577e2dc594df229b5f7624b63" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" resolve "^1.8.1" + semver "^5.5.1" "@babel/plugin-transform-shorthand-properties@^7.0.0": version "7.0.0" @@ -567,13 +580,13 @@ "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/preset-env@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.0.0.tgz#f450f200c14e713f98cb14d113bf0c2cfbb89ca9" +"@babel/preset-env@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.0.tgz#e67ea5b0441cfeab1d6f41e9b5c79798800e8d11" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.1.0" "@babel/plugin-proposal-json-strings" "^7.0.0" "@babel/plugin-proposal-object-rest-spread" "^7.0.0" "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" @@ -582,25 +595,25 @@ "@babel/plugin-syntax-object-rest-spread" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.0.0" + "@babel/plugin-transform-async-to-generator" "^7.1.0" "@babel/plugin-transform-block-scoped-functions" "^7.0.0" "@babel/plugin-transform-block-scoping" "^7.0.0" - "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-classes" "^7.1.0" "@babel/plugin-transform-computed-properties" "^7.0.0" "@babel/plugin-transform-destructuring" "^7.0.0" "@babel/plugin-transform-dotall-regex" "^7.0.0" "@babel/plugin-transform-duplicate-keys" "^7.0.0" - "@babel/plugin-transform-exponentiation-operator" "^7.0.0" + "@babel/plugin-transform-exponentiation-operator" "^7.1.0" "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.1.0" "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-amd" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-modules-amd" "^7.1.0" + "@babel/plugin-transform-modules-commonjs" "^7.1.0" "@babel/plugin-transform-modules-systemjs" "^7.0.0" - "@babel/plugin-transform-modules-umd" "^7.0.0" + "@babel/plugin-transform-modules-umd" "^7.1.0" "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.0.0" - "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.1.0" + "@babel/plugin-transform-parameters" "^7.1.0" "@babel/plugin-transform-regenerator" "^7.0.0" "@babel/plugin-transform-shorthand-properties" "^7.0.0" "@babel/plugin-transform-spread" "^7.0.0" @@ -655,6 +668,14 @@ "@babel/parser" "^7.0.0" "@babel/types" "^7.0.0" +"@babel/template@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.0.tgz#58cc9572e1bfe24fe1537fdf99d839d53e517e22" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@babel/traverse@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0.tgz#b1fe9b6567fdf3ab542cfad6f3b31f854d799a61" @@ -683,6 +704,20 @@ invariant "^2.2.0" lodash "^4.2.0" +"@babel/traverse@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/generator" "^7.0.0" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.0.0" + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + debug "^3.1.0" + globals "^11.1.0" + lodash "^4.17.10" + "@babel/types@7.0.0-beta.35": version "7.0.0-beta.35" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.35.tgz#cf933a9a9a38484ca724b335b88d83726d5ab960" @@ -1302,9 +1337,9 @@ babel-jest@^23.4.0: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.2.0" -babel-loader@8.0.0-beta.4: - version "8.0.0-beta.4" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.0-beta.4.tgz#c3fab00696c385c70c04dbe486391f0eb996f345" +babel-loader@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.2.tgz#2079b8ec1628284a929241da3d90f5b3de2a5ae5" dependencies: find-cache-dir "^1.0.0" loader-utils "^1.0.2" @@ -7358,6 +7393,10 @@ semver-greatest-satisfied-range@^1.1.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +semver@^5.5.1: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" From 38cf318f61df3d85cd42087cd3c796a5e92a0ac9 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 24 Sep 2018 18:09:54 -0500 Subject: [PATCH 024/563] Bump lint-related deps (#8765) --- package.json | 16 +- .../invalid-location/options.json | 3 +- .../options.json | 3 +- .../parenthesized-lhs-array/options.json | 3 +- .../parenthesized-lhs-object/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../duplicate-named-export/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../es2015/uncategorised/392/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../exponentiation-operator/10/options.json | 3 +- .../exponentiation-operator/11/options.json | 3 +- .../exponentiation-operator/12/options.json | 3 +- .../es2017/async-functions/2/options.json | 3 +- .../no-method-asi/options.json | 3 +- .../invalid-export-default/options.json | 3 +- .../invalid_expression_await/options.json | 3 +- .../invalid_var_await/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../.migrated_0035/options.json | 3 +- .../_no-plugin/.bigint/options.json | 3 +- .../.class-private-properties/options.json | 3 +- .../.numeric-separator/options.json | 3 +- .../_no-plugin/async-generators/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../_no-plugin/decorators/options.json | 3 +- .../_no-plugin/do-expressions/options.json | 3 +- .../_no-plugin/dynamic-import/options.json | 3 +- .../_no-plugin/export-default/options.json | 3 +- .../_no-plugin/export-namespace/options.json | 3 +- .../_no-plugin/import-meta/options.json | 3 +- .../object-rest-spread/options.json | 3 +- .../_no-plugin/optional-chaining/options.json | 3 +- .../class-method-no-asi/options.json | 3 +- .../failure-no-plugin/options.json | 3 +- .../super-call/options.json | 3 +- .../class-properties/super-call/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../no-object-methods/options.json | 3 +- .../options.json | 3 +- .../no-export-decorators/options.json | 3 +- .../dynamic-import/no-plugin/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../disabled-inside-generator/options.json | 3 +- .../import-meta/without-plugin/options.json | 3 +- .../and-and-equals-no-plugin/options.json | 3 +- .../mallet-no-plugin/options.json | 3 +- .../options.json | 3 +- .../qq-equals-no-plugin/options.json | 3 +- .../no-plugin-error/options.json | 3 +- .../object-rest-spread/11/options.json | 3 +- .../object-rest-spread/12/options.json | 3 +- .../object-rest-spread/13/options.json | 3 +- .../object-rest-spread/14/options.json | 3 +- .../object-rest-spread/15/options.json | 3 +- .../object-rest-spread/7/options.json | 3 +- .../options.json | 3 +- .../no-plugin-no-binding-finally/options.json | 3 +- .../no-plugin-no-binding/options.json | 3 +- .../invalid-proposal/options.json | 3 +- .../pipeline-operator/no-plugin/options.json | 3 +- .../proposal-minimal-ban-await-f/options.json | 3 +- .../proposal-minimal-ban-await/options.json | 3 +- .../throw-expression/not-enabled/options.json | 3 +- .../invalid-declare-export-type/options.json | 3 +- .../invalid-export-const/options.json | 3 +- .../invalid-export-interface/options.json | 3 +- .../invalid-export-let/options.json | 3 +- .../flow/declare-module/8/options.json | 3 +- .../invalid-commonjs-module/options.json | 3 +- .../invalid-es-module/options.json | 3 +- .../invalid-import/options.json | 3 +- .../invalid-module-in-module/options.json | 3 +- .../flow/optional-type/6/options.json | 3 +- .../issue-58-ambiguous/options.json | 3 +- .../flow/type-annotations/137/options.json | 3 +- .../with-default-invalid/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../arrow_error_without_jsx/options.json | 3 +- .../default-missing/options.json | 3 +- .../jsx/errors/adjacent-tags/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../function/pattern-parameters/options.json | 3 +- .../for-const-closure/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../error/invalid-option/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../assignment-invalid-option/options.json | 3 +- .../fixtures/exports/export=/options.json | 3 +- .../fixtures/imports/import=/options.json | 3 +- .../browserslist-config-ignore/options.json | 3 +- .../options.json | 3 +- .../options.json | 3 +- .../browserslist-config/options.json | 3 +- .../options.json | 3 +- .../browserslist-package/options.json | 3 +- packages/babel-template/src/options.js | 3 +- yarn.lock | 414 ++++++++++-------- 143 files changed, 386 insertions(+), 467 deletions(-) diff --git a/package.json b/package.json index fe6e09210d8b..b6a3b65d85ee 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "build": "make build", "fix": "make fix", "lint": "make lint", - "precommit": "lint-staged", "test": "make test" }, "devDependencies": { @@ -32,9 +31,9 @@ "charcodes": "^0.1.0", "derequire": "^2.0.2", "enhanced-resolve": "^3.0.0", - "eslint": "^5.3.0", + "eslint": "^5.6.0", "eslint-config-babel": "^8.0.0", - "eslint-plugin-flowtype": "^2.50.0", + "eslint-plugin-flowtype": "^2.50.1", "eslint-plugin-local-rules": "0.1.0", "eslint-plugin-prettier": "^2.6.2", "flow-bin": "^0.80.0", @@ -48,15 +47,15 @@ "gulp-uglify": "^3.0.0", "gulp-util": "^3.0.7", "gulp-watch": "^5.0.0", - "husky": "^0.14.3", + "husky": "^1.0.0-rc.15", "jest": "^23.4.1", "lerna": "^2.11.0", "lerna-changelog": "^0.5.0", - "lint-staged": "^6.0.1", + "lint-staged": "^7.3.0", "lodash": "^4.17.10", "merge-stream": "^1.0.1", "output-file-sync": "^2.0.0", - "prettier": "^1.13.7", + "prettier": "^1.14.3", "pump": "^1.0.2", "rimraf": "^2.4.3", "rollup-plugin-babel": "^4.0.0-beta.0", @@ -81,6 +80,11 @@ "eslint --format=codeframe" ] }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, "jest": { "collectCoverageFrom": [ "packages/*/src/**/*.mjs", diff --git a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json index 97dce207c844..beef14a21449 100644 --- a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json +++ b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json @@ -1,4 +1,3 @@ { - "throws": - "The rest element has to be the last element when destructuring (1:1)" + "throws": "The rest element has to be the last element when destructuring (1:1)" } diff --git a/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/options.json b/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/options.json index 96ed06f4ca3e..faef53359bea 100644 --- a/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/options.json +++ b/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/options.json @@ -1,4 +1,3 @@ { - "throws": - "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (2:8)" + "throws": "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (2:8)" } diff --git a/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-array/options.json b/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-array/options.json index 6b5d54181044..dfcad1b5cbf0 100644 --- a/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-array/options.json +++ b/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-array/options.json @@ -1,4 +1,3 @@ { - "throws": - "You're trying to assign to a parenthesized expression, eg. instead of `([a]) = 0` use `([a] = 0)` (1:1)" + "throws": "You're trying to assign to a parenthesized expression, eg. instead of `([a]) = 0` use `([a] = 0)` (1:1)" } diff --git a/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-object/options.json b/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-object/options.json index 783a56a70523..d0fb48924093 100644 --- a/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-object/options.json +++ b/packages/babel-parser/test/fixtures/es2015/destructuring/parenthesized-lhs-object/options.json @@ -1,4 +1,3 @@ { - "throws": - "You're trying to assign to a parenthesized expression, eg. instead of `({a}) = 0` use `({a} = 0)` (1:1)" + "throws": "You're trying to assign to a parenthesized expression, eg. instead of `({a}) = 0` use `({a} = 0)` (1:1)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-class-declaration/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-class-declaration/options.json index da02d625454d..3bdafe893282 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-class-declaration/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-class-declaration/options.json @@ -1,4 +1,3 @@ { - "throws": - "`Foo` has already been exported. Exported identifiers must be unique. (2:0)" + "throws": "`Foo` has already been exported. Exported identifiers must be unique. (2:0)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/options.json index 949358ec6eed..c8c111d88d34 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:20)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:20)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/options.json index 57351167b6d8..cf1dcd59dc8e 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo4` has already been exported. Exported identifiers must be unique. (2:50)" + "throws": "`foo4` has already been exported. Exported identifiers must be unique. (2:50)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/options.json index 0e56c6bc93c2..c2f8cdda986d 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo4` has already been exported. Exported identifiers must be unique. (2:49)" + "throws": "`foo4` has already been exported. Exported identifiers must be unique. (2:49)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/options.json index 31e5df6a02d6..1cd229e76cc6 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo4` has already been exported. Exported identifiers must be unique. (2:58)" + "throws": "`foo4` has already been exported. Exported identifiers must be unique. (2:58)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/options.json index e83f7864857e..e6aaa311fc54 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:21)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:21)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/options.json index ec6423f048d4..4eb6f26f952b 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo2` has already been exported. Exported identifiers must be unique. (2:13)" + "throws": "`foo2` has already been exported. Exported identifiers must be unique. (2:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/options.json index 0e5dcf8f6136..4f3ba9d9d20a 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:22)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:22)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/options.json index ec41da52d1ef..dab0e075b01d 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/options.json @@ -1,4 +1,3 @@ { - "throws": - "`bar` has already been exported. Exported identifiers must be unique. (2:13)" + "throws": "`bar` has already been exported. Exported identifiers must be unique. (2:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/options.json index 6485ac8dc189..7ee0cc434182 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:28)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:28)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/options.json index 8fd67e8c9c92..72b54a0a77cb 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:29)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:29)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/options.json index 9589d0397278..f28333f6f8ad 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:15)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/options.json index 46ee12ba139d..1923e4752336 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:0)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:0)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/options.json index 96a5f1f604b3..37d131b70f3c 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:14)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:14)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/options.json index 46ee12ba139d..1923e4752336 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:0)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:0)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/options.json index 96a5f1f604b3..37d131b70f3c 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:14)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:14)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/options.json index 9589d0397278..f28333f6f8ad 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:15)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/options.json index 6d16161f43e1..8ef246d83cc0 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/options.json @@ -1,4 +1,3 @@ { - "throws": - "`Foo` has already been exported. Exported identifiers must be unique. (2:15)" + "throws": "`Foo` has already been exported. Exported identifiers must be unique. (2:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/options.json index beeef9dfc6d2..6b46482b6ed6 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/options.json @@ -1,4 +1,3 @@ { - "throws": - "`Foo` has already been exported. Exported identifiers must be unique. (2:14)" + "throws": "`Foo` has already been exported. Exported identifiers must be unique. (2:14)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-function-declaration/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-function-declaration/options.json index 46ee12ba139d..1923e4752336 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-function-declaration/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-function-declaration/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:0)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:0)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-variable-declaration/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-variable-declaration/options.json index be53f65c5065..9fdf7082da17 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-variable-declaration/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-variable-declaration/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:13)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export/options.json index b18b70590683..9bb46f4778eb 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export/options.json @@ -1,4 +1,3 @@ { - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:9)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:9)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration/options.json b/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration/options.json index d8dbb9adfc3e..734063430a9e 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration/options.json @@ -1,4 +1,3 @@ { - "throws": - "Only expressions, functions or classes are allowed as the `default` export. (1:15)" + "throws": "Only expressions, functions or classes are allowed as the `default` export. (1:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration2/options.json b/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration2/options.json index d8dbb9adfc3e..734063430a9e 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration2/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration2/options.json @@ -1,4 +1,3 @@ { - "throws": - "Only expressions, functions or classes are allowed as the `default` export. (1:15)" + "throws": "Only expressions, functions or classes are allowed as the `default` export. (1:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration3/options.json b/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration3/options.json index d8dbb9adfc3e..734063430a9e 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration3/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/export-default-variable-declaration3/options.json @@ -1,4 +1,3 @@ { - "throws": - "Only expressions, functions or classes are allowed as the `default` export. (1:15)" + "throws": "Only expressions, functions or classes are allowed as the `default` export. (1:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/392/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/392/options.json index 3b74c452196d..9f52ab64aeef 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/392/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/392/options.json @@ -1,5 +1,4 @@ { - "throws": - "ES2015 named imports do not destructure. Use another statement for destructuring after the import. (1:19)", + "throws": "ES2015 named imports do not destructure. Use another statement for destructuring after the import. (1:19)", "sourceType": "module" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-1/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-1/options.json index 7ef6a50f452a..695fe418b904 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-1/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-1/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (2:7)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:7)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-2/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-2/options.json index f688f165a938..28b45c949dcf 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-2/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-2/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (2:15)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-3/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-3/options.json index 7ef6a50f452a..695fe418b904 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-3/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-3/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (2:7)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:7)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-4/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-4/options.json index d1db2cc80935..b0fd9b81d1e7 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-4/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-4/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (2:17)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:17)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-5/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-5/options.json index 5722b6eb30f3..a70dd2ba957e 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-5/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-5/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (2:8)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:8)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-1/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-1/options.json index 120123c80f54..c636ce99024b 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-1/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-1/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (2:3)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:3)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-2/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-2/options.json index 120123c80f54..c636ce99024b 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-2/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-2/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (2:3)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:3)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-3/options.json b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-3/options.json index 46a75b41eb84..d82d23bca0b4 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-3/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/parameter-name-arrow-inside-generator-3/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (2:9)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:9)" } diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/10/options.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/10/options.json index 73054f4644b0..2c624e8cec70 100644 --- a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/10/options.json +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/10/options.json @@ -1,4 +1,3 @@ { - "throws": - "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:1)" + "throws": "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:1)" } diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/11/options.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/11/options.json index f6d96ba3a1f7..f04c5c035abb 100644 --- a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/11/options.json +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/11/options.json @@ -1,4 +1,3 @@ { - "throws": - "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)" + "throws": "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)" } diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/12/options.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/12/options.json index f6d96ba3a1f7..f04c5c035abb 100644 --- a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/12/options.json +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/12/options.json @@ -1,4 +1,3 @@ { - "throws": - "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)" + "throws": "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)" } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/2/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/2/options.json index 1525fbf2506c..c6f19067ee66 100644 --- a/packages/babel-parser/test/fixtures/es2017/async-functions/2/options.json +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/2/options.json @@ -1,4 +1,3 @@ { - "throws": - "await* has been removed from the async functions proposal. Use Promise.all() instead. (2:2)" + "throws": "await* has been removed from the async functions proposal. Use Promise.all() instead. (2:2)" } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/no-method-asi/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/no-method-asi/options.json index f3c78ddb4f02..7348c12f9e90 100644 --- a/packages/babel-parser/test/fixtures/es2017/async-functions/no-method-asi/options.json +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/no-method-asi/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'classProperties' (3:2)" + "throws": "This experimental syntax requires enabling the parser plugin: 'classProperties' (3:2)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json index a477c8ff309f..689ff73f73f7 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:7)" + "throws": "This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:7)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_expression_await/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_expression_await/options.json index 1bc235c3d934..afbed324e92a 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_expression_await/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_expression_await/options.json @@ -1,4 +1,3 @@ { - "throws": - "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)" + "throws": "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_var_await/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_var_await/options.json index 1bc235c3d934..afbed324e92a 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_var_await/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-identifier/invalid_var_await/options.json @@ -1,4 +1,3 @@ { - "throws": - "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)" + "throws": "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/options.json index 31d78f2e57b9..1bc56676810e 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-default/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (1:21)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (1:21)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/options.json index 352b04da202c..c9b7ef33bbf2 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameter/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (1:16)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (1:16)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/options.json index 6d7cdbc432ee..65c34eefb48e 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-arrow-parameters/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (1:25)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (1:25)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json index 1bc235c3d934..afbed324e92a 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/invalid-yield-generator-export-default/options.json @@ -1,4 +1,3 @@ { - "throws": - "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)" + "throws": "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/options.json index 31d78f2e57b9..1bc56676810e 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-yield/yield-generator-arrow-default/options.json @@ -1,4 +1,3 @@ { - "throws": - "yield is not allowed in the parameters of an arrow function inside a generator (1:21)" + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (1:21)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json index 3e2f5ee264d5..3c289784c021 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/.migrated_0035/options.json @@ -1,4 +1,3 @@ { - "throws": - "Error parsing regular expression: Invalid regular expression: /(s/: Unterminated group (1:9)" + "throws": "Error parsing regular expression: Invalid regular expression: /(s/: Unterminated group (1:9)" } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/.bigint/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/.bigint/options.json index 20096726d620..8e44fabed2f5 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/.bigint/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/.bigint/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'bigInt' (1:1)", + "throws": "This experimental syntax requires enabling the parser plugin: 'bigInt' (1:1)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/.class-private-properties/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/.class-private-properties/options.json index 16521eb656b1..85d7fee65f66 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/.class-private-properties/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/.class-private-properties/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'classPrivateProperties' (2:3)", + "throws": "This experimental syntax requires enabling the parser plugin: 'classPrivateProperties' (2:3)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/.numeric-separator/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/.numeric-separator/options.json index 06642e156345..6996ba6f1573 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/.numeric-separator/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/.numeric-separator/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'numericSeparator' (1:17)", + "throws": "This experimental syntax requires enabling the parser plugin: 'numericSeparator' (1:17)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/options.json index e55164203df2..4fbfd38e6810 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'asyncGenerators' (1:15)", + "throws": "This experimental syntax requires enabling the parser plugin: 'asyncGenerators' (1:15)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-with-initializer-and-type/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-with-initializer-and-type/options.json index 6dc7d63208aa..a4e85bf033a7 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-with-initializer-and-type/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-with-initializer-and-type/options.json @@ -1,5 +1,4 @@ { "plugins": ["flow"], - "throws": - "This experimental syntax requires enabling the parser plugin: 'classProperties' (2:14)" + "throws": "This experimental syntax requires enabling the parser plugin: 'classProperties' (2:14)" } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-with-initializer/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-with-initializer/options.json index 44726ea60083..aaa6e8068648 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-with-initializer/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-with-initializer/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'classProperties' (2:6)", + "throws": "This experimental syntax requires enabling the parser plugin: 'classProperties' (2:6)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-without-initializer/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-without-initializer/options.json index 4d708dc64434..bbec0b1850ba 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-without-initializer/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/class-properties-without-initializer/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'classProperties' (2:5)", + "throws": "This experimental syntax requires enabling the parser plugin: 'classProperties' (2:5)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/decorators/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/decorators/options.json index b8382f9c0850..11f94afa3b7a 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/decorators/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/decorators/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators' (1:0)", + "throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators' (1:0)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/do-expressions/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/do-expressions/options.json index b7fe32fb80f0..0aaae18db824 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/do-expressions/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/do-expressions/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'doExpressions' (1:1)", + "throws": "This experimental syntax requires enabling the parser plugin: 'doExpressions' (1:1)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/dynamic-import/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/dynamic-import/options.json index ee35343694f9..90bbfd5623c9 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/dynamic-import/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/dynamic-import/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'dynamicImport' (1:8)", + "throws": "This experimental syntax requires enabling the parser plugin: 'dynamicImport' (1:8)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/export-default/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/export-default/options.json index 7d30825d8387..e306a4f34cbf 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/export-default/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/export-default/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:7)", + "throws": "This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:7)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/export-namespace/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/export-namespace/options.json index ff150bf97657..b8b7c829daad 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/export-namespace/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/export-namespace/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'exportNamespaceFrom' (1:9)", + "throws": "This experimental syntax requires enabling the parser plugin: 'exportNamespaceFrom' (1:9)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/import-meta/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/import-meta/options.json index ae56b0d5e7fe..48ce55a15d05 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/import-meta/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/import-meta/options.json @@ -1,6 +1,5 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'importMeta' (1:17)", + "throws": "This experimental syntax requires enabling the parser plugin: 'importMeta' (1:17)", "sourceType": "module", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/options.json index e56fe7d7df85..98dd2ee11d99 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'objectRestSpread' (1:2)", + "throws": "This experimental syntax requires enabling the parser plugin: 'objectRestSpread' (1:2)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/options.json index 9a205fc1d32e..b8e170c94adb 100644 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/options.json +++ b/packages/babel-parser/test/fixtures/experimental/_no-plugin/optional-chaining/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'optionalChaining' (1:1)" + "throws": "This experimental syntax requires enabling the parser plugin: 'optionalChaining' (1:1)" } diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/class-method-no-asi/options.json b/packages/babel-parser/test/fixtures/experimental/async-generators/class-method-no-asi/options.json index f3c78ddb4f02..7348c12f9e90 100644 --- a/packages/babel-parser/test/fixtures/experimental/async-generators/class-method-no-asi/options.json +++ b/packages/babel-parser/test/fixtures/experimental/async-generators/class-method-no-asi/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'classProperties' (3:2)" + "throws": "This experimental syntax requires enabling the parser plugin: 'classProperties' (3:2)" } diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-no-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-no-plugin/options.json index 568c1237e9d6..15cf5cc8d413 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-no-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-no-plugin/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'classPrivateMethods' (3:2)", + "throws": "This experimental syntax requires enabling the parser plugin: 'classPrivateMethods' (3:2)", "plugins": ["classPrivateProperties"] } diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-properties/super-call/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-properties/super-call/options.json index c4e5a9947939..e20043c3fa2e 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-properties/super-call/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-properties/super-call/options.json @@ -1,5 +1,4 @@ { "plugins": ["classPrivateProperties"], - "throws": - "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (4:13)" + "throws": "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (4:13)" } diff --git a/packages/babel-parser/test/fixtures/experimental/class-properties/super-call/options.json b/packages/babel-parser/test/fixtures/experimental/class-properties/super-call/options.json index 615953e7b7bb..3f06e4fecfc3 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-properties/super-call/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-properties/super-call/options.json @@ -1,5 +1,4 @@ { "plugins": ["classProperties"], - "throws": - "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (4:12)" + "throws": "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (4:12)" } diff --git a/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-export-default-decorated-expression-without-parens/options.json b/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-export-default-decorated-expression-without-parens/options.json index 2228d3b663d8..39592e4eb294 100644 --- a/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-export-default-decorated-expression-without-parens/options.json +++ b/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-export-default-decorated-expression-without-parens/options.json @@ -1,6 +1,5 @@ { "sourceType": "module", "plugins": [["decorators", { "decoratorsBeforeExport": true }]], - "throws": - "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax (1:15)" + "throws": "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax (1:15)" } diff --git a/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-required/options.json b/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-required/options.json index d4ebe6ec4190..3a1e80661a8f 100644 --- a/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-required/options.json +++ b/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-required/options.json @@ -1,5 +1,4 @@ { "plugins": ["decorators"], - "throws": - "The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'." + "throws": "The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'." } diff --git a/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-true-decorator-after-export/options.json b/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-true-decorator-after-export/options.json index bf5b0882589b..8fc06b1b8c69 100644 --- a/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-true-decorator-after-export/options.json +++ b/packages/babel-parser/test/fixtures/experimental/decorators-2/decoratorsBeforeExport-true-decorator-after-export/options.json @@ -1,6 +1,5 @@ { "sourceType": "module", "plugins": [["decorators", { "decoratorsBeforeExport": true }]], - "throws": - "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax (1:7)" + "throws": "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax (1:7)" } diff --git a/packages/babel-parser/test/fixtures/experimental/decorators-2/export-decorated-class-without-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/decorators-2/export-decorated-class-without-plugin/options.json index c3ea9d200b1b..5a8bd1e83883 100644 --- a/packages/babel-parser/test/fixtures/experimental/decorators-2/export-decorated-class-without-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/decorators-2/export-decorated-class-without-plugin/options.json @@ -1,6 +1,5 @@ { "sourceType": "module", - "throws": - "This experimental syntax requires enabling one of the following parser plugin(s): 'decorators, decorators-legacy' (1:7)", + "throws": "This experimental syntax requires enabling one of the following parser plugin(s): 'decorators, decorators-legacy' (1:7)", "plugins": null } diff --git a/packages/babel-parser/test/fixtures/experimental/decorators-2/no-export-decorators-on-class/options.json b/packages/babel-parser/test/fixtures/experimental/decorators-2/no-export-decorators-on-class/options.json index ddf4b1f47c8b..cb54fc794402 100644 --- a/packages/babel-parser/test/fixtures/experimental/decorators-2/no-export-decorators-on-class/options.json +++ b/packages/babel-parser/test/fixtures/experimental/decorators-2/no-export-decorators-on-class/options.json @@ -1,5 +1,4 @@ { "sourceType": "module", - "throws": - "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead. (2:0)" + "throws": "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead. (2:0)" } diff --git a/packages/babel-parser/test/fixtures/experimental/decorators-2/no-object-methods/options.json b/packages/babel-parser/test/fixtures/experimental/decorators-2/no-object-methods/options.json index e885f2c0176d..7dd4ed9e2837 100644 --- a/packages/babel-parser/test/fixtures/experimental/decorators-2/no-object-methods/options.json +++ b/packages/babel-parser/test/fixtures/experimental/decorators-2/no-object-methods/options.json @@ -1,4 +1,3 @@ { - "throws": - "Stage 2 decorators disallow object literal property decorators (2:2)" + "throws": "Stage 2 decorators disallow object literal property decorators (2:2)" } diff --git a/packages/babel-parser/test/fixtures/experimental/decorators/no-export-decorators-without-class/options.json b/packages/babel-parser/test/fixtures/experimental/decorators/no-export-decorators-without-class/options.json index bf5a1cc8a75a..61c2c23daaae 100644 --- a/packages/babel-parser/test/fixtures/experimental/decorators/no-export-decorators-without-class/options.json +++ b/packages/babel-parser/test/fixtures/experimental/decorators/no-export-decorators-without-class/options.json @@ -1,5 +1,4 @@ { - "throws": - "You can only use decorators on an export when exporting a class (2:0)", + "throws": "You can only use decorators on an export when exporting a class (2:0)", "sourceType": "module" } diff --git a/packages/babel-parser/test/fixtures/experimental/decorators/no-export-decorators/options.json b/packages/babel-parser/test/fixtures/experimental/decorators/no-export-decorators/options.json index bf5a1cc8a75a..61c2c23daaae 100644 --- a/packages/babel-parser/test/fixtures/experimental/decorators/no-export-decorators/options.json +++ b/packages/babel-parser/test/fixtures/experimental/decorators/no-export-decorators/options.json @@ -1,5 +1,4 @@ { - "throws": - "You can only use decorators on an export when exporting a class (2:0)", + "throws": "You can only use decorators on an export when exporting a class (2:0)", "sourceType": "module" } diff --git a/packages/babel-parser/test/fixtures/experimental/dynamic-import/no-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/dynamic-import/no-plugin/options.json index 09561b2d687e..8036724beed2 100644 --- a/packages/babel-parser/test/fixtures/experimental/dynamic-import/no-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/dynamic-import/no-plugin/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'dynamicImport' (1:0)", + "throws": "This experimental syntax requires enabling the parser plugin: 'dynamicImport' (1:0)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-function-keyword-declaration/options.json b/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-function-keyword-declaration/options.json index 51cc8d68ea3f..991da279e599 100644 --- a/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-function-keyword-declaration/options.json +++ b/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-function-keyword-declaration/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'functionSent' (2:11)" + "throws": "This experimental syntax requires enabling the parser plugin: 'functionSent' (2:11)" } diff --git a/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-function-keyword-expression/options.json b/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-function-keyword-expression/options.json index ec48aeabce6b..eee5abbf1f93 100644 --- a/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-function-keyword-expression/options.json +++ b/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-function-keyword-expression/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'functionSent' (2:12)" + "throws": "This experimental syntax requires enabling the parser plugin: 'functionSent' (2:12)" } diff --git a/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-inside-generator/options.json b/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-inside-generator/options.json index 3cb65d1733f1..9ce89a133dca 100644 --- a/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-inside-generator/options.json +++ b/packages/babel-parser/test/fixtures/experimental/function-sent/disabled-inside-generator/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'functionSent' (2:18)" + "throws": "This experimental syntax requires enabling the parser plugin: 'functionSent' (2:18)" } diff --git a/packages/babel-parser/test/fixtures/experimental/import-meta/without-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/import-meta/without-plugin/options.json index f53f788ae5ce..5956ed25f3dd 100644 --- a/packages/babel-parser/test/fixtures/experimental/import-meta/without-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/import-meta/without-plugin/options.json @@ -1,5 +1,4 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'importMeta' (1:7)", + "throws": "This experimental syntax requires enabling the parser plugin: 'importMeta' (1:7)", "plugins": [] } diff --git a/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/and-and-equals-no-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/and-and-equals-no-plugin/options.json index dca714007eba..5b674fdee42e 100644 --- a/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/and-and-equals-no-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/and-and-equals-no-plugin/options.json @@ -1,5 +1,4 @@ { "plugins": [], - "throws": - "This experimental syntax requires enabling the parser plugin: 'logicalAssignment' (1:2)" + "throws": "This experimental syntax requires enabling the parser plugin: 'logicalAssignment' (1:2)" } diff --git a/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/mallet-no-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/mallet-no-plugin/options.json index dca714007eba..5b674fdee42e 100644 --- a/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/mallet-no-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/mallet-no-plugin/options.json @@ -1,5 +1,4 @@ { "plugins": [], - "throws": - "This experimental syntax requires enabling the parser plugin: 'logicalAssignment' (1:2)" + "throws": "This experimental syntax requires enabling the parser plugin: 'logicalAssignment' (1:2)" } diff --git a/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/qq-equals-no-null-coalesce-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/qq-equals-no-null-coalesce-plugin/options.json index 4aab2b254ee7..3cb238ee4af0 100644 --- a/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/qq-equals-no-null-coalesce-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/qq-equals-no-null-coalesce-plugin/options.json @@ -1,5 +1,4 @@ { "plugins": ["logicalAssignment"], - "throws": - "This experimental syntax requires enabling the parser plugin: 'nullishCoalescingOperator' (1:2)" + "throws": "This experimental syntax requires enabling the parser plugin: 'nullishCoalescingOperator' (1:2)" } diff --git a/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/qq-equals-no-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/qq-equals-no-plugin/options.json index a1cf5c9fda7c..f5e977775daf 100644 --- a/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/qq-equals-no-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/logical-assignment-operator/qq-equals-no-plugin/options.json @@ -1,5 +1,4 @@ { "plugins": ["nullishCoalescingOperator"], - "throws": - "This experimental syntax requires enabling the parser plugin: 'logicalAssignment' (1:2)" + "throws": "This experimental syntax requires enabling the parser plugin: 'logicalAssignment' (1:2)" } diff --git a/packages/babel-parser/test/fixtures/experimental/nullish-coalescing-operator/no-plugin-error/options.json b/packages/babel-parser/test/fixtures/experimental/nullish-coalescing-operator/no-plugin-error/options.json index 0904e05d8c5e..9ae9a3d8a5d1 100644 --- a/packages/babel-parser/test/fixtures/experimental/nullish-coalescing-operator/no-plugin-error/options.json +++ b/packages/babel-parser/test/fixtures/experimental/nullish-coalescing-operator/no-plugin-error/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'nullishCoalescingOperator' (1:4)" + "throws": "This experimental syntax requires enabling the parser plugin: 'nullishCoalescingOperator' (1:4)" } diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/11/options.json b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/11/options.json index 7c9cd8106fd9..b382a06ac5d7 100644 --- a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/11/options.json +++ b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/11/options.json @@ -1,5 +1,4 @@ { "sourceType": "module", - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:23)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:23)" } diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/12/options.json b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/12/options.json index 566d19621890..d6149ed84502 100644 --- a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/12/options.json +++ b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/12/options.json @@ -1,5 +1,4 @@ { "sourceType": "module", - "throws": - "`bar` has already been exported. Exported identifiers must be unique. (2:13)" + "throws": "`bar` has already been exported. Exported identifiers must be unique. (2:13)" } diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/13/options.json b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/13/options.json index eef913e6fd20..8daa306ff731 100644 --- a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/13/options.json +++ b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/13/options.json @@ -1,5 +1,4 @@ { "sourceType": "module", - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:30)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:30)" } diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/14/options.json b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/14/options.json index 2c69619f7140..a87b46d55ac6 100644 --- a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/14/options.json +++ b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/14/options.json @@ -1,5 +1,4 @@ { "sourceType": "module", - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:29)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:29)" } diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/15/options.json b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/15/options.json index eef913e6fd20..8daa306ff731 100644 --- a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/15/options.json +++ b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/15/options.json @@ -1,5 +1,4 @@ { "sourceType": "module", - "throws": - "`foo` has already been exported. Exported identifiers must be unique. (2:30)" + "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:30)" } diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/7/options.json b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/7/options.json index eef8a7af3839..09b3275eae5c 100644 --- a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/7/options.json +++ b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/7/options.json @@ -1,4 +1,3 @@ { - "throws": - "The rest element has to be the last element when destructuring (1:10)" + "throws": "The rest element has to be the last element when destructuring (1:10)" } diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/expression-rest-not-last-invalid/options.json b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/expression-rest-not-last-invalid/options.json index 87b6e1b20fed..d2981263bf2c 100644 --- a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/expression-rest-not-last-invalid/options.json +++ b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/expression-rest-not-last-invalid/options.json @@ -1,4 +1,3 @@ { - "throws": - "The rest element has to be the last element when destructuring (1:2)" + "throws": "The rest element has to be the last element when destructuring (1:2)" } diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/options.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/options.json index e89b07f66d80..0b022f9ea115 100644 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/options.json +++ b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'optionalCatchBinding' (4:6)" + "throws": "This experimental syntax requires enabling the parser plugin: 'optionalCatchBinding' (4:6)" } diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/options.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/options.json index e89b07f66d80..0b022f9ea115 100644 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/options.json +++ b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'optionalCatchBinding' (4:6)" + "throws": "This experimental syntax requires enabling the parser plugin: 'optionalCatchBinding' (4:6)" } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json index b6e4db397e22..eb1a0f5f16f2 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/invalid-proposal/options.json @@ -1,5 +1,4 @@ { "plugins": [["pipelineOperator", { "proposal": "invalid" }]], - "throws": - "'pipelineOperator' requires 'proposal' option whose value should be one of: minimal" + "throws": "'pipelineOperator' requires 'proposal' option whose value should be one of: minimal" } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/no-plugin/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/no-plugin/options.json index aaaa3350b6fe..5d8a6bb1204c 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/no-plugin/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/no-plugin/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'pipelineOperator' (1:2)" + "throws": "This experimental syntax requires enabling the parser plugin: 'pipelineOperator' (1:2)" } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-ban-await-f/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-ban-await-f/options.json index 7f92d28237e0..98b0d71d084e 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-ban-await-f/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-ban-await-f/options.json @@ -1,5 +1,4 @@ { "plugins": [["pipelineOperator", { "proposal": "minimal" }]], - "throws": - "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal (2:14)" + "throws": "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal (2:14)" } diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-ban-await/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-ban-await/options.json index 7f92d28237e0..98b0d71d084e 100644 --- a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-ban-await/options.json +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-minimal-ban-await/options.json @@ -1,5 +1,4 @@ { "plugins": [["pipelineOperator", { "proposal": "minimal" }]], - "throws": - "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal (2:14)" + "throws": "Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal (2:14)" } diff --git a/packages/babel-parser/test/fixtures/experimental/throw-expression/not-enabled/options.json b/packages/babel-parser/test/fixtures/experimental/throw-expression/not-enabled/options.json index 9b86aff45968..47934f708223 100644 --- a/packages/babel-parser/test/fixtures/experimental/throw-expression/not-enabled/options.json +++ b/packages/babel-parser/test/fixtures/experimental/throw-expression/not-enabled/options.json @@ -1,4 +1,3 @@ { - "throws": - "This experimental syntax requires enabling the parser plugin: 'throwExpressions' (2:3)" + "throws": "This experimental syntax requires enabling the parser plugin: 'throwExpressions' (2:3)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-declare-export-type/options.json b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-declare-export-type/options.json index 9201b1e54299..2f2a34e73580 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-declare-export-type/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-declare-export-type/options.json @@ -1,4 +1,3 @@ { - "throws": - "`declare export type` is not supported. Use `export type` instead (1:15)" + "throws": "`declare export type` is not supported. Use `export type` instead (1:15)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-const/options.json b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-const/options.json index a0f1f54296d1..8466e2ca853c 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-const/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-const/options.json @@ -1,4 +1,3 @@ { - "throws": - "`declare export const` is not supported. Use `declare export var` instead (1:15)" + "throws": "`declare export const` is not supported. Use `declare export var` instead (1:15)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-interface/options.json b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-interface/options.json index 7dfccf9590eb..3977f3c48054 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-interface/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-interface/options.json @@ -1,4 +1,3 @@ { - "throws": - "`declare export interface` is not supported. Use `export interface` instead (1:15)" + "throws": "`declare export interface` is not supported. Use `export interface` instead (1:15)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-let/options.json b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-let/options.json index 22611154f158..745a711f1178 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-let/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-let/options.json @@ -1,4 +1,3 @@ { - "throws": - "`declare export let` is not supported. Use `declare export var` instead (1:15)" + "throws": "`declare export let` is not supported. Use `declare export var` instead (1:15)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-module/8/options.json b/packages/babel-parser/test/fixtures/flow/declare-module/8/options.json index 774cdb5a2ce4..32826163f102 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-module/8/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-module/8/options.json @@ -1,4 +1,3 @@ { - "throws": - "Only declares and type imports are allowed inside declare module (2:2)" + "throws": "Only declares and type imports are allowed inside declare module (2:2)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-module/invalid-commonjs-module/options.json b/packages/babel-parser/test/fixtures/flow/declare-module/invalid-commonjs-module/options.json index 0d61c152b68d..adfde3236356 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-module/invalid-commonjs-module/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-module/invalid-commonjs-module/options.json @@ -1,4 +1,3 @@ { - "throws": - "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module (1:55)" + "throws": "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module (1:55)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-module/invalid-es-module/options.json b/packages/babel-parser/test/fixtures/flow/declare-module/invalid-es-module/options.json index bf1bde22fcbf..b40239a5609c 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-module/invalid-es-module/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-module/invalid-es-module/options.json @@ -1,4 +1,3 @@ { - "throws": - "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module (1:53)" + "throws": "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module (1:53)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-module/invalid-import/options.json b/packages/babel-parser/test/fixtures/flow/declare-module/invalid-import/options.json index ffd120e2cdfe..c237bb99a73b 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-module/invalid-import/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-module/invalid-import/options.json @@ -1,4 +1,3 @@ { - "throws": - "Imports within a `declare module` body must always be `import type` or `import typeof` (1:21)" + "throws": "Imports within a `declare module` body must always be `import type` or `import typeof` (1:21)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-module/invalid-module-in-module/options.json b/packages/babel-parser/test/fixtures/flow/declare-module/invalid-module-in-module/options.json index ecaf35fa621a..cd823bd7c4e0 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-module/invalid-module-in-module/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-module/invalid-module-in-module/options.json @@ -1,4 +1,3 @@ { - "throws": - "`declare module` cannot be used inside another `declare module` (1:27)" + "throws": "`declare module` cannot be used inside another `declare module` (1:27)" } diff --git a/packages/babel-parser/test/fixtures/flow/optional-type/6/options.json b/packages/babel-parser/test/fixtures/flow/optional-type/6/options.json index fd783ce26e13..fb2831d6188b 100644 --- a/packages/babel-parser/test/fixtures/flow/optional-type/6/options.json +++ b/packages/babel-parser/test/fixtures/flow/optional-type/6/options.json @@ -1,4 +1,3 @@ { - "throws": - "A binding pattern parameter cannot be optional in an implementation signature. (1:11)" + "throws": "A binding pattern parameter cannot be optional in an implementation signature. (1:11)" } diff --git a/packages/babel-parser/test/fixtures/flow/regression/issue-58-ambiguous/options.json b/packages/babel-parser/test/fixtures/flow/regression/issue-58-ambiguous/options.json index 59a47050c4df..49dc6c3d5a6a 100644 --- a/packages/babel-parser/test/fixtures/flow/regression/issue-58-ambiguous/options.json +++ b/packages/babel-parser/test/fixtures/flow/regression/issue-58-ambiguous/options.json @@ -1,4 +1,3 @@ { - "throws": - "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate. (4:4)" + "throws": "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate. (4:4)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/137/options.json b/packages/babel-parser/test/fixtures/flow/type-annotations/137/options.json index f4cabf034ae4..786acad32af0 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/137/options.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/137/options.json @@ -1,4 +1,3 @@ { - "throws": - "Spread operator cannot appear in class or interface definitions (2:1)" + "throws": "Spread operator cannot appear in class or interface definitions (2:1)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/with-default-invalid/options.json b/packages/babel-parser/test/fixtures/flow/type-annotations/with-default-invalid/options.json index aedf72ddb707..24792311b3e9 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/with-default-invalid/options.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/with-default-invalid/options.json @@ -1,4 +1,3 @@ { - "throws": - "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25` (1:20)" + "throws": "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25` (1:20)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-shorthand-2/options.json b/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-shorthand-2/options.json index 132b4a19ec67..036229c5b95a 100644 --- a/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-shorthand-2/options.json +++ b/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-shorthand-2/options.json @@ -1,4 +1,3 @@ { - "throws": - "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements (1:13)" + "throws": "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements (1:13)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-shorthand/options.json b/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-shorthand/options.json index 4ee840273c10..7aa4274c7160 100644 --- a/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-shorthand/options.json +++ b/packages/babel-parser/test/fixtures/flow/type-imports/invalid-import-type-shorthand/options.json @@ -1,4 +1,3 @@ { - "throws": - "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements (1:15)" + "throws": "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements (1:15)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/arrow_error_without_jsx/options.json b/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/arrow_error_without_jsx/options.json index c349e4e3999e..cf72e7dfcad7 100644 --- a/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/arrow_error_without_jsx/options.json +++ b/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/arrow_error_without_jsx/options.json @@ -1,5 +1,4 @@ { "plugins": ["flow"], - "throws": - "Expected an arrow function after this type parameter declaration (1:0)" + "throws": "Expected an arrow function after this type parameter declaration (1:0)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/default-missing/options.json b/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/default-missing/options.json index 3c2ac7c9b913..022607b81797 100644 --- a/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/default-missing/options.json +++ b/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/default-missing/options.json @@ -1,4 +1,3 @@ { - "throws": - "Type parameter declaration needs a default, since a preceding type parameter declaration has a default. (1:28)" + "throws": "Type parameter declaration needs a default, since a preceding type parameter declaration has a default. (1:28)" } diff --git a/packages/babel-parser/test/fixtures/jsx/errors/adjacent-tags/options.json b/packages/babel-parser/test/fixtures/jsx/errors/adjacent-tags/options.json index a87c9c653817..182a3a9016d8 100644 --- a/packages/babel-parser/test/fixtures/jsx/errors/adjacent-tags/options.json +++ b/packages/babel-parser/test/fixtures/jsx/errors/adjacent-tags/options.json @@ -1,4 +1,3 @@ { - "throws": - "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...? (1:22)" + "throws": "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...? (1:22)" } diff --git a/packages/babel-parser/test/fixtures/jsx/errors/attribute-arbitrary-expression/options.json b/packages/babel-parser/test/fixtures/jsx/errors/attribute-arbitrary-expression/options.json index ed93e1882a40..19a214000ffc 100644 --- a/packages/babel-parser/test/fixtures/jsx/errors/attribute-arbitrary-expression/options.json +++ b/packages/babel-parser/test/fixtures/jsx/errors/attribute-arbitrary-expression/options.json @@ -1,4 +1,3 @@ { - "throws": - "JSX value should be either an expression or a quoted JSX text (1:9)" + "throws": "JSX value should be either an expression or a quoted JSX text (1:9)" } diff --git a/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/options.json b/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/options.json index 63132875c9cc..67137f21076c 100644 --- a/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/options.json +++ b/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/options.json @@ -1,4 +1,3 @@ { - "throws": - "A parameter property may not be declared using a binding pattern. (2:23)" + "throws": "A parameter property may not be declared using a binding pattern. (2:23)" } diff --git a/packages/babel-parser/test/fixtures/typescript/function/pattern-parameters/options.json b/packages/babel-parser/test/fixtures/typescript/function/pattern-parameters/options.json index fd783ce26e13..fb2831d6188b 100644 --- a/packages/babel-parser/test/fixtures/typescript/function/pattern-parameters/options.json +++ b/packages/babel-parser/test/fixtures/typescript/function/pattern-parameters/options.json @@ -1,4 +1,3 @@ { - "throws": - "A binding pattern parameter cannot be optional in an implementation signature. (1:11)" + "throws": "A binding pattern parameter cannot be optional in an implementation signature. (1:11)" } diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/throwIfClosureRequired/for-const-closure/options.json b/packages/babel-plugin-transform-block-scoping/test/fixtures/throwIfClosureRequired/for-const-closure/options.json index 99d9938cc1ed..30a935bce776 100644 --- a/packages/babel-plugin-transform-block-scoping/test/fixtures/throwIfClosureRequired/for-const-closure/options.json +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/throwIfClosureRequired/for-const-closure/options.json @@ -1,5 +1,4 @@ { "plugins": [["transform-block-scoping", { "throwIfClosureRequired": true }]], - "throws": - "Compiling let/const in this block would add a closure (throwIfClosureRequired)." + "throws": "Compiling let/const in this block would add a closure (throwIfClosureRequired)." } diff --git a/packages/babel-plugin-transform-classes/test/fixtures/spec/super-illegal-non-constructor-call/options.json b/packages/babel-plugin-transform-classes/test/fixtures/spec/super-illegal-non-constructor-call/options.json index 99308b242326..2ff7004be5b7 100644 --- a/packages/babel-plugin-transform-classes/test/fixtures/spec/super-illegal-non-constructor-call/options.json +++ b/packages/babel-plugin-transform-classes/test/fixtures/spec/super-illegal-non-constructor-call/options.json @@ -1,4 +1,3 @@ { - "throws": - "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'." + "throws": "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'." } diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/requireDirective/true-throws-if-found-with-directive/options.json b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/requireDirective/true-throws-if-found-with-directive/options.json index 7eaa14b1a148..09a51e3ba58f 100644 --- a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/requireDirective/true-throws-if-found-with-directive/options.json +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/requireDirective/true-throws-if-found-with-directive/options.json @@ -1,4 +1,3 @@ { - "throws": - "A @flow directive is required when using Flow annotations with the `requireDirective` option." + "throws": "A @flow directive is required when using Flow annotations with the `requireDirective` option." } diff --git a/packages/babel-plugin-transform-for-of/test/fixtures/error/invalid-option/options.json b/packages/babel-plugin-transform-for-of/test/fixtures/error/invalid-option/options.json index c18fd74438ef..2f5c6598efb7 100644 --- a/packages/babel-plugin-transform-for-of/test/fixtures/error/invalid-option/options.json +++ b/packages/babel-plugin-transform-for-of/test/fixtures/error/invalid-option/options.json @@ -1,5 +1,4 @@ { "plugins": [["transform-for-of", { "assumeArray": true, "loose": true }]], - "throws": - "The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of" + "throws": "The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of" } diff --git a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-xml-namespacing/options.json b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-xml-namespacing/options.json index 2ff4f32134d2..8285c733a003 100644 --- a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-xml-namespacing/options.json +++ b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-xml-namespacing/options.json @@ -1,4 +1,3 @@ { - "throws": - "Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can turn on the 'throwIfNamespace' flag to bypass this warning." + "throws": "Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can turn on the 'throwIfNamespace' flag to bypass this warning." } diff --git a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-throw-error-namespaces-if-not-flag/options.json b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-throw-error-namespaces-if-not-flag/options.json index ebcbfc2dc3e7..261ae7727779 100644 --- a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-throw-error-namespaces-if-not-flag/options.json +++ b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-throw-error-namespaces-if-not-flag/options.json @@ -8,6 +8,5 @@ } ] ], - "throws": - "Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can turn on the 'throwIfNamespace' flag to bypass this warning." + "throws": "Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can turn on the 'throwIfNamespace' flag to bypass this warning." } diff --git a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/throw-if-pragma-set-but-not-pragmafrag-and-frag-used/options.json b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/throw-if-pragma-set-but-not-pragmafrag-and-frag-used/options.json index f461d24b6f55..b89035fd105e 100644 --- a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/throw-if-pragma-set-but-not-pragmafrag-and-frag-used/options.json +++ b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/throw-if-pragma-set-but-not-pragmafrag-and-frag-used/options.json @@ -1,4 +1,3 @@ { - "throws": - "transform-react-jsx: pragma has been set but pragmafrag has not been set" + "throws": "transform-react-jsx: pragma has been set but pragmafrag has not been set" } diff --git a/packages/babel-plugin-transform-react-jsx/test/fixtures/useBuiltIns/assignment-invalid-option/options.json b/packages/babel-plugin-transform-react-jsx/test/fixtures/useBuiltIns/assignment-invalid-option/options.json index e1d66421a3e9..3baf37938e7d 100644 --- a/packages/babel-plugin-transform-react-jsx/test/fixtures/useBuiltIns/assignment-invalid-option/options.json +++ b/packages/babel-plugin-transform-react-jsx/test/fixtures/useBuiltIns/assignment-invalid-option/options.json @@ -1,5 +1,4 @@ { "plugins": [["transform-react-jsx", { "useBuiltIns": "invalidOption" }]], - "throws": - "transform-react-jsx currently only accepts a boolean option for useBuiltIns (defaults to false)" + "throws": "transform-react-jsx currently only accepts a boolean option for useBuiltIns (defaults to false)" } diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/exports/export=/options.json b/packages/babel-plugin-transform-typescript/test/fixtures/exports/export=/options.json index 8d3baef9620f..9ba7cc5c5f3a 100644 --- a/packages/babel-plugin-transform-typescript/test/fixtures/exports/export=/options.json +++ b/packages/babel-plugin-transform-typescript/test/fixtures/exports/export=/options.json @@ -1,4 +1,3 @@ { - "throws": - "`export =` is not supported by @babel/plugin-transform-typescript\nPlease consider using `export ;`." + "throws": "`export =` is not supported by @babel/plugin-transform-typescript\nPlease consider using `export ;`." } diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/imports/import=/options.json b/packages/babel-plugin-transform-typescript/test/fixtures/imports/import=/options.json index a8811f52ea61..596239c2e1c0 100644 --- a/packages/babel-plugin-transform-typescript/test/fixtures/imports/import=/options.json +++ b/packages/babel-plugin-transform-typescript/test/fixtures/imports/import=/options.json @@ -1,4 +1,3 @@ { - "throws": - "`import =` is not supported by @babel/plugin-transform-typescript\nPlease consider using `import from '';` alongside Typescript's --allowSyntheticDefaultImports option." + "throws": "`import =` is not supported by @babel/plugin-transform-typescript\nPlease consider using `import from '';` alongside Typescript's --allowSyntheticDefaultImports option." } diff --git a/packages/babel-preset-env/test/fixtures/preset-options-add-used-built-ins/browserslist-config-ignore/options.json b/packages/babel-preset-env/test/fixtures/preset-options-add-used-built-ins/browserslist-config-ignore/options.json index 77edc18b6566..39282366760a 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options-add-used-built-ins/browserslist-config-ignore/options.json +++ b/packages/babel-preset-env/test/fixtures/preset-options-add-used-built-ins/browserslist-config-ignore/options.json @@ -3,8 +3,7 @@ [ "../../../../lib", { - "configPath": - "../fixtures/preset-options-add-used-built-ins/browserslist-config-ignore", + "configPath": "../fixtures/preset-options-add-used-built-ins/browserslist-config-ignore", "modules": false, "targets": { "esmodules": true }, "useBuiltIns": "usage", diff --git a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config-ignore-config-with-false/options.json b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config-ignore-config-with-false/options.json index 772ac0d056ae..e5b755470d66 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config-ignore-config-with-false/options.json +++ b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config-ignore-config-with-false/options.json @@ -3,8 +3,7 @@ [ "../../../../lib", { - "configPath": - "../fixtures/preset-options/browserslist-config-ignore-with-false", + "configPath": "../fixtures/preset-options/browserslist-config-ignore-with-false", "modules": false, "ignoreBrowserslistConfig": true } diff --git a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config-ignore-package-with-false/options.json b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config-ignore-package-with-false/options.json index 772ac0d056ae..e5b755470d66 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config-ignore-package-with-false/options.json +++ b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config-ignore-package-with-false/options.json @@ -3,8 +3,7 @@ [ "../../../../lib", { - "configPath": - "../fixtures/preset-options/browserslist-config-ignore-with-false", + "configPath": "../fixtures/preset-options/browserslist-config-ignore-with-false", "modules": false, "ignoreBrowserslistConfig": true } diff --git a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config/options.json b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config/options.json index ec82f53a37b2..7fa5af3baafb 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config/options.json +++ b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-config/options.json @@ -3,8 +3,7 @@ [ "../../../../lib", { - "configPath": - "packages/babel-preset-env/test/fixtures/preset-options/browserslist-config", + "configPath": "packages/babel-preset-env/test/fixtures/preset-options/browserslist-config", "modules": false } ] diff --git a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-package-ignore-with-targets/options.json b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-package-ignore-with-targets/options.json index d019d62723c7..edb525659be2 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-package-ignore-with-targets/options.json +++ b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-package-ignore-with-targets/options.json @@ -3,8 +3,7 @@ [ "../../../../lib", { - "configPath": - "../fixtures/preset-options/browserslist-package-ignore-with-array", + "configPath": "../fixtures/preset-options/browserslist-package-ignore-with-array", "targets": { "chrome": 55 }, diff --git a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-package/options.json b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-package/options.json index c5435b615af0..79c5b70108b0 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/browserslist-package/options.json +++ b/packages/babel-preset-env/test/fixtures/preset-options/browserslist-package/options.json @@ -3,8 +3,7 @@ [ "../../../../lib", { - "configPath": - "packages/babel-preset-env/test/fixtures/preset-options/browserslist-package", + "configPath": "packages/babel-preset-env/test/fixtures/preset-options/browserslist-package", "modules": false } ] diff --git a/packages/babel-template/src/options.js b/packages/babel-template/src/options.js index fa1e275a64e9..54e3972de278 100644 --- a/packages/babel-template/src/options.js +++ b/packages/babel-template/src/options.js @@ -64,8 +64,7 @@ export function validate(opts: mixed): TemplateOpts { placeholderPattern, preserveComments, ...parser - } = - opts || {}; + } = opts || {}; if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) { throw new Error( diff --git a/yarn.lock b/yarn.lock index deb8da09c01b..05593664d6a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -742,6 +742,12 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" +"@samverschueren/stream-to-observable@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" + dependencies: + any-observable "^0.3.0" + "@types/acorn@^4.0.2": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.3.tgz#d1f3e738dde52536f9aad3d3380d14e448820afd" @@ -904,7 +910,7 @@ ajv@^5.1.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.0.1, ajv@^6.5.0: +ajv@^6.0.1: version "6.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" dependencies: @@ -921,6 +927,15 @@ ajv@^6.1.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" +ajv@^6.5.3: + version "6.5.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.4.tgz#247d5274110db653706b550fcc2b797ca28cfc59" + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -987,9 +1002,9 @@ ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" -any-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" +any-observable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" anymatch@^1.3.0: version "1.3.2" @@ -1005,10 +1020,6 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -app-root-path@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" - append-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" @@ -1873,7 +1884,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1891,6 +1902,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^2.3.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + charcodes@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/charcodes/-/charcodes-0.1.0.tgz#61f8c244fc7f94f186fe74f31078901a3ed7928e" @@ -1899,6 +1918,10 @@ chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + cheerio@^1.0.0-rc.1: version "1.0.0-rc.2" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" @@ -1954,6 +1977,10 @@ ci-info@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" +ci-info@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -1992,10 +2019,6 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" -cli-spinners@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" - cli-truncate@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" @@ -2147,10 +2170,14 @@ command-join@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" -commander@2.14.x, commander@^2.11.0, commander@^2.8.1, commander@^2.9.0, commander@~2.14.1: +commander@2.14.x, commander@^2.8.1, commander@^2.9.0, commander@~2.14.1: version "2.14.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" +commander@^2.14.1: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -2417,14 +2444,13 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -cosmiconfig@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" +cosmiconfig@^5.0.2, cosmiconfig@^5.0.6: + version "5.0.6" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.6.tgz#dca6cf680a0bd03589aff684700858c81abeeb39" dependencies: is-directory "^0.3.1" js-yaml "^3.9.0" parse-json "^4.0.0" - require-from-string "^2.0.1" create-ecdh@^4.0.0: version "4.0.0" @@ -2911,16 +2937,6 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.10.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - es-abstract@^1.4.3, es-abstract@^1.5.1: version "1.10.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" @@ -3026,9 +3042,9 @@ eslint-config-babel@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-8.0.0.tgz#4f7398ed2772a24a36467d05f25262ab8121e714" -eslint-plugin-flowtype@^2.50.0: - version "2.50.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.0.tgz#953e262fa9b5d0fa76e178604892cf60dfb916da" +eslint-plugin-flowtype@^2.50.1: + version "2.50.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.1.tgz#36d4c961ac8b9e9e1dc091d3fba0537dad34ae8a" dependencies: lodash "^4.17.10" @@ -3065,12 +3081,12 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.3.0.tgz#53695aca5213968aacdf970ccb231e42a2b285f8" +eslint@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.6.0.tgz#b6f7806041af01f71b3f1895cbb20971ea4b6223" dependencies: - ajv "^6.5.0" - babel-code-frame "^6.26.0" + "@babel/code-frame" "^7.0.0" + ajv "^6.5.3" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^3.1.0" @@ -3085,11 +3101,11 @@ eslint@^5.3.0: functional-red-black-tree "^1.0.1" glob "^7.1.2" globals "^11.7.0" - ignore "^4.0.2" + ignore "^4.0.6" imurmurhash "^0.1.4" - inquirer "^5.2.0" + inquirer "^6.1.0" is-resolvable "^1.1.0" - js-yaml "^3.11.0" + js-yaml "^3.12.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" lodash "^4.17.5" @@ -3102,8 +3118,7 @@ eslint@^5.3.0: progress "^2.0.0" regexpp "^2.0.0" require-uncached "^1.0.3" - semver "^5.5.0" - string.prototype.matchall "^2.0.0" + semver "^5.5.1" strip-ansi "^4.0.0" strip-json-comments "^2.0.1" table "^4.0.3" @@ -3200,6 +3215,18 @@ execa@^0.8.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -3280,12 +3307,12 @@ external-editor@^2.0.4: iconv-lite "^0.4.17" tmp "^0.0.33" -external-editor@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" +external-editor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" + chardet "^0.7.0" + iconv-lite "^0.4.24" tmp "^0.0.33" extglob@^0.3.1: @@ -3437,6 +3464,12 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + dependencies: + locate-path "^3.0.0" + findup-sync@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" @@ -3639,6 +3672,10 @@ get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -4206,18 +4243,31 @@ https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" -husky@^0.14.3: - version "0.14.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" - dependencies: - is-ci "^1.0.10" - normalize-path "^1.0.0" - strip-indent "^2.0.0" +husky@^1.0.0-rc.15: + version "1.0.0-rc.15" + resolved "https://registry.yarnpkg.com/husky/-/husky-1.0.0-rc.15.tgz#f1545d15c7f34d5db19e40b70df07ac9a362673d" + dependencies: + cosmiconfig "^5.0.6" + execa "^0.9.0" + find-up "^3.0.0" + get-stdin "^6.0.0" + is-ci "^1.2.1" + pkg-dir "^3.0.0" + please-upgrade-node "^3.1.1" + read-pkg "^4.0.1" + run-node "^1.0.0" + slash "^2.0.0" iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@~0.4.13: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + dependencies: + safer-buffer ">= 2.1.2 < 3" + iconv-lite@^0.4.4: version "0.4.21" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" @@ -4234,7 +4284,7 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" -ignore@^4.0.2: +ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -4313,20 +4363,20 @@ inquirer@^3.2.2: strip-ansi "^4.0.0" through "^2.3.6" -inquirer@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726" +inquirer@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^2.1.0" + external-editor "^3.0.0" figures "^2.0.0" - lodash "^4.3.0" + lodash "^4.17.10" mute-stream "0.0.7" run-async "^2.2.0" - rxjs "^5.5.2" + rxjs "^6.1.0" string-width "^2.1.0" strip-ansi "^4.0.0" through "^2.3.6" @@ -4407,6 +4457,12 @@ is-ci@^1.0.10: dependencies: ci-info "^1.0.0" +is-ci@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" + dependencies: + ci-info "^1.5.0" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -4537,11 +4593,11 @@ is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" -is-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2" +is-observable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" dependencies: - symbol-observable "^0.2.2" + symbol-observable "^1.1.0" is-odd@^2.0.0: version "2.0.0" @@ -4851,10 +4907,6 @@ jest-environment-node@^23.4.0: jest-mock "^23.2.0" jest-util "^23.4.0" -jest-get-type@^21.2.0: - version "21.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" - jest-get-type@^22.1.0: version "22.1.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" @@ -5011,15 +5063,6 @@ jest-util@^23.4.0: slash "^1.0.0" source-map "^0.6.0" -jest-validate@^21.1.0: - version "21.2.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" - dependencies: - chalk "^2.0.1" - jest-get-type "^21.2.0" - leven "^2.1.0" - pretty-format "^21.2.1" - jest-validate@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.4.0.tgz#d96eede01ef03ac909c009e9c8e455197d48c201" @@ -5029,6 +5072,15 @@ jest-validate@^23.4.0: leven "^2.1.0" pretty-format "^23.2.0" +jest-validate@^23.5.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" + dependencies: + chalk "^2.0.1" + jest-get-type "^22.1.0" + leven "^2.1.0" + pretty-format "^23.6.0" + jest-watcher@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" @@ -5062,7 +5114,7 @@ js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-yaml@^3.11.0: +js-yaml@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" dependencies: @@ -5365,30 +5417,32 @@ liftoff@^2.5.0: rechoir "^0.6.2" resolve "^1.1.7" -lint-staged@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-6.1.1.tgz#cd08c4d9b8ccc2d37198d1c47ce77d22be6cf324" +lint-staged@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.3.0.tgz#90ff33e5ca61ed3dbac35b6f6502dbefdc0db58d" dependencies: - app-root-path "^2.0.0" - chalk "^2.1.0" - commander "^2.11.0" - cosmiconfig "^4.0.0" + chalk "^2.3.1" + commander "^2.14.1" + cosmiconfig "^5.0.2" debug "^3.1.0" dedent "^0.7.0" - execa "^0.8.0" + execa "^0.9.0" find-parent-dir "^0.3.0" is-glob "^4.0.0" - jest-validate "^21.1.0" - listr "^0.13.0" - lodash "^4.17.4" - log-symbols "^2.0.0" - minimatch "^3.0.0" + is-windows "^1.0.2" + jest-validate "^23.5.0" + listr "^0.14.1" + lodash "^4.17.5" + log-symbols "^2.2.0" + micromatch "^3.1.8" npm-which "^3.0.1" p-map "^1.1.1" path-is-inside "^1.0.2" pify "^3.0.0" - staged-git-files "1.0.0" - stringify-object "^3.2.0" + please-upgrade-node "^3.0.2" + staged-git-files "1.1.1" + string-argv "^0.0.2" + stringify-object "^3.2.2" listr-silent-renderer@^1.1.1: version "1.1.1" @@ -5416,27 +5470,19 @@ listr-verbose-renderer@^0.4.0: date-fns "^1.27.2" figures "^1.7.0" -listr@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d" +listr@^0.14.1: + version "0.14.2" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.2.tgz#cbe44b021100a15376addfc2d79349ee430bfe14" dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - figures "^1.7.0" - indent-string "^2.1.0" - is-observable "^0.2.0" + "@samverschueren/stream-to-observable" "^0.3.0" + is-observable "^1.1.0" is-promise "^2.1.0" is-stream "^1.1.0" listr-silent-renderer "^1.1.1" listr-update-renderer "^0.4.0" listr-verbose-renderer "^0.4.0" - log-symbols "^1.0.2" - log-update "^1.0.2" - ora "^0.2.3" p-map "^1.1.1" - rxjs "^5.4.2" - stream-to-observable "^0.2.0" - strip-ansi "^3.0.1" + rxjs "^6.1.0" load-json-file@^1.0.0: version "1.1.0" @@ -5485,6 +5531,13 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" @@ -5611,7 +5664,7 @@ log-symbols@^1.0.2: dependencies: chalk "^1.0.0" -log-symbols@^2.0.0: +log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" dependencies: @@ -6125,10 +6178,6 @@ normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" - normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -6311,15 +6360,6 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" -ora@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" - dependencies: - chalk "^1.1.1" - cli-cursor "^1.0.2" - cli-spinners "^0.1.2" - object-assign "^4.0.1" - ordered-read-streams@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" @@ -6377,12 +6417,24 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" +p-limit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec" + dependencies: + p-try "^2.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" dependencies: p-limit "^1.1.0" +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + dependencies: + p-limit "^2.0.0" + p-map@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" @@ -6391,6 +6443,10 @@ p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" +p-try@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" + package-json@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" @@ -6594,6 +6650,18 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + dependencies: + find-up "^3.0.0" + +please-upgrade-node@^3.0.2, please-upgrade-node@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz#ed320051dfcc5024fae696712c8288993595e8ac" + dependencies: + semver-compare "^1.0.0" + plugin-error@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace" @@ -6637,20 +6705,20 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.13.7: - version "1.13.7" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.7.tgz#850f3b8af784a49a6ea2d2eaa7ed1428a34b7281" +prettier@^1.14.3: + version "1.14.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895" -pretty-format@^21.2.1: - version "21.2.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" +pretty-format@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.2.0.tgz#3b0aaa63c018a53583373c1cb3a5d96cc5e83017" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-format@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.2.0.tgz#3b0aaa63c018a53583373c1cb3a5d96cc5e83017" +pretty-format@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" @@ -6861,6 +6929,14 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" +read-pkg@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" + dependencies: + normalize-package-data "^2.3.2" + parse-json "^4.0.0" + pify "^3.0.0" + "readable-stream@>=1.1.13-1 <1.2.0-0", readable-stream@~1.1.9: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -6996,12 +7072,6 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp.prototype.flags@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" - dependencies: - define-properties "^1.1.2" - regexpp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.0.tgz#b2a7534a85ca1b033bcf5ce9ff8e56d4e0755365" @@ -7186,10 +7256,6 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" -require-from-string@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.1.tgz#c545233e9d7da6616e9d59adfb39fc9f588676ff" - require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -7329,6 +7395,10 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" +run-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" + rx-lite-aggregates@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" @@ -7339,17 +7409,11 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" -rxjs@^5.4.2: - version "5.5.6" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02" - dependencies: - symbol-observable "1.0.1" - -rxjs@^5.5.2: - version "5.5.11" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87" +rxjs@^6.1.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.2.tgz#6a688b16c4e6e980e62ea805ec30648e1c60907f" dependencies: - symbol-observable "1.0.1" + tslib "^1.9.0" safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" @@ -7361,7 +7425,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -7383,6 +7447,10 @@ sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" +semver-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + semver-greatest-satisfied-range@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" @@ -7663,9 +7731,9 @@ stack-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" -staged-git-files@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.0.0.tgz#cdb847837c1fcc52c08a872d4883cc0877668a80" +staged-git-files@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.1.tgz#37c2218ef0d6d26178b1310719309a16a59f8f7b" static-extend@^0.1.1: version "0.1.2" @@ -7717,18 +7785,16 @@ stream-splicer@^2.0.0: inherits "^2.0.1" readable-stream "^2.0.2" -stream-to-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" - dependencies: - any-observable "^0.2.0" - streamfilter@^1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/streamfilter/-/streamfilter-1.0.7.tgz#ae3e64522aa5a35c061fd17f67620c7653c643c9" dependencies: readable-stream "^2.0.2" +string-argv@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" + string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -7751,16 +7817,6 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string.prototype.matchall@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz#2af8fe3d2d6dc53ca2a59bd376b089c3c152b3c8" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.10.0" - function-bind "^1.1.1" - has-symbols "^1.0.0" - regexp.prototype.flags "^1.2.0" - string.prototype.padend@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" @@ -7785,7 +7841,7 @@ string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" -stringify-object@^3.2.0: +stringify-object@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.2.tgz#9853052e5a88fb605a44cd27445aa257ad7ffbcd" dependencies: @@ -7889,13 +7945,9 @@ sver-compat@^1.5.0: es6-iterator "^2.0.1" es6-symbol "^3.1.1" -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - -symbol-observable@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" +symbol-observable@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" symbol-tree@^3.2.2: version "3.2.2" @@ -8143,6 +8195,10 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +tslib@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -8306,7 +8362,7 @@ upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" -uri-js@^4.2.1: +uri-js@^4.2.1, uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" dependencies: From a19b72e46d03cea45f45073f1eda7c2c79980ebf Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 24 Sep 2018 18:53:41 -0500 Subject: [PATCH 025/563] jest@23.6.0 (#8764) --- package.json | 4 +- yarn.lock | 212 +++++++++++++++++++++++++-------------------------- 2 files changed, 104 insertions(+), 112 deletions(-) diff --git a/package.json b/package.json index b6a3b65d85ee..4e0647d4fc73 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@babel/runtime": "^7.0.0", "babel-core": "^7.0.0-0", "babel-eslint": "^9.0.0", - "babel-jest": "^23.4.0", + "babel-jest": "^23.6.0", "babel-loader": "^8.0.2", "babel-plugin-transform-charcodes": "^0.1.0", "browserify": "^16.2.2", @@ -48,7 +48,7 @@ "gulp-util": "^3.0.7", "gulp-watch": "^5.0.0", "husky": "^1.0.0-rc.15", - "jest": "^23.4.1", + "jest": "^23.6.0", "lerna": "^2.11.0", "lerna-changelog": "^0.5.0", "lint-staged": "^7.3.0", diff --git a/yarn.lock b/yarn.lock index 05593664d6a1..06a2e73ceebd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1341,9 +1341,9 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.4.0.tgz#22c34c392e2176f6a4c367992a7fcff69d2e8557" +babel-jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" dependencies: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.2.0" @@ -3265,14 +3265,14 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.4.0.tgz#6da4ecc99c1471253e7288338983ad1ebadb60c3" +expect@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" dependencies: ansi-styles "^3.2.0" - jest-diff "^23.2.0" + jest-diff "^23.6.0" jest-get-type "^22.1.0" - jest-matcher-utils "^23.2.0" + jest-matcher-utils "^23.6.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" @@ -4404,6 +4404,12 @@ invariant@^2.2.0, invariant@^2.2.2: dependencies: loose-envify "^1.0.0" +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" @@ -4801,15 +4807,15 @@ istanbul-reports@^1.3.0: dependencies: handlebars "^4.0.3" -jest-changed-files@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.0.tgz#f1b304f98c235af5d9a31ec524262c5e4de3c6ff" +jest-changed-files@^23.4.2: + version "23.4.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" dependencies: throat "^4.0.0" -jest-cli@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.4.1.tgz#c1ffd33254caee376990aa2abe2963e0de4ca76b" +jest-cli@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -4822,19 +4828,19 @@ jest-cli@^23.4.1: istanbul-lib-coverage "^1.2.0" istanbul-lib-instrument "^1.10.1" istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.4.0" - jest-config "^23.4.1" + jest-changed-files "^23.4.2" + jest-config "^23.6.0" jest-environment-jsdom "^23.4.0" jest-get-type "^22.1.0" - jest-haste-map "^23.4.1" + jest-haste-map "^23.6.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" - jest-resolve-dependencies "^23.4.1" - jest-runner "^23.4.1" - jest-runtime "^23.4.1" - jest-snapshot "^23.4.1" + jest-resolve-dependencies "^23.6.0" + jest-runner "^23.6.0" + jest-runtime "^23.6.0" + jest-snapshot "^23.6.0" jest-util "^23.4.0" - jest-validate "^23.4.0" + jest-validate "^23.6.0" jest-watcher "^23.4.0" jest-worker "^23.2.0" micromatch "^2.3.11" @@ -4848,32 +4854,33 @@ jest-cli@^23.4.1: which "^1.2.12" yargs "^11.0.0" -jest-config@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.4.1.tgz#3172fa21f0507d7f8a088ed1dbe4157057f201e9" +jest-config@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" dependencies: babel-core "^6.0.0" - babel-jest "^23.4.0" + babel-jest "^23.6.0" chalk "^2.0.1" glob "^7.1.1" jest-environment-jsdom "^23.4.0" jest-environment-node "^23.4.0" jest-get-type "^22.1.0" - jest-jasmine2 "^23.4.1" + jest-jasmine2 "^23.6.0" jest-regex-util "^23.3.0" - jest-resolve "^23.4.1" + jest-resolve "^23.6.0" jest-util "^23.4.0" - jest-validate "^23.4.0" - pretty-format "^23.2.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + pretty-format "^23.6.0" -jest-diff@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.2.0.tgz#9f2cf4b51e12c791550200abc16b47130af1062a" +jest-diff@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" dependencies: chalk "^2.0.1" diff "^3.2.0" jest-get-type "^22.1.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" jest-docblock@^21.0.0: version "21.2.0" @@ -4885,12 +4892,12 @@ jest-docblock@^23.2.0: dependencies: detect-newline "^2.1.0" -jest-each@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.4.0.tgz#2fa9edd89daa1a4edc9ff9bf6062a36b71345143" +jest-each@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" dependencies: chalk "^2.0.1" - pretty-format "^23.2.0" + pretty-format "^23.6.0" jest-environment-jsdom@^23.4.0: version "23.4.0" @@ -4911,47 +4918,49 @@ jest-get-type@^22.1.0: version "22.1.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" -jest-haste-map@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.4.1.tgz#43a174ba7ac079ae1dd74eaf5a5fe78989474dd2" +jest-haste-map@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" + invariant "^2.2.4" jest-docblock "^23.2.0" jest-serializer "^23.0.1" jest-worker "^23.2.0" micromatch "^2.3.11" sane "^2.0.0" -jest-jasmine2@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.4.1.tgz#fa192262430d418e827636e4a98423e5e7ff0fce" +jest-jasmine2@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" dependencies: + babel-traverse "^6.0.0" chalk "^2.0.1" co "^4.6.0" - expect "^23.4.0" + expect "^23.6.0" is-generator-fn "^1.0.0" - jest-diff "^23.2.0" - jest-each "^23.4.0" - jest-matcher-utils "^23.2.0" + jest-diff "^23.6.0" + jest-each "^23.6.0" + jest-matcher-utils "^23.6.0" jest-message-util "^23.4.0" - jest-snapshot "^23.4.1" + jest-snapshot "^23.6.0" jest-util "^23.4.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" -jest-leak-detector@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.2.0.tgz#c289d961dc638f14357d4ef96e0431ecc1aa377d" +jest-leak-detector@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" dependencies: - pretty-format "^23.2.0" + pretty-format "^23.6.0" -jest-matcher-utils@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.2.0.tgz#4d4981f23213e939e3cedf23dc34c747b5ae1913" +jest-matcher-utils@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" jest-message-util@^23.4.0: version "23.4.0" @@ -4971,42 +4980,42 @@ jest-regex-util@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" -jest-resolve-dependencies@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.4.1.tgz#a1d85247e2963f8b3859f6b0ec61b741b359378e" +jest-resolve-dependencies@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" dependencies: jest-regex-util "^23.3.0" - jest-snapshot "^23.4.1" + jest-snapshot "^23.6.0" -jest-resolve@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.4.1.tgz#7f3c17104732a2c0c940a01256025ed745814982" +jest-resolve@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" dependencies: browser-resolve "^1.11.3" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.4.1.tgz#d41fd1459b95d35d6df685f1468c09e617c8c260" +jest-runner@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" dependencies: exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^23.4.1" + jest-config "^23.6.0" jest-docblock "^23.2.0" - jest-haste-map "^23.4.1" - jest-jasmine2 "^23.4.1" - jest-leak-detector "^23.2.0" + jest-haste-map "^23.6.0" + jest-jasmine2 "^23.6.0" + jest-leak-detector "^23.6.0" jest-message-util "^23.4.0" - jest-runtime "^23.4.1" + jest-runtime "^23.6.0" jest-util "^23.4.0" jest-worker "^23.2.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.4.1.tgz#c1822eba5eb19294debe6b25b2760d0a8c532fd1" +jest-runtime@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^4.1.6" @@ -5015,14 +5024,14 @@ jest-runtime@^23.4.1: exit "^0.1.2" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.1.11" - jest-config "^23.4.1" - jest-haste-map "^23.4.1" + jest-config "^23.6.0" + jest-haste-map "^23.6.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" - jest-resolve "^23.4.1" - jest-snapshot "^23.4.1" + jest-resolve "^23.6.0" + jest-snapshot "^23.6.0" jest-util "^23.4.0" - jest-validate "^23.4.0" + jest-validate "^23.6.0" micromatch "^2.3.11" realpath-native "^1.0.0" slash "^1.0.0" @@ -5034,20 +5043,19 @@ jest-serializer@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" -jest-snapshot@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.4.1.tgz#090de9acae927f6a3af3005bda40d912b83e9c96" +jest-snapshot@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" dependencies: - babel-traverse "^6.0.0" babel-types "^6.0.0" chalk "^2.0.1" - jest-diff "^23.2.0" - jest-matcher-utils "^23.2.0" + jest-diff "^23.6.0" + jest-matcher-utils "^23.6.0" jest-message-util "^23.4.0" - jest-resolve "^23.4.1" + jest-resolve "^23.6.0" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" semver "^5.5.0" jest-util@^23.4.0: @@ -5063,16 +5071,7 @@ jest-util@^23.4.0: slash "^1.0.0" source-map "^0.6.0" -jest-validate@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.4.0.tgz#d96eede01ef03ac909c009e9c8e455197d48c201" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^23.2.0" - -jest-validate@^23.5.0: +jest-validate@^23.5.0, jest-validate@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" dependencies: @@ -5095,12 +5094,12 @@ jest-worker@^23.2.0: dependencies: merge-stream "^1.0.1" -jest@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.4.1.tgz#39550c72f3237f63ae1b434d8d122cdf6fa007b6" +jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" dependencies: import-local "^1.0.0" - jest-cli "^23.4.1" + jest-cli "^23.6.0" js-levenshtein@^1.1.3: version "1.1.3" @@ -6709,13 +6708,6 @@ prettier@^1.14.3: version "1.14.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895" -pretty-format@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.2.0.tgz#3b0aaa63c018a53583373c1cb3a5d96cc5e83017" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" - pretty-format@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" From af694ebae1bc91e25e1664cdba10abbe3430551a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 25 Sep 2018 10:03:03 +0200 Subject: [PATCH 026/563] [decorators] Support async and generator methods (#8742) --- .../src/transformer.js | 9 +++-- .../async-generator-method/input.js | 8 +++++ .../async-generator-method/options.json | 8 +++++ .../async-generator-method/output.js | 33 +++++++++++++++++++ 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/input.js create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/options.json create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/output.js diff --git a/packages/babel-plugin-proposal-decorators/src/transformer.js b/packages/babel-plugin-proposal-decorators/src/transformer.js index 3ed8f71a3fe8..22a493183a1c 100644 --- a/packages/babel-plugin-proposal-decorators/src/transformer.js +++ b/packages/babel-plugin-proposal-decorators/src/transformer.js @@ -7,8 +7,11 @@ function prop(key, value) { return t.objectProperty(t.identifier(key), value); } -function value(body, params = []) { - return t.objectMethod("method", t.identifier("value"), params, body); +function value(body, params = [], async, generator) { + const method = t.objectMethod("method", t.identifier("value"), params, body); + method.async = !!async; + method.generator = !!generator; + return method; } function hasDecorators({ node }) { @@ -77,7 +80,7 @@ function getSingleElementDefinition(path, superRef, classRef, file) { prop("static", node.static && t.booleanLiteral(true)), prop("key", getKey(node)), isMethod - ? value(node.body, node.params) + ? value(node.body, node.params, node.async, node.generator) : node.value ? value(template.ast`{ return ${node.value} }`) : prop("value", scope.buildUndefinedNode()), diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/input.js b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/input.js new file mode 100644 index 000000000000..be2fdae25d4b --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/input.js @@ -0,0 +1,8 @@ +@decorator +class Foo { + async f1() {} + + *f2() {} + + async *f3() {} +} diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/options.json new file mode 100644 index 000000000000..c77f4109f467 --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/options.json @@ -0,0 +1,8 @@ +{ + "plugins": [ + ["proposal-decorators", { "decoratorsBeforeExport": false }], + "proposal-class-properties", + "syntax-async-generators", + ["external-helpers", { "helperVersion": "7.0.2" }] + ] +} diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/output.js new file mode 100644 index 000000000000..75ce76d3f1d7 --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/output.js @@ -0,0 +1,33 @@ +let Foo = babelHelpers.decorate([decorator], function (_initialize) { + "use strict"; + + class Foo { + constructor() { + _initialize(this); + } + + } + + return { + F: Foo, + d: [{ + kind: "method", + key: "f1", + + async value() {} + + }, { + kind: "method", + key: "f2", + + *value() {} + + }, { + kind: "method", + key: "f3", + + async *value() {} + + }] + }; +}); From 889cdb8da5d882cd2a83cca832f31cd4520400e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 25 Sep 2018 17:00:48 +0200 Subject: [PATCH 027/563] Use babel-check-duplicated-nodes (#8768) --- .../package.json | 1 + .../src/index.js | 50 ++----------------- 2 files changed, 4 insertions(+), 47 deletions(-) diff --git a/packages/babel-helper-transform-fixture-test-runner/package.json b/packages/babel-helper-transform-fixture-test-runner/package.json index 2a2ee591d06f..d0caaeebfb9d 100644 --- a/packages/babel-helper-transform-fixture-test-runner/package.json +++ b/packages/babel-helper-transform-fixture-test-runner/package.json @@ -15,6 +15,7 @@ "@babel/core": "^7.1.0", "@babel/helper-fixtures": "^7.0.0", "@babel/polyfill": "^7.0.0", + "babel-check-duplicated-nodes": "^1.0.0", "jest": "^22.4.2", "jest-diff": "^22.4.0", "lodash": "^4.17.10", diff --git a/packages/babel-helper-transform-fixture-test-runner/src/index.js b/packages/babel-helper-transform-fixture-test-runner/src/index.js index a16e19b1a68c..a83e8ff1c61b 100644 --- a/packages/babel-helper-transform-fixture-test-runner/src/index.js +++ b/packages/babel-helper-transform-fixture-test-runner/src/index.js @@ -15,6 +15,7 @@ import assert from "assert"; import fs from "fs"; import path from "path"; import vm from "vm"; +import checkDuplicatedNodes from "babel-check-duplicated-nodes"; import diff from "jest-diff"; @@ -129,51 +130,6 @@ function wrapPackagesArray(type, names, optionsDir) { }); } -function checkDuplicatedNodes(ast) { - const nodes = new WeakSet(); - const parents = new WeakMap(); - - const setParent = (child, parent) => { - if (typeof child === "object" && child !== null) { - let p = parents.get(child); - if (!p) { - p = []; - parents.set(child, p); - } - p.unshift(parent); - } - }; - const registerChildren = node => { - for (const key in node) { - if (Array.isArray(node[key])) { - node[key].forEach(child => setParent(child, node)); - } else { - setParent(node[key], node); - } - } - }; - - const hidePrivateProperties = (key, val) => { - // Hides properties like _shadowedFunctionLiteral, - // which makes the AST circular - if (key[0] === "_") return "[Private]"; - return val; - }; - - babel.types.traverseFast(ast, node => { - registerChildren(node); - if (nodes.has(node)) { - throw new Error( - "Do not reuse nodes. Use `t.cloneNode` to copy them.\n" + - JSON.stringify(node, hidePrivateProperties, 2) + - "\nParent:\n" + - JSON.stringify(parents.get(node), hidePrivateProperties, 2), - ); - } - nodes.add(node); - }); -} - function run(task) { const actual = task.actual; const expected = task.expect; @@ -222,7 +178,7 @@ function run(task) { if (execCode) { const execOpts = getOpts(exec); result = babel.transform(execCode, execOpts); - checkDuplicatedNodes(result.ast); + checkDuplicatedNodes(babel, result.ast); execCode = result.code; try { @@ -244,7 +200,7 @@ function run(task) { "", ); - checkDuplicatedNodes(result.ast); + checkDuplicatedNodes(babel, result.ast); if ( !expected.code && expectedCode && From f38be131137c0935366124ca34c4a9920fd036fa Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Wed, 26 Sep 2018 01:19:32 +0800 Subject: [PATCH 028/563] TypeScript: reserve `unknown` as TSUnknownKeyword (#8755) --- .../src/generators/typescript.js | 3 + .../typescript/types-keywords/input.js | 1 + .../typescript/types-keywords/output.js | 3 +- .../babel-parser/src/plugins/typescript.js | 2 + packages/babel-parser/src/types.js | 1 + .../typescript/types/keywords/input.js | 1 + .../typescript/types/keywords/output.json | 387 +++++++++++------- .../src/asserts/generated/index.js | 3 + .../src/builders/generated/index.js | 5 + .../babel-types/src/definitions/typescript.js | 1 + .../src/validators/generated/index.js | 15 + 11 files changed, 268 insertions(+), 154 deletions(-) diff --git a/packages/babel-generator/src/generators/typescript.js b/packages/babel-generator/src/generators/typescript.js index c2e5f9d42cd3..4ec6736077db 100644 --- a/packages/babel-generator/src/generators/typescript.js +++ b/packages/babel-generator/src/generators/typescript.js @@ -127,6 +127,9 @@ export function TSIndexSignature(node) { export function TSAnyKeyword() { this.word("any"); } +export function TSUnknownKeyword() { + this.word("unknown"); +} export function TSNumberKeyword() { this.word("number"); } diff --git a/packages/babel-generator/test/fixtures/typescript/types-keywords/input.js b/packages/babel-generator/test/fixtures/typescript/types-keywords/input.js index d2ddfb94bbc6..0fec8f608a1c 100644 --- a/packages/babel-generator/test/fixtures/typescript/types-keywords/input.js +++ b/packages/babel-generator/test/fixtures/typescript/types-keywords/input.js @@ -1,4 +1,5 @@ let a: any; +let un: unknown; let b: boolean; let ne: never; let nul: null; diff --git a/packages/babel-generator/test/fixtures/typescript/types-keywords/output.js b/packages/babel-generator/test/fixtures/typescript/types-keywords/output.js index 0c6820fbaf27..0fec8f608a1c 100644 --- a/packages/babel-generator/test/fixtures/typescript/types-keywords/output.js +++ b/packages/babel-generator/test/fixtures/typescript/types-keywords/output.js @@ -1,4 +1,5 @@ let a: any; +let un: unknown; let b: boolean; let ne: never; let nul: null; @@ -7,4 +8,4 @@ let o: object; let st: string; let sy: symbol; let u: undefined; -let v: void; \ No newline at end of file +let v: void; diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 514fb1e8fb28..ef3c075ccc94 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -57,6 +57,8 @@ function keywordTypeFromName( return "TSSymbolKeyword"; case "undefined": return "TSUndefinedKeyword"; + case "unknown": + return "TSUnknownKeyword"; default: return undefined; } diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 0e872275633a..4f44c9fffe8f 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -1119,6 +1119,7 @@ export type TsTypeBase = NodeBase; export type TsKeywordTypeType = | "TSAnyKeyword" + | "TSUnknownKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSBooleanKeyword" diff --git a/packages/babel-parser/test/fixtures/typescript/types/keywords/input.js b/packages/babel-parser/test/fixtures/typescript/types/keywords/input.js index d2ddfb94bbc6..0fec8f608a1c 100644 --- a/packages/babel-parser/test/fixtures/typescript/types/keywords/input.js +++ b/packages/babel-parser/test/fixtures/typescript/types/keywords/input.js @@ -1,4 +1,5 @@ let a: any; +let un: unknown; let b: boolean; let ne: never; let nul: null; diff --git a/packages/babel-parser/test/fixtures/typescript/types/keywords/output.json b/packages/babel-parser/test/fixtures/typescript/types/keywords/output.json index 3057fdf2b2a8..b223120ab536 100644 --- a/packages/babel-parser/test/fixtures/typescript/types/keywords/output.json +++ b/packages/babel-parser/test/fixtures/typescript/types/keywords/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 152, + "end": 169, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 10, + "line": 11, "column": 12 } }, "program": { "type": "Program", "start": 0, - "end": 152, + "end": 169, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 10, + "line": 11, "column": 12 } }, @@ -113,7 +113,7 @@ { "type": "VariableDeclaration", "start": 12, - "end": 27, + "end": 28, "loc": { "start": { "line": 2, @@ -121,14 +121,14 @@ }, "end": { "line": 2, - "column": 15 + "column": 16 } }, "declarations": [ { "type": "VariableDeclarator", "start": 16, - "end": 26, + "end": 27, "loc": { "start": { "line": 2, @@ -136,13 +136,13 @@ }, "end": { "line": 2, - "column": 14 + "column": 15 } }, "id": { "type": "Identifier", "start": 16, - "end": 26, + "end": 27, "loc": { "start": { "line": 2, @@ -150,37 +150,37 @@ }, "end": { "line": 2, - "column": 14 + "column": 15 }, - "identifierName": "b" + "identifierName": "un" }, - "name": "b", + "name": "un", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 17, - "end": 26, + "start": 18, + "end": 27, "loc": { "start": { "line": 2, - "column": 5 + "column": 6 }, "end": { "line": 2, - "column": 14 + "column": 15 } }, "typeAnnotation": { - "type": "TSBooleanKeyword", - "start": 19, - "end": 26, + "type": "TSUnknownKeyword", + "start": 20, + "end": 27, "loc": { "start": { "line": 2, - "column": 7 + "column": 8 }, "end": { "line": 2, - "column": 14 + "column": 15 } } } @@ -193,8 +193,8 @@ }, { "type": "VariableDeclaration", - "start": 28, - "end": 42, + "start": 29, + "end": 44, "loc": { "start": { "line": 3, @@ -202,14 +202,14 @@ }, "end": { "line": 3, - "column": 14 + "column": 15 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 32, - "end": 41, + "start": 33, + "end": 43, "loc": { "start": { "line": 3, @@ -217,13 +217,13 @@ }, "end": { "line": 3, - "column": 13 + "column": 14 } }, "id": { "type": "Identifier", - "start": 32, - "end": 41, + "start": 33, + "end": 43, "loc": { "start": { "line": 3, @@ -231,37 +231,37 @@ }, "end": { "line": 3, - "column": 13 + "column": 14 }, - "identifierName": "ne" + "identifierName": "b" }, - "name": "ne", + "name": "b", "typeAnnotation": { "type": "TSTypeAnnotation", "start": 34, - "end": 41, + "end": 43, "loc": { "start": { "line": 3, - "column": 6 + "column": 5 }, "end": { "line": 3, - "column": 13 + "column": 14 } }, "typeAnnotation": { - "type": "TSNeverKeyword", + "type": "TSBooleanKeyword", "start": 36, - "end": 41, + "end": 43, "loc": { "start": { "line": 3, - "column": 8 + "column": 7 }, "end": { "line": 3, - "column": 13 + "column": 14 } } } @@ -274,8 +274,8 @@ }, { "type": "VariableDeclaration", - "start": 43, - "end": 57, + "start": 45, + "end": 59, "loc": { "start": { "line": 4, @@ -289,8 +289,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 47, - "end": 56, + "start": 49, + "end": 58, "loc": { "start": { "line": 4, @@ -303,8 +303,8 @@ }, "id": { "type": "Identifier", - "start": 47, - "end": 56, + "start": 49, + "end": 58, "loc": { "start": { "line": 4, @@ -314,17 +314,17 @@ "line": 4, "column": 13 }, - "identifierName": "nul" + "identifierName": "ne" }, - "name": "nul", + "name": "ne", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 50, - "end": 56, + "start": 51, + "end": 58, "loc": { "start": { "line": 4, - "column": 7 + "column": 6 }, "end": { "line": 4, @@ -332,13 +332,13 @@ } }, "typeAnnotation": { - "type": "TSNullKeyword", - "start": 52, - "end": 56, + "type": "TSNeverKeyword", + "start": 53, + "end": 58, "loc": { "start": { "line": 4, - "column": 9 + "column": 8 }, "end": { "line": 4, @@ -355,7 +355,7 @@ }, { "type": "VariableDeclaration", - "start": 58, + "start": 60, "end": 74, "loc": { "start": { @@ -364,13 +364,13 @@ }, "end": { "line": 5, - "column": 16 + "column": 14 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 62, + "start": 64, "end": 73, "loc": { "start": { @@ -379,12 +379,12 @@ }, "end": { "line": 5, - "column": 15 + "column": 13 } }, "id": { "type": "Identifier", - "start": 62, + "start": 64, "end": 73, "loc": { "start": { @@ -393,14 +393,14 @@ }, "end": { "line": 5, - "column": 15 + "column": 13 }, - "identifierName": "num" + "identifierName": "nul" }, - "name": "num", + "name": "nul", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 65, + "start": 67, "end": 73, "loc": { "start": { @@ -409,12 +409,12 @@ }, "end": { "line": 5, - "column": 15 + "column": 13 } }, "typeAnnotation": { - "type": "TSNumberKeyword", - "start": 67, + "type": "TSNullKeyword", + "start": 69, "end": 73, "loc": { "start": { @@ -423,7 +423,7 @@ }, "end": { "line": 5, - "column": 15 + "column": 13 } } } @@ -437,7 +437,7 @@ { "type": "VariableDeclaration", "start": 75, - "end": 89, + "end": 91, "loc": { "start": { "line": 6, @@ -445,14 +445,14 @@ }, "end": { "line": 6, - "column": 14 + "column": 16 } }, "declarations": [ { "type": "VariableDeclarator", "start": 79, - "end": 88, + "end": 90, "loc": { "start": { "line": 6, @@ -460,13 +460,13 @@ }, "end": { "line": 6, - "column": 13 + "column": 15 } }, "id": { "type": "Identifier", "start": 79, - "end": 88, + "end": 90, "loc": { "start": { "line": 6, @@ -474,37 +474,37 @@ }, "end": { "line": 6, - "column": 13 + "column": 15 }, - "identifierName": "o" + "identifierName": "num" }, - "name": "o", + "name": "num", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 80, - "end": 88, + "start": 82, + "end": 90, "loc": { "start": { "line": 6, - "column": 5 + "column": 7 }, "end": { "line": 6, - "column": 13 + "column": 15 } }, "typeAnnotation": { - "type": "TSObjectKeyword", - "start": 82, - "end": 88, + "type": "TSNumberKeyword", + "start": 84, + "end": 90, "loc": { "start": { "line": 6, - "column": 7 + "column": 9 }, "end": { "line": 6, - "column": 13 + "column": 15 } } } @@ -517,8 +517,8 @@ }, { "type": "VariableDeclaration", - "start": 90, - "end": 105, + "start": 92, + "end": 106, "loc": { "start": { "line": 7, @@ -526,14 +526,14 @@ }, "end": { "line": 7, - "column": 15 + "column": 14 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 94, - "end": 104, + "start": 96, + "end": 105, "loc": { "start": { "line": 7, @@ -541,13 +541,13 @@ }, "end": { "line": 7, - "column": 14 + "column": 13 } }, "id": { "type": "Identifier", - "start": 94, - "end": 104, + "start": 96, + "end": 105, "loc": { "start": { "line": 7, @@ -555,37 +555,37 @@ }, "end": { "line": 7, - "column": 14 + "column": 13 }, - "identifierName": "st" + "identifierName": "o" }, - "name": "st", + "name": "o", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 96, - "end": 104, + "start": 97, + "end": 105, "loc": { "start": { "line": 7, - "column": 6 + "column": 5 }, "end": { "line": 7, - "column": 14 + "column": 13 } }, "typeAnnotation": { - "type": "TSStringKeyword", - "start": 98, - "end": 104, + "type": "TSObjectKeyword", + "start": 99, + "end": 105, "loc": { "start": { "line": 7, - "column": 8 + "column": 7 }, "end": { "line": 7, - "column": 14 + "column": 13 } } } @@ -598,8 +598,8 @@ }, { "type": "VariableDeclaration", - "start": 106, - "end": 121, + "start": 107, + "end": 122, "loc": { "start": { "line": 8, @@ -613,8 +613,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 110, - "end": 120, + "start": 111, + "end": 121, "loc": { "start": { "line": 8, @@ -627,8 +627,8 @@ }, "id": { "type": "Identifier", - "start": 110, - "end": 120, + "start": 111, + "end": 121, "loc": { "start": { "line": 8, @@ -638,13 +638,13 @@ "line": 8, "column": 14 }, - "identifierName": "sy" + "identifierName": "st" }, - "name": "sy", + "name": "st", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 112, - "end": 120, + "start": 113, + "end": 121, "loc": { "start": { "line": 8, @@ -656,9 +656,9 @@ } }, "typeAnnotation": { - "type": "TSSymbolKeyword", - "start": 114, - "end": 120, + "type": "TSStringKeyword", + "start": 115, + "end": 121, "loc": { "start": { "line": 8, @@ -679,8 +679,8 @@ }, { "type": "VariableDeclaration", - "start": 122, - "end": 139, + "start": 123, + "end": 138, "loc": { "start": { "line": 9, @@ -688,14 +688,14 @@ }, "end": { "line": 9, - "column": 17 + "column": 15 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 126, - "end": 138, + "start": 127, + "end": 137, "loc": { "start": { "line": 9, @@ -703,13 +703,13 @@ }, "end": { "line": 9, - "column": 16 + "column": 14 } }, "id": { "type": "Identifier", - "start": 126, - "end": 138, + "start": 127, + "end": 137, "loc": { "start": { "line": 9, @@ -717,37 +717,37 @@ }, "end": { "line": 9, - "column": 16 + "column": 14 }, - "identifierName": "u" + "identifierName": "sy" }, - "name": "u", + "name": "sy", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 127, - "end": 138, + "start": 129, + "end": 137, "loc": { "start": { "line": 9, - "column": 5 + "column": 6 }, "end": { "line": 9, - "column": 16 + "column": 14 } }, "typeAnnotation": { - "type": "TSUndefinedKeyword", - "start": 129, - "end": 138, + "type": "TSSymbolKeyword", + "start": 131, + "end": 137, "loc": { "start": { "line": 9, - "column": 7 + "column": 8 }, "end": { "line": 9, - "column": 16 + "column": 14 } } } @@ -760,8 +760,8 @@ }, { "type": "VariableDeclaration", - "start": 140, - "end": 152, + "start": 139, + "end": 156, "loc": { "start": { "line": 10, @@ -769,14 +769,14 @@ }, "end": { "line": 10, - "column": 12 + "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 144, - "end": 151, + "start": 143, + "end": 155, "loc": { "start": { "line": 10, @@ -784,13 +784,13 @@ }, "end": { "line": 10, - "column": 11 + "column": 16 } }, "id": { "type": "Identifier", - "start": 144, - "end": 151, + "start": 143, + "end": 155, "loc": { "start": { "line": 10, @@ -798,6 +798,87 @@ }, "end": { "line": 10, + "column": 16 + }, + "identifierName": "u" + }, + "name": "u", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 144, + "end": 155, + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 16 + } + }, + "typeAnnotation": { + "type": "TSUndefinedKeyword", + "start": 146, + "end": 155, + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + } + }, + "init": null + } + ], + "kind": "let" + }, + { + "type": "VariableDeclaration", + "start": 157, + "end": 169, + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 12 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 161, + "end": 168, + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 11 + } + }, + "id": { + "type": "Identifier", + "start": 161, + "end": 168, + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, "column": 11 }, "identifierName": "v" @@ -805,29 +886,29 @@ "name": "v", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 145, - "end": 151, + "start": 162, + "end": 168, "loc": { "start": { - "line": 10, + "line": 11, "column": 5 }, "end": { - "line": 10, + "line": 11, "column": 11 } }, "typeAnnotation": { "type": "TSVoidKeyword", - "start": 147, - "end": 151, + "start": 164, + "end": 168, "loc": { "start": { - "line": 10, + "line": 11, "column": 7 }, "end": { - "line": 10, + "line": 11, "column": 11 } } diff --git a/packages/babel-types/src/asserts/generated/index.js b/packages/babel-types/src/asserts/generated/index.js index 4fc988f4fd7d..e1b2ad33134b 100644 --- a/packages/babel-types/src/asserts/generated/index.js +++ b/packages/babel-types/src/asserts/generated/index.js @@ -762,6 +762,9 @@ export function assertTSIndexSignature(node: Object, opts?: Object = {}): void { export function assertTSAnyKeyword(node: Object, opts?: Object = {}): void { assert("TSAnyKeyword", node, opts); } +export function assertTSUnknownKeyword(node: Object, opts?: Object = {}): void { + assert("TSUnknownKeyword", node, opts); +} export function assertTSNumberKeyword(node: Object, opts?: Object = {}): void { assert("TSNumberKeyword", node, opts); } diff --git a/packages/babel-types/src/builders/generated/index.js b/packages/babel-types/src/builders/generated/index.js index eda7514c11fe..6d976f42cb95 100644 --- a/packages/babel-types/src/builders/generated/index.js +++ b/packages/babel-types/src/builders/generated/index.js @@ -698,6 +698,11 @@ export function TSAnyKeyword(...args: Array): Object { } export { TSAnyKeyword as tsAnyKeyword }; export { TSAnyKeyword as tSAnyKeyword }; +export function TSUnknownKeyword(...args: Array): Object { + return builder("TSUnknownKeyword", ...args); +} +export { TSUnknownKeyword as tsUnknownKeyword }; +export { TSUnknownKeyword as tSUnknownKeyword }; export function TSNumberKeyword(...args: Array): Object { return builder("TSNumberKeyword", ...args); } diff --git a/packages/babel-types/src/definitions/typescript.js b/packages/babel-types/src/definitions/typescript.js index 270146c5ca16..46bb444269ed 100644 --- a/packages/babel-types/src/definitions/typescript.js +++ b/packages/babel-types/src/definitions/typescript.js @@ -128,6 +128,7 @@ defineType("TSIndexSignature", { const tsKeywordTypes = [ "TSAnyKeyword", + "TSUnknownKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSBooleanKeyword", diff --git a/packages/babel-types/src/validators/generated/index.js b/packages/babel-types/src/validators/generated/index.js index 42de2ad2e8da..74e50870be23 100644 --- a/packages/babel-types/src/validators/generated/index.js +++ b/packages/babel-types/src/validators/generated/index.js @@ -2406,6 +2406,20 @@ export function isTSAnyKeyword(node: Object, opts?: Object): boolean { return false; } +export function isTSUnknownKeyword(node: Object, opts?: Object): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "TSUnknownKeyword") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} export function isTSNumberKeyword(node: Object, opts?: Object): boolean { if (!node) return false; @@ -4116,6 +4130,7 @@ export function isTSType(node: Object, opts?: Object): boolean { if ( nodeType === "TSType" || "TSAnyKeyword" === nodeType || + "TSUnknownKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSBooleanKeyword" === nodeType || From 090c364a90fe73d36a30707fc612ce037bdbbb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sampo=20Kivist=C3=B6?= Date: Wed, 26 Sep 2018 23:16:40 +0300 Subject: [PATCH 029/563] Improved build performance by optimizing makeMappingKey method. (#8744) --- packages/babel-core/src/transformation/file/merge-map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-core/src/transformation/file/merge-map.js b/packages/babel-core/src/transformation/file/merge-map.js index 991373862e1e..ff2e65b042b8 100644 --- a/packages/babel-core/src/transformation/file/merge-map.js +++ b/packages/babel-core/src/transformation/file/merge-map.js @@ -94,7 +94,7 @@ export default function mergeSourceMap( } function makeMappingKey(item: { line: number, columnStart: number }) { - return JSON.stringify([item.line, item.columnStart]); + return `${item.line}/${item.columnStart}`; } function eachOverlappingGeneratedOutputRange( From 55faa27b9375eb6c9b50750d350f8e0ced7e897c Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Thu, 27 Sep 2018 14:48:58 -0500 Subject: [PATCH 030/563] Run test262 tests for exportNamespaceFrom (#8780) --- Makefile | 2 +- .../test262/run_babel_parser_test262_utils.js | 7 ++++--- scripts/tests/test262/test262_whitelist.txt | 16 ---------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 0e50484068f1..325866dea3cf 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ MAKEFLAGS = -j1 FLOW_COMMIT = bea8b83f50f597454941d2a7ecef6e93a881e576 -TEST262_COMMIT = f90a52b39609a620c0854e0bd0b3a906c930fd17 +TEST262_COMMIT = 06c2f019019cf7850923de4d56828e6dfd9212b8 # Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967 export FORCE_COLOR = true diff --git a/scripts/tests/test262/run_babel_parser_test262_utils.js b/scripts/tests/test262/run_babel_parser_test262_utils.js index 705147210672..99f714287a83 100644 --- a/scripts/tests/test262/run_babel_parser_test262_utils.js +++ b/scripts/tests/test262/run_babel_parser_test262_utils.js @@ -13,14 +13,15 @@ const pfs = { const parse = require("../../../packages/babel-parser").parse; const featuresToPlugins = { + "async-iteration": "asyncGenerators", BigInt: "bigInt", - "class-fields-public": "classProperties", "class-fields-private": "classPrivateProperties", - "async-iteration": "asyncGenerators", + "class-fields-public": "classProperties", + "export-star-as-namespace-from-module": "exportNamespaceFrom", + "numeric-separator-literal": "numericSeparator", "object-rest": "objectRestSpread", "object-spread": "objectRestSpread", "optional-catch-binding": "optionalCatchBinding", - "numeric-separator-literal": "numericSeparator", }; function getPlugins(features) { diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index ec84454aec05..47db998bb2d8 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -696,14 +696,6 @@ language/module-code/privatename-not-valid-earlyerr-module-4.js(default) language/module-code/privatename-not-valid-earlyerr-module-4.js(strict mode) language/expressions/class/fields-duplicate-privatenames.js(default) language/expressions/class/fields-duplicate-privatenames.js(strict mode) -language/expressions/class/fields-initializer-static-private-fields-forbidden.js(default) -language/expressions/class/fields-initializer-static-private-fields-forbidden.js(strict mode) -language/expressions/class/fields-initializer-static-public-fields-forbidden.js(default) -language/expressions/class/fields-initializer-static-public-fields-forbidden.js(strict mode) -language/expressions/class/fields-literal-name-static-private-fields-forbidden.js(default) -language/expressions/class/fields-literal-name-static-private-fields-forbidden.js(strict mode) -language/expressions/class/fields-literal-name-static-public-fields-forbidden.js(default) -language/expressions/class/fields-literal-name-static-public-fields-forbidden.js(strict mode) language/expressions/template-literal/unicode-escape-nls-err.js(default) language/expressions/template-literal/unicode-escape-nls-err.js(strict mode) language/literals/numeric/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js(default) @@ -713,14 +705,6 @@ language/literals/string/unicode-escape-nls-err-single.js(default) language/literals/string/unicode-escape-nls-err-single.js(strict mode) language/statements/class/fields-duplicate-privatenames.js(default) language/statements/class/fields-duplicate-privatenames.js(strict mode) -language/statements/class/fields-initializer-static-private-fields-forbidden.js(default) -language/statements/class/fields-initializer-static-private-fields-forbidden.js(strict mode) -language/statements/class/fields-initializer-static-public-fields-forbidden.js(default) -language/statements/class/fields-initializer-static-public-fields-forbidden.js(strict mode) -language/statements/class/fields-literal-name-static-private-fields-forbidden.js(default) -language/statements/class/fields-literal-name-static-private-fields-forbidden.js(strict mode) -language/statements/class/fields-literal-name-static-public-fields-forbidden.js(default) -language/statements/class/fields-literal-name-static-public-fields-forbidden.js(strict mode) language/statements/class/privatename-not-valid-earlyerr-script-1.js(default) language/statements/class/privatename-not-valid-earlyerr-script-1.js(strict mode) language/statements/class/privatename-not-valid-earlyerr-script-2.js(default) From 626f47982e64c9642c52df54855c9cf1d5e362a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 28 Sep 2018 17:45:42 +0200 Subject: [PATCH 031/563] Do not unpack array patterns that update a referenced binding (#8535) Fixes #8528 --- .../src/index.js | 32 ++++++++++++++----- .../test/fixtures/regression/8528/input.js | 4 +++ .../fixtures/regression/8528/options.json | 3 ++ .../test/fixtures/regression/8528/output.js | 9 ++++++ 4 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/input.js create mode 100644 packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/options.json create mode 100644 packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/output.js diff --git a/packages/babel-plugin-transform-destructuring/src/index.js b/packages/babel-plugin-transform-destructuring/src/index.js index b706ed5bea64..a38cfb6b3889 100644 --- a/packages/babel-plugin-transform-destructuring/src/index.js +++ b/packages/babel-plugin-transform-destructuring/src/index.js @@ -44,13 +44,23 @@ export default declare((api, options) => { return false; } - const arrayUnpackVisitor = { - ReferencedIdentifier(path, state) { - if (state.bindings[path.node.name]) { - state.deopt = true; - path.stop(); - } - }, + const STOP_TRAVERSAL = {}; + + // NOTE: This visitor is meant to be used via t.traverse + const arrayUnpackVisitor = (node, ancestors, state) => { + if (!ancestors.length) { + // Top-level node: this is the array literal. + return; + } + + if ( + t.isIdentifier(node) && + t.isReferenced(node, ancestors[ancestors.length - 1]) && + state.bindings[node.name] + ) { + state.deopt = true; + throw STOP_TRAVERSAL; + } }; class DestructuringTransformer { @@ -282,7 +292,13 @@ export default declare((api, options) => { // deopt on reference to left side identifiers const bindings = t.getBindingIdentifiers(pattern); const state = { deopt: false, bindings }; - this.scope.traverse(arr, arrayUnpackVisitor, state); + + try { + t.traverse(arr, arrayUnpackVisitor, state); + } catch (e) { + if (e !== STOP_TRAVERSAL) throw e; + } + return !state.deopt; } diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/input.js b/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/input.js new file mode 100644 index 000000000000..9c6f1a18396d --- /dev/null +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/input.js @@ -0,0 +1,4 @@ +function isBetween(x, a, b) { + if (a > b) [a, b] = [b, a]; + return x > a && x < b; +} diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/options.json b/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/options.json new file mode 100644 index 000000000000..84e28c07f51e --- /dev/null +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-destructuring"] +} diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/output.js b/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/output.js new file mode 100644 index 000000000000..9546a2734c73 --- /dev/null +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/regression/8528/output.js @@ -0,0 +1,9 @@ +function isBetween(x, a, b) { + if (a > b) { + var _ref = [b, a]; + a = _ref[0]; + b = _ref[1]; + } + + return x > a && x < b; +} From ead23d7112a4577dcb87e18fe1bccd86e3a51d00 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Fri, 28 Sep 2018 16:02:43 -0400 Subject: [PATCH 032/563] v7.1.1 --- lerna.json | 2 +- packages/babel-cli/package.json | 2 +- packages/babel-core/package.json | 12 ++++++------ packages/babel-generator/package.json | 4 ++-- .../package.json | 4 ++-- packages/babel-helpers/package.json | 6 +++--- packages/babel-parser/package.json | 2 +- .../babel-plugin-proposal-decorators/package.json | 2 +- .../package.json | 2 +- packages/babel-runtime-corejs2/package.json | 2 +- packages/babel-runtime/package.json | 2 +- packages/babel-template/package.json | 6 +++--- packages/babel-types/package.json | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lerna.json b/lerna.json index 0a083def2273..8123b1119d96 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.11.0", - "version": "7.1.0", + "version": "7.1.1", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-cli/package.json b/packages/babel-cli/package.json index e5446c644c0e..f593425045d1 100644 --- a/packages/babel-cli/package.json +++ b/packages/babel-cli/package.json @@ -1,6 +1,6 @@ { "name": "@babel/cli", - "version": "7.1.0", + "version": "7.1.1", "description": "Babel command line.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index e6fbbdc26ef8..9277578b80cb 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -1,6 +1,6 @@ { "name": "@babel/core", - "version": "7.1.0", + "version": "7.1.1", "description": "Babel compiler core.", "main": "lib/index.js", "author": "Sebastian McKenzie ", @@ -34,12 +34,12 @@ }, "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.0.0", - "@babel/helpers": "^7.1.0", - "@babel/parser": "^7.1.0", - "@babel/template": "^7.1.0", + "@babel/generator": "^7.1.1", + "@babel/helpers": "^7.1.1", + "@babel/parser": "^7.1.1", + "@babel/template": "^7.1.1", "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/types": "^7.1.1", "convert-source-map": "^1.1.0", "debug": "^3.1.0", "json5": "^0.5.0", diff --git a/packages/babel-generator/package.json b/packages/babel-generator/package.json index 42155d2bd44c..7eb3bfcd061f 100644 --- a/packages/babel-generator/package.json +++ b/packages/babel-generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/generator", - "version": "7.0.0", + "version": "7.1.1", "description": "Turns an AST into code.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "lib" ], "dependencies": { - "@babel/types": "^7.0.0", + "@babel/types": "^7.1.1", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", diff --git a/packages/babel-helper-transform-fixture-test-runner/package.json b/packages/babel-helper-transform-fixture-test-runner/package.json index d0caaeebfb9d..18e1464010b8 100644 --- a/packages/babel-helper-transform-fixture-test-runner/package.json +++ b/packages/babel-helper-transform-fixture-test-runner/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-transform-fixture-test-runner", - "version": "7.1.0", + "version": "7.1.1", "description": "Transform test runner for @babel/helper-fixtures module", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,7 +12,7 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/core": "^7.1.0", + "@babel/core": "^7.1.1", "@babel/helper-fixtures": "^7.0.0", "@babel/polyfill": "^7.0.0", "babel-check-duplicated-nodes": "^1.0.0", diff --git a/packages/babel-helpers/package.json b/packages/babel-helpers/package.json index 172471ed321b..515bd0a2a3f5 100644 --- a/packages/babel-helpers/package.json +++ b/packages/babel-helpers/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helpers", - "version": "7.1.0", + "version": "7.1.1", "description": "Collection of helper functions used by Babel transforms.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -11,9 +11,9 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helpers", "main": "lib/index.js", "dependencies": { - "@babel/template": "^7.1.0", + "@babel/template": "^7.1.1", "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/types": "^7.1.1" }, "devDependencies": { "@babel/helper-plugin-test-runner": "^7.0.0" diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index 2f0652c1f24e..004b3ab71f09 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/parser", - "version": "7.1.0", + "version": "7.1.1", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-plugin-proposal-decorators/package.json b/packages/babel-plugin-proposal-decorators/package.json index 6ab1831a08cf..32870918e37d 100644 --- a/packages/babel-plugin-proposal-decorators/package.json +++ b/packages/babel-plugin-proposal-decorators/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-decorators", - "version": "7.1.0", + "version": "7.1.1", "author": "Logan Smyth ", "license": "MIT", "publishConfig": { diff --git a/packages/babel-plugin-transform-destructuring/package.json b/packages/babel-plugin-transform-destructuring/package.json index 1fa6dc739f72..4ea7ea879bd0 100644 --- a/packages/babel-plugin-transform-destructuring/package.json +++ b/packages/babel-plugin-transform-destructuring/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-destructuring", - "version": "7.0.0", + "version": "7.1.1", "description": "Compile ES2015 destructuring to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-destructuring", "license": "MIT", diff --git a/packages/babel-runtime-corejs2/package.json b/packages/babel-runtime-corejs2/package.json index 79c8509afa2e..938062aa7faa 100644 --- a/packages/babel-runtime-corejs2/package.json +++ b/packages/babel-runtime-corejs2/package.json @@ -1,6 +1,6 @@ { "name": "@babel/runtime-corejs2", - "version": "7.0.0", + "version": "7.1.1", "description": "babel's modular runtime helpers with core-js@2 polyfilling", "license": "MIT", "publishConfig": { diff --git a/packages/babel-runtime/package.json b/packages/babel-runtime/package.json index 4886520d18e7..bb7c11d8a6a6 100644 --- a/packages/babel-runtime/package.json +++ b/packages/babel-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@babel/runtime", - "version": "7.0.0", + "version": "7.1.1", "description": "babel's modular runtime helpers", "license": "MIT", "publishConfig": { diff --git a/packages/babel-template/package.json b/packages/babel-template/package.json index 365a922cda31..b388596e2722 100644 --- a/packages/babel-template/package.json +++ b/packages/babel-template/package.json @@ -1,6 +1,6 @@ { "name": "@babel/template", - "version": "7.1.0", + "version": "7.1.1", "description": "Generate an AST from a string template.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,7 +12,7 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/parser": "^7.1.1", + "@babel/types": "^7.1.1" } } diff --git a/packages/babel-types/package.json b/packages/babel-types/package.json index dd13bee13bb3..a9a09d8e614e 100644 --- a/packages/babel-types/package.json +++ b/packages/babel-types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/types", - "version": "7.0.0", + "version": "7.1.1", "description": "Babel Types is a Lodash-esque utility library for AST nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", From 3f5b7554b83a60216f736c4e2600ae33a294349b Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Fri, 28 Sep 2018 18:19:38 -0400 Subject: [PATCH 033/563] v7.1.2 --- lerna.json | 2 +- packages/babel-cli/package.json | 2 +- packages/babel-core/package.json | 12 ++++++------ packages/babel-generator/package.json | 4 ++-- .../package.json | 4 ++-- packages/babel-helpers/package.json | 6 +++--- packages/babel-parser/package.json | 2 +- .../babel-plugin-proposal-decorators/package.json | 2 +- .../package.json | 2 +- packages/babel-runtime-corejs2/package.json | 2 +- packages/babel-runtime/package.json | 2 +- packages/babel-template/package.json | 6 +++--- packages/babel-types/package.json | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lerna.json b/lerna.json index 8123b1119d96..24ab7e858105 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.11.0", - "version": "7.1.1", + "version": "7.1.2", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-cli/package.json b/packages/babel-cli/package.json index f593425045d1..b520ad82f923 100644 --- a/packages/babel-cli/package.json +++ b/packages/babel-cli/package.json @@ -1,6 +1,6 @@ { "name": "@babel/cli", - "version": "7.1.1", + "version": "7.1.2", "description": "Babel command line.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index 9277578b80cb..cd963851d30a 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -1,6 +1,6 @@ { "name": "@babel/core", - "version": "7.1.1", + "version": "7.1.2", "description": "Babel compiler core.", "main": "lib/index.js", "author": "Sebastian McKenzie ", @@ -34,12 +34,12 @@ }, "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.1", - "@babel/helpers": "^7.1.1", - "@babel/parser": "^7.1.1", - "@babel/template": "^7.1.1", + "@babel/generator": "^7.1.2", + "@babel/helpers": "^7.1.2", + "@babel/parser": "^7.1.2", + "@babel/template": "^7.1.2", "@babel/traverse": "^7.1.0", - "@babel/types": "^7.1.1", + "@babel/types": "^7.1.2", "convert-source-map": "^1.1.0", "debug": "^3.1.0", "json5": "^0.5.0", diff --git a/packages/babel-generator/package.json b/packages/babel-generator/package.json index 7eb3bfcd061f..bc9a747cc9a9 100644 --- a/packages/babel-generator/package.json +++ b/packages/babel-generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/generator", - "version": "7.1.1", + "version": "7.1.2", "description": "Turns an AST into code.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "lib" ], "dependencies": { - "@babel/types": "^7.1.1", + "@babel/types": "^7.1.2", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", diff --git a/packages/babel-helper-transform-fixture-test-runner/package.json b/packages/babel-helper-transform-fixture-test-runner/package.json index 18e1464010b8..2379b8202055 100644 --- a/packages/babel-helper-transform-fixture-test-runner/package.json +++ b/packages/babel-helper-transform-fixture-test-runner/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-transform-fixture-test-runner", - "version": "7.1.1", + "version": "7.1.2", "description": "Transform test runner for @babel/helper-fixtures module", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,7 +12,7 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/core": "^7.1.1", + "@babel/core": "^7.1.2", "@babel/helper-fixtures": "^7.0.0", "@babel/polyfill": "^7.0.0", "babel-check-duplicated-nodes": "^1.0.0", diff --git a/packages/babel-helpers/package.json b/packages/babel-helpers/package.json index 515bd0a2a3f5..01035a1af661 100644 --- a/packages/babel-helpers/package.json +++ b/packages/babel-helpers/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helpers", - "version": "7.1.1", + "version": "7.1.2", "description": "Collection of helper functions used by Babel transforms.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -11,9 +11,9 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helpers", "main": "lib/index.js", "dependencies": { - "@babel/template": "^7.1.1", + "@babel/template": "^7.1.2", "@babel/traverse": "^7.1.0", - "@babel/types": "^7.1.1" + "@babel/types": "^7.1.2" }, "devDependencies": { "@babel/helper-plugin-test-runner": "^7.0.0" diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index 004b3ab71f09..abfa155c110c 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/parser", - "version": "7.1.1", + "version": "7.1.2", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-plugin-proposal-decorators/package.json b/packages/babel-plugin-proposal-decorators/package.json index 32870918e37d..acd14f3473bf 100644 --- a/packages/babel-plugin-proposal-decorators/package.json +++ b/packages/babel-plugin-proposal-decorators/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-decorators", - "version": "7.1.1", + "version": "7.1.2", "author": "Logan Smyth ", "license": "MIT", "publishConfig": { diff --git a/packages/babel-plugin-transform-destructuring/package.json b/packages/babel-plugin-transform-destructuring/package.json index 4ea7ea879bd0..65ff1c86c62e 100644 --- a/packages/babel-plugin-transform-destructuring/package.json +++ b/packages/babel-plugin-transform-destructuring/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-destructuring", - "version": "7.1.1", + "version": "7.1.2", "description": "Compile ES2015 destructuring to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-destructuring", "license": "MIT", diff --git a/packages/babel-runtime-corejs2/package.json b/packages/babel-runtime-corejs2/package.json index 938062aa7faa..27ba84949185 100644 --- a/packages/babel-runtime-corejs2/package.json +++ b/packages/babel-runtime-corejs2/package.json @@ -1,6 +1,6 @@ { "name": "@babel/runtime-corejs2", - "version": "7.1.1", + "version": "7.1.2", "description": "babel's modular runtime helpers with core-js@2 polyfilling", "license": "MIT", "publishConfig": { diff --git a/packages/babel-runtime/package.json b/packages/babel-runtime/package.json index bb7c11d8a6a6..420077aff454 100644 --- a/packages/babel-runtime/package.json +++ b/packages/babel-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@babel/runtime", - "version": "7.1.1", + "version": "7.1.2", "description": "babel's modular runtime helpers", "license": "MIT", "publishConfig": { diff --git a/packages/babel-template/package.json b/packages/babel-template/package.json index b388596e2722..bb9f93be7677 100644 --- a/packages/babel-template/package.json +++ b/packages/babel-template/package.json @@ -1,6 +1,6 @@ { "name": "@babel/template", - "version": "7.1.1", + "version": "7.1.2", "description": "Generate an AST from a string template.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,7 +12,7 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.1.1", - "@babel/types": "^7.1.1" + "@babel/parser": "^7.1.2", + "@babel/types": "^7.1.2" } } diff --git a/packages/babel-types/package.json b/packages/babel-types/package.json index a9a09d8e614e..963dcd70b6c1 100644 --- a/packages/babel-types/package.json +++ b/packages/babel-types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/types", - "version": "7.1.1", + "version": "7.1.2", "description": "Babel Types is a Lodash-esque utility library for AST nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", From ca89212b450c6d7833cfb987d8c77353d32f5e6a Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Fri, 28 Sep 2018 18:28:43 -0400 Subject: [PATCH 034/563] add changelog up to 7.1.2 [skip ci] --- CHANGELOG.md | 281 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e7eadb7c7d4..35a6624ce7ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,287 @@ See [CHANGELOG - v4](/.github/CHANGELOG-v4.md), [CHANGELOG - v5](/.github/CHANGE See [CHANGELOG - 6to5](/.github/CHANGELOG-6to5.md) for the pre-4.0.0 version changelog. See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0.0-beta.29 version changelog. +## 7.1.2 (2018-09-28) + +Same as v7.1.1, except compiled against Node 6 instead of Node 8 by accident (e.g had `async functions`). + +## v7.1.1 (2018-09-28) + +> EDIT: had a publish issue here as well where it compiled against Node 8 instead of Node 6 so 7.1.2 will fix this. +> Also force publish `@babel/runtime` and `@babel/runtime-corejs2`. We need to fix the publishing around that since Lerna doesn't pickup the `@babel/helpers` changes as there is no "dependency" + +#### :bug: Bug Fix +* `babel-generator`, `babel-parser`, `babel-types` + * [#8755](https://github.com/babel/babel/pull/8755) TypeScript: reserve `unknown` as TSUnknownKeyword. ([@g-plane](https://github.com/g-plane)) +* `babel-plugin-transform-destructuring` + * [#8535](https://github.com/babel/babel/pull/8535) Do not unpack array patterns that update a referenced binding. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-decorators` + * [#8742](https://github.com/babel/babel/pull/8742) [decorators] Support async and generator methods. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#8761](https://github.com/babel/babel/pull/8761) [decorators] Fields are enumerable. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator` + * [#8751](https://github.com/babel/babel/pull/8751) Fix some missing parens cases with OptionalMemberExpression in generator. ([@existentialism](https://github.com/existentialism)) + * [#8727](https://github.com/babel/babel/pull/8727) Handle throw expressions in generator. ([@existentialism](https://github.com/existentialism)) + +#### :house: Internal +* Other + * [#8780](https://github.com/babel/babel/pull/8780) Run test262 tests for exportNamespaceFrom. ([@existentialism](https://github.com/existentialism)) +* `babel-helper-transform-fixture-test-runner` + * [#8768](https://github.com/babel/babel/pull/8768) Use babel-check-duplicated-nodes. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.1.0 (2018-09-17) + +Check http://babeljs.io/blog/2018/09/17/7.1.0 + +#### :rocket: New Feature +* `babel-cli`, `babel-core` + * [#8660](https://github.com/babel/babel/pull/8660) Better support monorepos by allowing users to opt into automatically resolving 'root' with `rootMode: "upward"`.. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-helper-transform-fixture-test-runner` + * [#7582](https://github.com/babel/babel/pull/7582) Allow regular plugins/presets resolution algorithm for packages outsi…. ([@Andarist](https://github.com/Andarist)) +* `babel-helpers`, `babel-plugin-proposal-decorators`, `babel-plugin-syntax-decorators` + * [#7976](https://github.com/babel/babel/pull/7976) Add support for the new decorators proposal. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-helpers`, `babel-plugin-proposal-class-properties` + * [#8205](https://github.com/babel/babel/pull/8205) Private Static Fields Features: Stage 3. ([@rricard](https://github.com/rricard)) + +#### :bug: Bug Fix +* `babel-parser` + * [#8698](https://github.com/babel/babel/pull/8698) Fix parsing of newline between 'async' and 'function'. ([@existentialism](https://github.com/existentialism)) + * [#8677](https://github.com/babel/babel/pull/8677) Fix typescript parsing typed object shorthand methods. ([@existentialism](https://github.com/existentialism)) +* `babel-plugin-transform-typescript` + * [#8682](https://github.com/babel/babel/pull/8682) Fix TSParameterProperty getting lost with transform-classes. ([@existentialism](https://github.com/existentialism)) + * [#8695](https://github.com/babel/babel/pull/8695) Adjust TSParameterProperty handling to work with transform-parameters. ([@existentialism](https://github.com/existentialism)) + * [#8666](https://github.com/babel/babel/pull/8666) Fix typescript import elision. ([@Retsam](https://github.com/Retsam)) +* `babel-preset-env` + * [#8693](https://github.com/babel/babel/pull/8693) Fix es6.string.iterator mapping in babel-preset-env. ([@existentialism](https://github.com/existentialism)) +* `babel-core`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-decorators`, `babel-plugin-transform-runtime` + * [#8659](https://github.com/babel/babel/pull/8659) Fix version checks in .availableHelper and transform-runtime definitions.. ([@loganfsmyth](https://github.com/loganfsmyth)) +* Other + * [#8627](https://github.com/babel/babel/pull/8627) ts generator: allow reserved keywords in interfaces. ([@43081j](https://github.com/43081j)) +* `babel-plugin-transform-parameters` + * [#8414](https://github.com/babel/babel/pull/8414) Allow patterns as argument of RestElement. ([@microbouji](https://github.com/microbouji)) +* `babel-core`, `babel-plugin-transform-runtime` + * [#8624](https://github.com/babel/babel/pull/8624) Verify 'sourceMap' option with hasOwnProperty, and verify string-typed 'version'. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-helpers`, `babel-plugin-proposal-class-properties` + * [#8614](https://github.com/babel/babel/pull/8614) [static private] Unify loose handling of static and instance props. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :nail_care: Polish +* `babel-plugin-transform-runtime` + * [#8581](https://github.com/babel/babel/pull/8581) Fix grammar in error message at @babel/plugin-transform-runtime. ([@tricknotes](https://github.com/tricknotes)) +* `babel-parser` + * [#8576](https://github.com/babel/babel/pull/8576) More helpful errorr message for missing decoratorsBeforeExport in parser. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :memo: Documentation +* [#8561](https://github.com/babel/babel/pull/8561) Added pronounciation of babel. ([@siddhant1](https://github.com/siddhant1)) + +#### :house: Internal +* `babel-core` + * [#8714](https://github.com/babel/babel/pull/8714) Fix Flow error with new versionRange test.. ([@loganfsmyth](https://github.com/loganfsmyth)) +* Other + * [#8679](https://github.com/babel/babel/pull/8679) remove force publish, temp tag [skip ci]. ([@hzoo](https://github.com/hzoo)) +* `babel-plugin-transform-runtime` + * [#8661](https://github.com/babel/babel/pull/8661) Makefile: run fix json on fix. ([@xtuc](https://github.com/xtuc)) +* `babel-*` + * [#8658](https://github.com/babel/babel/pull/8658) Format fixture options.json with Prettier.. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-parser` + * [#8630](https://github.com/babel/babel/pull/8630) Bump flow to 0.80 and fix sourceType error. ([@existentialism](https://github.com/existentialism)) + * [#8610](https://github.com/babel/babel/pull/8610) types: missing `unambiguous` sourceType. ([@xtuc](https://github.com/xtuc)) + * [#8170](https://github.com/babel/babel/pull/8170) @babel/parser: expose a TypeScript definition file from package. ([@AviVahl](https://github.com/AviVahl)) +* `babel-*` + * [#8573](https://github.com/babel/babel/pull/8573) add access public to all packages [skip ci]. ([@hzoo](https://github.com/hzoo)) + +## v7.0.1 (2018-09-11) + +Doing a quick patch regarding helpers versioning to prevent future issues: https://github.com/babel/babel/pull/8659 + +## v7.0.0 (2018-08-27) + +No change from rc.4. Finally released as https://babeljs.io/blog/2018/08/27/7.0.0! + +## v7.0.0-rc.4 (2018-08-27) + +> Similar to removing proposals in `@babel/polyfill`, we are removing them in `transform-runtime` + +#### :boom: Breaking Change +* `babel-plugin-transform-runtime` + * [#8547](https://github.com/babel/babel/pull/8547) Remove nonstandard functions and fake prototype methods from babel-runtime. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-parser` + * [#8539](https://github.com/babel/babel/pull/8539) Update parser whitespace for clarity. ([@jridgewell](https://github.com/jridgewell)) + +#### :bug: Bug Fix +* `babel-register` + * [#8553](https://github.com/babel/babel/pull/8553) bump source-map-support. ([@hzoo](https://github.com/hzoo)) +* `babel-core` + * [#8546](https://github.com/babel/babel/pull/8546) Default highlightCode:true for the parser highlighting.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :house: Internal +* Other + * [#8554](https://github.com/babel/babel/pull/8554) Lerna: remove exact [skip ci]. ([@hzoo](https://github.com/hzoo)) +* `babel-parser` + * [#8540](https://github.com/babel/babel/pull/8540) Cleanup getLineInfo. ([@jridgewell](https://github.com/jridgewell)) + * [#8541](https://github.com/babel/babel/pull/8541) Update to ES6 String methods. ([@jridgewell](https://github.com/jridgewell)) + * [#8537](https://github.com/babel/babel/pull/8537) Flatten TokenType class hierarchy. ([@jridgewell](https://github.com/jridgewell)) + * [#8539](https://github.com/babel/babel/pull/8539) Update parser whitespace for clarity. ([@jridgewell](https://github.com/jridgewell)) + +## v7.0.0-rc.3 (2018-08-24) + +#### :boom: Breaking Change +* `babel-preset-env` + * [#8509](https://github.com/babel/babel/pull/8509) Add browserslist 4 support.. ([@yavorsky](https://github.com/yavorsky)) +* `babel-plugin-transform-runtime` + * [#8518](https://github.com/babel/babel/pull/8518) Make 'useESModules' only toggle CJS vs ESM helpers when importing file is ESM.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :rocket: New Feature +* `babel-plugin-transform-runtime` + * [#8520](https://github.com/babel/babel/pull/8520) Expose opt-in useESModules:"auto" from transform-runtime to toggle based on 'supportsStaticESM'. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :bug: Bug Fix +* `babel-helpers`, `babel-plugin-transform-classes`, `babel-preset-env` + * [#8501](https://github.com/babel/babel/pull/8501) [_wrapNativeSuper] Don't wrap non-native constructors. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-generator`, `babel-traverse`, `babel-types` + * [#8478](https://github.com/babel/babel/pull/8478) Fix path.scope.rename() to not change break clauses. ([@rafeca](https://github.com/rafeca)) +* `babel-plugin-proposal-object-rest-spread` + * [#8514](https://github.com/babel/babel/pull/8514) fix: object rest with default values bug. ([@jquense](https://github.com/jquense)) +* `babel-traverse` + * [#8505](https://github.com/babel/babel/pull/8505) Rename exported functions where name conflicts with param.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :house: Internal +* `babel-plugin-transform-object-set-prototype-of-to-assign` + * [#8409](https://github.com/babel/babel/pull/8409) Add LICENSE file to published npm packages [skip ci]. ([@opichals](https://github.com/opichals)) +* Other + * [#8504](https://github.com/babel/babel/pull/8504) Update Babel to rc.2. ([@hzoo](https://github.com/hzoo)) + +## v7.0.0-rc.2 (2018-08-21) + +A notable change is the addition of https://github.com/babel/babel/pull/8485 which enables https://github.com/babel/babel-loader/pull/660 (automatically doing `modules: false` for `@babel/preset-env` when using `babel-loader`. + +#### :boom: Breaking Change +* `babel-core` + * [#8470](https://github.com/babel/babel/pull/8470) Remove File#resolveModuleSource. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#8473](https://github.com/babel/babel/pull/8473) Allow babel-plugin/preset prefix to not be a prefix, when used in a scope.. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-core`, `babel-parser`, `babel-plugin-syntax-decorators` + * [#8465](https://github.com/babel/babel/pull/8465) Require decoratorsBeforeExport option for decorators. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :rocket: New Feature +* `babel-preset-env` + * [#8500](https://github.com/babel/babel/pull/8500) Add missing es7.promise.finally polyfill when using useBuiltIns: usage. ([@jsnajdr](https://github.com/jsnajdr)) +* `babel-cli`, `babel-core`, `babel-node`, `babel-preset-env`, `babel-register` + * [#8485](https://github.com/babel/babel/pull/8485) Allow preset-env to toggle module handling based on flags from the caller (like babel-loader). ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-core` + * [#8474](https://github.com/babel/babel/pull/8474) Preserve 'false'-options for disabled plugins/presets.. ([@loganfsmyth](https://github.com/loganfsmyth)) + * [#8473](https://github.com/babel/babel/pull/8473) Allow babel-plugin/preset prefix to not be a prefix, when used in a scope.. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-helper-transform-fixture-test-runner`, `babel-plugin-transform-runtime` + * [#8435](https://github.com/babel/babel/pull/8435) Allow transform-runtime to insert runtime references with absolute paths.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :bug: Bug Fix +* `babel-parser` + * [#8488](https://github.com/babel/babel/pull/8488) Fix trailingComments for FunctionExpression that is CallExpression arguments. ([@jiaxuan](https://github.com/jiaxuan)) +* `babel-core` + * [#8493](https://github.com/babel/babel/pull/8493) Take top-level config source into consideration when processing nested env/overrides.. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-helpers`, `babel-plugin-proposal-decorators` + * [#7429](https://github.com/babel/babel/pull/7429) Fix default descriptor setting for class properties with decorators. ([@yhpark](https://github.com/yhpark)) +* `babel-plugin-transform-parameters` + * [#8479](https://github.com/babel/babel/pull/8479) Fixes setter paratemer default value. ([@nikolayemrikh](https://github.com/nikolayemrikh)) + +#### :nail_care: Polish +* `babel-core` + * [#8494](https://github.com/babel/babel/pull/8494) Cache individual programmatic descriptors along with the overall list.. ([@loganfsmyth](https://github.com/loganfsmyth)) + * [#8493](https://github.com/babel/babel/pull/8493) Take top-level config source into consideration when processing nested env/overrides.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :house: Internal +* `babel-core` + * [#8493](https://github.com/babel/babel/pull/8493) Take top-level config source into consideration when processing nested env/overrides.. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-plugin-transform-classes` + * [#8472](https://github.com/babel/babel/pull/8472) Remove unused file. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.0.0-rc.1 (2018-08-09) + +Same as rc.0 but fixes the peerDep issue #8443. It's changed to just be ^7.0.0-0 + +## v7.0.0-rc.0 (2018-08-09) + +> This had an issue with `peerDependencies` so please use `rc.1`. + +Alright finally at the end 🙂. Shouldn't have anymore breaking changes and going to wait some time to fix bugs/regressions + +> Summary: `@babel/polyfill` will not include proposal polyfills by default and fixed a regression. + +#### :boom: Breaking Change +* `babel-polyfill` + * [#8440](https://github.com/babel/babel/pull/8440) remove proposals polyfills from default import [skip ci]. ([@hzoo](https://github.com/hzoo)) + +> Will add this to the upgrade guide/polyfill docs. I guess we could include a `babel-upgrade` for this too, not sure. + +#### :bug: Bug Fix +* `babel-cli` + * [#8436](https://github.com/babel/babel/pull/8436) Require v1.1.0 so that correct filter params are passed.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +## v7.0.0-beta.56 (2018-08-03) + +- Separate `@babel/runtime`: should work for helpers alone and opt-into core-js if necessary. +- More details in http://babeljs.io/docs/en/next/babel-runtime, http://babeljs.io/docs/en/next/babel-plugin-transform-runtime (via https://github.com/babel/babel/pull/8266, https://github.com/babel/website/pull/1714) +- `babel-upgrade` issue: https://github.com/babel/babel-upgrade/issues/70 + +#### :boom: Breaking Change +* `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-runtime-corejs2`, `babel-runtime` + * [#8266](https://github.com/babel/babel/pull/8266) Split @babel/runtime into 2 modules via @babel/runtime-corejs2. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-core`, `babel-helper-module-imports`, `babel-helpers`, `babel-plugin-external-helpers`, `babel-plugin-transform-runtime` + * [#8398](https://github.com/babel/babel/pull/8398) Only reference helpers from external/runtime helpers if they are known to be available.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :rocket: New Feature +* `babel-plugin-transform-regenerator`, `babel-plugin-transform-runtime`, `babel-runtime-corejs2`, `babel-runtime` + * [#8266](https://github.com/babel/babel/pull/8266) Split @babel/runtime into 2 modules via @babel/runtime-corejs2. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :bug: Bug Fix +* `babel-parser`, `babel-plugin-transform-typescript` + * [#8408](https://github.com/babel/babel/pull/8408) Allow TSInterfaceDeclaration to be default export. ([@existentialism](https://github.com/existentialism)) +* `babel-preset-env` + * [#8403](https://github.com/babel/babel/pull/8403) Ensure esmodule targets are parsed by browserslist. ([@existentialism](https://github.com/existentialism)) +* Other + * [#8024](https://github.com/babel/babel/pull/8024) Run transform-runtime on the standalone bundle so it stays ES5-compatible.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :memo: Documentation +* [#8412](https://github.com/babel/babel/pull/8412) Update Documentation[skip ci]. ([@leongjiameng](https://github.com/leongjiameng)) + +## v7.0.0-beta.55 (2018-07-28) + +Breaking Change in beta: + +> Throws an error on using Stage presets: https://babeljs.io/blog/2018/07/27/removing-babels-stage-presets + +#### :boom: Breaking Change +* `babel-core`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-decorators`, `babel-preset-stage-0`, `babel-preset-stage-1`, `babel-preset-stage-2`, `babel-preset-stage-3`, `babel-standalone` + * [#8293](https://github.com/babel/babel/pull/8293) Remove Stage presets. ([@hzoo](https://github.com/hzoo)) + +#### :rocket: New Feature +* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-types` + * [#7754](https://github.com/babel/babel/pull/7754) TypeScript: Support type arguments on tagged templates. ([@andy-ms](https://github.com/andy-ms)) + +#### :bug: Bug Fix +* `babel-cli`, `babel-core`, `babel-generator` + * [#8380](https://github.com/babel/babel/pull/8380) Ensure that Identifier source mappings explicitly start and stop on the generated range. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-preset-env` + * [#8391](https://github.com/babel/babel/pull/8391) Ensure preset-env doesn't clobber browserslist defaults. ([@existentialism](https://github.com/existentialism)) +* `babel-core` + * [#8376](https://github.com/babel/babel/pull/8376) Fix order of optional argument reordering. ([@Qix-](https://github.com/Qix-)) + * [#8381](https://github.com/babel/babel/pull/8381) Allow an Array for `babelrcRoots`.. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg)) + * [#8342](https://github.com/babel/babel/pull/8342) Do not mutate ast. ([@thiagoarrais](https://github.com/thiagoarrais)) +* `babel-parser` + * [#8374](https://github.com/babel/babel/pull/8374) Correctly parse interface methods named 'static'. ([@bakkot](https://github.com/bakkot)) + +#### :nail_care: Polish +* `babel-parser` + * [#8355](https://github.com/babel/babel/pull/8355) remove .then from `dynamic import` parser exception message. ([@dnalborczyk](https://github.com/dnalborczyk)) + +#### :house: Internal +* `babel-core`, `babel-preset-stage-0`, `babel-preset-stage-1`, `babel-preset-stage-2`, `babel-preset-stage-3`, `babel-standalone` + * [#8397](https://github.com/babel/babel/pull/8397) Remove our own use of stage presets. ([@hzoo](https://github.com/hzoo)) +* `babel-helpers`, `babel-plugin-proposal-class-properties` + * [#8318](https://github.com/babel/babel/pull/8318) Save full descriptor instead of only value for private fields.. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core` + * [#8381](https://github.com/babel/babel/pull/8381) Allow an Array for `babelrcRoots`.. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg)) +* `babel-cli`, `babel-core`, `babel-generator`, `babel-helper-define-map`, `babel-helper-fixtures`, `babel-helper-module-imports`, `babel-helper-module-transforms`, `babel-helper-regex`, `babel-helper-simple-access`, `babel-helper-transform-fixture-test-runner`, `babel-node`, `babel-plugin-transform-block-scoping`, `babel-register`, `babel-template`, `babel-traverse`, `babel-types` + * [#8377](https://github.com/babel/babel/pull/8377) Bumped lodash to 4.17.10. ([@Berkmann18](https://github.com/Berkmann18)) + ## v7.0.0-beta.54 (2018-07-16) > Regarding https://github.com/babel/babel/issues/8184, we aren't using `micromatch` for paths, just basic `*/**` substitution now. For anything more complicated we will recommend using a regex/`.js` config. From 07862e72727db638513d66194a7376ce82a5632e Mon Sep 17 00:00:00 2001 From: Matthew Robertson Date: Mon, 1 Oct 2018 10:59:16 -0700 Subject: [PATCH 035/563] Fix perf issue in typescript parser plugin (#8792) --- packages/babel-parser/src/plugins/typescript.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index ef3c075ccc94..10561da600ad 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -1368,10 +1368,11 @@ export default (superClass: Class): Class => return this.finishNode(nonNullExpression, "TSNonNullExpression"); } - // There are number of things we are going to "maybe" parse, like type arguments on - // tagged template expressions. If any of them fail, walk it back and continue. - const result = this.tsTryParseAndCatch(() => { - if (this.isRelational("<")) { + if (this.isRelational("<")) { + // tsTryParseAndCatch is expensive, so avoid if not necessary. + // There are number of things we are going to "maybe" parse, like type arguments on + // tagged template expressions. If any of them fail, walk it back and continue. + const result = this.tsTryParseAndCatch(() => { if (!noCalls && this.atPossibleAsync(base)) { // Almost certainly this is a generic async function `async () => ... // But it might be a call with a type argument `async();` @@ -1409,12 +1410,12 @@ export default (superClass: Class): Class => ); } } - } - this.unexpected(); - }); + this.unexpected(); + }); - if (result) return result; + if (result) return result; + } return super.parseSubscript(base, startPos, startLoc, noCalls, state); } From 3c874017145cf6fb819cb81824b0fe81c74f3bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 1 Oct 2018 22:04:19 +0200 Subject: [PATCH 036/563] [decorators] [typescript] Parse type parameters (#8767) * [decorators] [typescript] Parse type parameters * Add test for invalid code --- packages/babel-parser/src/parser/statement.js | 22 ++- .../babel-parser/src/plugins/typescript.js | 16 ++ .../type-arguments-invalid/input.js | 2 + .../type-arguments-invalid/options.json | 7 + .../decorators/type-arguments/input.js | 2 + .../decorators/type-arguments/options.json | 6 + .../decorators/type-arguments/output.json | 166 ++++++++++++++++++ .../abstract-class/input.js | 0 .../abstract-class/options.json | 0 .../abstract-class/output.json | 0 .../legacy-decorators/type-arguments/input.js | 2 + .../type-arguments/options.json | 3 + .../type-arguments/output.json | 166 ++++++++++++++++++ 13 files changed, 383 insertions(+), 9 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/output.json rename packages/babel-parser/test/fixtures/typescript/{decorators => legacy-decorators}/abstract-class/input.js (100%) rename packages/babel-parser/test/fixtures/typescript/{decorators => legacy-decorators}/abstract-class/options.json (100%) rename packages/babel-parser/test/fixtures/typescript/{decorators => legacy-decorators}/abstract-class/output.json (100%) create mode 100644 packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/output.json diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 9e890d2ef644..61551ead7585 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -305,15 +305,7 @@ export default class StatementParser extends ExpressionParser { } } - if (this.eat(tt.parenL)) { - const node = this.startNodeAt(startPos, startLoc); - node.callee = expr; - node.arguments = this.parseCallExpressionArguments(tt.parenR, false); - this.toReferencedList(node.arguments); - expr = this.finishNode(node, "CallExpression"); - } - - node.expression = expr; + node.expression = this.parseMaybeDecoratorArguments(expr); this.state.decoratorStack.pop(); } else { node.expression = this.parseMaybeAssign(); @@ -321,6 +313,18 @@ export default class StatementParser extends ExpressionParser { return this.finishNode(node, "Decorator"); } + parseMaybeDecoratorArguments(expr: N.Expression): N.Expression { + if (this.eat(tt.parenL)) { + const node = this.startNodeAtNode(expr); + node.callee = expr; + node.arguments = this.parseCallExpressionArguments(tt.parenR, false); + this.toReferencedList(node.arguments); + return this.finishNode(node, "CallExpression"); + } + + return expr; + } + parseBreakContinueStatement( node: N.BreakStatement | N.ContinueStatement, keyword: string, diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 10561da600ad..f298521b6308 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -2047,6 +2047,22 @@ export default (superClass: Class): Class => } } + parseMaybeDecoratorArguments(expr: N.Expression): N.Expression { + if (this.isRelational("<")) { + const typeArguments = this.tsParseTypeArguments(); + + if (this.match(tt.parenL)) { + const call = super.parseMaybeDecoratorArguments(expr); + call.typeParameters = typeArguments; + return call; + } + + this.unexpected(this.state.start, tt.parenL); + } + + return super.parseMaybeDecoratorArguments(expr); + } + // === === === === === === === === === === === === === === === === // Note: All below methods are duplicates of something in flow.js. // Not sure what the best way to combine these is. diff --git a/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/input.js b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/input.js new file mode 100644 index 000000000000..5a4b902e4d80 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/input.js @@ -0,0 +1,2 @@ +@decorator +class Test {} diff --git a/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/options.json b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/options.json new file mode 100644 index 000000000000..02d8a1c26f30 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments-invalid/options.json @@ -0,0 +1,7 @@ +{ + "plugins": [ + "typescript", + ["decorators", { "decoratorsBeforeExport": true }] + ], + "throws": "Unexpected token, expected \"(\" (2:0)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/input.js b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/input.js new file mode 100644 index 000000000000..cb1c5dd44784 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/input.js @@ -0,0 +1,2 @@ +@decorator() +class Test {} diff --git a/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/options.json b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/options.json new file mode 100644 index 000000000000..714918723f91 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/options.json @@ -0,0 +1,6 @@ +{ + "plugins": [ + "typescript", + ["decorators", { "decoratorsBeforeExport": true }] + ] +} diff --git a/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/output.json b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/output.json new file mode 100644 index 000000000000..91add31ed156 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/decorators/type-arguments/output.json @@ -0,0 +1,166 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "decorators": [ + { + "type": "Decorator", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "expression": { + "type": "CallExpression", + "start": 1, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "callee": { + "type": "Identifier", + "start": 1, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "decorator" + }, + "name": "decorator" + }, + "arguments": [], + "typeParameters": { + "type": "TSTypeParameterInstantiation", + "start": 10, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "params": [ + { + "type": "TSStringKeyword", + "start": 11, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ] + } + } + } + ], + "id": { + "type": "Identifier", + "start": 27, + "end": 31, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + }, + "identifierName": "Test" + }, + "name": "Test" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 32, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/decorators/abstract-class/input.js b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/abstract-class/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/typescript/decorators/abstract-class/input.js rename to packages/babel-parser/test/fixtures/typescript/legacy-decorators/abstract-class/input.js diff --git a/packages/babel-parser/test/fixtures/typescript/decorators/abstract-class/options.json b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/abstract-class/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/typescript/decorators/abstract-class/options.json rename to packages/babel-parser/test/fixtures/typescript/legacy-decorators/abstract-class/options.json diff --git a/packages/babel-parser/test/fixtures/typescript/decorators/abstract-class/output.json b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/abstract-class/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/typescript/decorators/abstract-class/output.json rename to packages/babel-parser/test/fixtures/typescript/legacy-decorators/abstract-class/output.json diff --git a/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/input.js b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/input.js new file mode 100644 index 000000000000..cb1c5dd44784 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/input.js @@ -0,0 +1,2 @@ +@decorator() +class Test {} diff --git a/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/options.json b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/options.json new file mode 100644 index 000000000000..b95c143bc24f --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["typescript", "decorators-legacy"] +} diff --git a/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/output.json b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/output.json new file mode 100644 index 000000000000..91add31ed156 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/legacy-decorators/type-arguments/output.json @@ -0,0 +1,166 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "decorators": [ + { + "type": "Decorator", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "expression": { + "type": "CallExpression", + "start": 1, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "callee": { + "type": "Identifier", + "start": 1, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "decorator" + }, + "name": "decorator" + }, + "arguments": [], + "typeParameters": { + "type": "TSTypeParameterInstantiation", + "start": 10, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "params": [ + { + "type": "TSStringKeyword", + "start": 11, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ] + } + } + } + ], + "id": { + "type": "Identifier", + "start": 27, + "end": 31, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + }, + "identifierName": "Test" + }, + "name": "Test" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 32, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file From a5b5ed928d8e0702032764edcc9ca8895879adf9 Mon Sep 17 00:00:00 2001 From: Retsam Date: Tue, 2 Oct 2018 12:29:51 -0400 Subject: [PATCH 037/563] Typescript - Tuple elements can be optional (#8720) --- .../src/generators/typescript.js | 5 + .../fixtures/typescript/tuple-empty/input.js | 1 + .../fixtures/typescript/tuple-empty/output.js | 1 + .../typescript/tuple-optional/input.js | 1 + .../typescript/tuple-optional/output.js | 1 + .../test/fixtures/typescript/tuple/input.js | 1 + .../test/fixtures/typescript/tuple/output.js | 1 + .../babel-parser/src/plugins/typescript.js | 12 +- packages/babel-parser/src/types.js | 6 + .../typescript/types/tuple-empty/input.js | 1 + .../typescript/types/tuple-empty/output.json | 117 +++++++++ .../typescript/types/tuple-optional/input.js | 1 + .../types/tuple-optional/output.json | 240 ++++++++++++++++++ .../fixtures/typescript/types/tuple/input.js | 1 + .../typescript/types/tuple/output.json | 163 ++++++++++++ .../function/tuple-parameter/input.js | 1 + .../function/tuple-parameter/output.js | 1 + .../src/asserts/generated/index.js | 3 + .../src/builders/generated/index.js | 5 + .../babel-types/src/definitions/typescript.js | 8 + .../src/validators/generated/index.js | 15 ++ 21 files changed, 584 insertions(+), 1 deletion(-) create mode 100644 packages/babel-generator/test/fixtures/typescript/tuple-empty/input.js create mode 100644 packages/babel-generator/test/fixtures/typescript/tuple-empty/output.js create mode 100644 packages/babel-generator/test/fixtures/typescript/tuple-optional/input.js create mode 100644 packages/babel-generator/test/fixtures/typescript/tuple-optional/output.js create mode 100644 packages/babel-generator/test/fixtures/typescript/tuple/input.js create mode 100644 packages/babel-generator/test/fixtures/typescript/tuple/output.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-empty/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-empty/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-optional/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-optional/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple/output.json create mode 100644 packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/input.js create mode 100644 packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/output.js diff --git a/packages/babel-generator/src/generators/typescript.js b/packages/babel-generator/src/generators/typescript.js index 4ec6736077db..1fabf7c421e7 100644 --- a/packages/babel-generator/src/generators/typescript.js +++ b/packages/babel-generator/src/generators/typescript.js @@ -241,6 +241,11 @@ export function TSTupleType(node) { this.token("]"); } +export function TSOptionalType(node) { + this.print(node.typeAnnotation, node); + this.token("?"); +} + export function TSUnionType(node) { this.tsPrintUnionOrIntersectionType(node, "|"); } diff --git a/packages/babel-generator/test/fixtures/typescript/tuple-empty/input.js b/packages/babel-generator/test/fixtures/typescript/tuple-empty/input.js new file mode 100644 index 000000000000..f7cd7b5a0e25 --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/tuple-empty/input.js @@ -0,0 +1 @@ +let x: []; diff --git a/packages/babel-generator/test/fixtures/typescript/tuple-empty/output.js b/packages/babel-generator/test/fixtures/typescript/tuple-empty/output.js new file mode 100644 index 000000000000..a602e2203789 --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/tuple-empty/output.js @@ -0,0 +1 @@ +let x: []; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/typescript/tuple-optional/input.js b/packages/babel-generator/test/fixtures/typescript/tuple-optional/input.js new file mode 100644 index 000000000000..3b8d21ba958c --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/tuple-optional/input.js @@ -0,0 +1 @@ +let x: [string, number?, (string | number)?] diff --git a/packages/babel-generator/test/fixtures/typescript/tuple-optional/output.js b/packages/babel-generator/test/fixtures/typescript/tuple-optional/output.js new file mode 100644 index 000000000000..c32cf4f129a6 --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/tuple-optional/output.js @@ -0,0 +1 @@ +let x: [string, number?, (string | number)?]; diff --git a/packages/babel-generator/test/fixtures/typescript/tuple/input.js b/packages/babel-generator/test/fixtures/typescript/tuple/input.js new file mode 100644 index 000000000000..53c8e72ec952 --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/tuple/input.js @@ -0,0 +1 @@ +let x: [number, number, number]; diff --git a/packages/babel-generator/test/fixtures/typescript/tuple/output.js b/packages/babel-generator/test/fixtures/typescript/tuple/output.js new file mode 100644 index 000000000000..07edd6a75272 --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/tuple/output.js @@ -0,0 +1 @@ +let x: [number, number, number]; \ No newline at end of file diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index f298521b6308..57d67bbff482 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -503,13 +503,23 @@ export default (superClass: Class): Class => const node: N.TsTupleType = this.startNode(); node.elementTypes = this.tsParseBracketedList( "TupleElementTypes", - this.tsParseType.bind(this), + this.tsParseTupleElementType.bind(this), /* bracket */ true, /* skipFirstToken */ false, ); return this.finishNode(node, "TSTupleType"); } + tsParseTupleElementType(): N.TsType { + const type = this.tsParseType(); + if (this.eat(tt.question)) { + const optionalTypeNode: N.TsOptionalType = this.startNodeAtNode(type); + optionalTypeNode.typeAnnotation = type; + return this.finishNode(optionalTypeNode, "TSOptionalType"); + } + return type; + } + tsParseParenthesizedType(): N.TsParenthesizedType { const node = this.startNode(); this.expect(tt.parenL); diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 4f44c9fffe8f..51e2435f0af3 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -1104,6 +1104,7 @@ export type TsType = | TsTypeLiteral | TsArrayType | TsTupleType + | TsOptionalType | TsUnionOrIntersectionType | TsConditionalType | TsInferType @@ -1184,6 +1185,11 @@ export type TsTupleType = TsTypeBase & { elementTypes: $ReadOnlyArray, }; +export type TsOptionalType = TsTypeBase & { + type: "TSOptionalType", + typeAnnotation: TsType, +}; + export type TsUnionOrIntersectionType = TsUnionType | TsIntersectionType; export type TsUnionOrIntersectionTypeBase = TsTypeBase & { diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-empty/input.js b/packages/babel-parser/test/fixtures/typescript/types/tuple-empty/input.js new file mode 100644 index 000000000000..f7cd7b5a0e25 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-empty/input.js @@ -0,0 +1 @@ +let x: []; diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-empty/output.json b/packages/babel-parser/test/fixtures/typescript/types/tuple-empty/output.json new file mode 100644 index 000000000000..667ffcb301f5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-empty/output.json @@ -0,0 +1,117 @@ +{ + "type": "File", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "x" + }, + "name": "x", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 5, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "typeAnnotation": { + "type": "TSTupleType", + "start": 7, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "elementTypes": [] + } + } + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-optional/input.js b/packages/babel-parser/test/fixtures/typescript/types/tuple-optional/input.js new file mode 100644 index 000000000000..3b8d21ba958c --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-optional/input.js @@ -0,0 +1 @@ +let x: [string, number?, (string | number)?] diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-optional/output.json b/packages/babel-parser/test/fixtures/typescript/types/tuple-optional/output.json new file mode 100644 index 000000000000..90aaa9bc8aac --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-optional/output.json @@ -0,0 +1,240 @@ +{ + "type": "File", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 44 + }, + "identifierName": "x" + }, + "name": "x", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 5, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "typeAnnotation": { + "type": "TSTupleType", + "start": 7, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "elementTypes": [ + { + "type": "TSStringKeyword", + "start": 8, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "TSOptionalType", + "start": 16, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "typeAnnotation": { + "type": "TSNumberKeyword", + "start": 16, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 22 + } + } + } + }, + { + "type": "TSOptionalType", + "start": 25, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "typeAnnotation": { + "type": "TSParenthesizedType", + "start": 25, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "typeAnnotation": { + "type": "TSUnionType", + "start": 26, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "types": [ + { + "type": "TSStringKeyword", + "start": 26, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + { + "type": "TSNumberKeyword", + "start": 35, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 41 + } + } + } + ] + } + } + } + ] + } + } + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } +} diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple/input.js b/packages/babel-parser/test/fixtures/typescript/types/tuple/input.js new file mode 100644 index 000000000000..53c8e72ec952 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple/input.js @@ -0,0 +1 @@ +let x: [number, number, number]; diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple/output.json b/packages/babel-parser/test/fixtures/typescript/types/tuple/output.json new file mode 100644 index 000000000000..5b6c0e2cffd7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple/output.json @@ -0,0 +1,163 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 31 + }, + "identifierName": "x" + }, + "name": "x", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 5, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "typeAnnotation": { + "type": "TSTupleType", + "start": 7, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "elementTypes": [ + { + "type": "TSNumberKeyword", + "start": 8, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "TSNumberKeyword", + "start": 16, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + { + "type": "TSNumberKeyword", + "start": 24, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 30 + } + } + } + ] + } + } + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/input.js b/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/input.js new file mode 100644 index 000000000000..9d8fadb133f3 --- /dev/null +++ b/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/input.js @@ -0,0 +1 @@ +function foo(...args: [number, string?]) {} diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/output.js b/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/output.js new file mode 100644 index 000000000000..3b940d105755 --- /dev/null +++ b/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/output.js @@ -0,0 +1 @@ +function foo(...args) {} diff --git a/packages/babel-types/src/asserts/generated/index.js b/packages/babel-types/src/asserts/generated/index.js index e1b2ad33134b..725c0e7dbaa1 100644 --- a/packages/babel-types/src/asserts/generated/index.js +++ b/packages/babel-types/src/asserts/generated/index.js @@ -825,6 +825,9 @@ export function assertTSArrayType(node: Object, opts?: Object = {}): void { export function assertTSTupleType(node: Object, opts?: Object = {}): void { assert("TSTupleType", node, opts); } +export function assertTSOptionalType(node: Object, opts?: Object = {}): void { + assert("TSOptionalType", node, opts); +} export function assertTSUnionType(node: Object, opts?: Object = {}): void { assert("TSUnionType", node, opts); } diff --git a/packages/babel-types/src/builders/generated/index.js b/packages/babel-types/src/builders/generated/index.js index 6d976f42cb95..8692bf7ba050 100644 --- a/packages/babel-types/src/builders/generated/index.js +++ b/packages/babel-types/src/builders/generated/index.js @@ -793,6 +793,11 @@ export function TSTupleType(...args: Array): Object { } export { TSTupleType as tsTupleType }; export { TSTupleType as tSTupleType }; +export function TSOptionalType(...args: Array): Object { + return builder("TSOptionalType", ...args); +} +export { TSOptionalType as tsOptionalType }; +export { TSOptionalType as tSOptionalType }; export function TSUnionType(...args: Array): Object { return builder("TSUnionType", ...args); } diff --git a/packages/babel-types/src/definitions/typescript.js b/packages/babel-types/src/definitions/typescript.js index 46bb444269ed..ab1d7eb20297 100644 --- a/packages/babel-types/src/definitions/typescript.js +++ b/packages/babel-types/src/definitions/typescript.js @@ -213,6 +213,14 @@ defineType("TSTupleType", { }, }); +defineType("TSOptionalType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: validateType("TSType"), + }, +}); + const unionOrIntersection = { aliases: ["TSType"], visitor: ["types"], diff --git a/packages/babel-types/src/validators/generated/index.js b/packages/babel-types/src/validators/generated/index.js index 74e50870be23..c677379fef80 100644 --- a/packages/babel-types/src/validators/generated/index.js +++ b/packages/babel-types/src/validators/generated/index.js @@ -2672,6 +2672,20 @@ export function isTSTupleType(node: Object, opts?: Object): boolean { return false; } +export function isTSOptionalType(node: Object, opts?: Object): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "TSOptionalType") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} export function isTSUnionType(node: Object, opts?: Object): boolean { if (!node) return false; @@ -4149,6 +4163,7 @@ export function isTSType(node: Object, opts?: Object): boolean { "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || + "TSOptionalType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || From 2575312d1f721ffa553b1b46680e0660f8b0cebb Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Tue, 2 Oct 2018 20:45:53 -0500 Subject: [PATCH 038/563] Fix parsing of slash after class expression (#8804) --- .../babel-parser/src/tokenizer/context.js | 2 +- .../fixtures/es2015/class/division/input.js | 9 + .../es2015/class/division/output.json | 561 ++++++++++++++++++ 3 files changed, 571 insertions(+), 1 deletion(-) create mode 100644 packages/babel-parser/test/fixtures/es2015/class/division/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/class/division/output.json diff --git a/packages/babel-parser/src/tokenizer/context.js b/packages/babel-parser/src/tokenizer/context.js index 11fe53d2d207..bb0f7b8a20d2 100644 --- a/packages/babel-parser/src/tokenizer/context.js +++ b/packages/babel-parser/src/tokenizer/context.js @@ -106,7 +106,7 @@ tt.incDec.updateContext = function() { // tokExprAllowed stays unchanged }; -tt._function.updateContext = function(prevType) { +tt._function.updateContext = tt._class.updateContext = function(prevType) { if (this.state.exprAllowed && !this.braceIsBlock(prevType)) { this.state.context.push(types.functionExpression); } diff --git a/packages/babel-parser/test/fixtures/es2015/class/division/input.js b/packages/babel-parser/test/fixtures/es2015/class/division/input.js new file mode 100644 index 000000000000..590fe776ecf6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/division/input.js @@ -0,0 +1,9 @@ +x = class{} / foo + +x = class{} +/ foo / g + +(x = class{} / foo) + +(x = class{} +/ foo / g) diff --git a/packages/babel-parser/test/fixtures/es2015/class/division/output.json b/packages/babel-parser/test/fixtures/es2015/class/division/output.json new file mode 100644 index 000000000000..0a4a21ad4d20 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/division/output.json @@ -0,0 +1,561 @@ +{ + "type": "File", + "start": 0, + "end": 86, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 86, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "BinaryExpression", + "start": 4, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "left": { + "type": "ClassExpression", + "start": 4, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "id": null, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "body": [] + } + }, + "operator": "/", + "right": { + "type": "Identifier", + "start": 14, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "foo" + }, + "name": "foo" + } + } + } + }, + { + "type": "ExpressionStatement", + "start": 19, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 19, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 9, + "column": 10 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "BinaryExpression", + "start": 23, + "end": 86, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 9, + "column": 10 + } + }, + "left": { + "type": "BinaryExpression", + "start": 23, + "end": 36, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "left": { + "type": "ClassExpression", + "start": 23, + "end": 30, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "id": null, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 28, + "end": 30, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "body": [] + } + }, + "operator": "/", + "right": { + "type": "Identifier", + "start": 33, + "end": 36, + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 5 + }, + "identifierName": "foo" + }, + "name": "foo" + } + }, + "operator": "/", + "right": { + "type": "CallExpression", + "start": 39, + "end": 86, + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 9, + "column": 10 + } + }, + "callee": { + "type": "CallExpression", + "start": 39, + "end": 61, + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 6, + "column": 19 + } + }, + "callee": { + "type": "Identifier", + "start": 39, + "end": 40, + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + }, + "identifierName": "g" + }, + "name": "g" + }, + "arguments": [ + { + "type": "AssignmentExpression", + "start": 43, + "end": 60, + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 18 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "BinaryExpression", + "start": 47, + "end": 60, + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 18 + } + }, + "left": { + "type": "ClassExpression", + "start": 47, + "end": 54, + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 12 + } + }, + "id": null, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 52, + "end": 54, + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 12 + } + }, + "body": [] + } + }, + "operator": "/", + "right": { + "type": "Identifier", + "start": 57, + "end": 60, + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 18 + }, + "identifierName": "foo" + }, + "name": "foo" + } + } + } + ] + }, + "arguments": [ + { + "type": "AssignmentExpression", + "start": 64, + "end": 85, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 9, + "column": 9 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 64, + "end": 65, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "BinaryExpression", + "start": 68, + "end": 85, + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + }, + "left": { + "type": "BinaryExpression", + "start": 68, + "end": 81, + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 9, + "column": 5 + } + }, + "left": { + "type": "ClassExpression", + "start": 68, + "end": 75, + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 12 + } + }, + "id": null, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 73, + "end": 75, + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 12 + } + }, + "body": [] + } + }, + "operator": "/", + "right": { + "type": "Identifier", + "start": 78, + "end": 81, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 5 + }, + "identifierName": "foo" + }, + "name": "foo" + } + }, + "operator": "/", + "right": { + "type": "Identifier", + "start": 84, + "end": 85, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + }, + "identifierName": "g" + }, + "name": "g" + } + } + } + ] + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file From 36d12b59698909e84f7811279cfaf84fa1af0e23 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Tue, 2 Oct 2018 20:46:08 -0500 Subject: [PATCH 039/563] Ensure destructuring's computed key handling matches object-rest-spread (#8793) --- .../src/index.js | 24 ++++++++++++++----- .../es7-object-rest-builtins/output.js | 2 +- .../es7-object-rest-loose/output.js | 4 +++- .../destructuring/es7-object-rest/output.js | 2 +- .../exec.js | 4 ++++ .../options.json | 3 +++ .../exec.js | 10 ++++++++ .../options.json | 3 +++ 8 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/function-key-with-object-rest-spread/exec.js create mode 100644 packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/function-key-with-object-rest-spread/options.json create mode 100644 packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/number-key-with-object-rest-spread/exec.js create mode 100644 packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/number-key-with-object-rest-spread/options.json diff --git a/packages/babel-plugin-transform-destructuring/src/index.js b/packages/babel-plugin-transform-destructuring/src/index.js index a38cfb6b3889..9d5830361256 100644 --- a/packages/babel-plugin-transform-destructuring/src/index.js +++ b/packages/babel-plugin-transform-destructuring/src/index.js @@ -170,7 +170,8 @@ export default declare((api, options) => { pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) { // get all the keys that appear in this object before the current spread - let keys = []; + const keys = []; + let allLiteral = true; for (let i = 0; i < pattern.properties.length; i++) { const prop = pattern.properties[i]; @@ -182,11 +183,15 @@ export default declare((api, options) => { // ignore other spread properties if (t.isRestElement(prop)) continue; - let key = prop.key; + const key = prop.key; if (t.isIdentifier(key) && !prop.computed) { - key = t.stringLiteral(prop.key.name); + keys.push(t.stringLiteral(key.name)); + } else if (t.isLiteral(key)) { + keys.push(t.stringLiteral(String(key.value))); + } else { + keys.push(t.cloneNode(key)); + allLiteral = false; } - keys.push(t.cloneNode(key)); } let value; @@ -196,11 +201,18 @@ export default declare((api, options) => { t.cloneNode(objRef), ]); } else { - keys = t.arrayExpression(keys); + let keyExpression = t.arrayExpression(keys); + + if (!allLiteral) { + keyExpression = t.callExpression( + t.memberExpression(keyExpression, t.identifier("map")), + [this.addHelper("toPropertyKey")], + ); + } value = t.callExpression( this.addHelper(`objectWithoutProperties${loose ? "Loose" : ""}`), - [t.cloneNode(objRef), keys], + [t.cloneNode(objRef), keyExpression], ); } diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-builtins/output.js b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-builtins/output.js index 8e8f96790853..8dcd578573fa 100644 --- a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-builtins/output.js +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-builtins/output.js @@ -6,7 +6,7 @@ var _z2 = z, y = babelHelpers.objectWithoutProperties(_z2, ["x"]); var _z3 = z, x = _z3[x], - y = babelHelpers.objectWithoutProperties(_z3, [x]); + y = babelHelpers.objectWithoutProperties(_z3, [x].map(babelHelpers.toPropertyKey)); (function (_ref) { var x = _ref.x, diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/output.js b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/output.js index 50093aa1720a..4351f257437d 100644 --- a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/output.js +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/output.js @@ -1,3 +1,5 @@ +function _toPropertyKey(key) { if (typeof key === "symbol") { return key; } else { return String(key); } } + function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } @@ -13,7 +15,7 @@ var _z2 = z, var _z3 = z, x = _z3[x], - y = _objectWithoutPropertiesLoose(_z3, [x]); + y = _objectWithoutPropertiesLoose(_z3, [x].map(_toPropertyKey)); (function (_ref) { let x = _ref.x, diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest/output.js b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest/output.js index 0729c49dd0e2..c4af22047ad0 100644 --- a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest/output.js +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest/output.js @@ -6,7 +6,7 @@ var _z2 = z, y = babelHelpers.objectWithoutProperties(_z2, ["x"]); var _z3 = z, x = _z3[x], - y = babelHelpers.objectWithoutProperties(_z3, [x]); + y = babelHelpers.objectWithoutProperties(_z3, [x].map(babelHelpers.toPropertyKey)); (function (_ref) { var x = _ref.x, diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/function-key-with-object-rest-spread/exec.js b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/function-key-with-object-rest-spread/exec.js new file mode 100644 index 000000000000..fc8ae90c7411 --- /dev/null +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/function-key-with-object-rest-spread/exec.js @@ -0,0 +1,4 @@ +const { [(() => 1)()]: a, ...rest } = { 1: "a" }; + +expect(a).toBe("a"); +expect(rest).toEqual({}); diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/function-key-with-object-rest-spread/options.json b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/function-key-with-object-rest-spread/options.json new file mode 100644 index 000000000000..9fd3882905b5 --- /dev/null +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/function-key-with-object-rest-spread/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-destructuring", "proposal-object-rest-spread"] +} diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/number-key-with-object-rest-spread/exec.js b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/number-key-with-object-rest-spread/exec.js new file mode 100644 index 000000000000..fe160adb01ca --- /dev/null +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/number-key-with-object-rest-spread/exec.js @@ -0,0 +1,10 @@ +const foo = { + 1: "a", + 2: "b", + 3: "c", +}; + +const { [1]: bar, ...rest } = foo; + +expect(bar).toBe("a"); +expect(rest).toEqual({ 2: "b", 3: "c" }); diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/number-key-with-object-rest-spread/options.json b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/number-key-with-object-rest-spread/options.json new file mode 100644 index 000000000000..9fd3882905b5 --- /dev/null +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/number-key-with-object-rest-spread/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-destructuring", "proposal-object-rest-spread"] +} From 850bc1d3dd868705331f963569583ce325921d5b Mon Sep 17 00:00:00 2001 From: Bruno Macabeus Date: Tue, 2 Oct 2018 23:31:06 -0300 Subject: [PATCH 040/563] class private methods and properties: should not allow spaces between # and identifier (#8756) --- packages/babel-parser/src/parser/expression.js | 12 ++++++++++++ .../class-private-methods/failure-spaces/input.js | 5 +++++ .../failure-spaces/options.json | 4 ++++ .../class-private-properties/failure-spaces/input.js | 3 +++ .../failure-spaces/options.json | 4 ++++ 5 files changed, 28 insertions(+) create mode 100644 packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/options.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 48dd82d67347..e1ea1aa55d98 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -923,7 +923,19 @@ export default class ExpressionParser extends LValParser { if (isPrivate) { this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); const node = this.startNode(); + const columnHashEnd = this.state.end; this.next(); + const columnIdentifierStart = this.state.start; + + const spacesBetweenHashAndIdentifier = + columnIdentifierStart - columnHashEnd; + if (spacesBetweenHashAndIdentifier != 0) { + this.raise( + columnIdentifierStart, + "Unexpected space between # and identifier", + ); + } + node.id = this.parseIdentifier(true); return this.finishNode(node, "PrivateName"); } else { diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/input.js b/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/input.js new file mode 100644 index 000000000000..b49e1327f4c0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/input.js @@ -0,0 +1,5 @@ +class Spaces { + # wrongSpaces() { + return fail(); + } +} diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/options.json new file mode 100644 index 000000000000..f8dba0c322fe --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/options.json @@ -0,0 +1,4 @@ +{ + "throws": "Unexpected space between # and identifier (2:5)", + "plugins": ["classPrivateMethods"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/input.js b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/input.js new file mode 100644 index 000000000000..023684c53e80 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/input.js @@ -0,0 +1,3 @@ +class Spaces { + # wrongSpaces; +} diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/options.json new file mode 100644 index 000000000000..f8dba0c322fe --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/options.json @@ -0,0 +1,4 @@ +{ + "throws": "Unexpected space between # and identifier (2:5)", + "plugins": ["classPrivateMethods"] +} From 3fa4f53d0acb933c1864da7a51095a497545a187 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Mon, 8 Oct 2018 05:30:02 +0200 Subject: [PATCH 041/563] System module format - fixes function hoisting failure case (#8820) * failing test case * fix function hoist bug --- .../src/index.js | 19 +++++++++++++++++-- .../systemjs/export-fn-decl/input.mjs | 10 ++++++++++ .../systemjs/export-fn-decl/output.mjs | 18 ++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-fn-decl/input.mjs create mode 100644 packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-fn-decl/output.mjs diff --git a/packages/babel-plugin-transform-modules-systemjs/src/index.js b/packages/babel-plugin-transform-modules-systemjs/src/index.js index 5f93094be5bb..242d13216377 100644 --- a/packages/babel-plugin-transform-modules-systemjs/src/index.js +++ b/packages/babel-plugin-transform-modules-systemjs/src/index.js @@ -332,8 +332,23 @@ export default declare((api, options) => { const nodes = []; for (const specifier of specifiers) { - // only globals exported this way - if (!path.scope.getBinding(specifier.local.name)) { + const binding = path.scope.getBinding( + specifier.local.name, + ); + // hoisted function export + if ( + binding && + t.isFunctionDeclaration(binding.path.node) + ) { + beforeBody.push( + buildExportCall( + specifier.exported.name, + t.cloneNode(specifier.local), + ), + ); + } + // only globals also exported this way + else if (!binding) { nodes.push( buildExportCall( specifier.exported.name, diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-fn-decl/input.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-fn-decl/input.mjs new file mode 100644 index 000000000000..3c230f186782 --- /dev/null +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-fn-decl/input.mjs @@ -0,0 +1,10 @@ +var testProp = 'test property'; + +function testFunc() { + return 'test function'; +} + +export { + testFunc, + testProp +}; diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-fn-decl/output.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-fn-decl/output.mjs new file mode 100644 index 000000000000..c3c2159be301 --- /dev/null +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-fn-decl/output.mjs @@ -0,0 +1,18 @@ +System.register([], function (_export, _context) { + "use strict"; + + var testProp; + + function testFunc() { + return 'test function'; + } + + _export("testFunc", testFunc); + + return { + setters: [], + execute: function () { + _export("testProp", testProp = 'test property'); + } + }; +}); \ No newline at end of file From 4b8cb75b74855783acebbe4801098b1d0c1510ab Mon Sep 17 00:00:00 2001 From: Tim von Oldenburg Date: Mon, 8 Oct 2018 05:31:03 +0200 Subject: [PATCH 042/563] types: allow jsxEmptyExpression inside jsxExpressionContainer (#8791) --- packages/babel-types/src/definitions/jsx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-types/src/definitions/jsx.js b/packages/babel-types/src/definitions/jsx.js index 440427395603..776714c873f7 100644 --- a/packages/babel-types/src/definitions/jsx.js +++ b/packages/babel-types/src/definitions/jsx.js @@ -73,7 +73,7 @@ defineType("JSXExpressionContainer", { aliases: ["JSX", "Immutable"], fields: { expression: { - validate: assertNodeType("Expression"), + validate: assertNodeType("Expression", "JSXEmptyExpression"), }, }, }); From 08454ece462ed870f3c18e1274091e2cfb761085 Mon Sep 17 00:00:00 2001 From: Retsam Date: Mon, 8 Oct 2018 12:32:31 -0400 Subject: [PATCH 043/563] Typescript - Tuples can include rest elements (#8805) --- .../src/generators/typescript.js | 5 + .../fixtures/typescript/tuple-rest/input.js | 1 + .../fixtures/typescript/tuple-rest/output.js | 1 + .../babel-parser/src/plugins/typescript.js | 9 + packages/babel-parser/src/types.js | 6 + .../typescript/types/tuple-rest/input.js | 1 + .../typescript/types/tuple-rest/output.json | 178 ++++++++++++++++++ .../function/tuple-parameter/input.js | 2 +- .../babel-types/src/definitions/typescript.js | 8 + 9 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 packages/babel-generator/test/fixtures/typescript/tuple-rest/input.js create mode 100644 packages/babel-generator/test/fixtures/typescript/tuple-rest/output.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-rest/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-rest/output.json diff --git a/packages/babel-generator/src/generators/typescript.js b/packages/babel-generator/src/generators/typescript.js index 1fabf7c421e7..33489ebbb278 100644 --- a/packages/babel-generator/src/generators/typescript.js +++ b/packages/babel-generator/src/generators/typescript.js @@ -246,6 +246,11 @@ export function TSOptionalType(node) { this.token("?"); } +export function TSRestType(node) { + this.token("..."); + this.print(node.typeAnnotation, node); +} + export function TSUnionType(node) { this.tsPrintUnionOrIntersectionType(node, "|"); } diff --git a/packages/babel-generator/test/fixtures/typescript/tuple-rest/input.js b/packages/babel-generator/test/fixtures/typescript/tuple-rest/input.js new file mode 100644 index 000000000000..d7719b2cb4e6 --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/tuple-rest/input.js @@ -0,0 +1 @@ +let x: [string, ...number[]] diff --git a/packages/babel-generator/test/fixtures/typescript/tuple-rest/output.js b/packages/babel-generator/test/fixtures/typescript/tuple-rest/output.js new file mode 100644 index 000000000000..52be881f835c --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/tuple-rest/output.js @@ -0,0 +1 @@ +let x: [string, ...number[]]; \ No newline at end of file diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 57d67bbff482..bd3d88d9ac1f 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -511,7 +511,16 @@ export default (superClass: Class): Class => } tsParseTupleElementType(): N.TsType { + // parses `...TsType[]` + if (this.match(tt.ellipsis)) { + const restNode: N.TsRestType = this.startNode(); + this.next(); // skips ellipsis + restNode.typeAnnotation = this.tsParseType(); + return this.finishNode(restNode, "TSRestType"); + } + const type = this.tsParseType(); + // parses `TsType?` if (this.eat(tt.question)) { const optionalTypeNode: N.TsOptionalType = this.startNodeAtNode(type); optionalTypeNode.typeAnnotation = type; diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 51e2435f0af3..c16dc8feec7c 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -1105,6 +1105,7 @@ export type TsType = | TsArrayType | TsTupleType | TsOptionalType + | TsRestType | TsUnionOrIntersectionType | TsConditionalType | TsInferType @@ -1190,6 +1191,11 @@ export type TsOptionalType = TsTypeBase & { typeAnnotation: TsType, }; +export type TsRestType = TsTypeBase & { + type: "TSRestType", + typeAnnotation: TsType, +}; + export type TsUnionOrIntersectionType = TsUnionType | TsIntersectionType; export type TsUnionOrIntersectionTypeBase = TsTypeBase & { diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest/input.js b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest/input.js new file mode 100644 index 000000000000..d7719b2cb4e6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest/input.js @@ -0,0 +1 @@ +let x: [string, ...number[]] diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest/output.json b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest/output.json new file mode 100644 index 000000000000..fd5b5999c51a --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest/output.json @@ -0,0 +1,178 @@ +{ + "type": "File", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "x" + }, + "name": "x", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 5, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "typeAnnotation": { + "type": "TSTupleType", + "start": 7, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "elementTypes": [ + { + "type": "TSStringKeyword", + "start": 8, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "TSRestType", + "start": 16, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "typeAnnotation": { + "type": "TSArrayType", + "start": 19, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "elementType": { + "type": "TSNumberKeyword", + "start": 19, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 25 + } + } + } + } + } + ] + } + } + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } +} diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/input.js b/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/input.js index 9d8fadb133f3..954c72a82aaa 100644 --- a/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/input.js +++ b/packages/babel-plugin-transform-typescript/test/fixtures/function/tuple-parameter/input.js @@ -1 +1 @@ -function foo(...args: [number, string?]) {} +function foo(...args: [number, string?, ...number[]]) {} diff --git a/packages/babel-types/src/definitions/typescript.js b/packages/babel-types/src/definitions/typescript.js index ab1d7eb20297..297185357568 100644 --- a/packages/babel-types/src/definitions/typescript.js +++ b/packages/babel-types/src/definitions/typescript.js @@ -221,6 +221,14 @@ defineType("TSOptionalType", { }, }); +defineType("TSRestType", { + aliases: ["TSType"], + visitor: ["typeAnnotation"], + fields: { + typeAnnotation: validateType("TSType"), + }, +}); + const unionOrIntersection = { aliases: ["TSType"], visitor: ["types"], From 3951acbff5e0bf9212a971ca88e455cda2b80809 Mon Sep 17 00:00:00 2001 From: Retsam Date: Mon, 8 Oct 2018 13:29:33 -0400 Subject: [PATCH 044/563] chore: add generated files for #8805 (#8826) --- .../babel-types/src/asserts/generated/index.js | 3 +++ .../babel-types/src/builders/generated/index.js | 5 +++++ .../babel-types/src/validators/generated/index.js | 15 +++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/packages/babel-types/src/asserts/generated/index.js b/packages/babel-types/src/asserts/generated/index.js index 725c0e7dbaa1..65cb2901e83c 100644 --- a/packages/babel-types/src/asserts/generated/index.js +++ b/packages/babel-types/src/asserts/generated/index.js @@ -828,6 +828,9 @@ export function assertTSTupleType(node: Object, opts?: Object = {}): void { export function assertTSOptionalType(node: Object, opts?: Object = {}): void { assert("TSOptionalType", node, opts); } +export function assertTSRestType(node: Object, opts?: Object = {}): void { + assert("TSRestType", node, opts); +} export function assertTSUnionType(node: Object, opts?: Object = {}): void { assert("TSUnionType", node, opts); } diff --git a/packages/babel-types/src/builders/generated/index.js b/packages/babel-types/src/builders/generated/index.js index 8692bf7ba050..86ac361d3d76 100644 --- a/packages/babel-types/src/builders/generated/index.js +++ b/packages/babel-types/src/builders/generated/index.js @@ -798,6 +798,11 @@ export function TSOptionalType(...args: Array): Object { } export { TSOptionalType as tsOptionalType }; export { TSOptionalType as tSOptionalType }; +export function TSRestType(...args: Array): Object { + return builder("TSRestType", ...args); +} +export { TSRestType as tsRestType }; +export { TSRestType as tSRestType }; export function TSUnionType(...args: Array): Object { return builder("TSUnionType", ...args); } diff --git a/packages/babel-types/src/validators/generated/index.js b/packages/babel-types/src/validators/generated/index.js index c677379fef80..41484fa04871 100644 --- a/packages/babel-types/src/validators/generated/index.js +++ b/packages/babel-types/src/validators/generated/index.js @@ -2686,6 +2686,20 @@ export function isTSOptionalType(node: Object, opts?: Object): boolean { return false; } +export function isTSRestType(node: Object, opts?: Object): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "TSRestType") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} export function isTSUnionType(node: Object, opts?: Object): boolean { if (!node) return false; @@ -4164,6 +4178,7 @@ export function isTSType(node: Object, opts?: Object): boolean { "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || + "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || From d2c75c2d380ba8ab6bb15eeb926e48330d05b2ef Mon Sep 17 00:00:00 2001 From: Retsam Date: Tue, 9 Oct 2018 17:25:31 -0400 Subject: [PATCH 045/563] fix: corrects handling of newline after async with paren-less arrow function (#8830) If async is followed by a newline, then a paren-less arrow function should be parsed as two expressions --- .../babel-parser/src/parser/expression.js | 7 +- .../async-functions/newline-arrow/input.js | 2 + .../async-functions/newline-arrow/output.json | 136 ++++++++++++++++++ 3 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/newline-arrow/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/newline-arrow/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index e1ea1aa55d98..dae74bf3d614 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -794,7 +794,12 @@ export default class ExpressionParser extends LValParser { ) { this.next(); return this.parseFunction(node, false, false, true); - } else if (canBeArrow && id.name === "async" && this.match(tt.name)) { + } else if ( + canBeArrow && + !this.canInsertSemicolon() && + id.name === "async" && + this.match(tt.name) + ) { const oldYield = this.state.yieldInPossibleArrowParameters; this.state.yieldInPossibleArrowParameters = null; const params = [this.parseIdentifier()]; diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/newline-arrow/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/newline-arrow/input.js new file mode 100644 index 000000000000..200a1447669b --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/newline-arrow/input.js @@ -0,0 +1,2 @@ +async +x => x diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/newline-arrow/output.json b/packages/babel-parser/test/fixtures/es2017/async-functions/newline-arrow/output.json new file mode 100644 index 000000000000..4c44c118638d --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/newline-arrow/output.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "async" + }, + "name": "async" + } + }, + { + "type": "ExpressionStatement", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + }, + "identifierName": "x" + }, + "name": "x" + } + ], + "body": { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + }, + "identifierName": "x" + }, + "name": "x" + } + } + } + ], + "directives": [] + } +} \ No newline at end of file From 842c164be55db40628a9bfbd291fb57eadbc4b42 Mon Sep 17 00:00:00 2001 From: Kevin Thomas Date: Wed, 10 Oct 2018 21:40:20 +0530 Subject: [PATCH 046/563] Insertafter jsx fix (#8833) * Add check for JSXElement * Add test --- .../babel-traverse/src/path/modification.js | 2 +- packages/babel-traverse/test/modification.js | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/babel-traverse/src/path/modification.js b/packages/babel-traverse/src/path/modification.js index 0092a206522e..b69f527eed6e 100644 --- a/packages/babel-traverse/src/path/modification.js +++ b/packages/babel-traverse/src/path/modification.js @@ -107,7 +107,7 @@ export function insertAfter(nodes) { ) { return parentPath.insertAfter(nodes); } else if ( - this.isNodeType("Expression") || + (this.isNodeType("Expression") && !this.isJSXElement()) || (parentPath.isForStatement() && this.key === "init") ) { if (this.node) { diff --git a/packages/babel-traverse/test/modification.js b/packages/babel-traverse/test/modification.js index 0f56fe5f9e42..6b08efa0a684 100644 --- a/packages/babel-traverse/test/modification.js +++ b/packages/babel-traverse/test/modification.js @@ -200,6 +200,32 @@ describe("modification", function() { ); }); + it("returns inserted path with nested JSXElement", function() { + const ast = parse("
foo
", { + plugins: ["jsx"], + }); + let path; + traverse(ast, { + Program: function(_path) { + path = _path.get("body.0"); + }, + JSXElement: function(path) { + const tagName = path.node.openingElement.name.name; + if (tagName !== "span") return; + path.insertAfter( + t.JSXElement( + t.JSXOpeningElement(t.JSXIdentifier("div"), [], false), + t.JSXClosingElement(t.JSXIdentifier("div")), + [], + ), + ); + }, + }); + expect(generateCode(path)).toBe( + "
foo
;", + ); + }); + describe("when the parent is an export declaration inserts the node after", function() { it("the ExportNamedDeclaration", function() { const bodyPath = getPath("export function a() {}", { From ce1a6526e51920afe38abbf904e7e14a44093ba3 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Wed, 10 Oct 2018 12:29:23 -0500 Subject: [PATCH 047/563] flow-bin@0.82.0 (#8832) --- package.json | 2 +- packages/babel-parser/src/types.js | 2 +- yarn.lock | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4e0647d4fc73..ee3c860a6fa8 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "eslint-plugin-flowtype": "^2.50.1", "eslint-plugin-local-rules": "0.1.0", "eslint-plugin-prettier": "^2.6.2", - "flow-bin": "^0.80.0", + "flow-bin": "^0.82.0", "graceful-fs": "^4.1.11", "gulp": "^4.0.0", "gulp-babel": "^8.0.0-beta.2", diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index c16dc8feec7c..476d043161ba 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -398,7 +398,7 @@ export type ObjectMemberBase = NodeBase & { decorators: $ReadOnlyArray, kind?: "get" | "set" | "method", method: boolean, // TODO: Not in spec - + typeParameters?: ?TypeParameterInstantiationBase, // TODO: Not in spec variance?: ?FlowVariance, // TODO: Not in spec }; diff --git a/yarn.lock b/yarn.lock index 06a2e73ceebd..15cbc301cfa1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3508,9 +3508,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.80.0: - version "0.80.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.80.0.tgz#04cc1ee626a6f50786f78170c92ebe1745235403" +flow-bin@^0.82.0: + version "0.82.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.82.0.tgz#fbec84c0d6cab7877565eca8214d655f3aefb8db" flush-write-stream@^1.0.2: version "1.0.3" From 6b8261bbb7ebb8d2980cb30c3b3369678fd99835 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Wed, 10 Oct 2018 13:55:02 -0500 Subject: [PATCH 048/563] Bump Babel deps (#8770) --- package.json | 12 ++++---- yarn.lock | 86 +++++++++++++++++++++++++++++++++++----------------- 2 files changed, 64 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index ee3c860a6fa8..203ecfe70fd0 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "test": "make test" }, "devDependencies": { - "@babel/cli": "^7.1.0", - "@babel/core": "^7.1.0", + "@babel/cli": "^7.1.2", + "@babel/core": "^7.1.2", "@babel/plugin-proposal-class-properties": "^7.1.0", "@babel/plugin-proposal-export-namespace-from": "^7.0.0", "@babel/plugin-proposal-numeric-separator": "^7.0.0", @@ -19,11 +19,11 @@ "@babel/preset-env": "^7.1.0", "@babel/preset-flow": "^7.0.0", "@babel/register": "^7.0.0", - "@babel/runtime": "^7.0.0", + "@babel/runtime": "^7.1.2", "babel-core": "^7.0.0-0", - "babel-eslint": "^9.0.0", + "babel-eslint": "^10.0.1", "babel-jest": "^23.6.0", - "babel-loader": "^8.0.2", + "babel-loader": "^8.0.4", "babel-plugin-transform-charcodes": "^0.1.0", "browserify": "^16.2.2", "bundle-collapser": "^1.2.1", @@ -32,7 +32,7 @@ "derequire": "^2.0.2", "enhanced-resolve": "^3.0.0", "eslint": "^5.6.0", - "eslint-config-babel": "^8.0.0", + "eslint-config-babel": "^8.0.1", "eslint-plugin-flowtype": "^2.50.1", "eslint-plugin-local-rules": "0.1.0", "eslint-plugin-prettier": "^2.6.2", diff --git a/yarn.lock b/yarn.lock index 15cbc301cfa1..65e6e7ba4975 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@babel/cli@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.1.0.tgz#a9429fd63911711b0fa93ae50d73beee6c42aef8" +"@babel/cli@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.1.2.tgz#fc2853ae96824b3779ca85de4fd025ce3cf62a5e" dependencies: commander "^2.8.1" convert-source-map "^1.1.0" @@ -30,17 +30,17 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.0.tgz#08958f1371179f62df6966d8a614003d11faeb04" +"@babel/core@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.2.tgz#f8d2a9ceb6832887329a7b60f9d035791400ba4e" dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.0.0" - "@babel/helpers" "^7.1.0" - "@babel/parser" "^7.1.0" - "@babel/template" "^7.1.0" + "@babel/generator" "^7.1.2" + "@babel/helpers" "^7.1.2" + "@babel/parser" "^7.1.2" + "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.1.2" convert-source-map "^1.1.0" debug "^3.1.0" json5 "^0.5.0" @@ -69,6 +69,16 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.2.tgz#fde75c072575ce7abbd97322e8fef5bae67e4630" + dependencies: + "@babel/types" "^7.1.2" + jsesc "^2.5.1" + lodash "^4.17.10" + source-map "^0.5.0" + trim-right "^1.0.1" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -234,13 +244,13 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helpers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.0.tgz#429bf0f0020be56a4242883432084e3d70a8a141" +"@babel/helpers@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.2.tgz#ab752e8c35ef7d39987df4e8586c63b8846234b5" dependencies: - "@babel/template" "^7.1.0" + "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.1.2" "@babel/highlight@7.0.0-beta.40": version "7.0.0-beta.40" @@ -266,6 +276,10 @@ version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" +"@babel/parser@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.2.tgz#85c5c47af6d244fab77bce6b9bd830e38c978409" + "@babel/plugin-proposal-async-generator-functions@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" @@ -645,9 +659,9 @@ pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/runtime@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0.tgz#adeb78fedfc855aa05bc041640f3f6f98e85424c" +"@babel/runtime@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.2.tgz#81c89935f4647706fc54541145e6b4ecfef4b8e3" dependencies: regenerator-runtime "^0.12.0" @@ -676,6 +690,14 @@ "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" +"@babel/template@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.1.2" + "@babel/types" "^7.1.2" + "@babel/traverse@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0.tgz#b1fe9b6567fdf3ab542cfad6f3b31f854d799a61" @@ -742,6 +764,14 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" +"@babel/types@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.2.tgz#183e7952cf6691628afdc2e2b90d03240bac80c0" + dependencies: + esutils "^2.0.2" + lodash "^4.17.10" + to-fast-properties "^2.0.0" + "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" @@ -1310,9 +1340,9 @@ babel-core@^7.0.0-0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" -babel-eslint@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-9.0.0.tgz#7d9445f81ed9f60aff38115f838970df9f2b6220" +babel-eslint@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.1.tgz#919681dc099614cd7d31d45c8908695092a1faed" dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.0.0" @@ -1348,9 +1378,9 @@ babel-jest@^23.6.0: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.2.0" -babel-loader@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.2.tgz#2079b8ec1628284a929241da3d90f5b3de2a5ae5" +babel-loader@^8.0.4: + version "8.0.4" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.4.tgz#7bbf20cbe4560629e2e41534147692d3fecbdce6" dependencies: find-cache-dir "^1.0.0" loader-utils "^1.0.2" @@ -3038,9 +3068,9 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-babel@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-8.0.0.tgz#4f7398ed2772a24a36467d05f25262ab8121e714" +eslint-config-babel@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-8.0.1.tgz#394a1d24aa9f725a2d33c43d33dddd5bdae89f79" eslint-plugin-flowtype@^2.50.1: version "2.50.1" From 8ee857e2682041c1290abcca7839e511685a1d48 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Thu, 11 Oct 2018 11:52:19 -0400 Subject: [PATCH 049/563] v7.1.3 --- lerna.json | 2 +- packages/babel-generator/package.json | 4 ++-- packages/babel-parser/package.json | 2 +- .../babel-plugin-transform-destructuring/package.json | 2 +- .../babel-plugin-transform-modules-systemjs/package.json | 2 +- packages/babel-traverse/package.json | 8 ++++---- packages/babel-types/package.json | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lerna.json b/lerna.json index 24ab7e858105..b16b8dc25cfd 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.11.0", - "version": "7.1.2", + "version": "7.1.3", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-generator/package.json b/packages/babel-generator/package.json index bc9a747cc9a9..d6aa63c96c0f 100644 --- a/packages/babel-generator/package.json +++ b/packages/babel-generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/generator", - "version": "7.1.2", + "version": "7.1.3", "description": "Turns an AST into code.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "lib" ], "dependencies": { - "@babel/types": "^7.1.2", + "@babel/types": "^7.1.3", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index abfa155c110c..a9102d705630 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/parser", - "version": "7.1.2", + "version": "7.1.3", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-plugin-transform-destructuring/package.json b/packages/babel-plugin-transform-destructuring/package.json index 65ff1c86c62e..e8c19251a402 100644 --- a/packages/babel-plugin-transform-destructuring/package.json +++ b/packages/babel-plugin-transform-destructuring/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-destructuring", - "version": "7.1.2", + "version": "7.1.3", "description": "Compile ES2015 destructuring to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-destructuring", "license": "MIT", diff --git a/packages/babel-plugin-transform-modules-systemjs/package.json b/packages/babel-plugin-transform-modules-systemjs/package.json index 0258b460e9c3..ea52c659ec95 100644 --- a/packages/babel-plugin-transform-modules-systemjs/package.json +++ b/packages/babel-plugin-transform-modules-systemjs/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-modules-systemjs", - "version": "7.0.0", + "version": "7.1.3", "description": "This plugin transforms ES2015 modules to SystemJS", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-modules-systemjs", "license": "MIT", diff --git a/packages/babel-traverse/package.json b/packages/babel-traverse/package.json index 9468d832c4c6..59a69eaeb6fc 100644 --- a/packages/babel-traverse/package.json +++ b/packages/babel-traverse/package.json @@ -1,6 +1,6 @@ { "name": "@babel/traverse", - "version": "7.1.0", + "version": "7.1.3", "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,11 +12,11 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.0.0", + "@babel/generator": "^7.1.3", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.1.3", + "@babel/types": "^7.1.3", "debug": "^3.1.0", "globals": "^11.1.0", "lodash": "^4.17.10" diff --git a/packages/babel-types/package.json b/packages/babel-types/package.json index 963dcd70b6c1..05d6f41e409a 100644 --- a/packages/babel-types/package.json +++ b/packages/babel-types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/types", - "version": "7.1.2", + "version": "7.1.3", "description": "Babel Types is a Lodash-esque utility library for AST nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", From 5080059138fbd086a28e1ad43eba99e8e5b432a3 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Thu, 11 Oct 2018 13:32:18 -0400 Subject: [PATCH 050/563] v7.1.4 --- lerna.json | 2 +- packages/babel-traverse/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lerna.json b/lerna.json index b16b8dc25cfd..385f723f20e3 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.11.0", - "version": "7.1.3", + "version": "7.1.4", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-traverse/package.json b/packages/babel-traverse/package.json index 59a69eaeb6fc..34dd6e487f1d 100644 --- a/packages/babel-traverse/package.json +++ b/packages/babel-traverse/package.json @@ -1,6 +1,6 @@ { "name": "@babel/traverse", - "version": "7.1.3", + "version": "7.1.4", "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", From 929567523ca8476fcfcf8d68b7070a242f270034 Mon Sep 17 00:00:00 2001 From: Byron Luk Date: Fri, 12 Oct 2018 07:28:15 -0700 Subject: [PATCH 051/563] Fixes #8865 (#8866) --- packages/babel-parser/src/tokenizer/index.js | 1 + .../directive-line-separator/output.json | 16 +- .../directive-paragraph-separator/output.json | 16 +- .../string-line-separator/output.json | 16 +- .../string-paragraph-separator/output.json | 16 +- yarn.lock | 1339 +++++++++++++++++ 6 files changed, 1372 insertions(+), 32 deletions(-) diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 2b6cc06db3a4..5343b308ee5f 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -1087,6 +1087,7 @@ export default class Tokenizer extends LocationParser { (ch === charCodes.lineSeparator || ch === charCodes.paragraphSeparator) ) { ++this.state.pos; + ++this.state.curLine; } else if (isNewLine(ch)) { this.raise(this.state.start, "Unterminated string constant"); } else { diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/directive-line-separator/output.json b/packages/babel-parser/test/fixtures/experimental/json-strings/directive-line-separator/output.json index 0a597e806399..8bf9f02e8706 100644 --- a/packages/babel-parser/test/fixtures/experimental/json-strings/directive-line-separator/output.json +++ b/packages/babel-parser/test/fixtures/experimental/json-strings/directive-line-separator/output.json @@ -8,7 +8,7 @@ "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 82 } }, @@ -22,7 +22,7 @@ "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 82 } }, @@ -40,7 +40,7 @@ "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 15 } }, @@ -54,7 +54,7 @@ "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 14 } }, @@ -72,11 +72,11 @@ "end": 98, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 82 } } @@ -93,11 +93,11 @@ "end": 98, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 82 } } diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/directive-paragraph-separator/output.json b/packages/babel-parser/test/fixtures/experimental/json-strings/directive-paragraph-separator/output.json index ad5a48a14c37..f83d867447e7 100644 --- a/packages/babel-parser/test/fixtures/experimental/json-strings/directive-paragraph-separator/output.json +++ b/packages/babel-parser/test/fixtures/experimental/json-strings/directive-paragraph-separator/output.json @@ -8,7 +8,7 @@ "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 87 } }, @@ -22,7 +22,7 @@ "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 87 } }, @@ -40,7 +40,7 @@ "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 15 } }, @@ -54,7 +54,7 @@ "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 14 } }, @@ -72,11 +72,11 @@ "end": 103, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 87 } } @@ -93,11 +93,11 @@ "end": 103, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 87 } } diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/string-line-separator/output.json b/packages/babel-parser/test/fixtures/experimental/json-strings/string-line-separator/output.json index 7dde2fc8ab29..388733cc206a 100644 --- a/packages/babel-parser/test/fixtures/experimental/json-strings/string-line-separator/output.json +++ b/packages/babel-parser/test/fixtures/experimental/json-strings/string-line-separator/output.json @@ -8,7 +8,7 @@ "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 83 } }, @@ -22,7 +22,7 @@ "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 83 } }, @@ -39,7 +39,7 @@ "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 17 } }, @@ -53,7 +53,7 @@ "column": 1 }, "end": { - "line": 1, + "line": 2, "column": 15 } }, @@ -73,11 +73,11 @@ "end": 101, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 83 } } @@ -95,11 +95,11 @@ "end": 101, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 83 } } diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/string-paragraph-separator/output.json b/packages/babel-parser/test/fixtures/experimental/json-strings/string-paragraph-separator/output.json index d7dab40405e9..a482ccfb266a 100644 --- a/packages/babel-parser/test/fixtures/experimental/json-strings/string-paragraph-separator/output.json +++ b/packages/babel-parser/test/fixtures/experimental/json-strings/string-paragraph-separator/output.json @@ -8,7 +8,7 @@ "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 88 } }, @@ -22,7 +22,7 @@ "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 88 } }, @@ -39,7 +39,7 @@ "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 17 } }, @@ -53,7 +53,7 @@ "column": 1 }, "end": { - "line": 1, + "line": 2, "column": 15 } }, @@ -73,11 +73,11 @@ "end": 106, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 88 } } @@ -95,11 +95,11 @@ "end": 106, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 88 } } diff --git a/yarn.lock b/yarn.lock index 65e6e7ba4975..1abdf1300e9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,7 @@ "@babel/cli@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.1.2.tgz#fc2853ae96824b3779ca85de4fd025ce3cf62a5e" + integrity sha512-K3WDlpBPGpoW11SLKFEBhMsITomPovsrZ/wnM3y+WStbytukDXC0OBic3yQp+j058QUw0+R/jfx2obwp1fOzcA== dependencies: commander "^2.8.1" convert-source-map "^1.1.0" @@ -21,18 +22,21 @@ "@babel/code-frame@7.0.0-beta.40", "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6" + integrity sha512-eVXQSbu/RimU6OKcK2/gDJVTFcxXJI4sHbIqw2mhwMZeQ2as/8AhS9DGkEDoHMBBNJZ5B0US63lF56x+KDcxiA== dependencies: "@babel/highlight" "7.0.0-beta.40" "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== dependencies: "@babel/highlight" "^7.0.0" "@babel/core@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.2.tgz#f8d2a9ceb6832887329a7b60f9d035791400ba4e" + integrity sha512-IFeSSnjXdhDaoysIlev//UzHZbdEmm7D0EIH2qtse9xK7mXEZQpYjs2P00XlP1qYsYvid79p+Zgg6tz1mp6iVw== dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.1.2" @@ -52,6 +56,7 @@ "@babel/generator@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.40.tgz#ab61f9556f4f71dbd1138949c795bb9a21e302ea" + integrity sha512-c91BQcXyTq/5aFV4afgOionxZS1dxWt8OghEx5Q52SKssdGRFSiMKnk9tGkev1pYULPJBqjSDZU2Pcuc58ffZw== dependencies: "@babel/types" "7.0.0-beta.40" jsesc "^2.5.1" @@ -62,6 +67,7 @@ "@babel/generator@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" + integrity sha512-/BM2vupkpbZXq22l1ALO7MqXJZH2k8bKVv8Y+pABFnzWdztDB/ZLveP5At21vLz5c2YtSE6p7j2FZEsqafMz5Q== dependencies: "@babel/types" "^7.0.0" jsesc "^2.5.1" @@ -72,6 +78,7 @@ "@babel/generator@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.2.tgz#fde75c072575ce7abbd97322e8fef5bae67e4630" + integrity sha512-70A9HWLS/1RHk3Ck8tNHKxOoKQuSKocYgwDN85Pyl/RBduss6AKxUR7RIZ/lzduQMSYfWEM4DDBu6A+XGbkFig== dependencies: "@babel/types" "^7.1.2" jsesc "^2.5.1" @@ -82,12 +89,14 @@ "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== dependencies: "@babel/types" "^7.0.0" "@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" + integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== dependencies: "@babel/helper-explode-assignable-expression" "^7.1.0" "@babel/types" "^7.0.0" @@ -95,6 +104,7 @@ "@babel/helper-call-delegate@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" + integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ== dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/traverse" "^7.1.0" @@ -103,6 +113,7 @@ "@babel/helper-define-map@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" + integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/types" "^7.0.0" @@ -111,6 +122,7 @@ "@babel/helper-explode-assignable-expression@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" + integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== dependencies: "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" @@ -118,6 +130,7 @@ "@babel/helper-function-name@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.40.tgz#9d033341ab16517f40d43a73f2d81fc431ccd7b6" + integrity sha512-cK9BVLtOfisSISTTHXKGvBc2OBh65tjEk4PgXhsSnnH0i8RP2v+5RCxoSlh2y/i+l2fxQqKqv++Qo5RMiwmRCA== dependencies: "@babel/helper-get-function-arity" "7.0.0-beta.40" "@babel/template" "7.0.0-beta.40" @@ -126,6 +139,7 @@ "@babel/helper-function-name@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0.tgz#a68cc8d04420ccc663dd258f9cc41b8261efa2d4" + integrity sha512-Zo+LGvfYp4rMtz84BLF3bavFTdf8y4rJtMPTe2J+rxYmnDOIeH8le++VFI/pRJU+rQhjqiXxE4LMaIau28Tv1Q== dependencies: "@babel/helper-get-function-arity" "^7.0.0" "@babel/template" "^7.0.0" @@ -134,6 +148,7 @@ "@babel/helper-function-name@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== dependencies: "@babel/helper-get-function-arity" "^7.0.0" "@babel/template" "^7.1.0" @@ -142,30 +157,35 @@ "@babel/helper-get-function-arity@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.40.tgz#ac0419cf067b0ec16453e1274f03878195791c6e" + integrity sha512-MwquaPznI4cUoZEgHC/XGkddOXtqKqD4DvZDOyJK2LR9Qi6TbMbAhc6IaFoRX7CRTFCmtGeu8gdXW2dBotBBTA== dependencies: "@babel/types" "7.0.0-beta.40" "@babel/helper-get-function-arity@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== dependencies: "@babel/types" "^7.0.0" "@babel/helper-hoist-variables@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" + integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w== dependencies: "@babel/types" "^7.0.0" "@babel/helper-member-expression-to-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" + integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-imports@7.0.0-beta.35": version "7.0.0-beta.35" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.35.tgz#308e350e731752cdb4d0f058df1d704925c64e0a" + integrity sha512-vaC1KyIZSuyWb3Lj277fX0pxivyHwuDU4xZsofqgYAbkDxNieMg2vuhzP5AgMweMY7fCQUMTi+BgPqTLjkxXFg== dependencies: "@babel/types" "7.0.0-beta.35" lodash "^4.2.0" @@ -173,12 +193,14 @@ "@babel/helper-module-imports@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" + integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" + integrity sha512-0JZRd2yhawo79Rcm4w0LwSMILFmFXjugG3yqf+P/UsKsRS1mJCmMwwlHDlMg7Avr9LrvSpp4ZSULO9r8jpCzcw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" @@ -190,22 +212,26 @@ "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" + integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== dependencies: "@babel/types" "^7.0.0" "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" + integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== "@babel/helper-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" + integrity sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg== dependencies: lodash "^4.17.10" "@babel/helper-remap-async-to-generator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" + integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-wrap-function" "^7.1.0" @@ -216,6 +242,7 @@ "@babel/helper-replace-supers@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" + integrity sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ== dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" @@ -225,6 +252,7 @@ "@babel/helper-simple-access@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" + integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== dependencies: "@babel/template" "^7.1.0" "@babel/types" "^7.0.0" @@ -232,12 +260,14 @@ "@babel/helper-split-export-declaration@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" + integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag== dependencies: "@babel/types" "^7.0.0" "@babel/helper-wrap-function@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" + integrity sha512-R6HU3dete+rwsdAfrOzTlE9Mcpk4RjU3aX3gi9grtmugQY0u79X7eogUvfXA5sI81Mfq1cn6AgxihfN33STjJA== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/template" "^7.1.0" @@ -247,6 +277,7 @@ "@babel/helpers@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.2.tgz#ab752e8c35ef7d39987df4e8586c63b8846234b5" + integrity sha512-Myc3pUE8eswD73aWcartxB16K6CGmHDv9KxOmD2CeOs/FaEAQodr3VYGmlvOmog60vNQ2w8QbatuahepZwrHiA== dependencies: "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.0" @@ -255,6 +286,7 @@ "@babel/highlight@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.40.tgz#b43d67d76bf46e1d10d227f68cddcd263786b255" + integrity sha512-mOhhTrzieV6VO7odgzFGFapiwRK0ei8RZRhfzHhb6cpX3QM8XXuCLXWjN8qBB7JReDdUR80V3LFfFrGUYevhNg== dependencies: chalk "^2.0.0" esutils "^2.0.2" @@ -263,6 +295,7 @@ "@babel/highlight@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== dependencies: chalk "^2.0.0" esutils "^2.0.2" @@ -271,18 +304,22 @@ "@babel/parser@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0.tgz#697655183394facffb063437ddf52c0277698775" + integrity sha512-RgJhNdRinpO8zibnoHbzTTexNs4c8ROkXFBanNDZTLHjwbdLk8J5cJSKulx/bycWTLYmKVNCkxRtVCoJnqPk+g== "@babel/parser@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" + integrity sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg== "@babel/parser@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.2.tgz#85c5c47af6d244fab77bce6b9bd830e38c978409" + integrity sha512-x5HFsW+E/nQalGMw7hu+fvPqnBeBaIr0lWJ2SG0PPL2j+Pm9lYvCrsZJGIgauPIENx0v10INIyFjmSNUD/gSqQ== "@babel/plugin-proposal-async-generator-functions@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" + integrity sha512-Fq803F3Jcxo20MXUSDdmZZXrPe6BWyGcWBPPNB/M7WaUYESKDeKMOGIxEzQOjGSmW/NWb6UaPZrtTB2ekhB/ew== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" @@ -291,6 +328,7 @@ "@babel/plugin-proposal-class-properties@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.1.0.tgz#9af01856b1241db60ec8838d84691aa0bd1e8df4" + integrity sha512-/PCJWN+CKt5v1xcGn4vnuu13QDoV+P7NcICP44BoonAJoPSGwVkgrXihFIQGiEjjPlUDBIw1cM7wYFLARS2/hw== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-member-expression-to-functions" "^7.0.0" @@ -302,6 +340,7 @@ "@babel/plugin-proposal-export-namespace-from@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.0.0.tgz#ce847cc62c3626547107a1b835592b8ee494af51" + integrity sha512-UZuK8lkobh3570vCu0sxDQn+ZlCV6CVLlXe+nNohvPr6/zI5I+j4Ir2fTTCG0ayBQanym0N+29K5+v4c8SATaQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-export-namespace-from" "^7.0.0" @@ -309,6 +348,7 @@ "@babel/plugin-proposal-json-strings@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" + integrity sha512-kfVdUkIAGJIVmHmtS/40i/fg/AGnw/rsZBCaapY5yjeO5RA9m165Xbw9KMOu2nqXP5dTFjEjHdfNdoVcHv133Q== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.0.0" @@ -316,6 +356,7 @@ "@babel/plugin-proposal-numeric-separator@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.0.0.tgz#08aa02ce62481a84bfd0d9ce7a718adaaaa773dd" + integrity sha512-m4iDNpbBv2rTxxgViAeaqLOStc2wrlVAC5ifp6pjBPG29F56LdlPgf5CQYzj99y3kYeKqsyf/dcMx/r+QfwMZg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-numeric-separator" "^7.0.0" @@ -323,6 +364,7 @@ "@babel/plugin-proposal-object-rest-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" + integrity sha512-14fhfoPcNu7itSen7Py1iGN0gEm87hX/B+8nZPqkdmANyyYWYMY2pjA3r8WXbWVKMzfnSNS0xY8GVS0IjXi/iw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.0.0" @@ -330,6 +372,7 @@ "@babel/plugin-proposal-optional-catch-binding@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" + integrity sha512-JPqAvLG1s13B/AuoBjdBYvn38RqW6n1TzrQO839/sIpqLpbnXKacsAgpZHzLD83Sm8SDXMkkrAvEnJ25+0yIpw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" @@ -337,6 +380,7 @@ "@babel/plugin-proposal-unicode-property-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33" + integrity sha512-tM3icA6GhC3ch2SkmSxv7J/hCWKISzwycub6eGsDrFDgukD4dZ/I+x81XgW0YslS6mzNuQ1Cbzh5osjIMgepPQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -345,60 +389,70 @@ "@babel/plugin-syntax-async-generators@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c" + integrity sha512-im7ged00ddGKAjcZgewXmp1vxSZQQywuQXe2B1A7kajjZmDeY/ekMPmWr9zJgveSaQH0k7BcGrojQhcK06l0zA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-class-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0.tgz#e051af5d300cbfbcec4a7476e37a803489881634" + integrity sha512-cR12g0Qzn4sgkjrbrzWy2GE7m9vMl/sFkqZ3gIpAQdrvPDnLM8180i+ANDFIXfjHo9aqp0ccJlQ0QNZcFUbf9w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-export-namespace-from@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.0.0.tgz#17a7389a1d2571ac4d9b77ea2defa74a930edf5d" + integrity sha512-l314XT1eMa0MWboSmG4BdKukHfSpSpQRenUoZmEpL6hqc5nc1/ddpLETjPB77gZE1dZ9qxy5D3U3UUjjcX2d4g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0.tgz#70638aeaad9ee426bc532e51523cff8ff02f6f17" + integrity sha512-zGcuZWiWWDa5qTZ6iAnpG0fnX/GOu49pGR5PFvkQ9GmKNaSphXQnlNXh/LG20sqWtNrx/eB6krzfEzcwvUyeFA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" + integrity sha512-UlSfNydC+XLj4bw7ijpldc1uZ/HB84vw+U6BTuqMdIEmz/LDe63w/GHtpQMdXWdqQZFeAI9PjnHe/vDhwirhKA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-numeric-separator@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.0.0.tgz#9594c7ce6ce8089a14d732cb9f6b1eeb047413ba" + integrity sha512-t9RMUPWsFXVeUZxEOhIDkVqYLi1sWOTjxFBAp8wJtaARilvkGlEQvSObd2W5YKicDktINI9XmdV0sB2FZaLOpw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" + integrity sha512-5A0n4p6bIiVe5OvQPxBnesezsgFJdHhSs3uFSvaPdMqtsovajLZ+G2vZyvNe10EzJBWWo3AcHGKhAFUxqwp2dw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" + integrity sha512-Wc+HVvwjcq5qBg1w5RG9o9RVzmCaAg/Vp0erHCKpAYV8La6I94o4GQAmFYNmkzoMO6gzoOSulpKeSSz6mPEoZw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-arrow-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" + integrity sha512-2EZDBl1WIO/q4DIkIp4s86sdp4ZifL51MoIviLY/gG/mLSuOIEg7J8o6mhbxOTvUJkaN50n+8u41FVsr5KLy/w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-async-to-generator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" + integrity sha512-rNmcmoQ78IrvNCIt/R9U+cixUHeYAzgusTFgIAv+wQb9HJU4szhpDD6e5GCACmj/JP5KxuCwM96bX3L9v4ZN/g== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -407,12 +461,14 @@ "@babel/plugin-transform-block-scoped-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" + integrity sha512-AOBiyUp7vYTqz2Jibe1UaAWL0Hl9JUXEgjFvvvcSc9MVDItv46ViXFw2F7SVt1B5k+KWjl44eeXOAk3UDEaJjQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-block-scoping@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" + integrity sha512-GWEMCrmHQcYWISilUrk9GDqH4enf3UmhOEbNbNrlNAX1ssH3MsS1xLOS6rdjRVPgA7XXVPn87tRkdTEoA/dxEg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" @@ -420,6 +476,7 @@ "@babel/plugin-transform-classes@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" + integrity sha512-rNaqoD+4OCBZjM7VaskladgqnZ1LO6o2UxuWSDzljzW21pN1KXkB7BstAVweZdxQkHAujps5QMNOTWesBciKFg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.1.0" @@ -433,18 +490,21 @@ "@babel/plugin-transform-computed-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" + integrity sha512-ubouZdChNAv4AAWAgU7QKbB93NU5sHwInEWfp+/OzJKA02E6Woh9RVoX4sZrbRwtybky/d7baTUqwFx+HgbvMA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0.tgz#68e911e1935dda2f06b6ccbbf184ffb024e9d43a" + integrity sha512-Fr2GtF8YJSXGTyFPakPFB4ODaEKGU04bPsAllAIabwoXdFrPxL0LVXQX5dQWoxOjjgozarJcC9eWGsj0fD6Zsg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-dotall-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58" + integrity sha512-00THs8eJxOJUFVx1w8i1MBF4XH4PsAjKjQ1eqN/uCH3YKwP21GCKfrn6YZFZswbOk9+0cw1zGQPHVc1KBlSxig== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -453,12 +513,14 @@ "@babel/plugin-transform-duplicate-keys@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86" + integrity sha512-w2vfPkMqRkdxx+C71ATLJG30PpwtTpW7DDdLqYt2acXU7YjztzeWW2Jk1T6hKqCLYCcEA5UQM/+xTAm+QCSnuQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-exponentiation-operator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" + integrity sha512-uZt9kD1Pp/JubkukOGQml9tqAeI8NkE98oZnHZ2qHRElmeKCodbTZgOEUtujSCSLhHSBWbzNiFSDIMC4/RBTLQ== dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -466,6 +528,7 @@ "@babel/plugin-transform-flow-strip-types@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.0.0.tgz#c40ced34c2783985d90d9f9ac77a13e6fb396a01" + integrity sha512-WhXUNb4It5a19RsgKKbQPrjmy4yWOY1KynpEbNw7bnd1QTcrT/EIl3MJvnGgpgvrKyKbqX7nUNOJfkpLOnoDKA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-flow" "^7.0.0" @@ -473,12 +536,14 @@ "@babel/plugin-transform-for-of@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" + integrity sha512-TlxKecN20X2tt2UEr2LNE6aqA0oPeMT1Y3cgz8k4Dn1j5ObT8M3nl9aA37LLklx0PBZKETC9ZAf9n/6SujTuXA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" + integrity sha512-VxOa1TMlFMtqPW2IDYZQaHsFrq/dDoIjgN098NowhexhZcz3UGlvPgZXuE1jEvNygyWyxRacqDpCZt+par1FNg== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -486,12 +551,14 @@ "@babel/plugin-transform-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" + integrity sha512-1NTDBWkeNXgpUcyoVFxbr9hS57EpZYXpje92zv0SUzjdu3enaRwF/l3cmyRnXLtIdyJASyiS6PtybK+CgKf7jA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-amd@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" + integrity sha512-wt8P+xQ85rrnGNr2x1iV3DW32W8zrB6ctuBkYBbf5/ZzJY99Ob4MFgsZDFgczNU76iy9PWsy4EuxOliDjdKw6A== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -499,6 +566,7 @@ "@babel/plugin-transform-modules-commonjs@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" + integrity sha512-wtNwtMjn1XGwM0AXPspQgvmE6msSJP15CX2RVfpTSTNPLhKhaOjaIfBaVfj4iUZ/VrFSodcFedwtPg/NxwQlPA== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -507,6 +575,7 @@ "@babel/plugin-transform-modules-systemjs@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0.tgz#8873d876d4fee23209decc4d1feab8f198cf2df4" + integrity sha512-8EDKMAsitLkiF/D4Zhe9CHEE2XLh4bfLbb9/Zf3FgXYQOZyZYyg7EAel/aT2A7bHv62jwHf09q2KU/oEexr83g== dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -514,6 +583,7 @@ "@babel/plugin-transform-modules-umd@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" + integrity sha512-enrRtn5TfRhMmbRwm7F8qOj0qEYByqUvTttPEGimcBH4CJHphjyK1Vg7sdU7JjeEmgSpM890IT/efS2nMHwYig== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -521,12 +591,14 @@ "@babel/plugin-transform-new-target@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" + integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-object-super@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" + integrity sha512-/O02Je1CRTSk2SSJaq0xjwQ8hG4zhZGNjE8psTsSNPXyLRCODv7/PBozqT5AmQMzp7MI3ndvMhGdqp9c96tTEw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.1.0" @@ -534,6 +606,7 @@ "@babel/plugin-transform-parameters@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" + integrity sha512-vHV7oxkEJ8IHxTfRr3hNGzV446GAb+0hgbA7o/0Jd76s+YzccdWuTU296FOCOl/xweU4t/Ya4g41yWz80RFCRw== dependencies: "@babel/helper-call-delegate" "^7.1.0" "@babel/helper-get-function-arity" "^7.0.0" @@ -542,12 +615,14 @@ "@babel/plugin-transform-regenerator@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" + integrity sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw== dependencies: regenerator-transform "^0.13.3" "@babel/plugin-transform-runtime@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.1.0.tgz#9f76920d42551bb577e2dc594df229b5f7624b63" + integrity sha512-WFLMgzu5DLQEah0lKTJzYb14vd6UiES7PTnXcvrPZ1VrwFeJ+mTbvr65fFAsXYMt2bIoOoC0jk76zY1S7HZjUg== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -557,18 +632,21 @@ "@babel/plugin-transform-shorthand-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" + integrity sha512-g/99LI4vm5iOf5r1Gdxq5Xmu91zvjhEG5+yZDJW268AZELAu4J1EiFLnkSG3yuUsZyOipVOVUKoGPYwfsTymhw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" + integrity sha512-L702YFy2EvirrR4shTj0g2xQp7aNwZoWNCkNu2mcoU0uyzMl0XRwDSwzB/xp6DSUFiBmEXuyAyEN16LsgVqGGQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-sticky-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" + integrity sha512-LFUToxiyS/WD+XEWpkx/XJBrUXKewSZpzX68s+yEOtIbdnsRjpryDw9U06gYc6klYEij/+KQVRnD3nz3AoKmjw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -576,6 +654,7 @@ "@babel/plugin-transform-template-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" + integrity sha512-vA6rkTCabRZu7Nbl9DfLZE1imj4tzdWcg5vtdQGvj+OH9itNNB6hxuRMHuIY8SGnEt1T9g5foqs9LnrHzsqEFg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -583,12 +662,14 @@ "@babel/plugin-transform-typeof-symbol@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9" + integrity sha512-1r1X5DO78WnaAIvs5uC48t41LLckxsYklJrZjNKcevyz83sF2l4RHbw29qrCPr/6ksFsdfRpT/ZgxNWHXRnffg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-unicode-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" + integrity sha512-uJBrJhBOEa3D033P95nPHu3nbFwFE9ZgXsfEitzoIXIwqAZWk7uXcg06yFKXz9FSxBH5ucgU/cYdX0IV8ldHKw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -597,6 +678,7 @@ "@babel/preset-env@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.0.tgz#e67ea5b0441cfeab1d6f41e9b5c79798800e8d11" + integrity sha512-ZLVSynfAoDHB/34A17/JCZbyrzbQj59QC1Anyueb4Bwjh373nVPq5/HMph0z+tCmcDjXDe+DlKQq9ywQuvWrQg== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -643,6 +725,7 @@ "@babel/preset-flow@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.0.0.tgz#afd764835d9535ec63d8c7d4caf1c06457263da2" + integrity sha512-bJOHrYOPqJZCkPVbG1Lot2r5OSsB+iUOaxiHdlOeB1yPWS6evswVHwvkDLZ54WTaTRIk89ds0iHmGZSnxlPejQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types" "^7.0.0" @@ -650,6 +733,7 @@ "@babel/register@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827" + integrity sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g== dependencies: core-js "^2.5.7" find-cache-dir "^1.0.0" @@ -662,12 +746,14 @@ "@babel/runtime@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.2.tgz#81c89935f4647706fc54541145e6b4ecfef4b8e3" + integrity sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg== dependencies: regenerator-runtime "^0.12.0" "@babel/template@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.40.tgz#034988c6424eb5c3268fe6a608626de1f4410fc8" + integrity sha512-RlQiVB7eL7fxsKN6JvnCCwEwEL28CBYalXSgWWULuFlEHjtMoXBqQanSie3bNyhrANJx67sb+Sd/vuGivoMwLQ== dependencies: "@babel/code-frame" "7.0.0-beta.40" "@babel/types" "7.0.0-beta.40" @@ -677,6 +763,7 @@ "@babel/template@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0.tgz#c2bc9870405959c89a9c814376a2ecb247838c80" + integrity sha512-VLQZik/G5mjYJ6u19U3W2u7eM+rA/NGzH+GtHDFFkLTKLW66OasFrxZ/yK7hkyQcswrmvugFyZpDFRW0DjcjCw== dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.0.0" @@ -685,6 +772,7 @@ "@babel/template@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.0.tgz#58cc9572e1bfe24fe1537fdf99d839d53e517e22" + integrity sha512-yZ948B/pJrwWGY6VxG6XRFsVTee3IQ7bihq9zFpM00Vydu6z5Xwg0C3J644kxI9WOTzd+62xcIsQ+AT1MGhqhA== dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.1.0" @@ -693,6 +781,7 @@ "@babel/template@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" + integrity sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag== dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.1.2" @@ -701,6 +790,7 @@ "@babel/traverse@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0.tgz#b1fe9b6567fdf3ab542cfad6f3b31f854d799a61" + integrity sha512-ka/lwaonJZTlJyn97C4g5FYjPOx+Oxd3ab05hbDr1Mx9aP1FclJ+SUHyLx3Tx40sGmOVJApDxE6puJhd3ld2kw== dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.0.0" @@ -715,6 +805,7 @@ "@babel/traverse@^7.0.0-beta.31": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.40.tgz#d140e449b2e093ef9fe1a2eecc28421ffb4e521e" + integrity sha512-h96SQorjvdSuxQ6hHFIuAa3oxnad1TA5bU1Zz88+XqzwmM5QM0/k2D+heXGGy/76gT5ajl7xYLKGiPA/KTyVhQ== dependencies: "@babel/code-frame" "7.0.0-beta.40" "@babel/generator" "7.0.0-beta.40" @@ -729,6 +820,7 @@ "@babel/traverse@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2" + integrity sha512-bwgln0FsMoxm3pLOgrrnGaXk18sSM9JNf1/nHC/FksmNGFbYnPWY4GYCfLxyP1KRmfsxqkRpfoa6xr6VuuSxdw== dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.0.0" @@ -743,6 +835,7 @@ "@babel/types@7.0.0-beta.35": version "7.0.0-beta.35" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.35.tgz#cf933a9a9a38484ca724b335b88d83726d5ab960" + integrity sha512-y9XT11CozHDgjWcTdxmhSj13rJVXpa5ZXwjjOiTedjaM0ba5ItqdS02t31EhPl7HtOWxsZkYCCUNrSfrOisA6w== dependencies: esutils "^2.0.2" lodash "^4.2.0" @@ -751,6 +844,7 @@ "@babel/types@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.40.tgz#25c3d7aae14126abe05fcb098c65a66b6d6b8c14" + integrity sha512-uXCGCzTgMZxcSUzutCPtZmXbVC+cvENgS2e0tRuhn+Y1hZnMb8IHP0Trq7Q2MB/eFmG5pKrAeTIUfQIe5kA4Tg== dependencies: esutils "^2.0.2" lodash "^4.2.0" @@ -759,6 +853,7 @@ "@babel/types@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" + integrity sha512-5tPDap4bGKTLPtci2SUl/B7Gv8RnuJFuQoWx26RJobS0fFrz4reUA3JnwIM+HVHEmWE0C1mzKhDtTp8NsWY02Q== dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -767,6 +862,7 @@ "@babel/types@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.2.tgz#183e7952cf6691628afdc2e2b90d03240bac80c0" + integrity sha512-pb1I05sZEKiSlMUV9UReaqsCPUpgbHHHu2n1piRm7JkuBkm6QxcaIzKu6FMnMtCbih/cEYTR+RGYYC96Yk9HAg== dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -775,26 +871,31 @@ "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" + integrity sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg== dependencies: any-observable "^0.3.0" "@types/acorn@^4.0.2": version "4.0.3" resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.3.tgz#d1f3e738dde52536f9aad3d3380d14e448820afd" + integrity sha512-gou/kWQkGPMZjdCKNZGDpqxLm9+ErG/pFZKPX4tvCjr0Xf4FCYYX3nAsu7aDVKJV3KUe27+mvqqyWT/9VZoM/A== dependencies: "@types/estree" "*" "@types/cheerio@^0.22.1": version "0.22.7" resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.7.tgz#4a92eafedfb2b9f4437d3a4410006d81114c66ce" + integrity sha512-+T9qBbqe/jXtTjzVddArZExahoPPmt8eq3O1ZuCKZXjBVxf/ciUYNXrIDZJEVgYvpELnv6VlPRCfLzufRxpAag== "@types/debug@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/debug/-/debug-0.0.29.tgz#a1e514adfbd92f03a224ba54d693111dbf1f3754" + integrity sha1-oeUUrfvZLwOiJLpU1pMRHb8fN1Q= "@types/enhanced-resolve@^3.0.3": version "3.0.4" resolved "https://registry.yarnpkg.com/@types/enhanced-resolve/-/enhanced-resolve-3.0.4.tgz#d93cb91b0b14dbcba0f45948bed73db9456697c2" + integrity sha512-9U7tNrgoeLqvBYaqhGMlXxq2ChZwAjy3HJVmPwfZLng8QDp8MAfBtGNKTN70HobZuIxZNS6TH/4u4hDqqPY6lQ== dependencies: "@types/node" "*" "@types/tapable" "*" @@ -802,44 +903,54 @@ "@types/escape-string-regexp@^0.0.30": version "0.0.30" resolved "https://registry.yarnpkg.com/@types/escape-string-regexp/-/escape-string-regexp-0.0.30.tgz#8cfaf0b5d2e46943d6efd77d3f4d18bfa1c9f225" + integrity sha1-jPrwtdLkaUPW79d9P00Yv6HJ8iU= "@types/estree@*": version "0.0.38" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.38.tgz#c1be40aa933723c608820a99a373a16d215a1ca2" + integrity sha512-F/v7t1LwS4vnXuPooJQGBRKRGIoxWUTmA4VHfqjOccFsNDThD5bfUNpITive6s352O7o384wcpEaDV8rHCehDA== "@types/estree@0.0.35": version "0.0.35" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.35.tgz#8999974b34028686a8d61a719e61c138d3755107" + integrity sha1-iZmXSzQChoao1hpxnmHBONN1UQc= "@types/lodash@^4.14.67": version "4.14.104" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" + integrity sha512-ufQcVg4daO8xQ5kopxRHanqFdL4AI7ondQkV+2f+7mz3gvp0LkBx2zBRC6hfs3T87mzQFmf5Fck7Fi145Ul6NQ== "@types/node@*": version "9.4.6" resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e" + integrity sha512-CTUtLb6WqCCgp6P59QintjHWqzf4VL1uPA27bipLAPxFqrtK1gEYllePzTICGqQ8rYsCbpnsNypXjjDzGAAjEQ== "@types/node@^8.0.0": version "8.9.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48" + integrity sha512-dSvD36qnQs78G1BPsrZFdPpvLgMW/dnvr5+nTW2csMs5TiP9MOXrjUbnMZOEwnIuBklXtn7b6TPA2Cuq07bDHA== "@types/semver@^5.3.32": version "5.5.0" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" + integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== "@types/tapable@*": version "0.2.4" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-0.2.4.tgz#8181a228da46185439300e600c5ae3b3b3982585" + integrity sha512-pclMAvhPnXJcJu1ZZ8bQthuUcdDWzDuxDdbSf6l1U6s4fP6EBiZpPsOZYqFOrbqDV97sXGFSsb6AUpiLfv4xIA== "@types/uglify-js@*": version "2.6.30" resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-2.6.30.tgz#257d2b6dd86673d60da476680fba90f2e30c6eef" + integrity sha512-NjiBNGFl58vHJeijl63w1fWRIjLnrfOvimsXF5b3lTzEzkTV1BnVsbqQeLejg54upsHPWIF63aiub5TEwH619A== dependencies: source-map "^0.6.1" "@types/webpack@^3.0.0": version "3.8.8" resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-3.8.8.tgz#fd9483edf2d6935eaab52aa530b1f737c188cd9a" + integrity sha512-pZxQOJR7NvRn913/hklPmmVjG4cCjyz6WmhIEtqJYGjjG2MXpBIlFAsq+wXXZslJLBdMiIzUAIt53u9fhU9prA== dependencies: "@types/node" "*" "@types/tapable" "*" @@ -849,6 +960,7 @@ JSONStream@^1.0.3, JSONStream@^1.0.4: version "1.3.2" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" + integrity sha1-wQI3G27Dp887hHygDCC7D85Mbeo= dependencies: jsonparse "^1.2.0" through ">=2.2.7 <3" @@ -856,38 +968,45 @@ JSONStream@^1.0.3, JSONStream@^1.0.4: abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + integrity sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4= abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== acorn-dynamic-import@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz#c752bd210bef679501b6c6cb7fc84f8f47158cc4" + integrity sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ= dependencies: acorn "^4.0.3" acorn-dynamic-import@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" + integrity sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg== dependencies: acorn "^5.0.0" acorn-globals@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" + integrity sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ== dependencies: acorn "^5.0.0" acorn-jsx@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" + integrity sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw== dependencies: acorn "^5.0.3" acorn-node@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.3.0.tgz#5f86d73346743810ef1269b901dbcbded020861b" + integrity sha512-efP54n3d1aLfjL2UMdaXa6DsswwzJeI5rqhbFvXMrKiJ6eJFpf+7R0zN7t8IC+XKn2YOAFAv6xbBNgHUkoHWLw== dependencies: acorn "^5.4.1" xtend "^4.0.1" @@ -895,6 +1014,7 @@ acorn-node@^1.2.0: acorn-node@^1.3.0: version "1.5.2" resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.5.2.tgz#2ca723df19d997b05824b69f6c7fb091fc42c322" + integrity sha512-krFKvw/d1F17AN3XZbybIUzEY4YEPNiGo05AfP3dBlfVKrMHETKpgjpuZkSF8qDNt9UkQcqj7am8yJLseklCMg== dependencies: acorn "^5.7.1" acorn-dynamic-import "^3.0.0" @@ -903,30 +1023,37 @@ acorn-node@^1.3.0: acorn@^4.0.3: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + integrity sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c= acorn@^5.0.0, acorn@^5.0.3, acorn@^5.3.0, acorn@^5.4.1: version "5.5.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.0.tgz#1abb587fbf051f94e3de20e6b26ef910b1828298" + integrity sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g== acorn@^5.6.0, acorn@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" + integrity sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ== add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" + integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= ajv-keywords@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" + integrity sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo= ajv-keywords@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" + integrity sha1-rCsnk5xUPpXSwG5/f1wnvkqlQ74= ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY= dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -934,6 +1061,7 @@ ajv@^4.9.1: ajv@^5.1.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" @@ -943,6 +1071,7 @@ ajv@^5.1.0: ajv@^6.0.1: version "6.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" + integrity sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -952,6 +1081,7 @@ ajv@^6.0.1: ajv@^6.1.0: version "6.2.1" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.2.1.tgz#28a6abc493a2abe0fb4c8507acaedb43fa550671" + integrity sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE= dependencies: fast-deep-equal "^1.0.0" fast-json-stable-stringify "^2.0.0" @@ -960,6 +1090,7 @@ ajv@^6.1.0: ajv@^6.5.3: version "6.5.4" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.4.tgz#247d5274110db653706b550fcc2b797ca28cfc59" + integrity sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -969,6 +1100,7 @@ ajv@^6.5.3: align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= dependencies: kind-of "^3.0.2" longest "^1.0.1" @@ -977,68 +1109,82 @@ align-text@^0.1.1, align-text@^0.1.3: amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= ansi-colors@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" + integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== dependencies: ansi-wrap "^0.1.0" ansi-cyan@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" + integrity sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM= dependencies: ansi-wrap "0.1.0" ansi-escapes@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + integrity sha1-06ioOzGapneTZisT52HHkRQiMG4= ansi-escapes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" + integrity sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ== ansi-gray@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" + integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= dependencies: ansi-wrap "0.1.0" ansi-red@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" + integrity sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw= dependencies: ansi-wrap "0.1.0" ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= any-observable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" + integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== anymatch@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== dependencies: micromatch "^2.1.5" normalize-path "^2.0.0" @@ -1046,6 +1192,7 @@ anymatch@^1.3.0: anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== dependencies: micromatch "^3.1.4" normalize-path "^2.1.1" @@ -1053,26 +1200,31 @@ anymatch@^2.0.0: append-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" + integrity sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE= dependencies: buffer-equal "^1.0.0" append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" + integrity sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw== dependencies: default-require-extensions "^2.0.0" aproba@^1.0.3: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== archy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= are-we-there-yet@~1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + integrity sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0= dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -1080,12 +1232,14 @@ are-we-there-yet@~1.1.2: argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" arr-diff@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a" + integrity sha1-aHwydYFjWI/vfeezb6vklesaOZo= dependencies: arr-flatten "^1.0.1" array-slice "^0.2.3" @@ -1093,64 +1247,78 @@ arr-diff@^1.0.1: arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= dependencies: arr-flatten "^1.0.1" arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= arr-filter@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/arr-filter/-/arr-filter-1.1.2.tgz#43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee" + integrity sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4= dependencies: make-iterator "^1.0.0" arr-flatten@^1.0.1, arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== arr-map@^2.0.0, arr-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/arr-map/-/arr-map-2.0.2.tgz#3a77345ffc1cf35e2a91825601f9e58f2e24cac4" + integrity sha1-Onc0X/wc814qkYJWAfnljy4kysQ= dependencies: make-iterator "^1.0.0" arr-union@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d" + integrity sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0= arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= array-differ@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + integrity sha1-7/UuN1gknTO+QCuLuOVkuytdQDE= array-each@^1.0.0, array-each@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" + integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= array-filter@~0.0.0: version "0.0.1" resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" + integrity sha1-fajPLiZijtcygDWB/SH2fKzS7uw= array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= array-initial@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" + integrity sha1-L6dLJnOTccOUe9enrcc74zSz15U= dependencies: array-slice "^1.0.0" is-number "^4.0.0" @@ -1158,28 +1326,34 @@ array-initial@^1.0.0: array-last@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/array-last/-/array-last-1.3.0.tgz#7aa77073fec565ddab2493f5f88185f404a9d336" + integrity sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg== dependencies: is-number "^4.0.0" array-map@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" + integrity sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI= array-reduce@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" + integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= array-slice@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" + integrity sha1-3Tz7gO15c6dRF82sabC5nshhhvU= array-slice@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" + integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== array-sort@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== dependencies: default-compare "^1.0.0" get-value "^2.0.6" @@ -1188,28 +1362,34 @@ array-sort@^1.0.0: array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= dependencies: array-uniq "^1.0.1" array-uniq@^1.0.1, array-uniq@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= asn1.js@^4.0.0: version "4.10.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== dependencies: bn.js "^4.0.0" inherits "^2.0.1" @@ -1218,42 +1398,51 @@ asn1.js@^4.0.0: asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + integrity sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y= assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + integrity sha1-104bh+ev/A24qttwIfP+SBAasjQ= assert@^1.1.1, assert@^1.4.0: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" + integrity sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE= dependencies: util "0.10.3" assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= ast-types@0.9.6: version "0.9.6" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.6.tgz#102c9e9e9005d3e7e3829bf0c4fa24ee862ee9b9" + integrity sha1-ECyenpAF0+fjgpvwxPok7oYu6bk= astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== astw@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/astw/-/astw-2.2.0.tgz#7bd41784d32493987aeb239b6b4e1c57a873b917" + integrity sha1-e9QXhNMkk5h66yOba04cV6hzuRc= dependencies: acorn "^4.0.3" async-done@^1.2.0, async-done@^1.2.2: version "1.2.4" resolved "https://registry.yarnpkg.com/async-done/-/async-done-1.2.4.tgz#17b0fcefb9a33cb9de63daa8904c0a65bd535fa0" + integrity sha512-mxc+yISkb0vjsuvG3dJCIZXzRWjKndQ9Zo9zNDJ1K2wh9eP0E0oGmOWm+4cFOvW4dA0tGFImTW5tQJHCtn1kIQ== dependencies: end-of-stream "^1.1.0" once "^1.3.2" @@ -1263,50 +1452,61 @@ async-done@^1.2.0, async-done@^1.2.2: async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + integrity sha1-GdOGodntxufByF04iu28xW0zYC0= async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== async-settle@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b" + integrity sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs= dependencies: async-done "^1.2.2" async@^1.4.0, async@^1.5.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= async@^2.1.2, async@^2.1.4: version "2.6.0" resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" + integrity sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw== dependencies: lodash "^4.14.0" asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= atob@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/atob/-/atob-2.0.3.tgz#19c7a760473774468f20b2d2d03372ad7d4cbf5d" + integrity sha1-GcenYEc3dEaPILLS0DNyrX1Mv10= aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + integrity sha1-FDQt0428yU0OW4fXY81jYSwOeU8= aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.2.1, aws4@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + integrity sha1-g+9cqGCysy5KDe7e6MdxudtXRx4= babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= dependencies: chalk "^1.1.3" esutils "^2.0.2" @@ -1315,6 +1515,7 @@ babel-code-frame@^6.26.0: babel-core@^6.0.0, babel-core@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + integrity sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g= dependencies: babel-code-frame "^6.26.0" babel-generator "^6.26.0" @@ -1339,10 +1540,12 @@ babel-core@^6.0.0, babel-core@^6.26.0: babel-core@^7.0.0-0: version "7.0.0-bridge.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" + integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== babel-eslint@^10.0.1: version "10.0.1" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.1.tgz#919681dc099614cd7d31d45c8908695092a1faed" + integrity sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ== dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.0.0" @@ -1354,6 +1557,7 @@ babel-eslint@^10.0.1: babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" @@ -1367,6 +1571,7 @@ babel-generator@^6.18.0, babel-generator@^6.26.0: babel-helpers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" @@ -1374,6 +1579,7 @@ babel-helpers@^6.24.1: babel-jest@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" + integrity sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew== dependencies: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.2.0" @@ -1381,6 +1587,7 @@ babel-jest@^23.6.0: babel-loader@^8.0.4: version "8.0.4" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.4.tgz#7bbf20cbe4560629e2e41534147692d3fecbdce6" + integrity sha512-fhBhNkUToJcW9nV46v8w87AJOwAJDz84c1CL57n3Stj73FANM/b9TbCUK4YhdOwEyZ+OxhYpdeZDNzSI29Firw== dependencies: find-cache-dir "^1.0.0" loader-utils "^1.0.2" @@ -1390,12 +1597,14 @@ babel-loader@^8.0.4: babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= dependencies: babel-runtime "^6.22.0" babel-plugin-istanbul@^4.1.6: version "4.1.6" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" + integrity sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ== dependencies: babel-plugin-syntax-object-rest-spread "^6.13.0" find-up "^2.1.0" @@ -1405,14 +1614,17 @@ babel-plugin-istanbul@^4.1.6: babel-plugin-jest-hoist@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" + integrity sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc= babel-plugin-syntax-object-rest-spread@^6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= babel-plugin-transform-charcodes@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-charcodes/-/babel-plugin-transform-charcodes-0.1.0.tgz#c71b301019c90615b940faf0f15f275ec5c81a3d" + integrity sha512-RUBYwMpIEAnQeIgE03DCn8JViDIPkwO6+0uHU4fgou4I/U5ml/zsa7xJ8KqTPVBAKvJAV2cFGoc4W/t8q1Zntg== dependencies: "@babel/traverse" "^7.0.0-beta.31" babylon "^7.0.0-beta.31" @@ -1420,6 +1632,7 @@ babel-plugin-transform-charcodes@^0.1.0: babel-preset-jest@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" + integrity sha1-jsegOhOPABoaj7HoETZSvxpV2kY= dependencies: babel-plugin-jest-hoist "^23.2.0" babel-plugin-syntax-object-rest-spread "^6.13.0" @@ -1427,6 +1640,7 @@ babel-preset-jest@^23.2.0: babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= dependencies: babel-core "^6.26.0" babel-runtime "^6.26.0" @@ -1439,6 +1653,7 @@ babel-register@^6.26.0: babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" @@ -1446,6 +1661,7 @@ babel-runtime@^6.22.0, babel-runtime@^6.26.0: babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= dependencies: babel-runtime "^6.26.0" babel-traverse "^6.26.0" @@ -1456,6 +1672,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= dependencies: babel-code-frame "^6.26.0" babel-messages "^6.23.0" @@ -1470,6 +1687,7 @@ babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= dependencies: babel-runtime "^6.26.0" esutils "^2.0.2" @@ -1479,14 +1697,17 @@ babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: babylon@7.0.0-beta.40, babylon@^7.0.0-beta.31: version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.40.tgz#91fc8cd56d5eb98b28e6fde41045f2957779940a" + integrity sha512-AVxF2EcxvGD5hhOuLTOLAXBb0VhwWpEX0HyHdAI2zU+AAP4qEwtQj8voz1JR3uclGai0rfcE+dCTHnNMOnimFg== babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== bach@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880" + integrity sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA= dependencies: arr-filter "^1.1.1" arr-flatten "^1.0.1" @@ -1501,14 +1722,17 @@ bach@^1.0.0: balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base64-js@^1.0.2: version "1.2.3" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.3.tgz#fb13668233d9614cf5fb4bce95a9ba4096cdf801" + integrity sha512-MsAhsUW1GxCdgYSO6tAfZrNapmUKk7mWx/k5mFY/A1gBtkaCaNapTg+FExCw1r9yeaZhqx/xPg43xgTFH6KL5w== base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== dependencies: cache-base "^1.0.1" class-utils "^0.3.5" @@ -1521,62 +1745,74 @@ base@^0.11.1: bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + integrity sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40= dependencies: tweetnacl "^0.14.3" beeper@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + integrity sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak= big.js@^3.1.3: version "3.2.0" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== binary-extensions@^1.0.0: version "1.11.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + integrity sha1-RqoXUftqL5PuXmibsQh9SxTGwgU= bl@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.1.tgz#cac328f7bee45730d404b692203fcb590e172d5e" + integrity sha1-ysMo977kVzDUBLaSID/LWQ4XLV4= dependencies: readable-stream "^2.0.5" block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + integrity sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= dependencies: inherits "~2.0.0" bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== boolbase@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + integrity sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8= dependencies: hoek "2.x.x" boom@4.x.x: version "4.3.1" resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" + integrity sha1-T4owBctKfjiJ90kDD9JbluAdLjE= dependencies: hoek "4.x.x" boom@5.x.x: version "5.2.0" resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" + integrity sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw== dependencies: hoek "4.x.x" brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" @@ -1584,6 +1820,7 @@ brace-expansion@^1.1.7: braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= dependencies: expand-range "^1.8.1" preserve "^0.2.0" @@ -1592,6 +1829,7 @@ braces@^1.8.2: braces@^2.3.0, braces@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" + integrity sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ== dependencies: arr-flatten "^1.1.0" array-unique "^0.3.2" @@ -1609,10 +1847,12 @@ braces@^2.3.0, braces@^2.3.1: brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= browser-pack@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-5.0.1.tgz#4197719b20c6e0aaa09451c5111e53efb6fbc18d" + integrity sha1-QZdxmyDG4KqglFHFER5T77b7wY0= dependencies: JSONStream "^1.0.3" combine-source-map "~0.6.1" @@ -1623,6 +1863,7 @@ browser-pack@^5.0.1: browser-pack@^6.0.1: version "6.0.4" resolved "https://registry.yarnpkg.com/browser-pack/-/browser-pack-6.0.4.tgz#9a73beb3b48f9e36868be007b64400102c04a99f" + integrity sha512-Q4Rvn7P6ObyWfc4stqLWHtG1MJ8vVtjgT24Zbu+8UTzxYuZouqZsmNRRTFVMY/Ux0eIKv1d+JWzsInTX+fdHPQ== dependencies: JSONStream "^1.0.3" combine-source-map "~0.8.0" @@ -1634,22 +1875,26 @@ browser-pack@^6.0.1: browser-process-hrtime@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" + integrity sha1-Ql1opY00R/AqBKqJQYf86K+Le44= browser-resolve@^1.11.0, browser-resolve@^1.7.0: version "1.11.2" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + integrity sha1-j/CbCixCFxihBRwmCzLkj0QpOM4= dependencies: resolve "1.1.7" browser-resolve@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== dependencies: resolve "1.1.7" browser-unpack@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/browser-unpack/-/browser-unpack-1.2.0.tgz#357aee31fc467831684d063e4355e070a782970d" + integrity sha1-NXruMfxGeDFoTQY+Q1XgcKeClw0= dependencies: acorn "^4.0.3" browser-pack "^5.0.1" @@ -1659,6 +1904,7 @@ browser-unpack@^1.1.0: browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.1.1" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f" + integrity sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg== dependencies: buffer-xor "^1.0.3" cipher-base "^1.0.0" @@ -1670,6 +1916,7 @@ browserify-aes@^1.0.0, browserify-aes@^1.0.4: browserify-cipher@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.0.tgz#9988244874bf5ed4e28da95666dcd66ac8fc363a" + integrity sha1-mYgkSHS/XtTijalWZtzWasj8Njo= dependencies: browserify-aes "^1.0.4" browserify-des "^1.0.0" @@ -1678,6 +1925,7 @@ browserify-cipher@^1.0.0: browserify-des@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.0.tgz#daa277717470922ed2fe18594118a175439721dd" + integrity sha1-2qJ3cXRwki7S/hhZQRihdUOXId0= dependencies: cipher-base "^1.0.1" des.js "^1.0.0" @@ -1686,6 +1934,7 @@ browserify-des@^1.0.0: browserify-rsa@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= dependencies: bn.js "^4.1.0" randombytes "^2.0.1" @@ -1693,6 +1942,7 @@ browserify-rsa@^4.0.0: browserify-sign@^4.0.0: version "4.0.4" resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= dependencies: bn.js "^4.1.1" browserify-rsa "^4.0.0" @@ -1705,12 +1955,14 @@ browserify-sign@^4.0.0: browserify-zlib@^0.2.0, browserify-zlib@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== dependencies: pako "~1.0.5" browserify@^16.2.2: version "16.2.2" resolved "https://registry.yarnpkg.com/browserify/-/browserify-16.2.2.tgz#4b1f66ba0e54fa39dbc5aa4be9629142143d91b0" + integrity sha512-fMES05wq1Oukts6ksGUU2TMVHHp06LyQt0SIwbXIHm7waSrQmNBZePsU0iM/4f94zbvb/wHma+D1YrdzWYnF/A== dependencies: JSONStream "^1.0.3" assert "^1.4.0" @@ -1764,6 +2016,7 @@ browserify@^16.2.2: browserslist@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.1.0.tgz#81cbb8e52dfa09918f93c6e051d779cb7360785d" + integrity sha512-kQBKB8hnq1SRfSpwHDpM1JNHAyk9fydW8hIDvndR2ijTFKIlBPEvkJkCt8JznOugdm12/YCaRgyq/sqDGz9PwA== dependencies: caniuse-lite "^1.0.30000878" electron-to-chromium "^1.3.61" @@ -1772,24 +2025,29 @@ browserslist@^4.1.0: bser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= dependencies: node-int64 "^0.4.0" buffer-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" + integrity sha1-WWFrSYME1Var1GaWayLu2j7KX74= buffer-from@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" + integrity sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ== buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= buffer@^4.3.0: version "4.9.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" @@ -1798,6 +2056,7 @@ buffer@^4.3.0: buffer@^5.0.2: version "5.2.0" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.0.tgz#53cf98241100099e9eeae20ee6d51d21b16e541e" + integrity sha512-nUJyfChH7PMJy75eRDCCKtszSEFokUNXC1hNVSe+o+VdcgvDPLs20k3v8UXI8ruRYAJiYtyRea8mYyqPxoHWDw== dependencies: base64-js "^1.0.2" ieee754 "^1.1.4" @@ -1805,14 +2064,17 @@ buffer@^5.0.2: builtin-modules@^1.0.0, builtin-modules@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= bundle-collapser@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/bundle-collapser/-/bundle-collapser-1.3.0.tgz#f4b4ff58b2f22ee7701b20fa76306e23f53a3fb6" + integrity sha1-9LT/WLLyLudwGyD6djBuI/U6P7Y= dependencies: browser-pack "^5.0.1" browser-unpack "^1.1.0" @@ -1824,10 +2086,12 @@ bundle-collapser@^1.2.1: byline@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== dependencies: collection-visit "^1.0.0" component-emitter "^1.2.1" @@ -1842,24 +2106,29 @@ cache-base@^1.0.1: cached-path-relative@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7" + integrity sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc= caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + integrity sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= dependencies: callsites "^0.2.0" callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= camel-case@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= dependencies: no-case "^2.2.0" upper-case "^1.1.1" @@ -1867,6 +2136,7 @@ camel-case@3.0.x: camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= dependencies: camelcase "^2.0.0" map-obj "^1.0.0" @@ -1874,6 +2144,7 @@ camelcase-keys@^2.0.0: camelcase-keys@^4.0.0: version "4.2.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" + integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= dependencies: camelcase "^4.1.0" map-obj "^2.0.0" @@ -1882,34 +2153,42 @@ camelcase-keys@^4.0.0: camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= camelcase@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= caniuse-lite@^1.0.30000878: version "1.0.30000883" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000883.tgz#597c1eabfb379bd9fbeaa778632762eb574706ac" + integrity sha512-ovvb0uya4cKJct8Rj9Olstz0LaWmyJhCp3NawRG5fVigka8pEhIIwipF7zyYd2Q58UZb5YfIt52pVF444uj2kQ== capture-stack-trace@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" + integrity sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0= caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= center-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= dependencies: align-text "^0.1.3" lazy-cache "^1.0.3" @@ -1917,6 +2196,7 @@ center-align@^0.1.1: chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" @@ -1927,6 +2207,7 @@ chalk@^1.0.0, chalk@^1.1.3: chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" + integrity sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" @@ -1935,6 +2216,7 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2: chalk@^2.3.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" @@ -1943,18 +2225,22 @@ chalk@^2.3.1: charcodes@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/charcodes/-/charcodes-0.1.0.tgz#61f8c244fc7f94f186fe74f31078901a3ed7928e" + integrity sha512-m4ne5Zw6XsdHhM5teBUHvu5s1SeJnwP0ljQ+IrGyZZ6U1TMohi+pVtsvgSgEsj5CPY6PLd/vMknFRuXdifdk+g== chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== cheerio@^1.0.0-rc.1: version "1.0.0-rc.2" resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" + integrity sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs= dependencies: css-select "~1.2.0" dom-serializer "~0.1.0" @@ -1966,6 +2252,7 @@ cheerio@^1.0.0-rc.1: chokidar@^2.0.0, chokidar@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176" + integrity sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg== dependencies: anymatch "^2.0.0" async-each "^1.0.0" @@ -1984,6 +2271,7 @@ chokidar@^2.0.0, chokidar@^2.0.3: chokidar@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.2.tgz#4dc65139eeb2714977735b6a35d06e97b494dfd7" + integrity sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw== dependencies: anymatch "^2.0.0" async-each "^1.0.0" @@ -2002,18 +2290,22 @@ chokidar@^2.0.2: chownr@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + integrity sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE= ci-info@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" + integrity sha512-uTGIPNx/nSpBdsF6xnseRXLLtfr9VLqkz8ZqHXr3Y7b6SftyRxBGjwMtJj1OhNbmlc1wZzLNAlAcvyIiE8a6ZA== ci-info@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" @@ -2021,10 +2313,12 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== dependencies: arr-union "^3.1.0" define-property "^0.2.5" @@ -2034,24 +2328,28 @@ class-utils@^0.3.5: clean-css@4.1.x: version "4.1.9" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.9.tgz#35cee8ae7687a49b98034f70de00c4edd3826301" + integrity sha1-Nc7ornaHpJuYA09w3gDE7dOCYwE= dependencies: source-map "0.5.x" cli-cursor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + integrity sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc= dependencies: restore-cursor "^1.0.1" cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= dependencies: restore-cursor "^2.0.0" cli-truncate@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + integrity sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ= dependencies: slice-ansi "0.0.4" string-width "^1.0.1" @@ -2059,10 +2357,12 @@ cli-truncate@^0.2.1: cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= dependencies: center-align "^0.1.1" right-align "^0.1.1" @@ -2071,6 +2371,7 @@ cliui@^2.1.0: cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" @@ -2079,6 +2380,7 @@ cliui@^3.2.0: cliui@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" + integrity sha512-nY3W5Gu2racvdDk//ELReY+dHjb9PlIcVDFXP72nVIhq2Gy3LuVXYwJoPVudwQnv1shtohpgkdCKT2YaKY0CKw== dependencies: string-width "^2.1.1" strip-ansi "^4.0.0" @@ -2087,26 +2389,32 @@ cliui@^4.0.0: clone-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= clone-stats@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + integrity sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE= clone-stats@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= clone@^1.0.0, clone@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" + integrity sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8= clone@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb" + integrity sha1-0hfR6WERjjrJpLi7oyhVU79kfNs= cloneable-readable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117" + integrity sha1-pikNQT8hemEjL5XkWP84QYz7ARc= dependencies: inherits "^2.0.1" process-nextick-args "^1.0.6" @@ -2115,6 +2423,7 @@ cloneable-readable@^1.0.0: cmd-shim@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" + integrity sha1-b8vamUg6j9FdfTChlspp1oii79s= dependencies: graceful-fs "^4.1.2" mkdirp "~0.5.0" @@ -2122,14 +2431,17 @@ cmd-shim@^2.0.2: co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= collection-map@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-map/-/collection-map-1.0.0.tgz#aea0f06f8d26c780c2b75494385544b2255af18c" + integrity sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw= dependencies: arr-map "^2.0.2" for-own "^1.0.0" @@ -2138,6 +2450,7 @@ collection-map@^1.0.0: collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= dependencies: map-visit "^1.0.0" object-visit "^1.0.0" @@ -2145,20 +2458,24 @@ collection-visit@^1.0.0: color-convert@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + integrity sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ== dependencies: color-name "^1.1.1" color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" + integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= dependencies: strip-ansi "^3.0.0" wcwidth "^1.0.0" @@ -2166,6 +2483,7 @@ columnify@^1.5.4: combine-source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.6.1.tgz#9b4a09c316033d768e0f11e029fa2730e079ad96" + integrity sha1-m0oJwxYDPXaODxHgKfonMOB5rZY= dependencies: convert-source-map "~1.1.0" inline-source-map "~0.5.0" @@ -2175,6 +2493,7 @@ combine-source-map@~0.6.1: combine-source-map@~0.7.1: version "0.7.2" resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.7.2.tgz#0870312856b307a87cc4ac486f3a9a62aeccc09e" + integrity sha1-CHAxKFazB6h8xKxIbzqaYq7MwJ4= dependencies: convert-source-map "~1.1.0" inline-source-map "~0.6.0" @@ -2184,6 +2503,7 @@ combine-source-map@~0.7.1: combine-source-map@~0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/combine-source-map/-/combine-source-map-0.8.0.tgz#a58d0df042c186fcf822a8e8015f5450d2d79a8b" + integrity sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos= dependencies: convert-source-map "~1.1.0" inline-source-map "~0.6.0" @@ -2193,28 +2513,34 @@ combine-source-map@~0.8.0: combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + integrity sha1-cj599ugBrFYTETp+RFqbactjKBg= dependencies: delayed-stream "~1.0.0" command-join@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" + integrity sha1-Uui5hPSHLZUv8b3IuYOX0nxxRM8= commander@2.14.x, commander@^2.8.1, commander@^2.9.0, commander@~2.14.1: version "2.14.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" + integrity sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw== commander@^2.14.1: version "2.18.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= compare-func@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" + integrity sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg= dependencies: array-ify "^1.0.0" dot-prop "^3.0.0" @@ -2222,18 +2548,22 @@ compare-func@^1.3.1: compare-versions@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.0.tgz#af93ea705a96943f622ab309578b9b90586f39c3" + integrity sha512-MAAAIOdi2s4Gl6rZ76PNcUa9IOYB+5ICdT41o5uMRf09aEu/F9RK+qhe8RjXNPwcTjGV7KU7h2P/fljThFVqyQ== component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= concat-stream@^1.4.10, concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream@^1.6.0: version "1.6.1" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.1.tgz#261b8f518301f1d834e36342b9fea095d2620a26" + integrity sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw== dependencies: inherits "^2.0.3" readable-stream "^2.2.2" @@ -2242,6 +2572,7 @@ concat-stream@^1.4.10, concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream concat-stream@~1.5.1: version "1.5.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266" + integrity sha1-cIl4Yk2FavQaWnQd790mHadSwmY= dependencies: inherits "~2.0.1" readable-stream "~2.0.0" @@ -2250,6 +2581,7 @@ concat-stream@~1.5.1: concat-stream@~1.6.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: buffer-from "^1.0.0" inherits "^2.0.3" @@ -2259,24 +2591,29 @@ concat-stream@~1.6.0: console-browserify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + integrity sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA= dependencies: date-now "^0.1.4" console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= constants-browserify@^1.0.0, constants-browserify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= content-type-parser@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" + integrity sha512-lM4l4CnMEwOLHAHr/P6MEZwZFPJFtAAKgL6pogbXmVZggIqXhdB6RbBtPOTsw2FcXwYhehRGERJmRrjOiIB8pQ== conventional-changelog-angular@^1.6.6: version "1.6.6" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz#b27f2b315c16d0a1f23eb181309d0e6a4698ea0f" + integrity sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg== dependencies: compare-func "^1.3.1" q "^1.5.1" @@ -2284,12 +2621,14 @@ conventional-changelog-angular@^1.6.6: conventional-changelog-atom@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz#8037693455990e3256f297320a45fa47ee553a14" + integrity sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g== dependencies: q "^1.5.1" conventional-changelog-cli@^1.3.13: version "1.3.22" resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.22.tgz#13570fe1728f56f013ff7a88878ff49d5162a405" + integrity sha512-pnjdIJbxjkZ5VdAX/H1wndr1G10CY8MuZgnXuJhIHglOXfIrXygb7KZC836GW9uo1u8PjEIvIw/bKX0lOmOzZg== dependencies: add-stream "^1.0.0" conventional-changelog "^1.1.24" @@ -2300,12 +2639,14 @@ conventional-changelog-cli@^1.3.13: conventional-changelog-codemirror@^0.3.8: version "0.3.8" resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz#a1982c8291f4ee4d6f2f62817c6b2ecd2c4b7b47" + integrity sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ== dependencies: q "^1.5.1" conventional-changelog-core@^2.0.11: version "2.0.11" resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz#19b5fbd55a9697773ed6661f4e32030ed7e30287" + integrity sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg== dependencies: conventional-changelog-writer "^3.0.9" conventional-commits-parser "^2.1.7" @@ -2324,36 +2665,42 @@ conventional-changelog-core@^2.0.11: conventional-changelog-ember@^0.3.12: version "0.3.12" resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.3.12.tgz#b7d31851756d0fcb49b031dffeb6afa93b202400" + integrity sha512-mmJzA7uzbrOqeF89dMMi6z17O07ORTXlTMArnLG9ZTX4oLaKNolUlxFUFlFm9JUoVWajVpaHQWjxH1EOQ+ARoQ== dependencies: q "^1.5.1" conventional-changelog-eslint@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz#b13cc7e4b472c819450ede031ff1a75c0e3d07d3" + integrity sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q== dependencies: q "^1.5.1" conventional-changelog-express@^0.3.6: version "0.3.6" resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz#4a6295cb11785059fb09202180d0e59c358b9c2c" + integrity sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q== dependencies: q "^1.5.1" conventional-changelog-jquery@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510" + integrity sha1-Agg5cWLjhGmG5xJztsecW1+A9RA= dependencies: q "^1.4.1" conventional-changelog-jscs@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c" + integrity sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw= dependencies: q "^1.4.1" conventional-changelog-jshint@^0.3.8: version "0.3.8" resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz#9051c1ac0767abaf62a31f74d2fe8790e8acc6c8" + integrity sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig== dependencies: compare-func "^1.3.1" q "^1.5.1" @@ -2361,10 +2708,12 @@ conventional-changelog-jshint@^0.3.8: conventional-changelog-preset-loader@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz#40bb0f142cd27d16839ec6c74ee8db418099b373" + integrity sha512-MkksM4G4YdrMlT2MbTsV2F6LXu/hZR0Tc/yenRrDIKRwBl/SP7ER4ZDlglqJsCzLJi4UonBc52Bkm5hzrOVCcw== conventional-changelog-writer@^3.0.9: version "3.0.9" resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz#4aecdfef33ff2a53bb0cf3b8071ce21f0e994634" + integrity sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q== dependencies: compare-func "^1.3.1" conventional-commits-filter "^1.1.6" @@ -2380,6 +2729,7 @@ conventional-changelog-writer@^3.0.9: conventional-changelog@^1.1.24: version "1.1.24" resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.24.tgz#3d94c29c960f5261c002678315b756cdd3d7d1f0" + integrity sha512-2WcSUst4Y3Z4hHvoMTWXMJr/DmgVdLiMOVY1Kak2LfFz+GIz2KDp5naqbFesYbfXPmaZ5p491dO0FWZIJoJw1Q== dependencies: conventional-changelog-angular "^1.6.6" conventional-changelog-atom "^0.2.8" @@ -2396,6 +2746,7 @@ conventional-changelog@^1.1.24: conventional-commits-filter@^1.1.1: version "1.1.5" resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.5.tgz#77aac065e3de9c1a74b801e8e25c9affb3184f65" + integrity sha512-mj3+WLj8UZE72zO9jocZjx8+W4Bwnx/KHoIz1vb4F8XUXj0XSjp8Y3MFkpRyIpsRiCBX+DkDjxGKF/nfeu7BGw== dependencies: is-subset "^0.1.1" modify-values "^1.0.0" @@ -2403,6 +2754,7 @@ conventional-commits-filter@^1.1.1: conventional-commits-filter@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz#4389cd8e58fe89750c0b5fb58f1d7f0cc8ad3831" + integrity sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q== dependencies: is-subset "^0.1.1" modify-values "^1.0.0" @@ -2410,6 +2762,7 @@ conventional-commits-filter@^1.1.6: conventional-commits-parser@^2.1.1: version "2.1.5" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.5.tgz#9ac3a4ab221c0c3c9e9dd2c09ae01e6d1e1dabe0" + integrity sha512-jaAP61py+ISMF3/n3yIiIuY5h6mJlucOqawu5mLB1HaQADLvg/y5UB3pT7HSucZJan34lp7+7ylQPfbKEGmxrA== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -2422,6 +2775,7 @@ conventional-commits-parser@^2.1.1: conventional-commits-parser@^2.1.7: version "2.1.7" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz#eca45ed6140d72ba9722ee4132674d639e644e8e" + integrity sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -2434,6 +2788,7 @@ conventional-commits-parser@^2.1.7: conventional-recommended-bump@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.2.1.tgz#1b7137efb5091f99fe009e2fe9ddb7cc490e9375" + integrity sha512-oJjG6DkRgtnr/t/VrPdzmf4XZv8c4xKVJrVT4zrSHd92KEL+EYxSbYoKq8lQ7U5yLMw7130wrcQTLRjM/T+d4w== dependencies: concat-stream "^1.4.10" conventional-commits-filter "^1.1.1" @@ -2446,18 +2801,22 @@ conventional-recommended-bump@^1.2.1: convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + integrity sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU= convert-source-map@~1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" + integrity sha1-SCnId+n+SbMWHzvzZziI4gRpmGA= copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= copy-props@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.2.tgz#6151fc8fd47fd8703df00f53940a0ebfeb8c2162" + integrity sha512-/W7IE8h4Zj1jdyf26YhdEjTS/xO42ltxtlH6B9+rmFNeXO+LL7KhzqqJdKJUwwO+4ZZ4IRw7rFhm8VEw95T25A== dependencies: each-props "^1.3.0" is-plain-object "^2.0.1" @@ -2465,18 +2824,22 @@ copy-props@^2.0.1: core-js@^2.4.0, core-js@^2.5.0: version "2.5.3" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" + integrity sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4= core-js@^2.5.7: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + integrity sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= cosmiconfig@^5.0.2, cosmiconfig@^5.0.6: version "5.0.6" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.6.tgz#dca6cf680a0bd03589aff684700858c81abeeb39" + integrity sha512-6DWfizHriCrFWURP1/qyhsiFvYdlJzbCzmtFWh744+KyWsJo5+kPzUZZaMRSSItoYc0pxFX7gEO7ZC1/gN/7AQ== dependencies: is-directory "^0.3.1" js-yaml "^3.9.0" @@ -2485,6 +2848,7 @@ cosmiconfig@^5.0.2, cosmiconfig@^5.0.6: create-ecdh@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" + integrity sha1-iIxyNZbN92EvZJgjPuvXo1MBc30= dependencies: bn.js "^4.1.0" elliptic "^6.0.0" @@ -2492,12 +2856,14 @@ create-ecdh@^4.0.0: create-error-class@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" + integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= dependencies: capture-stack-trace "^1.0.0" create-hash@^1.1.0, create-hash@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" + integrity sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0= dependencies: cipher-base "^1.0.1" inherits "^2.0.1" @@ -2507,6 +2873,7 @@ create-hash@^1.1.0, create-hash@^1.1.2: create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: version "1.1.6" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.6.tgz#acb9e221a4e17bdb076e90657c42b93e3726cf06" + integrity sha1-rLniIaThe9sHbpBlfEK5PjcmzwY= dependencies: cipher-base "^1.0.3" create-hash "^1.1.0" @@ -2518,6 +2885,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= dependencies: lru-cache "^4.0.1" shebang-command "^1.2.0" @@ -2526,6 +2894,7 @@ cross-spawn@^5.0.1: cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" @@ -2536,18 +2905,21 @@ cross-spawn@^6.0.5: cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + integrity sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g= dependencies: boom "2.x.x" cryptiles@3.x.x: version "3.1.2" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" + integrity sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4= dependencies: boom "5.x.x" crypto-browserify@^3.0.0, crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== dependencies: browserify-cipher "^1.0.0" browserify-sign "^4.0.0" @@ -2564,6 +2936,7 @@ crypto-browserify@^3.0.0, crypto-browserify@^3.11.0: css-select@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= dependencies: boolbase "~1.0.0" css-what "2.1" @@ -2573,72 +2946,86 @@ css-select@~1.2.0: css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + integrity sha1-lGfQMsOM+u+58teVASUwYvh/ob0= cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.2" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + integrity sha1-uANhcMefB6kP8vFuIihAJ6JDhIs= "cssstyle@>= 0.2.37 < 0.3.0": version "0.2.37" resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + integrity sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ= dependencies: cssom "0.3.x" currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= dependencies: array-find-index "^1.0.1" d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + integrity sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8= dependencies: es5-ext "^0.10.9" dargs@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= dependencies: number-is-nan "^1.0.0" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= dependencies: assert-plus "^1.0.0" date-fns@^1.27.2: version "1.29.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" + integrity sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw== date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= dateformat@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062" + integrity sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI= dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" + integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" debug@^3.0.0, debug@^3.0.1, debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" decamelize-keys@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= dependencies: decamelize "^1.1.0" map-obj "^1.0.0" @@ -2646,52 +3033,63 @@ decamelize-keys@^1.0.0: decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-extend@~0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + integrity sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8= deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= default-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== dependencies: kind-of "^5.0.2" default-require-extensions@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" + integrity sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc= dependencies: strip-bom "^3.0.0" default-resolution@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" + integrity sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= dependencies: clone "^1.0.2" define-properties@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + integrity sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ= dependencies: foreach "^2.0.5" object-keys "^1.0.8" @@ -2699,18 +3097,21 @@ define-properties@^1.1.2: define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= dependencies: is-descriptor "^0.1.0" define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= dependencies: is-descriptor "^1.0.0" define-property@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== dependencies: is-descriptor "^1.0.2" isobject "^3.0.1" @@ -2718,10 +3119,12 @@ define-property@^2.0.2: defined@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + integrity sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag= dependencies: globby "^5.0.0" is-path-cwd "^1.0.0" @@ -2734,14 +3137,17 @@ del@^2.0.2: delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= deps-sort@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/deps-sort/-/deps-sort-2.0.0.tgz#091724902e84658260eb910748cccd1af6e21fb5" + integrity sha1-CRckkC6EZYJg65EHSMzNGvbiH7U= dependencies: JSONStream "^1.0.3" shasum "^1.0.0" @@ -2751,6 +3157,7 @@ deps-sort@^2.0.0: derequire@^2.0.2: version "2.0.6" resolved "https://registry.yarnpkg.com/derequire/-/derequire-2.0.6.tgz#31a414bb7ca176239fa78b116636ef77d517e768" + integrity sha1-MaQUu3yhdiOfp4sRZjbvd9UX52g= dependencies: acorn "^4.0.3" concat-stream "^1.4.6" @@ -2761,6 +3168,7 @@ derequire@^2.0.2: des.js@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" + integrity sha1-wHTS4qpqipoH29YfmhXCzYPsjsw= dependencies: inherits "^2.0.1" minimalistic-assert "^1.0.0" @@ -2768,28 +3176,34 @@ des.js@^1.0.0: detect-file@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= dependencies: repeating "^2.0.0" detect-indent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= detect-libc@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= detective@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/detective/-/detective-5.1.0.tgz#7a20d89236d7b331ccea65832e7123b5551bb7cb" + integrity sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ== dependencies: acorn-node "^1.3.0" defined "^1.0.0" @@ -2798,10 +3212,12 @@ detective@^5.0.2: diff@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== diffie-hellman@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.2.tgz#b5835739270cfe26acf632099fded2a07f209e5e" + integrity sha1-tYNXOScM/ias9jIJn97SoH8gnl4= dependencies: bn.js "^4.1.0" miller-rabin "^4.0.0" @@ -2810,12 +3226,14 @@ diffie-hellman@^5.0.0: doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== dependencies: esutils "^2.0.2" dom-serializer@0, dom-serializer@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + integrity sha1-BzxpdUbOB4DOI75KKOKT5AvDDII= dependencies: domelementtype "~1.1.1" entities "~1.1.1" @@ -2823,30 +3241,36 @@ dom-serializer@0, dom-serializer@~0.1.0: domain-browser@^1.1.1, domain-browser@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== domelementtype@1, domelementtype@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + integrity sha1-sXrtguirWeUt2cGbF1bg/BhyBMI= domelementtype@~1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + integrity sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs= domexception@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== dependencies: webidl-conversions "^4.0.2" domhandler@^2.3.0: version "2.4.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" + integrity sha1-iS5HAAqZvlW783dP/qBWHYh5wlk= dependencies: domelementtype "1" domutils@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= dependencies: dom-serializer "0" domelementtype "1" @@ -2854,6 +3278,7 @@ domutils@1.5.1: domutils@^1.5.1: version "1.7.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== dependencies: dom-serializer "0" domelementtype "1" @@ -2861,32 +3286,38 @@ domutils@^1.5.1: dot-prop@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" + integrity sha1-G3CK8JSknJoOfbyteQq6U52sEXc= dependencies: is-obj "^1.0.0" duplexer2@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + integrity sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds= dependencies: readable-stream "~1.1.9" duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME= dependencies: readable-stream "^2.0.2" duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= duplexify@^3.5.3: version "3.5.4" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.4.tgz#4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4" + integrity sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA== dependencies: end-of-stream "^1.0.0" inherits "^2.0.1" @@ -2896,6 +3327,7 @@ duplexify@^3.5.3: each-props@^1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.1.tgz#fc138f51e3a2774286d4858e02d6e7de462de158" + integrity sha1-/BOPUeOid0KG1IWOAtbn3kYt4Vg= dependencies: is-plain-object "^2.0.1" object.defaults "^1.1.0" @@ -2903,20 +3335,24 @@ each-props@^1.3.0: ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + integrity sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU= dependencies: jsbn "~0.1.0" electron-to-chromium@^1.3.61: version "1.3.62" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.62.tgz#2e8e2dc070c800ec8ce23ff9dfcceb585d6f9ed8" + integrity sha512-x09ndL/Gjnuk3unlAyoGyUg3wbs4w/bXurgL7wL913vXHAOWmMhrLf1VNGRaMLngmadd5Q8gsV9BFuIr6rP+Xg== elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" + integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" + integrity sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8= dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -2929,22 +3365,26 @@ elliptic@^6.0.0: emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= dependencies: iconv-lite "~0.4.13" end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== dependencies: once "^1.4.0" enhanced-resolve@^3.0.0, enhanced-resolve@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz#0421e339fd71419b3da13d129b3979040230476e" + integrity sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24= dependencies: graceful-fs "^4.1.2" memory-fs "^0.4.0" @@ -2954,22 +3394,26 @@ enhanced-resolve@^3.0.0, enhanced-resolve@^3.4.0: entities@^1.1.1, entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + integrity sha1-blwtClYhtdra7O+AuQ7ftc13cvA= errno@^0.1.3: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== dependencies: prr "~1.0.1" error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + integrity sha1-+FWobOYa3E6GIcPNoh56dhLDqNw= dependencies: is-arrayish "^0.2.1" es-abstract@^1.4.3, es-abstract@^1.5.1: version "1.10.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" + integrity sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ== dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" @@ -2980,6 +3424,7 @@ es-abstract@^1.4.3, es-abstract@^1.5.1: es-to-primitive@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + integrity sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0= dependencies: is-callable "^1.1.1" is-date-object "^1.0.1" @@ -2988,6 +3433,7 @@ es-to-primitive@^1.1.1: es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: version "0.10.39" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.39.tgz#fca21b67559277ca4ac1a1ed7048b107b6f76d87" + integrity sha512-AlaXZhPHl0po/uxMx1tyrlt1O86M6D5iVaDH8UgLfgek4kXTX6vzsRfJQWC2Ku+aG8pkw1XWzh9eTkwfVrsD5g== dependencies: es6-iterator "~2.0.3" es6-symbol "~3.1.1" @@ -2995,6 +3441,7 @@ es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= dependencies: d "1" es5-ext "^0.10.35" @@ -3003,6 +3450,7 @@ es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: es6-map@^0.1.3: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + integrity sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA= dependencies: d "1" es5-ext "~0.10.14" @@ -3014,6 +3462,7 @@ es6-map@^0.1.3: es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + integrity sha1-0rPsXU2ADO2BjbU40ol02wpzzLE= dependencies: d "1" es5-ext "~0.10.14" @@ -3024,6 +3473,7 @@ es6-set@~0.1.5: es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= dependencies: d "1" es5-ext "~0.10.14" @@ -3031,6 +3481,7 @@ es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: es6-templates@^0.2.2: version "0.2.3" resolved "https://registry.yarnpkg.com/es6-templates/-/es6-templates-0.2.3.tgz#5cb9ac9fb1ded6eb1239342b81d792bbb4078ee4" + integrity sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ= dependencies: recast "~0.11.12" through "~2.3.6" @@ -3038,6 +3489,7 @@ es6-templates@^0.2.2: es6-weak-map@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + integrity sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8= dependencies: d "1" es5-ext "^0.10.14" @@ -3047,10 +3499,12 @@ es6-weak-map@^2.0.1: escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= escodegen@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" + integrity sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q== dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -3062,6 +3516,7 @@ escodegen@^1.9.0: escope@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + integrity sha1-4Bl16BJ4GhY6ba392AOY3GTIicM= dependencies: es6-map "^0.1.3" es6-weak-map "^2.0.1" @@ -3071,20 +3526,24 @@ escope@^3.6.0: eslint-config-babel@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-8.0.1.tgz#394a1d24aa9f725a2d33c43d33dddd5bdae89f79" + integrity sha512-z3woNZxSPtiLh933oeiMhPoYeHq00qk9NKEDxhRXLtQp/9XLt0wL+1BRHmGzVR+WYpSxMobS6X+aQS/GtuiHog== eslint-plugin-flowtype@^2.50.1: version "2.50.1" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.1.tgz#36d4c961ac8b9e9e1dc091d3fba0537dad34ae8a" + integrity sha512-9kRxF9hfM/O6WGZcZPszOVPd2W0TLHBtceulLTsGfwMPtiCCLnCW0ssRiOOiXyqrCA20pm1iXdXm7gQeN306zQ== dependencies: lodash "^4.17.10" eslint-plugin-local-rules@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-local-rules/-/eslint-plugin-local-rules-0.1.0.tgz#6808bb4c1b9a432f6e54ff4dfb290073e1cdf700" + integrity sha1-aAi7TBuaQy9uVP9N+ykAc+HN9wA= eslint-plugin-prettier@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz#71998c60aedfa2141f7bfcbf9d1c459bf98b4fad" + integrity sha512-tGek5clmW5swrAx1mdPYM8oThrBE83ePh7LeseZHBWfHVGrHPhKn7Y5zgRMbU/9D5Td9K4CEmUPjGxA7iw98Og== dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" @@ -3092,6 +3551,7 @@ eslint-plugin-prettier@^2.6.2: eslint-scope@3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug= dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" @@ -3099,6 +3559,7 @@ eslint-scope@3.7.1: eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" + integrity sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" @@ -3106,14 +3567,17 @@ eslint-scope@^4.0.0: eslint-utils@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" + integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q== eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== eslint@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.6.0.tgz#b6f7806041af01f71b3f1895cbb20971ea4b6223" + integrity sha512-/eVYs9VVVboX286mBK7bbKnO1yamUy2UCRjiY6MryhQL2PaaXCExsCQ2aO83OeYRhU2eCU/FMFP+tVMoOrzNrA== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.5.3" @@ -3157,6 +3621,7 @@ eslint@^5.6.0: espree@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/espree/-/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634" + integrity sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg== dependencies: acorn "^5.6.0" acorn-jsx "^4.1.1" @@ -3164,38 +3629,46 @@ espree@^4.0.0: esprima@^3.1.3, esprima@~3.1.0: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + integrity sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw== esquery@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== dependencies: estraverse "^4.0.0" esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== dependencies: estraverse "^4.1.0" estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= estree-walker@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa" + integrity sha1-5rGlHPcpJSTnI3wxLl/mZgwc4ao= esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= event-emitter@~0.3.5: version "0.3.5" resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= dependencies: d "1" es5-ext "~0.10.14" @@ -3203,14 +3676,17 @@ event-emitter@~0.3.5: events@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= events@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/events/-/events-2.1.0.tgz#2a9a1e18e6106e0e812aa9ebd4a819b3c29c0ba5" + integrity sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg== evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== dependencies: md5.js "^1.3.4" safe-buffer "^5.1.1" @@ -3218,12 +3694,14 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: exec-sh@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" + integrity sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg== dependencies: merge "^1.1.3" execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -3236,6 +3714,7 @@ execa@^0.7.0: execa@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" + integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo= dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -3248,6 +3727,7 @@ execa@^0.8.0: execa@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" + integrity sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA== dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -3260,20 +3740,24 @@ execa@^0.9.0: exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + integrity sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g= exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= dependencies: is-posix-bracket "^0.1.0" expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= dependencies: debug "^2.3.3" define-property "^0.2.5" @@ -3286,18 +3770,21 @@ expand-brackets@^2.1.4: expand-range@^1.8.1: version "1.8.2" resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= dependencies: fill-range "^2.1.0" expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= dependencies: homedir-polyfill "^1.0.1" expect@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" + integrity sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w== dependencies: ansi-styles "^3.2.0" jest-diff "^23.6.0" @@ -3309,18 +3796,21 @@ expect@^23.6.0: extend-shallow@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071" + integrity sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE= dependencies: kind-of "^1.1.0" extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= dependencies: is-extendable "^0.1.0" extend-shallow@^3.0.0, extend-shallow@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= dependencies: assign-symbols "^1.0.0" is-extendable "^1.0.1" @@ -3328,10 +3818,12 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + integrity sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ= external-editor@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" + integrity sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA== dependencies: chardet "^0.4.0" iconv-lite "^0.4.17" @@ -3340,6 +3832,7 @@ external-editor@^2.0.4: external-editor@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== dependencies: chardet "^0.7.0" iconv-lite "^0.4.24" @@ -3348,12 +3841,14 @@ external-editor@^3.0.0: extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= dependencies: is-extglob "^1.0.0" extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== dependencies: array-unique "^0.3.2" define-property "^1.0.0" @@ -3367,14 +3862,17 @@ extglob@^2.0.4: extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= falafel@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/falafel/-/falafel-2.1.0.tgz#96bb17761daba94f46d001738b3cedf3a67fe06c" + integrity sha1-lrsXdh2rqU9G0AFzizzt86Z/4Gw= dependencies: acorn "^5.0.0" foreach "^2.0.5" @@ -3384,6 +3882,7 @@ falafel@^2.1.0: fancy-log@^1.1.0, fancy-log@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" + integrity sha1-9BEl49hPLn2JpD0G2VjI94vha+E= dependencies: ansi-gray "^0.1.1" color-support "^1.1.3" @@ -3392,36 +3891,44 @@ fancy-log@^1.1.0, fancy-log@^1.3.2: fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= fast-diff@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" + integrity sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig== fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fastparse@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + integrity sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg= fb-watchman@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= dependencies: bser "^2.0.0" figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= dependencies: escape-string-regexp "^1.0.5" object-assign "^4.1.0" @@ -3429,12 +3936,14 @@ figures@^1.7.0: figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= dependencies: escape-string-regexp "^1.0.5" file-entry-cache@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + integrity sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= dependencies: flat-cache "^1.2.1" object-assign "^4.0.1" @@ -3442,10 +3951,12 @@ file-entry-cache@^2.0.0: filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= fileset@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + integrity sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA= dependencies: glob "^7.0.3" minimatch "^3.0.3" @@ -3453,6 +3964,7 @@ fileset@^2.0.2: fill-range@^2.1.0: version "2.2.3" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + integrity sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM= dependencies: is-number "^2.1.0" isobject "^2.0.0" @@ -3463,6 +3975,7 @@ fill-range@^2.1.0: fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= dependencies: extend-shallow "^2.0.1" is-number "^3.0.0" @@ -3472,6 +3985,7 @@ fill-range@^4.0.0: find-cache-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + integrity sha1-kojj6ePMN0hxfTnq3hfPcfww7m8= dependencies: commondir "^1.0.1" make-dir "^1.0.0" @@ -3480,10 +3994,12 @@ find-cache-dir@^1.0.0: find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" + integrity sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ= find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" @@ -3491,18 +4007,21 @@ find-up@^1.0.0: find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= dependencies: locate-path "^2.0.0" find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" findup-sync@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" + integrity sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= dependencies: detect-file "^1.0.0" is-glob "^3.1.0" @@ -3512,6 +4031,7 @@ findup-sync@^2.0.0: fined@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/fined/-/fined-1.1.0.tgz#b37dc844b76a2f5e7081e884f7c0ae344f153476" + integrity sha1-s33IRLdqL15wgeiE98CuNE8VNHY= dependencies: expand-tilde "^2.0.2" is-plain-object "^2.0.3" @@ -3522,16 +4042,19 @@ fined@^1.0.1: first-chunk-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70" + integrity sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA= dependencies: readable-stream "^2.0.2" flagged-respawn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.0.tgz#4e79ae9b2eb38bf86b3bb56bf3e0a56aa5fcabd7" + integrity sha1-Tnmumy6zi/hrO7Vr8+ClaqX8q9c= flat-cache@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + integrity sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE= dependencies: circular-json "^0.3.1" del "^2.0.2" @@ -3541,10 +4064,12 @@ flat-cache@^1.2.1: flow-bin@^0.82.0: version "0.82.0" resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.82.0.tgz#fbec84c0d6cab7877565eca8214d655f3aefb8db" + integrity sha512-D7ViTCVJSVv19CB6dFWS9k2iKQlavtkRXn9el0ofVTTpGuybe+EPE8DZwdyohzEt6wRhHV8gwkteWvxdcVuOzg== flush-write-stream@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" + integrity sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw== dependencies: inherits "^2.0.1" readable-stream "^2.0.4" @@ -3552,30 +4077,36 @@ flush-write-stream@^1.0.2: for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= for-own@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= dependencies: for-in "^1.0.1" for-own@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= dependencies: for-in "^1.0.1" foreach@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= form-data@~2.1.1: version "2.1.4" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + integrity sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE= dependencies: asynckit "^0.4.0" combined-stream "^1.0.5" @@ -3584,6 +4115,7 @@ form-data@~2.1.1: form-data@~2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + integrity sha1-SXBJi+YEwgwAXU9cI67NIda0kJk= dependencies: asynckit "^0.4.0" combined-stream "1.0.6" @@ -3592,12 +4124,14 @@ form-data@~2.3.1: fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= dependencies: map-cache "^0.2.2" fs-extra@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" @@ -3606,12 +4140,14 @@ fs-extra@^4.0.1: fs-minipass@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== dependencies: minipass "^2.2.1" fs-mkdirp-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" + integrity sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes= dependencies: graceful-fs "^4.1.11" through2 "^2.0.3" @@ -3619,14 +4155,17 @@ fs-mkdirp-stream@^1.0.0: fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.0.0, fsevents@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" + integrity sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q== dependencies: nan "^2.3.0" node-pre-gyp "^0.6.39" @@ -3634,6 +4173,7 @@ fsevents@^1.0.0, fsevents@^1.1.1: fsevents@^1.1.2: version "1.2.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.2.tgz#4f598f0f69b273188ef4a62ca4e9e08ace314bbf" + integrity sha512-iownA+hC4uHFp+7gwP/y5SzaiUo7m2vpa0dhpzw8YuKtiZsz7cIXsFbXpLEeBM6WuCQyw1MH4RRe6XI8GFUctQ== dependencies: nan "^2.9.2" node-pre-gyp "^0.9.0" @@ -3641,6 +4181,7 @@ fsevents@^1.1.2: fstream-ignore@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + integrity sha1-nDHa40dnAY/h0kmyTa2mfQktoQU= dependencies: fstream "^1.0.0" inherits "2" @@ -3649,6 +4190,7 @@ fstream-ignore@^1.0.5: fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: version "1.0.11" resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + integrity sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE= dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -3658,14 +4200,17 @@ fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" @@ -3679,14 +4224,17 @@ gauge@~2.7.3: get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + integrity sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U= get-own-enumerable-property-symbols@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b" + integrity sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug== get-pkg-repo@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" + integrity sha1-xztInAbYDMVTbCyFP54FIyBWly0= dependencies: hosted-git-info "^2.1.4" meow "^3.3.0" @@ -3697,32 +4245,39 @@ get-pkg-repo@^1.0.0: get-port@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + integrity sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw= get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= get-stdin@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= dependencies: assert-plus "^1.0.0" git-raw-commits@^1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.4.tgz#442c3df5985b4f5689e9e43597f5194736aac001" + integrity sha512-G3O+41xHbscpgL5nA0DUkbFVgaAz5rd57AMSIMew8p7C8SyFwZDyn08MoXHkTl9zcD0LmxsLFPxbqFY4YPbpPA== dependencies: dargs "^4.0.1" lodash.template "^4.0.2" @@ -3733,6 +4288,7 @@ git-raw-commits@^1.3.0: git-raw-commits@^1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.6.tgz#27c35a32a67777c1ecd412a239a6c19d71b95aff" + integrity sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg== dependencies: dargs "^4.0.1" lodash.template "^4.0.2" @@ -3743,6 +4299,7 @@ git-raw-commits@^1.3.6: git-remote-origin-url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" + integrity sha1-UoJlna4hBxRaERJhEq0yFuxfpl8= dependencies: gitconfiglocal "^1.0.0" pify "^2.3.0" @@ -3750,6 +4307,7 @@ git-remote-origin-url@^2.0.0: git-semver-tags@^1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.3.4.tgz#2ceb2a355c6d7514c123c35e297067d08caf3a92" + integrity sha512-Xe2Z74MwXZfAezuaO6e6cA4nsgeCiARPzaBp23gma325c/OXdt//PhrknptIaynNeUp2yWtmikV7k5RIicgGIQ== dependencies: meow "^4.0.0" semver "^5.5.0" @@ -3757,6 +4315,7 @@ git-semver-tags@^1.3.0: git-semver-tags@^1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.3.6.tgz#357ea01f7280794fe0927f2806bee6414d2caba5" + integrity sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig== dependencies: meow "^4.0.0" semver "^5.5.0" @@ -3764,12 +4323,14 @@ git-semver-tags@^1.3.6: gitconfiglocal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + integrity sha1-QdBF84UaXqiPA/JMocYXgRRGS5s= dependencies: ini "^1.3.2" glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= dependencies: glob-parent "^2.0.0" is-glob "^2.0.0" @@ -3777,12 +4338,14 @@ glob-base@^0.3.0: glob-parent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= dependencies: is-glob "^2.0.0" glob-parent@^3.0.1, glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= dependencies: is-glob "^3.1.0" path-dirname "^1.0.0" @@ -3790,6 +4353,7 @@ glob-parent@^3.0.1, glob-parent@^3.1.0: glob-stream@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" + integrity sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ= dependencies: extend "^3.0.0" glob "^7.1.1" @@ -3805,6 +4369,7 @@ glob-stream@^6.1.0: glob-watcher@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.1.tgz#239aaa621b6bd843b288fdf6b155f50963c7d7ea" + integrity sha512-fK92r2COMC199WCyGUblrZKhjra3cyVMDiypDdqg1vsSDmexnbYivK1kNR4QItiNXLKmGlqan469ks67RtNa2g== dependencies: async-done "^1.2.0" chokidar "^2.0.0" @@ -3814,6 +4379,7 @@ glob-watcher@^5.0.0: glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -3825,6 +4391,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2: global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== dependencies: global-prefix "^1.0.1" is-windows "^1.0.1" @@ -3833,6 +4400,7 @@ global-modules@^1.0.0: global-prefix@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= dependencies: expand-tilde "^2.0.2" homedir-polyfill "^1.0.1" @@ -3843,18 +4411,22 @@ global-prefix@^1.0.1: globals@^11.1.0: version "11.3.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.3.0.tgz#e04fdb7b9796d8adac9c8f64c14837b2313378b0" + integrity sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw== globals@^11.7.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" + integrity sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg== globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + integrity sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0= dependencies: array-union "^1.0.1" arrify "^1.0.0" @@ -3866,6 +4438,7 @@ globby@^5.0.0: globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= dependencies: array-union "^1.0.1" glob "^7.0.3" @@ -3876,12 +4449,14 @@ globby@^6.1.0: glogg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810" + integrity sha512-ynYqXLoluBKf9XGR1gA59yEJisIL7YHEH4xr3ZziHB5/yl4qWfaK8Js9jGe6gBGCSCKVqiyO30WnRZADvemUNw== dependencies: sparkles "^1.0.0" got@^6.7.1: version "6.7.1" resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" + integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= dependencies: create-error-class "^3.0.0" duplexer3 "^0.1.4" @@ -3898,14 +4473,17 @@ got@^6.7.1: graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= gulp-babel@^8.0.0-beta.2: version "8.0.0-beta.2" resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-8.0.0-beta.2.tgz#0ceed820eeece53da75bbb466b56db336c4136dd" + integrity sha512-GTC2PxAXWkp6u1fP+C5+kn5biQ0dKGhkOSSXvKAf3ykF0+R3tevmLm/zSIkc1+S7U1JwH3XTvuMwRL6LD+sEiw== dependencies: plugin-error "^1.0.1" replace-ext "^1.0.0" @@ -3915,6 +4493,7 @@ gulp-babel@^8.0.0-beta.2: gulp-cli@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.0.1.tgz#7847e220cb3662f2be8a6d572bf14e17be5a994b" + integrity sha512-RxujJJdN8/O6IW2nPugl7YazhmrIEjmiVfPKrWt68r71UCaLKS71Hp0gpKT+F6qOUFtr7KqtifDKaAJPRVvMYQ== dependencies: ansi-colors "^1.0.1" archy "^1.0.0" @@ -3938,6 +4517,7 @@ gulp-cli@^2.0.0: gulp-filter@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/gulp-filter/-/gulp-filter-5.1.0.tgz#a05e11affb07cf7dcf41a7de1cb7b63ac3783e73" + integrity sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM= dependencies: multimatch "^2.0.0" plugin-error "^0.1.2" @@ -3946,6 +4526,7 @@ gulp-filter@^5.1.0: gulp-newer@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/gulp-newer/-/gulp-newer-1.4.0.tgz#25243ed6eac8f5462b95894e0d41937b112e65f3" + integrity sha512-h79fGO55S/P9eAADbLAP9aTtVYpLSR1ONj08VPaSdVVNVYhTS8p1CO1TW7kEMu+hC+sytmCqcUr5LesvZEtDoQ== dependencies: glob "^7.0.3" kew "^0.7.0" @@ -3954,6 +4535,7 @@ gulp-newer@^1.0.0: gulp-plumber@^1.0.1: version "1.2.0" resolved "https://registry.yarnpkg.com/gulp-plumber/-/gulp-plumber-1.2.0.tgz#18ea03912c9ee483f8a5499973b5954cd90f6ad8" + integrity sha512-L/LJftsbKoHbVj6dN5pvMsyJn9jYI0wT0nMg3G6VZhDac4NesezecYTi8/48rHi+yEic3sUpw6jlSc7qNWh32A== dependencies: chalk "^1.1.3" fancy-log "^1.3.2" @@ -3963,10 +4545,12 @@ gulp-plumber@^1.0.1: gulp-rename@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.2.2.tgz#3ad4428763f05e2764dec1c67d868db275687817" + integrity sha1-OtRCh2PwXidk3sHGfYaNsnVoeBc= gulp-uglify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-3.0.0.tgz#0df0331d72a0d302e3e37e109485dddf33c6d1ca" + integrity sha1-DfAzHXKg0wLj434QlIXd3zPG0co= dependencies: gulplog "^1.0.0" has-gulplog "^0.1.0" @@ -3979,6 +4563,7 @@ gulp-uglify@^3.0.0: gulp-util@^3.0.7: version "3.0.8" resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" + integrity sha1-AFTh50RQLifATBh8PsxQXdVLu08= dependencies: array-differ "^1.0.0" array-uniq "^1.0.2" @@ -4002,6 +4587,7 @@ gulp-util@^3.0.7: gulp-watch@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/gulp-watch/-/gulp-watch-5.0.0.tgz#6fb03ab1735972e0d2866475b568555836dfd0eb" + integrity sha512-q+HLppxXd11z9ndqql4Z0sd5xOAesJjycl0PRaq6ImK7b1BqBRL37YvxEE8ngUdIfpfHa0O9OCoovoggcFpCaQ== dependencies: anymatch "^1.3.0" chokidar "^2.0.0" @@ -4017,6 +4603,7 @@ gulp-watch@^5.0.0: gulp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.0.tgz#95766c601dade4a77ed3e7b2b6dc03881b596366" + integrity sha1-lXZsYB2t5Kd+0+eyttwDiBtZY2Y= dependencies: glob-watcher "^5.0.0" gulp-cli "^2.0.0" @@ -4026,12 +4613,14 @@ gulp@^4.0.0: gulplog@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + integrity sha1-4oxNRdBey77YGDY86PnFkmIp/+U= dependencies: glogg "^1.0.0" handlebars@^4.0.2, handlebars@^4.0.3: version "4.0.11" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + integrity sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw= dependencies: async "^1.4.0" optimist "^0.6.1" @@ -4042,14 +4631,17 @@ handlebars@^4.0.2, handlebars@^4.0.3: har-schema@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + integrity sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4= har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= har-validator@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + integrity sha1-M0gdDxu/9gDdID11gSpqX7oALio= dependencies: ajv "^4.9.1" har-schema "^1.0.5" @@ -4057,6 +4649,7 @@ har-validator@~4.2.1: har-validator@~5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + integrity sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0= dependencies: ajv "^5.1.0" har-schema "^2.0.0" @@ -4064,38 +4657,46 @@ har-validator@~5.0.3: has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= dependencies: ansi-regex "^2.0.0" has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= has-gulplog@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + integrity sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4= dependencies: sparkles "^1.0.0" has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= dependencies: get-value "^2.0.3" has-values "^0.1.4" @@ -4104,6 +4705,7 @@ has-value@^0.3.1: has-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= dependencies: get-value "^2.0.6" has-values "^1.0.0" @@ -4112,10 +4714,12 @@ has-value@^1.0.0: has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= has-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= dependencies: is-number "^3.0.0" kind-of "^4.0.0" @@ -4123,18 +4727,21 @@ has-values@^1.0.0: has@^1.0.0, has@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + integrity sha1-hGFzP1OLCDfJNh45qauelwTcLyg= dependencies: function-bind "^1.0.2" hash-base@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1" + integrity sha1-ZuodhW206KVHDK32/OI65SRO8uE= dependencies: inherits "^2.0.1" hash-base@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" @@ -4142,6 +4749,7 @@ hash-base@^3.0.0: hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.3" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== dependencies: inherits "^2.0.3" minimalistic-assert "^1.0.0" @@ -4149,6 +4757,7 @@ hash.js@^1.0.0, hash.js@^1.0.3: hawk@3.1.3, hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + integrity sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ= dependencies: boom "2.x.x" cryptiles "2.x.x" @@ -4158,6 +4767,7 @@ hawk@3.1.3, hawk@~3.1.3: hawk@~6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" + integrity sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ== dependencies: boom "4.x.x" cryptiles "3.x.x" @@ -4167,10 +4777,12 @@ hawk@~6.0.2: he@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= dependencies: hash.js "^1.0.3" minimalistic-assert "^1.0.0" @@ -4179,14 +4791,17 @@ hmac-drbg@^1.0.0: hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + integrity sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0= hoek@4.x.x: version "4.2.1" resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" + integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA== home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.1" @@ -4194,30 +4809,36 @@ home-or-tmp@^2.0.0: home-or-tmp@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" + integrity sha1-V6j+JM8zzdUkhgoVgh3cJchmcfs= homedir-polyfill@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + integrity sha1-TCu8inWJmP7r9e1oWA921GdotLw= dependencies: parse-passwd "^1.0.0" hosted-git-info@^2.1.4: version "2.5.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + integrity sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg== hosted-git-info@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" + integrity sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw== html-encoding-sniffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== dependencies: whatwg-encoding "^1.0.1" html-loader@^0.4.5: version "0.4.5" resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-0.4.5.tgz#5fbcd87cd63a5c49a7fce2fe56f425e05729c68c" + integrity sha1-X7zYfNY6XEmn/OL+VvQl4Fcpxow= dependencies: es6-templates "^0.2.2" fastparse "^1.1.1" @@ -4228,6 +4849,7 @@ html-loader@^0.4.5: html-minifier@^3.0.1: version "3.5.10" resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.10.tgz#8522c772c388db81aa5c26f62033302d906ea1c7" + integrity sha512-5c8iAyeIGAiuFhVjJ0qy1lgvyQxxuZgjeOuMnoK/wjEyy8DF3xKUnE9pO+6H7VMir976K6SGlZV8ZEmIOea/Zg== dependencies: camel-case "3.0.x" clean-css "4.1.x" @@ -4241,10 +4863,12 @@ html-minifier@^3.0.1: htmlescape@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351" + integrity sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E= htmlparser2@^3.9.1: version "3.9.2" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" + integrity sha1-G9+HrMoPP55T+k/M6w9LTLsAszg= dependencies: domelementtype "^1.3.0" domhandler "^2.3.0" @@ -4256,6 +4880,7 @@ htmlparser2@^3.9.1: http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + integrity sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8= dependencies: assert-plus "^0.2.0" jsprim "^1.2.2" @@ -4264,6 +4889,7 @@ http-signature@~1.1.0: http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= dependencies: assert-plus "^1.0.0" jsprim "^1.2.2" @@ -4272,10 +4898,12 @@ http-signature@~1.2.0: https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= husky@^1.0.0-rc.15: version "1.0.0-rc.15" resolved "https://registry.yarnpkg.com/husky/-/husky-1.0.0-rc.15.tgz#f1545d15c7f34d5db19e40b70df07ac9a362673d" + integrity sha512-JTZhkESlc4r1YFilvGgpbEC6wkFZdi1Sm/Haa1TiMFPHOErMUBlpScrIlgN0ttXO9EBYJyanL5WF+lwCtorrZw== dependencies: cosmiconfig "^5.0.6" execa "^0.9.0" @@ -4291,36 +4919,43 @@ husky@^1.0.0-rc.15: iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@~0.4.13: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + integrity sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ== iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" iconv-lite@^0.4.4: version "0.4.21" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" + integrity sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw== dependencies: safer-buffer "^2.1.0" ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" + integrity sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q= ignore-walk@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== dependencies: minimatch "^3.0.4" ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== import-local@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + integrity sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ== dependencies: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" @@ -4328,24 +4963,29 @@ import-local@^1.0.0: imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= indent-string@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= dependencies: repeating "^2.0.0" indent-string@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= indexof@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" + integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" @@ -4353,30 +4993,36 @@ inflight@^1.0.4: inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== inline-source-map@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.5.0.tgz#4a4c5dd8e4fb5e9b3cda60c822dfadcaee66e0af" + integrity sha1-Skxd2OT7Xps82mDIIt+tyu5m4K8= dependencies: source-map "~0.4.0" inline-source-map@~0.6.0: version "0.6.2" resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.6.2.tgz#f9393471c18a79d1724f863fa38b586370ade2a5" + integrity sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU= dependencies: source-map "~0.5.3" inquirer@^3.2.2: version "3.3.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" @@ -4396,6 +5042,7 @@ inquirer@^3.2.2: inquirer@^6.1.0: version "6.2.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" + integrity sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" @@ -4414,6 +5061,7 @@ inquirer@^6.1.0: insert-module-globals@^7.0.0: version "7.0.2" resolved "https://registry.yarnpkg.com/insert-module-globals/-/insert-module-globals-7.0.2.tgz#012c56baa7d3307a8b417d4ec5270cf9741c18f4" + integrity sha512-p3s7g96Nm62MbHRuj9ZXab0DuJNWD7qcmdUXCOQ/ZZn42DtDXfsLill7bq19lDCx3K3StypqUnuE3H2VmIJFUw== dependencies: JSONStream "^1.0.3" combine-source-map "~0.7.1" @@ -4427,26 +5075,31 @@ insert-module-globals@^7.0.0: interpret@^1.0.0, interpret@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" + integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ= invariant@^2.2.0, invariant@^2.2.2: version "2.2.3" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.3.tgz#1a827dfde7dcbd7c323f0ca826be8fa7c5e9d688" + integrity sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA== dependencies: loose-envify "^1.0.0" invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== dependencies: loose-envify "^1.0.0" invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= is-absolute@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" + integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== dependencies: is-relative "^1.0.0" is-windows "^1.0.1" @@ -4454,70 +5107,83 @@ is-absolute@^1.0.0: is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= dependencies: kind-of "^3.0.2" is-accessor-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== dependencies: kind-of "^6.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= dependencies: binary-extensions "^1.0.0" is-buffer@^1.1.0, is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= dependencies: builtin-modules "^1.0.0" is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + integrity sha1-hut1OSgF3cM69xySoO7fdO52BLI= is-ci@^1.0.10: version "1.1.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" + integrity sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg== dependencies: ci-info "^1.0.0" is-ci@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" + integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== dependencies: ci-info "^1.5.0" is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= dependencies: kind-of "^3.0.2" is-data-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== dependencies: kind-of "^6.0.0" is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== dependencies: is-accessor-descriptor "^0.1.6" is-data-descriptor "^0.1.4" @@ -4526,6 +5192,7 @@ is-descriptor@^0.1.0: is-descriptor@^1.0.0, is-descriptor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== dependencies: is-accessor-descriptor "^1.0.0" is-data-descriptor "^1.0.0" @@ -4534,248 +5201,300 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= is-equal-shallow@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= dependencies: is-primitive "^2.0.0" is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== dependencies: is-plain-object "^2.0.4" is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= is-generator-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" + integrity sha1-lp1J4bszKfa7fwkIm+JleLLd1Go= is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= dependencies: is-extglob "^1.0.0" is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= dependencies: is-extglob "^2.1.0" is-glob@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= dependencies: is-extglob "^2.1.1" is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= is-negated-glob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" + integrity sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= dependencies: kind-of "^3.0.2" is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= dependencies: kind-of "^3.0.2" is-number@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= is-observable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" + integrity sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA== dependencies: symbol-observable "^1.1.0" is-odd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" + integrity sha512-OTiixgpZAT1M4NHgS5IguFp/Vz2VI3U7Goh4/HA1adtwyLtSBrxYlcSYkhpAE07s4fKEcjrFxyvtQBND4vFQyQ== dependencies: is-number "^4.0.0" is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= is-path-in-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + integrity sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw= dependencies: is-path-inside "^1.0.0" is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= dependencies: path-is-inside "^1.0.1" is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" + integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= dependencies: has "^1.0.1" is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= is-relative@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" + integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== dependencies: is-unc-path "^1.0.0" is-resolvable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== is-retry-allowed@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" + integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= is-subset@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + integrity sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= is-symbol@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + integrity sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI= is-text-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= dependencies: text-extensions "^1.0.0" is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-unc-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" + integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== dependencies: unc-path-regex "^0.1.2" is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= is-valid-glob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" + integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== isarray@0.0.1, isarray@~0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= dependencies: isarray "1.0.0" isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= istanbul-api@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" + integrity sha512-duj6AlLcsWNwUpfyfHt0nWIeRiZpuShnP40YTxOGQgtaN8fd6JYSxsvxUphTDy8V5MfDXo4s/xVCIIvVCO808g== dependencies: async "^2.1.4" compare-versions "^3.1.0" @@ -4793,16 +5512,19 @@ istanbul-api@^1.3.1: istanbul-lib-coverage@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" + integrity sha512-GvgM/uXRwm+gLlvkWHTjDAvwynZkL9ns15calTrmhGgowlwJBbWMYzWbKqE2DT6JDP1AFXKa+Zi0EkqNCUqY0A== istanbul-lib-hook@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805" + integrity sha512-eLAMkPG9FU0v5L02lIkcj/2/Zlz9OuluaXikdr5iStk8FDbSwAixTK9TkYxbF0eNnzAJTwM2fkV2A1tpsIp4Jg== dependencies: append-transform "^1.0.0" istanbul-lib-instrument@^1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" + integrity sha512-1dYuzkOCbuR5GRJqySuZdsmsNKPL3PTuyPevQfoCXJePT9C8y1ga75neU+Tuy9+yS3G/dgx8wgOmp2KLpgdoeQ== dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" @@ -4815,6 +5537,7 @@ istanbul-lib-instrument@^1.10.1: istanbul-lib-report@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" + integrity sha512-Azqvq5tT0U09nrncK3q82e/Zjkxa4tkFZv7E6VcqP0QCPn6oNljDPfrZEC/umNXds2t7b8sRJfs6Kmpzt8m2kA== dependencies: istanbul-lib-coverage "^1.2.0" mkdirp "^0.5.1" @@ -4824,6 +5547,7 @@ istanbul-lib-report@^1.1.4: istanbul-lib-source-maps@^1.2.4: version "1.2.5" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1" + integrity sha512-8O2T/3VhrQHn0XcJbP1/GN7kXMiRAlPi+fj3uEHrjBD8Oz7Py0prSC25C09NuAZS6bgW1NNKAvCSHZXB0irSGA== dependencies: debug "^3.1.0" istanbul-lib-coverage "^1.2.0" @@ -4834,18 +5558,21 @@ istanbul-lib-source-maps@^1.2.4: istanbul-reports@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" + integrity sha512-y2Z2IMqE1gefWUaVjrBm0mSKvUkaBy9Vqz8iwr/r40Y9hBbIteH5wqHG/9DLTfJ9xUnUT2j7A3+VVJ6EaYBllA== dependencies: handlebars "^4.0.3" jest-changed-files@^23.4.2: version "23.4.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" + integrity sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA== dependencies: throat "^4.0.0" jest-cli@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" + integrity sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -4887,6 +5614,7 @@ jest-cli@^23.6.0: jest-config@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" + integrity sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ== dependencies: babel-core "^6.0.0" babel-jest "^23.6.0" @@ -4906,6 +5634,7 @@ jest-config@^23.6.0: jest-diff@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" + integrity sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g== dependencies: chalk "^2.0.1" diff "^3.2.0" @@ -4915,16 +5644,19 @@ jest-diff@^23.6.0: jest-docblock@^21.0.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" + integrity sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw== jest-docblock@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" + integrity sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c= dependencies: detect-newline "^2.1.0" jest-each@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" + integrity sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg== dependencies: chalk "^2.0.1" pretty-format "^23.6.0" @@ -4932,6 +5664,7 @@ jest-each@^23.6.0: jest-environment-jsdom@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" + integrity sha1-BWp5UrP+pROsYqFAosNox52eYCM= dependencies: jest-mock "^23.2.0" jest-util "^23.4.0" @@ -4940,6 +5673,7 @@ jest-environment-jsdom@^23.4.0: jest-environment-node@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" + integrity sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA= dependencies: jest-mock "^23.2.0" jest-util "^23.4.0" @@ -4947,10 +5681,12 @@ jest-environment-node@^23.4.0: jest-get-type@^22.1.0: version "22.1.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" + integrity sha512-nD97IVOlNP6fjIN5i7j5XRH+hFsHL7VlauBbzRvueaaUe70uohrkz7pL/N8lx/IAwZRTJ//wOdVgh85OgM7g3w== jest-haste-map@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" + integrity sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg== dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" @@ -4964,6 +5700,7 @@ jest-haste-map@^23.6.0: jest-jasmine2@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" + integrity sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ== dependencies: babel-traverse "^6.0.0" chalk "^2.0.1" @@ -4981,12 +5718,14 @@ jest-jasmine2@^23.6.0: jest-leak-detector@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" + integrity sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg== dependencies: pretty-format "^23.6.0" jest-matcher-utils@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" + integrity sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog== dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" @@ -4995,6 +5734,7 @@ jest-matcher-utils@^23.6.0: jest-message-util@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" + integrity sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8= dependencies: "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" @@ -5005,14 +5745,17 @@ jest-message-util@^23.4.0: jest-mock@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" + integrity sha1-rRxg8p6HGdR8JuETgJi20YsmETQ= jest-regex-util@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" + integrity sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U= jest-resolve-dependencies@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" + integrity sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA== dependencies: jest-regex-util "^23.3.0" jest-snapshot "^23.6.0" @@ -5020,6 +5763,7 @@ jest-resolve-dependencies@^23.6.0: jest-resolve@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" + integrity sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA== dependencies: browser-resolve "^1.11.3" chalk "^2.0.1" @@ -5028,6 +5772,7 @@ jest-resolve@^23.6.0: jest-runner@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" + integrity sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA== dependencies: exit "^0.1.2" graceful-fs "^4.1.11" @@ -5046,6 +5791,7 @@ jest-runner@^23.6.0: jest-runtime@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" + integrity sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw== dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^4.1.6" @@ -5072,10 +5818,12 @@ jest-runtime@^23.6.0: jest-serializer@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" + integrity sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU= jest-snapshot@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" + integrity sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg== dependencies: babel-types "^6.0.0" chalk "^2.0.1" @@ -5091,6 +5839,7 @@ jest-snapshot@^23.6.0: jest-util@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" + integrity sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE= dependencies: callsites "^2.0.0" chalk "^2.0.1" @@ -5104,6 +5853,7 @@ jest-util@^23.4.0: jest-validate@^23.5.0, jest-validate@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" + integrity sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A== dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" @@ -5113,6 +5863,7 @@ jest-validate@^23.5.0, jest-validate@^23.6.0: jest-watcher@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" + integrity sha1-0uKM50+NrWxq/JIrksq+9u0FyRw= dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -5121,12 +5872,14 @@ jest-watcher@^23.4.0: jest-worker@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" + integrity sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk= dependencies: merge-stream "^1.0.1" jest@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" + integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw== dependencies: import-local "^1.0.0" jest-cli "^23.6.0" @@ -5134,18 +5887,22 @@ jest@^23.6.0: js-levenshtein@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.3.tgz#3ef627df48ec8cf24bacf05c0f184ff30ef413c5" + integrity sha512-/812MXr9RBtMObviZ8gQBhHO8MOrGj8HlEE+4ccMTElNA/6I3u39u+bhny55Lk921yn44nSZFy9naNLElL5wgQ== js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -5153,6 +5910,7 @@ js-yaml@^3.12.0: js-yaml@^3.2.1, js-yaml@^3.7.0, js-yaml@^3.9.0: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" + integrity sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -5160,10 +5918,12 @@ js-yaml@^3.2.1, js-yaml@^3.7.0, js-yaml@^3.9.0: jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= jsdom@^11.5.1: version "11.6.2" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.6.2.tgz#25d1ef332d48adf77fc5221fe2619967923f16bb" + integrity sha512-pAeZhpbSlUp5yQcS6cBQJwkbzmv4tWFaYxHbFVSxzXefqjvtRA851Z5N2P+TguVG9YeUDcgb8pdeVQRJh0XR3Q== dependencies: abab "^1.0.4" acorn "^5.3.0" @@ -5195,76 +5955,93 @@ jsdom@^11.5.1: jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= jsesc@^2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + integrity sha1-5CGiqOINawgZ3yiQj3glJrlt0f4= jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= json-loader@^0.5.4: version "0.5.7" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" + integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== json-parse-better-errors@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a" + integrity sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw== json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= dependencies: jsonify "~0.0.0" json-stable-stringify@~0.0.0: version "0.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz#611c23e814db375527df851193db59dd2af27f45" + integrity sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U= dependencies: jsonify "~0.0.0" json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= optionalDependencies: graceful-fs "^4.1.6" jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= dependencies: assert-plus "1.0.0" extsprintf "1.3.0" @@ -5274,48 +6051,58 @@ jsprim@^1.2.2: just-debounce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea" + integrity sha1-h/zPrv/AtozRnVX2cilD+SnqNeo= kew@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" + integrity sha1-edk9LTM2PW/dKXCzNdkUGtWR15s= kind-of@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44" + integrity sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ= kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= dependencies: is-buffer "^1.1.5" kind-of@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= dependencies: is-buffer "^1.1.5" kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== klaw@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/klaw/-/klaw-2.1.1.tgz#42b76894701169cc910fd0d19ce677b5fb378af1" + integrity sha1-QrdolHARacyRD9DRnOZ3tfs3ivE= dependencies: graceful-fs "^4.1.9" kleur@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/kleur/-/kleur-1.0.2.tgz#637f126d3cda40a423b1297da88cf753bd04ebdd" + integrity sha512-4u2TF1/mKmiawrkjzCxRKszdCvqRsPgTJwjmZZt0RE4OiZMzvFfb4kwqfFP/p0gvakH1lhQOfCMYXUOYI9dTgA== labeled-stream-splicer@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/labeled-stream-splicer/-/labeled-stream-splicer-2.0.0.tgz#a52e1d138024c00b86b1c0c91f677918b8ae0a59" + integrity sha1-pS4dE4AkwAuGscDJH2d5GLiuClk= dependencies: inherits "^2.0.1" isarray "~0.0.1" @@ -5324,6 +6111,7 @@ labeled-stream-splicer@^2.0.0: last-run@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/last-run/-/last-run-1.1.1.tgz#45b96942c17b1c79c772198259ba943bebf8ca5b" + integrity sha1-RblpQsF7HHnHchmCWbqUO+v4yls= dependencies: default-resolution "^2.0.0" es6-weak-map "^2.0.1" @@ -5331,38 +6119,45 @@ last-run@^1.1.0: lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= lazy-cache@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + integrity sha1-uRkKT5EzVGlIQIWfio9whNiCImQ= dependencies: set-getter "^0.1.0" lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" + integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= dependencies: readable-stream "^2.0.5" lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= dependencies: invert-kv "^1.0.0" lead@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" + integrity sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI= dependencies: flush-write-stream "^1.0.2" left-pad@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" + integrity sha1-0wpzxrggHY99jnlWupYWCHpo4O4= lerna-changelog@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/lerna-changelog/-/lerna-changelog-0.5.0.tgz#1617a8193a1309451ffa1e686b425faf0424b3f8" + integrity sha512-+HFe8T3Q35Fwn2+fTRBvi0EdbKXrsGOozkuWBhq33DTJLBAqAFZ7m1LtKqF8LLuP0asZ0W9L+tGCAhoAt1+J1w== dependencies: chalk "^1.1.3" mkdirp "^0.5.1" @@ -5375,6 +6170,7 @@ lerna-changelog@^0.5.0: lerna@^2.11.0: version "2.11.0" resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.11.0.tgz#89b5681e286d388dda5bbbdbbf6b84c8094eff65" + integrity sha512-kgM6zwe2P2tR30MYvgiLLW+9buFCm6E7o8HnRlhTgm70WVBvXVhydqv+q/MF2HrVZkCawfVtCfetyQmtd4oHhQ== dependencies: async "^1.5.0" chalk "^2.1.0" @@ -5419,10 +6215,12 @@ lerna@^2.11.0: leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" @@ -5430,12 +6228,14 @@ levn@^0.3.0, levn@~0.3.0: lexical-scope@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/lexical-scope/-/lexical-scope-1.2.0.tgz#fcea5edc704a4b3a8796cdca419c3a0afaf22df4" + integrity sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ= dependencies: astw "^2.0.0" liftoff@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec" + integrity sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew= dependencies: extend "^3.0.0" findup-sync "^2.0.0" @@ -5449,6 +6249,7 @@ liftoff@^2.5.0: lint-staged@^7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.3.0.tgz#90ff33e5ca61ed3dbac35b6f6502dbefdc0db58d" + integrity sha512-AXk40M9DAiPi7f4tdJggwuKIViUplYtVj1os1MVEteW7qOkU50EOehayCfO9TsoGK24o/EsWb41yrEgfJDDjCw== dependencies: chalk "^2.3.1" commander "^2.14.1" @@ -5476,10 +6277,12 @@ lint-staged@^7.3.0: listr-silent-renderer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + integrity sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4= listr-update-renderer@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" + integrity sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc= dependencies: chalk "^1.1.3" cli-truncate "^0.2.1" @@ -5493,6 +6296,7 @@ listr-update-renderer@^0.4.0: listr-verbose-renderer@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" + integrity sha1-ggb0z21S3cWCfl/RSYng6WWTOjU= dependencies: chalk "^1.1.3" cli-cursor "^1.0.2" @@ -5502,6 +6306,7 @@ listr-verbose-renderer@^0.4.0: listr@^0.14.1: version "0.14.2" resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.2.tgz#cbe44b021100a15376addfc2d79349ee430bfe14" + integrity sha512-vmaNJ1KlGuGWShHI35X/F8r9xxS0VTHh9GejVXwSN20fG5xpq3Jh4bJbnumoT6q5EDM/8/YP1z3YMtQbFmhuXw== dependencies: "@samverschueren/stream-to-observable" "^0.3.0" is-observable "^1.1.0" @@ -5516,6 +6321,7 @@ listr@^0.14.1: load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -5526,6 +6332,7 @@ load-json-file@^1.0.0: load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -5535,6 +6342,7 @@ load-json-file@^2.0.0: load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= dependencies: graceful-fs "^4.1.2" parse-json "^4.0.0" @@ -5544,10 +6352,12 @@ load-json-file@^4.0.0: loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" + integrity sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI= loader-utils@^1.0.2, loader-utils@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= dependencies: big.js "^3.1.3" emojis-list "^2.0.0" @@ -5556,6 +6366,7 @@ loader-utils@^1.0.2, loader-utils@^1.1.0: locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= dependencies: p-locate "^2.0.0" path-exists "^3.0.0" @@ -5563,6 +6374,7 @@ locate-path@^2.0.0: locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: p-locate "^3.0.0" path-exists "^3.0.0" @@ -5570,60 +6382,74 @@ locate-path@^3.0.0: lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + integrity sha1-jaDmqHbPNEwK2KVIghEd08XHyjY= lodash._basetostring@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + integrity sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U= lodash._basevalues@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + integrity sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc= lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= lodash._isiterateecall@^3.0.0: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + integrity sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw= lodash._reescape@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + integrity sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo= lodash._reevaluate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + integrity sha1-WLx0xAZklTrgsSTYBpltrKQx4u0= lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= lodash._root@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI= lodash.clone@^4.3.2: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" + integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= lodash.escape@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + integrity sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg= dependencies: lodash._root "^3.0.0" lodash.isarguments@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + integrity sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo= lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + integrity sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U= lodash.keys@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + integrity sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo= dependencies: lodash._getnative "^3.0.0" lodash.isarguments "^3.0.0" @@ -5632,22 +6458,27 @@ lodash.keys@^3.0.0: lodash.memoize@~3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" + integrity sha1-LcvSwofLwKVcxCMovQxzYVDVPj8= lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= lodash.some@^4.2.2: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= lodash.template@^3.0.0: version "3.6.2" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + integrity sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8= dependencies: lodash._basecopy "^3.0.0" lodash._basetostring "^3.0.0" @@ -5662,6 +6493,7 @@ lodash.template@^3.0.0: lodash.template@^4.0.2: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= dependencies: lodash._reinterpolate "~3.0.0" lodash.templatesettings "^4.0.0" @@ -5669,6 +6501,7 @@ lodash.template@^4.0.2: lodash.templatesettings@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + integrity sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU= dependencies: lodash._reinterpolate "^3.0.0" lodash.escape "^3.0.0" @@ -5676,32 +6509,38 @@ lodash.templatesettings@^3.0.0: lodash.templatesettings@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= dependencies: lodash._reinterpolate "~3.0.0" lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + integrity sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw== lodash@^4.17.10, lodash@^4.17.5: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== log-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + integrity sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg= dependencies: chalk "^1.0.0" log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== dependencies: chalk "^2.0.1" log-update@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" + integrity sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE= dependencies: ansi-escapes "^1.0.0" cli-cursor "^1.0.2" @@ -5709,16 +6548,19 @@ log-update@^1.0.2: longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= loose-envify@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + integrity sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg= dependencies: js-tokens "^3.0.0" loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= dependencies: currently-unhandled "^0.4.1" signal-exit "^3.0.0" @@ -5726,14 +6568,17 @@ loud-rejection@^1.0.0: lower-case@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= lowercase-keys@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== lru-cache@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + integrity sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" @@ -5741,52 +6586,62 @@ lru-cache@^4.0.1: make-dir@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" + integrity sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw== dependencies: pify "^3.0.0" make-error-cause@^1.1.1: version "1.2.2" resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d" + integrity sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0= dependencies: make-error "^1.2.0" make-error@^1.2.0: version "1.3.4" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" + integrity sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g== make-iterator@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.0.tgz#57bef5dc85d23923ba23767324d8e8f8f3d9694b" + integrity sha1-V7713IXSOSO6I3ZzJNjo+PPZaUs= dependencies: kind-of "^3.1.0" makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= dependencies: tmpl "1.0.x" map-cache@^0.2.0, map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= map-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" + integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= dependencies: object-visit "^1.0.0" matchdep@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-2.0.0.tgz#c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e" + integrity sha1-xvNINKDY28OzfCfui7yyfHd1WC4= dependencies: findup-sync "^2.0.0" micromatch "^3.0.4" @@ -5796,6 +6651,7 @@ matchdep@^2.0.0: md5.js@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" + integrity sha1-6b296UogpawYsENA/Fdk1bCdkB0= dependencies: hash-base "^3.0.0" inherits "^2.0.1" @@ -5803,12 +6659,14 @@ md5.js@^1.3.4: mem@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= dependencies: mimic-fn "^1.0.0" memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= dependencies: errno "^0.1.3" readable-stream "^2.0.1" @@ -5816,6 +6674,7 @@ memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: meow@^3.3.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= dependencies: camelcase-keys "^2.0.0" decamelize "^1.1.2" @@ -5831,6 +6690,7 @@ meow@^3.3.0: meow@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.0.tgz#fd5855dd008db5b92c552082db1c307cba20b29d" + integrity sha512-Me/kel335m6vMKmEmA6c87Z6DUFW3JqkINRnxkbC+A/PUm0D5Fl2dEBQrPKnqCL9Te/CIa1MUt/0InMJhuC/sw== dependencies: camelcase-keys "^4.0.0" decamelize-keys "^1.0.0" @@ -5845,16 +6705,19 @@ meow@^4.0.0: merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= dependencies: readable-stream "^2.0.1" merge@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + integrity sha1-dTHjnUlJwoGma4xabgJl6LBYlNo= micromatch@^2.1.5, micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= dependencies: arr-diff "^2.0.0" array-unique "^0.2.1" @@ -5873,6 +6736,7 @@ micromatch@^2.1.5, micromatch@^2.3.11: micromatch@^3.0.4, micromatch@^3.1.4: version "3.1.9" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.9.tgz#15dc93175ae39e52e93087847096effc73efcf89" + integrity sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -5891,6 +6755,7 @@ micromatch@^3.0.4, micromatch@^3.1.4: micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -5909,6 +6774,7 @@ micromatch@^3.1.8: miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== dependencies: bn.js "^4.0.0" brorand "^1.0.1" @@ -5916,34 +6782,41 @@ miller-rabin@^4.0.0: mime-db@~1.33.0: version "1.33.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7: version "2.1.18" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== dependencies: mime-db "~1.33.0" mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" + integrity sha1-cCvi3aazf0g2vLP121ZkG2Sh09M= minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" minimist-options@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== dependencies: arrify "^1.0.1" is-plain-obj "^1.1.0" @@ -5951,22 +6824,27 @@ minimist-options@^3.0.1: minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= minimist@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" + integrity sha1-md9lelJXTCHJBXSX33QnkLK0wN4= minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= minipass@^2.2.1, minipass@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40" + integrity sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g== dependencies: safe-buffer "^5.1.1" yallist "^3.0.0" @@ -5974,12 +6852,14 @@ minipass@^2.2.1, minipass@^2.2.4: minizlib@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + integrity sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA== dependencies: minipass "^2.2.1" mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" @@ -5987,16 +6867,19 @@ mixin-deep@^1.2.0: "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" modify-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" + integrity sha1-4rbN65zhn5kxelNyLz2/XfXqqrI= module-deps@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-6.1.0.tgz#d1e1efc481c6886269f7112c52c3236188e16479" + integrity sha512-NPs5N511VD1rrVJihSso/LiBShRbJALYBKzDW91uZYy7BpjnO4bGnZL3HjZ9yKcFdZUWwaYjDz9zxbuP7vKMuQ== dependencies: JSONStream "^1.0.3" browser-resolve "^1.7.0" @@ -6017,14 +6900,17 @@ module-deps@^6.0.0: moment@^2.6.0: version "2.21.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a" + integrity sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ== ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= multimatch@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" + integrity sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis= dependencies: array-differ "^1.0.0" array-union "^1.0.1" @@ -6034,28 +6920,34 @@ multimatch@^2.0.0: multipipe@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + integrity sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s= dependencies: duplexer2 "0.0.2" mute-stdout@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.0.tgz#5b32ea07eb43c9ded6130434cf926f46b2a7fd4d" + integrity sha1-WzLqB+tDyd7WEwQ0z5JvRrKn/U0= mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= nan@^2.3.0: version "2.9.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.9.2.tgz#f564d75f5f8f36a6d9456cca7a6c4fe488ab7866" + integrity sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw== nan@^2.9.2: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA== nanomatch@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" + integrity sha512-n8R9bS8yQ6eSXaV6jHUpKzD8gLsin02w1HSFiegwrs9E098Ylhw5jdyKPaYqvHknHaSCKTPp7C8dGCQ0q9koXA== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -6073,16 +6965,19 @@ nanomatch@^1.2.9: natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= ncname@1.0.x: version "1.0.0" resolved "https://registry.yarnpkg.com/ncname/-/ncname-1.0.0.tgz#5b57ad18b1ca092864ef62b0b1ed8194f383b71c" + integrity sha1-W1etGLHKCShk72Kwse2BlPODtxw= dependencies: xml-char-classes "^1.0.0" needle@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.0.tgz#f14efc69cee1024b72c8b21c7bdf94a731dc12fa" + integrity sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w== dependencies: debug "^2.1.2" iconv-lite "^0.4.4" @@ -6091,20 +6986,24 @@ needle@^2.2.0: neo-async@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.0.tgz#76b1c823130cca26acfbaccc8fbaf0a2fa33b18f" + integrity sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g== nice-try@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" + integrity sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA== no-case@^2.2.0: version "2.3.2" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== dependencies: lower-case "^1.1.1" node-fetch@^1.7.0: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== dependencies: encoding "^0.1.11" is-stream "^1.0.1" @@ -6112,10 +7011,12 @@ node-fetch@^1.7.0: node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= node-libs-browser@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" + integrity sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg== dependencies: assert "^1.1.1" browserify-zlib "^0.2.0" @@ -6144,10 +7045,12 @@ node-libs-browser@^2.0.0: node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= node-notifier@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" + integrity sha512-MIBs+AAd6dJ2SklbbE8RUDRlIVhU8MaNLh1A9SUZDUHPiZkWLFde6UNwG41yQHZEToHgJMXqyVZ9UcS/ReOVTg== dependencies: growly "^1.3.0" semver "^5.4.1" @@ -6157,6 +7060,7 @@ node-notifier@^5.2.1: node-pre-gyp@^0.6.39: version "0.6.39" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" + integrity sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ== dependencies: detect-libc "^1.0.2" hawk "3.1.3" @@ -6173,6 +7077,7 @@ node-pre-gyp@^0.6.39: node-pre-gyp@^0.9.0: version "0.9.1" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz#f11c07516dd92f87199dbc7e1838eab7cd56c9e0" + integrity sha1-8RwHUW3ZL4cZnbx+GDjqt81WyeA= dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -6188,12 +7093,14 @@ node-pre-gyp@^0.9.0: node-releases@^1.0.0-alpha.11: version "1.0.0-alpha.11" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.11.tgz#73c810acc2e5b741a17ddfbb39dfca9ab9359d8a" + integrity sha512-CaViu+2FqTNYOYNihXa5uPS/zry92I3vPU4nCB6JB3OeZ2UGtOpF5gRwuN4+m3hbEcL47bOXyun1jX2iC+3uEQ== dependencies: semver "^5.3.0" nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= dependencies: abbrev "1" osenv "^0.1.4" @@ -6201,6 +7108,7 @@ nopt@^4.0.1: normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" @@ -6210,22 +7118,26 @@ normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package- normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= dependencies: remove-trailing-separator "^1.0.1" now-and-later@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.0.tgz#bc61cbb456d79cb32207ce47ca05136ff2e7d6ee" + integrity sha1-vGHLtFbXnLMiB85HygUTb/Ln1u4= dependencies: once "^1.3.2" npm-bundled@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + integrity sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow== npm-packlist@^1.1.6: version "1.1.10" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + integrity sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -6233,18 +7145,21 @@ npm-packlist@^1.1.6: npm-path@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" + integrity sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw== dependencies: which "^1.2.10" npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= dependencies: path-key "^2.0.0" npm-which@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + integrity sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo= dependencies: commander "^2.9.0" npm-path "^2.0.2" @@ -6253,6 +7168,7 @@ npm-which@^3.0.1: npmlog@^4.0.2, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" @@ -6262,32 +7178,39 @@ npmlog@^4.0.2, npmlog@^4.1.2: nth-check@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + integrity sha1-mSms32KPwsQQmN6rgqxYDPFJquQ= dependencies: boolbase "~1.0.0" number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= nwmatcher@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" + integrity sha512-IKdSTiDWCarf2JTS5e9e2+5tPZGdkRJ79XjYV0pzK8Q9BpsFyBq1RGKxzs7Q8UBushGw7m6TzVKz6fcY99iSWw== oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM= object-assign@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + integrity sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I= object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= dependencies: copy-descriptor "^0.1.0" define-property "^0.2.5" @@ -6296,16 +7219,19 @@ object-copy@^0.1.0: object-keys@^1.0.11, object-keys@^1.0.6, object-keys@^1.0.8: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + integrity sha1-xUYBd4rVYPEULODgG8yotW0TQm0= object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= dependencies: isobject "^3.0.0" object.assign@^4.0.4: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== dependencies: define-properties "^1.1.2" function-bind "^1.1.1" @@ -6315,6 +7241,7 @@ object.assign@^4.0.4: object.defaults@^1.0.0, object.defaults@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" + integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= dependencies: array-each "^1.0.1" array-slice "^1.0.0" @@ -6324,6 +7251,7 @@ object.defaults@^1.0.0, object.defaults@^1.1.0: object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= dependencies: define-properties "^1.1.2" es-abstract "^1.5.1" @@ -6331,6 +7259,7 @@ object.getownpropertydescriptors@^2.0.3: object.map@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" + integrity sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= dependencies: for-own "^1.0.0" make-iterator "^1.0.0" @@ -6338,6 +7267,7 @@ object.map@^1.0.0: object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= dependencies: for-own "^0.1.4" is-extendable "^0.1.1" @@ -6345,12 +7275,14 @@ object.omit@^2.0.0: object.pick@^1.2.0, object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" object.reduce@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad" + integrity sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60= dependencies: for-own "^1.0.0" make-iterator "^1.0.0" @@ -6358,22 +7290,26 @@ object.reduce@^1.0.0: once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + integrity sha1-ofeDj4MUxRbwXs78vEzP4EtO14k= onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= dependencies: mimic-fn "^1.0.0" optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= dependencies: minimist "~0.0.1" wordwrap "~0.0.2" @@ -6381,6 +7317,7 @@ optimist@^0.6.1: optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" @@ -6392,26 +7329,31 @@ optionator@^0.8.1, optionator@^0.8.2: ordered-read-streams@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" + integrity sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4= dependencies: readable-stream "^2.0.1" os-browserify@^0.3.0, os-browserify@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= os-locale@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= dependencies: lcid "^1.0.0" os-locale@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== dependencies: execa "^0.7.0" lcid "^1.0.0" @@ -6420,10 +7362,12 @@ os-locale@^2.0.0: os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= osenv@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" @@ -6431,6 +7375,7 @@ osenv@^0.1.4: output-file-sync@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" + integrity sha512-mDho4qm7WgIXIGf4eYU1RHN2UU5tPfVYVSRwDJw0uTmj35DQUt/eNp19N7v6T3SrR0ESTEf2up2CGO73qI35zQ== dependencies: graceful-fs "^4.1.11" is-plain-obj "^1.1.0" @@ -6439,46 +7384,55 @@ output-file-sync@^2.0.0: p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= p-limit@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + integrity sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng== dependencies: p-try "^1.0.0" p-limit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec" + integrity sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A== dependencies: p-try "^2.0.0" p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= dependencies: p-limit "^1.1.0" p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== dependencies: p-limit "^2.0.0" p-map@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= p-try@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" + integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== package-json@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" + integrity sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0= dependencies: got "^6.7.1" registry-auth-token "^3.0.1" @@ -6488,22 +7442,26 @@ package-json@^4.0.1: pako@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" + integrity sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg== param-case@2.1.x: version "2.1.1" resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= dependencies: no-case "^2.2.0" parents@^1.0.0, parents@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/parents/-/parents-1.0.1.tgz#fedd4d2bf193a77745fe71e371d73c3307d9c751" + integrity sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E= dependencies: path-platform "~0.11.15" parse-asn1@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.0.tgz#37c4f9b7ed3ab65c74817b5f2480937fbf97c712" + integrity sha1-N8T5t+06tlx0gXtfJICTf7+XxxI= dependencies: asn1.js "^4.0.0" browserify-aes "^1.0.0" @@ -6514,6 +7472,7 @@ parse-asn1@^5.0.0: parse-filepath@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" + integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= dependencies: is-absolute "^1.0.0" map-cache "^0.2.0" @@ -6522,10 +7481,12 @@ parse-filepath@^1.0.1: parse-github-repo-url@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" + integrity sha1-nn2LslKmy2ukJZUGC3v23z28H1A= parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= dependencies: glob-base "^0.3.0" is-dotfile "^1.0.0" @@ -6535,12 +7496,14 @@ parse-glob@^3.0.4: parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= dependencies: error-ex "^1.2.0" parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= dependencies: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" @@ -6548,72 +7511,88 @@ parse-json@^4.0.0: parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== parse5@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c" + integrity sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA== dependencies: "@types/node" "*" pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= path-browserify@0.0.0, path-browserify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + integrity sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo= path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= dependencies: pinkie-promise "^2.0.0" path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + integrity sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME= path-platform@~0.11.15: version "0.11.15" resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2" + integrity sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I= path-root-regex@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= path-root@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= dependencies: path-root-regex "^0.1.0" path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= dependencies: graceful-fs "^4.1.2" pify "^2.0.0" @@ -6622,18 +7601,21 @@ path-type@^1.0.0: path-type@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= dependencies: pify "^2.0.0" path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== dependencies: pify "^3.0.0" pbkdf2@^3.0.3: version "3.0.14" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" + integrity sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA== dependencies: create-hash "^1.1.2" create-hmac "^1.1.4" @@ -6644,56 +7626,67 @@ pbkdf2@^3.0.3: performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + integrity sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU= performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= pirates@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.0.tgz#850b18781b4ac6ec58a43c9ed9ec5fe6796addbd" + integrity sha512-8t5BsXy1LUIjn3WWOlOuFDuKswhQb/tkak641lvBgmPOBUQHXveORtlMCp6OdPV1dtuTaEahKA8VNz6uLfKBtA== dependencies: node-modules-regexp "^1.0.0" pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= dependencies: find-up "^2.1.0" pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== dependencies: find-up "^3.0.0" please-upgrade-node@^3.0.2, please-upgrade-node@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz#ed320051dfcc5024fae696712c8288993595e8ac" + integrity sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ== dependencies: semver-compare "^1.0.0" plugin-error@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace" + integrity sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4= dependencies: ansi-cyan "^0.1.1" ansi-red "^0.1.1" @@ -6704,6 +7697,7 @@ plugin-error@^0.1.2: plugin-error@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c" + integrity sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA== dependencies: ansi-colors "^1.0.1" arr-diff "^4.0.0" @@ -6713,34 +7707,42 @@ plugin-error@^1.0.1: pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= prettier@^1.14.3: version "1.14.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895" + integrity sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg== pretty-format@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" + integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" @@ -6748,34 +7750,42 @@ pretty-format@^23.6.0: pretty-hrtime@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= private@^0.1.6, private@^0.1.7, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== process-nextick-args@^1.0.6, process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M= process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== process@^0.11.10, process@~0.11.0: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= progress@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74= progress@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + integrity sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8= prompts@^0.1.9: version "0.1.12" resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.12.tgz#39dc42de7d2f0ec3e2af76bf40713fcb8726090d" + integrity sha512-pgR1GE1JM8q8UsHVIgjdK62DPwvrf0kvaKWJ/mfMoCm2lwfIReX/giQ1p0AlMoUXNhQap/8UiOdqi3bOROm/eg== dependencies: kleur "^1.0.0" sisteransi "^0.1.1" @@ -6783,14 +7793,17 @@ prompts@^0.1.9: prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= public-encrypt@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" + integrity sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY= dependencies: bn.js "^4.1.0" browserify-rsa "^4.0.0" @@ -6801,6 +7814,7 @@ public-encrypt@^4.0.0: pump@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" + integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -6808,6 +7822,7 @@ pump@^1.0.2: pump@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -6815,6 +7830,7 @@ pump@^2.0.0: pumpify@^1.3.5: version "1.4.0" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb" + integrity sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA== dependencies: duplexify "^3.5.3" inherits "^2.0.3" @@ -6823,42 +7839,52 @@ pumpify@^1.3.5: punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= punycode@^1.2.4, punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= punycode@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= q@^1.4.1, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + integrity sha1-E+JtKK1rD/qpExLNO/cI7TUecjM= qs@~6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + integrity sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A== querystring-es3@^0.2.0, querystring-es3@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" + integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= randomatic@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + integrity sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how== dependencies: is-number "^3.0.0" kind-of "^4.0.0" @@ -6866,12 +7892,14 @@ randomatic@^1.1.3: randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.0.6.tgz#d302c522948588848a8d300c932b44c24231da80" + integrity sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A== dependencies: safe-buffer "^5.1.0" randomfill@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== dependencies: randombytes "^2.0.5" safe-buffer "^5.1.0" @@ -6879,6 +7907,7 @@ randomfill@^1.0.3: rc@^1.0.1, rc@^1.1.6: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" ini "~1.3.0" @@ -6888,6 +7917,7 @@ rc@^1.0.1, rc@^1.1.6: rc@^1.1.7: version "1.2.5" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.5.tgz#275cd687f6e3b36cc756baa26dfee80a790301fd" + integrity sha1-J1zWh/bjs2zHVrqibf7oCnkDAf0= dependencies: deep-extend "~0.4.0" ini "~1.3.0" @@ -6897,18 +7927,21 @@ rc@^1.1.7: read-cmd-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" + integrity sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs= dependencies: graceful-fs "^4.1.2" read-only-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-only-stream/-/read-only-stream-2.0.0.tgz#2724fd6a8113d73764ac288d4386270c1dbf17f0" + integrity sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A= dependencies: readable-stream "^2.0.2" read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= dependencies: find-up "^1.0.0" read-pkg "^1.0.0" @@ -6916,6 +7949,7 @@ read-pkg-up@^1.0.1: read-pkg-up@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= dependencies: find-up "^2.0.0" read-pkg "^2.0.0" @@ -6923,6 +7957,7 @@ read-pkg-up@^2.0.0: read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= dependencies: find-up "^2.0.0" read-pkg "^3.0.0" @@ -6930,6 +7965,7 @@ read-pkg-up@^3.0.0: read-pkg@^1.0.0, read-pkg@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" @@ -6938,6 +7974,7 @@ read-pkg@^1.0.0, read-pkg@^1.1.0: read-pkg@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= dependencies: load-json-file "^2.0.0" normalize-package-data "^2.3.2" @@ -6946,6 +7983,7 @@ read-pkg@^2.0.0: read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= dependencies: load-json-file "^4.0.0" normalize-package-data "^2.3.2" @@ -6954,6 +7992,7 @@ read-pkg@^3.0.0: read-pkg@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" + integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc= dependencies: normalize-package-data "^2.3.2" parse-json "^4.0.0" @@ -6962,6 +8001,7 @@ read-pkg@^4.0.1: "readable-stream@>=1.1.13-1 <1.2.0-0", readable-stream@~1.1.9: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= dependencies: core-util-is "~1.0.0" inherits "~2.0.1" @@ -6971,6 +8011,7 @@ read-pkg@^4.0.1: readable-stream@^2.0.0, readable-stream@^2.0.4: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -6983,6 +8024,7 @@ readable-stream@^2.0.0, readable-stream@^2.0.4: readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3: version "2.3.5" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d" + integrity sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -6995,6 +8037,7 @@ readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable readable-stream@~2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + integrity sha1-j5A0HmilPMySh4jaz80Rs265t44= dependencies: core-util-is "~1.0.0" inherits "~2.0.1" @@ -7006,6 +8049,7 @@ readable-stream@~2.0.0: readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + integrity sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg= dependencies: graceful-fs "^4.1.2" minimatch "^3.0.2" @@ -7015,12 +8059,14 @@ readdirp@^2.0.0: realpath-native@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" + integrity sha512-XJtlRJ9jf0E1H1SLeJyQ9PGzQD7S65h1pRXEcAeK48doKOnKxcgPeNohJvD5u/2sI9J1oke6E8bZHS/fmW1UiQ== dependencies: util.promisify "^1.0.0" recast@~0.11.12: version "0.11.23" resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.23.tgz#451fd3004ab1e4df9b4e4b66376b2a21912462d3" + integrity sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM= dependencies: ast-types "0.9.6" esprima "~3.1.0" @@ -7030,12 +8076,14 @@ recast@~0.11.12: rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= dependencies: resolve "^1.1.6" redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= dependencies: indent-string "^2.1.0" strip-indent "^1.0.1" @@ -7043,6 +8091,7 @@ redent@^1.0.0: redent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" + integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= dependencies: indent-string "^3.0.0" strip-indent "^2.0.0" @@ -7050,46 +8099,55 @@ redent@^2.0.0: regenerate-unicode-properties@^5.1.1: version "5.1.3" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-5.1.3.tgz#54f5891543468f36f2274b67c6bc4c033c27b308" + integrity sha512-Yjy6t7jFQczDhYE+WVm7pg6gWYE258q4sUkk9qDErwXJIqx7jU9jGrMFHutJK/SRfcg7MEkXjGaYiVlOZyev/A== dependencies: regenerate "^1.3.3" regenerate-unicode-properties@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" + integrity sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw== dependencies: regenerate "^1.4.0" regenerate@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" + integrity sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg== regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== regenerator-runtime@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.0.tgz#8052ac952d85b10f3425192cd0c53f45cf65c6cb" + integrity sha512-SpV2LhF5Dm9UYMEprB3WwsBnWwqTrmjrm2UZb42cl2G02WVGgx7Mg8aa9pdLEKp6hZ+/abcMc2NxKA8f02EG2w== regenerator-transform@^0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" + integrity sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA== dependencies: private "^0.1.6" regex-cache@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== dependencies: is-equal-shallow "^0.1.3" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== dependencies: extend-shallow "^3.0.2" safe-regex "^1.1.0" @@ -7097,10 +8155,12 @@ regex-not@^1.0.0, regex-not@^1.0.2: regexpp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.0.tgz#b2a7534a85ca1b033bcf5ce9ff8e56d4e0755365" + integrity sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA== regexpu-core@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.1.3.tgz#fb81616dbbc2a917a7419b33f8379144f51eb8d0" + integrity sha512-mB+njEzO7oezA57IbQxxd6fVPOeWKDmnGvJ485CwmfNchjHe5jWwqKepapmzUEj41yxIAqOg+C4LbXuJlkiO8A== dependencies: regenerate "^1.3.3" regenerate-unicode-properties "^5.1.1" @@ -7112,6 +8172,7 @@ regexpu-core@^4.1.3: regexpu-core@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" + integrity sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw== dependencies: regenerate "^1.4.0" regenerate-unicode-properties "^7.0.0" @@ -7123,6 +8184,7 @@ regexpu-core@^4.2.0: registry-auth-token@^3.0.1: version "3.3.2" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" + integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== dependencies: rc "^1.1.6" safe-buffer "^5.0.1" @@ -7130,36 +8192,43 @@ registry-auth-token@^3.0.1: registry-url@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" + integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= dependencies: rc "^1.0.1" regjsgen@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.3.0.tgz#0ee4a3e9276430cda25f1e789ea6c15b87b0cb43" + integrity sha1-DuSj6SdkMM2iXx54nqbBW4ewy0M= regjsgen@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" + integrity sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA== regjsparser@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.2.1.tgz#c3787553faf04e775c302102ef346d995000ec1c" + integrity sha1-w3h1U/rwTndcMCEC7zRtmVAA7Bw= dependencies: jsesc "~0.5.0" regjsparser@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" + integrity sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA== dependencies: jsesc "~0.5.0" relateurl@0.2.x: version "0.2.7" resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= remove-bom-buffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" + integrity sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ== dependencies: is-buffer "^1.1.5" is-utf8 "^0.2.1" @@ -7167,6 +8236,7 @@ remove-bom-buffer@^3.0.0: remove-bom-stream@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523" + integrity sha1-BfGlk/FuQuH7kOv1nejlaVJflSM= dependencies: remove-bom-buffer "^3.0.0" safe-buffer "^5.1.0" @@ -7175,32 +8245,39 @@ remove-bom-stream@^1.2.0: remove-trailing-separator@^1.0.1, remove-trailing-separator@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + integrity sha1-7wiaF40Ug7quTZPrmLT55OEdmQo= repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= dependencies: is-finite "^1.0.0" replace-ext@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + integrity sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ= replace-ext@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= replace-homedir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-homedir/-/replace-homedir-1.0.0.tgz#e87f6d513b928dde808260c12be7fec6ff6e798c" + integrity sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw= dependencies: homedir-polyfill "^1.0.1" is-absolute "^1.0.0" @@ -7209,12 +8286,14 @@ replace-homedir@^1.0.0: request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" + integrity sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY= dependencies: lodash "^4.13.1" request-promise-native@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" + integrity sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU= dependencies: request-promise-core "1.1.1" stealthy-require "^1.1.0" @@ -7223,6 +8302,7 @@ request-promise-native@^1.0.5: request@2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + integrity sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA= dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" @@ -7250,6 +8330,7 @@ request@2.81.0: request@^2.83.0: version "2.83.0" resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" + integrity sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw== dependencies: aws-sign2 "~0.7.0" aws4 "^1.6.0" @@ -7277,14 +8358,17 @@ request@^2.83.0: require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + integrity sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= dependencies: caller-path "^0.1.0" resolve-from "^1.0.0" @@ -7292,12 +8376,14 @@ require-uncached@^1.0.3: resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= dependencies: resolve-from "^3.0.0" resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= dependencies: expand-tilde "^2.0.0" global-modules "^1.0.0" @@ -7305,46 +8391,55 @@ resolve-dir@^1.0.0, resolve-dir@^1.0.1: resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + integrity sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= resolve-options@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" + integrity sha1-MrueOcBtZzONyTeMDW1gdFZq0TE= dependencies: value-or-function "^3.0.0" resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2: version "1.5.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" + integrity sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw== dependencies: path-parse "^1.0.5" resolve@^1.4.0: version "1.7.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + integrity sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw== dependencies: path-parse "^1.0.5" resolve@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== dependencies: path-parse "^1.0.5" restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + integrity sha1-NGYfRohjJ/7SmRR5FSJS35LapUE= dependencies: exit-hook "^1.0.0" onetime "^1.0.0" @@ -7352,6 +8447,7 @@ restore-cursor@^1.0.1: restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= dependencies: onetime "^2.0.0" signal-exit "^3.0.2" @@ -7359,22 +8455,26 @@ restore-cursor@^2.0.0: ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= dependencies: align-text "^0.1.1" rimraf@2, rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== dependencies: glob "^7.0.5" ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7" + integrity sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc= dependencies: hash-base "^2.0.0" inherits "^2.0.1" @@ -7382,6 +8482,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: rollup-plugin-babel@^4.0.0-beta.0: version "4.0.0-beta.2" resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.0.0-beta.2.tgz#abc05af4644aa52180e3fa2452f909b39b4ef145" + integrity sha1-q8Ba9GRKpSGA4/okUvkJs5tO8UU= dependencies: "@babel/helper-module-imports" "7.0.0-beta.35" rollup-pluginutils "^2.0.1" @@ -7389,6 +8490,7 @@ rollup-plugin-babel@^4.0.0-beta.0: rollup-plugin-node-resolve@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.3.tgz#8f57b253edd00e5b0ad0aed7b7e9cf5982e98fa4" + integrity sha512-qJLXJ1aASV6p8SrEfRdQdHmb5OQmqXyIWIdVGcju8QFzftSsHcuL554Vy+n8mr0fZCC+ksO6aWJ7TAVl2F+Qwg== dependencies: builtin-modules "^1.1.0" is-module "^1.0.0" @@ -7397,6 +8499,7 @@ rollup-plugin-node-resolve@^3.0.2: rollup-pluginutils@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0" + integrity sha1-fslbNXP2VDpGpkYb2afFRFJdD8A= dependencies: estree-walker "^0.3.0" micromatch "^2.3.11" @@ -7404,56 +8507,67 @@ rollup-pluginutils@^2.0.1: rollup-stream@^1.24.1: version "1.24.1" resolved "https://registry.yarnpkg.com/rollup-stream/-/rollup-stream-1.24.1.tgz#9bc002afba51c517e6daa3e17f9559580a460f89" + integrity sha512-iQ159xbWSOPc7ey8tjEYf7pCaQwBz3ov37KNCeDewqh6Qj1gntAgZSmmEJIPs2niXMDNqVZ3rnTFXBXhZ+sYSg== dependencies: rollup "^0.49.2" rollup@^0.49.2: version "0.49.3" resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.49.3.tgz#4cce32643dd8cf2154c69ff0e43470067db0adbf" + integrity sha512-n/vHRX4GhMIyGZEQRANcSFVtvz99bSRbNMuoC33ar9f4CViqffyF9WklLb2mxIQ6I/uFf7wDEpc66bXBFE7FvA== run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= dependencies: is-promise "^2.1.0" run-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" + integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A== rx-lite-aggregates@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= dependencies: rx-lite "*" rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= rxjs@^6.1.0: version "6.3.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.2.tgz#6a688b16c4e6e980e62ea805ec30648e1c60907f" + integrity sha512-hV7criqbR0pe7EeL3O66UYVg92IR0XsA97+9y+BWTePK9SKmEI5Qd3Zj6uPnGkNzXsBywBQWTvujPl+1Kn9Zjw== dependencies: tslib "^1.9.0" safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + integrity sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg== safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= dependencies: ret "~0.1.10" "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sane@^2.0.0: version "2.4.1" resolved "https://registry.yarnpkg.com/sane/-/sane-2.4.1.tgz#29f991208cf28636720efdc584293e7fd66663a5" + integrity sha512-fW9svvNd81XzHDZyis9/tEY1bZikDGryy8Hi1BErPyNPYv47CdLseUN+tI5FBHWXEENRtj1SWtX/jBnggLaP0w== dependencies: anymatch "^1.3.0" exec-sh "^0.2.0" @@ -7468,42 +8582,51 @@ sane@^2.0.0: sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= semver-greatest-satisfied-range@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" + integrity sha1-E+jCZYq5aRywzXEJMkAoDTb3els= dependencies: sver-compat "^1.5.0" "semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== semver@^5.5.1: version "5.5.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw== set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= set-getter@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" + integrity sha1-12nBgsnVpR9AkUXy+6guXoboA3Y= dependencies: to-object-path "^0.3.0" set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -7513,6 +8636,7 @@ set-value@^0.4.3: set-value@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -7522,10 +8646,12 @@ set-value@^2.0.0: setimmediate@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4: version "2.4.10" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.10.tgz#b1fde5cd7d11a5626638a07c604ab909cfa31f9b" + integrity sha512-vnwmrFDlOExK4Nm16J2KMWHLrp14lBrjxMxBJpu++EnsuBmpiYaM/MEs46Vxxm/4FvdP5yTwuCTO9it5FSjrqA== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" @@ -7533,6 +8659,7 @@ sha.js@^2.4.0, sha.js@^2.4.8, sha.js@~2.4.4: shasum@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/shasum/-/shasum-1.0.2.tgz#e7012310d8f417f4deb5712150e5678b87ae565f" + integrity sha1-5wEjENj0F/TetXEhUOVni4euVl8= dependencies: json-stable-stringify "~0.0.0" sha.js "~2.4.4" @@ -7540,16 +8667,19 @@ shasum@^1.0.0: shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= shell-quote@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" + integrity sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c= dependencies: array-filter "~0.0.0" array-map "~0.0.0" @@ -7559,36 +8689,44 @@ shell-quote@^1.6.1: shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= sisteransi@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" + integrity sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g== slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= slice-ansi@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + integrity sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg== dependencies: is-fullwidth-code-point "^2.0.0" snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== dependencies: define-property "^1.0.0" isobject "^3.0.0" @@ -7597,12 +8735,14 @@ snapdragon-node@^2.0.1: snapdragon-util@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== dependencies: kind-of "^3.2.0" snapdragon@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.1.tgz#e12b5487faded3e3dea0ac91e9400bf75b401370" + integrity sha1-4StUh/re0+PeoKyR6UAL91tAE3A= dependencies: base "^0.11.1" debug "^2.2.0" @@ -7616,28 +8756,33 @@ snapdragon@^0.8.1: sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + integrity sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg= dependencies: hoek "2.x.x" sntp@2.x.x: version "2.1.0" resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" + integrity sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg== dependencies: hoek "4.x.x" sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= dependencies: is-plain-obj "^1.0.0" source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" + integrity sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A== source-map-resolve@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" + integrity sha512-0KW2wvzfxm8NCTb30z0LMNyPqWCdDGE2viwzUaucqJdkTRXtZiSY3I+2A6nVAjmdOy0I4gU8DwnVVGsk9jvP2A== dependencies: atob "^2.0.0" decode-uri-component "^0.2.0" @@ -7648,12 +8793,14 @@ source-map-resolve@^0.5.0: source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== dependencies: source-map "^0.5.6" source-map-support@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" + integrity sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -7661,6 +8808,7 @@ source-map-support@^0.5.6: source-map-support@^0.5.9: version "0.5.9" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" + integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -7668,28 +8816,34 @@ source-map-support@^0.5.9: source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.3: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= source-map@^0.4.4, source-map@~0.4.0, source-map@~0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + integrity sha1-66T12pwNyZneaAMti092FzZSA2s= dependencies: amdefine ">=0.0.4" source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + integrity sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM= spdx-correct@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + integrity sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" @@ -7697,10 +8851,12 @@ spdx-correct@^3.0.0: spdx-exceptions@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + integrity sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg== spdx-expression-parse@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" @@ -7708,32 +8864,38 @@ spdx-expression-parse@^3.0.0: spdx-license-ids@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + integrity sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== dependencies: extend-shallow "^3.0.0" split2@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" + integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== dependencies: through2 "^2.0.2" split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== dependencies: through "2" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: version "1.13.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + integrity sha1-US322mKHFEMW3EwY/hzx2UBzm+M= dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -7748,18 +8910,22 @@ sshpk@^1.7.0: stack-trace@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= stack-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" + integrity sha1-1PM6tU6OOHeLDKXP07OvsS22hiA= staged-git-files@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.1.tgz#37c2218ef0d6d26178b1310719309a16a59f8f7b" + integrity sha512-H89UNKr1rQJvI1c/PIR3kiAMBV23yvR7LItZiV74HWZwzt7f3YHuujJ9nJZlt58WlFox7XQsOahexwk7nTe69A== static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= dependencies: define-property "^0.2.5" object-copy "^0.1.0" @@ -7767,10 +8933,12 @@ static-extend@^0.1.1: stealthy-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= stream-browserify@^2.0.0, stream-browserify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" + integrity sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds= dependencies: inherits "~2.0.1" readable-stream "^2.0.2" @@ -7778,6 +8946,7 @@ stream-browserify@^2.0.0, stream-browserify@^2.0.1: stream-combiner2@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + integrity sha1-+02KFCDqNidk4hrUeAOXvry0HL4= dependencies: duplexer2 "~0.1.0" readable-stream "^2.0.2" @@ -7785,10 +8954,12 @@ stream-combiner2@^1.1.1: stream-exhaust@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" + integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw== stream-http@^2.0.0, stream-http@^2.7.2: version "2.8.0" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.0.tgz#fd86546dac9b1c91aff8fc5d287b98fafb41bc10" + integrity sha512-sZOFxI/5xw058XIRHl4dU3dZ+TTOIGJR78Dvo0oEAejIt4ou27k+3ne1zYmCV+v7UucbxIFQuOgnkTVHh8YPnw== dependencies: builtin-status-codes "^3.0.0" inherits "^2.0.1" @@ -7799,10 +8970,12 @@ stream-http@^2.0.0, stream-http@^2.7.2: stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= stream-splicer@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/stream-splicer/-/stream-splicer-2.0.0.tgz#1b63be438a133e4b671cc1935197600175910d83" + integrity sha1-G2O+Q4oTPktnHMGTUZdgAXWRDYM= dependencies: inherits "^2.0.1" readable-stream "^2.0.2" @@ -7810,16 +8983,19 @@ stream-splicer@^2.0.0: streamfilter@^1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/streamfilter/-/streamfilter-1.0.7.tgz#ae3e64522aa5a35c061fd17f67620c7653c643c9" + integrity sha512-Gk6KZM+yNA1JpW0KzlZIhjo3EaBJDkYfXtYSbOwNIQ7Zd6006E6+sCFlW1NDvFG/vnXhKmw6TJJgiEQg/8lXfQ== dependencies: readable-stream "^2.0.2" string-argv@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" + integrity sha1-2sMECGkMIfPDYwo/86BYd73L1zY= string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= dependencies: astral-regex "^1.0.0" strip-ansi "^4.0.0" @@ -7827,6 +9003,7 @@ string-length@^2.0.0: string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" @@ -7835,6 +9012,7 @@ string-width@^1.0.1, string-width@^1.0.2: string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" @@ -7842,6 +9020,7 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: string.prototype.padend@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" + integrity sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA= dependencies: define-properties "^1.1.2" es-abstract "^1.4.3" @@ -7850,22 +9029,26 @@ string.prototype.padend@^3.0.0: string_decoder@^1.0.0, string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + integrity sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ== dependencies: safe-buffer "~5.1.0" string_decoder@^1.1.1, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= stringify-object@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.2.tgz#9853052e5a88fb605a44cd27445aa257ad7ffbcd" + integrity sha512-O696NF21oLiDy8PhpWu8AEqoZHw++QW6mUv0UvKZe8gWSdSvMXkiLufK7OmnP27Dro4GU5kb9U7JIO0mBuCRQg== dependencies: get-own-enumerable-property-symbols "^2.0.1" is-obj "^1.0.1" @@ -7874,22 +9057,26 @@ stringify-object@^3.2.2: stringstream@~0.0.4, stringstream@~0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + integrity sha1-TkhM1N5aC7vuGORjB3EKioFiGHg= strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= dependencies: ansi-regex "^3.0.0" strip-bom-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca" + integrity sha1-+H217yYT9paKpUWr/h7HKLaoKco= dependencies: first-chunk-stream "^2.0.0" strip-bom "^2.0.0" @@ -7897,34 +9084,41 @@ strip-bom-stream@^2.0.0: strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= dependencies: is-utf8 "^0.2.0" strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= strip-indent@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= dependencies: get-stdin "^4.0.1" strip-indent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= strong-log-transformer@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz#f7fb93758a69a571140181277eea0c2eb1301fa3" + integrity sha1-9/uTdYpppXEUAYEnfuoMLrEwH6M= dependencies: byline "^5.0.0" duplexer "^0.1.1" @@ -7935,34 +9129,40 @@ strong-log-transformer@^1.0.6: subarg@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2" + integrity sha1-9izxdYHplrSPyWVpn1TAauJouNI= dependencies: minimist "^1.1.0" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= supports-color@^3.1.2: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= dependencies: has-flag "^1.0.0" supports-color@^4.2.1: version "4.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + integrity sha1-vnoN5ITexcXN34s9WRJQRJEvY1s= dependencies: has-flag "^2.0.0" supports-color@^5.2.0, supports-color@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" + integrity sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg== dependencies: has-flag "^3.0.0" sver-compat@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" + integrity sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= dependencies: es6-iterator "^2.0.1" es6-symbol "^3.1.1" @@ -7970,20 +9170,24 @@ sver-compat@^1.5.0: symbol-observable@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= syntax-error@^1.1.1: version "1.4.0" resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c" + integrity sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w== dependencies: acorn-node "^1.2.0" table@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" + integrity sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg== dependencies: ajv "^6.0.1" ajv-keywords "^3.0.0" @@ -7995,10 +9199,12 @@ table@^4.0.3: tapable@^0.2.7: version "0.2.8" resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" + integrity sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI= tar-pack@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" + integrity sha512-PPRybI9+jM5tjtCbN2cxmmRU7YmqT3Zv/UDy48tAh2XRkLa9bAORtSWLkVc13+GJF+cdTh1yEnHEk3cpTaL5Kg== dependencies: debug "^2.2.0" fstream "^1.0.10" @@ -8012,6 +9218,7 @@ tar-pack@^3.4.0: tar@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + integrity sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE= dependencies: block-stream "*" fstream "^1.0.2" @@ -8020,6 +9227,7 @@ tar@^2.2.1: tar@^4: version "4.4.1" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.1.tgz#b25d5a8470c976fd7a9a8a350f42c59e9fa81749" + integrity sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg== dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" @@ -8032,10 +9240,12 @@ tar@^4: temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= temp-write@^3.3.0: version "3.4.0" resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" + integrity sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= dependencies: graceful-fs "^4.1.2" is-stream "^1.1.0" @@ -8047,6 +9257,7 @@ temp-write@^3.3.0: tempfile@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + integrity sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I= dependencies: os-tmpdir "^1.0.0" uuid "^2.0.1" @@ -8054,6 +9265,7 @@ tempfile@^1.1.1: test-exclude@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" + integrity sha512-qpqlP/8Zl+sosLxBcVKl9vYy26T9NPalxSzzCP/OY6K7j938ui2oKgo+kRZYfxAeIpLqpbVnsHq1tyV70E4lWQ== dependencies: arrify "^1.0.1" micromatch "^3.1.8" @@ -8064,6 +9276,7 @@ test-exclude@^4.2.1: test262-parser@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/test262-parser/-/test262-parser-2.0.7.tgz#733b46bf7759e747eae34b5b14d6a3c8d2082add" + integrity sha1-cztGv3dZ50fq40tbFNajyNIIKt0= dependencies: js-yaml "^3.2.1" through "^2.3.4" @@ -8071,6 +9284,7 @@ test262-parser@^2.0.7: test262-stream@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/test262-stream/-/test262-stream-1.2.0.tgz#37f03bf56672ec0f0120596372ea98313309d32e" + integrity sha512-SHuSII4Dmg4BTNybTYf+h8rFs7y8rqm+WP9XxxrJvhOmbbkItlo4zRgaoavNUNbCMWrZiy6e81DF3vJhIlkf8A== dependencies: klaw "^2.1.0" test262-parser "^2.0.7" @@ -8078,18 +9292,22 @@ test262-stream@^1.2.0: text-extensions@^1.0.0: version "1.7.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39" + integrity sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg== text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= through2-filter@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" + integrity sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw= dependencies: through2 "~2.0.0" xtend "~4.0.0" @@ -8097,6 +9315,7 @@ through2-filter@^2.0.0: through2@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/through2/-/through2-1.1.1.tgz#0847cbc4449f3405574dbdccd9bb841b83ac3545" + integrity sha1-CEfLxESfNAVXTb3M2buEG4OsNUU= dependencies: readable-stream ">=1.1.13-1 <1.2.0-0" xtend ">=4.0.0 <4.1.0-0" @@ -8104,6 +9323,7 @@ through2@^1.0.0: through2@^2.0.0, through2@^2.0.1, through2@^2.0.2, through2@^2.0.3, through2@~2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + integrity sha1-AARWmzfHx0ujnEPzzteNGtlBQL4= dependencies: readable-stream "^2.1.5" xtend "~4.0.1" @@ -8111,40 +9331,48 @@ through2@^2.0.0, through2@^2.0.1, through2@^2.0.2, through2@^2.0.3, through2@~2. through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= time-stamp@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" + integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= timed-out@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= timers-browserify@^1.0.1: version "1.4.2" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" + integrity sha1-ycWLV1voQHN1y14kYtrO50NZ9B0= dependencies: process "~0.11.0" timers-browserify@^2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.6.tgz#241e76927d9ca05f4d959819022f5b3664b64bae" + integrity sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw== dependencies: setimmediate "^1.0.4" tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== dependencies: os-tmpdir "~1.0.2" tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= to-absolute-glob@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" + integrity sha1-GGX0PZ50sIItufFFt4z/fQ98hJs= dependencies: is-absolute "^1.0.0" is-negated-glob "^1.0.0" @@ -8152,24 +9380,29 @@ to-absolute-glob@^2.0.0: to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= dependencies: kind-of "^3.0.2" to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= dependencies: is-number "^3.0.0" repeat-string "^1.6.1" @@ -8177,6 +9410,7 @@ to-regex-range@^2.1.0: to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== dependencies: define-property "^2.0.2" extend-shallow "^3.0.2" @@ -8186,72 +9420,87 @@ to-regex@^3.0.1, to-regex@^3.0.2: to-through@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6" + integrity sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY= dependencies: through2 "^2.0.3" tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA== dependencies: punycode "^1.4.1" tr46@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= dependencies: punycode "^2.1.0" trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= trim-newlines@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" + integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= trim-off-newlines@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= tty-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811" + integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw== tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= uglify-js@3.3.x, uglify-js@^3.0.5: version "3.3.13" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.13.tgz#8a1a89eeb16e2d6a66b0db2b04cb871af3c669cf" + integrity sha512-7rdn/bDOG1ElSTPdh7AI5TCjLv63ZD4k8BBadN3ssIkhlaQL2c0yRxmXCyOYhZK0wZTgGgUSnYQ4CGu+Jos5cA== dependencies: commander "~2.14.1" source-map "~0.6.1" @@ -8259,6 +9508,7 @@ uglify-js@3.3.x, uglify-js@^3.0.5: uglify-js@^2.4.16, uglify-js@^2.6, uglify-js@^2.8.29: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= dependencies: source-map "~0.5.1" yargs "~3.10.0" @@ -8268,10 +9518,12 @@ uglify-js@^2.4.16, uglify-js@^2.6, uglify-js@^2.8.29: uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= uglifyjs-webpack-plugin@^0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" + integrity sha1-uVH0q7a9YX5m9j64kUmOORdj4wk= dependencies: source-map "^0.5.6" uglify-js "^2.8.29" @@ -8280,22 +9532,27 @@ uglifyjs-webpack-plugin@^0.4.6: uid-number@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= umd@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e" + integrity sha1-iuVW4RAR9jwllnCKiDclnwGz1g4= unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= undertaker-registry@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" + integrity sha1-XkvaMI5KiirlhPm5pDWaSZglzFA= undertaker@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/undertaker/-/undertaker-1.2.0.tgz#339da4646252d082dc378e708067299750e11b49" + integrity sha1-M52kZGJS0ILcN45wgGcpl1DhG0k= dependencies: arr-flatten "^1.0.1" arr-map "^2.0.0" @@ -8310,14 +9567,17 @@ undertaker@^1.0.0: unicode-canonical-property-names-ecmascript@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.3.tgz#f6119f417467593c0086357c85546b6ad5abc583" + integrity sha512-iG/2t0F2LAU8aZYPkX5gi7ebukHnr3sWFESpb+zPQeeaQwOkfoO6ZW17YX7MdRPNG9pCy+tjzGill+Ah0Em0HA== unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== unicode-match-property-ecmascript@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.3.tgz#db9b1cb4ffc67e0c5583780b1b59370e4cbe97b9" + integrity sha512-nFcaBFcr08UQNF15ZgI5ISh3yUnQm7SJRRxwYrL5VYX46pS+6Q7TCTv4zbK+j6/l7rQt0mMiTL2zpmeygny6rA== dependencies: unicode-canonical-property-names-ecmascript "^1.0.2" unicode-property-aliases-ecmascript "^1.0.3" @@ -8325,6 +9585,7 @@ unicode-match-property-ecmascript@^1.0.3: unicode-match-property-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== dependencies: unicode-canonical-property-names-ecmascript "^1.0.4" unicode-property-aliases-ecmascript "^1.0.4" @@ -8332,22 +9593,27 @@ unicode-match-property-ecmascript@^1.0.4: unicode-match-property-value-ecmascript@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.1.tgz#fea059120a016f403afd3bf586162b4db03e0604" + integrity sha512-lM8B0FDZQh9yYGgiabRQcyWicB27VLOolSBRIxsO7FeQPtg+79Oe7sC8Mzr8BObDs+G9CeYmC/shHo6OggNEog== unicode-match-property-value-ecmascript@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" + integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ== unicode-property-aliases-ecmascript@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.3.tgz#ac3522583b9e630580f916635333e00c5ead690d" + integrity sha512-TdDmDOTxEf2ad1g3ZBpM6cqKIb2nJpVlz1Q++casDryKz18tpeMBhSng9hjC1CTQCkOV9Rw2knlSB6iRo7ad1w== unicode-property-aliases-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" + integrity sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg== union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= dependencies: arr-union "^3.1.0" get-value "^2.0.6" @@ -8357,6 +9623,7 @@ union-value@^1.0.0: unique-stream@^2.0.2: version "2.2.1" resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369" + integrity sha1-WqADz76Uxf+GbE59ZouxxNuts2k= dependencies: json-stable-stringify "^1.0.0" through2-filter "^2.0.0" @@ -8364,10 +9631,12 @@ unique-stream@^2.0.2: universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" + integrity sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc= unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= dependencies: has-value "^0.3.1" isobject "^3.0.0" @@ -8375,34 +9644,41 @@ unset-value@^1.0.0: unzip-response@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" + integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= upath@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= uri-js@^4.2.1, uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== dependencies: punycode "^2.1.0" urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= dependencies: prepend-http "^1.0.1" url@^0.11.0, url@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= dependencies: punycode "1.3.2" querystring "0.2.0" @@ -8410,6 +9686,7 @@ url@^0.11.0, url@~0.11.0: use@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/use/-/use-2.0.2.tgz#ae28a0d72f93bf22422a18a2e379993112dec8e8" + integrity sha1-riig1y+TvyJCKhii43mZMRLeyOg= dependencies: define-property "^0.2.5" isobject "^3.0.0" @@ -8418,10 +9695,12 @@ use@^2.0.0: util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= util.promisify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== dependencies: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" @@ -8429,26 +9708,31 @@ util.promisify@^1.0.0: util@0.10.3, util@^0.10.3, util@~0.10.1: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= dependencies: inherits "2.0.1" uuid@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho= uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA== v8flags@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.0.2.tgz#ad6a78a20a6b23d03a8debc11211e3cc23149477" + integrity sha512-6sgSKoFw1UpUPd3cFdF7QGnrH6tDeBgW1F3v9gy8gLY0mlbiBXq8soy8aQpY6xeeCjH5K+JvC62Acp7gtl7wWA== dependencies: homedir-polyfill "^1.0.1" validate-npm-package-license@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" + integrity sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" @@ -8456,10 +9740,12 @@ validate-npm-package-license@^3.0.1: value-or-function@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" + integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" @@ -8468,6 +9754,7 @@ verror@1.10.0: vinyl-buffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/vinyl-buffer/-/vinyl-buffer-1.0.1.tgz#96c1a3479b8c5392542c612029013b5b27f88bbf" + integrity sha1-lsGjR5uMU5JULGEgKQE7Wyf4i78= dependencies: bl "^1.2.1" through2 "^2.0.3" @@ -8475,6 +9762,7 @@ vinyl-buffer@^1.0.1: vinyl-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-2.0.0.tgz#a7ebf5ffbefda1b7d18d140fcb07b223efb6751a" + integrity sha1-p+v1/779obfRjRQPyweyI++2dRo= dependencies: graceful-fs "^4.1.2" pify "^2.3.0" @@ -8486,6 +9774,7 @@ vinyl-file@^2.0.0: vinyl-fs@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.2.tgz#1b86258844383f57581fcaac081fe09ef6d6d752" + integrity sha512-AUSFda1OukBwuLPBTbyuO4IRWgfXmqC4UTW0f8xrCa8Hkv9oyIU+NSqBlgfOLZRoUt7cHdo75hKQghCywpIyIw== dependencies: fs-mkdirp-stream "^1.0.0" glob-stream "^6.1.0" @@ -8508,6 +9797,7 @@ vinyl-fs@^3.0.0: vinyl-source-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/vinyl-source-stream/-/vinyl-source-stream-2.0.0.tgz#f38a5afb9dd1e93b65d550469ac6182ac4f54b8e" + integrity sha1-84pa+53R6Ttl1VBGmsYYKsT1S44= dependencies: through2 "^2.0.3" vinyl "^2.1.0" @@ -8515,6 +9805,7 @@ vinyl-source-stream@^2.0.0: vinyl-sourcemap@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" + integrity sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY= dependencies: append-buffer "^1.0.2" convert-source-map "^1.5.0" @@ -8527,12 +9818,14 @@ vinyl-sourcemap@^1.1.0: vinyl-sourcemaps-apply@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + integrity sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU= dependencies: source-map "^0.5.1" vinyl@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + integrity sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4= dependencies: clone "^1.0.0" clone-stats "^0.0.1" @@ -8541,6 +9834,7 @@ vinyl@^0.5.0: vinyl@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + integrity sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ= dependencies: clone "^1.0.0" clone-stats "^0.0.1" @@ -8549,6 +9843,7 @@ vinyl@^1.1.0: vinyl@^2.0.0, vinyl@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c" + integrity sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw= dependencies: clone "^2.1.1" clone-buffer "^1.0.0" @@ -8560,28 +9855,33 @@ vinyl@^2.0.0, vinyl@^2.1.0: vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM= dependencies: indexof "0.0.1" vm-browserify@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019" + integrity sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw== w3c-hr-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" + integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= dependencies: browser-process-hrtime "^0.1.2" walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= dependencies: makeerror "1.0.x" watch@~0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + integrity sha1-KAlUdsbffJDJYxOJkMClQj60uYY= dependencies: exec-sh "^0.2.0" minimist "^1.2.0" @@ -8589,6 +9889,7 @@ watch@~0.18.0: watchpack@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.5.0.tgz#231e783af830a22f8966f65c4c4bacc814072eed" + integrity sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA== dependencies: chokidar "^2.0.2" graceful-fs "^4.1.2" @@ -8597,16 +9898,19 @@ watchpack@^1.4.0: wcwidth@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= dependencies: defaults "^1.0.3" webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== webpack-dependency-suite@^2.4.4: version "2.4.5" resolved "https://registry.yarnpkg.com/webpack-dependency-suite/-/webpack-dependency-suite-2.4.5.tgz#e2d3c9a178140edb7be41de57413a31cb2f11ec0" + integrity sha512-UyAXvIu12XjcuiUkO1QQ7xRC/rpOyCfdCOhlhgJrLkt2FqK/l0dhynVxLRHO/QyGoNpfoO0N7k+m/LTxfriwrQ== dependencies: "@types/acorn" "^4.0.2" "@types/cheerio" "^0.22.1" @@ -8631,6 +9935,7 @@ webpack-dependency-suite@^2.4.4: webpack-sources@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" + integrity sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw== dependencies: source-list-map "^2.0.0" source-map "~0.6.1" @@ -8638,6 +9943,7 @@ webpack-sources@^1.0.1: webpack-stream@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/webpack-stream/-/webpack-stream-4.0.2.tgz#7b90aec71d45c8a4519ff8b5a4d59e039cfd02c0" + integrity sha512-x9st6kLpPXaB7wPb7nKVtTgdIZx2TFV0+rTAzMQEPyA72qzYPKR5OItxP7e1vTtbX5T4Fm7rAlMPfAq1Ijq6gg== dependencies: fancy-log "^1.3.2" lodash.clone "^4.3.2" @@ -8652,6 +9958,7 @@ webpack-stream@^4.0.0: webpack@^3.4.1: version "3.11.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.11.0.tgz#77da451b1d7b4b117adaf41a1a93b5742f24d894" + integrity sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg== dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" @@ -8679,12 +9986,14 @@ webpack@^3.4.1: whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" + integrity sha512-jLBwwKUhi8WtBfsMQlL4bUUcT8sMkAtQinscJAe/M4KHCkHuUJAF6vuB0tueNIw4c8ziO6AkRmgY+jL3a0iiPw== dependencies: iconv-lite "0.4.19" whatwg-url@^6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" + integrity sha512-Z0CVh/YE217Foyb488eo+iBv+r7eAQ0wSTyApi9n06jhcA3z6Nidg/EGvl0UFkg7kMdKxfBzzr+o9JF+cevgMg== dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.0" @@ -8693,42 +10002,51 @@ whatwg-url@^6.4.0: which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= which@^1.2.10, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + integrity sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg== dependencies: isexe "^2.0.0" wide-align@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + integrity sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w== dependencies: string-width "^1.0.2" window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" @@ -8736,10 +10054,12 @@ wrap-ansi@^2.0.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" @@ -8748,6 +10068,7 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: write-json-file@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" + integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= dependencies: detect-indent "^5.0.0" graceful-fs "^4.1.2" @@ -8759,6 +10080,7 @@ write-json-file@^2.2.0: write-pkg@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.2.0.tgz#0e178fe97820d389a8928bc79535dbe68c2cff21" + integrity sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw== dependencies: sort-keys "^2.0.0" write-json-file "^2.2.0" @@ -8766,12 +10088,14 @@ write-pkg@^3.1.0: write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + integrity sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= dependencies: mkdirp "^0.5.1" ws@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289" + integrity sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA== dependencies: async-limiter "~1.0.0" safe-buffer "~5.1.0" @@ -8779,54 +10103,65 @@ ws@^4.0.0: xml-char-classes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/xml-char-classes/-/xml-char-classes-1.0.0.tgz#64657848a20ffc5df583a42ad8a277b4512bbc4d" + integrity sha1-ZGV4SKIP/F31g6Qq2KJ3tFErvE0= xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= yallist@^3.0.0, yallist@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k= yargs-parser@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + integrity sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw= dependencies: camelcase "^3.0.0" yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + integrity sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo= dependencies: camelcase "^3.0.0" yargs-parser@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= dependencies: camelcase "^4.1.0" yargs-parser@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= dependencies: camelcase "^4.1.0" yargs@^11.0.0: version "11.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" + integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== dependencies: cliui "^4.0.0" decamelize "^1.1.1" @@ -8844,6 +10179,7 @@ yargs@^11.0.0: yargs@^6.5.0, yargs@^6.6.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + integrity sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg= dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -8862,6 +10198,7 @@ yargs@^6.5.0, yargs@^6.6.0: yargs@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + integrity sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg= dependencies: camelcase "^3.0.0" cliui "^3.2.0" @@ -8880,6 +10217,7 @@ yargs@^7.1.0: yargs@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + integrity sha1-YpmpBVsc78lp/355wdkY3Osiw2A= dependencies: camelcase "^4.1.0" cliui "^3.2.0" @@ -8898,6 +10236,7 @@ yargs@^8.0.2: yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= dependencies: camelcase "^1.0.2" cliui "^2.1.0" From f71e4660d433f00651f8e36913265a82cd5bc73f Mon Sep 17 00:00:00 2001 From: Vyom Jain Date: Sun, 14 Oct 2018 22:14:02 +0530 Subject: [PATCH 052/563] fixed an extra word "visit join" doesn't sound right. Either there is a word missing or the word 'visit' may be removed. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc2f50d52efa..7d09826914b5 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ Mostly a handful of volunteers! Please check out our [team page](https://babeljs ### Looking for support? -For questions and support please visit join our [Slack Community](https://slack.babeljs.io/) (you can sign-up [here](https://slack.babeljs.io/) for an invite), ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/babeljs), or ping us on [Twitter](https://twitter.com/babeljs). +For questions and support please join our [Slack Community](https://slack.babeljs.io/) (you can sign-up [here](https://slack.babeljs.io/) for an invite), ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/babeljs), or ping us on [Twitter](https://twitter.com/babeljs). ### Is there a Babel song? From e541d6031af4008cb649d3408f7387fbb4106bc8 Mon Sep 17 00:00:00 2001 From: Cyp Date: Tue, 16 Oct 2018 21:25:49 +0200 Subject: [PATCH 053/563] fix: Expression x === 'y' && '' should not evaluate to undefined. (#8880) Fixes https://github.com/babel/minify/issues/908. --- .../babel-traverse/src/path/evaluation.js | 14 +++-------- packages/babel-traverse/test/evaluation.js | 23 +++++++++++++++++++ 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/packages/babel-traverse/src/path/evaluation.js b/packages/babel-traverse/src/path/evaluation.js index 90029cbe1e3c..a970bd9aee73 100644 --- a/packages/babel-traverse/src/path/evaluation.js +++ b/packages/babel-traverse/src/path/evaluation.js @@ -257,7 +257,7 @@ function _evaluate(path, state) { } if (path.isLogicalExpression()) { - // If we are confident that one side of an && is false, or the left + // If we are confident that the left side of an && is false, or the left // side of an || is true, we can be confident about the entire expression const wasConfident = state.confident; const left = evaluateCached(path.get("left"), state); @@ -265,25 +265,17 @@ function _evaluate(path, state) { state.confident = wasConfident; const right = evaluateCached(path.get("right"), state); const rightConfident = state.confident; - state.confident = leftConfident && rightConfident; switch (node.operator) { case "||": // TODO consider having a "truthy type" that doesn't bail on // left uncertainty but can still evaluate to truthy. - if (left && leftConfident) { - state.confident = true; - return left; - } - + state.confident = leftConfident && (!!left || rightConfident); if (!state.confident) return; return left || right; case "&&": - if ((!left && leftConfident) || (!right && rightConfident)) { - state.confident = true; - } - + state.confident = leftConfident && (!left || rightConfident); if (!state.confident) return; return left && right; diff --git a/packages/babel-traverse/test/evaluation.js b/packages/babel-traverse/test/evaluation.js index 5c1b51beb02e..a9502b1c8025 100644 --- a/packages/babel-traverse/test/evaluation.js +++ b/packages/babel-traverse/test/evaluation.js @@ -40,6 +40,29 @@ describe("evaluation", function() { ).toBe(false); }); + it("should short-circuit && and ||", function() { + expect( + getPath("x === 'y' || 42") + .get("body")[0] + .evaluate().confident, + ).toBe(false); + expect( + getPath("x === 'y' && 0") + .get("body")[0] + .evaluate().confident, + ).toBe(false); + expect( + getPath("42 || x === 'y'") + .get("body")[0] + .evaluate().value, + ).toBe(42); + expect( + getPath("0 && x === 'y'") + .get("body")[0] + .evaluate().value, + ).toBe(0); + }); + it("should work with repeated, indeterminate identifiers", function() { expect( getPath("var num = foo(); (num > 0 && num < 100);") From b576bf4b41e5f911862524f5889873f5f589f8f5 Mon Sep 17 00:00:00 2001 From: Byron Luk Date: Thu, 18 Oct 2018 23:49:33 -0700 Subject: [PATCH 054/563] fix typo in contributing guidelines (#8901) [skip ci] --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c5a3ec7910c..e7b9bd953b54 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -310,7 +310,7 @@ Note that the code shown in Chrome DevTools is compiled code and therefore diffe - Create a new issue that describes the proposal (ex: [#538](https://github.com/babel/babylon/issues/538)). Include any relevant information like proposal repo/author, examples, parsing approaches, meeting notes, presentation slides, and more. - The pull request should include: - [ ] An update to the [plugins](https://github.com/babel/babel/tree/master/packages/babel-parser#plugins) part of the readme. Add a new entry to that list for the new plugin flag (and link to the proposal) - - [ ] If any new nodes or modifications need to be added to the AST, update [ast/spec.md](https://github.com/babel/babel/bloc/master/packages/babel-parser/ast/spec.md) + - [ ] If any new nodes or modifications need to be added to the AST, update [ast/spec.md](https://github.com/babel/babel/blob/master/packages/babel-parser/ast/spec.md) - [ ] Make sure you use the `this.hasPlugin("plugin-name-here")` check in the babel parser so that your new plugin code only runs when that flag is turned on (not default behavior) - [ ] Add failing/passing tests according to spec behavior - Start working about the Babel transform itself! From 9d0dcedb2b42c95e51a7892b5139b752a98f6e20 Mon Sep 17 00:00:00 2001 From: 0xflotus <26602940+0xflotus@users.noreply.github.com> Date: Sat, 20 Oct 2018 00:51:46 +0200 Subject: [PATCH 055/563] fixed "source map" formatting in comment (#8878) [skip ci] --- packages/babel-cli/src/babel/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-cli/src/babel/options.js b/packages/babel-cli/src/babel/options.js index 14ff1b74e032..d8a5bd4f3f7e 100644 --- a/packages/babel-cli/src/babel/options.js +++ b/packages/babel-cli/src/babel/options.js @@ -81,7 +81,7 @@ commander.option( "print a comment after any injected non-user code", ); -// General soucemap formatting. +// General source map formatting. commander.option("-s, --source-maps [true|false|inline|both]", "", booleanify); commander.option( "--source-map-target [string]", From 84e7884d9c9b3969b89bb4f5825415acb4c0849e Mon Sep 17 00:00:00 2001 From: Thiago Arrais Date: Thu, 25 Oct 2018 11:46:36 -0300 Subject: [PATCH 056/563] Treat break inside block inside loop (#8914) --- .../src/index.js | 4 +- .../fixtures/exec/switch-labeled-break.js | 14 +++ .../block-inside-switch-inside-loop/exec.js | 51 +++++++++++ .../block-inside-switch-inside-loop/input.js | 48 +++++++++++ .../block-inside-switch-inside-loop/output.js | 85 +++++++++++++++++++ 5 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/exec/switch-labeled-break.js create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/exec.js create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/input.js create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/output.js diff --git a/packages/babel-plugin-transform-block-scoping/src/index.js b/packages/babel-plugin-transform-block-scoping/src/index.js index 560368cf0fbf..6eb209a0d058 100644 --- a/packages/babel-plugin-transform-block-scoping/src/index.js +++ b/packages/babel-plugin-transform-block-scoping/src/index.js @@ -289,7 +289,7 @@ const loopVisitor = { }, "BreakStatement|ContinueStatement|ReturnStatement"(path, state) { - const { node, parent, scope } = path; + const { node, scope } = path; if (node[this.LOOP_IGNORE]) return; let replace; @@ -309,7 +309,7 @@ const loopVisitor = { if (state.ignoreLabeless) return; // break statements mean something different in this context - if (t.isBreakStatement(node) && t.isSwitchCase(parent)) return; + if (t.isBreakStatement(node) && state.inSwitchCase) return; } state.hasBreakContinue = true; diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/exec/switch-labeled-break.js b/packages/babel-plugin-transform-block-scoping/test/fixtures/exec/switch-labeled-break.js new file mode 100644 index 000000000000..a81996184293 --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/exec/switch-labeled-break.js @@ -0,0 +1,14 @@ +// it shouldn't break on a case-break statement +var i; +the_loop: for (i = 0; i < 10; i++) { + switch (i) { + case 3: { + break the_loop; + } + } + + const z = 3; // to force the plugin to convert to loop function call + () => z; +} + +expect(i).toBe(3); diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/exec.js b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/exec.js new file mode 100644 index 000000000000..6ab05df0697c --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/exec.js @@ -0,0 +1,51 @@ +// it shouldn't break on a case-break statement +var i; +for (i = 0; i < 10; i++) { + switch (i) { + case 1: { + break; + } + } + + const z = 3; // to force the plugin to convert to loop function call + () => z; +} + +expect(i).toBe(10); + +// it should continue on continue statements within switch +var j = 0; +for (i = 0; i < 10; i++) { + switch (i) { + case 0: { + continue; + } + } + j++; + + const z = 3; + () => z; +} + +expect(j).toBe(9); + +// it should work with loops nested within switch +j = 0; +for (i = 0; i < 10; i++) { + switch (i) { + case 0: { + for (var k = 0; k < 10; k++) { + const z = 3; + () => z; + j++; + break; + } + break; + } + } + + const z = 3; + () => z; +} + +expect(j).toBe(1); diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/input.js b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/input.js new file mode 100644 index 000000000000..39e162890d03 --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/input.js @@ -0,0 +1,48 @@ +// it shouldn't break on a case-break statement +var i; +for (i = 0; i < 10; i++) { + switch (i) { + case 1: + break; + } + + const z = 3; // to force the plugin to convert to loop function call + () => z; +} + +expect(i).toBe(10); + +// it should continue on continue statements within switch +var j = 0; +for (i = 0; i < 10; i++) { + switch (i) { + case 0: + continue; + } + j++; + + const z = 3; + () => z; +} + +expect(j).toBe(9); + +// it should work with loops nested within switch +j = 0; +for (i = 0; i < 10; i++) { + switch (i) { + case 0: + for (var k = 0; k < 10; k++) { + const z = 3; + () => z; + j++; + break; + } + break; + } + + const z = 3; + () => z; +} + +expect(j).toBe(1); diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/output.js b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/output.js new file mode 100644 index 000000000000..2e502dabfae3 --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/block-inside-switch-inside-loop/output.js @@ -0,0 +1,85 @@ +// it shouldn't break on a case-break statement +var i; + +var _loop = function () { + switch (i) { + case 1: + break; + } + + var z = 3; // to force the plugin to convert to loop function call + + (function () { + return z; + }); +}; + +for (i = 0; i < 10; i++) { + _loop(); +} + +expect(i).toBe(10); // it should continue on continue statements within switch + +var j = 0; + +var _loop2 = function () { + switch (i) { + case 0: + return "continue"; + } + + j++; + var z = 3; + + (function () { + return z; + }); +}; + +for (i = 0; i < 10; i++) { + var _ret = _loop2(); + + if (_ret === "continue") continue; +} + +expect(j).toBe(9); // it should work with loops nested within switch + +j = 0; + +var _loop3 = function () { + switch (i) { + case 0: + var _loop4 = function () { + var z = 3; + + (function () { + return z; + }); + + j++; + return "break"; + }; + + for (k = 0; k < 10; k++) { + var _ret2 = _loop4(); + + if (_ret2 === "break") break; + } + + break; + } + + var z = 3; + + (function () { + return z; + }); +}; + +for (i = 0; i < 10; i++) { + var k; + + _loop3(); +} + +expect(j).toBe(1); From d942d47e10e84d5da0ad9c85f1f73403b82d7a61 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Thu, 25 Oct 2018 09:48:41 -0500 Subject: [PATCH 057/563] Update preset-env data (#8898) --- packages/babel-preset-env/data/built-ins.json | 6 +++++- packages/babel-preset-env/data/plugins.json | 3 ++- packages/babel-preset-env/package.json | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/babel-preset-env/data/built-ins.json b/packages/babel-preset-env/data/built-ins.json index a22f5d446032..175a9dc2b88b 100644 --- a/packages/babel-preset-env/data/built-ins.json +++ b/packages/babel-preset-env/data/built-ins.json @@ -837,6 +837,7 @@ }, "es7.promise.finally": { "chrome": "63", + "edge": "18", "firefox": "58", "safari": "11.1", "ios": "11.3", @@ -1059,6 +1060,7 @@ "chrome": "63", "firefox": "57", "safari": "12", + "ios": "12", "opera": "50", "electron": "3" }, @@ -1440,6 +1442,8 @@ "chrome": "69", "firefox": "62", "safari": "12", - "opera": "56" + "ios": "12", + "opera": "56", + "electron": "4" } } diff --git a/packages/babel-preset-env/data/plugins.json b/packages/babel-preset-env/data/plugins.json index 26345cee3198..cd15f4f74b85 100644 --- a/packages/babel-preset-env/data/plugins.json +++ b/packages/babel-preset-env/data/plugins.json @@ -230,6 +230,7 @@ "chrome": "63", "firefox": "57", "safari": "12", + "ios": "12", "opera": "50", "electron": "3" }, @@ -240,7 +241,7 @@ "node": "8.3", "ios": "11.3", "opera": "47", - "electron": "2" + "electron": "2.1" }, "proposal-unicode-property-regex": { "chrome": "64", diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index a4799b78ca94..5fc94d541154 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -65,7 +65,7 @@ "@babel/helper-fixtures": "^7.0.0", "@babel/helper-plugin-test-runner": "^7.0.0", "caniuse-db": "1.0.30000851", - "compat-table": "kangax/compat-table#ce39b436201a8d037cc1b943770a21e07769d684", - "electron-to-chromium": "1.3.55" + "compat-table": "kangax/compat-table#e3630aade96bbe1d228498c18168fe7f2cd15697", + "electron-to-chromium": "1.3.79" } } From e4929e11f603b6b82d4d5246bda62bdf6956e98b Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 29 Oct 2018 16:09:17 -0400 Subject: [PATCH 058/563] [flow] Explicit inexact objects with `...` (#8884) --- packages/babel-parser/src/plugins/flow.js | 103 ++++- .../flow/call-properties/1/output.json | 3 +- .../flow/call-properties/2/output.json | 3 +- .../flow/call-properties/3/output.json | 3 +- .../flow/call-properties/4/output.json | 3 +- .../flow/comment/02-type-include/output.json | 3 +- .../comment/03-type-flow-include/output.json | 3 +- .../flow/declare-module/10/output.json | 3 +- .../flow/declare-module/6/output.json | 3 +- .../flow/declare-statements/14/output.json | 3 +- .../flow/def-site-variance/1/output.json | 3 +- .../input.js | 4 + .../options.json | 5 + .../input.js | 5 + .../options.json | 5 + .../input.js | 5 + .../options.json | 5 + .../input.js | 6 + .../options.json | 5 + .../input.js | 5 + .../options.json | 5 + .../input.js | 5 + .../options.json | 5 + .../input.js | 6 + .../options.json | 5 + .../input.js | 2 + .../options.json | 5 + .../input.js | 2 + .../options.json | 5 + .../explicit_inexact_object/input.js | 4 + .../explicit_inexact_object/output.json | 437 ++++++++++++++++++ .../explicit_inexact_object_invalid1/input.js | 2 + .../options.json | 5 + .../explicit_inexact_object_invalid2/input.js | 2 + .../options.json | 5 + .../explicit_inexact_object_invalid3/input.js | 2 + .../options.json | 5 + .../explicit_inexact_trailing_comma/input.js | 11 + .../output.json | 395 ++++++++++++++++ .../internal-slot/object-method/output.json | 3 +- .../internal-slot/object-optional/output.json | 3 +- .../flow/internal-slot/object/output.json | 3 +- .../fixtures/flow/iterator/12/output.json | 3 +- .../fixtures/flow/iterator/13/output.json | 3 +- .../complex-param-types/output.json | 3 +- .../fixtures/flow/type-alias/4/output.json | 24 +- .../flow/type-annotations/108/output.json | 21 +- .../flow/type-annotations/110/output.json | 3 +- .../flow/type-annotations/111/output.json | 3 +- .../flow/type-annotations/114/output.json | 3 +- .../flow/type-annotations/115/output.json | 3 +- .../flow/type-annotations/127/output.json | 3 +- .../flow/type-annotations/128/output.json | 3 +- .../flow/type-annotations/135/output.json | 3 +- .../flow/type-annotations/136/output.json | 9 +- .../flow/type-annotations/138/output.json | 3 +- .../flow/type-annotations/16/output.json | 3 +- .../flow/type-annotations/32/output.json | 3 +- .../flow/type-annotations/33/output.json | 3 +- .../flow/type-annotations/34/output.json | 3 +- .../flow/type-annotations/35/output.json | 3 +- .../flow/type-annotations/36/output.json | 3 +- .../flow/type-annotations/37/output.json | 6 +- .../flow/type-annotations/38/output.json | 6 +- .../flow/type-annotations/39/output.json | 3 +- .../flow/type-annotations/40/output.json | 3 +- .../flow/type-annotations/41/output.json | 3 +- .../flow/type-annotations/42/output.json | 3 +- .../flow/type-annotations/43/output.json | 3 +- .../flow/type-annotations/60/output.json | 3 +- .../flow/type-annotations/61/output.json | 3 +- .../flow/type-annotations/63/output.json | 3 +- .../flow/type-annotations/98/output.json | 3 +- .../object-type-method/output.json | 18 +- .../type-object-reserved-word/output.json | 3 +- .../fixtures/flow/typecasts/2/output.json | 3 +- packages/babel-types/src/definitions/flow.js | 4 + 77 files changed, 1181 insertions(+), 86 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects1/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects1/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects2/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects2/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects3/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects3/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects4/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects4/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects5/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects5/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects6/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects6/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects7/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects7/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_forbidden_in_exact/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_forbidden_in_exact/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_must_appear_last/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_must_appear_last/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid1/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid1/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid2/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid2/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid3/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid3/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_trailing_comma/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_trailing_comma/output.json diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 4f574776dc07..6382c1f6f3c2 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -463,7 +463,13 @@ export default (superClass: Class): Class => } while (this.eat(tt.comma)); } - node.body = this.flowParseObjectType(isClass, false, false, isClass); + node.body = this.flowParseObjectType({ + allowStatic: isClass, + allowExact: false, + allowSpread: false, + allowProto: isClass, + allowInexact: false, + }); } flowParseInterfaceExtends(): N.FlowInterfaceExtends { @@ -656,7 +662,13 @@ export default (superClass: Class): Class => } while (this.eat(tt.comma)); } - node.body = this.flowParseObjectType(false, false, false, false); + node.body = this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: false, + allowProto: false, + allowInexact: false, + }); return this.finishNode(node, "InterfaceTypeAnnotation"); } @@ -754,12 +766,19 @@ export default (superClass: Class): Class => return this.finishNode(node, "ObjectTypeCallProperty"); } - flowParseObjectType( + flowParseObjectType({ + allowStatic, + allowExact, + allowSpread, + allowProto, + allowInexact, + }: { allowStatic: boolean, allowExact: boolean, allowSpread: boolean, allowProto: boolean, - ): N.FlowObjectTypeAnnotation { + allowInexact: boolean, + }): N.FlowObjectTypeAnnotation { const oldInType = this.state.inType; this.state.inType = true; @@ -772,6 +791,7 @@ export default (superClass: Class): Class => let endDelim; let exact; + let inexact = false; if (allowExact && this.match(tt.braceBarL)) { this.expect(tt.braceBarL); endDelim = tt.braceBarR; @@ -852,16 +872,21 @@ export default (superClass: Class): Class => } } - nodeStart.properties.push( - this.flowParseObjectTypeProperty( - node, - isStatic, - protoStart, - variance, - kind, - allowSpread, - ), + const propOrInexact = this.flowParseObjectTypeProperty( + node, + isStatic, + protoStart, + variance, + kind, + allowSpread, + allowInexact, ); + + if (propOrInexact === null) { + inexact = true; + } else { + nodeStart.properties.push(propOrInexact); + } } this.flowObjectTypeSemicolon(); @@ -869,6 +894,15 @@ export default (superClass: Class): Class => this.expect(endDelim); + /* The inexact flag should only be added on ObjectTypeAnnotations that + * are not the body of an interface, declare interface, or declare class. + * Since spreads are only allowed in objec types, checking that is + * sufficient here. + */ + if (allowSpread) { + nodeStart.inexact = inexact; + } + const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); this.state.inType = oldInType; @@ -883,7 +917,8 @@ export default (superClass: Class): Class => variance: ?N.FlowVariance, kind: string, allowSpread: boolean, - ): N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty { + allowInexact: boolean, + ): (N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty) | null { if (this.match(tt.ellipsis)) { if (!allowSpread) { this.unexpected( @@ -901,8 +936,30 @@ export default (superClass: Class): Class => ); } this.expect(tt.ellipsis); - node.argument = this.flowParseType(); + const isInexactToken = this.eat(tt.comma) || this.eat(tt.semi); + + if (this.match(tt.braceR)) { + if (allowInexact) return null; + this.unexpected( + null, + "Explicit inexact syntax is only allowed inside inexact objects", + ); + } + + if (this.match(tt.braceBarR)) { + this.unexpected( + null, + "Explicit inexact syntax cannot appear inside an explicit exact object type", + ); + } + if (isInexactToken) { + this.unexpected( + null, + "Explicit inexact syntax must appear at the end of an inexact object", + ); + } + node.argument = this.flowParseType(); return this.finishNode(node, "ObjectTypeSpreadProperty"); } else { node.key = this.flowParseObjectPropertyKey(); @@ -1146,10 +1203,22 @@ export default (superClass: Class): Class => ); case tt.braceL: - return this.flowParseObjectType(false, false, true, false); + return this.flowParseObjectType({ + allowStatic: false, + allowExact: false, + allowSpread: true, + allowProto: false, + allowInexact: true, + }); case tt.braceBarL: - return this.flowParseObjectType(false, true, true, false); + return this.flowParseObjectType({ + allowStatic: false, + allowExact: true, + allowSpread: true, + allowProto: false, + allowInexact: false, + }); case tt.bracketL: return this.flowParseTupleType(); diff --git a/packages/babel-parser/test/fixtures/flow/call-properties/1/output.json b/packages/babel-parser/test/fixtures/flow/call-properties/1/output.json index f106eb4dc399..41dbc2be1068 100644 --- a/packages/babel-parser/test/fixtures/flow/call-properties/1/output.json +++ b/packages/babel-parser/test/fixtures/flow/call-properties/1/output.json @@ -156,7 +156,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/call-properties/2/output.json b/packages/babel-parser/test/fixtures/flow/call-properties/2/output.json index bdd238b2985d..9b2e1c34ab13 100644 --- a/packages/babel-parser/test/fixtures/flow/call-properties/2/output.json +++ b/packages/babel-parser/test/fixtures/flow/call-properties/2/output.json @@ -156,7 +156,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/call-properties/3/output.json b/packages/babel-parser/test/fixtures/flow/call-properties/3/output.json index b37fa6335539..edb622d15e0c 100644 --- a/packages/babel-parser/test/fixtures/flow/call-properties/3/output.json +++ b/packages/babel-parser/test/fixtures/flow/call-properties/3/output.json @@ -308,7 +308,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/call-properties/4/output.json b/packages/babel-parser/test/fixtures/flow/call-properties/4/output.json index 6f1b515556c4..718dab31950f 100644 --- a/packages/babel-parser/test/fixtures/flow/call-properties/4/output.json +++ b/packages/babel-parser/test/fixtures/flow/call-properties/4/output.json @@ -256,7 +256,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/comment/02-type-include/output.json b/packages/babel-parser/test/fixtures/flow/comment/02-type-include/output.json index 81661e9066f7..0eb104082d54 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/02-type-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment/02-type-include/output.json @@ -239,7 +239,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json index 3a740e6c1c30..5b41ff77f72a 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json @@ -239,7 +239,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/declare-module/10/output.json b/packages/babel-parser/test/fixtures/flow/declare-module/10/output.json index 563b25f29e43..84347d7d5618 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-module/10/output.json +++ b/packages/babel-parser/test/fixtures/flow/declare-module/10/output.json @@ -146,7 +146,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } } diff --git a/packages/babel-parser/test/fixtures/flow/declare-module/6/output.json b/packages/babel-parser/test/fixtures/flow/declare-module/6/output.json index 33f1898db552..e2a2f288cbb5 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-module/6/output.json +++ b/packages/babel-parser/test/fixtures/flow/declare-module/6/output.json @@ -192,7 +192,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } } diff --git a/packages/babel-parser/test/fixtures/flow/declare-statements/14/output.json b/packages/babel-parser/test/fixtures/flow/declare-statements/14/output.json index b34f2531a1a7..a7b76763db42 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-statements/14/output.json +++ b/packages/babel-parser/test/fixtures/flow/declare-statements/14/output.json @@ -243,7 +243,8 @@ } ], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/def-site-variance/1/output.json b/packages/babel-parser/test/fixtures/flow/def-site-variance/1/output.json index 8455526f655d..938196ebcdb6 100644 --- a/packages/babel-parser/test/fixtures/flow/def-site-variance/1/output.json +++ b/packages/babel-parser/test/fixtures/flow/def-site-variance/1/output.json @@ -422,7 +422,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects1/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects1/input.js new file mode 100644 index 000000000000..c3ef0ff53256 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects1/input.js @@ -0,0 +1,4 @@ +//@flow +declare class A { + ...; +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects1/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects1/options.json new file mode 100644 index 000000000000..c9188366d4e8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects1/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Spread operator cannot appear in class or interface definitions (3:2)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects2/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects2/input.js new file mode 100644 index 000000000000..fcc33d36c05b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects2/input.js @@ -0,0 +1,5 @@ +//@flow +declare class B { + foo: number; + ...; +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects2/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects2/options.json new file mode 100644 index 000000000000..658f8c434773 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects2/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Spread operator cannot appear in class or interface definitions (4:2)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects3/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects3/input.js new file mode 100644 index 000000000000..1f5df6b39ff9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects3/input.js @@ -0,0 +1,5 @@ +//@flow +declare class C { + ...; + foo: number; +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects3/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects3/options.json new file mode 100644 index 000000000000..c9188366d4e8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects3/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Spread operator cannot appear in class or interface definitions (3:2)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects4/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects4/input.js new file mode 100644 index 000000000000..7d0e44fc00c2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects4/input.js @@ -0,0 +1,6 @@ +//@flow +declare class D { + foo: number; + ...; + bar: number; +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects4/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects4/options.json new file mode 100644 index 000000000000..658f8c434773 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects4/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Spread operator cannot appear in class or interface definitions (4:2)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects5/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects5/input.js new file mode 100644 index 000000000000..938efa8b5797 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects5/input.js @@ -0,0 +1,5 @@ +//@flow +interface F { + foo: number; + ...; +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects5/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects5/options.json new file mode 100644 index 000000000000..658f8c434773 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects5/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Spread operator cannot appear in class or interface definitions (4:2)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects6/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects6/input.js new file mode 100644 index 000000000000..59c4a399c358 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects6/input.js @@ -0,0 +1,5 @@ +//@flow +interface G { + ...; + foo: number; +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects6/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects6/options.json new file mode 100644 index 000000000000..c9188366d4e8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects6/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Spread operator cannot appear in class or interface definitions (3:2)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects7/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects7/input.js new file mode 100644 index 000000000000..4dde1fd3b04e --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects7/input.js @@ -0,0 +1,6 @@ +//@flow +interface H { + foo: number; + ...; + bar: number; +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects7/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects7/options.json new file mode 100644 index 000000000000..658f8c434773 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_disallowed_in_non_objects7/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Spread operator cannot appear in class or interface definitions (4:2)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_forbidden_in_exact/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_forbidden_in_exact/input.js new file mode 100644 index 000000000000..289513d4e480 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_forbidden_in_exact/input.js @@ -0,0 +1,2 @@ +//@flow +type T = {| foo: number, ... |} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_forbidden_in_exact/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_forbidden_in_exact/options.json new file mode 100644 index 000000000000..49936ac94990 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_forbidden_in_exact/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Explicit inexact syntax cannot appear inside an explicit exact object type (2:29)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_must_appear_last/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_must_appear_last/input.js new file mode 100644 index 000000000000..93c854cac282 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_must_appear_last/input.js @@ -0,0 +1,2 @@ +//@flow +type T = {..., foo: number}; diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_must_appear_last/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_must_appear_last/options.json new file mode 100644 index 000000000000..ebb74417a527 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_must_appear_last/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Explicit inexact syntax must appear at the end of an inexact object (2:15)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object/input.js new file mode 100644 index 000000000000..2fb3e7249593 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object/input.js @@ -0,0 +1,4 @@ +//@flow +type T = {...}; +type U = {x: number, ...}; +type V = {x: number, ...V, ...U}; diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object/output.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object/output.json new file mode 100644 index 000000000000..7e32ace8159d --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object/output.json @@ -0,0 +1,437 @@ +{ + "type": "File", + "start": 0, + "end": 84, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 84, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 33 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "TypeAlias", + "start": 8, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "id": { + "type": "Identifier", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + }, + "identifierName": "T" + }, + "name": "T" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 17, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [], + "exact": false, + "inexact": true + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] + }, + { + "type": "TypeAlias", + "start": 24, + "end": 50, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 26 + } + }, + "id": { + "type": "Identifier", + "start": 29, + "end": 30, + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + }, + "identifierName": "U" + }, + "name": "U" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 33, + "end": 49, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 25 + } + }, + "callProperties": [], + "properties": [ + { + "type": "ObjectTypeProperty", + "start": 34, + "end": 43, + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + }, + "key": { + "type": "Identifier", + "start": 34, + "end": 35, + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + }, + "identifierName": "x" + }, + "name": "x" + }, + "static": false, + "proto": false, + "kind": "init", + "method": false, + "value": { + "type": "NumberTypeAnnotation", + "start": 37, + "end": 43, + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "variance": null, + "optional": false + } + ], + "indexers": [], + "internalSlots": [], + "exact": false, + "inexact": true + } + }, + { + "type": "TypeAlias", + "start": 51, + "end": 84, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 33 + } + }, + "id": { + "type": "Identifier", + "start": 56, + "end": 57, + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + }, + "identifierName": "V" + }, + "name": "V" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 60, + "end": 83, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 32 + } + }, + "callProperties": [], + "properties": [ + { + "type": "ObjectTypeProperty", + "start": 61, + "end": 70, + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + }, + "key": { + "type": "Identifier", + "start": 61, + "end": 62, + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + }, + "identifierName": "x" + }, + "name": "x" + }, + "static": false, + "proto": false, + "kind": "init", + "method": false, + "value": { + "type": "NumberTypeAnnotation", + "start": 64, + "end": 70, + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "variance": null, + "optional": false + }, + { + "type": "ObjectTypeSpreadProperty", + "start": 72, + "end": 76, + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + }, + "argument": { + "type": "GenericTypeAnnotation", + "start": 75, + "end": 76, + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 75, + "end": 76, + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + }, + "identifierName": "V" + }, + "name": "V" + } + } + }, + { + "type": "ObjectTypeSpreadProperty", + "start": 78, + "end": 82, + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 31 + } + }, + "argument": { + "type": "GenericTypeAnnotation", + "start": 81, + "end": 82, + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 31 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 81, + "end": 82, + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 31 + }, + "identifierName": "U" + }, + "name": "U" + } + } + } + ], + "indexers": [], + "internalSlots": [], + "exact": false, + "inexact": false + } + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid1/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid1/input.js new file mode 100644 index 000000000000..84742c465959 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid1/input.js @@ -0,0 +1,2 @@ +//@flow +type T = {x: number, ..., y: number}; diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid1/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid1/options.json new file mode 100644 index 000000000000..6d703769bf61 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid1/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Explicit inexact syntax must appear at the end of an inexact object (2:26)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid2/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid2/input.js new file mode 100644 index 000000000000..15e4d01a74e6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid2/input.js @@ -0,0 +1,2 @@ +//@flow +type U = {x: number, ..., ...}; diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid2/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid2/options.json new file mode 100644 index 000000000000..6d703769bf61 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid2/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Explicit inexact syntax must appear at the end of an inexact object (2:26)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid3/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid3/input.js new file mode 100644 index 000000000000..d9037ecf24a3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid3/input.js @@ -0,0 +1,2 @@ +//@flow +type V = {x: number, ..., ...X}; diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid3/options.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid3/options.json new file mode 100644 index 000000000000..6d703769bf61 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_object_invalid3/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "Explicit inexact syntax must appear at the end of an inexact object (2:26)" +} diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_trailing_comma/input.js b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_trailing_comma/input.js new file mode 100644 index 000000000000..2b439cf934f8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_trailing_comma/input.js @@ -0,0 +1,11 @@ +//@flow +type T = { ..., }; +type U = { ...; }; +type V = { + x: number, + ..., +}; +type W = { + x: number; + ...; +}; diff --git a/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_trailing_comma/output.json b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_trailing_comma/output.json new file mode 100644 index 000000000000..3c39bdc107f5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/explicit-inexact-object/explicit_inexact_trailing_comma/output.json @@ -0,0 +1,395 @@ +{ + "type": "File", + "start": 0, + "end": 113, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 2 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 113, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 2 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "TypeAlias", + "start": 8, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "id": { + "type": "Identifier", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + }, + "identifierName": "T" + }, + "name": "T" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 17, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [], + "exact": false, + "inexact": true + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] + }, + { + "type": "TypeAlias", + "start": 27, + "end": 45, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 18 + } + }, + "id": { + "type": "Identifier", + "start": 32, + "end": 33, + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + }, + "identifierName": "U" + }, + "name": "U" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 36, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [], + "exact": false, + "inexact": true + } + }, + { + "type": "TypeAlias", + "start": 46, + "end": 79, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 7, + "column": 2 + } + }, + "id": { + "type": "Identifier", + "start": 51, + "end": 52, + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + }, + "identifierName": "V" + }, + "name": "V" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 55, + "end": 78, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "callProperties": [], + "properties": [ + { + "type": "ObjectTypeProperty", + "start": 59, + "end": 68, + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 11 + } + }, + "key": { + "type": "Identifier", + "start": 59, + "end": 60, + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + }, + "identifierName": "x" + }, + "name": "x" + }, + "static": false, + "proto": false, + "kind": "init", + "method": false, + "value": { + "type": "NumberTypeAnnotation", + "start": 62, + "end": 68, + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "variance": null, + "optional": false + } + ], + "indexers": [], + "internalSlots": [], + "exact": false, + "inexact": true + } + }, + { + "type": "TypeAlias", + "start": 80, + "end": 113, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 11, + "column": 2 + } + }, + "id": { + "type": "Identifier", + "start": 85, + "end": 86, + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + }, + "identifierName": "W" + }, + "name": "W" + }, + "typeParameters": null, + "right": { + "type": "ObjectTypeAnnotation", + "start": 89, + "end": 112, + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 11, + "column": 1 + } + }, + "callProperties": [], + "properties": [ + { + "type": "ObjectTypeProperty", + "start": 93, + "end": 102, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 11 + } + }, + "key": { + "type": "Identifier", + "start": 93, + "end": 94, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + }, + "identifierName": "x" + }, + "name": "x" + }, + "static": false, + "proto": false, + "kind": "init", + "method": false, + "value": { + "type": "NumberTypeAnnotation", + "start": 96, + "end": 102, + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "variance": null, + "optional": false + } + ], + "indexers": [], + "internalSlots": [], + "exact": false, + "inexact": true + } + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/internal-slot/object-method/output.json b/packages/babel-parser/test/fixtures/flow/internal-slot/object-method/output.json index 2be1cc35f8ee..b42f9eacce91 100644 --- a/packages/babel-parser/test/fixtures/flow/internal-slot/object-method/output.json +++ b/packages/babel-parser/test/fixtures/flow/internal-slot/object-method/output.json @@ -166,7 +166,8 @@ } } ], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/internal-slot/object-optional/output.json b/packages/babel-parser/test/fixtures/flow/internal-slot/object-optional/output.json index 9a422ace0dab..605db54c850a 100644 --- a/packages/babel-parser/test/fixtures/flow/internal-slot/object-optional/output.json +++ b/packages/babel-parser/test/fixtures/flow/internal-slot/object-optional/output.json @@ -148,7 +148,8 @@ } } ], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/internal-slot/object/output.json b/packages/babel-parser/test/fixtures/flow/internal-slot/object/output.json index dd474f9d3903..6ff31113bc57 100644 --- a/packages/babel-parser/test/fixtures/flow/internal-slot/object/output.json +++ b/packages/babel-parser/test/fixtures/flow/internal-slot/object/output.json @@ -147,7 +147,8 @@ } } ], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/iterator/12/output.json b/packages/babel-parser/test/fixtures/flow/iterator/12/output.json index 523dd9f5cbe4..865bb503288f 100644 --- a/packages/babel-parser/test/fixtures/flow/iterator/12/output.json +++ b/packages/babel-parser/test/fixtures/flow/iterator/12/output.json @@ -168,7 +168,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, "body": { diff --git a/packages/babel-parser/test/fixtures/flow/iterator/13/output.json b/packages/babel-parser/test/fixtures/flow/iterator/13/output.json index 7162d07e7f7e..a21fcad31e10 100644 --- a/packages/babel-parser/test/fixtures/flow/iterator/13/output.json +++ b/packages/babel-parser/test/fixtures/flow/iterator/13/output.json @@ -168,7 +168,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, "body": { diff --git a/packages/babel-parser/test/fixtures/flow/object-types/complex-param-types/output.json b/packages/babel-parser/test/fixtures/flow/object-types/complex-param-types/output.json index 4bd3e696e5d6..c6357989dc29 100644 --- a/packages/babel-parser/test/fixtures/flow/object-types/complex-param-types/output.json +++ b/packages/babel-parser/test/fixtures/flow/object-types/complex-param-types/output.json @@ -233,7 +233,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-alias/4/output.json b/packages/babel-parser/test/fixtures/flow/type-alias/4/output.json index c7bc62245446..a1ff7e2786c1 100644 --- a/packages/babel-parser/test/fixtures/flow/type-alias/4/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-alias/4/output.json @@ -153,7 +153,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false }, { "type": "ObjectTypeAnnotation", @@ -232,7 +233,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } ] } @@ -626,7 +628,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false }, { "type": "ObjectTypeAnnotation", @@ -705,7 +708,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } ] }, @@ -715,7 +719,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, { @@ -893,7 +898,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false }, { "type": "ObjectTypeAnnotation", @@ -972,7 +978,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } ] }, @@ -982,7 +989,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/108/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/108/output.json index 59d32d37d0fb..a3e8ba642bf2 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/108/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/108/output.json @@ -213,7 +213,8 @@ ], "indexers": [], "internalSlots": [], - "exact": true + "exact": true, + "inexact": false } } }, @@ -532,7 +533,8 @@ ], "indexers": [], "internalSlots": [], - "exact": true + "exact": true, + "inexact": false } } }, @@ -744,7 +746,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": true + "exact": true, + "inexact": false } } }, @@ -1003,7 +1006,8 @@ ], "indexers": [], "internalSlots": [], - "exact": true + "exact": true, + "inexact": false }, "variance": null, "optional": false @@ -1064,7 +1068,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, @@ -1537,7 +1542,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false }, "variance": null, "optional": false @@ -1598,7 +1604,8 @@ ], "indexers": [], "internalSlots": [], - "exact": true + "exact": true, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/110/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/110/output.json index 4929bc3d478f..4b3587d4c8a8 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/110/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/110/output.json @@ -166,7 +166,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/111/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/111/output.json index afb693e33614..ec02ec57394d 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/111/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/111/output.json @@ -166,7 +166,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/114/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/114/output.json index 0cb28d6e0fd3..ed6301370237 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/114/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/114/output.json @@ -195,7 +195,8 @@ } ], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/115/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/115/output.json index da040897ade4..df1f40c30646 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/115/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/115/output.json @@ -195,7 +195,8 @@ } ], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/127/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/127/output.json index 4d08cf624407..165aac2e4caa 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/127/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/127/output.json @@ -128,7 +128,8 @@ } ], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/128/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/128/output.json index cf23e569d27c..345675c7e135 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/128/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/128/output.json @@ -160,7 +160,8 @@ } ], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/135/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/135/output.json index aa8891c0b701..ce7e04fe7836 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/135/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/135/output.json @@ -110,7 +110,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/136/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/136/output.json index f2a1f069cffc..bdd81eaa2c09 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/136/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/136/output.json @@ -130,7 +130,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false }, "variance": null, "optional": false @@ -167,13 +168,15 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/138/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/138/output.json index 1987550217b1..6e48beeb05dc 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/138/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/138/output.json @@ -276,7 +276,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/16/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/16/output.json index 4db03aa8f5aa..59fe3a8d364e 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/16/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/16/output.json @@ -96,7 +96,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, "body": { diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/32/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/32/output.json index 6e85ab61db4e..70cbbd4fef08 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/32/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/32/output.json @@ -160,7 +160,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/33/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/33/output.json index 5b4664821d6c..1ef29b3b8bb6 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/33/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/33/output.json @@ -160,7 +160,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/34/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/34/output.json index e0cef862f368..b389c49201ad 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/34/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/34/output.json @@ -225,7 +225,8 @@ } ], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/35/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/35/output.json index 42d9e07ef5fd..cc227490d30a 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/35/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/35/output.json @@ -174,7 +174,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } } diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/36/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/36/output.json index fee4f6be4559..431aa501bc4d 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/36/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/36/output.json @@ -213,7 +213,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/37/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/37/output.json index 24897a890d17..428bb08cb9aa 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/37/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/37/output.json @@ -211,7 +211,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false }, "variance": null, "optional": false @@ -219,7 +220,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/38/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/38/output.json index 537525fd5058..0e133ba1cfbc 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/38/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/38/output.json @@ -225,7 +225,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, "variance": null, @@ -234,7 +235,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/39/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/39/output.json index fe3cbacc4b91..03cc703ab871 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/39/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/39/output.json @@ -213,7 +213,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/40/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/40/output.json index ed33244fe9cb..2cfc8de95973 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/40/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/40/output.json @@ -213,7 +213,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/41/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/41/output.json index 9e2c759153b9..2f073e822eff 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/41/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/41/output.json @@ -235,7 +235,8 @@ } ], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/42/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/42/output.json index 446275326eff..b918a1e51b0a 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/42/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/42/output.json @@ -322,7 +322,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/43/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/43/output.json index 027091719c88..05ff2466b98b 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/43/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/43/output.json @@ -295,7 +295,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/60/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/60/output.json index 1f013f7840a1..cfa5f6db54cc 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/60/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/60/output.json @@ -215,7 +215,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/61/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/61/output.json index c26e02abf8ad..25d46071b872 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/61/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/61/output.json @@ -215,7 +215,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/63/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/63/output.json index 7311b8c2411e..e9fb827b5b7d 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/63/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/63/output.json @@ -220,7 +220,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } } diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/98/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/98/output.json index 669cab2fd5e9..6a24cf2f1e35 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/98/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/98/output.json @@ -266,7 +266,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } }, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/output.json index 61c974a71802..f72e8ff175f2 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/output.json @@ -151,7 +151,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, { @@ -309,7 +310,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, { @@ -433,7 +435,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, { @@ -590,7 +593,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, { @@ -693,7 +697,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, { @@ -896,7 +901,8 @@ "properties": [], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, { diff --git a/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/type-object-reserved-word/output.json b/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/type-object-reserved-word/output.json index 0b9e5fd724bd..d817f6ed4713 100644 --- a/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/type-object-reserved-word/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-parameter-declaration/type-object-reserved-word/output.json @@ -492,7 +492,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } } ], diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/2/output.json b/packages/babel-parser/test/fixtures/flow/typecasts/2/output.json index 45638f476d7a..4d9f9da74bf5 100644 --- a/packages/babel-parser/test/fixtures/flow/typecasts/2/output.json +++ b/packages/babel-parser/test/fixtures/flow/typecasts/2/output.json @@ -323,7 +323,8 @@ ], "indexers": [], "internalSlots": [], - "exact": false + "exact": false, + "inexact": false } }, "extra": { diff --git a/packages/babel-types/src/definitions/flow.js b/packages/babel-types/src/definitions/flow.js index fa4ad6e52d4c..bb08e9112aac 100644 --- a/packages/babel-types/src/definitions/flow.js +++ b/packages/babel-types/src/definitions/flow.js @@ -277,6 +277,10 @@ defineType("ObjectTypeAnnotation", { validate: assertValueType("boolean"), default: false, }, + // If the inexact flag is present then this is an object type, and not a + // declare class, declare interface, or interface. If it is true, the + // object uses ... to express that it is inexact. + inexact: validateOptional(assertValueType("boolean")), }, }); From de80aefece3049ffd5986eef0a968d13e8c21f81 Mon Sep 17 00:00:00 2001 From: Ryan Marsh Date: Tue, 30 Oct 2018 00:49:11 -0500 Subject: [PATCH 059/563] fix single-arg async arrows when retainLines=true (#8868) --- .../babel-generator/src/generators/methods.js | 18 +++++++++++++++++- .../input.js | 11 +++++++++++ .../options.json | 3 +++ .../output.js | 11 +++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/input.js create mode 100644 packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/options.json create mode 100644 packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/output.js diff --git a/packages/babel-generator/src/generators/methods.js b/packages/babel-generator/src/generators/methods.js index 5dc17e065a20..9d9f68733380 100644 --- a/packages/babel-generator/src/generators/methods.js +++ b/packages/babel-generator/src/generators/methods.js @@ -111,7 +111,23 @@ export function ArrowFunctionExpression(node: Object) { t.isIdentifier(firstParam) && !hasTypes(node, firstParam) ) { - this.print(firstParam, node); + if ( + this.format.retainLines && + node.loc.start.line < node.body.loc.start.line + ) { + this.token("("); + if (firstParam.loc.start.line > node.loc.start.line) { + this.indent(); + this.print(firstParam, node); + this.dedent(); + this._catchUp("start", node.body.loc); + } else { + this.print(firstParam, node); + } + this.token(")"); + } else { + this.print(firstParam, node); + } } else { this._params(node); } diff --git a/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/input.js b/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/input.js new file mode 100644 index 000000000000..e409b79f575f --- /dev/null +++ b/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/input.js @@ -0,0 +1,11 @@ +var fn = async ( + arg +) => {} + +async (x) +=> {} + +async x => {} + +async (x +) => {}; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/options.json b/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/options.json new file mode 100644 index 000000000000..97925bbcb61b --- /dev/null +++ b/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/options.json @@ -0,0 +1,3 @@ +{ + "retainLines": true +} diff --git a/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/output.js b/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/output.js new file mode 100644 index 000000000000..6bb2ce5093e8 --- /dev/null +++ b/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/output.js @@ -0,0 +1,11 @@ +var fn = async ( + arg +) => {}; + +async (x) => +{}; + +async x => {}; + +async (x) => +{}; \ No newline at end of file From c82750a48a5d974e11c7e1169591ddd2cae65859 Mon Sep 17 00:00:00 2001 From: Ben Mosher Date: Wed, 31 Oct 2018 11:15:27 -0400 Subject: [PATCH 060/563] edge incomplete support for arrow destructuring (babel #8349) (#8926) --- packages/babel-preset-env/data/plugin-features.js | 6 +++++- packages/babel-preset-env/data/plugins.json | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/babel-preset-env/data/plugin-features.js b/packages/babel-preset-env/data/plugin-features.js index e31b3e3e2b65..bb5861370d67 100644 --- a/packages/babel-preset-env/data/plugin-features.js +++ b/packages/babel-preset-env/data/plugin-features.js @@ -57,7 +57,11 @@ const es = { features: "spread syntax for iterable objects", }, "transform-parameters": { - features: ["default function parameters", "rest parameters"], + features: [ + "default function parameters", + "rest parameters", + "destructuring, parameters / defaults, arrow function", + ], }, "transform-destructuring": { features: [ diff --git a/packages/babel-preset-env/data/plugins.json b/packages/babel-preset-env/data/plugins.json index cd15f4f74b85..c8a5e48dabb4 100644 --- a/packages/babel-preset-env/data/plugins.json +++ b/packages/babel-preset-env/data/plugins.json @@ -149,7 +149,6 @@ }, "transform-parameters": { "chrome": "49", - "edge": "14", "firefox": "53", "safari": "10", "node": "6", From 0d9e77f559301bb75e1f64d250bcabf3dc1781a9 Mon Sep 17 00:00:00 2001 From: Byron Luk Date: Wed, 31 Oct 2018 12:28:36 -0700 Subject: [PATCH 061/563] rename colliding let bindings with for loop init (#8937) * rename colliding let bindings with for loop init * added complex test case to check if loop init collisions were handled correctly * updated test files --- .../src/index.js | 15 +++++++++++++-- .../input.js | 7 +++++++ .../options.json | 3 +++ .../output.js | 11 +++++++++++ .../issue-8498-loop-init-collision/input.js | 8 ++++++++ .../issue-8498-loop-init-collision/output.js | 7 +++++++ 6 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/input.js create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/options.json create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/output.js create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision/input.js create mode 100644 packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision/output.js diff --git a/packages/babel-plugin-transform-block-scoping/src/index.js b/packages/babel-plugin-transform-block-scoping/src/index.js index 6eb209a0d058..a72bd1a28e3b 100644 --- a/packages/babel-plugin-transform-block-scoping/src/index.js +++ b/packages/babel-plugin-transform-block-scoping/src/index.js @@ -460,7 +460,9 @@ class BlockScoping { remap() { const letRefs = this.letReferences; + const outsideLetRefs = this.outsideLetReferences; const scope = this.scope; + const blockPathScope = this.blockPath.scope; // alright, so since we aren't wrapping this block in a closure // we have to check if any of our let variables collide with @@ -481,11 +483,20 @@ class BlockScoping { scope.rename(ref.name); } - if (this.blockPath.scope.hasOwnBinding(key)) { - this.blockPath.scope.rename(ref.name); + if (blockPathScope.hasOwnBinding(key)) { + blockPathScope.rename(ref.name); } } } + + for (const key in outsideLetRefs) { + const ref = letRefs[key]; + // check for collisions with a for loop's init variable and the enclosing scope's bindings + // https://github.com/babel/babel/issues/8498 + if (isInLoop(this.blockPath) && blockPathScope.hasOwnBinding(key)) { + blockPathScope.rename(ref.name); + } + } } wrapClosure() { diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/input.js b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/input.js new file mode 100644 index 000000000000..7d59ce437b19 --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/input.js @@ -0,0 +1,7 @@ +for (let a, { b } = {};;) { + let a, { b } = {}; + + { + let a, { b } = {}; + } +} diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/options.json b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/options.json new file mode 100644 index 000000000000..9df3780bbc43 --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-destructuring", "transform-block-scoping"] +} diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/output.js b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/output.js new file mode 100644 index 000000000000..d69de3a075a2 --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision-destructuring/output.js @@ -0,0 +1,11 @@ +for (var a, _ref = {}, b = _ref.b;;) { + var _a = void 0, + _ref2 = {}, + _b = _ref2.b; + + { + var _a2 = void 0, + _ref3 = {}, + _b2 = _ref3.b; + } +} diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision/input.js b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision/input.js new file mode 100644 index 000000000000..9a2f0f21ecde --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision/input.js @@ -0,0 +1,8 @@ +for (let i = 0; i < 3; i++) { + let i = 'abc'; + console.log(i); + + { + let i = "hello"; + } +} diff --git a/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision/output.js b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision/output.js new file mode 100644 index 000000000000..a08721ee5e33 --- /dev/null +++ b/packages/babel-plugin-transform-block-scoping/test/fixtures/general/issue-8498-loop-init-collision/output.js @@ -0,0 +1,7 @@ +for (var i = 0; i < 3; i++) { + var _i = 'abc'; + console.log(_i); + { + var _i2 = "hello"; + } +} From e85faec47d5d3ef940b7a85d48fa24e6e1cc32ab Mon Sep 17 00:00:00 2001 From: everdimension Date: Wed, 31 Oct 2018 22:34:26 +0300 Subject: [PATCH 062/563] Fix message when plugin of a wrong type is passed (#8950) --- packages/babel-core/src/config/files/plugins.js | 2 +- packages/babel-core/test/resolution.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/babel-core/src/config/files/plugins.js b/packages/babel-core/src/config/files/plugins.js index 6bef09039d8f..be20468d1615 100644 --- a/packages/babel-core/src/config/files/plugins.js +++ b/packages/babel-core/src/config/files/plugins.js @@ -132,7 +132,7 @@ function resolveStandardizedName( } catch (e2) {} if (resolvedOppositeType) { - e.message += `\n- Did you accidentally pass a ${type} as a ${oppositeType}?`; + e.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`; } throw e; diff --git a/packages/babel-core/test/resolution.js b/packages/babel-core/test/resolution.js index 4280b27ddd76..203d76ec5769 100644 --- a/packages/babel-core/test/resolution.js +++ b/packages/babel-core/test/resolution.js @@ -400,7 +400,7 @@ describe("addon resolution", function() { presets: ["testplugin"], }); }).toThrow( - /Cannot find module 'babel-preset-testplugin'.*\n- Did you accidentally pass a preset as a plugin\?/, + /Cannot find module 'babel-preset-testplugin'.*\n- Did you accidentally pass a plugin as a preset\?/, ); }); @@ -414,7 +414,7 @@ describe("addon resolution", function() { plugins: ["testpreset"], }); }).toThrow( - /Cannot find module 'babel-plugin-testpreset'.*\n- Did you accidentally pass a plugin as a preset\?/, + /Cannot find module 'babel-plugin-testpreset'.*\n- Did you accidentally pass a preset as a plugin\?/, ); }); From cd81b079ee7d767b7fa689f155267ac34629832f Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Thu, 1 Nov 2018 07:10:46 -0700 Subject: [PATCH 063/563] Allow function types in type params within arrow return types (#8954) --- packages/babel-parser/src/plugins/flow.js | 3 + .../good_14/input.js | 1 + .../good_14/output.json | 183 +++++++++++++ .../good_15/input.js | 1 + .../good_15/output.json | 251 ++++++++++++++++++ 5 files changed, 439 insertions(+) create mode 100644 packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_14/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_14/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_15/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_15/output.json diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 6382c1f6f3c2..cd250e9ad085 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -638,12 +638,15 @@ export default (superClass: Class): Class => this.state.inType = true; this.expectRelational("<"); + const oldNoAnonFunctionType = this.state.noAnonFunctionType; + this.state.noAnonFunctionType = false; while (!this.isRelational(">")) { node.params.push(this.flowParseType()); if (!this.isRelational(">")) { this.expect(tt.comma); } } + this.state.noAnonFunctionType = oldNoAnonFunctionType; this.expectRelational(">"); this.state.inType = oldInType; diff --git a/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_14/input.js b/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_14/input.js new file mode 100644 index 000000000000..7d3fa382c436 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_14/input.js @@ -0,0 +1 @@ +type T = Array<(string) => number> \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_14/output.json b/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_14/output.json new file mode 100644 index 000000000000..3b566aaa7fc0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_14/output.json @@ -0,0 +1,183 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "TypeAlias", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "T" + }, + "name": "T" + }, + "typeParameters": null, + "right": { + "type": "GenericTypeAnnotation", + "start": 9, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "typeParameters": { + "type": "TypeParameterInstantiation", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "params": [ + { + "type": "FunctionTypeAnnotation", + "start": 15, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "params": [ + { + "type": "FunctionTypeParam", + "start": 16, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": null, + "optional": false, + "typeAnnotation": { + "type": "StringTypeAnnotation", + "start": 16, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 22 + } + } + } + } + ], + "rest": null, + "returnType": { + "type": "NumberTypeAnnotation", + "start": 27, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + "typeParameters": null + } + ] + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + }, + "identifierName": "Array" + }, + "name": "Array" + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_15/input.js b/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_15/input.js new file mode 100644 index 000000000000..f27573896521 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_15/input.js @@ -0,0 +1 @@ +let x = (): Array<(string) => number> => [] \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_15/output.json b/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_15/output.json new file mode 100644 index 000000000000..fb3eb337bc92 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/anonymous-function-no-parens-types/good_15/output.json @@ -0,0 +1,251 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "x" + }, + "name": "x" + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 8, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "predicate": null, + "returnType": { + "type": "TypeAnnotation", + "start": 10, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "typeAnnotation": { + "type": "GenericTypeAnnotation", + "start": 12, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "typeParameters": { + "type": "TypeParameterInstantiation", + "start": 17, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "params": [ + { + "type": "FunctionTypeAnnotation", + "start": 18, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "params": [ + { + "type": "FunctionTypeParam", + "start": 19, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "name": null, + "optional": false, + "typeAnnotation": { + "type": "StringTypeAnnotation", + "start": 19, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 25 + } + } + } + } + ], + "rest": null, + "returnType": { + "type": "NumberTypeAnnotation", + "start": 30, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "typeParameters": null + } + ] + }, + "id": { + "type": "Identifier", + "start": 12, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "Array" + }, + "name": "Array" + } + } + }, + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "ArrayExpression", + "start": 41, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "elements": [] + } + } + } + ], + "kind": "let" + } + ], + "directives": [] + } +} \ No newline at end of file From 38397ce11f2ab9ed48dde0e134fb2862508fd113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 20 Sep 2018 20:03:45 +0200 Subject: [PATCH 064/563] Use toPropertyKey in the "decorate" helper This commit also makes the "toPropertyKey" helper call @@toPrimitive when needed. --- .../misc/regression-4855/options.json | 5 ++- packages/babel-helpers/src/helpers.js | 36 +++++++++++++------ .../fixtures/duplicated-keys/options.json | 2 +- .../fixtures/element-descriptors/options.json | 2 +- .../test/fixtures/finishers/options.json | 2 +- .../test/fixtures/ordering/options.json | 2 +- .../async-generator-method/options.json | 2 +- .../class-decorators-yield-await/options.json | 2 +- .../test/fixtures/transformation/options.json | 2 +- .../test/fixtures/object-rest/options.json | 2 +- .../es7-object-rest-builtins/options.json | 2 +- .../es7-object-rest-loose/options.json | 3 +- .../es7-object-rest-loose/output.js | 19 +++------- .../test/fixtures/destructuring/options.json | 2 +- 14 files changed, 47 insertions(+), 36 deletions(-) diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-4855/options.json b/packages/babel-core/test/fixtures/transformation/misc/regression-4855/options.json index 2f59220d176b..489d3a868c4b 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/regression-4855/options.json +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-4855/options.json @@ -1,5 +1,8 @@ { "compact": false, "presets": ["env"], - "plugins": ["external-helpers", "proposal-object-rest-spread"] + "plugins": [ + ["external-helpers", { "helperVersion": "7.1.5" }], + "proposal-object-rest-spread" + ] } diff --git a/packages/babel-helpers/src/helpers.js b/packages/babel-helpers/src/helpers.js index 7aa8518aec2f..f3556f2513bb 100644 --- a/packages/babel-helpers/src/helpers.js +++ b/packages/babel-helpers/src/helpers.js @@ -935,13 +935,28 @@ helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")` } `; -helpers.toPropertyKey = helper("7.0.0-beta.0")` - export default function _toPropertyKey(key) { - if (typeof key === "symbol") { - return key; - } else { - return String(key); +helpers.toPrimitive = helper("7.1.5")` + export default function _toPrimitive( + input, + hint /*: "default" | "string" | "number" | void */ + ) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== undefined) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); } + return (hint === "string" ? String : Number)(input); + } +`; + +helpers.toPropertyKey = helper("7.1.5")` + import toPrimitive from "toPrimitive"; + + export default function _toPropertyKey(arg) { + var key = toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); } `; @@ -1077,10 +1092,12 @@ helpers.classStaticPrivateFieldSpecSet = helper("7.0.2")` descriptor.value = value; return value; } + `; -helpers.decorate = helper("7.0.2")` +helpers.decorate = helper("7.1.5")` import toArray from "toArray"; + import toPropertyKey from "toPropertyKey"; // These comments are stripped by @babel/template /*:: @@ -1574,8 +1591,7 @@ helpers.decorate = helper("7.0.2")` ); } - var key = elementObject.key; - if (typeof key !== "string" && typeof key !== "symbol") key = String(key); + var key = toPropertyKey(elementObject.key); var placement = String(elementObject.placement); if ( @@ -1716,4 +1732,4 @@ helpers.decorate = helper("7.0.2")` } return constructor; } - `; +`; diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/options.json index 3c8fc3716843..0fbe73eecd01 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/options.json @@ -5,7 +5,7 @@ [ "external-helpers", { - "helperVersion": "7.0.2" + "helperVersion": "7.1.5" } ] ] diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/options.json index 3c8fc3716843..0fbe73eecd01 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/element-descriptors/options.json @@ -5,7 +5,7 @@ [ "external-helpers", { - "helperVersion": "7.0.2" + "helperVersion": "7.1.5" } ] ] diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/finishers/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/finishers/options.json index 3c8fc3716843..0fbe73eecd01 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/finishers/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/finishers/options.json @@ -5,7 +5,7 @@ [ "external-helpers", { - "helperVersion": "7.0.2" + "helperVersion": "7.1.5" } ] ] diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/ordering/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/ordering/options.json index 3c8fc3716843..0fbe73eecd01 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/ordering/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/ordering/options.json @@ -5,7 +5,7 @@ [ "external-helpers", { - "helperVersion": "7.0.2" + "helperVersion": "7.1.5" } ] ] diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/options.json index c77f4109f467..a3587a401c6c 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/options.json @@ -3,6 +3,6 @@ ["proposal-decorators", { "decoratorsBeforeExport": false }], "proposal-class-properties", "syntax-async-generators", - ["external-helpers", { "helperVersion": "7.0.2" }] + ["external-helpers", { "helperVersion": "7.1.5" }] ] } diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/class-decorators-yield-await/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/class-decorators-yield-await/options.json index 34ff48433b08..7879b5a6675a 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/class-decorators-yield-await/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/class-decorators-yield-await/options.json @@ -5,7 +5,7 @@ [ "external-helpers", { - "helperVersion": "7.0.2" + "helperVersion": "7.1.5" } ], "syntax-async-generators" diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/options.json index 3c8fc3716843..0fbe73eecd01 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/options.json +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/options.json @@ -5,7 +5,7 @@ [ "external-helpers", { - "helperVersion": "7.0.2" + "helperVersion": "7.1.5" } ] ] diff --git a/packages/babel-plugin-proposal-object-rest-spread/test/fixtures/object-rest/options.json b/packages/babel-plugin-proposal-object-rest-spread/test/fixtures/object-rest/options.json index fc3756652af6..ac791b82acf2 100644 --- a/packages/babel-plugin-proposal-object-rest-spread/test/fixtures/object-rest/options.json +++ b/packages/babel-plugin-proposal-object-rest-spread/test/fixtures/object-rest/options.json @@ -2,6 +2,6 @@ "plugins": [ "syntax-async-generators", "proposal-object-rest-spread", - "external-helpers" + ["external-helpers", { "helperVersion": "7.1.5" }] ] } diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-builtins/options.json b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-builtins/options.json index a4a5f2d213ea..9b67610435a1 100644 --- a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-builtins/options.json +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-builtins/options.json @@ -1,6 +1,6 @@ { "plugins": [ - "external-helpers", + ["external-helpers", { "helperVersion": "7.1.5" }], ["transform-destructuring", { "useBuiltIns": true }], "transform-spread", "transform-parameters", diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/options.json b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/options.json index 30b537ae9118..ec06f619d092 100644 --- a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/options.json +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/options.json @@ -1,6 +1,7 @@ { "plugins": [ ["transform-destructuring", { "loose": true }], - "proposal-object-rest-spread" + "proposal-object-rest-spread", + ["external-helpers", { "helperVersion": "7.1.5" }] ] } diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/output.js b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/output.js index 4351f257437d..e202791b6fd4 100644 --- a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/output.js +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/es7-object-rest-loose/output.js @@ -1,29 +1,20 @@ -function _toPropertyKey(key) { if (typeof key === "symbol") { return key; } else { return String(key); } } - -function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } - -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - var z = {}; - var _z = z, - x = _extends({}, _z); - + x = babelHelpers.extends({}, _z); var _z2 = z, x = _z2.x, - y = _objectWithoutPropertiesLoose(_z2, ["x"]); - + y = babelHelpers.objectWithoutPropertiesLoose(_z2, ["x"]); var _z3 = z, x = _z3[x], - y = _objectWithoutPropertiesLoose(_z3, [x].map(_toPropertyKey)); + y = babelHelpers.objectWithoutPropertiesLoose(_z3, [x].map(babelHelpers.toPropertyKey)); (function (_ref) { let x = _ref.x, - y = _objectWithoutPropertiesLoose(_ref, ["x"]); + y = babelHelpers.objectWithoutPropertiesLoose(_ref, ["x"]); }); var _o = o; x = _o.x; y = _o.y; -z = _objectWithoutPropertiesLoose(_o, ["x", "y"]); +z = babelHelpers.objectWithoutPropertiesLoose(_o, ["x", "y"]); _o; diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/options.json b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/options.json index 0a58a1e00d3e..780d83b9b4ce 100644 --- a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/options.json +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/options.json @@ -1,6 +1,6 @@ { "plugins": [ - "external-helpers", + ["external-helpers", { "helperVersion": "7.1.5" }], "transform-destructuring", "transform-spread", "transform-parameters", From d35563ee1a7c3d8a69b5bc1b87fc8d6d883f00ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 24 Sep 2018 14:58:57 +0200 Subject: [PATCH 065/563] Set correct methods name --- packages/babel-helpers/src/helpers.js | 8 +++++++- .../test/fixtures/misc/method-name/exec.js | 8 ++++++++ .../test/fixtures/misc/options.json | 12 ++++++++++++ .../test/fixtures/misc/to-primitive/exec.js | 16 ++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name/exec.js create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/misc/options.json create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/misc/to-primitive/exec.js diff --git a/packages/babel-helpers/src/helpers.js b/packages/babel-helpers/src/helpers.js index f3556f2513bb..5549bfde42a7 100644 --- a/packages/babel-helpers/src/helpers.js +++ b/packages/babel-helpers/src/helpers.js @@ -1236,6 +1236,8 @@ helpers.decorate = helper("7.1.5")` function _createElementDescriptor( def /*: ElementDefinition */, ) /*: ElementDescriptor */ { + var key = toPropertyKey(def.key); + var descriptor /*: PropertyDescriptor */; if (def.kind === "method") { descriptor = { @@ -1244,6 +1246,10 @@ helpers.decorate = helper("7.1.5")` configurable: true, enumerable: false, }; + Object.defineProperty(def.value, "name", { + value: typeof key === "symbol" ? "" : key, + configurable: true, + }); } else if (def.kind === "get") { descriptor = { get: def.value, configurable: true, enumerable: false }; } else if (def.kind === "set") { @@ -1254,7 +1260,7 @@ helpers.decorate = helper("7.1.5")` var element /*: ElementDescriptor */ = { kind: def.kind === "field" ? "field" : "method", - key: def.key, + key: key, placement: def.static ? "static" : def.kind === "field" diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name/exec.js b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name/exec.js new file mode 100644 index 000000000000..5e4dcb98925e --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name/exec.js @@ -0,0 +1,8 @@ +function decorator() {} + +@decorator +class Foo { + method() {} +} + +expect(Foo.prototype.method.name).toBe("method"); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/misc/options.json b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/options.json new file mode 100644 index 000000000000..0fbe73eecd01 --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/options.json @@ -0,0 +1,12 @@ +{ + "plugins": [ + ["proposal-decorators", { "decoratorsBeforeExport": false }], + "proposal-class-properties", + [ + "external-helpers", + { + "helperVersion": "7.1.5" + } + ] + ] +} diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/misc/to-primitive/exec.js b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/to-primitive/exec.js new file mode 100644 index 000000000000..698b3e7049bf --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/to-primitive/exec.js @@ -0,0 +1,16 @@ +let calls = 0; +const baz = { + [Symbol.toPrimitive]() { + calls++; + return "baz"; + } +} + +function dec() {} + +@dec +class A { + [baz]() {} +} + +expect(calls).toBe(1); From b593af17a9a96a8acd0c966f274ce6d6decfb393 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sat, 3 Nov 2018 14:00:42 -0400 Subject: [PATCH 066/563] Replace codePointToString with ES6 method --- packages/babel-parser/src/tokenizer/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 871c3199603c..20dd2860c492 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -402,7 +402,7 @@ export default class Tokenizer extends LocationParser { } else { this.raise( this.state.pos, - `Unexpected character '${codePointToString(code)}'`, + `Unexpected character '${String.fromCodePoint(code)}'`, ); } } From a0e94ec24d2d46b3cc43ed0f6964fb3215bc7982 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sat, 3 Nov 2018 14:03:17 -0400 Subject: [PATCH 067/563] Move PipelineStyle to types.js file --- packages/babel-parser/src/parser/expression.js | 12 +++--------- packages/babel-parser/src/types.js | 6 ++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index a02e409ec9e9..e94dc10805bf 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -2071,7 +2071,7 @@ export default class ExpressionParser extends LValParser { checkSmartPipelineBodyEarlyErrors( childExpression: N.Expression, - pipelineStyle: PipelineStyle, + pipelineStyle: N.PipelineStyle, startPos: number, ): void { if (this.match(tt.arrow)) { @@ -2094,7 +2094,7 @@ export default class ExpressionParser extends LValParser { parseSmartPipelineBodyInStyle( childExpression: N.Expression, - pipelineStyle: PipelineStyle, + pipelineStyle: N.PipelineStyle, startPos: number, startLoc: Position, ): N.PipelineBody { @@ -2124,7 +2124,7 @@ export default class ExpressionParser extends LValParser { return this.finishNode(bodyNode, pipelineStyle); } - checkSmartPipelineBodyStyle(expression: N.Expression): PipelineStyle { + checkSmartPipelineBodyStyle(expression: N.Expression): N.PipelineStyle { switch (expression.type) { default: return this.isSimpleReference(expression) @@ -2208,9 +2208,3 @@ export default class ExpressionParser extends LValParser { ); } } - -type PipelineStyle = - | "PipelineBareFunction" - | "PipelineBareConstructor" - | "PipelineBareAwaitedFunction" - | "PipelineTopicExpression"; diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index c06f1e66b88b..254372aa7a0a 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -592,6 +592,12 @@ export type PipelineTopicBody = NodeBase & { expression: Expression, }; +export type PipelineStyle = + | "PipelineBareFunction" + | "PipelineBareConstructor" + | "PipelineBareAwaitedFunction" + | "PipelineTopicExpression"; + // Template Literals export type TemplateLiteral = NodeBase & { From 1d4d760ffc37e228814c06a482b6dcd87b44006b Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Sat, 3 Nov 2018 00:13:31 -0700 Subject: [PATCH 068/563] Update test262 to latest commit and enable mapping for features Also added an automated check for new features which are not mapped or ignored --- Makefile | 4 +- .../tests/test262/run_babel_parser_test262.js | 14 + .../test262/run_babel_parser_test262_utils.js | 113 +- scripts/tests/test262/test262_whitelist.txt | 980 +++++++++++++++++- 4 files changed, 1106 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 325866dea3cf..7f38aef67ef1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ MAKEFLAGS = -j1 FLOW_COMMIT = bea8b83f50f597454941d2a7ecef6e93a881e576 -TEST262_COMMIT = 06c2f019019cf7850923de4d56828e6dfd9212b8 +TEST262_COMMIT = 72f1cfa2abd66a69b29e9b7d691a8ae8c5a7a00f # Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967 export FORCE_COLOR = true @@ -96,7 +96,7 @@ test-flow-update-whitelist: bootstrap-test262: rm -rf ./build/test262 mkdir -p ./build - git clone --branch=master --single-branch --shallow-since=2017-01-01 https://github.com/tc39/test262.git ./build/test262 + git clone --branch=master --single-branch --shallow-since=2018-11-01 https://github.com/tc39/test262.git ./build/test262 cd build/test262 && git checkout $(TEST262_COMMIT) test-test262: diff --git a/scripts/tests/test262/run_babel_parser_test262.js b/scripts/tests/test262/run_babel_parser_test262.js index 1589901d6e69..acd0c5122606 100644 --- a/scripts/tests/test262/run_babel_parser_test262.js +++ b/scripts/tests/test262/run_babel_parser_test262.js @@ -105,6 +105,20 @@ Promise.all([utils.getTests(testDir), utils.getWhitelist(whitelistFile)]) } else { process.exitCode = summary.passed ? 0 : 1; } + + const unmappedFeatures = utils.getUnmappedFeatures(); + + if (unmappedFeatures.size) { + console.log(""); + console.log( + "The following Features are not currently mapped or ignored:" + ); + console.log( + Array.from(unmappedFeatures) + .join("\n") + .replace(/^/gm, " ") + ); + } }) .catch(function(err) { console.error(err); diff --git a/scripts/tests/test262/run_babel_parser_test262_utils.js b/scripts/tests/test262/run_babel_parser_test262_utils.js index 99f714287a83..629053cc2a52 100644 --- a/scripts/tests/test262/run_babel_parser_test262_utils.js +++ b/scripts/tests/test262/run_babel_parser_test262_utils.js @@ -12,12 +12,107 @@ const pfs = { const parse = require("../../../packages/babel-parser").parse; +const ignoredFeatures = [ + "async-functions", + "arrow-function", + "class", + "const", + "destructuring-assignment", + "for-of", + "generators", + "let", + "template", + "Reflect.construct", + "Symbol", + "TypedArray", + "cross-realm", + "Reflect", + "DataView", + "ArrayBuffer", + "Symbol.toStringTag", + "Atomics", + "SharedArrayBuffer", + "Int8Array", + "Symbol.toPrimitive", + "caller", + "Symbol.iterator", + "u180e", + "Proxy", + "Symbol.match", + "regexp-dotall", + "Symbol.matchAll", + "Set", + "WeakSet", + "globalThis", + "Intl.Locale", + "tail-call-optimization", + "default-parameters", + "new.target", + "super", + "Symbol.unscopables", + "Symbol.species", + "Symbol.asyncIterator", + "Float32Array", + "Float64Array", + "Uint16Array", + "Uint8Array", + "Uint8ClampedArray", + "computed-property-names", + "well-formed-json-stringify", + "Object.fromEntries", + "Object.is", + "Reflect.setPrototypeOf", + "Reflect.set", + "String.fromCodePoint", + "regexp-lookbehind", + "regexp-named-groups", + "regexp-unicode-property-escapes", + "Symbol.hasInstance", + "Symbol.isConcatSpreadable", + "Symbol.replace", + "Symbol.search", + "Symbol.split", + "Array.prototype.values", + "Intl.ListFormat", + "Intl.RelativeTimeFormat", + "Intl.Segmenter", + "destructuring-binding", + "json-superset", + "Map", + "IsHTMLDDA", + "Array.prototype.flat", + "Array.prototype.flatMap", + "DataView.prototype.setUint8", + "DataView.prototype.getFloat32", + "DataView.prototype.getFloat64", + "DataView.prototype.getInt16", + "DataView.prototype.getInt32", + "DataView.prototype.getInt8", + "DataView.prototype.getUint16", + "DataView.prototype.getUint32", + "WeakMap", + "Promise.prototype.finally", + "String.prototype.endsWith", + "String.prototype.includes", + "String.prototype.matchAll", + "string-trimming", + "String.prototype.trimEnd", + "String.prototype.trimStart", + "Symbol.prototype.description", +]; + const featuresToPlugins = { "async-iteration": "asyncGenerators", BigInt: "bigInt", "class-fields-private": "classPrivateProperties", "class-fields-public": "classProperties", + "class-methods-private": "classPrivateMethods", + "class-static-fields-public": "classProperties", + "class-static-fields-private": "classPrivateProperties", + "class-static-methods-private": "classPrivateMethods", + "dynamic-import": "dynamicImport", "export-star-as-namespace-from-module": "exportNamespaceFrom", + "import.meta": "importMeta", "numeric-separator-literal": "numericSeparator", "object-rest": "objectRestSpread", "object-spread": "objectRestSpread", @@ -25,9 +120,25 @@ const featuresToPlugins = { }; function getPlugins(features) { - return features && features.map(f => featuresToPlugins[f]).filter(Boolean); + return ( + features && + features + .map(f => { + if (!featuresToPlugins[f] && !ignoredFeatures.includes(f)) { + unmappedFeatures.add(f); + } + return featuresToPlugins[f]; + }) + .filter(Boolean) + ); } +const unmappedFeatures = new Set(); + +exports.getUnmappedFeatures = function() { + return unmappedFeatures; +}; + exports.getTests = function(testDir) { const stream = new TestStream(testDir, { omitRuntime: true, diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 47db998bb2d8..f02af59ed128 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -453,8 +453,6 @@ language/statements/class/definition/early-errors-class-method-await-in-formals- language/statements/class/definition/early-errors-class-method-await-in-formals.js(default) language/statements/class/definition/early-errors-class-method-await-in-formals.js(strict mode) language/statements/class/strict-mode/with.js(default) -language/statements/class/syntax/early-errors/class-body-has-direct-super-missing-class-heritage.js(default) -language/statements/class/syntax/early-errors/class-body-has-direct-super-missing-class-heritage.js(strict mode) language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(default) language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(strict mode) language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(default) @@ -759,3 +757,981 @@ built-ins/Function/prototype/toString/proxy-async-generator-function.js(default) built-ins/Function/prototype/toString/proxy-async-generator-function.js(strict mode) built-ins/Function/prototype/toString/proxy-async-generator-method-definition.js(default) built-ins/Function/prototype/toString/proxy-async-generator-method-definition.js(strict mode) + +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Invalid-negated.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Invalid-negated.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Invalid.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Invalid.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_N-negated.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_N-negated.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_N.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_N.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_No-negated.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_No-negated.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_No.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_No.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_T-negated.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_T-negated.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_T.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_T.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Y-negated.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Y-negated.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Y.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Y.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Yes-negated.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Yes-negated.js(strict mode) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Yes.js(default) +built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_Yes.js(strict mode) +built-ins/RegExp/property-escapes/character-class-range-end.js(default) +built-ins/RegExp/property-escapes/character-class-range-end.js(strict mode) +built-ins/RegExp/property-escapes/character-class-range-no-dash-end.js(default) +built-ins/RegExp/property-escapes/character-class-range-no-dash-end.js(strict mode) +built-ins/RegExp/property-escapes/character-class-range-no-dash-start.js(default) +built-ins/RegExp/property-escapes/character-class-range-no-dash-start.js(strict mode) +built-ins/RegExp/property-escapes/character-class-range-start.js(default) +built-ins/RegExp/property-escapes/character-class-range-start.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Block-implicit-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Block-implicit-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Block-implicit.js(default) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Block-implicit.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-implicit-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-implicit-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-implicit.js(default) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-implicit.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script.js(default) +built-ins/RegExp/property-escapes/grammar-extension-In-prefix-Script.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-Is-prefix-Script-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-Is-prefix-Script-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-Is-prefix-Script.js(default) +built-ins/RegExp/property-escapes/grammar-extension-Is-prefix-Script.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-circumflex-negation-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-circumflex-negation-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-circumflex-negation.js(default) +built-ins/RegExp/property-escapes/grammar-extension-circumflex-negation.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-empty-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-empty-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-empty.js(default) +built-ins/RegExp/property-escapes/grammar-extension-empty.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-invalid-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-invalid-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-invalid.js(default) +built-ins/RegExp/property-escapes/grammar-extension-invalid.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-no-braces-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-no-braces-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-no-braces-value-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-no-braces-value-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-no-braces-value.js(default) +built-ins/RegExp/property-escapes/grammar-extension-no-braces-value.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-no-braces.js(default) +built-ins/RegExp/property-escapes/grammar-extension-no-braces.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-separator-and-value-only-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-separator-and-value-only-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-separator-and-value-only.js(default) +built-ins/RegExp/property-escapes/grammar-extension-separator-and-value-only.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-separator-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-separator-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-separator-only-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-separator-only-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-separator-only.js(default) +built-ins/RegExp/property-escapes/grammar-extension-separator-only.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-separator.js(default) +built-ins/RegExp/property-escapes/grammar-extension-separator.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-unclosed-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-unclosed-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-unclosed.js(default) +built-ins/RegExp/property-escapes/grammar-extension-unclosed.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-unopened-negated.js(default) +built-ins/RegExp/property-escapes/grammar-extension-unopened-negated.js(strict mode) +built-ins/RegExp/property-escapes/grammar-extension-unopened.js(default) +built-ins/RegExp/property-escapes/grammar-extension-unopened.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-01-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-01-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-01.js(default) +built-ins/RegExp/property-escapes/loose-matching-01.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-02-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-02-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-02.js(default) +built-ins/RegExp/property-escapes/loose-matching-02.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-03-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-03-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-03.js(default) +built-ins/RegExp/property-escapes/loose-matching-03.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-04-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-04-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-04.js(default) +built-ins/RegExp/property-escapes/loose-matching-04.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-05-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-05-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-05.js(default) +built-ins/RegExp/property-escapes/loose-matching-05.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-06-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-06-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-06.js(default) +built-ins/RegExp/property-escapes/loose-matching-06.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-07.js(default) +built-ins/RegExp/property-escapes/loose-matching-07.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-07-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-07-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-08-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-08-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-08.js(default) +built-ins/RegExp/property-escapes/loose-matching-08.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-09-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-09-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-09.js(default) +built-ins/RegExp/property-escapes/loose-matching-09.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-10-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-10-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-10.js(default) +built-ins/RegExp/property-escapes/loose-matching-10.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-11-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-11-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-11.js(default) +built-ins/RegExp/property-escapes/loose-matching-11.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-12-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-12-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-12.js(default) +built-ins/RegExp/property-escapes/loose-matching-12.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-13-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-13-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-13.js(default) +built-ins/RegExp/property-escapes/loose-matching-13.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-14-negated.js(default) +built-ins/RegExp/property-escapes/loose-matching-14-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-14.js(default) +built-ins/RegExp/property-escapes/loose-matching-14.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-equals-negated.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-equals-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-equals.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-equals.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-negated.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-General_Category.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-equals-negated.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-equals-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-equals.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-equals.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-negated.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-equals-negated.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-equals-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-equals.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-equals.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-negated.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions.js(default) +built-ins/RegExp/property-escapes/non-binary-property-without-value-Script_Extensions.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-binary-property-negated.js(default) +built-ins/RegExp/property-escapes/non-existent-binary-property-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-binary-property.js(default) +built-ins/RegExp/property-escapes/non-existent-binary-property.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-and-value-negated.js(default) +built-ins/RegExp/property-escapes/non-existent-property-and-value-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-and-value.js(default) +built-ins/RegExp/property-escapes/non-existent-property-and-value.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-existing-value-negated.js(default) +built-ins/RegExp/property-escapes/non-existent-property-existing-value-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-existing-value.js(default) +built-ins/RegExp/property-escapes/non-existent-property-existing-value.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-value-General_Category-negated.js(default) +built-ins/RegExp/property-escapes/non-existent-property-value-General_Category-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-value-Script-negated.js(default) +built-ins/RegExp/property-escapes/non-existent-property-value-Script-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-value-Script.js(default) +built-ins/RegExp/property-escapes/non-existent-property-value-Script.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-value-Script_Extensions-negated.js(default) +built-ins/RegExp/property-escapes/non-existent-property-value-Script_Extensions-negated.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-value-Script_Extensions.js(default) +built-ins/RegExp/property-escapes/non-existent-property-value-Script_Extensions.js(strict mode) +built-ins/RegExp/property-escapes/non-existent-property-value-general-category.js(default) +built-ins/RegExp/property-escapes/non-existent-property-value-general-category.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Composition_Exclusion-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Composition_Exclusion-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Composition_Exclusion.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Composition_Exclusion.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFC-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFC-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFC.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFC.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFD-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFD-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFD.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFD.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKC-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKC-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKC.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKC.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKD-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKD-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKD.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Expands_On_NFKD.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-FC_NFKC_Closure-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-FC_NFKC_Closure-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-FC_NFKC_Closure.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-FC_NFKC_Closure.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Full_Composition_Exclusion-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Full_Composition_Exclusion-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Full_Composition_Exclusion.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Full_Composition_Exclusion.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Grapheme_Link-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Grapheme_Link-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Grapheme_Link.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Grapheme_Link.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Hyphen-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Hyphen-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Hyphen.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Hyphen.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Alphabetic-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Alphabetic-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Alphabetic.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Alphabetic.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Default_Ignorable_Code_Point-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Default_Ignorable_Code_Point-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Default_Ignorable_Code_Point.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Default_Ignorable_Code_Point.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Grapheme_Extend-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Grapheme_Extend-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Grapheme_Extend.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Grapheme_Extend.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Continue-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Continue-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Continue.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Continue.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Start-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Start-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Start.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_ID_Start.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Lowercase-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Lowercase-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Lowercase.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Lowercase.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Math-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Math-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Math.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Math.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Uppercase-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Uppercase-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Uppercase.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Other_Uppercase.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Prepended_Concatenation_Mark-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Prepended_Concatenation_Mark-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-binary-property-Prepended_Concatenation_Mark.js(default) +built-ins/RegExp/property-escapes/unsupported-binary-property-Prepended_Concatenation_Mark.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-property-Block-with-value-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-property-Block-with-value-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-property-Block-with-value.js(default) +built-ins/RegExp/property-escapes/unsupported-property-Block-with-value.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-property-FC_NFKC_Closure-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-property-FC_NFKC_Closure-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-property-FC_NFKC_Closure.js(default) +built-ins/RegExp/property-escapes/unsupported-property-FC_NFKC_Closure.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-property-Line_Break-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-property-Line_Break-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value-negated.js(default) +built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value-negated.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js(default) +built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js(strict mode) +built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js(default) +built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js(strict mode) +language/expressions/class/fields-literal-name-static-propname-constructor.js(default) +language/expressions/class/fields-literal-name-static-propname-constructor.js(strict mode) +language/expressions/class/fields-string-name-static-propname-constructor.js(default) +language/expressions/class/fields-string-name-static-propname-constructor.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) +language/expressions/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) +language/statements/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) +language/statements/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) +language/expressions/await/async-generator-interleaved.js(default) +language/expressions/await/async-generator-interleaved.js(strict mode) +language/expressions/class/fields-after-same-line-gen-rs-private-getter-alt.js(default) +language/expressions/class/fields-after-same-line-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-gen-rs-private-getter.js(default) +language/expressions/class/fields-after-same-line-gen-rs-private-getter.js(strict mode) +language/expressions/class/fields-after-same-line-gen-rs-private-method-alt.js(default) +language/expressions/class/fields-after-same-line-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-after-same-line-gen-rs-private-method.js(default) +language/expressions/class/fields-after-same-line-gen-rs-private-method.js(strict mode) +language/expressions/class/fields-after-same-line-gen-rs-private-setter-alt.js(default) +language/expressions/class/fields-after-same-line-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-gen-rs-private-setter.js(default) +language/expressions/class/fields-after-same-line-gen-rs-private-setter.js(strict mode) +language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-after-same-line-method-rs-private-getter-alt.js(default) +language/expressions/class/fields-after-same-line-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-method-rs-private-getter.js(default) +language/expressions/class/fields-after-same-line-method-rs-private-getter.js(strict mode) +language/expressions/class/fields-after-same-line-method-rs-private-method-alt.js(default) +language/expressions/class/fields-after-same-line-method-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-after-same-line-method-rs-private-method.js(default) +language/expressions/class/fields-after-same-line-method-rs-private-method.js(strict mode) +language/expressions/class/fields-after-same-line-method-rs-private-setter-alt.js(default) +language/expressions/class/fields-after-same-line-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-method-rs-private-setter.js(default) +language/expressions/class/fields-after-same-line-method-rs-private-setter.js(strict mode) +language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(default) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter.js(default) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-method-alt.js(default) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-method.js(default) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-method.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-setter-alt.js(default) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-setter.js(default) +language/expressions/class/fields-after-same-line-static-async-gen-rs-private-setter.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-getter-alt.js(default) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-getter.js(default) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-getter.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-method-alt.js(default) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-method.js(default) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-method.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(default) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter.js(default) +language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(default) +language/expressions/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-rs-private-getter.js(default) +language/expressions/class/fields-after-same-line-static-gen-rs-private-getter.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-rs-private-method-alt.js(default) +language/expressions/class/fields-after-same-line-static-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-rs-private-method.js(default) +language/expressions/class/fields-after-same-line-static-gen-rs-private-method.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(default) +language/expressions/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-rs-private-setter.js(default) +language/expressions/class/fields-after-same-line-static-gen-rs-private-setter.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-rs-private-getter-alt.js(default) +language/expressions/class/fields-after-same-line-static-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-rs-private-getter.js(default) +language/expressions/class/fields-after-same-line-static-method-rs-private-getter.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-rs-private-method-alt.js(default) +language/expressions/class/fields-after-same-line-static-method-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-rs-private-method.js(default) +language/expressions/class/fields-after-same-line-static-method-rs-private-method.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-rs-private-setter-alt.js(default) +language/expressions/class/fields-after-same-line-static-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-rs-private-setter.js(default) +language/expressions/class/fields-after-same-line-static-method-rs-private-setter.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-multiple-definitions-rs-private-getter-alt.js(default) +language/expressions/class/fields-multiple-definitions-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-multiple-definitions-rs-private-getter.js(default) +language/expressions/class/fields-multiple-definitions-rs-private-getter.js(strict mode) +language/expressions/class/fields-multiple-definitions-rs-private-method-alt.js(default) +language/expressions/class/fields-multiple-definitions-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-multiple-definitions-rs-private-method.js(default) +language/expressions/class/fields-multiple-definitions-rs-private-method.js(strict mode) +language/expressions/class/fields-multiple-definitions-rs-private-setter-alt.js(default) +language/expressions/class/fields-multiple-definitions-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-multiple-definitions-rs-private-setter.js(default) +language/expressions/class/fields-multiple-definitions-rs-private-setter.js(strict mode) +language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(default) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter.js(default) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-method-alt.js(default) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-method.js(default) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-method.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(default) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter.js(default) +language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(default) +language/expressions/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-rs-private-getter.js(default) +language/expressions/class/fields-new-no-sc-line-method-rs-private-getter.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-rs-private-method-alt.js(default) +language/expressions/class/fields-new-no-sc-line-method-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-rs-private-method.js(default) +language/expressions/class/fields-new-no-sc-line-method-rs-private-method.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(default) +language/expressions/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-rs-private-setter.js(default) +language/expressions/class/fields-new-no-sc-line-method-rs-private-setter.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-rs-private-getter-alt.js(default) +language/expressions/class/fields-new-sc-line-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-rs-private-getter.js(default) +language/expressions/class/fields-new-sc-line-gen-rs-private-getter.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-rs-private-method-alt.js(default) +language/expressions/class/fields-new-sc-line-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-rs-private-method.js(default) +language/expressions/class/fields-new-sc-line-gen-rs-private-method.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-rs-private-setter-alt.js(default) +language/expressions/class/fields-new-sc-line-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-rs-private-setter.js(default) +language/expressions/class/fields-new-sc-line-gen-rs-private-setter.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-new-sc-line-method-rs-private-getter-alt.js(default) +language/expressions/class/fields-new-sc-line-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-new-sc-line-method-rs-private-getter.js(default) +language/expressions/class/fields-new-sc-line-method-rs-private-getter.js(strict mode) +language/expressions/class/fields-new-sc-line-method-rs-private-method-alt.js(default) +language/expressions/class/fields-new-sc-line-method-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-new-sc-line-method-rs-private-method.js(default) +language/expressions/class/fields-new-sc-line-method-rs-private-method.js(strict mode) +language/expressions/class/fields-new-sc-line-method-rs-private-setter-alt.js(default) +language/expressions/class/fields-new-sc-line-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-new-sc-line-method-rs-private-setter.js(default) +language/expressions/class/fields-new-sc-line-method-rs-private-setter.js(strict mode) +language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(default) +language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(strict mode) +language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(default) +language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(strict mode) +language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall.js(default) +language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall.js(strict mode) +language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-1.js(default) +language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-1.js(strict mode) +language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-2.js(default) +language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-2.js(strict mode) +language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall.js(default) +language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall.js(strict mode) +language/expressions/class/fields-regular-definitions-rs-private-getter-alt.js(default) +language/expressions/class/fields-regular-definitions-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-regular-definitions-rs-private-getter.js(default) +language/expressions/class/fields-regular-definitions-rs-private-getter.js(strict mode) +language/expressions/class/fields-regular-definitions-rs-private-method-alt.js(default) +language/expressions/class/fields-regular-definitions-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-regular-definitions-rs-private-method.js(default) +language/expressions/class/fields-regular-definitions-rs-private-method.js(strict mode) +language/expressions/class/fields-regular-definitions-rs-private-setter-alt.js(default) +language/expressions/class/fields-regular-definitions-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-regular-definitions-rs-private-setter.js(default) +language/expressions/class/fields-regular-definitions-rs-private-setter.js(strict mode) +language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-same-line-async-gen-rs-private-getter-alt.js(default) +language/expressions/class/fields-same-line-async-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-same-line-async-gen-rs-private-getter.js(default) +language/expressions/class/fields-same-line-async-gen-rs-private-getter.js(strict mode) +language/expressions/class/fields-same-line-async-gen-rs-private-method-alt.js(default) +language/expressions/class/fields-same-line-async-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-same-line-async-gen-rs-private-method.js(default) +language/expressions/class/fields-same-line-async-gen-rs-private-method.js(strict mode) +language/expressions/class/fields-same-line-async-gen-rs-private-setter-alt.js(default) +language/expressions/class/fields-same-line-async-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-same-line-async-gen-rs-private-setter.js(default) +language/expressions/class/fields-same-line-async-gen-rs-private-setter.js(strict mode) +language/expressions/class/fields-same-line-async-method-rs-private-getter-alt.js(default) +language/expressions/class/fields-same-line-async-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-same-line-async-method-rs-private-getter.js(default) +language/expressions/class/fields-same-line-async-method-rs-private-getter.js(strict mode) +language/expressions/class/fields-same-line-async-method-rs-private-method-alt.js(default) +language/expressions/class/fields-same-line-async-method-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-same-line-async-method-rs-private-method.js(default) +language/expressions/class/fields-same-line-async-method-rs-private-method.js(strict mode) +language/expressions/class/fields-same-line-async-method-rs-private-setter-alt.js(default) +language/expressions/class/fields-same-line-async-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-same-line-async-method-rs-private-setter.js(default) +language/expressions/class/fields-same-line-async-method-rs-private-setter.js(strict mode) +language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-same-line-gen-rs-private-getter-alt.js(default) +language/expressions/class/fields-same-line-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-same-line-gen-rs-private-getter.js(default) +language/expressions/class/fields-same-line-gen-rs-private-getter.js(strict mode) +language/expressions/class/fields-same-line-gen-rs-private-method-alt.js(default) +language/expressions/class/fields-same-line-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-same-line-gen-rs-private-method.js(default) +language/expressions/class/fields-same-line-gen-rs-private-method.js(strict mode) +language/expressions/class/fields-same-line-gen-rs-private-setter-alt.js(default) +language/expressions/class/fields-same-line-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-same-line-gen-rs-private-setter.js(default) +language/expressions/class/fields-same-line-gen-rs-private-setter.js(strict mode) +language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-same-line-method-rs-private-getter-alt.js(default) +language/expressions/class/fields-same-line-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-same-line-method-rs-private-getter.js(default) +language/expressions/class/fields-same-line-method-rs-private-getter.js(strict mode) +language/expressions/class/fields-same-line-method-rs-private-method-alt.js(default) +language/expressions/class/fields-same-line-method-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-same-line-method-rs-private-method.js(default) +language/expressions/class/fields-same-line-method-rs-private-method.js(strict mode) +language/expressions/class/fields-same-line-method-rs-private-setter-alt.js(default) +language/expressions/class/fields-same-line-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-same-line-method-rs-private-setter.js(default) +language/expressions/class/fields-same-line-method-rs-private-setter.js(strict mode) +language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-rs-private-getter-alt.js(default) +language/expressions/class/fields-wrapped-in-sc-rs-private-getter-alt.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-rs-private-getter.js(default) +language/expressions/class/fields-wrapped-in-sc-rs-private-getter.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-rs-private-method-alt.js(default) +language/expressions/class/fields-wrapped-in-sc-rs-private-method-alt.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-rs-private-method.js(default) +language/expressions/class/fields-wrapped-in-sc-rs-private-method.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-rs-private-setter-alt.js(default) +language/expressions/class/fields-wrapped-in-sc-rs-private-setter-alt.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-rs-private-setter.js(default) +language/expressions/class/fields-wrapped-in-sc-rs-private-setter.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js(default) +language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/dynamic-import/for-await-resolution-and-error.js(default) +language/expressions/dynamic-import/for-await-resolution-and-error.js(strict mode) +language/statements/class/fields-after-same-line-gen-rs-private-getter-alt.js(default) +language/statements/class/fields-after-same-line-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-after-same-line-gen-rs-private-getter.js(default) +language/statements/class/fields-after-same-line-gen-rs-private-getter.js(strict mode) +language/statements/class/fields-after-same-line-gen-rs-private-method-alt.js(default) +language/statements/class/fields-after-same-line-gen-rs-private-method-alt.js(strict mode) +language/statements/class/fields-after-same-line-gen-rs-private-method.js(default) +language/statements/class/fields-after-same-line-gen-rs-private-method.js(strict mode) +language/statements/class/fields-after-same-line-gen-rs-private-setter-alt.js(default) +language/statements/class/fields-after-same-line-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-after-same-line-gen-rs-private-setter.js(default) +language/statements/class/fields-after-same-line-gen-rs-private-setter.js(strict mode) +language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-after-same-line-method-rs-private-getter-alt.js(default) +language/statements/class/fields-after-same-line-method-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-after-same-line-method-rs-private-getter.js(default) +language/statements/class/fields-after-same-line-method-rs-private-getter.js(strict mode) +language/statements/class/fields-after-same-line-method-rs-private-method-alt.js(default) +language/statements/class/fields-after-same-line-method-rs-private-method-alt.js(strict mode) +language/statements/class/fields-after-same-line-method-rs-private-method.js(default) +language/statements/class/fields-after-same-line-method-rs-private-method.js(strict mode) +language/statements/class/fields-after-same-line-method-rs-private-setter-alt.js(default) +language/statements/class/fields-after-same-line-method-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-after-same-line-method-rs-private-setter.js(default) +language/statements/class/fields-after-same-line-method-rs-private-setter.js(strict mode) +language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(default) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter.js(default) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter.js(strict mode) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-method-alt.js(default) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-method-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-method.js(default) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-method.js(strict mode) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-setter-alt.js(default) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-setter.js(default) +language/statements/class/fields-after-same-line-static-async-gen-rs-private-setter.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-rs-private-getter-alt.js(default) +language/statements/class/fields-after-same-line-static-async-method-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-rs-private-getter.js(default) +language/statements/class/fields-after-same-line-static-async-method-rs-private-getter.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-rs-private-method-alt.js(default) +language/statements/class/fields-after-same-line-static-async-method-rs-private-method-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-rs-private-method.js(default) +language/statements/class/fields-after-same-line-static-async-method-rs-private-method.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(default) +language/statements/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-rs-private-setter.js(default) +language/statements/class/fields-after-same-line-static-async-method-rs-private-setter.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(default) +language/statements/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-rs-private-getter.js(default) +language/statements/class/fields-after-same-line-static-gen-rs-private-getter.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-rs-private-method-alt.js(default) +language/statements/class/fields-after-same-line-static-gen-rs-private-method-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-rs-private-method.js(default) +language/statements/class/fields-after-same-line-static-gen-rs-private-method.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(default) +language/statements/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-rs-private-setter.js(default) +language/statements/class/fields-after-same-line-static-gen-rs-private-setter.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-after-same-line-static-method-rs-private-getter-alt.js(default) +language/statements/class/fields-after-same-line-static-method-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-method-rs-private-getter.js(default) +language/statements/class/fields-after-same-line-static-method-rs-private-getter.js(strict mode) +language/statements/class/fields-after-same-line-static-method-rs-private-method-alt.js(default) +language/statements/class/fields-after-same-line-static-method-rs-private-method-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-method-rs-private-method.js(default) +language/statements/class/fields-after-same-line-static-method-rs-private-method.js(strict mode) +language/statements/class/fields-after-same-line-static-method-rs-private-setter-alt.js(default) +language/statements/class/fields-after-same-line-static-method-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-method-rs-private-setter.js(default) +language/statements/class/fields-after-same-line-static-method-rs-private-setter.js(strict mode) +language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-multiple-definitions-rs-private-getter-alt.js(default) +language/statements/class/fields-multiple-definitions-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-multiple-definitions-rs-private-getter.js(default) +language/statements/class/fields-multiple-definitions-rs-private-getter.js(strict mode) +language/statements/class/fields-multiple-definitions-rs-private-method-alt.js(default) +language/statements/class/fields-multiple-definitions-rs-private-method-alt.js(strict mode) +language/statements/class/fields-multiple-definitions-rs-private-method.js(default) +language/statements/class/fields-multiple-definitions-rs-private-method.js(strict mode) +language/statements/class/fields-multiple-definitions-rs-private-setter-alt.js(default) +language/statements/class/fields-multiple-definitions-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-multiple-definitions-rs-private-setter.js(default) +language/statements/class/fields-multiple-definitions-rs-private-setter.js(strict mode) +language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(default) +language/statements/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-rs-private-getter.js(default) +language/statements/class/fields-multiple-stacked-definitions-rs-private-getter.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-rs-private-method-alt.js(default) +language/statements/class/fields-multiple-stacked-definitions-rs-private-method-alt.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-rs-private-method.js(default) +language/statements/class/fields-multiple-stacked-definitions-rs-private-method.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(default) +language/statements/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-rs-private-setter.js(default) +language/statements/class/fields-multiple-stacked-definitions-rs-private-setter.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(default) +language/statements/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-rs-private-getter.js(default) +language/statements/class/fields-new-no-sc-line-method-rs-private-getter.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-rs-private-method-alt.js(default) +language/statements/class/fields-new-no-sc-line-method-rs-private-method-alt.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-rs-private-method.js(default) +language/statements/class/fields-new-no-sc-line-method-rs-private-method.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(default) +language/statements/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-rs-private-setter.js(default) +language/statements/class/fields-new-no-sc-line-method-rs-private-setter.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-new-sc-line-gen-rs-private-getter-alt.js(default) +language/statements/class/fields-new-sc-line-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-new-sc-line-gen-rs-private-getter.js(default) +language/statements/class/fields-new-sc-line-gen-rs-private-getter.js(strict mode) +language/statements/class/fields-new-sc-line-gen-rs-private-method-alt.js(default) +language/statements/class/fields-new-sc-line-gen-rs-private-method-alt.js(strict mode) +language/statements/class/fields-new-sc-line-gen-rs-private-method.js(default) +language/statements/class/fields-new-sc-line-gen-rs-private-method.js(strict mode) +language/statements/class/fields-new-sc-line-gen-rs-private-setter-alt.js(default) +language/statements/class/fields-new-sc-line-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-new-sc-line-gen-rs-private-setter.js(default) +language/statements/class/fields-new-sc-line-gen-rs-private-setter.js(strict mode) +language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-new-sc-line-method-rs-private-getter-alt.js(default) +language/statements/class/fields-new-sc-line-method-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-new-sc-line-method-rs-private-method-alt.js(default) +language/statements/class/fields-new-sc-line-method-rs-private-method-alt.js(strict mode) +language/statements/class/fields-new-sc-line-method-rs-private-getter.js(default) +language/statements/class/fields-new-sc-line-method-rs-private-getter.js(strict mode) +language/statements/class/fields-new-sc-line-method-rs-private-method.js(default) +language/statements/class/fields-new-sc-line-method-rs-private-method.js(strict mode) +language/statements/class/fields-new-sc-line-method-rs-private-setter-alt.js(default) +language/statements/class/fields-new-sc-line-method-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-new-sc-line-method-rs-private-setter.js(default) +language/statements/class/fields-new-sc-line-method-rs-private-setter.js(strict mode) +language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(default) +language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(strict mode) +language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(default) +language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(strict mode) +language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall.js(default) +language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall.js(strict mode) +language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-1.js(default) +language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-1.js(strict mode) +language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-2.js(default) +language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-2.js(strict mode) +language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall.js(default) +language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall.js(strict mode) +language/statements/class/fields-regular-definitions-rs-private-getter-alt.js(default) +language/statements/class/fields-regular-definitions-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-regular-definitions-rs-private-getter.js(default) +language/statements/class/fields-regular-definitions-rs-private-getter.js(strict mode) +language/statements/class/fields-regular-definitions-rs-private-method-alt.js(default) +language/statements/class/fields-regular-definitions-rs-private-method-alt.js(strict mode) +language/statements/class/fields-regular-definitions-rs-private-method.js(default) +language/statements/class/fields-regular-definitions-rs-private-method.js(strict mode) +language/statements/class/fields-regular-definitions-rs-private-setter-alt.js(default) +language/statements/class/fields-regular-definitions-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-regular-definitions-rs-private-setter.js(default) +language/statements/class/fields-regular-definitions-rs-private-setter.js(strict mode) +language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-same-line-async-gen-rs-private-getter-alt.js(default) +language/statements/class/fields-same-line-async-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-same-line-async-gen-rs-private-getter.js(default) +language/statements/class/fields-same-line-async-gen-rs-private-getter.js(strict mode) +language/statements/class/fields-same-line-async-gen-rs-private-method-alt.js(default) +language/statements/class/fields-same-line-async-gen-rs-private-method-alt.js(strict mode) +language/statements/class/fields-same-line-async-gen-rs-private-method.js(default) +language/statements/class/fields-same-line-async-gen-rs-private-method.js(strict mode) +language/statements/class/fields-same-line-async-gen-rs-private-setter-alt.js(default) +language/statements/class/fields-same-line-async-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-same-line-async-gen-rs-private-setter.js(default) +language/statements/class/fields-same-line-async-gen-rs-private-setter.js(strict mode) +language/statements/class/fields-same-line-async-method-rs-private-getter-alt.js(default) +language/statements/class/fields-same-line-async-method-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-same-line-async-method-rs-private-getter.js(default) +language/statements/class/fields-same-line-async-method-rs-private-getter.js(strict mode) +language/statements/class/fields-same-line-async-method-rs-private-method-alt.js(default) +language/statements/class/fields-same-line-async-method-rs-private-method-alt.js(strict mode) +language/statements/class/fields-same-line-async-method-rs-private-method.js(default) +language/statements/class/fields-same-line-async-method-rs-private-method.js(strict mode) +language/statements/class/fields-same-line-async-method-rs-private-setter-alt.js(default) +language/statements/class/fields-same-line-async-method-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-same-line-async-method-rs-private-setter.js(default) +language/statements/class/fields-same-line-async-method-rs-private-setter.js(strict mode) +language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-same-line-gen-rs-private-getter-alt.js(default) +language/statements/class/fields-same-line-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-same-line-gen-rs-private-getter.js(default) +language/statements/class/fields-same-line-gen-rs-private-getter.js(strict mode) +language/statements/class/fields-same-line-gen-rs-private-method-alt.js(default) +language/statements/class/fields-same-line-gen-rs-private-method-alt.js(strict mode) +language/statements/class/fields-same-line-gen-rs-private-method.js(default) +language/statements/class/fields-same-line-gen-rs-private-method.js(strict mode) +language/statements/class/fields-same-line-gen-rs-private-setter-alt.js(default) +language/statements/class/fields-same-line-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-same-line-gen-rs-private-setter.js(default) +language/statements/class/fields-same-line-gen-rs-private-setter.js(strict mode) +language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-same-line-method-rs-private-getter-alt.js(default) +language/statements/class/fields-same-line-method-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-same-line-method-rs-private-getter.js(default) +language/statements/class/fields-same-line-method-rs-private-getter.js(strict mode) +language/statements/class/fields-same-line-method-rs-private-method-alt.js(default) +language/statements/class/fields-same-line-method-rs-private-method-alt.js(strict mode) +language/statements/class/fields-same-line-method-rs-private-method.js(default) +language/statements/class/fields-same-line-method-rs-private-method.js(strict mode) +language/statements/class/fields-same-line-method-rs-private-setter.js(default) +language/statements/class/fields-same-line-method-rs-private-setter.js(strict mode) +language/statements/class/fields-same-line-method-rs-private-setter-alt.js(default) +language/statements/class/fields-same-line-method-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/statements/class/fields-wrapped-in-sc-rs-private-getter-alt.js(default) +language/statements/class/fields-wrapped-in-sc-rs-private-getter-alt.js(strict mode) +language/statements/class/fields-wrapped-in-sc-rs-private-getter.js(default) +language/statements/class/fields-wrapped-in-sc-rs-private-getter.js(strict mode) +language/statements/class/fields-wrapped-in-sc-rs-private-method-alt.js(default) +language/statements/class/fields-wrapped-in-sc-rs-private-method-alt.js(strict mode) +language/statements/class/fields-wrapped-in-sc-rs-private-method.js(default) +language/statements/class/fields-wrapped-in-sc-rs-private-method.js(strict mode) +language/statements/class/fields-wrapped-in-sc-rs-private-setter-alt.js(default) +language/statements/class/fields-wrapped-in-sc-rs-private-setter-alt.js(strict mode) +language/statements/class/fields-wrapped-in-sc-rs-private-setter.js(default) +language/statements/class/fields-wrapped-in-sc-rs-private-setter.js(strict mode) +language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js(default) +language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) +language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js(default) +language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-block-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-block-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-block-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-block-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-do-while-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-do-while-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-do-while-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-do-while-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-else-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-else-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-else-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-else-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-function-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-function-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-function-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-function-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-function-return-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-function-return-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-function-return-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-function-return-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-if-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-if-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-if-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-if-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-while-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-while-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-while-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-while-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-with-expression-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-with-expression-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-with-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-with-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/top-level-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/top-level-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/top-level-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/top-level-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(strict mode) +language/expressions/class/syntax/early-errors/super-private-access-invalid.js(default) +language/expressions/class/syntax/early-errors/super-private-access-invalid.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(strict mode) +language/statements/class/syntax/early-errors/super-private-access-invalid.js(default) +language/statements/class/syntax/early-errors/super-private-access-invalid.js(strict mode) + +language/statements/class/fields-literal-name-static-propname-constructor.js(default) +language/statements/class/fields-literal-name-static-propname-constructor.js(strict mode) +language/statements/class/fields-string-name-static-propname-constructor.js(default) +language/statements/class/fields-string-name-static-propname-constructor.js(strict mode) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) +language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) \ No newline at end of file From c6d2f45cab257acbe9f1bea25d1ce60b8971f036 Mon Sep 17 00:00:00 2001 From: Logan Smyth Date: Mon, 5 Nov 2018 08:51:27 -0800 Subject: [PATCH 069/563] Resolve babel.config.js 'babelrcRoots' values relative to the config file. (#8910) --- packages/babel-core/src/config/config-chain.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/babel-core/src/config/config-chain.js b/packages/babel-core/src/config/config-chain.js index b9e13a130797..1dcb7b83fdba 100644 --- a/packages/babel-core/src/config/config-chain.js +++ b/packages/babel-core/src/config/config-chain.js @@ -155,6 +155,7 @@ export function buildRootChain( } let { babelrc, babelrcRoots } = opts; + let babelrcRootsDirectory = context.cwd; const configFileChain = emptyChain(); if (configFile) { @@ -168,6 +169,7 @@ export function buildRootChain( babelrc = validatedFile.options.babelrc; } if (babelrcRoots === undefined) { + babelrcRootsDirectory = validatedFile.dirname; babelrcRoots = validatedFile.options.babelrcRoots; } @@ -185,7 +187,7 @@ export function buildRootChain( if ( (babelrc === true || babelrc === undefined) && pkgData && - babelrcLoadEnabled(context, pkgData, babelrcRoots) + babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) ) { ({ ignore: ignoreFile, config: babelrcFile } = findRelativeConfig( pkgData, @@ -229,6 +231,7 @@ function babelrcLoadEnabled( context: ConfigContext, pkgData: FilePackageData, babelrcRoots: BabelrcSearch | void, + babelrcRootsDirectory: string, ): boolean { if (typeof babelrcRoots === "boolean") return babelrcRoots; @@ -243,7 +246,9 @@ function babelrcLoadEnabled( let babelrcPatterns = babelrcRoots; if (!Array.isArray(babelrcPatterns)) babelrcPatterns = [babelrcPatterns]; babelrcPatterns = babelrcPatterns.map(pat => { - return typeof pat === "string" ? path.resolve(context.cwd, pat) : pat; + return typeof pat === "string" + ? path.resolve(babelrcRootsDirectory, pat) + : pat; }); // Fast path to avoid having to match patterns if the babelrc is just @@ -253,10 +258,12 @@ function babelrcLoadEnabled( } return babelrcPatterns.some(pat => { - if (typeof pat === "string") pat = pathPatternToRegex(pat, context.cwd); + if (typeof pat === "string") { + pat = pathPatternToRegex(pat, babelrcRootsDirectory); + } return pkgData.directories.some(directory => { - return matchPattern(pat, context.cwd, directory, context); + return matchPattern(pat, babelrcRootsDirectory, directory, context); }); }); } From f216a7b06f36e6ab38c1456dbe84ff632ae17f6d Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 5 Nov 2018 13:45:40 -0500 Subject: [PATCH 070/563] [flow] Add support for parsing `_` as implicit instantiation in call/new (#8883) * [flow] Add support for parsing as implicit instantiation in call/new * Update flow tests and fix underscore being a reserved type * Rebase onto flow-test * Fix flow commit hash --- Makefile | 4 +- packages/babel-parser/src/plugins/flow.js | 49 ++- .../input.js | 8 + .../output.json | 283 +++++++++++++ .../input.js | 2 + .../options.json | 5 + .../underscore_is_illegal_type_name/input.js | 2 + .../options.json | 8 + .../input.js | 2 + .../options.json | 8 + .../input.js | 2 + .../output.json | 397 ++++++++++++++++++ .../underscore_is_implicit_in_calls/input.js | 2 + .../output.json | 169 ++++++++ .../input.js | 2 + .../output.json | 218 ++++++++++ .../underscore_is_implicit_in_new/input.js | 2 + .../underscore_is_implicit_in_new/output.json | 169 ++++++++ 18 files changed, 1328 insertions(+), 4 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_allowed_trailing_commas/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_allowed_trailing_commas/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_param_instantiation_otherwise/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_param_instantiation_otherwise/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_anywhere_in_list/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_anywhere_in_list/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_calls/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_calls/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_methods/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_methods/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_new/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_new/output.json diff --git a/Makefile b/Makefile index 7f38aef67ef1..4216f3d30683 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ MAKEFLAGS = -j1 -FLOW_COMMIT = bea8b83f50f597454941d2a7ecef6e93a881e576 +FLOW_COMMIT = e192e1a4793dd8e43415fbfe8046d832cb513c8b TEST262_COMMIT = 72f1cfa2abd66a69b29e9b7d691a8ae8c5a7a00f # Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967 @@ -82,7 +82,7 @@ test-ci-coverage: bootstrap-flow: rm -rf ./build/flow mkdir -p ./build - git clone --branch=master --single-branch --shallow-since=2017-01-01 https://github.com/facebook/flow.git ./build/flow + git clone --branch=master --single-branch --shallow-since=2018-11-01 https://github.com/facebook/flow.git ./build/flow cd build/flow && git checkout $(FLOW_COMMIT) test-flow: diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index cd250e9ad085..6ba0ddd8651b 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -23,6 +23,9 @@ const primitiveTypes = [ "true", "typeof", "void", + "interface", + "extends", + "_", ]; function isEsModuleType(bodyElement: N.Node): boolean { @@ -490,6 +493,15 @@ export default (superClass: Class): Class => return this.finishNode(node, "InterfaceDeclaration"); } + checkNotUnderscore(word: string) { + if (word === "_") { + throw this.unexpected( + null, + "`_` is only allowed as a type argument to call or new", + ); + } + } + checkReservedType(word: string, startLoc: number) { if (primitiveTypes.indexOf(word) > -1) { this.raise(startLoc, `Cannot overwrite primitive type ${word}`); @@ -654,6 +666,27 @@ export default (superClass: Class): Class => return this.finishNode(node, "TypeParameterInstantiation"); } + flowParseTypeParameterInstantiationCallOrNew(): N.TypeParameterInstantiation { + const node = this.startNode(); + const oldInType = this.state.inType; + node.params = []; + + this.state.inType = true; + + this.expectRelational("<"); + while (!this.isRelational(">")) { + node.params.push(this.flowParseTypeOrImplicitInstantiation()); + if (!this.isRelational(">")) { + this.expect(tt.comma); + } + } + this.expectRelational(">"); + + this.state.inType = oldInType; + + return this.finishNode(node, "TypeParameterInstantiation"); + } + flowParseInterfaceType(): N.FlowInterfaceType { const node = this.startNode(); this.expectContextual("interface"); @@ -1176,6 +1209,7 @@ export default (superClass: Class): Class => return this.finishNode(node, "StringTypeAnnotation"); default: + this.checkNotUnderscore(id.name); return this.flowParseGenericType(startPos, startLoc, id); } } @@ -1431,6 +1465,17 @@ export default (superClass: Class): Class => return type; } + flowParseTypeOrImplicitInstantiation(): N.FlowTypeAnnotation { + if (this.state.type === tt.name && this.state.value === "_") { + const startPos = this.state.start; + const startLoc = this.state.startLoc; + const node = this.parseIdentifier(); + return this.flowParseGenericType(startPos, startLoc, node); + } else { + return this.flowParseType(); + } + } + flowParseTypeAnnotation(): N.FlowTypeAnnotation { const node = this.startNode(); node.typeAnnotation = this.flowParseTypeInitialiser(); @@ -2582,7 +2627,7 @@ export default (superClass: Class): Class => node.callee = base; const state = this.state.clone(); try { - node.typeArguments = this.flowParseTypeParameterInstantiation(); + node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); this.expect(tt.parenL); node.arguments = this.parseCallExpressionArguments(tt.parenR, false); if (subscriptState.optionalChainMember) { @@ -2613,7 +2658,7 @@ export default (superClass: Class): Class => if (this.shouldParseTypes() && this.isRelational("<")) { const state = this.state.clone(); try { - targs = this.flowParseTypeParameterInstantiation(); + targs = this.flowParseTypeParameterInstantiationCallOrNew(); } catch (e) { if (e instanceof SyntaxError) { this.state = state; diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_allowed_trailing_commas/input.js b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_allowed_trailing_commas/input.js new file mode 100644 index 000000000000..364601fa788d --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_allowed_trailing_commas/input.js @@ -0,0 +1,8 @@ +//@flow +test< + _, + _, + number, + _, + _, +>(); diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_allowed_trailing_commas/output.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_allowed_trailing_commas/output.json new file mode 100644 index 000000000000..e30f8a938f73 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_allowed_trailing_commas/output.json @@ -0,0 +1,283 @@ +{ + "type": "File", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 8, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 8, + "column": 4 + } + }, + "expression": { + "type": "CallExpression", + "start": 8, + "end": 47, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 8, + "column": 3 + } + }, + "callee": { + "type": "Identifier", + "start": 8, + "end": 12, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + }, + "identifierName": "test" + }, + "name": "test" + }, + "typeArguments": { + "type": "TypeParameterInstantiation", + "start": 12, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 8, + "column": 1 + } + }, + "params": [ + { + "type": "GenericTypeAnnotation", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + }, + "identifierName": "_" + }, + "name": "_" + } + }, + { + "type": "GenericTypeAnnotation", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + }, + "identifierName": "_" + }, + "name": "_" + } + }, + { + "type": "NumberTypeAnnotation", + "start": 26, + "end": 32, + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "GenericTypeAnnotation", + "start": 36, + "end": 37, + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 36, + "end": 37, + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + }, + "identifierName": "_" + }, + "name": "_" + } + }, + { + "type": "GenericTypeAnnotation", + "start": 41, + "end": 42, + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 41, + "end": 42, + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + }, + "identifierName": "_" + }, + "name": "_" + } + } + ] + }, + "arguments": [] + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_param_instantiation_otherwise/input.js b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_param_instantiation_otherwise/input.js new file mode 100644 index 000000000000..7886a45bd928 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_param_instantiation_otherwise/input.js @@ -0,0 +1,2 @@ +//@flow +var x: Generic<_> = 3; diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_param_instantiation_otherwise/options.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_param_instantiation_otherwise/options.json new file mode 100644 index 000000000000..101e77f3861c --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_param_instantiation_otherwise/options.json @@ -0,0 +1,5 @@ +{ + "sourceType": "module", + "plugins": ["jsx", "flow"], + "throws": "`_` is only allowed as a type argument to call or new (2:16)" +} diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/input.js b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/input.js new file mode 100644 index 000000000000..3f9596914f16 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/input.js @@ -0,0 +1,2 @@ +//@flow +type _ = number; diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/options.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/options.json new file mode 100644 index 000000000000..5d1868f18b72 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_name/options.json @@ -0,0 +1,8 @@ +{ + "sourceType": "module", + "plugins": [ + "jsx", + "flow" + ], + "throws": "Cannot overwrite primitive type _ (2:5)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/input.js b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/input.js new file mode 100644 index 000000000000..849ac4c23b18 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/input.js @@ -0,0 +1,2 @@ +//@flow +type Generic<_> = _; diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/options.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/options.json new file mode 100644 index 000000000000..adbad818fa99 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_illegal_type_param_name/options.json @@ -0,0 +1,8 @@ +{ + "sourceType": "module", + "plugins": [ + "jsx", + "flow" + ], + "throws": "Cannot overwrite primitive type _ (2:13)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_anywhere_in_list/input.js b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_anywhere_in_list/input.js new file mode 100644 index 000000000000..b9aaa5913aa2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_anywhere_in_list/input.js @@ -0,0 +1,2 @@ +//@flow +test(); diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_anywhere_in_list/output.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_anywhere_in_list/output.json new file mode 100644 index 000000000000..7b90b530ad65 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_anywhere_in_list/output.json @@ -0,0 +1,397 @@ +{ + "type": "File", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 50 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 58, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 50 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 8, + "end": 58, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 50 + } + }, + "expression": { + "type": "CallExpression", + "start": 8, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 8, + "end": 12, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + }, + "identifierName": "test" + }, + "name": "test" + }, + "typeArguments": { + "type": "TypeParameterInstantiation", + "start": 12, + "end": 55, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 47 + } + }, + "params": [ + { + "type": "NumberTypeAnnotation", + "start": 13, + "end": 19, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "GenericTypeAnnotation", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 21, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + }, + "identifierName": "_" + }, + "name": "_" + } + }, + { + "type": "StringTypeAnnotation", + "start": 24, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "GenericTypeAnnotation", + "start": 32, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 32, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 25 + }, + "identifierName": "_" + }, + "name": "_" + } + }, + { + "type": "GenericTypeAnnotation", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + }, + "identifierName": "_" + }, + "name": "_" + } + }, + { + "type": "GenericTypeAnnotation", + "start": 38, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 31 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 38, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 31 + }, + "identifierName": "_" + }, + "name": "_" + } + }, + { + "type": "GenericTypeAnnotation", + "start": 41, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 36 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 41, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 36 + }, + "identifierName": "Foo" + }, + "name": "Foo" + } + }, + { + "type": "GenericTypeAnnotation", + "start": 46, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 41 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 46, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 41 + }, + "identifierName": "Bar" + }, + "name": "Bar" + } + }, + { + "type": "GenericTypeAnnotation", + "start": 51, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 43 + }, + "end": { + "line": 2, + "column": 46 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 51, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 43 + }, + "end": { + "line": 2, + "column": 46 + }, + "identifierName": "Baz" + }, + "name": "Baz" + } + } + ] + }, + "arguments": [] + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_calls/input.js b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_calls/input.js new file mode 100644 index 000000000000..51ba34d9c1d6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_calls/input.js @@ -0,0 +1,2 @@ +//@flow +test<_>(); diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_calls/output.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_calls/output.json new file mode 100644 index 000000000000..6d1aceded869 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_calls/output.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 8, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "expression": { + "type": "CallExpression", + "start": 8, + "end": 17, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + }, + "callee": { + "type": "Identifier", + "start": 8, + "end": 12, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + }, + "identifierName": "test" + }, + "name": "test" + }, + "typeArguments": { + "type": "TypeParameterInstantiation", + "start": 12, + "end": 15, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "params": [ + { + "type": "GenericTypeAnnotation", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + }, + "identifierName": "_" + }, + "name": "_" + } + } + ] + }, + "arguments": [] + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_methods/input.js b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_methods/input.js new file mode 100644 index 000000000000..27f8acf9165a --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_methods/input.js @@ -0,0 +1,2 @@ +//@flow +instance.method()<_>(); diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_methods/output.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_methods/output.json new file mode 100644 index 000000000000..26c9a3ee4039 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_methods/output.json @@ -0,0 +1,218 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 8, + "end": 31, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "expression": { + "type": "CallExpression", + "start": 8, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "callee": { + "type": "CallExpression", + "start": 8, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + }, + "callee": { + "type": "MemberExpression", + "start": 8, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "object": { + "type": "Identifier", + "start": 8, + "end": 16, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + }, + "identifierName": "instance" + }, + "name": "instance" + }, + "property": { + "type": "Identifier", + "start": 17, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + }, + "identifierName": "method" + }, + "name": "method" + }, + "computed": false + }, + "arguments": [] + }, + "typeArguments": { + "type": "TypeParameterInstantiation", + "start": 25, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "params": [ + { + "type": "GenericTypeAnnotation", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + }, + "identifierName": "_" + }, + "name": "_" + } + } + ] + }, + "arguments": [] + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_new/input.js b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_new/input.js new file mode 100644 index 000000000000..4805c6ee75cc --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_new/input.js @@ -0,0 +1,2 @@ +//@flow +new test<_>(); diff --git a/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_new/output.json b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_new/output.json new file mode 100644 index 000000000000..6c48948afe6a --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typeapp-call/underscore_is_implicit_in_new/output.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 8, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "expression": { + "type": "NewExpression", + "start": 8, + "end": 21, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "callee": { + "type": "Identifier", + "start": 12, + "end": 16, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + }, + "identifierName": "test" + }, + "name": "test" + }, + "typeArguments": { + "type": "TypeParameterInstantiation", + "start": 16, + "end": 19, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + }, + "params": [ + { + "type": "GenericTypeAnnotation", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + }, + "identifierName": "_" + }, + "name": "_" + } + } + ] + }, + "arguments": [] + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": "@flow", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] +} \ No newline at end of file From c125b1dd74692b3a36b1701b7c9a1d69f1a13558 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 5 Nov 2018 10:53:34 -0800 Subject: [PATCH 071/563] Update test262 commit, as old commit broke for some reason --- Makefile | 2 +- scripts/tests/test262/test262_whitelist.txt | 70 ++++++++++++++++++++- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4216f3d30683..242672c1d994 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ MAKEFLAGS = -j1 FLOW_COMMIT = e192e1a4793dd8e43415fbfe8046d832cb513c8b -TEST262_COMMIT = 72f1cfa2abd66a69b29e9b7d691a8ae8c5a7a00f +TEST262_COMMIT = 69c1efd325deedf54db92a23008399e2b00fa51e # Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967 export FORCE_COLOR = true diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index f02af59ed128..d4e2c134fe87 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -1734,4 +1734,72 @@ language/statements/class/fields-string-name-static-propname-constructor.js(stri language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) \ No newline at end of file +language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) +language/expressions/class/fields-after-same-line-gen-private-field-usage.js(default) +language/expressions/class/fields-after-same-line-gen-private-field-usage.js(strict mode) +language/expressions/class/fields-after-same-line-method-private-field-usage.js(default) +language/expressions/class/fields-after-same-line-method-private-field-usage.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-gen-private-field-usage.js(default) +language/expressions/class/fields-after-same-line-static-async-gen-private-field-usage.js(strict mode) +language/expressions/class/fields-after-same-line-static-async-method-private-field-usage.js(default) +language/expressions/class/fields-after-same-line-static-async-method-private-field-usage.js(strict mode) +language/expressions/class/fields-after-same-line-static-gen-private-field-usage.js(default) +language/expressions/class/fields-after-same-line-static-gen-private-field-usage.js(strict mode) +language/expressions/class/fields-after-same-line-static-method-private-field-usage.js(default) +language/expressions/class/fields-after-same-line-static-method-private-field-usage.js(strict mode) +language/expressions/class/fields-multiple-definitions-private-field-usage.js(default) +language/expressions/class/fields-multiple-definitions-private-field-usage.js(strict mode) +language/expressions/class/fields-multiple-stacked-definitions-private-field-usage.js(default) +language/expressions/class/fields-multiple-stacked-definitions-private-field-usage.js(strict mode) +language/expressions/class/fields-new-no-sc-line-method-private-field-usage.js(default) +language/expressions/class/fields-new-no-sc-line-method-private-field-usage.js(strict mode) +language/expressions/class/fields-new-sc-line-gen-private-field-usage.js(default) +language/expressions/class/fields-new-sc-line-gen-private-field-usage.js(strict mode) +language/expressions/class/fields-new-sc-line-method-private-field-usage.js(default) +language/expressions/class/fields-new-sc-line-method-private-field-usage.js(strict mode) +language/expressions/class/fields-regular-definitions-private-field-usage.js(default) +language/expressions/class/fields-regular-definitions-private-field-usage.js(strict mode) +language/expressions/class/fields-same-line-async-gen-private-field-usage.js(default) +language/expressions/class/fields-same-line-async-gen-private-field-usage.js(strict mode) +language/expressions/class/fields-same-line-async-method-private-field-usage.js(default) +language/expressions/class/fields-same-line-async-method-private-field-usage.js(strict mode) +language/expressions/class/fields-same-line-gen-private-field-usage.js(default) +language/expressions/class/fields-same-line-gen-private-field-usage.js(strict mode) +language/expressions/class/fields-same-line-method-private-field-usage.js(default) +language/expressions/class/fields-same-line-method-private-field-usage.js(strict mode) +language/expressions/class/fields-wrapped-in-sc-private-field-usage.js(default) +language/expressions/class/fields-wrapped-in-sc-private-field-usage.js(strict mode) +language/statements/class/fields-after-same-line-gen-private-field-usage.js(default) +language/statements/class/fields-after-same-line-gen-private-field-usage.js(strict mode) +language/statements/class/fields-after-same-line-method-private-field-usage.js(default) +language/statements/class/fields-after-same-line-method-private-field-usage.js(strict mode) +language/statements/class/fields-after-same-line-static-async-gen-private-field-usage.js(default) +language/statements/class/fields-after-same-line-static-async-gen-private-field-usage.js(strict mode) +language/statements/class/fields-after-same-line-static-async-method-private-field-usage.js(default) +language/statements/class/fields-after-same-line-static-async-method-private-field-usage.js(strict mode) +language/statements/class/fields-after-same-line-static-gen-private-field-usage.js(default) +language/statements/class/fields-after-same-line-static-gen-private-field-usage.js(strict mode) +language/statements/class/fields-after-same-line-static-method-private-field-usage.js(default) +language/statements/class/fields-after-same-line-static-method-private-field-usage.js(strict mode) +language/statements/class/fields-multiple-definitions-private-field-usage.js(default) +language/statements/class/fields-multiple-definitions-private-field-usage.js(strict mode) +language/statements/class/fields-multiple-stacked-definitions-private-field-usage.js(default) +language/statements/class/fields-multiple-stacked-definitions-private-field-usage.js(strict mode) +language/statements/class/fields-new-no-sc-line-method-private-field-usage.js(default) +language/statements/class/fields-new-no-sc-line-method-private-field-usage.js(strict mode) +language/statements/class/fields-new-sc-line-gen-private-field-usage.js(default) +language/statements/class/fields-new-sc-line-gen-private-field-usage.js(strict mode) +language/statements/class/fields-new-sc-line-method-private-field-usage.js(default) +language/statements/class/fields-new-sc-line-method-private-field-usage.js(strict mode) +language/statements/class/fields-regular-definitions-private-field-usage.js(default) +language/statements/class/fields-regular-definitions-private-field-usage.js(strict mode) +language/statements/class/fields-same-line-async-gen-private-field-usage.js(default) +language/statements/class/fields-same-line-async-gen-private-field-usage.js(strict mode) +language/statements/class/fields-same-line-async-method-private-field-usage.js(default) +language/statements/class/fields-same-line-async-method-private-field-usage.js(strict mode) +language/statements/class/fields-same-line-gen-private-field-usage.js(default) +language/statements/class/fields-same-line-gen-private-field-usage.js(strict mode) +language/statements/class/fields-same-line-method-private-field-usage.js(default) +language/statements/class/fields-same-line-method-private-field-usage.js(strict mode) +language/statements/class/fields-wrapped-in-sc-private-field-usage.js(default) +language/statements/class/fields-wrapped-in-sc-private-field-usage.js(strict mode) \ No newline at end of file From 24c4901ff56c57db1ac60e4d810424656d18e374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 5 Nov 2018 23:48:06 +0100 Subject: [PATCH 072/563] Remove Babylon plugins for features already merged to the ECMAScript spec (#8448) These are now enabled by default: - objectRestSpread (2018) - asyncGenerators (2018) - optionalCatchBInding (2019) - jsonStrings (2019) TODO (after this commit): - [ ] Deprecate the `@babel/plugin-syntax-*` packages. - [ ] Deprecate the `@babel/plugin-proposal-*` packages. - [ ] Create the `@babel/plugin-transform-*` packages. --- .../util/missing-plugin-helper.js | 65 ++-- packages/babel-core/test/api.js | 4 +- .../syntax-and-transform/file.js | 5 +- .../compact/expression-statement/options.json | 1 - .../edgecase/async-generator/options.json | 2 +- .../options.json | 1 - .../fixtures/types/RestProperty/options.json | 1 - .../babel-parser/src/parser/expression.js | 7 +- packages/babel-parser/src/parser/statement.js | 11 +- packages/babel-parser/src/tokenizer/index.js | 5 +- .../object-rest-spread/options.json | 3 - .../async-generators/class-method-2/input.js | 0 .../class-method-2/output.json | 0 .../class-method-no-asi/input.js | 0 .../class-method-no-asi/options.json | 0 .../async-generators/class-method/input.js | 0 .../async-generators/class-method/output.json | 0 .../for-await-async-context/input.js | 0 .../for-await-async-context/options.json | 0 .../async-generators/for-await-no-in/input.js | 0 .../for-await-no-in/options.json | 0 .../for-await-no-semi-1/input.js | 0 .../for-await-no-semi-1/options.json | 0 .../for-await-no-semi-2/input.js | 0 .../for-await-no-semi-2/options.json | 0 .../for-await-no-semi-3/input.js | 0 .../for-await-no-semi-3/options.json | 0 .../async-generators/for-await/input.js | 0 .../async-generators/for-await/output.json | 0 .../async-generators/object-method/input.js | 0 .../object-method/output.json | 0 .../object-rest-spread/1/input.js | 0 .../object-rest-spread/1/output.json | 0 .../object-rest-spread/10/input.js | 0 .../object-rest-spread/10/output.json | 0 .../object-rest-spread/11/input.js | 0 .../object-rest-spread/11/options.json | 0 .../object-rest-spread/12/input.js | 0 .../object-rest-spread/12/options.json | 0 .../object-rest-spread/13/input.js | 0 .../object-rest-spread/13/options.json | 0 .../object-rest-spread/14/input.js | 0 .../object-rest-spread/14/options.json | 0 .../object-rest-spread/15/input.js | 0 .../object-rest-spread/15/options.json | 0 .../object-rest-spread/16/input.js | 0 .../object-rest-spread/16/options.json | 0 .../object-rest-spread/17/input.js | 0 .../object-rest-spread/17/options.json | 0 .../object-rest-spread/18/input.js | 0 .../object-rest-spread/18/options.json | 0 .../object-rest-spread/19/input.js | 0 .../object-rest-spread/19/options.json | 0 .../object-rest-spread/2/input.js | 0 .../object-rest-spread/2/output.json | 0 .../object-rest-spread/20/input.js | 0 .../object-rest-spread/20/options.json | 0 .../object-rest-spread/21/input.js | 0 .../object-rest-spread/21/options.json | 0 .../object-rest-spread/22/input.js | 0 .../object-rest-spread/22/options.json | 0 .../object-rest-spread/23/input.js | 0 .../object-rest-spread/23/options.json | 0 .../object-rest-spread/24/input.js | 0 .../object-rest-spread/24/options.json | 0 .../object-rest-spread/25/input.js | 0 .../object-rest-spread/25/options.json | 0 .../object-rest-spread/26/input.js | 0 .../object-rest-spread/26/options.json | 0 .../object-rest-spread/3/input.js | 0 .../object-rest-spread/3/output.json | 0 .../object-rest-spread/4/input.js | 0 .../object-rest-spread/4/output.json | 0 .../object-rest-spread/5/input.js | 0 .../object-rest-spread/5/output.json | 0 .../object-rest-spread/6/input.js | 0 .../object-rest-spread/6/output.json | 0 .../object-rest-spread/7/input.js | 0 .../object-rest-spread/7/options.json | 0 .../object-rest-spread/8/input.js | 0 .../object-rest-spread/8/options.json | 0 .../object-rest-spread/9/input.js | 0 .../object-rest-spread/9/options.json | 0 .../expression-rest-not-last-invalid/input.js | 0 .../options.json | 0 .../directive-line-separator/input.js | 0 .../directive-line-separator/output.json | 0 .../directive-paragraph-separator/input.js | 0 .../directive-paragraph-separator/output.json | 0 .../string-line-separator/input.js | 0 .../string-line-separator/output.json | 0 .../string-paragraph-separator/input.js | 0 .../string-paragraph-separator/output.json | 0 .../no-binding-finally}/input.js | 0 .../no-binding-finally}/output.json | 0 .../no-binding}/input.js | 0 .../no-binding}/output.json | 0 .../_no-plugin/async-generators/input.js | 1 - .../_no-plugin/async-generators/options.json | 4 - .../_no-plugin/object-rest-spread/input.js | 1 - .../object-rest-spread/options.json | 4 - .../async-generators/options.json | 3 - .../async-generator/options.json | 2 +- .../experimental/json-strings/options.json | 3 - .../object-rest-spread/options.json | 3 - .../no-plugin-no-binding-finally/options.json | 3 - .../no-plugin-no-binding/options.json | 3 - .../no-plugin-yes-binding-finally/input.js | 4 - .../no-plugin-yes-binding-finally/output.json | 134 ------- .../no-plugin-yes-binding/input.js | 2 - .../no-plugin-yes-binding/output.json | 118 ------- .../yes-plugin-no-binding-finally/input.js | 9 - .../options.json | 3 - .../yes-plugin-no-binding/input.js | 6 - .../yes-plugin-no-binding/options.json | 3 - .../yes-plugin-yes-binding-finally/input.js | 4 - .../options.json | 3 - .../output.json | 134 ------- .../yes-plugin-yes-binding/input.js | 2 - .../yes-plugin-yes-binding/options.json | 3 - .../yes-plugin-yes-binding/output.json | 118 ------- .../src/index.js | 3 +- packages/babel-traverse/test/inference.js | 2 +- scripts/tests/flow/flow_tests_whitelist.txt | 1 - .../tests/flow/run_babel_parser_flow_tests.js | 2 - .../test262/run_babel_parser_test262_utils.js | 8 +- scripts/tests/test262/test262_whitelist.txt | 333 ++++++------------ 127 files changed, 151 insertions(+), 873 deletions(-) delete mode 100644 packages/babel-generator/test/fixtures/compact/expression-statement/options.json delete mode 100644 packages/babel-generator/test/fixtures/types/Optional-TryStatement-CatchClause/options.json delete mode 100644 packages/babel-generator/test/fixtures/types/RestProperty/options.json delete mode 100644 packages/babel-parser/test/fixtures/es2015/arrow-functions/object-rest-spread/options.json rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/class-method-2/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/class-method-2/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/class-method-no-asi/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/class-method-no-asi/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/class-method/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/class-method/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-async-context/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-async-context/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-no-in/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-no-in/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-no-semi-1/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-no-semi-1/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-no-semi-2/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-no-semi-2/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-no-semi-3/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await-no-semi-3/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/for-await/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/object-method/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/async-generators/object-method/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/1/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/1/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/10/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/10/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/11/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/11/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/12/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/12/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/13/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/13/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/14/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/14/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/15/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/15/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/16/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/16/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/17/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/17/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/18/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/18/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/19/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/19/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/2/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/2/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/20/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/20/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/21/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/21/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/22/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/22/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/23/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/23/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/24/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/24/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/25/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/25/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/26/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/26/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/3/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/3/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/4/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/4/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/5/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/5/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/6/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/6/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/7/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/7/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/8/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/8/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/9/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/9/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/expression-rest-not-last-invalid/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2018}/object-rest-spread/expression-rest-not-last-invalid/options.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2019}/json-strings/directive-line-separator/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2019}/json-strings/directive-line-separator/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2019}/json-strings/directive-paragraph-separator/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2019}/json-strings/directive-paragraph-separator/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2019}/json-strings/string-line-separator/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2019}/json-strings/string-line-separator/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental => es2019}/json-strings/string-paragraph-separator/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental => es2019}/json-strings/string-paragraph-separator/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental/optional-catch-binding/no-plugin-no-binding-finally => es2019/optional-catch-binding/no-binding-finally}/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental/optional-catch-binding/yes-plugin-no-binding-finally => es2019/optional-catch-binding/no-binding-finally}/output.json (100%) rename packages/babel-parser/test/fixtures/{experimental/optional-catch-binding/no-plugin-no-binding => es2019/optional-catch-binding/no-binding}/input.js (100%) rename packages/babel-parser/test/fixtures/{experimental/optional-catch-binding/yes-plugin-no-binding => es2019/optional-catch-binding/no-binding}/output.json (100%) delete mode 100644 packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/async-generators/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/json-strings/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/object-rest-spread/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding-finally/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding-finally/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/output.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/input.js delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/options.json delete mode 100644 packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/output.json diff --git a/packages/babel-core/src/transformation/util/missing-plugin-helper.js b/packages/babel-core/src/transformation/util/missing-plugin-helper.js index 2f1090c9110e..b0642c50c3cf 100644 --- a/packages/babel-core/src/transformation/util/missing-plugin-helper.js +++ b/packages/babel-core/src/transformation/util/missing-plugin-helper.js @@ -1,16 +1,6 @@ // @flow const pluginNameMap = { - asyncGenerators: { - syntax: { - name: "@babel/plugin-syntax-async-generators", - url: "https://git.io/vb4SY", - }, - transform: { - name: "@babel/plugin-proposal-async-generator-functions", - url: "https://git.io/vb4yp", - }, - }, classProperties: { syntax: { name: "@babel/plugin-syntax-class-properties", @@ -143,26 +133,6 @@ const pluginNameMap = { url: "https://git.io/vb4yS", }, }, - objectRestSpread: { - syntax: { - name: "@babel/plugin-syntax-object-rest-spread", - url: "https://git.io/vb4y5", - }, - transform: { - name: "@babel/plugin-proposal-object-rest-spread", - url: "https://git.io/vb4Ss", - }, - }, - optionalCatchBinding: { - syntax: { - name: "@babel/plugin-syntax-optional-catch-binding", - url: "https://git.io/vb4Sn", - }, - transform: { - name: "@babel/plugin-proposal-optional-catch-binding", - url: "https://git.io/vb4SI", - }, - }, optionalChaining: { syntax: { name: "@babel/plugin-syntax-optional-chaining", @@ -203,6 +173,41 @@ const pluginNameMap = { url: "https://git.io/vb4Sm", }, }, + + // TODO: This plugins are now supported by default by @babel/parser: they can + // be removed from this list. Although removing them isn't a breaking change, + // it's better to keep a nice error message for users using older versions of + // the parser. They can be removed in Babel 8. + asyncGenerators: { + syntax: { + name: "@babel/plugin-syntax-async-generators", + url: "https://git.io/vb4SY", + }, + transform: { + name: "@babel/plugin-proposal-async-generator-functions", + url: "https://git.io/vb4yp", + }, + }, + objectRestSpread: { + syntax: { + name: "@babel/plugin-syntax-object-rest-spread", + url: "https://git.io/vb4y5", + }, + transform: { + name: "@babel/plugin-proposal-object-rest-spread", + url: "https://git.io/vb4Ss", + }, + }, + optionalCatchBinding: { + syntax: { + name: "@babel/plugin-syntax-optional-catch-binding", + url: "https://git.io/vb4Sn", + }, + transform: { + name: "@babel/plugin-proposal-optional-catch-binding", + url: "https://git.io/vb4SI", + }, + }, }; const getNameURLCombination = ({ name, url }) => `${name} (${url})`; diff --git a/packages/babel-core/test/api.js b/packages/babel-core/test/api.js index 5c3a97c7a376..0d8cf8fb3b99 100644 --- a/packages/babel-core/test/api.js +++ b/packages/babel-core/test/api.js @@ -769,10 +769,10 @@ describe("api", function() { options, function(err) { expect(err.message).toMatch( - "Support for the experimental syntax 'asyncGenerators' isn't currently enabled (1:15):", + "Support for the experimental syntax 'logicalAssignment' isn't currently enabled (1:3):", ); expect(err.message).toMatch( - "Add @babel/plugin-proposal-async-generator-functions (https://git.io/vb4yp) to the " + + "Add @babel/plugin-proposal-logical-assignment-operators (https://git.io/vAlRe) to the " + "'plugins' section of your Babel config to enable transformation.", ); done(); diff --git a/packages/babel-core/test/fixtures/api/parsing-errors/syntax-and-transform/file.js b/packages/babel-core/test/fixtures/api/parsing-errors/syntax-and-transform/file.js index a0eb4637c6d8..0cb4253cd41b 100644 --- a/packages/babel-core/test/fixtures/api/parsing-errors/syntax-and-transform/file.js +++ b/packages/babel-core/test/fixtures/api/parsing-errors/syntax-and-transform/file.js @@ -1,4 +1 @@ -async function* agf() { - await 1; - yield 2; -} +a ||= 2; diff --git a/packages/babel-generator/test/fixtures/compact/expression-statement/options.json b/packages/babel-generator/test/fixtures/compact/expression-statement/options.json deleted file mode 100644 index 8a2a1d3bfa91..000000000000 --- a/packages/babel-generator/test/fixtures/compact/expression-statement/options.json +++ /dev/null @@ -1 +0,0 @@ -{ "plugins": ["objectRestSpread"] } diff --git a/packages/babel-generator/test/fixtures/edgecase/async-generator/options.json b/packages/babel-generator/test/fixtures/edgecase/async-generator/options.json index 1ec463510a34..600c3f8fc13c 100644 --- a/packages/babel-generator/test/fixtures/edgecase/async-generator/options.json +++ b/packages/babel-generator/test/fixtures/edgecase/async-generator/options.json @@ -1 +1 @@ -{ "plugins": ["asyncGenerators", "classProperties"] } +{ "plugins": ["classProperties"] } diff --git a/packages/babel-generator/test/fixtures/types/Optional-TryStatement-CatchClause/options.json b/packages/babel-generator/test/fixtures/types/Optional-TryStatement-CatchClause/options.json deleted file mode 100644 index f7793b0dd816..000000000000 --- a/packages/babel-generator/test/fixtures/types/Optional-TryStatement-CatchClause/options.json +++ /dev/null @@ -1 +0,0 @@ -{ "plugins": ["optionalCatchBinding"] } diff --git a/packages/babel-generator/test/fixtures/types/RestProperty/options.json b/packages/babel-generator/test/fixtures/types/RestProperty/options.json deleted file mode 100644 index 8a2a1d3bfa91..000000000000 --- a/packages/babel-generator/test/fixtures/types/RestProperty/options.json +++ /dev/null @@ -1 +0,0 @@ -{ "plugins": ["objectRestSpread"] } diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index dae74bf3d614..32258f23e035 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -1322,7 +1322,6 @@ export default class ExpressionParser extends LValParser { } if (this.match(tt.ellipsis)) { - this.expectPlugin("objectRestSpread"); prop = this.parseSpread(isPattern ? { start: 0 } : undefined); if (isPattern) { this.toAssignable(prop, true, "object pattern"); @@ -1382,11 +1381,7 @@ export default class ExpressionParser extends LValParser { prop.computed = false; } else { isAsync = true; - if (this.match(tt.star)) { - this.expectPlugin("asyncGenerators"); - this.next(); - isGenerator = true; - } + isGenerator = this.eat(tt.star); this.parsePropertyName(prop); } } else { diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 61551ead7585..475d6dab3d91 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -391,7 +391,6 @@ export default class StatementParser extends ExpressionParser { let forAwait = false; if (this.state.inAsync && this.isContextual("await")) { - this.expectPlugin("asyncGenerators"); forAwait = true; this.next(); } @@ -556,7 +555,6 @@ export default class StatementParser extends ExpressionParser { this.checkLVal(clause.param, true, clashes, "catch clause"); this.expect(tt.parenR); } else { - this.expectPlugin("optionalCatchBinding"); clause.param = null; } clause.body = this.parseBlock(); @@ -853,9 +851,6 @@ export default class StatementParser extends ExpressionParser { this.initFunction(node, isAsync); if (this.match(tt.star)) { - if (node.async) { - this.expectPlugin("asyncGenerators"); - } node.generator = true; this.next(); } @@ -1153,11 +1148,7 @@ export default class StatementParser extends ExpressionParser { } } else if (isSimple && key.name === "async" && !this.isLineTerminator()) { // an async method - const isGenerator = this.match(tt.star); - if (isGenerator) { - this.expectPlugin("asyncGenerators"); - this.next(); - } + const isGenerator = this.eat(tt.star); method.kind = "method"; // The so-called parsed name would have been "async": get the real name. diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 5343b308ee5f..150ea892527b 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -1070,7 +1070,6 @@ export default class Tokenizer extends LocationParser { readString(quote: number): void { let out = "", chunkStart = ++this.state.pos; - const hasJsonStrings = this.hasPlugin("jsonStrings"); for (;;) { if (this.state.pos >= this.input.length) { this.raise(this.state.start, "Unterminated string constant"); @@ -1083,8 +1082,8 @@ export default class Tokenizer extends LocationParser { out += this.readEscapedChar(false); chunkStart = this.state.pos; } else if ( - hasJsonStrings && - (ch === charCodes.lineSeparator || ch === charCodes.paragraphSeparator) + ch === charCodes.lineSeparator || + ch === charCodes.paragraphSeparator ) { ++this.state.pos; ++this.state.curLine; diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/object-rest-spread/options.json b/packages/babel-parser/test/fixtures/es2015/arrow-functions/object-rest-spread/options.json deleted file mode 100644 index 4de042a69733..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/arrow-functions/object-rest-spread/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["objectRestSpread"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/class-method-2/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/class-method-2/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/class-method-2/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/class-method-2/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/class-method-2/output.json b/packages/babel-parser/test/fixtures/es2018/async-generators/class-method-2/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/class-method-2/output.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/class-method-2/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/class-method-no-asi/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/class-method-no-asi/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/class-method-no-asi/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/class-method-no-asi/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/class-method-no-asi/options.json b/packages/babel-parser/test/fixtures/es2018/async-generators/class-method-no-asi/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/class-method-no-asi/options.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/class-method-no-asi/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/class-method/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/class-method/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/class-method/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/class-method/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/class-method/output.json b/packages/babel-parser/test/fixtures/es2018/async-generators/class-method/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/class-method/output.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/class-method/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-async-context/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-async-context/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-async-context/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-async-context/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-async-context/options.json b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-async-context/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-async-context/options.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-async-context/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-in/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-in/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-in/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-in/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-in/options.json b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-in/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-in/options.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-in/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-1/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-1/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-1/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-1/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-1/options.json b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-1/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-1/options.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-1/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-2/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-2/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-2/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-2/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-2/options.json b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-2/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-2/options.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-2/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-3/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-3/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-3/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-3/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-3/options.json b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-3/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await-no-semi-3/options.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await-no-semi-3/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/for-await/output.json b/packages/babel-parser/test/fixtures/es2018/async-generators/for-await/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/for-await/output.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/for-await/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/object-method/input.js b/packages/babel-parser/test/fixtures/es2018/async-generators/object-method/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/object-method/input.js rename to packages/babel-parser/test/fixtures/es2018/async-generators/object-method/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/object-method/output.json b/packages/babel-parser/test/fixtures/es2018/async-generators/object-method/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/async-generators/object-method/output.json rename to packages/babel-parser/test/fixtures/es2018/async-generators/object-method/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/1/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/1/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/1/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/1/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/1/output.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/1/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/1/output.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/1/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/10/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/10/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/10/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/10/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/10/output.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/10/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/10/output.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/10/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/11/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/11/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/11/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/11/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/12/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/12/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/12/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/12/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/13/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/13/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/13/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/13/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/14/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/14/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/14/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/14/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/15/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/15/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/15/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/15/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/16/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/16/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/16/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/16/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/17/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/17/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/17/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/17/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/18/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/18/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/18/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/18/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/18/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/18/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/18/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/18/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/19/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/19/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/19/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/19/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/2/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/2/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/2/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/2/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/2/output.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/2/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/2/output.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/2/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/20/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/20/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/20/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/20/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/21/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/21/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/21/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/21/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/21/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/21/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/21/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/21/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/22/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/22/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/22/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/22/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/23/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/23/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/23/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/23/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/24/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/24/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/24/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/24/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/24/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/24/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/24/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/24/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/25/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/25/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/25/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/25/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/26/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/26/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/26/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/26/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/3/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/3/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/3/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/3/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/3/output.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/3/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/3/output.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/3/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/4/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/4/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/4/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/4/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/4/output.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/4/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/4/output.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/4/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/5/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/5/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/5/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/5/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/5/output.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/5/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/5/output.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/5/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/6/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/6/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/6/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/6/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/6/output.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/6/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/6/output.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/6/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/7/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/7/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/7/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/7/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/8/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/8/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/8/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/8/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/9/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/9/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/9/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/9/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/expression-rest-not-last-invalid/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/expression-rest-not-last-invalid/input.js rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/expression-rest-not-last-invalid/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/object-rest-spread/expression-rest-not-last-invalid/options.json rename to packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/directive-line-separator/input.js b/packages/babel-parser/test/fixtures/es2019/json-strings/directive-line-separator/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/json-strings/directive-line-separator/input.js rename to packages/babel-parser/test/fixtures/es2019/json-strings/directive-line-separator/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/directive-line-separator/output.json b/packages/babel-parser/test/fixtures/es2019/json-strings/directive-line-separator/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/json-strings/directive-line-separator/output.json rename to packages/babel-parser/test/fixtures/es2019/json-strings/directive-line-separator/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/directive-paragraph-separator/input.js b/packages/babel-parser/test/fixtures/es2019/json-strings/directive-paragraph-separator/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/json-strings/directive-paragraph-separator/input.js rename to packages/babel-parser/test/fixtures/es2019/json-strings/directive-paragraph-separator/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/directive-paragraph-separator/output.json b/packages/babel-parser/test/fixtures/es2019/json-strings/directive-paragraph-separator/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/json-strings/directive-paragraph-separator/output.json rename to packages/babel-parser/test/fixtures/es2019/json-strings/directive-paragraph-separator/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/string-line-separator/input.js b/packages/babel-parser/test/fixtures/es2019/json-strings/string-line-separator/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/json-strings/string-line-separator/input.js rename to packages/babel-parser/test/fixtures/es2019/json-strings/string-line-separator/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/string-line-separator/output.json b/packages/babel-parser/test/fixtures/es2019/json-strings/string-line-separator/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/json-strings/string-line-separator/output.json rename to packages/babel-parser/test/fixtures/es2019/json-strings/string-line-separator/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/string-paragraph-separator/input.js b/packages/babel-parser/test/fixtures/es2019/json-strings/string-paragraph-separator/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/json-strings/string-paragraph-separator/input.js rename to packages/babel-parser/test/fixtures/es2019/json-strings/string-paragraph-separator/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/string-paragraph-separator/output.json b/packages/babel-parser/test/fixtures/es2019/json-strings/string-paragraph-separator/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/json-strings/string-paragraph-separator/output.json rename to packages/babel-parser/test/fixtures/es2019/json-strings/string-paragraph-separator/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/input.js b/packages/babel-parser/test/fixtures/es2019/optional-catch-binding/no-binding-finally/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/input.js rename to packages/babel-parser/test/fixtures/es2019/optional-catch-binding/no-binding-finally/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/output.json b/packages/babel-parser/test/fixtures/es2019/optional-catch-binding/no-binding-finally/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/output.json rename to packages/babel-parser/test/fixtures/es2019/optional-catch-binding/no-binding-finally/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/input.js b/packages/babel-parser/test/fixtures/es2019/optional-catch-binding/no-binding/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/input.js rename to packages/babel-parser/test/fixtures/es2019/optional-catch-binding/no-binding/input.js diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/output.json b/packages/babel-parser/test/fixtures/es2019/optional-catch-binding/no-binding/output.json similarity index 100% rename from packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/output.json rename to packages/babel-parser/test/fixtures/es2019/optional-catch-binding/no-binding/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/input.js b/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/input.js deleted file mode 100644 index 6d06ef263a91..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/input.js +++ /dev/null @@ -1 +0,0 @@ -async function * f () {} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/options.json deleted file mode 100644 index 4fbfd38e6810..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/async-generators/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "throws": "This experimental syntax requires enabling the parser plugin: 'asyncGenerators' (1:15)", - "plugins": [] -} diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/input.js b/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/input.js deleted file mode 100644 index 93e64fb4cac9..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/input.js +++ /dev/null @@ -1 +0,0 @@ -({...x}) diff --git a/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/options.json b/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/options.json deleted file mode 100644 index 98dd2ee11d99..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/_no-plugin/object-rest-spread/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "throws": "This experimental syntax requires enabling the parser plugin: 'objectRestSpread' (1:2)", - "plugins": [] -} diff --git a/packages/babel-parser/test/fixtures/experimental/async-generators/options.json b/packages/babel-parser/test/fixtures/experimental/async-generators/options.json deleted file mode 100644 index eea8c9d9d384..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/async-generators/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["asyncGenerators"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-methods/async-generator/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-methods/async-generator/options.json index 4b249f0aaaaa..8d265ec66c23 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-methods/async-generator/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-methods/async-generator/options.json @@ -1,3 +1,3 @@ { - "plugins": ["classPrivateMethods", "asyncGenerators"] + "plugins": ["classPrivateMethods"] } diff --git a/packages/babel-parser/test/fixtures/experimental/json-strings/options.json b/packages/babel-parser/test/fixtures/experimental/json-strings/options.json deleted file mode 100644 index 81996860335a..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/json-strings/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["jsonStrings"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/options.json b/packages/babel-parser/test/fixtures/experimental/object-rest-spread/options.json deleted file mode 100644 index 4de042a69733..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/object-rest-spread/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["objectRestSpread"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/options.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/options.json deleted file mode 100644 index 0b022f9ea115..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding-finally/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "This experimental syntax requires enabling the parser plugin: 'optionalCatchBinding' (4:6)" -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/options.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/options.json deleted file mode 100644 index 0b022f9ea115..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-no-binding/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "This experimental syntax requires enabling the parser plugin: 'optionalCatchBinding' (4:6)" -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding-finally/input.js b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding-finally/input.js deleted file mode 100644 index e0a74b86fa60..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding-finally/input.js +++ /dev/null @@ -1,4 +0,0 @@ -try { -} catch (err) { -} finally { -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding-finally/output.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding-finally/output.json deleted file mode 100644 index c8261f6ba30f..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding-finally/output.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 1 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "TryStatement", - "start": 0, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 1 - } - }, - "block": { - "type": "BlockStatement", - "start": 4, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 4 - }, - "end": { - "line": 2, - "column": 1 - } - }, - "body": [], - "directives": [] - }, - "handler": { - "type": "CatchClause", - "start": 8, - "end": 23, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "param": { - "type": "Identifier", - "start": 15, - "end": 18, - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 12 - }, - "identifierName": "err" - }, - "name": "err" - }, - "body": { - "type": "BlockStatement", - "start": 20, - "end": 23, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "body": [], - "directives": [] - } - }, - "guardedHandlers": [], - "finalizer": { - "type": "BlockStatement", - "start": 32, - "end": 35, - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 4, - "column": 1 - } - }, - "body": [], - "directives": [] - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding/input.js b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding/input.js deleted file mode 100644 index c68ec0293881..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding/input.js +++ /dev/null @@ -1,2 +0,0 @@ -try { -} catch (err) {} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding/output.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding/output.json deleted file mode 100644 index f99c9541a456..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/no-plugin-yes-binding/output.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "TryStatement", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "block": { - "type": "BlockStatement", - "start": 4, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 4 - }, - "end": { - "line": 2, - "column": 1 - } - }, - "body": [], - "directives": [] - }, - "handler": { - "type": "CatchClause", - "start": 8, - "end": 22, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "param": { - "type": "Identifier", - "start": 15, - "end": 18, - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 12 - }, - "identifierName": "err" - }, - "name": "err" - }, - "body": { - "type": "BlockStatement", - "start": 20, - "end": 22, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "body": [], - "directives": [] - } - }, - "guardedHandlers": [], - "finalizer": null - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/input.js b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/input.js deleted file mode 100644 index 9faba4b001dc..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/input.js +++ /dev/null @@ -1,9 +0,0 @@ -try { - -} -catch { - -} -finally { - -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/options.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/options.json deleted file mode 100644 index b937a8bb5d2f..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding-finally/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalCatchBinding"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/input.js b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/input.js deleted file mode 100644 index 2550d2c262b7..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/input.js +++ /dev/null @@ -1,6 +0,0 @@ -try { - -} -catch { - -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/options.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/options.json deleted file mode 100644 index b937a8bb5d2f..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-no-binding/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalCatchBinding"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/input.js b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/input.js deleted file mode 100644 index e0a74b86fa60..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/input.js +++ /dev/null @@ -1,4 +0,0 @@ -try { -} catch (err) { -} finally { -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/options.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/options.json deleted file mode 100644 index b937a8bb5d2f..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalCatchBinding"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/output.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/output.json deleted file mode 100644 index c8261f6ba30f..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding-finally/output.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 1 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 1 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "TryStatement", - "start": 0, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 1 - } - }, - "block": { - "type": "BlockStatement", - "start": 4, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 4 - }, - "end": { - "line": 2, - "column": 1 - } - }, - "body": [], - "directives": [] - }, - "handler": { - "type": "CatchClause", - "start": 8, - "end": 23, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "param": { - "type": "Identifier", - "start": 15, - "end": 18, - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 12 - }, - "identifierName": "err" - }, - "name": "err" - }, - "body": { - "type": "BlockStatement", - "start": 20, - "end": 23, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 3, - "column": 1 - } - }, - "body": [], - "directives": [] - } - }, - "guardedHandlers": [], - "finalizer": { - "type": "BlockStatement", - "start": 32, - "end": 35, - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 4, - "column": 1 - } - }, - "body": [], - "directives": [] - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/input.js b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/input.js deleted file mode 100644 index c68ec0293881..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/input.js +++ /dev/null @@ -1,2 +0,0 @@ -try { -} catch (err) {} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/options.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/options.json deleted file mode 100644 index b937a8bb5d2f..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["optionalCatchBinding"] -} diff --git a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/output.json b/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/output.json deleted file mode 100644 index f99c9541a456..000000000000 --- a/packages/babel-parser/test/fixtures/experimental/optional-catch-binding/yes-plugin-yes-binding/output.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "TryStatement", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "block": { - "type": "BlockStatement", - "start": 4, - "end": 7, - "loc": { - "start": { - "line": 1, - "column": 4 - }, - "end": { - "line": 2, - "column": 1 - } - }, - "body": [], - "directives": [] - }, - "handler": { - "type": "CatchClause", - "start": 8, - "end": 22, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "param": { - "type": "Identifier", - "start": 15, - "end": 18, - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 12 - }, - "identifierName": "err" - }, - "name": "err" - }, - "body": { - "type": "BlockStatement", - "start": 20, - "end": 22, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "body": [], - "directives": [] - } - }, - "guardedHandlers": [], - "finalizer": null - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-plugin-syntax-typescript/src/index.js b/packages/babel-plugin-syntax-typescript/src/index.js index d804ab18bf7c..3986ca4aafd5 100644 --- a/packages/babel-plugin-syntax-typescript/src/index.js +++ b/packages/babel-plugin-syntax-typescript/src/index.js @@ -31,8 +31,9 @@ export default declare((api, { isTSX }) => { parserOpts.plugins.push( "typescript", - "objectRestSpread", "classProperties", + // TODO: This is enabled by default now, remove in Babel 8 + "objectRestSpread", ); if (isTSX) { diff --git a/packages/babel-traverse/test/inference.js b/packages/babel-traverse/test/inference.js index 5c893545a72a..e3c55c23a436 100644 --- a/packages/babel-traverse/test/inference.js +++ b/packages/babel-traverse/test/inference.js @@ -3,7 +3,7 @@ import { parse } from "@babel/parser"; import * as t from "@babel/types"; function getPath(code) { - const ast = parse(code, { plugins: ["flow", "asyncGenerators"] }); + const ast = parse(code, { plugins: ["flow"] }); let path; traverse(ast, { Program: function(_path) { diff --git a/scripts/tests/flow/flow_tests_whitelist.txt b/scripts/tests/flow/flow_tests_whitelist.txt index e9f6d0bc4262..ce8851c727df 100644 --- a/scripts/tests/flow/flow_tests_whitelist.txt +++ b/scripts/tests/flow/flow_tests_whitelist.txt @@ -15,7 +15,6 @@ async_await/migrated_0020.js async_await/migrated_0024.js async_await/migrated_0027.js async_generators/migrated_0007.js -catch/optional_catch_binding.js class_properties/migrated_0000.js class_properties/migrated_0005.js class_properties/migrated_0011.js diff --git a/scripts/tests/flow/run_babel_parser_flow_tests.js b/scripts/tests/flow/run_babel_parser_flow_tests.js index 5595262e6abf..7cd85ce78ab5 100644 --- a/scripts/tests/flow/run_babel_parser_flow_tests.js +++ b/scripts/tests/flow/run_babel_parser_flow_tests.js @@ -109,12 +109,10 @@ function update_whitelist(summary) { const options = { plugins: [ - "asyncGenerators", "dynamicImport", ["flow", { all: true }], "flowComments", "jsx", - "objectRestSpread", "classPrivateProperties", ], sourceType: "module", diff --git a/scripts/tests/test262/run_babel_parser_test262_utils.js b/scripts/tests/test262/run_babel_parser_test262_utils.js index 629053cc2a52..249e1b7c2c8a 100644 --- a/scripts/tests/test262/run_babel_parser_test262_utils.js +++ b/scripts/tests/test262/run_babel_parser_test262_utils.js @@ -14,6 +14,7 @@ const parse = require("../../../packages/babel-parser").parse; const ignoredFeatures = [ "async-functions", + "async-iteration", "arrow-function", "class", "const", @@ -59,6 +60,9 @@ const ignoredFeatures = [ "Uint8ClampedArray", "computed-property-names", "well-formed-json-stringify", + "object-spread", + "object-rest", + "optional-catch-binding", "Object.fromEntries", "Object.is", "Reflect.setPrototypeOf", @@ -102,7 +106,6 @@ const ignoredFeatures = [ ]; const featuresToPlugins = { - "async-iteration": "asyncGenerators", BigInt: "bigInt", "class-fields-private": "classPrivateProperties", "class-fields-public": "classProperties", @@ -114,9 +117,6 @@ const featuresToPlugins = { "export-star-as-namespace-from-module": "exportNamespaceFrom", "import.meta": "importMeta", "numeric-separator-literal": "numericSeparator", - "object-rest": "objectRestSpread", - "object-spread": "objectRestSpread", - "optional-catch-binding": "optionalCatchBinding", }; function getPlugins(features) { diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index d4e2c134fe87..e24e628223f1 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -215,8 +215,6 @@ annexB/language/statements/for-in/bare-initializer.js(default) annexB/language/statements/for-in/bare-initializer.js(strict mode) language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -229,26 +227,8 @@ language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to- language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js(default) language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -263,8 +243,6 @@ language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -279,8 +257,6 @@ language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -294,8 +270,6 @@ language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redecl language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -310,8 +284,6 @@ language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redec language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -326,8 +298,6 @@ language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-w language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -352,20 +322,8 @@ language/expressions/async-function/early-errors-expression-formals-body-duplica language/expressions/async-function/early-errors-expression-formals-body-duplicate.js(strict mode) language/expressions/async-function/named-dflt-params-duplicates.js(default) language/expressions/async-function/nameless-dflt-params-duplicates.js(default) -language/expressions/async-generator/dflt-params-duplicates.js(default) -language/expressions/async-generator/early-errors-expression-await-as-function-binding-identifier.js(default) -language/expressions/async-generator/early-errors-expression-await-as-function-binding-identifier.js(strict mode) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(default) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(strict mode) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(default) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(strict mode) -language/expressions/async-generator/early-errors-expression-formals-contains-await.js(default) -language/expressions/async-generator/early-errors-expression-formals-contains-await.js(strict mode) -language/expressions/async-generator/named-dflt-params-duplicates.js(default) language/expressions/function/dflt-params-duplicates.js(default) language/expressions/generators/dflt-params-duplicates.js(default) -language/expressions/object/method-definition/async-gen-meth-dflt-params-duplicates.js(default) -language/expressions/object/method-definition/async-meth-dflt-params-duplicates.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(strict mode) language/expressions/object/method-definition/early-errors-object-method-await-in-formals-default.js(default) @@ -443,9 +401,6 @@ language/statements/async-function/early-errors-declaration-await-in-formals.js( language/statements/async-function/early-errors-declaration-await-in-formals.js(strict mode) language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(default) language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(strict mode) -language/statements/async-generator/dflt-params-duplicates.js(default) -language/statements/class/async-gen-meth-escaped-async.js(default) -language/statements/class/async-gen-meth-escaped-async.js(strict mode) language/statements/class/async-meth-escaped-async.js(default) language/statements/class/async-meth-escaped-async.js(strict mode) language/statements/class/definition/early-errors-class-method-await-in-formals-default.js(default) @@ -460,13 +415,9 @@ language/statements/class/syntax/early-errors/class-definition-evaluation-script language/statements/const/redeclaration-error-from-within-strict-mode-function-const.js(default) language/statements/do-while/decl-async-fun.js(default) language/statements/do-while/decl-async-fun.js(strict mode) -language/statements/do-while/decl-async-gen.js(default) -language/statements/do-while/decl-async-gen.js(strict mode) language/statements/do-while/labelled-fn-stmt.js(default) language/statements/for/decl-async-fun.js(default) language/statements/for/decl-async-fun.js(strict mode) -language/statements/for/decl-async-gen.js(default) -language/statements/for/decl-async-gen.js(strict mode) language/statements/for/head-let-bound-names-in-stmt.js(default) language/statements/for/head-let-bound-names-in-stmt.js(strict mode) language/statements/for/labelled-fn-stmt-expr.js(default) @@ -474,8 +425,6 @@ language/statements/for/labelled-fn-stmt-let.js(default) language/statements/for/labelled-fn-stmt-var.js(default) language/statements/for-in/decl-async-fun.js(default) language/statements/for-in/decl-async-fun.js(strict mode) -language/statements/for-in/decl-async-gen.js(default) -language/statements/for-in/decl-async-gen.js(strict mode) language/statements/for-in/dstr-array-rest-before-elision.js(default) language/statements/for-in/dstr-array-rest-before-elision.js(strict mode) language/statements/for-in/dstr-array-rest-elision-invalid.js(default) @@ -494,8 +443,6 @@ language/statements/for-in/labelled-fn-stmt-lhs.js(default) language/statements/for-in/labelled-fn-stmt-var.js(default) language/statements/for-of/decl-async-fun.js(default) language/statements/for-of/decl-async-fun.js(strict mode) -language/statements/for-of/decl-async-gen.js(default) -language/statements/for-of/decl-async-gen.js(strict mode) language/statements/for-of/dstr-array-rest-before-elision.js(default) language/statements/for-of/dstr-array-rest-before-elision.js(strict mode) language/statements/for-of/dstr-array-rest-elision-invalid.js(default) @@ -526,16 +473,8 @@ language/statements/if/if-async-fun-else-stmt.js(default) language/statements/if/if-async-fun-else-stmt.js(strict mode) language/statements/if/if-async-fun-no-else.js(default) language/statements/if/if-async-fun-no-else.js(strict mode) -language/statements/if/if-async-gen-else-async-gen.js(default) -language/statements/if/if-async-gen-else-async-gen.js(strict mode) -language/statements/if/if-async-gen-else-stmt.js(default) -language/statements/if/if-async-gen-else-stmt.js(strict mode) -language/statements/if/if-async-gen-no-else.js(default) -language/statements/if/if-async-gen-no-else.js(strict mode) language/statements/if/if-stmt-else-async-fun.js(default) language/statements/if/if-stmt-else-async-fun.js(strict mode) -language/statements/if/if-stmt-else-async-gen.js(default) -language/statements/if/if-stmt-else-async-gen.js(strict mode) language/statements/if/labelled-fn-stmt-first.js(default) language/statements/if/labelled-fn-stmt-lone.js(default) language/statements/if/labelled-fn-stmt-second.js(default) @@ -546,8 +485,6 @@ language/statements/let/syntax/attempt-to-redeclare-let-binding-with-var.js(defa language/statements/let/syntax/attempt-to-redeclare-let-binding-with-var.js(strict mode) language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -560,26 +497,8 @@ language/statements/switch/syntax/redeclaration/async-function-declaration-attem language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js(default) language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -594,8 +513,6 @@ language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-red language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -610,8 +527,6 @@ language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-red language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -625,8 +540,6 @@ language/statements/switch/syntax/redeclaration/function-declaration-attempt-to- language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -641,8 +554,6 @@ language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -657,8 +568,6 @@ language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redec language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js(default) language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js(default) @@ -675,11 +584,8 @@ language/statements/try/early-catch-var.js(default) language/statements/try/early-catch-var.js(strict mode) language/statements/while/decl-async-fun.js(default) language/statements/while/decl-async-fun.js(strict mode) -language/statements/while/decl-async-gen.js(default) -language/statements/while/decl-async-gen.js(strict mode) language/statements/while/labelled-fn-stmt.js(default) language/statements/with/decl-async-fun.js(default) -language/statements/with/decl-async-gen.js(default) language/statements/with/labelled-fn-stmt.js(default) language/identifiers/unicode-escape-nls-err.js(default) @@ -749,15 +655,6 @@ language/statements/try/early-catch-function.js(default) language/statements/try/early-catch-function.js(strict mode) language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js(default) language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js(strict mode) -language/literals/string/line-separator.js(default) -language/literals/string/line-separator.js(strict mode) -language/literals/string/paragraph-separator.js(default) -language/literals/string/paragraph-separator.js(strict mode) -built-ins/Function/prototype/toString/proxy-async-generator-function.js(default) -built-ins/Function/prototype/toString/proxy-async-generator-function.js(strict mode) -built-ins/Function/prototype/toString/proxy-async-generator-method-definition.js(default) -built-ins/Function/prototype/toString/proxy-async-generator-method-definition.js(strict mode) - built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js(default) built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js(strict mode) built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F.js(default) @@ -1050,8 +947,6 @@ language/expressions/class/syntax/early-errors/grammar-ctor-super-no-heritage.js language/expressions/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) language/statements/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) language/statements/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) -language/expressions/await/async-generator-interleaved.js(default) -language/expressions/await/async-generator-interleaved.js(strict mode) language/expressions/class/fields-after-same-line-gen-rs-private-getter-alt.js(default) language/expressions/class/fields-after-same-line-gen-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-after-same-line-gen-rs-private-getter.js(default) @@ -1064,10 +959,6 @@ language/expressions/class/fields-after-same-line-gen-rs-private-setter-alt.js(d language/expressions/class/fields-after-same-line-gen-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-after-same-line-gen-rs-private-setter.js(default) language/expressions/class/fields-after-same-line-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-after-same-line-method-rs-private-getter-alt.js(default) language/expressions/class/fields-after-same-line-method-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-after-same-line-method-rs-private-getter.js(default) @@ -1080,10 +971,6 @@ language/expressions/class/fields-after-same-line-method-rs-private-setter-alt.j language/expressions/class/fields-after-same-line-method-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-after-same-line-method-rs-private-setter.js(default) language/expressions/class/fields-after-same-line-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(default) language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter.js(default) @@ -1108,10 +995,6 @@ language/expressions/class/fields-after-same-line-static-async-method-rs-private language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter.js(default) language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(default) language/expressions/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-after-same-line-static-gen-rs-private-getter.js(default) @@ -1124,10 +1007,6 @@ language/expressions/class/fields-after-same-line-static-gen-rs-private-setter-a language/expressions/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-after-same-line-static-gen-rs-private-setter.js(default) language/expressions/class/fields-after-same-line-static-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-after-same-line-static-method-rs-private-getter-alt.js(default) language/expressions/class/fields-after-same-line-static-method-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-after-same-line-static-method-rs-private-getter.js(default) @@ -1140,10 +1019,6 @@ language/expressions/class/fields-after-same-line-static-method-rs-private-sette language/expressions/class/fields-after-same-line-static-method-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-after-same-line-static-method-rs-private-setter.js(default) language/expressions/class/fields-after-same-line-static-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-multiple-definitions-rs-private-getter-alt.js(default) language/expressions/class/fields-multiple-definitions-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-multiple-definitions-rs-private-getter.js(default) @@ -1156,10 +1031,6 @@ language/expressions/class/fields-multiple-definitions-rs-private-setter-alt.js( language/expressions/class/fields-multiple-definitions-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-multiple-definitions-rs-private-setter.js(default) language/expressions/class/fields-multiple-definitions-rs-private-setter.js(strict mode) -language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(default) language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter.js(default) @@ -1172,10 +1043,6 @@ language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter.js(default) language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(default) language/expressions/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-new-no-sc-line-method-rs-private-getter.js(default) @@ -1188,10 +1055,6 @@ language/expressions/class/fields-new-no-sc-line-method-rs-private-setter-alt.js language/expressions/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-new-no-sc-line-method-rs-private-setter.js(default) language/expressions/class/fields-new-no-sc-line-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-new-sc-line-gen-rs-private-getter-alt.js(default) language/expressions/class/fields-new-sc-line-gen-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-new-sc-line-gen-rs-private-getter.js(default) @@ -1204,10 +1067,6 @@ language/expressions/class/fields-new-sc-line-gen-rs-private-setter-alt.js(defau language/expressions/class/fields-new-sc-line-gen-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-new-sc-line-gen-rs-private-setter.js(default) language/expressions/class/fields-new-sc-line-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-new-sc-line-method-rs-private-getter-alt.js(default) language/expressions/class/fields-new-sc-line-method-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-new-sc-line-method-rs-private-getter.js(default) @@ -1220,10 +1079,6 @@ language/expressions/class/fields-new-sc-line-method-rs-private-setter-alt.js(de language/expressions/class/fields-new-sc-line-method-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-new-sc-line-method-rs-private-setter.js(default) language/expressions/class/fields-new-sc-line-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(default) language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(strict mode) language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(default) @@ -1248,10 +1103,6 @@ language/expressions/class/fields-regular-definitions-rs-private-setter-alt.js(d language/expressions/class/fields-regular-definitions-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-regular-definitions-rs-private-setter.js(default) language/expressions/class/fields-regular-definitions-rs-private-setter.js(strict mode) -language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-same-line-async-gen-rs-private-getter-alt.js(default) language/expressions/class/fields-same-line-async-gen-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-same-line-async-gen-rs-private-getter.js(default) @@ -1276,10 +1127,6 @@ language/expressions/class/fields-same-line-async-method-rs-private-setter-alt.j language/expressions/class/fields-same-line-async-method-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-same-line-async-method-rs-private-setter.js(default) language/expressions/class/fields-same-line-async-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-same-line-gen-rs-private-getter-alt.js(default) language/expressions/class/fields-same-line-gen-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-same-line-gen-rs-private-getter.js(default) @@ -1292,10 +1139,6 @@ language/expressions/class/fields-same-line-gen-rs-private-setter-alt.js(default language/expressions/class/fields-same-line-gen-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-same-line-gen-rs-private-setter.js(default) language/expressions/class/fields-same-line-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-same-line-method-rs-private-getter-alt.js(default) language/expressions/class/fields-same-line-method-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-same-line-method-rs-private-getter.js(default) @@ -1308,10 +1151,6 @@ language/expressions/class/fields-same-line-method-rs-private-setter-alt.js(defa language/expressions/class/fields-same-line-method-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-same-line-method-rs-private-setter.js(default) language/expressions/class/fields-same-line-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/class/fields-wrapped-in-sc-rs-private-getter-alt.js(default) language/expressions/class/fields-wrapped-in-sc-rs-private-getter-alt.js(strict mode) language/expressions/class/fields-wrapped-in-sc-rs-private-getter.js(default) @@ -1324,12 +1163,6 @@ language/expressions/class/fields-wrapped-in-sc-rs-private-setter-alt.js(default language/expressions/class/fields-wrapped-in-sc-rs-private-setter-alt.js(strict mode) language/expressions/class/fields-wrapped-in-sc-rs-private-setter.js(default) language/expressions/class/fields-wrapped-in-sc-rs-private-setter.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js(default) -language/expressions/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js(strict mode) -language/expressions/dynamic-import/for-await-resolution-and-error.js(default) -language/expressions/dynamic-import/for-await-resolution-and-error.js(strict mode) language/statements/class/fields-after-same-line-gen-rs-private-getter-alt.js(default) language/statements/class/fields-after-same-line-gen-rs-private-getter-alt.js(strict mode) language/statements/class/fields-after-same-line-gen-rs-private-getter.js(default) @@ -1342,10 +1175,6 @@ language/statements/class/fields-after-same-line-gen-rs-private-setter-alt.js(de language/statements/class/fields-after-same-line-gen-rs-private-setter-alt.js(strict mode) language/statements/class/fields-after-same-line-gen-rs-private-setter.js(default) language/statements/class/fields-after-same-line-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-after-same-line-method-rs-private-getter-alt.js(default) language/statements/class/fields-after-same-line-method-rs-private-getter-alt.js(strict mode) language/statements/class/fields-after-same-line-method-rs-private-getter.js(default) @@ -1358,10 +1187,6 @@ language/statements/class/fields-after-same-line-method-rs-private-setter-alt.js language/statements/class/fields-after-same-line-method-rs-private-setter-alt.js(strict mode) language/statements/class/fields-after-same-line-method-rs-private-setter.js(default) language/statements/class/fields-after-same-line-method-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-after-same-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(default) language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(strict mode) language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter.js(default) @@ -1386,10 +1211,6 @@ language/statements/class/fields-after-same-line-static-async-method-rs-private- language/statements/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(strict mode) language/statements/class/fields-after-same-line-static-async-method-rs-private-setter.js(default) language/statements/class/fields-after-same-line-static-async-method-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(default) language/statements/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(strict mode) language/statements/class/fields-after-same-line-static-gen-rs-private-getter.js(default) @@ -1402,10 +1223,6 @@ language/statements/class/fields-after-same-line-static-gen-rs-private-setter-al language/statements/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(strict mode) language/statements/class/fields-after-same-line-static-gen-rs-private-setter.js(default) language/statements/class/fields-after-same-line-static-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-after-same-line-static-method-rs-private-getter-alt.js(default) language/statements/class/fields-after-same-line-static-method-rs-private-getter-alt.js(strict mode) language/statements/class/fields-after-same-line-static-method-rs-private-getter.js(default) @@ -1418,10 +1235,6 @@ language/statements/class/fields-after-same-line-static-method-rs-private-setter language/statements/class/fields-after-same-line-static-method-rs-private-setter-alt.js(strict mode) language/statements/class/fields-after-same-line-static-method-rs-private-setter.js(default) language/statements/class/fields-after-same-line-static-method-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-multiple-definitions-rs-private-getter-alt.js(default) language/statements/class/fields-multiple-definitions-rs-private-getter-alt.js(strict mode) language/statements/class/fields-multiple-definitions-rs-private-getter.js(default) @@ -1434,10 +1247,6 @@ language/statements/class/fields-multiple-definitions-rs-private-setter-alt.js(d language/statements/class/fields-multiple-definitions-rs-private-setter-alt.js(strict mode) language/statements/class/fields-multiple-definitions-rs-private-setter.js(default) language/statements/class/fields-multiple-definitions-rs-private-setter.js(strict mode) -language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-multiple-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(default) language/statements/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(strict mode) language/statements/class/fields-multiple-stacked-definitions-rs-private-getter.js(default) @@ -1450,10 +1259,6 @@ language/statements/class/fields-multiple-stacked-definitions-rs-private-setter- language/statements/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(strict mode) language/statements/class/fields-multiple-stacked-definitions-rs-private-setter.js(default) language/statements/class/fields-multiple-stacked-definitions-rs-private-setter.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(default) language/statements/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(strict mode) language/statements/class/fields-new-no-sc-line-method-rs-private-getter.js(default) @@ -1466,10 +1271,6 @@ language/statements/class/fields-new-no-sc-line-method-rs-private-setter-alt.js( language/statements/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(strict mode) language/statements/class/fields-new-no-sc-line-method-rs-private-setter.js(default) language/statements/class/fields-new-no-sc-line-method-rs-private-setter.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-new-sc-line-gen-rs-private-getter-alt.js(default) language/statements/class/fields-new-sc-line-gen-rs-private-getter-alt.js(strict mode) language/statements/class/fields-new-sc-line-gen-rs-private-getter.js(default) @@ -1482,10 +1283,6 @@ language/statements/class/fields-new-sc-line-gen-rs-private-setter-alt.js(defaul language/statements/class/fields-new-sc-line-gen-rs-private-setter-alt.js(strict mode) language/statements/class/fields-new-sc-line-gen-rs-private-setter.js(default) language/statements/class/fields-new-sc-line-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-new-sc-line-method-rs-private-getter-alt.js(default) language/statements/class/fields-new-sc-line-method-rs-private-getter-alt.js(strict mode) language/statements/class/fields-new-sc-line-method-rs-private-method-alt.js(default) @@ -1498,10 +1295,6 @@ language/statements/class/fields-new-sc-line-method-rs-private-setter-alt.js(def language/statements/class/fields-new-sc-line-method-rs-private-setter-alt.js(strict mode) language/statements/class/fields-new-sc-line-method-rs-private-setter.js(default) language/statements/class/fields-new-sc-line-method-rs-private-setter.js(strict mode) -language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(default) language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(strict mode) language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(default) @@ -1526,10 +1319,6 @@ language/statements/class/fields-regular-definitions-rs-private-setter-alt.js(de language/statements/class/fields-regular-definitions-rs-private-setter-alt.js(strict mode) language/statements/class/fields-regular-definitions-rs-private-setter.js(default) language/statements/class/fields-regular-definitions-rs-private-setter.js(strict mode) -language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-regular-definitions-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-same-line-async-gen-rs-private-getter-alt.js(default) language/statements/class/fields-same-line-async-gen-rs-private-getter-alt.js(strict mode) language/statements/class/fields-same-line-async-gen-rs-private-getter.js(default) @@ -1554,10 +1343,6 @@ language/statements/class/fields-same-line-async-method-rs-private-setter-alt.js language/statements/class/fields-same-line-async-method-rs-private-setter-alt.js(strict mode) language/statements/class/fields-same-line-async-method-rs-private-setter.js(default) language/statements/class/fields-same-line-async-method-rs-private-setter.js(strict mode) -language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-same-line-async-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-same-line-gen-rs-private-getter-alt.js(default) language/statements/class/fields-same-line-gen-rs-private-getter-alt.js(strict mode) language/statements/class/fields-same-line-gen-rs-private-getter.js(default) @@ -1570,10 +1355,6 @@ language/statements/class/fields-same-line-gen-rs-private-setter-alt.js(default) language/statements/class/fields-same-line-gen-rs-private-setter-alt.js(strict mode) language/statements/class/fields-same-line-gen-rs-private-setter.js(default) language/statements/class/fields-same-line-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-same-line-gen-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-same-line-method-rs-private-getter-alt.js(default) language/statements/class/fields-same-line-method-rs-private-getter-alt.js(strict mode) language/statements/class/fields-same-line-method-rs-private-getter.js(default) @@ -1586,10 +1367,6 @@ language/statements/class/fields-same-line-method-rs-private-setter.js(default) language/statements/class/fields-same-line-method-rs-private-setter.js(strict mode) language/statements/class/fields-same-line-method-rs-private-setter-alt.js(default) language/statements/class/fields-same-line-method-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-same-line-method-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/statements/class/fields-wrapped-in-sc-rs-private-getter-alt.js(default) language/statements/class/fields-wrapped-in-sc-rs-private-getter-alt.js(strict mode) language/statements/class/fields-wrapped-in-sc-rs-private-getter.js(default) @@ -1602,10 +1379,6 @@ language/statements/class/fields-wrapped-in-sc-rs-private-setter-alt.js(default) language/statements/class/fields-wrapped-in-sc-rs-private-setter-alt.js(strict mode) language/statements/class/fields-wrapped-in-sc-rs-private-setter.js(default) language/statements/class/fields-wrapped-in-sc-rs-private-setter.js(strict mode) -language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js(default) -language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js(strict mode) -language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js(default) -language/statements/class/fields-wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(default) language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(default) @@ -1634,10 +1407,6 @@ language/expressions/dynamic-import/syntax/invalid/nested-async-function-return- language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-no-new-call-expression.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js(default) language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-no-new-call-expression.js(default) language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-no-new-call-expression.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-no-trailing-comma.js(default) @@ -1726,7 +1495,6 @@ language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set- language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(strict mode) language/statements/class/syntax/early-errors/super-private-access-invalid.js(default) language/statements/class/syntax/early-errors/super-private-access-invalid.js(strict mode) - language/statements/class/fields-literal-name-static-propname-constructor.js(default) language/statements/class/fields-literal-name-static-propname-constructor.js(strict mode) language/statements/class/fields-string-name-static-propname-constructor.js(default) @@ -1735,6 +1503,7 @@ language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-met language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) + language/expressions/class/fields-after-same-line-gen-private-field-usage.js(default) language/expressions/class/fields-after-same-line-gen-private-field-usage.js(strict mode) language/expressions/class/fields-after-same-line-method-private-field-usage.js(default) @@ -1802,4 +1571,102 @@ language/statements/class/fields-same-line-gen-private-field-usage.js(strict mod language/statements/class/fields-same-line-method-private-field-usage.js(default) language/statements/class/fields-same-line-method-private-field-usage.js(strict mode) language/statements/class/fields-wrapped-in-sc-private-field-usage.js(default) -language/statements/class/fields-wrapped-in-sc-private-field-usage.js(strict mode) \ No newline at end of file +language/statements/class/fields-wrapped-in-sc-private-field-usage.js(strict mode) +language/expressions/async-generator/dflt-params-duplicates.js(default) +language/expressions/async-generator/early-errors-expression-await-as-function-binding-identifier.js(default) +language/expressions/async-generator/early-errors-expression-await-as-function-binding-identifier.js(strict mode) +language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(default) +language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(strict mode) +language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(default) +language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(strict mode) +language/expressions/async-generator/early-errors-expression-formals-contains-await.js(default) +language/expressions/async-generator/early-errors-expression-formals-contains-await.js(strict mode) +language/expressions/async-generator/named-dflt-params-duplicates.js(default) +language/statements/async-generator/dflt-params-duplicates.js(default) +language/statements/class/async-gen-meth-escaped-async.js(default) +language/statements/class/async-gen-meth-escaped-async.js(strict mode) +language/statements/do-while/decl-async-gen.js(default) +language/statements/do-while/decl-async-gen.js(strict mode) +language/statements/for/decl-async-gen.js(default) +language/statements/for/decl-async-gen.js(strict mode) +language/statements/for-in/decl-async-gen.js(default) +language/statements/for-in/decl-async-gen.js(strict mode) +language/statements/for-of/decl-async-gen.js(default) +language/statements/for-of/decl-async-gen.js(strict mode) +language/statements/if/if-async-gen-else-async-gen.js(default) +language/statements/if/if-async-gen-else-async-gen.js(strict mode) +language/statements/if/if-async-gen-else-stmt.js(default) +language/statements/if/if-async-gen-else-stmt.js(strict mode) +language/statements/if/if-async-gen-no-else.js(default) +language/statements/if/if-async-gen-no-else.js(strict mode) +language/statements/if/if-stmt-else-async-gen.js(default) +language/statements/if/if-stmt-else-async-gen.js(strict mode) +language/statements/while/decl-async-gen.js(default) +language/statements/while/decl-async-gen.js(strict mode) +language/statements/with/decl-async-gen.js(default) +language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(default) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(default) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(default) +language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/expressions/object/method-definition/async-gen-meth-dflt-params-duplicates.js(default) +language/expressions/object/method-definition/async-meth-dflt-params-duplicates.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(strict mode) +language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(default) +language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) +language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) \ No newline at end of file From b95cbc4a8e3b564fd108efaf2853a373c04d4f10 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Mon, 5 Nov 2018 22:58:57 +0000 Subject: [PATCH 073/563] output aliased types in typescript declarations (#8629) --- scripts/generators/typescript.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/generators/typescript.js b/scripts/generators/typescript.js index 0cd5ff4042e2..d31c0a533dee 100644 --- a/scripts/generators/typescript.js +++ b/scripts/generators/typescript.js @@ -111,6 +111,8 @@ for (let i = 0; i < t.TYPES.length; i++) { if (t.NODE_FIELDS[t.TYPES[i]]) { decl += `node is ${t.TYPES[i]};`; + } else if (t.FLIPPED_ALIAS_KEYS[t.TYPES[i]]) { + decl += `node is ${t.TYPES[i]};`; } else { decl += `boolean;`; } From e3b2c1afff1b42aa260940f825503ab1c78ac26c Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 5 Nov 2018 15:34:24 -0800 Subject: [PATCH 074/563] fix: Do not allow TypeCastExpressions w/o parens (#8956) --- .../babel-parser/src/parser/expression.js | 2 +- packages/babel-parser/src/parser/lval.js | 1 + packages/babel-parser/src/plugins/flow.js | 36 ++++++------------- .../babel-parser/src/plugins/typescript.js | 1 + .../fail-in-calls-with-one-arg/input.js | 1 + .../fail-in-calls-with-one-arg/options.json | 3 ++ .../flow/typecasts/fail-in-calls/input.js | 1 + .../flow/typecasts/fail-in-calls/options.json | 3 ++ .../typecasts/fail-without-parens/input.js | 1 + .../fail-without-parens/options.json | 3 ++ scripts/tests/flow/flow_tests_whitelist.txt | 1 - 11 files changed, 26 insertions(+), 27 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls-with-one-arg/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls-with-one-arg/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/typecasts/fail-without-parens/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/typecasts/fail-without-parens/options.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 32258f23e035..e16dc4e124c3 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -804,7 +804,7 @@ export default class ExpressionParser extends LValParser { this.state.yieldInPossibleArrowParameters = null; const params = [this.parseIdentifier()]; this.expect(tt.arrow); - // let foo = bar => {}; + // let foo = async bar => {}; this.parseArrowExpression(node, params, true); this.state.yieldInPossibleArrowParameters = oldYield; return node; diff --git a/packages/babel-parser/src/parser/lval.js b/packages/babel-parser/src/parser/lval.js index 46234dade3a9..b9e023cbd3d2 100644 --- a/packages/babel-parser/src/parser/lval.js +++ b/packages/babel-parser/src/parser/lval.js @@ -177,6 +177,7 @@ export default class LValParser extends NodeUtils { toReferencedList( exprList: $ReadOnlyArray, + isInParens?: boolean, // eslint-disable-line no-unused-vars ): $ReadOnlyArray { return exprList; } diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 6ba0ddd8651b..617a115579bc 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -1976,40 +1976,26 @@ export default (superClass: Class): Class => // type casts that we've found that are illegal in this context toReferencedList( exprList: $ReadOnlyArray, + isInParens?: boolean, ): $ReadOnlyArray { for (let i = 0; i < exprList.length; i++) { const expr = exprList[i]; - if (expr && expr._exprListItem && expr.type === "TypeCastExpression") { - this.raise(expr.start, "Unexpected type cast"); + if ( + expr && + expr.type === "TypeCastExpression" && + (!expr.extra || !expr.extra.parenthesized) && + (exprList.length > 1 || !isInParens) + ) { + this.raise( + expr.typeAnnotation.start, + "The type cast expression is expected to be wrapped with parenthesis", + ); } } return exprList; } - // parse an item inside a expression list eg. `(NODE, NODE)` where NODE represents - // the position where this function is called - parseExprListItem( - allowEmpty: ?boolean, - refShorthandDefaultPos: ?Pos, - refNeedsArrowPos: ?Pos, - ): ?N.Expression { - const container = this.startNode(); - const node = super.parseExprListItem( - allowEmpty, - refShorthandDefaultPos, - refNeedsArrowPos, - ); - if (this.match(tt.colon)) { - container._exprListItem = true; - container.expression = node; - container.typeAnnotation = this.flowParseTypeAnnotation(); - return this.finishNode(container, "TypeCastExpression"); - } else { - return node; - } - } - checkLVal( expr: N.Expression, isBinding: ?boolean, diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index bd3d88d9ac1f..bd63e93407c2 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -2151,6 +2151,7 @@ export default (superClass: Class): Class => toReferencedList( exprList: $ReadOnlyArray, + isInParens?: boolean, // eslint-disable-line no-unused-vars ): $ReadOnlyArray { for (let i = 0; i < exprList.length; i++) { const expr = exprList[i]; diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls-with-one-arg/input.js b/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls-with-one-arg/input.js new file mode 100644 index 000000000000..33bdb94b5828 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls-with-one-arg/input.js @@ -0,0 +1 @@ +funccall(b: string); diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls-with-one-arg/options.json b/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls-with-one-arg/options.json new file mode 100644 index 000000000000..e4012a53ad5d --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls-with-one-arg/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The type cast expression is expected to be wrapped with parenthesis (1:10)" +} diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls/input.js b/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls/input.js new file mode 100644 index 000000000000..56208a86b2b8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls/input.js @@ -0,0 +1 @@ +funccall(a, b: string); diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls/options.json b/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls/options.json new file mode 100644 index 000000000000..3f861de320eb --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fail-in-calls/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The type cast expression is expected to be wrapped with parenthesis (1:13)" +} diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fail-without-parens/input.js b/packages/babel-parser/test/fixtures/flow/typecasts/fail-without-parens/input.js new file mode 100644 index 000000000000..767b0cba53b8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fail-without-parens/input.js @@ -0,0 +1 @@ +(A, B: T) diff --git a/packages/babel-parser/test/fixtures/flow/typecasts/fail-without-parens/options.json b/packages/babel-parser/test/fixtures/flow/typecasts/fail-without-parens/options.json new file mode 100644 index 000000000000..847e987ef0af --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/typecasts/fail-without-parens/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The type cast expression is expected to be wrapped with parenthesis (1:5)" +} diff --git a/scripts/tests/flow/flow_tests_whitelist.txt b/scripts/tests/flow/flow_tests_whitelist.txt index ce8851c727df..7bb740ee78d6 100644 --- a/scripts/tests/flow/flow_tests_whitelist.txt +++ b/scripts/tests/flow/flow_tests_whitelist.txt @@ -30,7 +30,6 @@ types/annotations_in_comments_invalid/migrated_0003.js types/annotations/void_is_reserved_param.js types/member/reserved_words.js types/parameter_defaults/migrated_0032.js -types/typecasts_invalid/migrated_0001.js class_method_kinds/polymorphic_getter.js numbers/underscored_bin.js numbers/underscored_float.js From 2194842d11466cf1a3dcdd165e8f1e6505e5d05f Mon Sep 17 00:00:00 2001 From: Retsam Date: Tue, 6 Nov 2018 02:19:34 -0500 Subject: [PATCH 075/563] Typescript: Validate tuple type element positions (#8828) * feat: validate the positions of rest elements and optional elements in tuple types Adds a validation step to the parser which raises syntax errors if a rest param is not at the end of a tuple, or if a mandatory param follows an optional parameter * Fix spread after optional case; add test case --- .../babel-parser/src/plugins/typescript.js | 23 ++ .../types/tuple-optional-invalid/input.js | 1 + .../types/tuple-optional-invalid/options.json | 7 + .../types/tuple-rest-after-optional/input.js | 1 + .../tuple-rest-after-optional/output.json | 242 ++++++++++++++++++ .../types/tuple-rest-invalid/input.js | 1 + .../types/tuple-rest-invalid/options.json | 7 + 7 files changed, 282 insertions(+) create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-rest-after-optional/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-rest-after-optional/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index bd63e93407c2..63fd484a8988 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -507,6 +507,29 @@ export default (superClass: Class): Class => /* bracket */ true, /* skipFirstToken */ false, ); + + // Validate the elementTypes to ensure: + // No mandatory elements may follow optional elements + // If there's a rest element, it must be at the end of the tuple + let seenOptionalElement = false; + node.elementTypes.forEach((elementNode, i) => { + if (elementNode.type === "TSRestType") { + if (i !== node.elementTypes.length - 1) { + this.raise( + elementNode.start, + "A rest element must be last in a tuple type.", + ); + } + } else if (elementNode.type === "TSOptionalType") { + seenOptionalElement = true; + } else if (seenOptionalElement) { + this.raise( + elementNode.start, + "A required element cannot follow an optional element.", + ); + } + }); + return this.finishNode(node, "TSTupleType"); } diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/input.js b/packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/input.js new file mode 100644 index 000000000000..6a4e23361c7e --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/input.js @@ -0,0 +1 @@ +let x: [string?, number] diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/options.json b/packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/options.json new file mode 100644 index 000000000000..92616d0020b4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-optional-invalid/options.json @@ -0,0 +1,7 @@ +{ + "sourceType": "module", + "plugins": [ + "typescript" + ], + "throws": "A required element cannot follow an optional element. (1:17)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-after-optional/input.js b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-after-optional/input.js new file mode 100644 index 000000000000..954c72a82aaa --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-after-optional/input.js @@ -0,0 +1 @@ +function foo(...args: [number, string?, ...number[]]) {} diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-after-optional/output.json b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-after-optional/output.json new file mode 100644 index 000000000000..1d71afdaae49 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-after-optional/output.json @@ -0,0 +1,242 @@ +{ + "type": "File", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": false, + "async": false, + "params": [ + { + "type": "RestElement", + "start": 13, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "argument": { + "type": "Identifier", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + }, + "identifierName": "args" + }, + "name": "args" + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 20, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "typeAnnotation": { + "type": "TSTupleType", + "start": 22, + "end": 52, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 52 + } + }, + "elementTypes": [ + { + "type": "TSNumberKeyword", + "start": 23, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + { + "type": "TSOptionalType", + "start": 31, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "typeAnnotation": { + "type": "TSStringKeyword", + "start": 31, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 37 + } + } + } + }, + { + "type": "TSRestType", + "start": 40, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "typeAnnotation": { + "type": "TSArrayType", + "start": 43, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 51 + } + }, + "elementType": { + "type": "TSNumberKeyword", + "start": 43, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 43 + }, + "end": { + "line": 1, + "column": 49 + } + } + } + } + } + ] + } + } + } + ], + "body": { + "type": "BlockStatement", + "start": 54, + "end": 56, + "loc": { + "start": { + "line": 1, + "column": 54 + }, + "end": { + "line": 1, + "column": 56 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/input.js b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/input.js new file mode 100644 index 000000000000..2bfeae2e87eb --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/input.js @@ -0,0 +1 @@ +let x: [...number[], string] diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json new file mode 100644 index 000000000000..e2d7f7a6781e --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json @@ -0,0 +1,7 @@ +{ + "sourceType": "module", + "plugins": [ + "typescript" + ], + "throws": "A rest element must be last in a tuple type. (1:8)" +} \ No newline at end of file From 2fa19846353a97e33676e819e9ba4f7104aaad3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 6 Nov 2018 08:30:06 +0100 Subject: [PATCH 076/563] Fix await in function name and parameters (#7727) * Disallow await in function parameters * Fix await as function name * Update test whitelists --- .../babel-parser/src/parser/expression.js | 98 ++++++--- packages/babel-parser/src/parser/statement.js | 13 +- packages/babel-parser/src/tokenizer/state.js | 10 +- .../input.js | 3 + .../options.json | 3 + .../input.js | 1 + .../output.json | 86 ++++++++ .../input.js | 1 + .../options.json | 3 + .../input.js | 3 + .../options.json | 3 + .../input.js | 3 + .../output.json | 158 ++++++++++++++ .../input.js | 3 + .../output.json | 189 ++++++++++++++++ .../input.js | 3 + .../options.json | 3 + .../input.js | 3 + .../output.json | 204 ++++++++++++++++++ .../input.js | 1 + .../options.json | 3 + .../input.js | 3 + .../options.json | 3 + .../input.js | 3 + .../options.json | 3 + .../input.js | 3 + .../options.json | 3 + .../await-inside-parameters/input.js | 1 + .../await-inside-parameters/options.json | 3 + .../input.js | 3 + .../output.json | 174 +++++++++++++++ scripts/tests/flow/flow_tests_whitelist.txt | 1 + scripts/tests/test262/test262_whitelist.txt | 20 +- 33 files changed, 963 insertions(+), 51 deletions(-) create mode 100644 packages/babylon/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/input.js create mode 100644 packages/babylon/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-async-function-declaration-name/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-async-function-declaration-name/output.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-async-function-expression-name/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-async-function-expression-name/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/output.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/output.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/output.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/options.json create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/input.js create mode 100644 packages/babylon/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index e16dc4e124c3..b51cdcef5d79 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -522,10 +522,15 @@ export default class ExpressionParser extends LValParser { } return this.finishNode(node, "MemberExpression"); } else if (!noCalls && this.match(tt.parenL)) { + const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + const oldYOAIPAP = this.state.yieldOrAwaitInPossibleArrowParameters; + this.state.maybeInArrowParameters = true; + this.state.yieldOrAwaitInPossibleArrowParameters = null; + const possibleAsync = this.atPossibleAsync(base); this.next(); - const node = this.startNodeAt(startPos, startLoc); + let node = this.startNodeAt(startPos, startLoc); node.callee = base; // TODO: Clean up/merge this into `this.state` or a class like acorn's @@ -554,13 +559,22 @@ export default class ExpressionParser extends LValParser { ); } - return this.parseAsyncArrowFromCallExpression( + node = this.parseAsyncArrowFromCallExpression( this.startNodeAt(startPos, startLoc), node, ); + this.state.yieldOrAwaitInPossibleArrowParameters = oldYOAIPAP; } else { this.toReferencedList(node.arguments); + + // We keep the old value if it isn't null, for cases like + // (x = async(yield)) => {} + this.state.yieldOrAwaitInPossibleArrowParameters = + this.state.yieldOrAwaitInPossibleArrowParameters || oldYOAIPAP; } + + this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + return node; } else if (this.match(tt.backQuote)) { return this.parseTaggedTemplateExpression( @@ -685,11 +699,8 @@ export default class ExpressionParser extends LValParser { node: N.ArrowFunctionExpression, call: N.CallExpression, ): N.ArrowFunctionExpression { - const oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; this.expect(tt.arrow); this.parseArrowExpression(node, call.arguments, true); - this.state.yieldInPossibleArrowParameters = oldYield; return node; } @@ -800,21 +811,24 @@ export default class ExpressionParser extends LValParser { id.name === "async" && this.match(tt.name) ) { - const oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; + const oldYOAIPAP = this.state.yieldOrAwaitInPossibleArrowParameters; + const oldInAsync = this.state.inAsync; + this.state.yieldOrAwaitInPossibleArrowParameters = null; + this.state.inAsync = true; const params = [this.parseIdentifier()]; this.expect(tt.arrow); // let foo = async bar => {}; this.parseArrowExpression(node, params, true); - this.state.yieldInPossibleArrowParameters = oldYield; + this.state.yieldOrAwaitInPossibleArrowParameters = oldYOAIPAP; + this.state.inAsync = oldInAsync; return node; } if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { - const oldYield = this.state.yieldInPossibleArrowParameters; - this.state.yieldInPossibleArrowParameters = null; + const oldYOAIPAP = this.state.yieldOrAwaitInPossibleArrowParameters; + this.state.yieldOrAwaitInPossibleArrowParameters = null; this.parseArrowExpression(node, [id]); - this.state.yieldInPossibleArrowParameters = oldYield; + this.state.yieldOrAwaitInPossibleArrowParameters = oldYOAIPAP; return node; } @@ -1049,9 +1063,9 @@ export default class ExpressionParser extends LValParser { this.expect(tt.parenL); const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - const oldYield = this.state.yieldInPossibleArrowParameters; + const oldYOAIPAP = this.state.yieldOrAwaitInPossibleArrowParameters; this.state.maybeInArrowParameters = true; - this.state.yieldInPossibleArrowParameters = null; + this.state.yieldOrAwaitInPossibleArrowParameters = null; const innerStartPos = this.state.start; const innerStartLoc = this.state.startLoc; @@ -1124,11 +1138,14 @@ export default class ExpressionParser extends LValParser { } this.parseArrowExpression(arrowNode, exprList); - this.state.yieldInPossibleArrowParameters = oldYield; + this.state.yieldOrAwaitInPossibleArrowParameters = oldYOAIPAP; return arrowNode; } - this.state.yieldInPossibleArrowParameters = oldYield; + // We keep the old value if it isn't null, for cases like + // (x = (yield)) => {} + this.state.yieldOrAwaitInPossibleArrowParameters = + this.state.yieldOrAwaitInPossibleArrowParameters || oldYOAIPAP; if (!exprList.length) { this.unexpected(this.state.lastTokStart); @@ -1620,9 +1637,11 @@ export default class ExpressionParser extends LValParser { ): T { const oldInFunc = this.state.inFunction; const oldInMethod = this.state.inMethod; + const oldInAsync = this.state.inAsync; const oldInGenerator = this.state.inGenerator; this.state.inFunction = true; this.state.inMethod = node.kind || true; + this.state.inAsync = isAsync; this.state.inGenerator = isGenerator; this.initFunction(node, isAsync); @@ -1633,6 +1652,7 @@ export default class ExpressionParser extends LValParser { this.state.inFunction = oldInFunc; this.state.inMethod = oldInMethod; + this.state.inAsync = oldInAsync; this.state.inGenerator = oldInGenerator; return node; @@ -1648,12 +1668,21 @@ export default class ExpressionParser extends LValParser { ): N.ArrowFunctionExpression { // if we got there, it's no more "yield in possible arrow parameters"; // it's just "yield in arrow parameters" - if (this.state.yieldInPossibleArrowParameters) { - this.raise( - this.state.yieldInPossibleArrowParameters.start, - "yield is not allowed in the parameters of an arrow function" + - " inside a generator", - ); + const yOAIPAP = this.state.yieldOrAwaitInPossibleArrowParameters; + if (yOAIPAP) { + if (yOAIPAP.type === "YieldExpression") { + this.raise( + yOAIPAP.start, + "yield is not allowed in the parameters of an arrow function" + + " inside a generator", + ); + } else { + this.raise( + yOAIPAP.start, + "await is not allowed in the parameters of an arrow function" + + " inside an async function", + ); + } } const oldInFunc = this.state.inFunction; @@ -1661,11 +1690,14 @@ export default class ExpressionParser extends LValParser { this.initFunction(node, isAsync); if (params) this.setArrowFunctionParameters(node, params); + const oldInAsync = this.state.inAsync; const oldInGenerator = this.state.inGenerator; const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; + this.state.inAsync = true; this.state.inGenerator = false; this.state.maybeInArrowParameters = false; this.parseFunctionBody(node, true); + this.state.inAsync = oldInAsync; this.state.inGenerator = oldInGenerator; this.state.inFunction = oldInFunc; this.state.maybeInArrowParameters = oldMaybeInArrowParameters; @@ -1713,9 +1745,7 @@ export default class ExpressionParser extends LValParser { const isExpression = allowExpression && !this.match(tt.braceL); const oldInParameters = this.state.inParameters; - const oldInAsync = this.state.inAsync; this.state.inParameters = false; - this.state.inAsync = node.async; if (isExpression) { node.body = this.parseMaybeAssign(); @@ -1733,7 +1763,6 @@ export default class ExpressionParser extends LValParser { this.state.inGenerator = oldInGen; this.state.labels = oldLabels; } - this.state.inAsync = oldInAsync; this.checkFunctionNameAndParams(node, allowExpression); this.state.inParameters = oldInParameters; @@ -1910,12 +1939,27 @@ export default class ExpressionParser extends LValParser { ) { this.unexpected(); } + if (this.state.inParameters) { + this.raise( + node.start, + "await is not allowed in async function parameters", + ); + } if (this.match(tt.star)) { this.raise( node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.", ); } + if ( + this.state.maybeInArrowParameters && + // We only set yieldOrAwaitInPossibleArrowParameters if we haven't already + // found a possible invalid AwaitExpression. + !this.state.yieldOrAwaitInPossibleArrowParameters + ) { + this.state.yieldOrAwaitInPossibleArrowParameters = node; + } + node.argument = this.parseMaybeUnary(); return this.finishNode(node, "AwaitExpression"); } @@ -1930,11 +1974,11 @@ export default class ExpressionParser extends LValParser { } if ( this.state.maybeInArrowParameters && - // We only set yieldInPossibleArrowParameters if we haven't already + // We only set yieldOrAwaitInPossibleArrowParameters if we haven't already // found a possible invalid YieldExpression. - !this.state.yieldInPossibleArrowParameters + !this.state.yieldOrAwaitInPossibleArrowParameters ) { - this.state.yieldInPossibleArrowParameters = node; + this.state.yieldOrAwaitInPossibleArrowParameters = node; } this.next(); diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 475d6dab3d91..b19cd78f1bd3 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -842,6 +842,7 @@ export default class StatementParser extends ExpressionParser { ): T { const oldInFunc = this.state.inFunction; const oldInMethod = this.state.inMethod; + const oldInAsync = this.state.inAsync; const oldInGenerator = this.state.inGenerator; const oldInClassProperty = this.state.inClassProperty; this.state.inFunction = true; @@ -872,11 +873,18 @@ export default class StatementParser extends ExpressionParser { // valid because yield is parsed as if it was outside the generator. // Therefore, this.state.inGenerator is set before or after parsing the // function id according to the "isStatement" parameter. - if (!isStatement) this.state.inGenerator = node.generator; + // The same applies to await & async functions. + if (!isStatement) { + this.state.inAsync = isAsync; + this.state.inGenerator = node.generator; + } if (this.match(tt.name) || this.match(tt._yield)) { node.id = this.parseBindingIdentifier(); } - if (isStatement) this.state.inGenerator = node.generator; + if (isStatement) { + this.state.inAsync = isAsync; + this.state.inGenerator = node.generator; + } this.parseFunctionParams(node); this.parseFunctionBodyAndFinish( @@ -887,6 +895,7 @@ export default class StatementParser extends ExpressionParser { this.state.inFunction = oldInFunc; this.state.inMethod = oldInMethod; + this.state.inAsync = oldInAsync; this.state.inGenerator = oldInGenerator; this.state.inClassProperty = oldInClassProperty; diff --git a/packages/babel-parser/src/tokenizer/state.js b/packages/babel-parser/src/tokenizer/state.js index 364ceec96d32..1c08d1ce6522 100644 --- a/packages/babel-parser/src/tokenizer/state.js +++ b/packages/babel-parser/src/tokenizer/state.js @@ -39,7 +39,7 @@ export default class State { this.decoratorStack = [[]]; - this.yieldInPossibleArrowParameters = null; + this.yieldOrAwaitInPossibleArrowParameters = null; this.tokens = []; @@ -126,10 +126,10 @@ export default class State { // where @foo belongs to the outer class and @bar to the inner decoratorStack: Array>; - // The first yield expression inside parenthesized expressions and arrow - // function parameters. It is used to disallow yield in arrow function - // parameters. - yieldInPossibleArrowParameters: ?N.YieldExpression; + // The first yield or await expression inside parenthesized expressions + // and arrow function parameters. It is used to disallow yield and await in + // arrow function parameters. + yieldOrAwaitInPossibleArrowParameters: ?N.YieldExpression; // Token store. tokens: Array; diff --git a/packages/babylon/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/input.js b/packages/babylon/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/input.js new file mode 100644 index 000000000000..896d8fcb5cf9 --- /dev/null +++ b/packages/babylon/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/input.js @@ -0,0 +1,3 @@ +function* fn() { + (x = (yield)) => {}; +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/options.json b/packages/babylon/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/options.json new file mode 100644 index 000000000000..816f0c4579af --- /dev/null +++ b/packages/babylon/test/fixtures/es2015/yield/parameter-default-inside-arrow-inside-generator-6/options.json @@ -0,0 +1,3 @@ +{ + "throws": "yield is not allowed in the parameters of an arrow function inside a generator (2:8)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-declaration-name/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-declaration-name/input.js new file mode 100644 index 000000000000..60b70d4a68e9 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-declaration-name/input.js @@ -0,0 +1 @@ +async function await() {} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-declaration-name/output.json b/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-declaration-name/output.json new file mode 100644 index 000000000000..0cde29d7f404 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-declaration-name/output.json @@ -0,0 +1,86 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 20 + }, + "identifierName": "await" + }, + "name": "await" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 23, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-expression-name/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-expression-name/input.js new file mode 100644 index 000000000000..5102f04c3f84 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-expression-name/input.js @@ -0,0 +1 @@ +(async function await() {}); \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-expression-name/options.json b/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-expression-name/options.json new file mode 100644 index 000000000000..848e79b9dbca --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-async-function-expression-name/options.json @@ -0,0 +1,3 @@ +{ + "throws": "invalid use of await inside of an async function (1:16)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/input.js new file mode 100644 index 000000000000..1df99191e510 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/input.js @@ -0,0 +1,3 @@ +async function foo() { + function await() {} +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/options.json b/packages/babylon/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/options.json new file mode 100644 index 000000000000..e2abd7d95537 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-function-declaration-name-inside-async-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "invalid use of await inside of an async function (2:11)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/input.js new file mode 100644 index 000000000000..97183151654b --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/input.js @@ -0,0 +1,3 @@ +async function fn() { + (function await() {}); +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/output.json b/packages/babylon/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/output.json new file mode 100644 index 000000000000..5711b91c540d --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-function-expression-name-inside-async-function/output.json @@ -0,0 +1,158 @@ +{ + "type": "File", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "fn" + }, + "name": "fn" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 20, + "end": 48, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 24, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 24 + } + }, + "expression": { + "type": "FunctionExpression", + "start": 25, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "id": { + "type": "Identifier", + "start": 34, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + }, + "identifierName": "await" + }, + "name": "await" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 42, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "body": [], + "directives": [] + }, + "extra": { + "parenthesized": true, + "parenStart": 24 + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/input.js new file mode 100644 index 000000000000..ec2205553408 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/input.js @@ -0,0 +1,3 @@ +async function fn() { + function g(x = await) {} +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/output.json b/packages/babylon/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/output.json new file mode 100644 index 000000000000..dd5611dc6ea3 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-identifier-inside-parameters-of-nested-function/output.json @@ -0,0 +1,189 @@ +{ + "type": "File", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "fn" + }, + "name": "fn" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 20, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 24, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "id": { + "type": "Identifier", + "start": 33, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "g" + }, + "name": "g" + }, + "generator": false, + "async": false, + "params": [ + { + "type": "AssignmentPattern", + "start": 35, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "left": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "Identifier", + "start": 39, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 22 + }, + "identifierName": "await" + }, + "name": "await" + } + } + ], + "body": { + "type": "BlockStatement", + "start": 46, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/input.js new file mode 100644 index 000000000000..b27b79ef4ae1 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/input.js @@ -0,0 +1,3 @@ +async function fn() { + async (x = async(y = await 2)) => {}; +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/options.json b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/options.json new file mode 100644 index 000000000000..662a80c579c4 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-call-inside-parameters-of-async-arrow-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "await is not allowed in the parameters of an arrow function inside an async function (2:23)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/input.js new file mode 100644 index 000000000000..d41288f1156b --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/input.js @@ -0,0 +1,3 @@ +async function fn() { + async(x = await 2); +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/output.json b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/output.json new file mode 100644 index 000000000000..6095dda3069b --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-arguments-of-async-function-call/output.json @@ -0,0 +1,204 @@ +{ + "type": "File", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "fn" + }, + "name": "fn" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 20, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 24, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 21 + } + }, + "expression": { + "type": "CallExpression", + "start": 24, + "end": 42, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "callee": { + "type": "Identifier", + "start": 24, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "async" + }, + "name": "async" + }, + "arguments": [ + { + "type": "AssignmentExpression", + "start": 30, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 30, + "end": 31, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "AwaitExpression", + "start": 34, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "argument": { + "type": "NumericLiteral", + "start": 40, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 + } + } + } + ] + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/input.js new file mode 100644 index 000000000000..f137977faf1d --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/input.js @@ -0,0 +1 @@ +async (x = await 2) => {}; \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/options.json b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/options.json new file mode 100644 index 000000000000..a38149bc650b --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-async-arrow-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \",\" (1:17)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/input.js new file mode 100644 index 000000000000..39aea232a5ce --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/input.js @@ -0,0 +1,3 @@ +async function fn() { + (x = await 2) => {}; +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/options.json b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/options.json new file mode 100644 index 000000000000..779503d21709 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-arrow-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "await is not allowed in the parameters of an arrow function inside an async function (2:7)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/input.js new file mode 100644 index 000000000000..7571a193f836 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/input.js @@ -0,0 +1,3 @@ +async function fn() { + async (x = await 2) => {}; +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/options.json b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/options.json new file mode 100644 index 000000000000..52eda98537e7 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-async-arrow-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "await is not allowed in the parameters of an arrow function inside an async function (2:13)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/input.js new file mode 100644 index 000000000000..f9a4ebddb333 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/input.js @@ -0,0 +1,3 @@ +async function foo() { + function bar(x = await 2) {} +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/options.json b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/options.json new file mode 100644 index 000000000000..7d80be8b1e9e --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters-of-nested-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \",\" (2:25)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/input.js new file mode 100644 index 000000000000..52459e1a27a6 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/input.js @@ -0,0 +1 @@ +async function fn(x = await 2) {} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/options.json b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/options.json new file mode 100644 index 000000000000..1a6e14706ad1 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parameters/options.json @@ -0,0 +1,3 @@ +{ + "throws": "await is not allowed in async function parameters (1:22)" +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/input.js b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/input.js new file mode 100644 index 000000000000..fd46caa54ce3 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/input.js @@ -0,0 +1,3 @@ +async function fn() { + (x = await 2); +} \ No newline at end of file diff --git a/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/output.json b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/output.json new file mode 100644 index 000000000000..b9ed763bd7f1 --- /dev/null +++ b/packages/babylon/test/fixtures/es2017/async-functions/await-inside-parenthesized-assign/output.json @@ -0,0 +1,174 @@ +{ + "type": "File", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "fn" + }, + "name": "fn" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 20, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 24, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 25, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 4 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "AwaitExpression", + "start": 29, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "argument": { + "type": "NumericLiteral", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 + } + }, + "extra": { + "parenthesized": true, + "parenStart": 24 + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/scripts/tests/flow/flow_tests_whitelist.txt b/scripts/tests/flow/flow_tests_whitelist.txt index 7bb740ee78d6..520eaaebf693 100644 --- a/scripts/tests/flow/flow_tests_whitelist.txt +++ b/scripts/tests/flow/flow_tests_whitelist.txt @@ -11,6 +11,7 @@ JSX_invalid/migrated_0000.js arrow_function_invalid/migrated_0002.js async_await/async_generic_method.js +async_await/migrated_0007.js async_await/migrated_0020.js async_await/migrated_0024.js async_await/migrated_0027.js diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index e24e628223f1..52ea231a5f85 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -326,10 +326,6 @@ language/expressions/function/dflt-params-duplicates.js(default) language/expressions/generators/dflt-params-duplicates.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(strict mode) -language/expressions/object/method-definition/early-errors-object-method-await-in-formals-default.js(default) -language/expressions/object/method-definition/early-errors-object-method-await-in-formals-default.js(strict mode) -language/expressions/object/method-definition/early-errors-object-method-await-in-formals.js(default) -language/expressions/object/method-definition/early-errors-object-method-await-in-formals.js(strict mode) language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js(default) language/expressions/object/method-definition/gen-meth-dflt-params-duplicates.js(default) language/expressions/object/method-definition/generator-param-redecl-const.js(default) @@ -395,18 +391,10 @@ language/module-code/parse-err-hoist-lex-fun.js(strict mode) language/module-code/parse-err-hoist-lex-gen.js(default) language/module-code/parse-err-hoist-lex-gen.js(strict mode) language/statements/async-function/dflt-params-duplicates.js(default) -language/statements/async-function/early-errors-declaration-await-in-formals-default.js(default) -language/statements/async-function/early-errors-declaration-await-in-formals-default.js(strict mode) -language/statements/async-function/early-errors-declaration-await-in-formals.js(default) -language/statements/async-function/early-errors-declaration-await-in-formals.js(strict mode) language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(default) language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(strict mode) language/statements/class/async-meth-escaped-async.js(default) language/statements/class/async-meth-escaped-async.js(strict mode) -language/statements/class/definition/early-errors-class-method-await-in-formals-default.js(default) -language/statements/class/definition/early-errors-class-method-await-in-formals-default.js(strict mode) -language/statements/class/definition/early-errors-class-method-await-in-formals.js(default) -language/statements/class/definition/early-errors-class-method-await-in-formals.js(strict mode) language/statements/class/strict-mode/with.js(default) language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(default) language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(strict mode) @@ -1573,14 +1561,10 @@ language/statements/class/fields-same-line-method-private-field-usage.js(strict language/statements/class/fields-wrapped-in-sc-private-field-usage.js(default) language/statements/class/fields-wrapped-in-sc-private-field-usage.js(strict mode) language/expressions/async-generator/dflt-params-duplicates.js(default) -language/expressions/async-generator/early-errors-expression-await-as-function-binding-identifier.js(default) -language/expressions/async-generator/early-errors-expression-await-as-function-binding-identifier.js(strict mode) language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(default) language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(strict mode) language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(default) language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(strict mode) -language/expressions/async-generator/early-errors-expression-formals-contains-await.js(default) -language/expressions/async-generator/early-errors-expression-formals-contains-await.js(strict mode) language/expressions/async-generator/named-dflt-params-duplicates.js(default) language/statements/async-generator/dflt-params-duplicates.js(default) language/statements/class/async-gen-meth-escaped-async.js(default) @@ -1669,4 +1653,6 @@ language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) \ No newline at end of file +language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/expressions/dynamic-import/assignment-expression/await-identifier.js(default) +language/expressions/dynamic-import/assignment-expression/await-identifier.js(strict mode) \ No newline at end of file From afe67a7035b640394363ea3ae95e8f9a5476ea47 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Tue, 6 Nov 2018 17:21:22 -0500 Subject: [PATCH 077/563] v7.1.5 --- lerna.json | 2 +- packages/babel-cli/package.json | 4 ++-- packages/babel-core/package.json | 12 ++++++------ packages/babel-generator/package.json | 6 +++--- packages/babel-helpers/package.json | 6 +++--- packages/babel-parser/package.json | 2 +- packages/babel-plugin-syntax-typescript/package.json | 4 ++-- .../package.json | 4 ++-- packages/babel-preset-env/package.json | 8 ++++---- packages/babel-runtime-corejs2/package.json | 2 +- packages/babel-runtime/package.json | 2 +- packages/babel-traverse/package.json | 8 ++++---- packages/babel-types/package.json | 6 +++--- 13 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lerna.json b/lerna.json index 385f723f20e3..25ae60881684 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.11.0", - "version": "7.1.4", + "version": "7.1.5", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-cli/package.json b/packages/babel-cli/package.json index b520ad82f923..c976deaa42c2 100644 --- a/packages/babel-cli/package.json +++ b/packages/babel-cli/package.json @@ -1,6 +1,6 @@ { "name": "@babel/cli", - "version": "7.1.2", + "version": "7.1.5", "description": "Babel command line.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -36,7 +36,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.0.0", + "@babel/core": "^7.1.5", "@babel/helper-fixtures": "^7.0.0" }, "bin": { diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index cd963851d30a..ee4941c4a008 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -1,6 +1,6 @@ { "name": "@babel/core", - "version": "7.1.2", + "version": "7.1.5", "description": "Babel compiler core.", "main": "lib/index.js", "author": "Sebastian McKenzie ", @@ -34,12 +34,12 @@ }, "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.2", - "@babel/helpers": "^7.1.2", - "@babel/parser": "^7.1.2", + "@babel/generator": "^7.1.5", + "@babel/helpers": "^7.1.5", + "@babel/parser": "^7.1.5", "@babel/template": "^7.1.2", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.1.2", + "@babel/traverse": "^7.1.5", + "@babel/types": "^7.1.5", "convert-source-map": "^1.1.0", "debug": "^3.1.0", "json5": "^0.5.0", diff --git a/packages/babel-generator/package.json b/packages/babel-generator/package.json index d6aa63c96c0f..b0266f92adaa 100644 --- a/packages/babel-generator/package.json +++ b/packages/babel-generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/generator", - "version": "7.1.3", + "version": "7.1.5", "description": "Turns an AST into code.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "lib" ], "dependencies": { - "@babel/types": "^7.1.3", + "@babel/types": "^7.1.5", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", @@ -22,6 +22,6 @@ }, "devDependencies": { "@babel/helper-fixtures": "^7.0.0", - "@babel/parser": "^7.0.0" + "@babel/parser": "^7.1.5" } } diff --git a/packages/babel-helpers/package.json b/packages/babel-helpers/package.json index 01035a1af661..5fa3006f9b89 100644 --- a/packages/babel-helpers/package.json +++ b/packages/babel-helpers/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helpers", - "version": "7.1.2", + "version": "7.1.5", "description": "Collection of helper functions used by Babel transforms.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,8 +12,8 @@ "main": "lib/index.js", "dependencies": { "@babel/template": "^7.1.2", - "@babel/traverse": "^7.1.0", - "@babel/types": "^7.1.2" + "@babel/traverse": "^7.1.5", + "@babel/types": "^7.1.5" }, "devDependencies": { "@babel/helper-plugin-test-runner": "^7.0.0" diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index a9102d705630..fbbaca41bb52 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/parser", - "version": "7.1.3", + "version": "7.1.5", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-plugin-syntax-typescript/package.json b/packages/babel-plugin-syntax-typescript/package.json index b87262f0ba74..ba364a912540 100644 --- a/packages/babel-plugin-syntax-typescript/package.json +++ b/packages/babel-plugin-syntax-typescript/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-syntax-typescript", - "version": "7.0.0", + "version": "7.1.5", "description": "Allow parsing of TypeScript syntax", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-typescript", "license": "MIT", @@ -19,6 +19,6 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.1.5" } } diff --git a/packages/babel-plugin-transform-block-scoping/package.json b/packages/babel-plugin-transform-block-scoping/package.json index a0af9db80ef7..a1330bd7f36c 100644 --- a/packages/babel-plugin-transform-block-scoping/package.json +++ b/packages/babel-plugin-transform-block-scoping/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-block-scoping", - "version": "7.0.0", + "version": "7.1.5", "description": "Compile ES2015 block scoping (const and let) to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-block-scoping", "license": "MIT", @@ -19,7 +19,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.0.0", + "@babel/core": "^7.1.5", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index 5fc94d541154..f7c8f00949f0 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -1,6 +1,6 @@ { "name": "@babel/preset-env", - "version": "7.1.0", + "version": "7.1.5", "description": "A Babel preset for each environment.", "author": "Henry Zhu ", "homepage": "https://babeljs.io/", @@ -27,7 +27,7 @@ "@babel/plugin-transform-arrow-functions": "^7.0.0", "@babel/plugin-transform-async-to-generator": "^7.1.0", "@babel/plugin-transform-block-scoped-functions": "^7.0.0", - "@babel/plugin-transform-block-scoping": "^7.0.0", + "@babel/plugin-transform-block-scoping": "^7.1.5", "@babel/plugin-transform-classes": "^7.1.0", "@babel/plugin-transform-computed-properties": "^7.0.0", "@babel/plugin-transform-destructuring": "^7.0.0", @@ -60,8 +60,8 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", + "@babel/cli": "^7.1.5", + "@babel/core": "^7.1.5", "@babel/helper-fixtures": "^7.0.0", "@babel/helper-plugin-test-runner": "^7.0.0", "caniuse-db": "1.0.30000851", diff --git a/packages/babel-runtime-corejs2/package.json b/packages/babel-runtime-corejs2/package.json index 27ba84949185..de8e8b872780 100644 --- a/packages/babel-runtime-corejs2/package.json +++ b/packages/babel-runtime-corejs2/package.json @@ -1,6 +1,6 @@ { "name": "@babel/runtime-corejs2", - "version": "7.1.2", + "version": "7.1.5", "description": "babel's modular runtime helpers with core-js@2 polyfilling", "license": "MIT", "publishConfig": { diff --git a/packages/babel-runtime/package.json b/packages/babel-runtime/package.json index 420077aff454..dd189c4bd265 100644 --- a/packages/babel-runtime/package.json +++ b/packages/babel-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@babel/runtime", - "version": "7.1.2", + "version": "7.1.5", "description": "babel's modular runtime helpers", "license": "MIT", "publishConfig": { diff --git a/packages/babel-traverse/package.json b/packages/babel-traverse/package.json index 34dd6e487f1d..0d3fe6e8d755 100644 --- a/packages/babel-traverse/package.json +++ b/packages/babel-traverse/package.json @@ -1,6 +1,6 @@ { "name": "@babel/traverse", - "version": "7.1.4", + "version": "7.1.5", "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,11 +12,11 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.3", + "@babel/generator": "^7.1.5", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.3", - "@babel/types": "^7.1.3", + "@babel/parser": "^7.1.5", + "@babel/types": "^7.1.5", "debug": "^3.1.0", "globals": "^11.1.0", "lodash": "^4.17.10" diff --git a/packages/babel-types/package.json b/packages/babel-types/package.json index 05d6f41e409a..0dedd1a46460 100644 --- a/packages/babel-types/package.json +++ b/packages/babel-types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/types", - "version": "7.1.3", + "version": "7.1.5", "description": "Babel Types is a Lodash-esque utility library for AST nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "to-fast-properties": "^2.0.0" }, "devDependencies": { - "@babel/generator": "^7.0.0", - "@babel/parser": "^7.0.0" + "@babel/generator": "^7.1.5", + "@babel/parser": "^7.1.5" } } From 5d5cd8612f9b43a862973195d40ee77c0540c563 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 6 Nov 2018 19:37:24 -0800 Subject: [PATCH 078/563] Fix several edge cases with context expression state (#8972) * Fix several edge cases with context expression state * Fix review comments * Remove unused field --- .../babel-parser/src/parser/expression.js | 35 +- packages/babel-parser/src/plugins/flow.js | 11 +- .../babel-parser/src/plugins/jsx/index.js | 16 +- .../babel-parser/src/tokenizer/context.js | 56 +- packages/babel-parser/src/tokenizer/index.js | 36 +- packages/babel-parser/src/tokenizer/types.js | 2 +- .../es2015/for-of/brackets-const/input.js | 1 + .../es2015/for-of/brackets-const/output.json | 194 ++++ .../es2015/for-of/brackets-let/input.js | 1 + .../es2015/for-of/brackets-let/output.json | 194 ++++ .../es2015/for-of/brackets-var/input.js | 1 + .../es2015/for-of/brackets-var/output.json | 194 ++++ .../test/fixtures/es2015/yield/asi2/input.js | 3 + .../fixtures/es2015/yield/asi2/output.json | 172 ++++ .../es2015/yield/yield class/input.js | 1 + .../es2015/yield/yield class/output.json | 152 +++ .../fixtures/jsx/errors/html-comment/input.js | 1 + .../jsx/errors/html-comment/options.json | 4 + .../jsx/errors/html-comment/output.json | 70 ++ .../jsx/regression/issue-8891/input.js | 6 + .../jsx/regression/issue-8891/output.json | 873 ++++++++++++++++++ 21 files changed, 1986 insertions(+), 37 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/es2015/for-of/brackets-const/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/for-of/brackets-const/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/for-of/brackets-let/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/for-of/brackets-let/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/for-of/brackets-var/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/for-of/brackets-var/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/yield/asi2/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/yield/asi2/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/yield/yield class/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/yield/yield class/output.json create mode 100644 packages/babel-parser/test/fixtures/jsx/errors/html-comment/input.js create mode 100644 packages/babel-parser/test/fixtures/jsx/errors/html-comment/options.json create mode 100644 packages/babel-parser/test/fixtures/jsx/errors/html-comment/output.json create mode 100644 packages/babel-parser/test/fixtures/jsx/regression/issue-8891/input.js create mode 100644 packages/babel-parser/test/fixtures/jsx/regression/issue-8891/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index b51cdcef5d79..60bceba8149f 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -23,6 +23,7 @@ import * as N from "../types"; import LValParser from "./lval"; import { reservedWords } from "../util/identifier"; import type { Pos, Position } from "../util/location"; +import * as charCodes from "charcodes"; export default class ExpressionParser extends LValParser { // Forward-declaration: defined in statement.js @@ -718,6 +719,10 @@ export default class ExpressionParser extends LValParser { // or `{}`. parseExprAtom(refShorthandDefaultPos?: ?Pos): N.Expression { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.state.type === tt.slash) this.readRegexp(); + const canBeArrow = this.state.potentialArrowAt === this.state.start; let node; @@ -964,7 +969,16 @@ export default class ExpressionParser extends LValParser { parseFunctionExpression(): N.FunctionExpression | N.MetaProperty { const node = this.startNode(); - const meta = this.parseIdentifier(true); + + // We do not do parseIdentifier here because when parseFunctionExpression + // is called we already know that the current token is a "name" with the value "function" + // This will improve perf a tiny little bit as we do not do validation but more importantly + // here is that parseIdentifier will remove an item from the expression stack + // if "function" or "class" is parsed as identifier (in objects e.g.), which should not happen here. + let meta = this.startNode(); + this.next(); + meta = this.createIdentifier(meta, "function"); + if (this.state.inGenerator && this.eat(tt.dot)) { return this.parseMetaProperty(node, meta, "sent"); } @@ -1863,8 +1877,14 @@ export default class ExpressionParser extends LValParser { parseIdentifier(liberal?: boolean): N.Identifier { const node = this.startNode(); const name = this.parseIdentifierName(node.start, liberal); + + return this.createIdentifier(node, name); + } + + createIdentifier(node: N.Identifier, name: string): N.Identifier { node.name = name; node.loc.identifierName = name; + return this.finishNode(node, "Identifier"); } @@ -1884,6 +1904,19 @@ export default class ExpressionParser extends LValParser { name = this.state.value; } else if (this.state.type.keyword) { name = this.state.type.keyword; + + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed + // as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the + // context-managing code already ignored the keyword + if ( + (name === "class" || name === "function") && + (this.state.lastTokEnd !== this.state.lastTokStart + 1 || + this.input.charCodeAt(this.state.lastTokStart) !== charCodes.dot) + ) { + this.state.context.pop(); + } } else { throw this.unexpected(); } diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 617a115579bc..bff354249893 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -6,6 +6,7 @@ import * as N from "../types"; import type { Options } from "../options"; import type { Pos, Position } from "../util/location"; import type State from "../tokenizer/state"; +import { types as tc } from "../tokenizer/context"; import * as charCodes from "charcodes"; import { isIteratorStart } from "../util/identifier"; @@ -2392,7 +2393,10 @@ export default (superClass: Class): Class => refNeedsArrowPos?: ?Pos, ): N.Expression { let jsxError = null; - if (tt.jsxTagStart && this.match(tt.jsxTagStart)) { + if ( + this.hasPlugin("jsx") && + (this.match(tt.jsxTagStart) || this.isRelational("<")) + ) { const state = this.state.clone(); try { return super.parseMaybeAssign( @@ -2408,7 +2412,10 @@ export default (superClass: Class): Class => // Remove `tc.j_expr` and `tc.j_oTag` from context added // by parsing `jsxTagStart` to stop the JSX plugin from // messing with the tokens - this.state.context.length -= 2; + const cLength = this.state.context.length; + if (this.state.context[cLength - 1] === tc.j_oTag) { + this.state.context.length -= 2; + } jsxError = err; } else { diff --git a/packages/babel-parser/src/plugins/jsx/index.js b/packages/babel-parser/src/plugins/jsx/index.js index 0d32ea98d11f..0271aeffed9d 100644 --- a/packages/babel-parser/src/plugins/jsx/index.js +++ b/packages/babel-parser/src/plugins/jsx/index.js @@ -506,6 +506,15 @@ export default (superClass: Class): Class => return this.parseLiteral(this.state.value, "JSXText"); } else if (this.match(tt.jsxTagStart)) { return this.jsxParseElement(); + } else if ( + this.isRelational("<") && + this.state.input.charCodeAt(this.state.pos) !== + charCodes.exclamationMark + ) { + // In case we encounter an lt token here it will always be the start of + // jsx as the lt sign is not allowed in places that expect an expression + this.finishToken(tt.jsxTagStart); + return this.jsxParseElement(); } else { return super.parseExprAtom(refShortHandDefaultPos); } @@ -538,7 +547,12 @@ export default (superClass: Class): Class => } } - if (code === charCodes.lessThan && this.state.exprAllowed) { + if ( + code === charCodes.lessThan && + this.state.exprAllowed && + this.state.input.charCodeAt(this.state.pos + 1) !== + charCodes.exclamationMark + ) { ++this.state.pos; return this.finishToken(tt.jsxTagStart); } diff --git a/packages/babel-parser/src/tokenizer/context.js b/packages/babel-parser/src/tokenizer/context.js index bb0f7b8a20d2..6bb2b9491275 100644 --- a/packages/babel-parser/src/tokenizer/context.js +++ b/packages/babel-parser/src/tokenizer/context.js @@ -12,7 +12,7 @@ export class TokContext { token: string, isExpr?: boolean, preserveSpace?: boolean, - override?: Function, // Takes a Tokenizer as a this-parameter, and returns void. + override?: ?Function, // Takes a Tokenizer as a this-parameter, and returns void. ) { this.token = token; this.isExpr = !!isExpr; @@ -31,11 +31,12 @@ export const types: { } = { braceStatement: new TokContext("{", false), braceExpression: new TokContext("{", true), - templateQuasi: new TokContext("${", true), + templateQuasi: new TokContext("${", false), parenStatement: new TokContext("(", false), parenExpression: new TokContext("(", true), template: new TokContext("`", true, true, p => p.readTmplToken()), functionExpression: new TokContext("function", true), + functionStatement: new TokContext("function", false), }; // Token-specific context update code @@ -46,33 +47,26 @@ tt.parenR.updateContext = tt.braceR.updateContext = function() { return; } - const out = this.state.context.pop(); - if ( - out === types.braceStatement && - this.curContext() === types.functionExpression - ) { - this.state.context.pop(); - this.state.exprAllowed = false; - } else if (out === types.templateQuasi) { - this.state.exprAllowed = true; - } else { - this.state.exprAllowed = !out.isExpr; + let out = this.state.context.pop(); + if (out === types.braceStatement && this.curContext().token === "function") { + out = this.state.context.pop(); } + + this.state.exprAllowed = !out.isExpr; }; tt.name.updateContext = function(prevType) { - if (this.state.value === "of" && this.curContext() === types.parenStatement) { - this.state.exprAllowed = !prevType.beforeExpr; - return; - } - - this.state.exprAllowed = false; - - if (prevType === tt._let || prevType === tt._const || prevType === tt._var) { - if (lineBreak.test(this.input.slice(this.state.end))) { - this.state.exprAllowed = true; + let allowed = false; + if (prevType !== tt.dot) { + if ( + (this.state.value === "of" && !this.state.exprAllowed) || + (this.state.value === "yield" && this.state.inGenerator) + ) { + allowed = true; } } + this.state.exprAllowed = allowed; + if (this.state.isIterator) { this.state.isIterator = false; } @@ -107,8 +101,22 @@ tt.incDec.updateContext = function() { }; tt._function.updateContext = tt._class.updateContext = function(prevType) { - if (this.state.exprAllowed && !this.braceIsBlock(prevType)) { + if ( + prevType.beforeExpr && + prevType !== tt.semi && + prevType !== tt._else && + !( + prevType === tt._return && + lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)) + ) && + !( + (prevType === tt.colon || prevType === tt.braceL) && + this.curContext() === types.b_stat + ) + ) { this.state.context.push(types.functionExpression); + } else { + this.state.context.push(types.functionStatement); } this.state.exprAllowed = false; diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 150ea892527b..33a272e7dcf0 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -1324,14 +1324,25 @@ export default class Tokenizer extends LocationParser { } braceIsBlock(prevType: TokenType): boolean { - if (prevType === tt.colon) { - const parent = this.curContext(); - if (parent === ct.braceStatement || parent === ct.braceExpression) { - return !parent.isExpr; - } + const parent = this.curContext(); + if (parent === ct.functionExpression || parent === ct.functionStatement) { + return true; + } + if ( + prevType === tt.colon && + (parent === ct.braceStatement || parent === ct.braceExpression) + ) { + return !parent.isExpr; } - if (prevType === tt._return) { + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if ( + prevType === tt._return || + prevType === tt._yield || + (prevType === tt.name && this.state.exprAllowed) + ) { return lineBreak.test( this.input.slice(this.state.lastTokEnd, this.state.start), ); @@ -1341,13 +1352,22 @@ export default class Tokenizer extends LocationParser { prevType === tt._else || prevType === tt.semi || prevType === tt.eof || - prevType === tt.parenR + prevType === tt.parenR || + prevType === tt.arrow ) { return true; } if (prevType === tt.braceL) { - return this.curContext() === ct.braceStatement; + return parent === ct.braceStatement; + } + + if ( + prevType === tt._var || + prevType === tt._let || + prevType === tt._const + ) { + return false; } if (prevType === tt.relational) { diff --git a/packages/babel-parser/src/tokenizer/types.js b/packages/babel-parser/src/tokenizer/types.js index 14e94d32ab09..d5e164ecb1ea 100644 --- a/packages/babel-parser/src/tokenizer/types.js +++ b/packages/babel-parser/src/tokenizer/types.js @@ -174,7 +174,7 @@ export const keywords = { new: new KeywordTokenType("new", { beforeExpr, startsExpr }), this: new KeywordTokenType("this", { startsExpr }), super: new KeywordTokenType("super", { startsExpr }), - class: new KeywordTokenType("class"), + class: new KeywordTokenType("class", { startsExpr }), extends: new KeywordTokenType("extends", { beforeExpr }), export: new KeywordTokenType("export"), import: new KeywordTokenType("import", { startsExpr }), diff --git a/packages/babel-parser/test/fixtures/es2015/for-of/brackets-const/input.js b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-const/input.js new file mode 100644 index 000000000000..fc8fecda1a78 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-const/input.js @@ -0,0 +1 @@ +for (const {a} of /b/) {} diff --git a/packages/babel-parser/test/fixtures/es2015/for-of/brackets-const/output.json b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-const/output.json new file mode 100644 index 000000000000..e6724bdbc964 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-const/output.json @@ -0,0 +1,194 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ForOfStatement", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "await": false, + "left": { + "type": "VariableDeclaration", + "start": 5, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 11, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "id": { + "type": "ObjectPattern", + "start": 11, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "a" + }, + "name": "a" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "a" + }, + "name": "a" + }, + "extra": { + "shorthand": true + } + } + ] + }, + "init": null + } + ], + "kind": "const" + }, + "right": { + "type": "RegExpLiteral", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "extra": { + "raw": "/b/" + }, + "pattern": "b", + "flags": "" + }, + "body": { + "type": "BlockStatement", + "start": 23, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/for-of/brackets-let/input.js b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-let/input.js new file mode 100644 index 000000000000..0bf988b293f8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-let/input.js @@ -0,0 +1 @@ +for (let {a} of /b/) {} diff --git a/packages/babel-parser/test/fixtures/es2015/for-of/brackets-let/output.json b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-let/output.json new file mode 100644 index 000000000000..6c74fa327abb --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-let/output.json @@ -0,0 +1,194 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ForOfStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "await": false, + "left": { + "type": "VariableDeclaration", + "start": 5, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "id": { + "type": "ObjectPattern", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "a" + }, + "name": "a" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "a" + }, + "name": "a" + }, + "extra": { + "shorthand": true + } + } + ] + }, + "init": null + } + ], + "kind": "let" + }, + "right": { + "type": "RegExpLiteral", + "start": 16, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "extra": { + "raw": "/b/" + }, + "pattern": "b", + "flags": "" + }, + "body": { + "type": "BlockStatement", + "start": 21, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/for-of/brackets-var/input.js b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-var/input.js new file mode 100644 index 000000000000..cef3e0ee5228 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-var/input.js @@ -0,0 +1 @@ +for (var {a} of /b/) {} diff --git a/packages/babel-parser/test/fixtures/es2015/for-of/brackets-var/output.json b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-var/output.json new file mode 100644 index 000000000000..507f3b6495e3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/for-of/brackets-var/output.json @@ -0,0 +1,194 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ForOfStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "await": false, + "left": { + "type": "VariableDeclaration", + "start": 5, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "id": { + "type": "ObjectPattern", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "a" + }, + "name": "a" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "a" + }, + "name": "a" + }, + "extra": { + "shorthand": true + } + } + ] + }, + "init": null + } + ], + "kind": "var" + }, + "right": { + "type": "RegExpLiteral", + "start": 16, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "extra": { + "raw": "/b/" + }, + "pattern": "b", + "flags": "" + }, + "body": { + "type": "BlockStatement", + "start": 21, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/yield/asi2/input.js b/packages/babel-parser/test/fixtures/es2015/yield/asi2/input.js new file mode 100644 index 000000000000..137d219c49ac --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/yield/asi2/input.js @@ -0,0 +1,3 @@ +function *f() { yield +{}/1/g +} diff --git a/packages/babel-parser/test/fixtures/es2015/yield/asi2/output.json b/packages/babel-parser/test/fixtures/es2015/yield/asi2/output.json new file mode 100644 index 000000000000..2d86b5998e19 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/yield/asi2/output.json @@ -0,0 +1,172 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "f" + }, + "name": "f" + }, + "generator": true, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 14, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "expression": { + "type": "YieldExpression", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "delegate": false, + "argument": null + } + }, + { + "type": "BlockStatement", + "start": 22, + "end": 24, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 2 + } + }, + "body": [], + "directives": [] + }, + { + "type": "ExpressionStatement", + "start": 24, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "expression": { + "type": "RegExpLiteral", + "start": 24, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "extra": { + "raw": "/1/g" + }, + "pattern": "1", + "flags": "g" + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/yield/yield class/input.js b/packages/babel-parser/test/fixtures/es2015/yield/yield class/input.js new file mode 100644 index 000000000000..ea7121a71eae --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/yield/yield class/input.js @@ -0,0 +1 @@ +function* bar() { yield class {} } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/yield class/output.json b/packages/babel-parser/test/fixtures/es2015/yield/yield class/output.json new file mode 100644 index 000000000000..e4526ece7675 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/yield/yield class/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "id": { + "type": "Identifier", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "generator": true, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 16, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 18, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expression": { + "type": "YieldExpression", + "start": 18, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "delegate": false, + "argument": { + "type": "ClassExpression", + "start": 24, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "id": null, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 30, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "body": [] + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/jsx/errors/html-comment/input.js b/packages/babel-parser/test/fixtures/jsx/errors/html-comment/input.js new file mode 100644 index 000000000000..5190fb0e1d65 --- /dev/null +++ b/packages/babel-parser/test/fixtures/jsx/errors/html-comment/input.js @@ -0,0 +1 @@ + + // class Foo {} export { Foo as default } + splitExportDeclaration(path); + } else { + // Annyms class declarations can be + // transformed as if they were expressions + decl.node.type = "ClassExpression"; + } + } + }, }, }; } diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/regression-T7364/output.mjs b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/regression-T7364/output.mjs index 7afab860194f..183240a1c2a0 100644 --- a/packages/babel-plugin-proposal-class-properties/test/fixtures/private/regression-T7364/output.mjs +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/private/regression-T7364/output.mjs @@ -1,5 +1,3 @@ -var _class; - class MyClass { constructor() { var _this = this; @@ -22,7 +20,7 @@ class MyClass { var _myAsyncMethod = new WeakMap(); -_class = class MyClass2 { +(class MyClass2 { constructor() { var _this2 = this; @@ -40,7 +38,7 @@ _class = class MyClass2 { }); } -}; +}); var _myAsyncMethod2 = new WeakMap(); diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/static-property-tdz/decorator-interop/output.js b/packages/babel-plugin-proposal-class-properties/test/fixtures/static-property-tdz/decorator-interop/output.js index 70334680ced4..a615c9b9b3d6 100644 --- a/packages/babel-plugin-proposal-class-properties/test/fixtures/static-property-tdz/decorator-interop/output.js +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/static-property-tdz/decorator-interop/output.js @@ -1,4 +1,4 @@ -var _class, _descriptor, _class2, _Symbol$search, _temp; +var _class, _descriptor, _Symbol$search, _temp; function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } @@ -14,7 +14,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor function dec() {} -let A = (_class = (_temp = (_Symbol$search = Symbol.search, _class2 = +let A = (_class = (_temp = (_Symbol$search = Symbol.search, /*#__PURE__*/ function () { "use strict"; diff --git a/packages/babel-plugin-proposal-decorators/package.json b/packages/babel-plugin-proposal-decorators/package.json index 822a96642477..1e2bf31e2d61 100644 --- a/packages/babel-plugin-proposal-decorators/package.json +++ b/packages/babel-plugin-proposal-decorators/package.json @@ -16,8 +16,7 @@ ], "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0", - "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/helper-create-class-features-plugin": "^7.2.1", "@babel/plugin-syntax-decorators": "^7.2.0" }, "peerDependencies": { diff --git a/packages/babel-plugin-proposal-decorators/src/index.js b/packages/babel-plugin-proposal-decorators/src/index.js index 1bcb52ae82a1..4d0e05cb57d2 100644 --- a/packages/babel-plugin-proposal-decorators/src/index.js +++ b/packages/babel-plugin-proposal-decorators/src/index.js @@ -1,6 +1,11 @@ +/* eslint-disable local-rules/plugin-name */ + import { declare } from "@babel/helper-plugin-utils"; import syntaxDecorators from "@babel/plugin-syntax-decorators"; -import visitor from "./transformer"; +import { + createClassFeaturePlugin, + FEATURES, +} from "@babel/helper-create-class-features-plugin"; import legacyVisitor from "./transformer-legacy"; export default declare((api, options) => { @@ -31,14 +36,26 @@ export default declare((api, options) => { } } - return { + if (legacy) { + return { + name: "proposal-decorators", + inherits: syntaxDecorators, + manipulateOptions({ generatorOpts }) { + generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport; + }, + visitor: legacyVisitor, + }; + } + + return createClassFeaturePlugin({ name: "proposal-decorators", - inherits: syntaxDecorators, - manipulateOptions({ generatorOpts }) { + feature: FEATURES.decorators, + // loose: options.loose, Not supported + + manipulateOptions({ generatorOpts, parserOpts }) { + parserOpts.plugins.push(["decorators", { decoratorsBeforeExport }]); generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport; }, - - visitor: legacy ? legacyVisitor : visitor, - }; + }); }); diff --git a/packages/babel-plugin-proposal-decorators/src/transformer.js b/packages/babel-plugin-proposal-decorators/src/transformer.js deleted file mode 100644 index 621538c74cd3..000000000000 --- a/packages/babel-plugin-proposal-decorators/src/transformer.js +++ /dev/null @@ -1,239 +0,0 @@ -import { types as t, template } from "@babel/core"; -import splitExportDeclaration from "@babel/helper-split-export-declaration"; -import ReplaceSupers from "@babel/helper-replace-supers"; - -function prop(key, value) { - if (!value) return null; - return t.objectProperty(t.identifier(key), value); -} - -function value(body, params = [], async, generator) { - const method = t.objectMethod("method", t.identifier("value"), params, body); - method.async = !!async; - method.generator = !!generator; - return method; -} - -function hasDecorators({ node }) { - if (node.decorators && node.decorators.length > 0) return true; - - const body = node.body.body; - for (let i = 0; i < body.length; i++) { - const method = body[i]; - if (method.decorators && method.decorators.length > 0) { - return true; - } - } - - return false; -} - -function takeDecorators({ node }) { - let result; - if (node.decorators && node.decorators.length > 0) { - result = t.arrayExpression( - node.decorators.map(decorator => decorator.expression), - ); - } - node.decorators = undefined; - return result; -} - -function getKey(node) { - if (node.computed) { - return node.key; - } else if (t.isIdentifier(node.key)) { - return t.stringLiteral(node.key.name); - } else { - return t.stringLiteral(String(node.key.value)); - } -} - -function getSingleElementDefinition(path, superRef, classRef, file) { - const { node, scope } = path; - const isMethod = path.isClassMethod(); - - if (path.isPrivate()) { - throw path.buildCodeFrameError( - `Private ${ - isMethod ? "methods" : "fields" - } in decorated classes are not supported yet.`, - ); - } - - new ReplaceSupers( - { - methodPath: path, - methodNode: node, - objectRef: classRef, - isStatic: node.static, - superRef, - scope, - file, - }, - true, - ).replace(); - - const properties = [ - prop("kind", t.stringLiteral(isMethod ? node.kind : "field")), - prop("decorators", takeDecorators(path)), - prop("static", node.static && t.booleanLiteral(true)), - prop("key", getKey(node)), - isMethod - ? value(node.body, node.params, node.async, node.generator) - : node.value - ? value(template.ast`{ return ${node.value} }`) - : prop("value", scope.buildUndefinedNode()), - ].filter(Boolean); - - return t.objectExpression(properties); -} - -function getElementsDefinitions(path, fId, file) { - const elements = []; - for (const p of path.get("body.body")) { - if (!p.isClassMethod({ kind: "constructor" })) { - elements.push( - getSingleElementDefinition(p, path.node.superClass, fId, file), - ); - p.remove(); - } - } - - return t.arrayExpression(elements); -} - -function getConstructorPath(path) { - return path - .get("body.body") - .find(path => path.isClassMethod({ kind: "constructor" })); -} - -const bareSupersVisitor = { - CallExpression(path, { initializeInstanceElements }) { - if (path.get("callee").isSuper()) { - path.insertAfter(t.cloneNode(initializeInstanceElements)); - - // Sometimes this path gets requeued (e.g. in (super(), foo)), and - // it leads to infinite recursion. - path.skip(); - } - }, - Function(path) { - if (!path.isArrowFunctionExpression()) path.skip(); - }, -}; - -function insertInitializeInstanceElements(path, initializeInstanceId) { - const isBase = !path.node.superClass; - const initializeInstanceElements = t.callExpression(initializeInstanceId, [ - t.thisExpression(), - ]); - - const constructorPath = getConstructorPath(path); - if (constructorPath) { - if (isBase) { - constructorPath - .get("body") - .unshiftContainer("body", [ - t.expressionStatement(initializeInstanceElements), - ]); - } else { - constructorPath.traverse(bareSupersVisitor, { - initializeInstanceElements, - }); - } - } else { - const constructor = isBase - ? t.classMethod( - "constructor", - t.identifier("constructor"), - [], - t.blockStatement([t.expressionStatement(initializeInstanceElements)]), - ) - : t.classMethod( - "constructor", - t.identifier("constructor"), - [t.restElement(t.identifier("args"))], - t.blockStatement([ - t.expressionStatement( - t.callExpression(t.Super(), [ - t.spreadElement(t.identifier("args")), - ]), - ), - t.expressionStatement(initializeInstanceElements), - ]), - ); - path.node.body.body.push(constructor); - } -} - -function transformClass(path, file) { - const isDeclaration = path.node.id && path.isDeclaration(); - const isStrict = path.isInStrictMode(); - const { superClass } = path.node; - - path.node.type = "ClassDeclaration"; - if (!path.node.id) path.node.id = path.scope.generateUidIdentifier("class"); - - const initializeId = path.scope.generateUidIdentifier("initialize"); - const superId = - superClass && - path.scope.generateUidIdentifierBasedOnNode(path.node.superClass, "super"); - - if (superClass) path.node.superClass = superId; - - const classDecorators = takeDecorators(path); - const definitions = getElementsDefinitions(path, path.node.id, file); - - insertInitializeInstanceElements(path, initializeId); - - const expr = template.expression.ast` - ${addDecorateHelper(file)}( - ${classDecorators || t.nullLiteral()}, - function (${initializeId}, ${superClass ? superId : null}) { - ${path.node} - return { F: ${t.cloneNode(path.node.id)}, d: ${definitions} }; - }, - ${superClass} - ) - `; - if (!isStrict) { - expr.arguments[1].body.directives.push( - t.directive(t.directiveLiteral("use strict")), - ); - } - - return isDeclaration ? template.ast`let ${path.node.id} = ${expr}` : expr; -} - -function addDecorateHelper(file) { - try { - return file.addHelper("decorate"); - } catch (err) { - if (err.code === "BABEL_HELPER_UNKNOWN") { - err.message += - "\n '@babel/plugin-transform-decorators' in non-legacy mode" + - " requires '@babel/core' version ^7.0.2 and you appear to be using" + - " an older version."; - } - throw err; - } -} - -export default { - ExportDefaultDeclaration(path) { - let decl = path.get("declaration"); - if (!decl.isClassDeclaration() || !hasDecorators(decl)) return; - - if (decl.node.id) decl = splitExportDeclaration(path); - - decl.replaceWith(transformClass(decl, this.file)); - }, - - Class(path) { - if (hasDecorators(path)) { - path.replaceWith(transformClass(path, this.file)); - } - }, -}; From 0514a9f90370b2c14bcd722f96fd97644024f9fd Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 10 Dec 2018 12:00:52 -0600 Subject: [PATCH 149/563] Update v7 regression issue template link (#9157) --- .github/ISSUE_TEMPLATE/Regression-v7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/Regression-v7.md b/.github/ISSUE_TEMPLATE/Regression-v7.md index 72d315e4fc78..aafe81185128 100644 --- a/.github/ISSUE_TEMPLATE/Regression-v7.md +++ b/.github/ISSUE_TEMPLATE/Regression-v7.md @@ -10,7 +10,7 @@ assignees: '' # v7 Regression -> First check out: https://new.babeljs.io/docs/en/next/v7-migration.html +> First check out: https://babeljs.io/docs/en/v7-migration > Also a partial upgrade tool: https://github.com/babel/babel-upgrade **Potential Commit/PR that introduced the regression** From d2dc28ed2b398bc5c4e563b7ce8e400d8bb1a453 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Wed, 12 Dec 2018 10:23:54 -0800 Subject: [PATCH 150/563] add triage label to new issues [skip ci] (#9158) --- .github/ISSUE_TEMPLATE/Bug_report.md | 2 +- .github/ISSUE_TEMPLATE/Feature_request.md | 2 +- .github/ISSUE_TEMPLATE/Regression-v7.md | 2 +- .github/ISSUE_TEMPLATE/Support_question.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 83838dcc540f..344922e4702c 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -2,7 +2,7 @@ name: "\U0001F41B Bug Report" about: "If something isn't working as expected \U0001F914." title: '' -labels: 'i: bug' +labels: 'i: bug, i: needs triage' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md index 8ed1aa533cc0..b9c82542ff8c 100644 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -2,7 +2,7 @@ name: "\U0001F680 Feature Request" about: "I have a suggestion (and may want to implement it \U0001F642)!" title: '' -labels: 'i: enhancement' +labels: 'i: enhancement, i: needs triage' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/Regression-v7.md b/.github/ISSUE_TEMPLATE/Regression-v7.md index aafe81185128..a700b90ba073 100644 --- a/.github/ISSUE_TEMPLATE/Regression-v7.md +++ b/.github/ISSUE_TEMPLATE/Regression-v7.md @@ -3,7 +3,7 @@ name: "\U0001F4A5 v7 Regression" about: Report an unexpected behavior in v7 from v6 (Check the upgrade guide first ✌️) title: '' -labels: 'i: bug, 7.x: regression' +labels: 'i: bug, 7.x: regression, i: needs triage' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/Support_question.md b/.github/ISSUE_TEMPLATE/Support_question.md index 466b0256e558..57c183f7323d 100644 --- a/.github/ISSUE_TEMPLATE/Support_question.md +++ b/.github/ISSUE_TEMPLATE/Support_question.md @@ -2,7 +2,7 @@ name: "\U0001F917 Support Question" about: "If you have a question \U0001F4AC, please check out our Slack or StackOverflow!" title: '' -labels: 'i: question' +labels: 'i: question, i: needs triage' assignees: '' --- From 66c4bc8f6470f7349535bf0e48d8b17188aed4c5 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Wed, 12 Dec 2018 16:07:49 -0500 Subject: [PATCH 151/563] update list of sponsors [skip ci] --- README.md | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/README.md b/README.md index 7d09826914b5..78f533936c08 100644 --- a/README.md +++ b/README.md @@ -48,35 +48,15 @@ Become a sponsor and get your logo on our README on Github with a link to your s - - - - - - - - - - - - - - - ## Patreon Sponsors Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://www.patreon.com/henryzhu)] -## Silver - - - ## Bronze -

Mike Sherov

## Intro From b60adce4cb4e0c705cb308b6eacf36605ed61db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Wed, 12 Dec 2018 23:56:33 +0100 Subject: [PATCH 152/563] Update CHANGELOG.md --- CHANGELOG.md | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4e305ca264..632db8c8bce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,164 @@ See [CHANGELOG - v4](/.github/CHANGELOG-v4.md), [CHANGELOG - v5](/.github/CHANGE See [CHANGELOG - 6to5](/.github/CHANGELOG-6to5.md) for the pre-4.0.0 version changelog. See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0.0-beta.29 version changelog. +## v7.2.1 (2018-12-04) + +This release fixes a regression introduced in v7.2.0 (https://github.com/babel/babel/issues/9120) + +#### :bug: Bug Fix +* `babel-helper-create-class-features-plugin` + * [#9121](https://github.com/babel/babel/pull/9121) Don't use isClassPrivateMethod because it isn't supported in <7.2.0. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +## v7.2.0 (2018-12-03) + +You can read more about this release at https://babeljs.io/blog/2018/12/03/7.2.0. + +#### :rocket: New Feature +* `babel-parser` + * [#8289](https://github.com/babel/babel/pull/8289) Implement Smart Pipeline proposal in @babel/parser. ([@mAAdhaTTah](https://github.com/mAAdhaTTah)) +* `babel-core` + * [#8986](https://github.com/babel/babel/pull/8986) Export @babel/parser#tokTypes in @babel/core. ([@kaicataldo](https://github.com/kaicataldo)) +* `babel-node` + * [#9078](https://github.com/babel/babel/pull/9078) Pass `rootMode` from `@babel/node`.. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg)) +* `babel-generator`, `babel-helpers`, `babel-plugin-class-features`, `babel-plugin-proposal-private-methods`, `babel-plugin-syntax-class-properties`, `babel-types` + * [#8654](https://github.com/babel/babel/pull/8654) Private class methods stage 3. ([@tim-mc](https://github.com/tim-mc)) +* `babel-preset-env` + * [#9048](https://github.com/babel/babel/pull/9048) Update mappings for node 10 in preset-env. ([@existentialism](https://github.com/existentialism)) + +#### :bug: Bug Fix +* `babel-parser` + * [#9114](https://github.com/babel/babel/pull/9114) Parse non-octals with leading zeros in non strict mode correctly. ([@danez](https://github.com/danez)) + * [#9074](https://github.com/babel/babel/pull/9074) Disallow await inside arrow functions. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#9069](https://github.com/babel/babel/pull/9069) [flow] Allow type casts in array patterns inside arrow parameters. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#9058](https://github.com/babel/babel/pull/9058) Fix compatibility between typescript and jsx plugins in interface declarations. ([@danez](https://github.com/danez)) + * [#9055](https://github.com/babel/babel/pull/9055) Fix bug with parsing TS generic async arrow function. ([@existentialism](https://github.com/existentialism)) + * [#9035](https://github.com/babel/babel/pull/9035) Fix parsing typescript function types with destructuring. ([@danez](https://github.com/danez)) +* `babel-helper-fixtures`, `babel-parser` + * [#9113](https://github.com/babel/babel/pull/9113) Ignore empty fixture directories and fix fixtures in the parser. ([@danez](https://github.com/danez)) +* `babel-preset-env` + * [#9091](https://github.com/babel/babel/pull/9091) Update mapping for regex unicode plugin in preset-env. ([@existentialism](https://github.com/existentialism)) +* `babel-plugin-transform-destructuring` + * [#8916](https://github.com/babel/babel/pull/8916) Fix destructuring assignment in arrow functions without block. ([@RubenVerborgh](https://github.com/RubenVerborgh)) +* `babel-plugin-proposal-optional-chaining` + * [#9073](https://github.com/babel/babel/pull/9073) Microbouji patch/8136. ([@jridgewell](https://github.com/jridgewell)) +* `babel-core`, `babel-helper-wrap-function`, `babel-plugin-proposal-async-generator-functions`, `babel-plugin-proposal-function-sent`, `babel-plugin-transform-async-to-generator`, `babel-plugin-transform-classes` + * [#9039](https://github.com/babel/babel/pull/9039) Fix recursive async function expressions. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-core` + * [#9034](https://github.com/babel/babel/pull/9034) Normalize presets before merging config with others.. ([@loganfsmyth](https://github.com/loganfsmyth)) + +#### :nail_care: Polish +* `babel-generator` + * [#9089](https://github.com/babel/babel/pull/9089) Remove unused variable. ([@Gcaufy](https://github.com/Gcaufy)) +* `babel-node` + * [#9079](https://github.com/babel/babel/pull/9079) Move `fs-readdir-recursive` and `output-file-sync` to `devDependencies` for `@babel/node`.. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg)) +* `babel-parser` + * [#9046](https://github.com/babel/babel/pull/9046) a better error message for disallowed trailing commas/additional parameters after rest elements in function params. ([@morozRed](https://github.com/morozRed)) +* `babel-*` + * [#8769](https://github.com/babel/babel/pull/8769) Add plugins name. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :house: Internal +* `babel-helper-create-class-features-plugin`, `babel-plugin-proposal-class-properties`, `babel-plugin-proposal-private-methods` + * [#9083](https://github.com/babel/babel/pull/9083) Make @babel/plugin-class-features a normal helper package. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* Other + * [#9096](https://github.com/babel/babel/pull/9096) Add node 11 to CI and remove node 9. ([@danez](https://github.com/danez)) + * [#9094](https://github.com/babel/babel/pull/9094) Skip minifying standalone in non-publish runs. ([@danez](https://github.com/danez)) +* `babel-types` + * [#9093](https://github.com/babel/babel/pull/9093) Fix warning when using prettier in code generators. ([@danez](https://github.com/danez)) +* `babel-generator` + * [#9089](https://github.com/babel/babel/pull/9089) Remove unused variable. ([@Gcaufy](https://github.com/Gcaufy)) + +## v7.1.6 (2018-11-13) + +#### :bug: Bug Fix +* `babel-generator` + * [#9003](https://github.com/babel/babel/pull/9003) Fix retainLines regression for arrow functions. ([@loganfsmyth](https://github.com/loganfsmyth)) +* `babel-types` + * [#8997](https://github.com/babel/babel/pull/8997) Fix cloneNode with typeAnnotation.. ([@neoziro](https://github.com/neoziro)) +* `babel-plugin-transform-flow-strip-types`, `babel-plugin-transform-react-jsx` + * [#8701](https://github.com/babel/babel/pull/8701) Fix "TypeError: comments is not iterable". ([@AlicanC](https://github.com/AlicanC)) +* `babel-core` + * [#9004](https://github.com/babel/babel/pull/9004) Fix browser files to have the same API as the nodejs ones. ([@danez](https://github.com/danez)) +* Other + * [#9007](https://github.com/babel/babel/pull/9007) [Types] fix generated TS/Flow comment types. ([@ljqx](https://github.com/ljqx)) +* `babel-preset-env` + * [#8555](https://github.com/babel/babel/pull/8555) preset-env: fix `opera` from `esmodules` target and Browserslist not used. ([@ylemkimon](https://github.com/ylemkimon)) +* `babel-plugin-proposal-decorators`, `babel-traverse` + * [#8970](https://github.com/babel/babel/pull/8970) [decorators] Correctly insert `_initialize(this)` after `super()`.. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser` + * [#8972](https://github.com/babel/babel/pull/8972) Fix several edge cases with context expression state. ([@danez](https://github.com/danez)) + +#### :nail_care: Polish +* `babel-parser` + * [#8984](https://github.com/babel/babel/pull/8984) Rename primitive types to reserved types. ([@danez](https://github.com/danez)) + +#### :house: Internal +* [#8982](https://github.com/babel/babel/pull/8982) fix publish command [skip ci]. ([@hzoo](https://github.com/hzoo)) +* [#8988](https://github.com/babel/babel/pull/8988) Remove definition of micromatch which was removed.. ([@danez](https://github.com/danez)) + +## v7.1.5 (2018-11-06) + +#### :eyeglasses: Spec Compliancy +* `babel-parser`, `babylon` + * [#7727](https://github.com/babel/babel/pull/7727) Fix await in function name and parameters. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + +#### :rocket: New Feature +* `babel-parser` + * [#8828](https://github.com/babel/babel/pull/8828) Typescript: Validate tuple type element positions. ([@Retsam](https://github.com/Retsam)) + * [#8883](https://github.com/babel/babel/pull/8883) [flow] Add support for parsing `_` as implicit instantiation in call/new. ([@jbrown215](https://github.com/jbrown215)) +* `babel-core`, `babel-generator`, `babel-parser`, `babel-plugin-syntax-typescript`, `babel-traverse` + * [#8448](https://github.com/babel/babel/pull/8448) Remove Babylon plugins for features already merged to the ECMAScript spec. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-parser`, `babel-types` + * [#8884](https://github.com/babel/babel/pull/8884) [flow] Explicit inexact objects with `...`. ([@jbrown215](https://github.com/jbrown215)) +* `babel-preset-env` + * [#8898](https://github.com/babel/babel/pull/8898) Update preset-env data. ([@existentialism](https://github.com/existentialism)) + +#### :bug: Bug Fix +* `babel-parser` + * [#8956](https://github.com/babel/babel/pull/8956) Do not allow TypeCastExpressions w/o parens . ([@danez](https://github.com/danez)) + * [#8954](https://github.com/babel/babel/pull/8954) Allow function types in type params within arrow return types. ([@danez](https://github.com/danez)) + * [#8866](https://github.com/babel/babel/pull/8866) Closes [#8865](https://github.com/babel/babel/issues/8865). ([@byronluk](https://github.com/byronluk)) +* `babel-core` + * [#8910](https://github.com/babel/babel/pull/8910) Resolve babel.config.js 'babelrcRoots' values relative to the config file.. ([@loganfsmyth](https://github.com/loganfsmyth)) + * [#8950](https://github.com/babel/babel/pull/8950) Fix message when plugin of a wrong type is passed. ([@everdimension](https://github.com/everdimension)) +* `babel-plugin-transform-block-scoping` + * [#8937](https://github.com/babel/babel/pull/8937) rename colliding let bindings with for loop init. ([@byronluk](https://github.com/byronluk)) + * [#8914](https://github.com/babel/babel/pull/8914) Treat break inside block inside loop. ([@thiagoarrais](https://github.com/thiagoarrais)) +* `babel-preset-env` + * [#8926](https://github.com/babel/babel/pull/8926) preset-env: Edge support for arrow param destructuring. ([@benmosher](https://github.com/benmosher)) +* `babel-generator` + * [#8868](https://github.com/babel/babel/pull/8868) fix single-arg async arrows when retainLines=true. ([@ryanwmarsh](https://github.com/ryanwmarsh)) +* `babel-traverse` + * [#8880](https://github.com/babel/babel/pull/8880) fix: Expression x === 'y' && '' should not evaluate to undefined.. ([@Cyp](https://github.com/Cyp)) + +#### :nail_care: Polish +* [#8873](https://github.com/babel/babel/pull/8873) fixed an extra word. ([@vvyomjjain](https://github.com/vvyomjjain)) + +## v7.1.4 (2018-10-11) + +Just re-published `@babel/traverse` without `**` so that it works in Node 6. + +## v7.1.3 (2018-10-11) + +#### :bug: Bug Fix +* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-types` + * [#8720](https://github.com/babel/babel/pull/8720) Typescript - Tuple elements can be optional. ([@Retsam](https://github.com/Retsam)) +* `babel-traverse` + * [#8833](https://github.com/babel/babel/pull/8833) Insertafter jsx fix. ([@kevintab95](https://github.com/kevintab95)) +* `babel-parser` + * [#8830](https://github.com/babel/babel/pull/8830) Correct handling of newline after async with paren-less arrow func. ([@Retsam](https://github.com/Retsam)) + * [#8756](https://github.com/babel/babel/pull/8756) class private methods and properties: should not allow spaces between # and identifier. ([@macabeus](https://github.com/macabeus)) + * [#8804](https://github.com/babel/babel/pull/8804) Fix parsing of slash after class expression. ([@existentialism](https://github.com/existentialism)) + * [#8767](https://github.com/babel/babel/pull/8767) [decorators] [typescript] Parse type parameters. ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + * [#8792](https://github.com/babel/babel/pull/8792) Fix perf issue in typescript parser plugin. ([@matthewrobertson](https://github.com/matthewrobertson)) +* `babel-generator`, `babel-parser`, `babel-plugin-transform-typescript`, `babel-types` + * [#8805](https://github.com/babel/babel/pull/8805) Typescript - Tuples can include rest elements. ([@Retsam](https://github.com/Retsam)) +* `babel-types` + * [#8791](https://github.com/babel/babel/pull/8791) types: allow jsxEmptyExpression inside jsxExpressionContainer. ([@tvooo](https://github.com/tvooo)) +* `babel-plugin-transform-modules-systemjs` + * [#8820](https://github.com/babel/babel/pull/8820) System module format - fixes function hoisting failure case. ([@guybedford](https://github.com/guybedford)) +* `babel-plugin-transform-destructuring` + * [#8793](https://github.com/babel/babel/pull/8793) Ensure destructuring's computed key handling matches object-rest-spread. ([@existentialism](https://github.com/existentialism)) + ## 7.1.2 (2018-09-28) Same as v7.1.1, except compiled against Node 6 instead of Node 8 by accident (e.g had `async functions`). From f4eec5ca798c60b705efcd8e99d4745957590000 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Wed, 12 Dec 2018 21:24:44 -0800 Subject: [PATCH 153/563] Add new flag that indicates if a module has exports (#9171) --- .../src/normalize-and-load-metadata.js | 30 +++++++++++-------- .../interop-loose/multi-load/output.js | 2 ++ .../fixtures/interop/multi-load/output.js | 4 +++ .../fixtures/regression/issue-9155/input.mjs | 1 + .../regression/issue-9155/options.json | 5 ++++ .../fixtures/regression/issue-9155/output.js | 5 ++++ 6 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/input.mjs create mode 100644 packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/options.json create mode 100644 packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/output.js diff --git a/packages/babel-helper-module-transforms/src/normalize-and-load-metadata.js b/packages/babel-helper-module-transforms/src/normalize-and-load-metadata.js index 3f2f86dfdd5a..15cb4daf0b1b 100644 --- a/packages/babel-helper-module-transforms/src/normalize-and-load-metadata.js +++ b/packages/babel-helper-module-transforms/src/normalize-and-load-metadata.js @@ -8,6 +8,8 @@ export type ModuleMetadata = { // The name of the variable that will reference an object containing export names. exportNameListName: null | string, + hasExports: boolean, + // Lookup from local binding to export information. local: Map, @@ -52,18 +54,7 @@ export type LocalExportMetadata = { * Check if the module has any exports that need handling. */ export function hasExports(metadata: ModuleMetadata) { - const { local, source } = metadata; - - return ( - local.size > 0 || - Array.from(source).some(([, meta]) => { - return ( - meta.reexports.size > 0 || - meta.reexportNamespace.size > 0 || - !!meta.reexportAll - ); - }) - ); + return metadata.hasExports; } /** @@ -99,7 +90,10 @@ export default function normalizeModuleAndLoadMetadata( nameAnonymousExports(programPath); - const { local, source } = getModuleMetadata(programPath, { loose, lazy }); + const { local, source, hasExports } = getModuleMetadata(programPath, { + loose, + lazy, + }); removeModuleDeclarations(programPath); @@ -127,6 +121,7 @@ export default function normalizeModuleAndLoadMetadata( return { exportName, exportNameListName: null, + hasExports, local, source, }; @@ -171,6 +166,7 @@ function getModuleMetadata( } return data; }; + let hasExports = false; programPath.get("body").forEach(child => { if (child.isImportDeclaration()) { const data = getData(child.node.source); @@ -219,6 +215,7 @@ function getModuleMetadata( } }); } else if (child.isExportAllDeclaration()) { + hasExports = true; const data = getData(child.node.source); if (!data.loc) data.loc = child.node.loc; @@ -226,6 +223,7 @@ function getModuleMetadata( loc: child.node.loc, }; } else if (child.isExportNamedDeclaration() && child.node.source) { + hasExports = true; const data = getData(child.node.source); if (!data.loc) data.loc = child.node.loc; @@ -242,6 +240,11 @@ function getModuleMetadata( throw exportName.buildCodeFrameError('Illegal export "__esModule".'); } }); + } else if ( + child.isExportNamedDeclaration() || + child.isExportDefaultDeclaration() + ) { + hasExports = true; } }); @@ -295,6 +298,7 @@ function getModuleMetadata( } return { + hasExports, local: localData, source: sourceData, }; diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/interop-loose/multi-load/output.js b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/interop-loose/multi-load/output.js index 9930c38eb4aa..fc02ffa1536e 100644 --- a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/interop-loose/multi-load/output.js +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/interop-loose/multi-load/output.js @@ -2,6 +2,8 @@ var _interopRequireDefault3 = require("@babel/runtime/helpers/interopRequireDefault"); +exports.__esModule = true; + var _interopRequireDefault2 = _interopRequireDefault3(require("@babel/runtime/helpers/interopRequireDefault")); console.log(_interopRequireDefault2.default); diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/interop/multi-load/output.js b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/interop/multi-load/output.js index 9930c38eb4aa..2e762d530630 100644 --- a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/interop/multi-load/output.js +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/interop/multi-load/output.js @@ -2,6 +2,10 @@ var _interopRequireDefault3 = require("@babel/runtime/helpers/interopRequireDefault"); +Object.defineProperty(exports, "__esModule", { + value: true +}); + var _interopRequireDefault2 = _interopRequireDefault3(require("@babel/runtime/helpers/interopRequireDefault")); console.log(_interopRequireDefault2.default); diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/input.mjs b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/input.mjs new file mode 100644 index 000000000000..cb0ff5c3b541 --- /dev/null +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/input.mjs @@ -0,0 +1 @@ +export {}; diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/options.json b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/options.json new file mode 100644 index 000000000000..8b5e8767af51 --- /dev/null +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/options.json @@ -0,0 +1,5 @@ +{ + "plugins": [ + "transform-modules-commonjs" + ] +} diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/output.js b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/output.js new file mode 100644 index 000000000000..e8650c927876 --- /dev/null +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9155/output.js @@ -0,0 +1,5 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); From 731182eee44a1b47d5232697489a49f09641bccf Mon Sep 17 00:00:00 2001 From: Thiago Arrais Date: Thu, 13 Dec 2018 02:58:58 -0300 Subject: [PATCH 154/563] Types for pipeline operator (smart proposal) (#9122) --- .../babel-generator/src/generators/types.js | 12 +++++ .../types/PipelineBareFunction/input.js | 1 + .../types/PipelineBareFunction/options.json | 3 ++ .../types/PipelineBareFunction/output.js | 1 + .../types/PipelineTopicExpression/input.js | 8 +++ .../PipelineTopicExpression/options.json | 3 ++ .../types/PipelineTopicExpression/output.js | 8 +++ .../src/asserts/generated/index.js | 18 +++++++ .../src/builders/generated/index.js | 12 +++++ .../src/definitions/experimental.js | 24 +++++++++ .../src/validators/generated/index.js | 49 +++++++++++++++++++ 11 files changed, 139 insertions(+) create mode 100644 packages/babel-generator/test/fixtures/types/PipelineBareFunction/input.js create mode 100644 packages/babel-generator/test/fixtures/types/PipelineBareFunction/options.json create mode 100644 packages/babel-generator/test/fixtures/types/PipelineBareFunction/output.js create mode 100644 packages/babel-generator/test/fixtures/types/PipelineTopicExpression/input.js create mode 100644 packages/babel-generator/test/fixtures/types/PipelineTopicExpression/options.json create mode 100644 packages/babel-generator/test/fixtures/types/PipelineTopicExpression/output.js diff --git a/packages/babel-generator/src/generators/types.js b/packages/babel-generator/src/generators/types.js index 4a5ed312a661..491ae7513828 100644 --- a/packages/babel-generator/src/generators/types.js +++ b/packages/babel-generator/src/generators/types.js @@ -151,3 +151,15 @@ export function BigIntLiteral(node: Object) { } this.token(node.value); } + +export function PipelineTopicExpression(node: Object) { + this.print(node.expression, node); +} + +export function PipelineBareFunction(node: Object) { + this.print(node.callee, node); +} + +export function PipelinePrimaryTopicReference() { + this.token("#"); +} diff --git a/packages/babel-generator/test/fixtures/types/PipelineBareFunction/input.js b/packages/babel-generator/test/fixtures/types/PipelineBareFunction/input.js new file mode 100644 index 000000000000..e5b2807245d0 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/PipelineBareFunction/input.js @@ -0,0 +1 @@ +let result = "hello" |> doubleSay |> text.capitalize |> a.b.exclaim; diff --git a/packages/babel-generator/test/fixtures/types/PipelineBareFunction/options.json b/packages/babel-generator/test/fixtures/types/PipelineBareFunction/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/PipelineBareFunction/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-generator/test/fixtures/types/PipelineBareFunction/output.js b/packages/babel-generator/test/fixtures/types/PipelineBareFunction/output.js new file mode 100644 index 000000000000..e5b2807245d0 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/PipelineBareFunction/output.js @@ -0,0 +1 @@ +let result = "hello" |> doubleSay |> text.capitalize |> a.b.exclaim; diff --git a/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/input.js b/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/input.js new file mode 100644 index 000000000000..4c8ffd3bf244 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/input.js @@ -0,0 +1,8 @@ +value |> # + 1; +value |> 1 + #; +value |> do { + #; +}; +value |> do { + if (yes) #; +}; diff --git a/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/options.json b/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/options.json new file mode 100644 index 000000000000..edb7679c6a74 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }], "doExpressions"] +} diff --git a/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/output.js b/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/output.js new file mode 100644 index 000000000000..4c8ffd3bf244 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/PipelineTopicExpression/output.js @@ -0,0 +1,8 @@ +value |> # + 1; +value |> 1 + #; +value |> do { + #; +}; +value |> do { + if (yes) #; +}; diff --git a/packages/babel-types/src/asserts/generated/index.js b/packages/babel-types/src/asserts/generated/index.js index e55c1e6f38f1..b59008770da1 100644 --- a/packages/babel-types/src/asserts/generated/index.js +++ b/packages/babel-types/src/asserts/generated/index.js @@ -675,6 +675,24 @@ export function assertOptionalMemberExpression( ): void { assert("OptionalMemberExpression", node, opts); } +export function assertPipelineTopicExpression( + node: Object, + opts?: Object = {}, +): void { + assert("PipelineTopicExpression", node, opts); +} +export function assertPipelineBareFunction( + node: Object, + opts?: Object = {}, +): void { + assert("PipelineBareFunction", node, opts); +} +export function assertPipelinePrimaryTopicReference( + node: Object, + opts?: Object = {}, +): void { + assert("PipelinePrimaryTopicReference", node, opts); +} export function assertOptionalCallExpression( node: Object, opts?: Object = {}, diff --git a/packages/babel-types/src/builders/generated/index.js b/packages/babel-types/src/builders/generated/index.js index fc4eb6285eea..3ef4c396f91b 100644 --- a/packages/babel-types/src/builders/generated/index.js +++ b/packages/babel-types/src/builders/generated/index.js @@ -612,6 +612,18 @@ export function OptionalMemberExpression(...args: Array): Object { return builder("OptionalMemberExpression", ...args); } export { OptionalMemberExpression as optionalMemberExpression }; +export function PipelineTopicExpression(...args: Array): Object { + return builder("PipelineTopicExpression", ...args); +} +export { PipelineTopicExpression as pipelineTopicExpression }; +export function PipelineBareFunction(...args: Array): Object { + return builder("PipelineBareFunction", ...args); +} +export { PipelineBareFunction as pipelineBareFunction }; +export function PipelinePrimaryTopicReference(...args: Array): Object { + return builder("PipelinePrimaryTopicReference", ...args); +} +export { PipelinePrimaryTopicReference as pipelinePrimaryTopicReference }; export function OptionalCallExpression(...args: Array): Object { return builder("OptionalCallExpression", ...args); } diff --git a/packages/babel-types/src/definitions/experimental.js b/packages/babel-types/src/definitions/experimental.js index 03865adfc4a3..6bf4a476cc94 100644 --- a/packages/babel-types/src/definitions/experimental.js +++ b/packages/babel-types/src/definitions/experimental.js @@ -89,6 +89,30 @@ defineType("OptionalMemberExpression", { }, }); +defineType("PipelineTopicExpression", { + builder: ["expression"], + visitor: ["expression"], + fields: { + expression: { + validate: assertNodeType("Expression"), + }, + }, +}); + +defineType("PipelineBareFunction", { + builder: ["callee"], + visitor: ["callee"], + fields: { + callee: { + validate: assertNodeType("Expression"), + }, + }, +}); + +defineType("PipelinePrimaryTopicReference", { + aliases: ["Expression"], +}); + defineType("OptionalCallExpression", { visitor: ["callee", "arguments", "typeParameters", "typeArguments"], builder: ["callee", "arguments", "optional"], diff --git a/packages/babel-types/src/validators/generated/index.js b/packages/babel-types/src/validators/generated/index.js index 9b47f4feb9aa..e23dc5de2cda 100644 --- a/packages/babel-types/src/validators/generated/index.js +++ b/packages/babel-types/src/validators/generated/index.js @@ -2131,6 +2131,54 @@ export function isOptionalMemberExpression( return false; } +export function isPipelineTopicExpression( + node: Object, + opts?: Object, +): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "PipelineTopicExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} +export function isPipelineBareFunction(node: Object, opts?: Object): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "PipelineBareFunction") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} +export function isPipelinePrimaryTopicReference( + node: Object, + opts?: Object, +): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "PipelinePrimaryTopicReference") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} export function isOptionalCallExpression(node: Object, opts?: Object): boolean { if (!node) return false; @@ -3164,6 +3212,7 @@ export function isExpression(node: Object, opts?: Object): boolean { "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || + "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || From b9340bc5974528630ec6b94a6d7186699040096b Mon Sep 17 00:00:00 2001 From: Patrick Eriksson Date: Thu, 13 Dec 2018 21:15:40 +0100 Subject: [PATCH 155/563] Fix package.json repository URLs (#9176) --- .../babel-helper-create-class-features-plugin/package.json | 2 +- .../package.json | 2 +- packages/babel-plugin-syntax-bigint/package.json | 2 +- packages/babel-plugin-transform-dotall-regex/package.json | 5 +---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/babel-helper-create-class-features-plugin/package.json b/packages/babel-helper-create-class-features-plugin/package.json index 3b7a4fd4a1fa..a34018df6c00 100644 --- a/packages/babel-helper-create-class-features-plugin/package.json +++ b/packages/babel-helper-create-class-features-plugin/package.json @@ -4,7 +4,7 @@ "author": "The Babel Team (https://babeljs.io/team)", "license": "MIT", "description": "Compile class public and private fields, private methods and decorators to ES6", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-class-features", + "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-create-class-features-plugin", "main": "lib/index.js", "publishConfig": { "access": "public" diff --git a/packages/babel-plugin-proposal-nullish-coalescing-operator/package.json b/packages/babel-plugin-proposal-nullish-coalescing-operator/package.json index ff7832acae34..65b989f6de0f 100644 --- a/packages/babel-plugin-proposal-nullish-coalescing-operator/package.json +++ b/packages/babel-plugin-proposal-nullish-coalescing-operator/package.json @@ -2,7 +2,7 @@ "name": "@babel/plugin-proposal-nullish-coalescing-operator", "version": "7.2.0", "description": "Remove nullish coalescing operator", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-nullish-coalescing-opearator", + "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-nullish-coalescing-operator", "license": "MIT", "publishConfig": { "access": "public" diff --git a/packages/babel-plugin-syntax-bigint/package.json b/packages/babel-plugin-syntax-bigint/package.json index 5d65fd206901..6da1ce1bdf42 100644 --- a/packages/babel-plugin-syntax-bigint/package.json +++ b/packages/babel-plugin-syntax-bigint/package.json @@ -2,7 +2,7 @@ "name": "@babel/plugin-syntax-bigint", "version": "7.2.0", "description": "Allow parsing of BigInt literals", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-bigint", + "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-bigint", "license": "MIT", "publishConfig": { "access": "public" diff --git a/packages/babel-plugin-transform-dotall-regex/package.json b/packages/babel-plugin-transform-dotall-regex/package.json index 4319da69e42c..a10171064806 100644 --- a/packages/babel-plugin-transform-dotall-regex/package.json +++ b/packages/babel-plugin-transform-dotall-regex/package.json @@ -18,10 +18,7 @@ "regular expressions", "dotall" ], - "repository": { - "type": "git", - "url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-dotall-regex.git" - }, + "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-dotall-regex", "bugs": "https://github.com/babel/babel/issues", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", From 72471aff63bc77e63bdc9e414038a5496ec6decb Mon Sep 17 00:00:00 2001 From: Vikram Rangaraj Date: Thu, 13 Dec 2018 22:10:01 -0800 Subject: [PATCH 156/563] Handle flow comments with leading spaces (#9168) * check for spaces and tabs before a flow comment * fix issue with using string index and shift interchangably * update tests * Use update charcodes version * Disallow flow-comments in flow-comments and check for unterminated comments --- package.json | 4 +- packages/babel-parser/src/plugins/flow.js | 44 ++++- .../comment-disabled/01-type-include/input.js | 1 + .../01-type-include/output.json | 48 ++++- .../03-type-flow-include/input.js | 2 +- .../03-type-flow-include/output.json | 12 +- .../04-type-flow-include/input.js | 1 + .../04-type-flow-include/output.json | 48 ++++- .../flow/comment/01-type-include/input.js | 3 +- .../flow/comment/01-type-include/output.json | 112 +++++++++--- .../comment/03-type-flow-include/input.js | 2 +- .../comment/03-type-flow-include/output.json | 52 +++--- .../comment/04-type-flow-include/input.js | 3 +- .../comment/04-type-flow-include/output.json | 169 ++++++++++++++---- .../comment/06-type-include-error/input.js | 2 +- .../08-type-flow-include-error/input.js | 2 +- .../11-nested-comments-invalid/input.js | 1 + .../11-nested-comments-invalid/options.json | 3 + .../12-line-comment-nested-invalid/input.js | 1 + .../options.json | 3 + .../13-nested-flow-comments-invalid/input.js | 1 + .../options.json | 3 + scripts/tests/flow/flow_tests_whitelist.txt | 2 +- .../tests/flow/run_babel_parser_flow_tests.js | 2 +- yarn.lock | 16 +- 25 files changed, 404 insertions(+), 133 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/flow/comment/11-nested-comments-invalid/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/comment/11-nested-comments-invalid/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/comment/12-line-comment-nested-invalid/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/comment/12-line-comment-nested-invalid/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/comment/13-nested-flow-comments-invalid/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/comment/13-nested-flow-comments-invalid/options.json diff --git a/package.json b/package.json index c00597b99cb0..3780b817d4c6 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,11 @@ "babel-eslint": "^10.0.1", "babel-jest": "^23.6.0", "babel-loader": "^8.0.4", - "babel-plugin-transform-charcodes": "^0.1.0", + "babel-plugin-transform-charcodes": "^0.1.1", "browserify": "^16.2.2", "bundle-collapser": "^1.2.1", "chalk": "^2.3.2", - "charcodes": "^0.1.0", + "charcodes": "^0.1.1", "derequire": "^2.0.2", "enhanced-resolve": "^3.0.0", "eslint": "^5.9.0", diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index bbf4378a7ac0..827b02ea21b1 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -2697,21 +2697,34 @@ export default (superClass: Class): Class => super.readToken_mult_modulo(code); } + parseTopLevel(file: N.File, program: N.Program): N.File { + const fileNode = super.parseTopLevel(file, program); + if (this.state.hasFlowComment) { + this.unexpected(null, "Unterminated flow-comment"); + } + return fileNode; + } + skipBlockComment(): void { if ( this.hasPlugin("flow") && this.hasPlugin("flowComments") && this.skipFlowComment() ) { + if (this.state.hasFlowComment) { + this.unexpected( + null, + "Cannot have a flow comment inside another flow comment", + ); + } this.hasFlowCommentCompletion(); this.state.pos += this.skipFlowComment(); this.state.hasFlowComment = true; return; } - let end; if (this.hasPlugin("flow") && this.state.hasFlowComment) { - end = this.input.indexOf("*-/", (this.state.pos += 2)); + const end = this.input.indexOf("*-/", (this.state.pos += 2)); if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); this.state.pos = end + 3; return; @@ -2721,17 +2734,32 @@ export default (superClass: Class): Class => } skipFlowComment(): number | boolean { - const ch2 = this.input.charCodeAt(this.state.pos + 2); - const ch3 = this.input.charCodeAt(this.state.pos + 3); + const { pos } = this.state; + let shiftToFirstNonWhiteSpace = 2; + while ( + [charCodes.space, charCodes.tab].includes( + this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace), + ) + ) { + shiftToFirstNonWhiteSpace++; + } + + const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); + const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); if (ch2 === charCodes.colon && ch3 === charCodes.colon) { - return 4; // check for /*:: + return shiftToFirstNonWhiteSpace + 2; // check for /*:: } - if (this.input.slice(this.state.pos + 2, 14) === "flow-include") { - return 14; // check for /*flow-include + if ( + this.input.slice( + shiftToFirstNonWhiteSpace + pos, + shiftToFirstNonWhiteSpace + pos + 12, + ) === "flow-include" + ) { + return shiftToFirstNonWhiteSpace + 12; // check for /*flow-include } if (ch2 === charCodes.colon && ch3 !== charCodes.colon) { - return 2; // check for /*:, advance only 2 steps + return shiftToFirstNonWhiteSpace; // check for /*:, advance up to : } return false; } diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/input.js b/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/input.js index b42988128e04..0d7178b7b682 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/input.js +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/input.js @@ -1,3 +1,4 @@ class MyClass { /*:: prop: string; */ + /* :: foo: number; */ } diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/output.json b/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/output.json index 618209f10c9a..42033b969ac4 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/01-type-include/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 41, + "end": 68, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 41, + "end": 68, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -32,14 +32,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 41, + "end": 68, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -64,14 +64,14 @@ "body": { "type": "ClassBody", "start": 14, - "end": 41, + "end": 68, "loc": { "start": { "line": 1, "column": 14 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -92,6 +92,22 @@ "column": 23 } } + }, + { + "type": "CommentBlock", + "value": " :: foo: number; ", + "start": 42, + "end": 66, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 26 + } + } } ] } @@ -115,6 +131,22 @@ "column": 23 } } + }, + { + "type": "CommentBlock", + "value": " :: foo: number; ", + "start": 42, + "end": 66, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 26 + } + } } ] } \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/input.js b/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/input.js index d1644a305b88..5391c499ba5f 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/input.js +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/input.js @@ -1,4 +1,4 @@ -/*flow-include +/* flow-include type Foo = { foo: number, bar: boolean, diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/output.json index ed5a0e7b58b3..39c844aa9f01 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/03-type-flow-include/output.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 78, + "end": 79, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 78, + "end": 79, "loc": { "start": { "line": 1, @@ -33,9 +33,9 @@ "innerComments": [ { "type": "CommentBlock", - "value": "flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n", + "value": " flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n", "start": 0, - "end": 78, + "end": 79, "loc": { "start": { "line": 1, @@ -52,9 +52,9 @@ "comments": [ { "type": "CommentBlock", - "value": "flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n", + "value": " flow-include\ntype Foo = {\n foo: number,\n bar: boolean,\n baz: string\n};\n", "start": 0, - "end": 78, + "end": 79, "loc": { "start": { "line": 1, diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/input.js b/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/input.js index 6dc6ca809bfa..0e2022bb2d59 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/input.js +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/input.js @@ -1,3 +1,4 @@ class MyClass { /*flow-include prop: string; */ + /* flow-include foo: number; */ } diff --git a/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/output.json index fb2a67dd8393..8c2727c7eb82 100644 --- a/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment-disabled/04-type-flow-include/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 51, + "end": 90, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 51, + "end": 90, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -32,14 +32,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 51, + "end": 90, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -64,14 +64,14 @@ "body": { "type": "ClassBody", "start": 14, - "end": 51, + "end": 90, "loc": { "start": { "line": 1, "column": 14 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -92,6 +92,22 @@ "column": 33 } } + }, + { + "type": "CommentBlock", + "value": " flow-include foo: number; ", + "start": 52, + "end": 88, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 38 + } + } } ] } @@ -115,6 +131,22 @@ "column": 33 } } + }, + { + "type": "CommentBlock", + "value": " flow-include foo: number; ", + "start": 52, + "end": 88, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 38 + } + } } ] } \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/comment/01-type-include/input.js b/packages/babel-parser/test/fixtures/flow/comment/01-type-include/input.js index b42988128e04..cca6b81303bf 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/01-type-include/input.js +++ b/packages/babel-parser/test/fixtures/flow/comment/01-type-include/input.js @@ -1,3 +1,4 @@ class MyClass { - /*:: prop: string; */ + /* :: prop: string; */ + /* :: prop2: number; */ } diff --git a/packages/babel-parser/test/fixtures/flow/comment/01-type-include/output.json b/packages/babel-parser/test/fixtures/flow/comment/01-type-include/output.json index 4f80907e1de9..b31ea80c63cf 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/01-type-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment/01-type-include/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 41, + "end": 74, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 41, + "end": 74, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -32,14 +32,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 41, + "end": 74, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -64,45 +64,45 @@ "body": { "type": "ClassBody", "start": 14, - "end": 41, + "end": 74, "loc": { "start": { "line": 1, "column": 14 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, "body": [ { "type": "ClassProperty", - "start": 23, - "end": 36, + "start": 26, + "end": 39, "loc": { "start": { "line": 2, - "column": 7 + "column": 10 }, "end": { "line": 2, - "column": 20 + "column": 23 } }, "static": false, "key": { "type": "Identifier", - "start": 23, - "end": 27, + "start": 26, + "end": 30, "loc": { "start": { "line": 2, - "column": 7 + "column": 10 }, "end": { "line": 2, - "column": 11 + "column": 14 }, "identifierName": "prop" }, @@ -112,30 +112,96 @@ "variance": null, "typeAnnotation": { "type": "TypeAnnotation", - "start": 27, - "end": 35, + "start": 30, + "end": 38, "loc": { "start": { "line": 2, - "column": 11 + "column": 14 }, "end": { "line": 2, - "column": 19 + "column": 22 } }, "typeAnnotation": { "type": "StringTypeAnnotation", - "start": 29, - "end": 35, + "start": 32, + "end": 38, "loc": { "start": { "line": 2, - "column": 13 + "column": 16 }, "end": { "line": 2, + "column": 22 + } + } + } + }, + "value": null + }, + { + "type": "ClassProperty", + "start": 55, + "end": 69, + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + }, + "static": false, + "key": { + "type": "Identifier", + "start": 55, + "end": 60, + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + }, + "identifierName": "prop2" + }, + "name": "prop2" + }, + "computed": false, + "variance": null, + "typeAnnotation": { + "type": "TypeAnnotation", + "start": 60, + "end": 68, + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + }, + "typeAnnotation": { + "type": "NumberTypeAnnotation", + "start": 62, + "end": 68, + "loc": { + "start": { + "line": 3, "column": 19 + }, + "end": { + "line": 3, + "column": 25 } } } diff --git a/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/input.js b/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/input.js index d1644a305b88..5391c499ba5f 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/input.js +++ b/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/input.js @@ -1,4 +1,4 @@ -/*flow-include +/* flow-include type Foo = { foo: number, bar: boolean, diff --git a/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json index 5b41ff77f72a..567f48a615b3 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment/03-type-flow-include/output.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 78, + "end": 79, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 78, + "end": 79, "loc": { "start": { "line": 1, @@ -31,8 +31,8 @@ "body": [ { "type": "TypeAlias", - "start": 15, - "end": 75, + "start": 16, + "end": 76, "loc": { "start": { "line": 2, @@ -45,8 +45,8 @@ }, "id": { "type": "Identifier", - "start": 20, - "end": 23, + "start": 21, + "end": 24, "loc": { "start": { "line": 2, @@ -63,8 +63,8 @@ "typeParameters": null, "right": { "type": "ObjectTypeAnnotation", - "start": 26, - "end": 74, + "start": 27, + "end": 75, "loc": { "start": { "line": 2, @@ -79,8 +79,8 @@ "properties": [ { "type": "ObjectTypeProperty", - "start": 30, - "end": 41, + "start": 31, + "end": 42, "loc": { "start": { "line": 3, @@ -93,8 +93,8 @@ }, "key": { "type": "Identifier", - "start": 30, - "end": 33, + "start": 31, + "end": 34, "loc": { "start": { "line": 3, @@ -114,8 +114,8 @@ "method": false, "value": { "type": "NumberTypeAnnotation", - "start": 35, - "end": 41, + "start": 36, + "end": 42, "loc": { "start": { "line": 3, @@ -132,8 +132,8 @@ }, { "type": "ObjectTypeProperty", - "start": 45, - "end": 57, + "start": 46, + "end": 58, "loc": { "start": { "line": 4, @@ -146,8 +146,8 @@ }, "key": { "type": "Identifier", - "start": 45, - "end": 48, + "start": 46, + "end": 49, "loc": { "start": { "line": 4, @@ -167,8 +167,8 @@ "method": false, "value": { "type": "BooleanTypeAnnotation", - "start": 50, - "end": 57, + "start": 51, + "end": 58, "loc": { "start": { "line": 4, @@ -185,8 +185,8 @@ }, { "type": "ObjectTypeProperty", - "start": 61, - "end": 72, + "start": 62, + "end": 73, "loc": { "start": { "line": 5, @@ -199,8 +199,8 @@ }, "key": { "type": "Identifier", - "start": 61, - "end": 64, + "start": 62, + "end": 65, "loc": { "start": { "line": 5, @@ -220,8 +220,8 @@ "method": false, "value": { "type": "StringTypeAnnotation", - "start": 66, - "end": 72, + "start": 67, + "end": 73, "loc": { "start": { "line": 5, diff --git a/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/input.js b/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/input.js index 6dc6ca809bfa..7c3c07ea0945 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/input.js +++ b/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/input.js @@ -1,3 +1,4 @@ class MyClass { - /*flow-include prop: string; */ + /* flow-include prop: string; */ + /* flow-include prop2: number; */ } diff --git a/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/output.json b/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/output.json index fb2a67dd8393..908bfa823b79 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/output.json +++ b/packages/babel-parser/test/fixtures/flow/comment/04-type-flow-include/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 51, + "end": 99, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 51, + "end": 99, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -32,14 +32,14 @@ { "type": "ClassDeclaration", "start": 0, - "end": 51, + "end": 99, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, @@ -64,57 +64,154 @@ "body": { "type": "ClassBody", "start": 14, - "end": 51, + "end": 99, "loc": { "start": { "line": 1, "column": 14 }, "end": { - "line": 3, + "line": 4, "column": 1 } }, - "body": [], - "innerComments": [ + "body": [ { - "type": "CommentBlock", - "value": "flow-include prop: string; ", - "start": 18, - "end": 49, + "type": "ClassProperty", + "start": 39, + "end": 52, "loc": { "start": { "line": 2, - "column": 2 + "column": 23 }, "end": { "line": 2, - "column": 33 + "column": 36 } - } + }, + "static": false, + "key": { + "type": "Identifier", + "start": 39, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + }, + "identifierName": "prop" + }, + "name": "prop" + }, + "computed": false, + "variance": null, + "typeAnnotation": { + "type": "TypeAnnotation", + "start": 43, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "typeAnnotation": { + "type": "StringTypeAnnotation", + "start": 45, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 35 + } + } + } + }, + "value": null + }, + { + "type": "ClassProperty", + "start": 80, + "end": 94, + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 38 + } + }, + "static": false, + "key": { + "type": "Identifier", + "start": 80, + "end": 85, + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 29 + }, + "identifierName": "prop2" + }, + "name": "prop2" + }, + "computed": false, + "variance": null, + "typeAnnotation": { + "type": "TypeAnnotation", + "start": 85, + "end": 93, + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 37 + } + }, + "typeAnnotation": { + "type": "NumberTypeAnnotation", + "start": 87, + "end": 93, + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 37 + } + } + } + }, + "value": null } ] } } ], "directives": [] - }, - "comments": [ - { - "type": "CommentBlock", - "value": "flow-include prop: string; ", - "start": 18, - "end": 49, - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ] + } } \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/comment/06-type-include-error/input.js b/packages/babel-parser/test/fixtures/flow/comment/06-type-include-error/input.js index 24b92dba6ee5..38ca508e980d 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/06-type-include-error/input.js +++ b/packages/babel-parser/test/fixtures/flow/comment/06-type-include-error/input.js @@ -1,3 +1,3 @@ class MyClass { - /*:: prop: string; + /* :: prop: string; } diff --git a/packages/babel-parser/test/fixtures/flow/comment/08-type-flow-include-error/input.js b/packages/babel-parser/test/fixtures/flow/comment/08-type-flow-include-error/input.js index 495661d6a0ac..e876bde46b18 100644 --- a/packages/babel-parser/test/fixtures/flow/comment/08-type-flow-include-error/input.js +++ b/packages/babel-parser/test/fixtures/flow/comment/08-type-flow-include-error/input.js @@ -1,4 +1,4 @@ -/*flow-include +/* flow-include type Foo = { foo: number, bar: boolean, diff --git a/packages/babel-parser/test/fixtures/flow/comment/11-nested-comments-invalid/input.js b/packages/babel-parser/test/fixtures/flow/comment/11-nested-comments-invalid/input.js new file mode 100644 index 000000000000..6af1c10d91fe --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/comment/11-nested-comments-invalid/input.js @@ -0,0 +1 @@ +/*:: /*asd */ diff --git a/packages/babel-parser/test/fixtures/flow/comment/11-nested-comments-invalid/options.json b/packages/babel-parser/test/fixtures/flow/comment/11-nested-comments-invalid/options.json new file mode 100644 index 000000000000..8b8fde928397 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/comment/11-nested-comments-invalid/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unterminated comment (1:5)" +} diff --git a/packages/babel-parser/test/fixtures/flow/comment/12-line-comment-nested-invalid/input.js b/packages/babel-parser/test/fixtures/flow/comment/12-line-comment-nested-invalid/input.js new file mode 100644 index 000000000000..127da20d59af --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/comment/12-line-comment-nested-invalid/input.js @@ -0,0 +1 @@ +/*:: //asd */ diff --git a/packages/babel-parser/test/fixtures/flow/comment/12-line-comment-nested-invalid/options.json b/packages/babel-parser/test/fixtures/flow/comment/12-line-comment-nested-invalid/options.json new file mode 100644 index 000000000000..9a7e0e3402af --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/comment/12-line-comment-nested-invalid/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unterminated flow-comment (1:13)" +} diff --git a/packages/babel-parser/test/fixtures/flow/comment/13-nested-flow-comments-invalid/input.js b/packages/babel-parser/test/fixtures/flow/comment/13-nested-flow-comments-invalid/input.js new file mode 100644 index 000000000000..e5ec97f06ed7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/comment/13-nested-flow-comments-invalid/input.js @@ -0,0 +1 @@ +/*:: /*flow-include */ diff --git a/packages/babel-parser/test/fixtures/flow/comment/13-nested-flow-comments-invalid/options.json b/packages/babel-parser/test/fixtures/flow/comment/13-nested-flow-comments-invalid/options.json new file mode 100644 index 000000000000..fb8fdf85eed0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/comment/13-nested-flow-comments-invalid/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Cannot have a flow comment inside another flow comment (1:0)" +} diff --git a/scripts/tests/flow/flow_tests_whitelist.txt b/scripts/tests/flow/flow_tests_whitelist.txt index 520eaaebf693..8d4855ab4082 100644 --- a/scripts/tests/flow/flow_tests_whitelist.txt +++ b/scripts/tests/flow/flow_tests_whitelist.txt @@ -27,7 +27,6 @@ decorators/migrated_0007.js private_class_properties/multiple.js private_class_properties/super.js types/annotations/migrated_0001.js -types/annotations_in_comments_invalid/migrated_0003.js types/annotations/void_is_reserved_param.js types/member/reserved_words.js types/parameter_defaults/migrated_0032.js @@ -38,3 +37,4 @@ numbers/underscored_float_whole.js numbers/underscored_hex.js numbers/underscored_number.js numbers/underscored_oct.js +types/annotations_in_comments/migrated_0001.js diff --git a/scripts/tests/flow/run_babel_parser_flow_tests.js b/scripts/tests/flow/run_babel_parser_flow_tests.js index 7cd85ce78ab5..0b75218968fa 100644 --- a/scripts/tests/flow/run_babel_parser_flow_tests.js +++ b/scripts/tests/flow/run_babel_parser_flow_tests.js @@ -98,7 +98,7 @@ function update_whitelist(summary) { ); }); - const newLines = disallowed + const newLines = summary.disallowed.failure .map(({ test }) => test.file) .filter(test => oldLines.indexOf(test) === -1); diff --git a/yarn.lock b/yarn.lock index 2a177859ae57..2d849cc6c9ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1651,10 +1651,10 @@ babel-plugin-syntax-object-rest-spread@^6.13.0: resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= -babel-plugin-transform-charcodes@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-charcodes/-/babel-plugin-transform-charcodes-0.1.0.tgz#c71b301019c90615b940faf0f15f275ec5c81a3d" - integrity sha512-RUBYwMpIEAnQeIgE03DCn8JViDIPkwO6+0uHU4fgou4I/U5ml/zsa7xJ8KqTPVBAKvJAV2cFGoc4W/t8q1Zntg== +babel-plugin-transform-charcodes@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-charcodes/-/babel-plugin-transform-charcodes-0.1.1.tgz#6b186ebd25e0932aba9c82820edd711992b66952" + integrity sha512-wMKC2+F8NByAFLp5+5fObJQtgp2Wuj2/bTWA8uHSE5eOVTy3PdMAwMKElEICFS9pXHWiq2hB+MK1gt4SGR+oYw== dependencies: "@babel/traverse" "^7.0.0-beta.31" babylon "^7.0.0-beta.31" @@ -2238,10 +2238,10 @@ chalk@^2.3.1, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -charcodes@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/charcodes/-/charcodes-0.1.0.tgz#61f8c244fc7f94f186fe74f31078901a3ed7928e" - integrity sha512-m4ne5Zw6XsdHhM5teBUHvu5s1SeJnwP0ljQ+IrGyZZ6U1TMohi+pVtsvgSgEsj5CPY6PLd/vMknFRuXdifdk+g== +charcodes@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/charcodes/-/charcodes-0.1.1.tgz#c463f6506cdb3b26a7f2d3fd4399abd363dd632a" + integrity sha512-6aaMfQtn61TsnFc7rQ9RXZ2LqMoLlWr0kJWvPMtH1n+XArQByvZEaIwwUmeGPoutvJOr0qGa3/NL/hqM4BI+uQ== chardet@^0.4.0: version "0.4.2" From 47da5cf75a4f67d199422e7f2a2635a71317d478 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Thu, 13 Dec 2018 23:24:43 -0800 Subject: [PATCH 157/563] Correctly transform spreads to use proper concat method (#9108) * Correctly transform spreads to use proper concat method * Add tests to ensure array spread clones elements --- .../array-unpack-optimisation/output.js | 2 +- .../src/index.js | 20 +++++++++++++++++-- .../fixtures/regression/issue-8907/exec.js | 11 ++++++++++ .../fixtures/regression/issue-8907/input.js | 7 +++++++ .../fixtures/regression/issue-8907/output.js | 7 +++++++ .../fixtures/spread/arguments-array/exec.js | 9 +++++++++ .../spread/array-literal-first/output.js | 2 +- .../test/fixtures/spread/known-rest/output.js | 2 +- .../test/fixtures/spread/single/exec.js | 7 +++++++ 9 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/exec.js create mode 100644 packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/input.js create mode 100644 packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/output.js create mode 100644 packages/babel-plugin-transform-spread/test/fixtures/spread/arguments-array/exec.js create mode 100644 packages/babel-plugin-transform-spread/test/fixtures/spread/single/exec.js diff --git a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/array-unpack-optimisation/output.js b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/array-unpack-optimisation/output.js index 7743f54e7c6a..32816cdc73c4 100644 --- a/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/array-unpack-optimisation/output.js +++ b/packages/babel-plugin-transform-destructuring/test/fixtures/destructuring/array-unpack-optimisation/output.js @@ -21,7 +21,7 @@ var _ref4 = [a[1], a[0]]; a[0] = _ref4[0]; a[1] = _ref4[1]; -var _ref5 = babelHelpers.toConsumableArray(foo).concat([bar]), +var _ref5 = [].concat(babelHelpers.toConsumableArray(foo), [bar]), a = _ref5[0], b = _ref5[1]; diff --git a/packages/babel-plugin-transform-spread/src/index.js b/packages/babel-plugin-transform-spread/src/index.js index 17428ca362bc..16af42b08fd6 100644 --- a/packages/babel-plugin-transform-spread/src/index.js +++ b/packages/babel-plugin-transform-spread/src/index.js @@ -57,13 +57,29 @@ export default declare((api, options) => { if (!hasSpread(elements)) return; const nodes = build(elements, scope); - const first = nodes.shift(); + let first = nodes[0]; - if (nodes.length === 0 && first !== elements[0].argument) { + // If there is only one element in the ArrayExpression and + // the element was transformed (Array.prototype.slice.call or toConsumableArray) + // we know that the transformed code already takes care of cloning the array. + // So we can simply return that element. + if (nodes.length === 1 && first !== elements[0].argument) { path.replaceWith(first); return; } + // If the first element is a ArrayExpression we can directly call + // concat on it. + // `[..].concat(..)` + // If not then we have to use `[].concat(arr)` and not `arr.concat` + // because `arr` could be extended/modified (e.g. Immutable) and we do not know exactly + // what concat would produce. + if (!t.isArrayExpression(first)) { + first = t.arrayExpression([]); + } else { + nodes.shift(); + } + path.replaceWith( t.callExpression( t.memberExpression(first, t.identifier("concat")), diff --git a/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/exec.js b/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/exec.js new file mode 100644 index 000000000000..9e3bfb579c24 --- /dev/null +++ b/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/exec.js @@ -0,0 +1,11 @@ +const arr = []; + +arr.concat = () => { + throw new Error('Should not be called'); +}; +let x; +expect(() => { + x = [...arr]; +}).not.toThrow(); + +expect(x).not.toBe(arr); diff --git a/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/input.js b/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/input.js new file mode 100644 index 000000000000..b95bf724af4f --- /dev/null +++ b/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/input.js @@ -0,0 +1,7 @@ +const arr = []; + +arr.concat = () => { + throw new Error('Should not be called'); +}; + +const x = [...arr]; diff --git a/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/output.js b/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/output.js new file mode 100644 index 000000000000..60793535cb80 --- /dev/null +++ b/packages/babel-plugin-transform-spread/test/fixtures/regression/issue-8907/output.js @@ -0,0 +1,7 @@ +const arr = []; + +arr.concat = () => { + throw new Error('Should not be called'); +}; + +const x = [].concat(arr); diff --git a/packages/babel-plugin-transform-spread/test/fixtures/spread/arguments-array/exec.js b/packages/babel-plugin-transform-spread/test/fixtures/spread/arguments-array/exec.js new file mode 100644 index 000000000000..d9c77d1f1d73 --- /dev/null +++ b/packages/babel-plugin-transform-spread/test/fixtures/spread/arguments-array/exec.js @@ -0,0 +1,9 @@ +// test that toConsumableArray clones the array. + +function foo() { + const x = [...arguments]; + + expect(x).not.toBe(arguments); +} + +foo(1,2); diff --git a/packages/babel-plugin-transform-spread/test/fixtures/spread/array-literal-first/output.js b/packages/babel-plugin-transform-spread/test/fixtures/spread/array-literal-first/output.js index fbe8da8f82ea..1da8c64e8363 100644 --- a/packages/babel-plugin-transform-spread/test/fixtures/spread/array-literal-first/output.js +++ b/packages/babel-plugin-transform-spread/test/fixtures/spread/array-literal-first/output.js @@ -1 +1 @@ -var lyrics = babelHelpers.toConsumableArray(parts).concat(["head", "and", "toes"]); +var lyrics = [].concat(babelHelpers.toConsumableArray(parts), ["head", "and", "toes"]); diff --git a/packages/babel-plugin-transform-spread/test/fixtures/spread/known-rest/output.js b/packages/babel-plugin-transform-spread/test/fixtures/spread/known-rest/output.js index 64c67e4ca8d7..4cd381b32416 100644 --- a/packages/babel-plugin-transform-spread/test/fixtures/spread/known-rest/output.js +++ b/packages/babel-plugin-transform-spread/test/fixtures/spread/known-rest/output.js @@ -3,5 +3,5 @@ function foo() { bar[_key] = arguments[_key]; } - return bar.concat(); + return [].concat(bar); } diff --git a/packages/babel-plugin-transform-spread/test/fixtures/spread/single/exec.js b/packages/babel-plugin-transform-spread/test/fixtures/spread/single/exec.js new file mode 100644 index 000000000000..2c77b9a47736 --- /dev/null +++ b/packages/babel-plugin-transform-spread/test/fixtures/spread/single/exec.js @@ -0,0 +1,7 @@ +// test that toConsumableArray clones the array. +const arr = []; +const foo = () => arr; + +const x = [...foo()]; + +expect(x).not.toBe(arr); From 7bcd62cfee0dcca9a3510b8ba61db7c014078706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 15 Dec 2018 09:07:39 +0100 Subject: [PATCH 158/563] Build standalone on prepublish --- Makefile | 8 +++++++- .../babel-preset-env-standalone/scripts/prepublish.js | 11 +++++++++++ packages/babel-standalone/scripts/prepublish.js | 7 +++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 packages/babel-preset-env-standalone/scripts/prepublish.js create mode 100644 packages/babel-standalone/scripts/prepublish.js diff --git a/Makefile b/Makefile index d1032af00d8d..d8a41578855c 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,12 @@ build-standalone: build-preset-env-standalone: ./node_modules/.bin/gulp build-babel-preset-env-standalone +prepublish-build-standalone: + BABEL_ENV=production IS_PUBLISH=true ./node_modules/.bin/gulp build-babel-standalone + +prepublish-build-preset-env-standalone: + BABEL_ENV=production IS_PUBLISH=true ./node_modules/.bin/gulp build-babel-preset-env-standalone + build-dist: build cd packages/babel-polyfill; \ scripts/build-dist.sh @@ -115,7 +121,7 @@ prepublish-build: rm -rf packages/babel-runtime/helpers rm -rf packages/babel-runtime-corejs2/helpers rm -rf packages/babel-runtime-corejs2/core-js - BABEL_ENV=production IS_PUBLISH=true make build-dist + BABEL_ENV=production make build-dist make clone-license prepublish: diff --git a/packages/babel-preset-env-standalone/scripts/prepublish.js b/packages/babel-preset-env-standalone/scripts/prepublish.js new file mode 100644 index 000000000000..bff650fb032d --- /dev/null +++ b/packages/babel-preset-env-standalone/scripts/prepublish.js @@ -0,0 +1,11 @@ +// This file is executed by lerna before publishing, +// @babel/preset-env-standalone so that it has the +// new version and not the old one. + +require("child_process").execSync( + "make prepublish-build-preset-env-standalone", + { + cwd: require("path").resolve(__dirname, "../../.."), + stdio: "inherit", + } +); diff --git a/packages/babel-standalone/scripts/prepublish.js b/packages/babel-standalone/scripts/prepublish.js new file mode 100644 index 000000000000..daadffb117ef --- /dev/null +++ b/packages/babel-standalone/scripts/prepublish.js @@ -0,0 +1,7 @@ +// This file is executed by lerna before publishing @babel/standalone, +// so that it has the new version and not the old one. + +require("child_process").execSync("make prepublish-build-standalone", { + cwd: require("path").resolve(__dirname, "../../.."), + stdio: "inherit", +}); From c1499b13ac6e2a6cb0bee1643d67706e7c3f8d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 15 Dec 2018 10:59:56 +0100 Subject: [PATCH 159/563] v7.2.2 --- lerna.json | 2 +- packages/babel-core/package.json | 12 ++++++------ packages/babel-generator/package.json | 6 +++--- .../package.json | 4 ++-- packages/babel-helper-module-transforms/package.json | 6 +++--- packages/babel-node/package.json | 4 ++-- packages/babel-parser/package.json | 2 +- .../babel-plugin-proposal-decorators/package.json | 6 +++--- packages/babel-plugin-transform-classes/package.json | 4 ++-- packages/babel-plugin-transform-spread/package.json | 4 ++-- packages/babel-preset-env-standalone/package.json | 4 ++-- packages/babel-standalone/package.json | 10 +++++----- packages/babel-template/package.json | 6 +++--- packages/babel-traverse/package.json | 8 ++++---- packages/babel-types/package.json | 6 +++--- 15 files changed, 42 insertions(+), 42 deletions(-) diff --git a/lerna.json b/lerna.json index 8b9a3bbd5922..a2cd2fab7547 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.11.0", - "version": "7.2.1", + "version": "7.2.2", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index 5cf5b57ade12..5c128b995668 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -1,6 +1,6 @@ { "name": "@babel/core", - "version": "7.2.0", + "version": "7.2.2", "description": "Babel compiler core.", "main": "lib/index.js", "author": "Sebastian McKenzie ", @@ -34,12 +34,12 @@ }, "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.2.0", + "@babel/generator": "^7.2.2", "@babel/helpers": "^7.2.0", - "@babel/parser": "^7.2.0", - "@babel/template": "^7.1.2", - "@babel/traverse": "^7.1.6", - "@babel/types": "^7.2.0", + "@babel/parser": "^7.2.2", + "@babel/template": "^7.2.2", + "@babel/traverse": "^7.2.2", + "@babel/types": "^7.2.2", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", diff --git a/packages/babel-generator/package.json b/packages/babel-generator/package.json index 9f611a28e4b5..cdbfa43eea81 100644 --- a/packages/babel-generator/package.json +++ b/packages/babel-generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/generator", - "version": "7.2.0", + "version": "7.2.2", "description": "Turns an AST into code.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "lib" ], "dependencies": { - "@babel/types": "^7.2.0", + "@babel/types": "^7.2.2", "jsesc": "^2.5.1", "lodash": "^4.17.10", "source-map": "^0.5.0", @@ -22,6 +22,6 @@ }, "devDependencies": { "@babel/helper-fixtures": "^7.2.0", - "@babel/parser": "^7.2.0" + "@babel/parser": "^7.2.2" } } diff --git a/packages/babel-helper-create-class-features-plugin/package.json b/packages/babel-helper-create-class-features-plugin/package.json index a34018df6c00..5825e3bfe5a3 100644 --- a/packages/babel-helper-create-class-features-plugin/package.json +++ b/packages/babel-helper-create-class-features-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-create-class-features-plugin", - "version": "7.2.1", + "version": "7.2.2", "author": "The Babel Team (https://babeljs.io/team)", "license": "MIT", "description": "Compile class public and private fields, private methods and decorators to ES6", @@ -24,7 +24,7 @@ "@babel/core": "^7.0.0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.2.2", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-helper-module-transforms/package.json b/packages/babel-helper-module-transforms/package.json index 4df315528955..f98e051397d9 100644 --- a/packages/babel-helper-module-transforms/package.json +++ b/packages/babel-helper-module-transforms/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-module-transforms", - "version": "7.1.0", + "version": "7.2.2", "description": "Babel helper functions for implementing ES6 module transformations", "author": "Logan Smyth ", "homepage": "https://babeljs.io/", @@ -14,8 +14,8 @@ "@babel/helper-module-imports": "^7.0.0", "@babel/helper-simple-access": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/template": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/template": "^7.2.2", + "@babel/types": "^7.2.2", "lodash": "^4.17.10" } } diff --git a/packages/babel-node/package.json b/packages/babel-node/package.json index d29e2928c1ae..c9c93cf4400e 100644 --- a/packages/babel-node/package.json +++ b/packages/babel-node/package.json @@ -1,6 +1,6 @@ { "name": "@babel/node", - "version": "7.2.0", + "version": "7.2.2", "description": "Babel command line", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -29,7 +29,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.2.2", "@babel/helper-fixtures": "^7.2.0", "fs-readdir-recursive": "^1.0.0", "output-file-sync": "^2.0.0" diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index 9ddeec906ab2..cb9896a4789b 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/parser", - "version": "7.2.0", + "version": "7.2.2", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-plugin-proposal-decorators/package.json b/packages/babel-plugin-proposal-decorators/package.json index 1e2bf31e2d61..60f07b300d1d 100644 --- a/packages/babel-plugin-proposal-decorators/package.json +++ b/packages/babel-plugin-proposal-decorators/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-decorators", - "version": "7.2.0", + "version": "7.2.2", "author": "Logan Smyth ", "license": "MIT", "publishConfig": { @@ -15,15 +15,15 @@ "decorators" ], "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.2.2", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-create-class-features-plugin": "^7.2.1", "@babel/plugin-syntax-decorators": "^7.2.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.2.2", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-transform-classes/package.json b/packages/babel-plugin-transform-classes/package.json index 0da7428c51dc..bfc53314013f 100644 --- a/packages/babel-plugin-transform-classes/package.json +++ b/packages/babel-plugin-transform-classes/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-classes", - "version": "7.2.0", + "version": "7.2.2", "description": "Compile ES2015 classes to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-classes", "license": "MIT", @@ -25,7 +25,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.2.2", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-transform-spread/package.json b/packages/babel-plugin-transform-spread/package.json index 772c17b352c6..5c051240523d 100644 --- a/packages/babel-plugin-transform-spread/package.json +++ b/packages/babel-plugin-transform-spread/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-spread", - "version": "7.2.0", + "version": "7.2.2", "description": "Compile ES2015 spread to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-spread", "license": "MIT", @@ -18,7 +18,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.2.2", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-preset-env-standalone/package.json b/packages/babel-preset-env-standalone/package.json index 5f799bb5c835..496176fd000e 100644 --- a/packages/babel-preset-env-standalone/package.json +++ b/packages/babel-preset-env-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/preset-env-standalone", - "version": "7.0.0", + "version": "7.2.2", "description": "Standalone build of babel-prest-env for use in non-Node.js environments.", "main": "babel-preset-env.js", "files": [ @@ -12,7 +12,7 @@ "@babel/plugin-proposal-json-strings": "^7.0.0", "@babel/plugin-transform-new-target": "^7.0.0", "@babel/preset-env": "^7.0.0", - "@babel/standalone": "^7.0.0" + "@babel/standalone": "^7.2.2" }, "keywords": [ "babel", diff --git a/packages/babel-standalone/package.json b/packages/babel-standalone/package.json index a05c213b1376..020aedf504a2 100644 --- a/packages/babel-standalone/package.json +++ b/packages/babel-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/standalone", - "version": "7.2.0", + "version": "7.2.2", "description": "Standalone build of Babel for use in non-Node.js environments.", "main": "babel.js", "files": [ @@ -9,12 +9,12 @@ "src" ], "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.2.2", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-external-helpers": "^7.2.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", "@babel/plugin-proposal-class-properties": "^7.2.0", - "@babel/plugin-proposal-decorators": "^7.2.0", + "@babel/plugin-proposal-decorators": "^7.2.2", "@babel/plugin-proposal-do-expressions": "^7.2.0", "@babel/plugin-proposal-export-default-from": "^7.2.0", "@babel/plugin-proposal-export-namespace-from": "^7.2.0", @@ -50,7 +50,7 @@ "@babel/plugin-transform-async-to-generator": "^7.2.0", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", "@babel/plugin-transform-block-scoping": "^7.2.0", - "@babel/plugin-transform-classes": "^7.2.0", + "@babel/plugin-transform-classes": "^7.2.2", "@babel/plugin-transform-computed-properties": "^7.2.0", "@babel/plugin-transform-destructuring": "^7.2.0", "@babel/plugin-transform-dotall-regex": "^7.2.0", @@ -86,7 +86,7 @@ "@babel/plugin-transform-regenerator": "^7.0.0", "@babel/plugin-transform-runtime": "^7.2.0", "@babel/plugin-transform-shorthand-properties": "^7.2.0", - "@babel/plugin-transform-spread": "^7.2.0", + "@babel/plugin-transform-spread": "^7.2.2", "@babel/plugin-transform-sticky-regex": "^7.2.0", "@babel/plugin-transform-strict-mode": "^7.2.0", "@babel/plugin-transform-template-literals": "^7.2.0", diff --git a/packages/babel-template/package.json b/packages/babel-template/package.json index bb9f93be7677..e7feb753134e 100644 --- a/packages/babel-template/package.json +++ b/packages/babel-template/package.json @@ -1,6 +1,6 @@ { "name": "@babel/template", - "version": "7.1.2", + "version": "7.2.2", "description": "Generate an AST from a string template.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,7 +12,7 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.1.2", - "@babel/types": "^7.1.2" + "@babel/parser": "^7.2.2", + "@babel/types": "^7.2.2" } } diff --git a/packages/babel-traverse/package.json b/packages/babel-traverse/package.json index 6f2ee087bf24..c4f278770438 100644 --- a/packages/babel-traverse/package.json +++ b/packages/babel-traverse/package.json @@ -1,6 +1,6 @@ { "name": "@babel/traverse", - "version": "7.1.6", + "version": "7.2.2", "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,11 +12,11 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.1.6", + "@babel/generator": "^7.2.2", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.1.6", - "@babel/types": "^7.1.6", + "@babel/parser": "^7.2.2", + "@babel/types": "^7.2.2", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.10" diff --git a/packages/babel-types/package.json b/packages/babel-types/package.json index fa4f5c1a0c03..0f4bbbb803b0 100644 --- a/packages/babel-types/package.json +++ b/packages/babel-types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/types", - "version": "7.2.0", + "version": "7.2.2", "description": "Babel Types is a Lodash-esque utility library for AST nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "to-fast-properties": "^2.0.0" }, "devDependencies": { - "@babel/generator": "^7.2.0", - "@babel/parser": "^7.2.0" + "@babel/generator": "^7.2.2", + "@babel/parser": "^7.2.2" } } From 3c8e15dbc1129ab93a6e9485811475dd1d91e1de Mon Sep 17 00:00:00 2001 From: Andy Edwards Date: Sat, 15 Dec 2018 08:16:43 -0600 Subject: [PATCH 160/563] don't throw classNameTDZError if referenced identifier is within a TypeAnnotation (#9190) fix #9189 Obviously this code is intended to throw an error if someone tries to reference a class before it's defined, like: ```js class Foo { someField = Foo; } ``` But there's no problem with referencing the class in a type annotation before it's defined, and this is often necessary for tree structures: ```js class Foo { [someSymbol]: Foo; } ``` --- .../input.js | 7 +++++++ .../options.json | 8 ++++++++ .../output.js | 13 +++++++++++++ .../recursive-class-property-type/input.js | 5 +++++ .../recursive-class-property-type/options.json | 8 ++++++++ .../recursive-class-property-type/output.js | 10 ++++++++++ packages/babel-helper-replace-supers/src/index.js | 3 +++ 7 files changed, 54 insertions(+) create mode 100644 packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/input.js create mode 100644 packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/options.json create mode 100644 packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/output.js create mode 100644 packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/input.js create mode 100644 packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/options.json create mode 100644 packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/output.js diff --git a/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/input.js b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/input.js new file mode 100644 index 000000000000..970c1db08ec2 --- /dev/null +++ b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/input.js @@ -0,0 +1,7 @@ +const sym = Symbol(); +const sym1 = Symbol(); + +class A { + [sym]: A.B; + [sym1]: Array; +} diff --git a/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/options.json b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/options.json new file mode 100644 index 000000000000..0e9a8e684ed6 --- /dev/null +++ b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/options.json @@ -0,0 +1,8 @@ +{ + "presets": [ + "flow" + ], + "plugins": [ + "proposal-class-properties" + ] +} diff --git a/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/output.js b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/output.js new file mode 100644 index 000000000000..fd32a2ea962d --- /dev/null +++ b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type-challenge/output.js @@ -0,0 +1,13 @@ +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +const sym = Symbol(); +const sym1 = Symbol(); + +class A { + constructor() { + _defineProperty(this, sym, void 0); + + _defineProperty(this, sym1, void 0); + } + +} diff --git a/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/input.js b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/input.js new file mode 100644 index 000000000000..ccab98482097 --- /dev/null +++ b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/input.js @@ -0,0 +1,5 @@ +const sym = Symbol(); + +class A { + [sym]: A; +} diff --git a/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/options.json b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/options.json new file mode 100644 index 000000000000..0e9a8e684ed6 --- /dev/null +++ b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/options.json @@ -0,0 +1,8 @@ +{ + "presets": [ + "flow" + ], + "plugins": [ + "proposal-class-properties" + ] +} diff --git a/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/output.js b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/output.js new file mode 100644 index 000000000000..bfd8df8eda20 --- /dev/null +++ b/packages/babel-helper-create-class-features-plugin/test/fixtures/plugin-proposal-class-properties/recursive-class-property-type/output.js @@ -0,0 +1,10 @@ +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +const sym = Symbol(); + +class A { + constructor() { + _defineProperty(this, sym, void 0); + } + +} diff --git a/packages/babel-helper-replace-supers/src/index.js b/packages/babel-helper-replace-supers/src/index.js index d8da1f0409fd..e6d45b7464a7 100644 --- a/packages/babel-helper-replace-supers/src/index.js +++ b/packages/babel-helper-replace-supers/src/index.js @@ -40,6 +40,9 @@ function skipAllButComputedKey(path) { } export const environmentVisitor = { + TypeAnnotation(path) { + path.skip(); + }, Function(path) { // Methods will be handled by the Method visit if (path.isMethod()) return; From 5cb38995c0f7e21504f6647d6222cb016b1f5ee6 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Sat, 15 Dec 2018 12:51:24 -0800 Subject: [PATCH 161/563] Allow keywords to be used in type annotations (#9184) --- packages/babel-parser/src/plugins/flow.js | 4 + .../invalid-export-default-var/options.json | 2 +- .../function-is-valid-type/input.js | 1 + .../function-is-valid-type/output.json | 137 ++++++++++++++++++ scripts/tests/flow/flow_tests_whitelist.txt | 2 - 5 files changed, 143 insertions(+), 3 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/flow/type-annotations/function-is-valid-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/type-annotations/function-is-valid-type/output.json diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 827b02ea21b1..8e190929c686 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -1384,6 +1384,10 @@ export default (superClass: Class): Class => default: if (this.state.type.keyword === "typeof") { return this.flowParseTypeofType(); + } else if (this.state.type.keyword) { + const label = this.state.type.label; + this.next(); + return super.createIdentifier(node, label); } } diff --git a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-default-var/options.json b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-default-var/options.json index 562afcef4837..bdbbf5a8eefd 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-default-var/options.json +++ b/packages/babel-parser/test/fixtures/flow/declare-export/invalid-export-default-var/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:23)" + "throws": "Unexpected token, expected \";\" (1:27)" } diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/function-is-valid-type/input.js b/packages/babel-parser/test/fixtures/flow/type-annotations/function-is-valid-type/input.js new file mode 100644 index 000000000000..0a30a10d7808 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/function-is-valid-type/input.js @@ -0,0 +1 @@ +function foo(a:function) {} diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/function-is-valid-type/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/function-is-valid-type/output.json new file mode 100644 index 000000000000..056dc7de7b00 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/function-is-valid-type/output.json @@ -0,0 +1,137 @@ +{ + "type": "File", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 13, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "a" + }, + "name": "a", + "typeAnnotation": { + "type": "TypeAnnotation", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "typeAnnotation": { + "type": "Identifier", + "start": 15, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "function" + }, + "name": "function" + } + } + } + ], + "body": { + "type": "BlockStatement", + "start": 25, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/scripts/tests/flow/flow_tests_whitelist.txt b/scripts/tests/flow/flow_tests_whitelist.txt index 8d4855ab4082..0b49c7623abf 100644 --- a/scripts/tests/flow/flow_tests_whitelist.txt +++ b/scripts/tests/flow/flow_tests_whitelist.txt @@ -26,7 +26,6 @@ decorators/migrated_0003.js decorators/migrated_0007.js private_class_properties/multiple.js private_class_properties/super.js -types/annotations/migrated_0001.js types/annotations/void_is_reserved_param.js types/member/reserved_words.js types/parameter_defaults/migrated_0032.js @@ -37,4 +36,3 @@ numbers/underscored_float_whole.js numbers/underscored_hex.js numbers/underscored_number.js numbers/underscored_oct.js -types/annotations_in_comments/migrated_0001.js From 52fb88455014ab1c08125dbec3fd6c087740a4be Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Mon, 17 Dec 2018 16:27:56 +0800 Subject: [PATCH 162/563] Strips flow directive fully (#9197) --- packages/babel-plugin-transform-flow-strip-types/src/index.js | 4 ++-- .../test/fixtures/strip-types/strip-comment-noflow/input.js | 2 ++ .../test/fixtures/strip-types/strip-comment-noflow/output.js | 1 + .../fixtures/strip-types/strip-comment-strict-local/input.js | 2 ++ .../fixtures/strip-types/strip-comment-strict-local/output.js | 1 + .../test/fixtures/strip-types/strip-comment-strict/input.js | 2 ++ .../test/fixtures/strip-types/strip-comment-strict/output.js | 1 + .../test/fixtures/strip-types/strip-comment-weak/input.js | 2 ++ .../test/fixtures/strip-types/strip-comment-weak/output.js | 1 + 9 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-noflow/input.js create mode 100644 packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-noflow/output.js create mode 100644 packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict-local/input.js create mode 100644 packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict-local/output.js create mode 100644 packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict/input.js create mode 100644 packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict/output.js create mode 100644 packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-weak/input.js create mode 100644 packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-weak/output.js diff --git a/packages/babel-plugin-transform-flow-strip-types/src/index.js b/packages/babel-plugin-transform-flow-strip-types/src/index.js index 7399d65c9fc8..bf4e5acafff0 100644 --- a/packages/babel-plugin-transform-flow-strip-types/src/index.js +++ b/packages/babel-plugin-transform-flow-strip-types/src/index.js @@ -5,7 +5,7 @@ import { types as t } from "@babel/core"; export default declare(api => { api.assertVersion(7); - const FLOW_DIRECTIVE = "@flow"; + const FLOW_DIRECTIVE = /(@flow(\s+(strict(-local)?|weak))?|@noflow)/; let skipStrip = false; @@ -28,7 +28,7 @@ export default declare(api => { if (comments) { for (const comment of (comments: Array)) { - if (comment.value.indexOf(FLOW_DIRECTIVE) >= 0) { + if (FLOW_DIRECTIVE.test(comment.value)) { directiveFound = true; // remove flow directive diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-noflow/input.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-noflow/input.js new file mode 100644 index 000000000000..5d6ff3552aef --- /dev/null +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-noflow/input.js @@ -0,0 +1,2 @@ +// @noflow +const a = 1; \ No newline at end of file diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-noflow/output.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-noflow/output.js new file mode 100644 index 000000000000..6d3cec7eeef8 --- /dev/null +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-noflow/output.js @@ -0,0 +1 @@ +const a = 1; \ No newline at end of file diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict-local/input.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict-local/input.js new file mode 100644 index 000000000000..02271a151cc6 --- /dev/null +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict-local/input.js @@ -0,0 +1,2 @@ +// @flow strict-local +const a = 1; \ No newline at end of file diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict-local/output.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict-local/output.js new file mode 100644 index 000000000000..6d3cec7eeef8 --- /dev/null +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict-local/output.js @@ -0,0 +1 @@ +const a = 1; \ No newline at end of file diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict/input.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict/input.js new file mode 100644 index 000000000000..08a31836de77 --- /dev/null +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict/input.js @@ -0,0 +1,2 @@ +// @flow strict +const a = 1; \ No newline at end of file diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict/output.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict/output.js new file mode 100644 index 000000000000..6d3cec7eeef8 --- /dev/null +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-strict/output.js @@ -0,0 +1 @@ +const a = 1; \ No newline at end of file diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-weak/input.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-weak/input.js new file mode 100644 index 000000000000..1e784b350772 --- /dev/null +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-weak/input.js @@ -0,0 +1,2 @@ +// @flow weak +const a = 1; \ No newline at end of file diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-weak/output.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-weak/output.js new file mode 100644 index 000000000000..6d3cec7eeef8 --- /dev/null +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-comment-weak/output.js @@ -0,0 +1 @@ +const a = 1; \ No newline at end of file From 116ca22def17b97edf5605e24c8c71b4b9a8a460 Mon Sep 17 00:00:00 2001 From: cphamlet Date: Mon, 17 Dec 2018 21:29:23 -0600 Subject: [PATCH 163/563] Minor typo for -f flag in cli (#9201) --- packages/babel-cli/src/babel/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-cli/src/babel/options.js b/packages/babel-cli/src/babel/options.js index d8a5bd4f3f7e..41cc0fb83e7f 100644 --- a/packages/babel-cli/src/babel/options.js +++ b/packages/babel-cli/src/babel/options.js @@ -22,7 +22,7 @@ commander.option( "comma-separated list of plugin names", collect, ); -commander.option("--config-file [path]", "Path a to .babelrc file to use"); +commander.option("--config-file [path]", "Path to a .babelrc file to use"); commander.option( "--env-name [name]", "The name of the 'env' to use when loading configs and plugins. " + From 911c2d0bf4176e5014c5a5b4c60ba6a68d6956a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 18 Dec 2018 22:59:43 +0100 Subject: [PATCH 164/563] Use @babel/eslint-plugin-developement (#9206) --- .eslintrc.json | 8 +- package.json | 2 +- .../src/index.js | 2 +- .../src/index.js | 2 +- .../src/index.js | 2 +- packages/babel-traverse/src/scope/index.js | 1 + scripts/eslint_rules/no-deprecated-clone.js | 104 ----------- .../eslint_rules/no-undefined-identifier.js | 46 ----- scripts/eslint_rules/plugin-name.js | 62 ------- scripts/eslint_rules/utils/eslint-types.js | 34 ---- .../utils/get-reference-origin.js | 166 ------------------ yarn.lock | 10 +- 12 files changed, 14 insertions(+), 425 deletions(-) delete mode 100644 scripts/eslint_rules/no-deprecated-clone.js delete mode 100644 scripts/eslint_rules/no-undefined-identifier.js delete mode 100644 scripts/eslint_rules/plugin-name.js delete mode 100644 scripts/eslint_rules/utils/eslint-types.js delete mode 100644 scripts/eslint_rules/utils/get-reference-origin.js diff --git a/.eslintrc.json b/.eslintrc.json index 00d48dfc3bb1..749fd66319c4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,7 @@ { "root": true, "extends": "babel", - "plugins": ["local-rules", "prettier"], + "plugins": ["prettier", "@babel/development"], "rules": { "prettier/prettier": "error" }, @@ -12,8 +12,8 @@ { "files": ["packages/*/src/**/*.js", "codemods/*/src/**/*.js"], "rules": { - "local-rules/no-undefined-identifier": "error", - "local-rules/no-deprecated-clone": "error" + "@babel/development/no-undefined-identifier": "error", + "@babel/development/no-deprecated-clone": "error" } }, { @@ -31,7 +31,7 @@ "files": ["packages/babel-plugin-*/src/index.js"], "excludedFiles": ["packages/babel-plugin-transform-regenerator/**/*.js"], "rules": { - "local-rules/plugin-name": "error" + "@babel/development/plugin-name": "error" } } ] diff --git a/package.json b/package.json index 3780b817d4c6..7392bfb91995 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "devDependencies": { "@babel/cli": "^7.2.0", "@babel/core": "^7.2.0", + "@babel/eslint-plugin-development": "^1.0.1", "@babel/plugin-proposal-class-properties": "^7.2.1", "@babel/plugin-proposal-export-namespace-from": "^7.2.0", "@babel/plugin-proposal-numeric-separator": "^7.2.0", @@ -34,7 +35,6 @@ "eslint": "^5.9.0", "eslint-config-babel": "^8.0.2", "eslint-plugin-flowtype": "^3.2.0", - "eslint-plugin-local-rules": "0.1.0", "eslint-plugin-prettier": "^3.0.0", "flow-bin": "^0.87.0", "graceful-fs": "^4.1.11", diff --git a/packages/babel-plugin-proposal-class-properties/src/index.js b/packages/babel-plugin-proposal-class-properties/src/index.js index 8f749fc32764..89c016dbca54 100644 --- a/packages/babel-plugin-proposal-class-properties/src/index.js +++ b/packages/babel-plugin-proposal-class-properties/src/index.js @@ -1,4 +1,4 @@ -/* eslint-disable local-rules/plugin-name */ +/* eslint-disable @babel/development/plugin-name */ import { declare } from "@babel/helper-plugin-utils"; import { diff --git a/packages/babel-plugin-proposal-decorators/src/index.js b/packages/babel-plugin-proposal-decorators/src/index.js index 4d0e05cb57d2..879de5f04703 100644 --- a/packages/babel-plugin-proposal-decorators/src/index.js +++ b/packages/babel-plugin-proposal-decorators/src/index.js @@ -1,4 +1,4 @@ -/* eslint-disable local-rules/plugin-name */ +/* eslint-disable @babel/development/plugin-name */ import { declare } from "@babel/helper-plugin-utils"; import syntaxDecorators from "@babel/plugin-syntax-decorators"; diff --git a/packages/babel-plugin-proposal-private-methods/src/index.js b/packages/babel-plugin-proposal-private-methods/src/index.js index 89357c0692fa..0efbf93682a6 100644 --- a/packages/babel-plugin-proposal-private-methods/src/index.js +++ b/packages/babel-plugin-proposal-private-methods/src/index.js @@ -1,4 +1,4 @@ -/* eslint-disable local-rules/plugin-name */ +/* eslint-disable @babel/development/plugin-name */ import { declare } from "@babel/helper-plugin-utils"; import { diff --git a/packages/babel-traverse/src/scope/index.js b/packages/babel-traverse/src/scope/index.js index b91eeeb25c4b..ed81f0915880 100644 --- a/packages/babel-traverse/src/scope/index.js +++ b/packages/babel-traverse/src/scope/index.js @@ -497,6 +497,7 @@ export default class Scope { if (this.hasBinding("undefined")) { return t.unaryExpression("void", t.numericLiteral(0), true); } else { + // eslint-disable-next-line @babel/development/no-undefined-identifier return t.identifier("undefined"); } } diff --git a/scripts/eslint_rules/no-deprecated-clone.js b/scripts/eslint_rules/no-deprecated-clone.js deleted file mode 100644 index 69c9970260ce..000000000000 --- a/scripts/eslint_rules/no-deprecated-clone.js +++ /dev/null @@ -1,104 +0,0 @@ -// @flow - -"use strict"; - -const getReferenceOrigin = require("./utils/get-reference-origin"); - -function reportError(context /*: Context */, node /*: Node */) { - const isMemberExpression = node.type === "MemberExpression"; - const id = isMemberExpression ? node.property : node; - context.report({ - node: id, - message: `t.${id.name}() is deprecated. Use t.cloneNode() instead.`, - fix(fixer) { - if (isMemberExpression) { - return fixer.replaceText(id, "cloneNode"); - } - }, - }); -} - -module.exports = { - meta: { - schema: [], - fixable: "code", - }, - create(context /*: Context */) { - return { - CallExpression(node /*: Node */) { - const origin = getReferenceOrigin(node.callee, context.getScope()); - - if (!origin) return; - - if ( - origin.kind === "import" && - (origin.name === "clone" || origin.name === "cloneDeep") && - origin.source === "@babel/types" - ) { - // imported from @babel/types - return reportError(context, node.callee); - } - - if ( - origin.kind === "property" && - (origin.path === "clone" || origin.path === "cloneDeep") && - origin.base.kind === "import" && - origin.base.name === "types" && - origin.base.source === "@babel/core" - ) { - // imported from @babel/core - return reportError(context, node.callee); - } - - if ( - origin.kind === "property" && - (origin.path === "types.clone" || - origin.path === "types.cloneDeep") && - origin.base.kind === "export param" && - (origin.base.exportName === "default" || - origin.base.exportName === "module.exports") && - origin.base.index === 0 - ) { - // export default function ({ types: t }) {} - // module.exports = function ({ types: t }) {} - return reportError(context, node.callee); - } - }, - }; - }, -}; - -/*:: // ESLint types - -type Node = { type: string, [string]: any }; - -type Definition = { - type: "ImportedBinding", - name: Node, - node: Node, - parent: Node, -}; - -type Variable = { - defs: Definition[], -}; - -type Scope = { - set: Map, - upper: ?Scope, -}; - -type Context = { - report(options: { - node: Node, - message: string, - fix?: (fixer: Fixer) => ?Fixer, - }): void, - - getScope(): Scope, -}; - -type Fixer = { - replaceText(node: Node, replacement: string): Fixer, -}; -*/ diff --git a/scripts/eslint_rules/no-undefined-identifier.js b/scripts/eslint_rules/no-undefined-identifier.js deleted file mode 100644 index b16e3620ddaa..000000000000 --- a/scripts/eslint_rules/no-undefined-identifier.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -function argumentsIsUndefinedString(argumentsArray) { - return ( - argumentsArray.length === 1 && - argumentsArray[0].type === "Literal" && - argumentsArray[0].value === "undefined" - ); -} - -module.exports = { - meta: { - schema: [], - }, - create: function(context) { - if (context.getFilename().indexOf("packages/babel-plugin-") === -1) { - return {}; - } - - return { - CallExpression: function(node) { - const callee = node.callee; - - if ( - callee.type === "MemberExpression" && - argumentsIsUndefinedString(node.arguments) - ) { - const object = callee.object, - property = callee.property; - - if ( - object.type === "Identifier" && - object.name === "t" && - property.type === "Identifier" && - property.name === "identifier" - ) { - context.report( - node, - "Use path.scope.buildUndefinedNode() to create an undefined identifier directly." - ); - } - } - }, - }; - }, -}; diff --git a/scripts/eslint_rules/plugin-name.js b/scripts/eslint_rules/plugin-name.js deleted file mode 100644 index 52465824f090..000000000000 --- a/scripts/eslint_rules/plugin-name.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; - -const getReferenceOrigin = require("./utils/get-reference-origin"); - -function reportNoPlugin(context /*: Context */, node /*: Node */) { - context.report({ - node, - message: "This file does not export a Babel plugin", - }); -} - -function is(type /*: string */) /*: (node: Node) => boolean */ { - return node => node.type === type; -} - -module.exports = { - meta: { - schema: [], - }, - create(context /*: Context */) { - return { - Program(program /*: Node */) { - if (!program.body.some(is("ExportDefaultDeclaration"))) { - return reportNoPlugin(context, program); - } - }, - ExportDefaultDeclaration(exportDefaultDecl) { - let plugin = exportDefaultDecl.declaration; - - if (plugin.type === "CallExpression") { - // export default declare(api => { ... }); - const origin = getReferenceOrigin(plugin.callee, context.getScope()); - - if ( - origin && - origin.kind === "import" && - origin.name === "declare" && - origin.source === "@babel/helper-plugin-utils" - ) { - plugin = plugin.arguments[0]; - } - } - - if (!plugin.type.includes("Function")) { - return reportNoPlugin(context, exportDefaultDecl.parent); - } - - const returnNode = plugin.body.body.find(is("ReturnStatement")); - if (!returnNode || returnNode.argument.type !== "ObjectExpression") { - return reportNoPlugin(context, exportDefaultDecl.parent); - } - - if (!returnNode.argument.properties.some(p => p.key.name === "name")) { - context.report( - returnNode, - "This Babel plugin doesn't have a 'name' property." - ); - } - }, - }; - }, -}; diff --git a/scripts/eslint_rules/utils/eslint-types.js b/scripts/eslint_rules/utils/eslint-types.js deleted file mode 100644 index 6a0545d24c12..000000000000 --- a/scripts/eslint_rules/utils/eslint-types.js +++ /dev/null @@ -1,34 +0,0 @@ -/*:: // ESLint types - -type Node = { type: string, [string]: any }; - -type Definition = { - type: "ImportedBinding", - name: Node, - node: Node, - parent: Node, -}; - -type Variable = { - defs: Definition[], -}; - -type Scope = { - set: Map, - upper: ?Scope, -}; - -type Context = { - report(options: { - node: Node, - message: string, - fix?: (fixer: Fixer) => ?Fixer, - }): void, - - getScope(): Scope, -}; - -type Fixer = { - replaceText(node: Node, replacement: string): Fixer, -}; -*/ diff --git a/scripts/eslint_rules/utils/get-reference-origin.js b/scripts/eslint_rules/utils/get-reference-origin.js deleted file mode 100644 index 6608ddf1cdfa..000000000000 --- a/scripts/eslint_rules/utils/get-reference-origin.js +++ /dev/null @@ -1,166 +0,0 @@ -"use strict"; - -module.exports = getReferenceOrigin; - -/*:: -type ReferenceOriginImport = { kind: "import", source: string, name: string }; -type ReferenceOriginParam = { - kind: "export param", - exportName: string, - index: number, -}; - -type ReferenceOrigin = - | ReferenceOriginImport - | ReferenceOriginParam - | { kind: "import *", source: string } - | { - kind: "property", - base: ReferenceOriginImport | ReferenceOriginParam, - path: string, - }; -*/ - -// Given a node and a context, returns a description of where its value comes -// from. -// It resolves imports, parameters of exported functions and property accesses. -// See the ReferenceOrigin type for more informations. -function getReferenceOrigin( - node /*: Node */, - scope /*: Scope */ -) /*: ?ReferenceOrigin */ { - if (node.type === "Identifier") { - const variable = getVariableDefinition(node.name, scope); - if (!variable) return null; - - const definition = variable.definition; - const defNode = definition.node; - - if (definition.type === "ImportBinding") { - if (defNode.type === "ImportSpecifier") { - return { - kind: "import", - source: definition.parent.source.value, - name: defNode.imported.name, - }; - } - if (defNode.type === "ImportNamespaceSpecifier") { - return { - kind: "import *", - source: definition.parent.source.value, - }; - } - } - - if (definition.type === "Variable" && defNode.init) { - const origin = getReferenceOrigin(defNode.init, variable.scope); - return origin && patternToProperty(definition.name, origin); - } - - if (definition.type === "Parameter") { - const parent = defNode.parent; - let exportName /*: string */; - if (parent.type === "ExportDefaultDeclaration") { - exportName = "default"; - } else if (parent.type === "ExportNamedDeclaration") { - exportName = defNode.id.name; - } else if ( - parent.type === "AssignmentExpression" && - parent.left.type === "MemberExpression" && - parent.left.object.type === "Identifier" && - parent.left.object.name === "module" && - parent.left.property.type === "Identifier" && - parent.left.property.name === "exports" - ) { - exportName = "module.exports"; - } else { - return null; - } - return patternToProperty(definition.name, { - kind: "export param", - exportName, - index: definition.index, - }); - } - } - - if (node.type === "MemberExpression" && !node.computed) { - const origin = getReferenceOrigin(node.object, scope); - return origin && addProperty(origin, node.property.name); - } - - return null; -} - -function getVariableDefinition(name /*: string */, scope /*: Scope */) { - let currentScope = scope; - do { - const variable = currentScope.set.get(name); - if (variable && variable.defs[0]) { - return { scope: currentScope, definition: variable.defs[0] }; - } - } while ((currentScope = currentScope.upper)); -} - -function patternToProperty( - id /*: Node */, - base /*: ReferenceOrigin */ -) /*: ?ReferenceOrigin */ { - const path = getPatternPath(id); - return path && path.reduce(addProperty, base); -} - -// Adds a property to a given origin. If it was a namespace import it becomes -// a named import, so that `import * as x from "foo"; x.bar` and -// `import { bar } from "foo"` have the same origin. -function addProperty( - origin /*: ReferenceOrigin */, - name /*: string */ -) /* ReferenceOrigin */ { - if (origin.kind === "import *") { - return { - kind: "import", - source: origin.source, - name, - }; - } - if (origin.kind === "property") { - return { - kind: "property", - base: origin.base, - path: origin.path + "." + name, - }; - } - return { - kind: "property", - base: origin, - path: name, - }; -} - -// if "node" is c of { a: { b: c } }, the result is ["a","b"] -function getPatternPath(node /*: Node */) /*: ?string[] */ { - let current = node; - const path = []; - - // Unshift keys to path while going up - do { - const property = current.parent; - if ( - property.type === "ArrayPattern" || - property.type === "AssignmentPattern" || - property.computed - ) { - // These nodes are not supported. - return null; - } - if (property.type === "Property") { - path.unshift(property.key.name); - } else { - // The destructuring pattern is finished - break; - } - } while ((current = current.parent.parent)); - - return path; -} diff --git a/yarn.lock b/yarn.lock index 2d849cc6c9ba..c2d92ab8561f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -53,6 +53,11 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/eslint-plugin-development@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@babel/eslint-plugin-development/-/eslint-plugin-development-1.0.1.tgz#1f5206ae95795db09b65e7dbc2b158d66497a44c" + integrity sha512-ioEhN8HgKr4Yx8ef+XryNpKN4FimSFceb0qVVxvoUzpFn3xyq17MlY5AquEqtXObE7Nu7WKq7QL9INzjCrugyw== + "@babel/generator@7.0.0-beta.40": version "7.0.0-beta.40" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.40.tgz#ab61f9556f4f71dbd1138949c795bb9a21e302ea" @@ -3533,11 +3538,6 @@ eslint-plugin-flowtype@^3.2.0: dependencies: lodash "^4.17.10" -eslint-plugin-local-rules@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-local-rules/-/eslint-plugin-local-rules-0.1.0.tgz#6808bb4c1b9a432f6e54ff4dfb290073e1cdf700" - integrity sha1-aAi7TBuaQy9uVP9N+ykAc+HN9wA= - eslint-plugin-prettier@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.0.tgz#f6b823e065f8c36529918cdb766d7a0e975ec30c" From 9e95da4eaa85bbd91f0eee020acb4922a6cab133 Mon Sep 17 00:00:00 2001 From: Cameron Martin Date: Wed, 19 Dec 2018 09:57:27 +0000 Subject: [PATCH 165/563] Added type-level mapping between aliases and nodes that have that alias. (#9110) --- scripts/generators/typescript.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/generators/typescript.js b/scripts/generators/typescript.js index ae93bee0b205..5b4ea4fe3e80 100644 --- a/scripts/generators/typescript.js +++ b/scripts/generators/typescript.js @@ -160,6 +160,13 @@ for (const type in t.FLIPPED_ALIAS_KEYS) { .map(type => `${type}`) .join(" | ")};\n`; } +code += "\n"; + +code += "export interface Aliases {\n"; +for (const type in t.FLIPPED_ALIAS_KEYS) { + code += ` ${type}: ${type};\n`; +} +code += "}\n\n"; code += lines.join("\n") + "\n"; From 57759cb1a1a72ddf1f89adc1cad257d0e6616fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 20 Dec 2018 11:43:40 +0100 Subject: [PATCH 166/563] [lerna] Don't ignore .json data files in preset-env (#9200) --- lerna.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerna.json b/lerna.json index a2cd2fab7547..ab630ea7f2a5 100644 --- a/lerna.json +++ b/lerna.json @@ -18,11 +18,11 @@ "publish": { "ignore": [ "*.md", - "*.json", "*.txt", "test/**", "codemods/**", - "package.json" + "# We ignore every JSON file, except for built-in-modules, built-ins and plugins defined in babel-preset-env/data.", + "@(!(built-in-modules|built-ins|plugins)).json" ] } }, From d35f2ad92b322c3bb9c6792e2683807afae0b105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 18 Dec 2018 15:38:35 +0100 Subject: [PATCH 167/563] Update lerna to v3.6.0 Use forked @lerna/collect-updates to prevent publishing of dependents: this is the same as Lerna 2's --dangerously-only-publish-explicit-etc option. --- Makefile | 3 +- lerna.json | 5 +- package.json | 5 +- yarn.lock | 2316 ++++++++++++++++++++++++++++++++++++++++---------- 4 files changed, 1872 insertions(+), 457 deletions(-) diff --git a/Makefile b/Makefile index d8a41578855c..caeb4c8e8c63 100644 --- a/Makefile +++ b/Makefile @@ -130,8 +130,7 @@ prepublish: make test publish: prepublish - # --only-explicit-updates - ./node_modules/.bin/lerna publish --force-publish="@babel/runtime,@babel/runtime-corejs2" --dangerously-only-publish-explicit-updates-this-is-a-custom-flag-for-babel-and-you-should-not-be-using-it-just-deal-with-more-packages-being-published-it-is-not-a-big-deal + ./node_modules/.bin/lerna publish --force-publish="@babel/runtime,@babel/runtime-corejs2,@babel/standalone,@babel/preset-env-standalone" make clean bootstrap: clean-all diff --git a/lerna.json b/lerna.json index ab630ea7f2a5..76d7779c18b9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,4 @@ { - "lerna": "2.11.0", "version": "7.2.2", "changelog": { "repo": "babel/babel", @@ -14,9 +13,9 @@ "PR: Internal :house:": ":house: Internal" } }, - "commands": { + "command": { "publish": { - "ignore": [ + "ignoreChanges": [ "*.md", "*.txt", "test/**", diff --git a/package.json b/package.json index 7392bfb91995..38c26734da47 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "gulp-watch": "^5.0.1", "husky": "^1.2.0", "jest": "^23.6.0", - "lerna": "^2.11.0", + "lerna": "^3.6.0", "lerna-changelog": "^0.5.0", "lint-staged": "^8.1.0", "lodash": "^4.17.10", @@ -69,6 +69,9 @@ "webpack-dependency-suite": "^2.4.4", "webpack-stream": "^4.0.0" }, + "resolutions": { + "@lerna/**/@lerna/collect-updates": "https://github.com/nicolo-ribaudo/lerna.git#babel-collect-updates" + }, "engines": { "node": ">= 6.9.0 < 12.0.0", "npm": ">= 3.x <= 6.x", diff --git a/yarn.lock b/yarn.lock index c2d92ab8561f..be19b098668e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -941,6 +941,578 @@ log-update "^2.3.0" strip-ansi "^3.0.1" +"@lerna/add@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.6.0.tgz#eea53efff0b3237774ddac6eaa84957140e89238" + integrity sha512-aFVekkHMno3hj1Vg3EiIpAwrZ4g34i8z4KrCx7ATY6BRuxVT4Nt/Nk3l2k6gEOq3tWUDtUctLHxIAo14FI8sng== + dependencies: + "@lerna/bootstrap" "^3.6.0" + "@lerna/command" "^3.6.0" + "@lerna/filter-options" "^3.6.0" + "@lerna/npm-conf" "^3.4.1" + "@lerna/validation-error" "^3.6.0" + dedent "^0.7.0" + libnpm "^2.0.1" + p-map "^1.2.0" + semver "^5.5.0" + +"@lerna/batch-packages@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/batch-packages/-/batch-packages-3.6.0.tgz#66cf3ce914bbd0532071c58d5f0c913315054158" + integrity sha512-khG15B+EFLH3Oms6A6WsMAy54DrnKIhEAm6CCATN2BKnBkNgitYjLN2vKBzlR2LfQpTkgub67QKIJkMFQcK1Sg== + dependencies: + "@lerna/package-graph" "^3.6.0" + "@lerna/validation-error" "^3.6.0" + libnpm "^2.0.1" + +"@lerna/bootstrap@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.6.0.tgz#a47cd484ad60638d518a606d627b9997d5f7c960" + integrity sha512-z6rZQw/aLEN+ragWRYqIIVwA9rDv3QtmRc5VyIRrlV/JiuGpq67FcSR6BrCMc/A7UJ9Kx95+bESm/HUwheKoiQ== + dependencies: + "@lerna/batch-packages" "^3.6.0" + "@lerna/command" "^3.6.0" + "@lerna/filter-options" "^3.6.0" + "@lerna/has-npm-version" "^3.3.0" + "@lerna/npm-conf" "^3.4.1" + "@lerna/npm-install" "^3.6.0" + "@lerna/package-graph" "^3.6.0" + "@lerna/rimraf-dir" "^3.6.0" + "@lerna/run-lifecycle" "^3.6.0" + "@lerna/run-parallel-batches" "^3.0.0" + "@lerna/symlink-binary" "^3.6.0" + "@lerna/symlink-dependencies" "^3.6.0" + "@lerna/validation-error" "^3.6.0" + dedent "^0.7.0" + get-port "^3.2.0" + libnpm "^2.0.1" + multimatch "^2.1.0" + p-finally "^1.0.0" + p-map "^1.2.0" + p-map-series "^1.0.0" + p-waterfall "^1.0.0" + read-package-tree "^5.1.6" + semver "^5.5.0" + +"@lerna/changed@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.6.0.tgz#a6c97b9c4829d294a1d8e8a7140667bc89c996e2" + integrity sha512-L1SXTtQrsv+4F5Knw5sW/nGnMJq+bbOzhZX2srJ10WsuHuzk3cJWAi7dVEsS3RPKUw9DWOuHKy86o3v6byEiqA== + dependencies: + "@lerna/collect-updates" "^3.6.0" + "@lerna/command" "^3.6.0" + "@lerna/listable" "^3.6.0" + "@lerna/output" "^3.6.0" + "@lerna/version" "^3.6.0" + +"@lerna/check-working-tree@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.6.0.tgz#638ee7f5976fe607d544629b1ef4ae67887984b5" + integrity sha512-Ioy1t2aVasAwhY1Oi5kfpwbW9RDupxxVVu2t2c1EeBYYCu3jIt1A5ad34gidgsKyiG3HeBEVziI4Uaihnb96ZQ== + dependencies: + "@lerna/describe-ref" "^3.6.0" + "@lerna/validation-error" "^3.6.0" + +"@lerna/child-process@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-3.3.0.tgz#71184a763105b6c8ece27f43f166498d90fe680f" + integrity sha512-q2d/OPlNX/cBXB6Iz1932RFzOmOHq6ZzPjqebkINNaTojHWuuRpvJJY4Uz3NGpJ3kEtPDvBemkZqUBTSO5wb1g== + dependencies: + chalk "^2.3.1" + execa "^1.0.0" + strong-log-transformer "^2.0.0" + +"@lerna/clean@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.6.0.tgz#9a9d73324389cba694b19a913229c19d58e62485" + integrity sha512-4LodI/jh8IEYtqnrY/OFSpWn5YfDWoDv+5QjiJpd91EjW9vjmkvyhzQ5fG9KtltwgYVn/NJ5zlI1WfmMEXvFFQ== + dependencies: + "@lerna/command" "^3.6.0" + "@lerna/filter-options" "^3.6.0" + "@lerna/prompt" "^3.6.0" + "@lerna/rimraf-dir" "^3.6.0" + p-map "^1.2.0" + p-map-series "^1.0.0" + p-waterfall "^1.0.0" + +"@lerna/cli@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-3.6.0.tgz#f86c16a095bd5506e927b9385ddefb13c605b1df" + integrity sha512-FGCx7XOLpqmU5eFOlo0Lt0hRZraxSUTEWM0bce0p+HNpOxBc91o6d2tenW1azPYFP9HzsMQey1NBtU0ofJJeog== + dependencies: + "@lerna/global-options" "^3.1.3" + dedent "^0.7.0" + libnpm "^2.0.1" + yargs "^12.0.1" + +"@lerna/collect-updates@^3.6.0", "@lerna/collect-updates@https://github.com/nicolo-ribaudo/lerna.git#babel-collect-updates": + version "3.6.0" + resolved "https://github.com/nicolo-ribaudo/lerna.git#49861d37095db2ba9dfb4e0e23457c9913a1b87f" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/describe-ref" "^3.6.0" + libnpm "^2.0.1" + minimatch "^3.0.4" + slash "^1.0.0" + +"@lerna/command@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.6.0.tgz#b3289d1f72d2bebb7375d424b1778121a3d4e82c" + integrity sha512-BGpXaY2WrxPcIiZX0aATO2HQBatvYT7Qy46lqMnV9RrTePYJ1PPbX1nMzLXSxgrnnlTcTwJNEkw/TL9Xzrph7Q== + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/package-graph" "^3.6.0" + "@lerna/project" "^3.6.0" + "@lerna/validation-error" "^3.6.0" + "@lerna/write-log-file" "^3.6.0" + dedent "^0.7.0" + execa "^1.0.0" + is-ci "^1.0.10" + libnpm "^2.0.1" + lodash "^4.17.5" + +"@lerna/conventional-commits@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-3.6.0.tgz#b44edb60e23453d8b15dcd1accf28c421581a8c5" + integrity sha512-KkY3wd7w/tj76EEIhTMYZlSBk/5WkT2NA9Gr/EuSwKV70PYyVA55l1OGlikBUAnuqIjwyfw9x3y+OcbYI4aNEg== + dependencies: + "@lerna/validation-error" "^3.6.0" + conventional-changelog-angular "^5.0.2" + conventional-changelog-core "^3.1.5" + conventional-recommended-bump "^4.0.4" + fs-extra "^7.0.0" + get-stream "^4.0.0" + libnpm "^2.0.1" + semver "^5.5.0" + +"@lerna/create-symlink@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-3.6.0.tgz#f1815cde2fc9d8d2315dfea44ee880f2f1bc65f1" + integrity sha512-YG3lTb6zylvmGqKU+QYA3ylSnoLn+FyLH5XZmUsD0i85R884+EyJJeHx/zUk+yrL2ZwHS4RBUgJfC24fqzgPoA== + dependencies: + cmd-shim "^2.0.2" + fs-extra "^7.0.0" + libnpm "^2.0.1" + +"@lerna/create@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.6.0.tgz#4540c9ee69f63d11b3138eb5eac1942348643af1" + integrity sha512-21OunW25Y3Q/oynqWVk0znQFBvZ5tHyLPhzkJeomGmOj0il1RdOUiChu9G9AYsCaLDwBFR0ZFqvTgJ5iw/eaIg== + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.6.0" + "@lerna/npm-conf" "^3.4.1" + "@lerna/validation-error" "^3.6.0" + camelcase "^4.1.0" + dedent "^0.7.0" + fs-extra "^7.0.0" + globby "^8.0.1" + init-package-json "^1.10.3" + libnpm "^2.0.1" + p-reduce "^1.0.0" + pify "^3.0.0" + semver "^5.5.0" + slash "^1.0.0" + validate-npm-package-license "^3.0.3" + validate-npm-package-name "^3.0.0" + whatwg-url "^7.0.0" + +"@lerna/describe-ref@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.6.0.tgz#29eda334c81cd4c0a2942f309936bcb69a4543a0" + integrity sha512-hVZJ2hYVbrrNiEG+dEg/Op4pYAbROkDZdiIUabAJffr0T/frcN+5es2HfmOC//4+78Cs1M9iTyQRoyC1RXS2BQ== + dependencies: + "@lerna/child-process" "^3.3.0" + libnpm "^2.0.1" + +"@lerna/diff@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.6.0.tgz#ea8a77e712daf951c05316c81fe4065bf6b5e22c" + integrity sha512-p5+VyYKuAnw6NFVrT4s9eBubFZEYlJmiR1mdVlwNtohqS86gERjrPtI0unUK/pxFKb1U2ZNo4fhSlPd+pLwfHg== + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.6.0" + "@lerna/validation-error" "^3.6.0" + libnpm "^2.0.1" + +"@lerna/exec@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.6.0.tgz#757e96e890e436a31efc59dc72c5a7c2944d1a44" + integrity sha512-lwLYASpS8FoQpVYLBpoZlS7bpzkO9pD3D9XeDDKZBodDhdZeCEx2Md2CxZU1RKYDSVIXA8oObvlUh1FEhRQv2w== + dependencies: + "@lerna/batch-packages" "^3.6.0" + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.6.0" + "@lerna/filter-options" "^3.6.0" + "@lerna/run-parallel-batches" "^3.0.0" + "@lerna/validation-error" "^3.6.0" + +"@lerna/filter-options@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.6.0.tgz#8100a3f2e18a9772a61138711e1fe1f14969f814" + integrity sha512-6iUMZuvvXPL5EAF7Zo9azaZ6FxOq6tGbiSX8fUXgCdN+jlRjorvkzR+E0HS4bEGTWmV446lnLwdQLZuySfLcbQ== + dependencies: + "@lerna/collect-updates" "^3.6.0" + "@lerna/filter-packages" "^3.6.0" + dedent "^0.7.0" + +"@lerna/filter-packages@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-3.6.0.tgz#4cad0bd5b32974b546b845283ac870d62ea4646a" + integrity sha512-O/nIENV3LOqp/TiUIw3Ir6L/wUGFDeYBdJsJTQDlTAyHZsgYA1OIn9FvlW8nqBu1bNLzoBVHXh3c5azx1kE+Hg== + dependencies: + "@lerna/validation-error" "^3.6.0" + libnpm "^2.0.1" + multimatch "^2.1.0" + +"@lerna/get-npm-exec-opts@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.6.0.tgz#ea595eb28d1f34ba61a92ee8391f374282b4b76e" + integrity sha512-ruH6KuLlt75aCObXfUIdVJqmfVq7sgWGq5mXa05vc1MEqxTIiU23YiJdWzofQOOUOACaZkzZ4K4Nu7wXEg4Xgg== + dependencies: + libnpm "^2.0.1" + +"@lerna/global-options@^3.1.3": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-3.1.3.tgz#cf85e24655a91d04d4efc9a80c1f83fc768d08ae" + integrity sha512-LVeZU/Zgc0XkHdGMRYn+EmHfDmmYNwYRv3ta59iCVFXLVp7FRFWF7oB1ss/WRa9x/pYU0o6L8as/5DomLUGASA== + +"@lerna/has-npm-version@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-3.3.0.tgz#8a73c2c437a0e1e68a19ccbd0dd3c014d4d39135" + integrity sha512-GX7omRep1eBRZHgjZLRw3MpBJSdA5gPZFz95P7rxhpvsiG384Tdrr/cKFMhm0A09yq27Tk/nuYTaZIj7HsVE6g== + dependencies: + "@lerna/child-process" "^3.3.0" + semver "^5.5.0" + +"@lerna/import@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.6.0.tgz#84ef5eea61ab9a284054be32367906d092aadab5" + integrity sha512-8jxNRbAaa4mvMJr0u+sy75gMFPyWfxLHEp+pDs73x1oqMZhpS8O5901QMnpZyRyOvJRhoBJd5hBX2dpsLxC6Xw== + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.6.0" + "@lerna/prompt" "^3.6.0" + "@lerna/validation-error" "^3.6.0" + dedent "^0.7.0" + fs-extra "^7.0.0" + p-map-series "^1.0.0" + +"@lerna/init@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.6.0.tgz#6e23c3db632b713e23250d33519ed844a79a145e" + integrity sha512-MTLy3rmMdvpXRmDdoYiVPx7I8sXH4dquq/0MxntL5VxSVh/ZS1HsbrjyRqpdkUKWD9QguxR/w0pzOjVvCeM8CQ== + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.6.0" + fs-extra "^7.0.0" + p-map "^1.2.0" + write-json-file "^2.3.0" + +"@lerna/link@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.6.0.tgz#490f14216b489fd66d9d3d3d0765f75dbbf52178" + integrity sha512-Xk8TTAE4EWGyhxLuPxWdyS7i7vfsM5igb6tEyhZm94XUdlA4PmMOYe25BfO7SM/9LYroFknZeDyWAebye3r+PA== + dependencies: + "@lerna/command" "^3.6.0" + "@lerna/package-graph" "^3.6.0" + "@lerna/symlink-dependencies" "^3.6.0" + p-map "^1.2.0" + slash "^1.0.0" + +"@lerna/list@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.6.0.tgz#18ae4b1e375ef1329261c9d21be27098ca0edf63" + integrity sha512-hlQOJkg8K3XXUVXotofP71XsgkhXkkmU/EkqlNg15D78MjzhT+p1wCbG5m89K3tzvjcWVeZwU6L0elaOIXVyCw== + dependencies: + "@lerna/command" "^3.6.0" + "@lerna/filter-options" "^3.6.0" + "@lerna/listable" "^3.6.0" + "@lerna/output" "^3.6.0" + +"@lerna/listable@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-3.6.0.tgz#25c9cc062ae0d3e78c53da30cdf9f011696ae48f" + integrity sha512-fz63+zlqrJ9KQxIiv0r7qtufM4DEinSayAuO8YJuooz+1ctIP7RvMEQNvYI/E9tDlUo9Q0de68b5HbKrpmA5rQ== + dependencies: + "@lerna/batch-packages" "^3.6.0" + chalk "^2.3.1" + columnify "^1.5.4" + +"@lerna/log-packed@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-3.6.0.tgz#bed96c2bdd47f076d9957d0c6069b2edc1518145" + integrity sha512-T/J41zMkzpWB5nbiTRS5PmYTFn74mJXe6RQA2qhkdLi0UqnTp97Pux1loz3jsJf2yJtiQUnyMM7KuKIAge0Vlw== + dependencies: + byte-size "^4.0.3" + columnify "^1.5.4" + has-unicode "^2.0.1" + libnpm "^2.0.1" + +"@lerna/npm-conf@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-3.4.1.tgz#859e931b0bc9a5eed86309cc09508810c1e7d121" + integrity sha512-i9G6DnbCqiAqxKx2rSXej/n14qxlV/XOebL6QZonxJKzNTB+Q2wglnhTXmfZXTPJfoqimLaY4NfAEtbOXRWOXQ== + dependencies: + config-chain "^1.1.11" + pify "^3.0.0" + +"@lerna/npm-dist-tag@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-3.6.0.tgz#8f8c8567810bd9ee1c1277a71b57cec1acc101f4" + integrity sha512-qX6IfQPX9Tum1LRjvjgj/yr2FYbc9dfHyeh7RI9zJ8pGncWbksBmnMcvoxF0Eu4+d7MjjIGfEnIp9LIl4MHSIA== + dependencies: + libnpm "^2.0.1" + npm-registry-fetch "^3.8.0" + +"@lerna/npm-install@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.6.0.tgz#314fc0d0c35429e2b5db1e7de87b3ddb1ab77606" + integrity sha512-RKV31VdrBZKjmKfq25JG4mIHJ8NAOsLKq/aYSaBs8zP+uwXH7RU39saVfv9ReKiAzhKE2ghOG2JeMdIHtYnPNA== + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/get-npm-exec-opts" "^3.6.0" + fs-extra "^7.0.0" + libnpm "^2.0.1" + signal-exit "^3.0.2" + write-pkg "^3.1.0" + +"@lerna/npm-publish@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.6.0.tgz#8981a9744779c55955a8c4249fe6b44a0485f9d3" + integrity sha512-k4yF8ursajoGRlJeRh7xdeGN0HV/ALt5qImUnpTliux0213jqxA0YigiD8WSaXpvSqxSFyvh38DbJhhy9q+NuQ== + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/get-npm-exec-opts" "^3.6.0" + "@lerna/has-npm-version" "^3.3.0" + "@lerna/log-packed" "^3.6.0" + fs-extra "^7.0.0" + libnpm "^2.0.1" + p-map "^1.2.0" + +"@lerna/npm-run-script@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-3.6.0.tgz#4b97e6f571ae9fdabed21d5d4fc35a2b7e9d5267" + integrity sha512-6DRNFma30ex9r1a8mMDXziSRHf1/mo//hnvW1Zc1ctBh+7PU4I8n3A2ht/+742vtoTQH93Iqs3QSJl2KOLSsYg== + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/get-npm-exec-opts" "^3.6.0" + libnpm "^2.0.1" + +"@lerna/output@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/output/-/output-3.6.0.tgz#a69384bc685cf3b21aa1bfc697eb2b9db3333d0b" + integrity sha512-9sjQouf6p7VQtVCRnzoTGlZyURd48i3ha3WBHC/UBJnHZFuXMqWVPKNuvnMf2kRXDyoQD+2mNywpmEJg5jOnRg== + dependencies: + libnpm "^2.0.1" + +"@lerna/package-graph@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.6.0.tgz#d13e6e80d30e2e29226d335412997b9ddf646305" + integrity sha512-Xtldh3DTiC3cPDrs6OY5URiuRXGPMIN6uFKcx59rOu3TkqYRt346jRyX+hm85996Y/pboo3+JuQlonvuEP/9QQ== + dependencies: + "@lerna/validation-error" "^3.6.0" + libnpm "^2.0.1" + semver "^5.5.0" + +"@lerna/package@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.6.0.tgz#1095b91d277820b7ae8a2cfeeb73d57c6cd9b17e" + integrity sha512-XbXcjwPKA1V640mqjEicpBriO6QcNtocdfLAtEUP4uCKkRx5r9h7DdznQMCoSJYJF6Gh/PpLokPUItfMhJP3Hg== + dependencies: + libnpm "^2.0.1" + write-pkg "^3.1.0" + +"@lerna/project@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.6.0.tgz#b5dd2b94fae6f58478be1c53962c2570498867ab" + integrity sha512-pEOZF1igGFqs+qWog6cJWqVyBUX21xSqrlcgeN0yzqzI36VMHozmf/u7dgclIb5MylWk5Yp87KCKswBF4hrcuQ== + dependencies: + "@lerna/package" "^3.6.0" + "@lerna/validation-error" "^3.6.0" + cosmiconfig "^5.0.2" + dedent "^0.7.0" + dot-prop "^4.2.0" + glob-parent "^3.1.0" + globby "^8.0.1" + libnpm "^2.0.1" + load-json-file "^4.0.0" + p-map "^1.2.0" + resolve-from "^4.0.0" + write-json-file "^2.3.0" + +"@lerna/prompt@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-3.6.0.tgz#b17cc464dec9d830619723e879dc747367378217" + integrity sha512-nyAjPMolJ/ZRAAVcXrUH89C4n1SiWvLh4xWNvWYKLcf3PI5yges35sDFP/HYrM4+cEbkNFuJCRq6CxaET4PRsg== + dependencies: + inquirer "^6.2.0" + libnpm "^2.0.1" + +"@lerna/publish@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.6.0.tgz#7985b8c549c83114180e99a9e291e8b82db57aac" + integrity sha512-F2bT96ZS7NJfid6T4a6TSanpVUQ4VOuhjPBPX2hagt5gnocm7lluvAFR7dl/cbEgmKIg2zJQnfAPTYjrtxXMVg== + dependencies: + "@lerna/batch-packages" "^3.6.0" + "@lerna/check-working-tree" "^3.6.0" + "@lerna/child-process" "^3.3.0" + "@lerna/collect-updates" "^3.6.0" + "@lerna/command" "^3.6.0" + "@lerna/describe-ref" "^3.6.0" + "@lerna/get-npm-exec-opts" "^3.6.0" + "@lerna/npm-conf" "^3.4.1" + "@lerna/npm-dist-tag" "^3.6.0" + "@lerna/npm-publish" "^3.6.0" + "@lerna/output" "^3.6.0" + "@lerna/prompt" "^3.6.0" + "@lerna/run-lifecycle" "^3.6.0" + "@lerna/run-parallel-batches" "^3.0.0" + "@lerna/validation-error" "^3.6.0" + "@lerna/version" "^3.6.0" + fs-extra "^7.0.0" + libnpm "^2.0.1" + npm-registry-fetch "^3.8.0" + p-finally "^1.0.0" + p-map "^1.2.0" + p-pipe "^1.2.0" + p-reduce "^1.0.0" + semver "^5.5.0" + +"@lerna/resolve-symlink@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-3.6.0.tgz#985344796b704ff32afa923901e795e80741b86e" + integrity sha512-TVOAEqHJSQVhNDMFCwEUZPaOETqHDQV1TQWQfC8ZlOqyaUQ7veZUbg0yfG7RPNzlSpvF0ZaGFeR0YhYDAW03GA== + dependencies: + fs-extra "^7.0.0" + libnpm "^2.0.1" + read-cmd-shim "^1.0.1" + +"@lerna/rimraf-dir@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-3.6.0.tgz#a02c4ad14d9a65c005021da79d545702b7085a74" + integrity sha512-2CfyWP1lqxDET+SfwGlLUfgqGF4vz9TYDrmb7Zi//g7IFCo899uU2vWOrEcdWTgbKE3Qgwwfk9c008w5MWUhog== + dependencies: + "@lerna/child-process" "^3.3.0" + libnpm "^2.0.1" + path-exists "^3.0.0" + rimraf "^2.6.2" + +"@lerna/run-lifecycle@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.6.0.tgz#2381fd827b4a4135613e7d73d25ae76b7af5e6ef" + integrity sha512-/1+vAZnckgKwHVgWG0plVO24erNWUduz9htMOO9wuOfglTnHlMRqDc3s9B/OIKxGDkyzEvxqzfzq3c6JqEolRQ== + dependencies: + "@lerna/npm-conf" "^3.4.1" + libnpm "^2.0.1" + +"@lerna/run-parallel-batches@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/run-parallel-batches/-/run-parallel-batches-3.0.0.tgz#468704934084c74991d3124d80607857d4dfa840" + integrity sha512-Mj1ravlXF7AkkewKd9YFq9BtVrsStNrvVLedD/b2wIVbNqcxp8lS68vehXVOzoL/VWNEDotvqCQtyDBilCodGw== + dependencies: + p-map "^1.2.0" + p-map-series "^1.0.0" + +"@lerna/run@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.6.0.tgz#f545fcde889d7a1433b3f2cc444eeec39713ea62" + integrity sha512-OYa5pQTOiES/h9rg8vwnt0nYU/wLKUQmFYhMUxdX3lXYpoIcQ28PR7qPG1CVhex4KAU2OW42a7vnm5MAOoScDg== + dependencies: + "@lerna/batch-packages" "^3.6.0" + "@lerna/command" "^3.6.0" + "@lerna/filter-options" "^3.6.0" + "@lerna/npm-run-script" "^3.6.0" + "@lerna/output" "^3.6.0" + "@lerna/run-parallel-batches" "^3.0.0" + "@lerna/timer" "^3.5.0" + "@lerna/validation-error" "^3.6.0" + p-map "^1.2.0" + +"@lerna/symlink-binary@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.6.0.tgz#935a5b98908578da7f9eed20818899f728b9f3d9" + integrity sha512-h69AQBBWgZOEzQ1RJEYQ7Ou6llrJNhNNkpqT6k8qSWZ93iXyFmLE4hWoxMXXHFmxmQ0CqjEYKmeLV1Dr5DKT4g== + dependencies: + "@lerna/create-symlink" "^3.6.0" + "@lerna/package" "^3.6.0" + fs-extra "^7.0.0" + p-map "^1.2.0" + read-pkg "^3.0.0" + +"@lerna/symlink-dependencies@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.6.0.tgz#76e9d54f6fd3af3e24221cce3ee546e5657ea2d8" + integrity sha512-mLpbWLidAU5Xi7bc9Fj8Yt/9XvDczzWocnS/yEe0E6RqWXh2KK+4VR9H24rLywBAWTv2s4GEXrb/ofbPb8gwBQ== + dependencies: + "@lerna/create-symlink" "^3.6.0" + "@lerna/resolve-symlink" "^3.6.0" + "@lerna/symlink-binary" "^3.6.0" + fs-extra "^7.0.0" + p-finally "^1.0.0" + p-map "^1.2.0" + p-map-series "^1.0.0" + +"@lerna/timer@^3.5.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-3.5.0.tgz#8dee6acf002c55de64678c66ef37ca52143f1b9b" + integrity sha512-TAb99hqQN6E3JBGtG9iyZNPq1/DbmqgBOeNrKtdJsGvIeX/NGLgUDWMrj2h04V4O+jpBFmSf6HIld6triKmxCA== + +"@lerna/validation-error@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.6.0.tgz#550cf66bb2ef88edc02e36017b575a7a9100d5d8" + integrity sha512-MWltncGO5VgMS0QedTlZCjFUMF/evRjDMMHrtVorkIB2Cp5xy0rkKa8iDBG43qpUWeG1giwi58yUlETBcWfILw== + dependencies: + libnpm "^2.0.1" + +"@lerna/version@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.6.0.tgz#7360d8a93b1cc5fe6a7588d7266812b916a281f7" + integrity sha512-V1f3fNM5ELGHmF824Wc8ah505SMpfiBqOHAIiW+u9soH/3W/t256c1P9UeaDh5blWAk3HeZMzbpRZ9Nlpf6aQA== + dependencies: + "@lerna/batch-packages" "^3.6.0" + "@lerna/check-working-tree" "^3.6.0" + "@lerna/child-process" "^3.3.0" + "@lerna/collect-updates" "^3.6.0" + "@lerna/command" "^3.6.0" + "@lerna/conventional-commits" "^3.6.0" + "@lerna/output" "^3.6.0" + "@lerna/prompt" "^3.6.0" + "@lerna/run-lifecycle" "^3.6.0" + "@lerna/validation-error" "^3.6.0" + chalk "^2.3.1" + dedent "^0.7.0" + libnpm "^2.0.1" + minimatch "^3.0.4" + p-map "^1.2.0" + p-pipe "^1.2.0" + p-reduce "^1.0.0" + p-waterfall "^1.0.0" + semver "^5.5.0" + slash "^1.0.0" + temp-write "^3.4.0" + +"@lerna/write-log-file@^3.6.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-3.6.0.tgz#b8d5a7efc84fa93cbd67d724d11120343b2a849a" + integrity sha512-OkLK99V6sYXsJsYg+O9wtiFS3z6eUPaiz2e6cXJt80mfIIdI1t2dnmyua0Ib5cZWExQvx2z6Y32Wlf0MnsoNsA== + dependencies: + libnpm "^2.0.1" + write-file-atomic "^2.3.0" + +"@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" @@ -1038,6 +1610,14 @@ JSONStream@^1.0.3, JSONStream@^1.0.4: jsonparse "^1.2.0" through ">=2.2.7 <3" +JSONStream@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" @@ -1108,10 +1688,19 @@ acorn@^5.6.0, acorn@^5.7.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" integrity sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ== -add-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" - integrity sha1-anmQQ3ynNtXhKI25K9MmbV9csqo= +agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== + dependencies: + es6-promisify "^5.0.0" + +agentkeepalive@^3.4.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" + integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== + dependencies: + humanize-ms "^1.2.1" ajv-keywords@^3.1.0: version "3.1.0" @@ -1147,6 +1736,16 @@ ajv@^6.5.3: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^6.5.5: + version "6.6.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d" + integrity sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -1204,6 +1803,11 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9" + integrity sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -1256,11 +1860,16 @@ append-transform@^1.0.0: dependencies: default-require-extensions "^2.0.0" -aproba@^1.0.3: +aproba@^1.0.3, aproba@^1.1.1, aproba@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== +"aproba@^1.1.2 || 2", aproba@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + archy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" @@ -1431,6 +2040,11 @@ arrify@^1.0.0, arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= +asap@^2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + asn1.js@^4.0.0: version "4.10.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" @@ -1506,7 +2120,7 @@ async-settle@^1.0.0: dependencies: async-done "^1.2.2" -async@^1.4.0, async@^1.5.0: +async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= @@ -1538,6 +2152,11 @@ aws4@^1.6.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" integrity sha1-g+9cqGCysy5KDe7e6MdxudtXRx4= +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -1794,6 +2413,17 @@ big.js@^3.1.3: resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== +bin-links@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.2.tgz#fb74bd54bae6b7befc6c6221f25322ac830d9757" + integrity sha512-8eEHVgYP03nILphilltWjeIjMbKyJo3wvp9K816pHbhP301ismzw15mxAAEVQ/USUwcP++1uNrbERbp8lOA6Fg== + dependencies: + bluebird "^3.5.0" + cmd-shim "^2.0.2" + gentle-fs "^2.0.0" + graceful-fs "^4.1.11" + write-file-atomic "^2.3.0" + binary-extensions@^1.0.0: version "1.11.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" @@ -1806,6 +2436,18 @@ bl@^1.2.1: dependencies: readable-stream "^2.0.5" +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + integrity sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= + dependencies: + inherits "~2.0.0" + +bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.2, bluebird@^3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" + integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== + bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" @@ -2092,6 +2734,11 @@ builtin-status-codes@^3.0.0: resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= +builtins@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" + integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= + bundle-collapser@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/bundle-collapser/-/bundle-collapser-1.3.0.tgz#f4b4ff58b2f22ee7701b20fa76306e23f53a3fb6" @@ -2109,6 +2756,31 @@ byline@^5.0.0: resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= +byte-size@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-4.0.4.tgz#29d381709f41aae0d89c631f1c81aec88cd40b23" + integrity sha512-82RPeneC6nqCdSwCX2hZUz3JPOvN5at/nTEw/CMf05Smu3Hrpo9Psb7LjN+k+XndNArG1EY8L4+BM3aTM4BCvw== + +cacache@^11.0.1, cacache@^11.2.0: + version "11.3.1" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f" + integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA== + dependencies: + bluebird "^3.5.1" + chownr "^1.0.1" + figgy-pudding "^3.1.0" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.3" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.2" + ssri "^6.0.0" + unique-filename "^1.1.0" + y18n "^4.0.0" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -2129,6 +2801,18 @@ cached-path-relative@^1.0.0: resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.1.tgz#d09c4b52800aa4c078e2dd81a869aac90d2e54e7" integrity sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc= +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" @@ -2136,6 +2820,13 @@ caller-path@^0.1.0: dependencies: callsites "^0.2.0" +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" @@ -2191,16 +2882,16 @@ camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= +camelcase@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" + integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== + caniuse-lite@^1.0.30000912: version "1.0.30000916" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000916.tgz#3428d3f529f0a7b2bfaaec65e796037bdd433aab" integrity sha512-D6J9jloPm2MPkg0PXcODLMQAJKkeixKO9xhqTUMvtd44MtTYMyyDXPQ2Lk9IgBq5FH0frwiPa/N/w8ncQf7kIQ== -capture-stack-trace@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" - integrity sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0= - caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -2248,11 +2939,6 @@ charcodes@^0.1.1: resolved "https://registry.yarnpkg.com/charcodes/-/charcodes-0.1.1.tgz#c463f6506cdb3b26a7f2d3fd4399abd363dd632a" integrity sha512-6aaMfQtn61TsnFc7rQ9RXZ2LqMoLlWr0kJWvPMtH1n+XArQByvZEaIwwUmeGPoutvJOr0qGa3/NL/hqM4BI+uQ== -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= - chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -2295,6 +2981,11 @@ chownr@^1.0.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" integrity sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE= +chownr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== + ci-info@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" @@ -2513,10 +3204,12 @@ combined-stream@1.0.6, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -command-join@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" - integrity sha1-Uui5hPSHLZUv8b3IuYOX0nxxRM8= +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" + integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== + dependencies: + delayed-stream "~1.0.0" commander@2.14.x, commander@^2.8.1, commander@^2.9.0, commander@~2.14.1: version "2.14.1" @@ -2556,7 +3249,7 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.4.10, concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream@^1.6.0: +concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream@^1.6.0: version "1.6.1" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.1.tgz#261b8f518301f1d834e36342b9fea095d2620a26" integrity sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw== @@ -2584,6 +3277,14 @@ concat-stream@~1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" +config-chain@^1.1.11: + version "1.1.12" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" + integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + console-browserify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" @@ -2606,113 +3307,45 @@ content-type-parser@^1.0.2: resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" integrity sha512-lM4l4CnMEwOLHAHr/P6MEZwZFPJFtAAKgL6pogbXmVZggIqXhdB6RbBtPOTsw2FcXwYhehRGERJmRrjOiIB8pQ== -conventional-changelog-angular@^1.6.6: - version "1.6.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz#b27f2b315c16d0a1f23eb181309d0e6a4698ea0f" - integrity sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg== +conventional-changelog-angular@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.2.tgz#39d945635e03b6d0c9d4078b1df74e06163dc66a" + integrity sha512-yx7m7lVrXmt4nKWQgWZqxSALEiAKZhOAcbxdUaU9575mB0CzXVbgrgpfSnSP7OqWDUTYGD0YVJ0MSRdyOPgAwA== dependencies: compare-func "^1.3.1" q "^1.5.1" -conventional-changelog-atom@^0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz#8037693455990e3256f297320a45fa47ee553a14" - integrity sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g== - dependencies: - q "^1.5.1" - -conventional-changelog-cli@^1.3.13: - version "1.3.22" - resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.22.tgz#13570fe1728f56f013ff7a88878ff49d5162a405" - integrity sha512-pnjdIJbxjkZ5VdAX/H1wndr1G10CY8MuZgnXuJhIHglOXfIrXygb7KZC836GW9uo1u8PjEIvIw/bKX0lOmOzZg== +conventional-changelog-core@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.1.5.tgz#c2edf928539308b54fe1b90a2fc731abc021852c" + integrity sha512-iwqAotS4zk0wA4S84YY1JCUG7X3LxaRjJxuUo6GI4dZuIy243j5nOg/Ora35ExT4DOiw5dQbMMQvw2SUjh6moQ== dependencies: - add-stream "^1.0.0" - conventional-changelog "^1.1.24" - lodash "^4.2.1" - meow "^4.0.0" - tempfile "^1.1.1" - -conventional-changelog-codemirror@^0.3.8: - version "0.3.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz#a1982c8291f4ee4d6f2f62817c6b2ecd2c4b7b47" - integrity sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ== - dependencies: - q "^1.5.1" - -conventional-changelog-core@^2.0.11: - version "2.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz#19b5fbd55a9697773ed6661f4e32030ed7e30287" - integrity sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg== - dependencies: - conventional-changelog-writer "^3.0.9" - conventional-commits-parser "^2.1.7" + conventional-changelog-writer "^4.0.2" + conventional-commits-parser "^3.0.1" dateformat "^3.0.0" get-pkg-repo "^1.0.0" - git-raw-commits "^1.3.6" + git-raw-commits "2.0.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^1.3.6" + git-semver-tags "^2.0.2" lodash "^4.2.1" normalize-package-data "^2.3.5" q "^1.5.1" - read-pkg "^1.1.0" - read-pkg-up "^1.0.1" + read-pkg "^3.0.0" + read-pkg-up "^3.0.0" through2 "^2.0.0" -conventional-changelog-ember@^0.3.12: - version "0.3.12" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.3.12.tgz#b7d31851756d0fcb49b031dffeb6afa93b202400" - integrity sha512-mmJzA7uzbrOqeF89dMMi6z17O07ORTXlTMArnLG9ZTX4oLaKNolUlxFUFlFm9JUoVWajVpaHQWjxH1EOQ+ARoQ== - dependencies: - q "^1.5.1" - -conventional-changelog-eslint@^1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz#b13cc7e4b472c819450ede031ff1a75c0e3d07d3" - integrity sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q== - dependencies: - q "^1.5.1" - -conventional-changelog-express@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz#4a6295cb11785059fb09202180d0e59c358b9c2c" - integrity sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q== - dependencies: - q "^1.5.1" - -conventional-changelog-jquery@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510" - integrity sha1-Agg5cWLjhGmG5xJztsecW1+A9RA= - dependencies: - q "^1.4.1" - -conventional-changelog-jscs@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c" - integrity sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw= - dependencies: - q "^1.4.1" - -conventional-changelog-jshint@^0.3.8: - version "0.3.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz#9051c1ac0767abaf62a31f74d2fe8790e8acc6c8" - integrity sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig== - dependencies: - compare-func "^1.3.1" - q "^1.5.1" - -conventional-changelog-preset-loader@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz#40bb0f142cd27d16839ec6c74ee8db418099b373" - integrity sha512-MkksM4G4YdrMlT2MbTsV2F6LXu/hZR0Tc/yenRrDIKRwBl/SP7ER4ZDlglqJsCzLJi4UonBc52Bkm5hzrOVCcw== +conventional-changelog-preset-loader@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.2.tgz#81d1a07523913f3d17da3a49f0091f967ad345b0" + integrity sha512-pBY+qnUoJPXAXXqVGwQaVmcye05xi6z231QM98wHWamGAmu/ghkBprQAwmF5bdmyobdVxiLhPY3PrCfSeUNzRQ== -conventional-changelog-writer@^3.0.9: - version "3.0.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz#4aecdfef33ff2a53bb0cf3b8071ce21f0e994634" - integrity sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q== +conventional-changelog-writer@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.2.tgz#eb493ed84269e7a663da36e49af51c54639c9a67" + integrity sha512-d8/FQY/fix2xXEBUhOo8u3DCbyEw3UOQgYHxLsPDw+wHUDma/GQGAGsGtoH876WyNs32fViHmTOUrgRKVLvBug== dependencies: compare-func "^1.3.1" - conventional-commits-filter "^1.1.6" + conventional-commits-filter "^2.0.1" dateformat "^3.0.0" handlebars "^4.0.2" json-stringify-safe "^5.0.1" @@ -2722,43 +3355,18 @@ conventional-changelog-writer@^3.0.9: split "^1.0.0" through2 "^2.0.0" -conventional-changelog@^1.1.24: - version "1.1.24" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.24.tgz#3d94c29c960f5261c002678315b756cdd3d7d1f0" - integrity sha512-2WcSUst4Y3Z4hHvoMTWXMJr/DmgVdLiMOVY1Kak2LfFz+GIz2KDp5naqbFesYbfXPmaZ5p491dO0FWZIJoJw1Q== - dependencies: - conventional-changelog-angular "^1.6.6" - conventional-changelog-atom "^0.2.8" - conventional-changelog-codemirror "^0.3.8" - conventional-changelog-core "^2.0.11" - conventional-changelog-ember "^0.3.12" - conventional-changelog-eslint "^1.0.9" - conventional-changelog-express "^0.3.6" - conventional-changelog-jquery "^0.1.0" - conventional-changelog-jscs "^0.1.0" - conventional-changelog-jshint "^0.3.8" - conventional-changelog-preset-loader "^1.1.8" - -conventional-commits-filter@^1.1.1: - version "1.1.5" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.5.tgz#77aac065e3de9c1a74b801e8e25c9affb3184f65" - integrity sha512-mj3+WLj8UZE72zO9jocZjx8+W4Bwnx/KHoIz1vb4F8XUXj0XSjp8Y3MFkpRyIpsRiCBX+DkDjxGKF/nfeu7BGw== - dependencies: - is-subset "^0.1.1" - modify-values "^1.0.0" - -conventional-commits-filter@^1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz#4389cd8e58fe89750c0b5fb58f1d7f0cc8ad3831" - integrity sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q== +conventional-commits-filter@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz#55a135de1802f6510b6758e0a6aa9e0b28618db3" + integrity sha512-92OU8pz/977udhBjgPEbg3sbYzIxMDFTlQT97w7KdhR9igNqdJvy8smmedAAgn4tPiqseFloKkrVfbXCVd+E7A== dependencies: is-subset "^0.1.1" modify-values "^1.0.0" -conventional-commits-parser@^2.1.1: - version "2.1.5" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.5.tgz#9ac3a4ab221c0c3c9e9dd2c09ae01e6d1e1dabe0" - integrity sha512-jaAP61py+ISMF3/n3yIiIuY5h6mJlucOqawu5mLB1HaQADLvg/y5UB3pT7HSucZJan34lp7+7ylQPfbKEGmxrA== +conventional-commits-parser@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz#fe1c49753df3f98edb2285a5e485e11ffa7f2e4c" + integrity sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -2768,31 +3376,19 @@ conventional-commits-parser@^2.1.1: through2 "^2.0.0" trim-off-newlines "^1.0.0" -conventional-commits-parser@^2.1.7: - version "2.1.7" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz#eca45ed6140d72ba9722ee4132674d639e644e8e" - integrity sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ== +conventional-recommended-bump@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-4.0.4.tgz#05540584641d3da758c8863c09788fcaeb586872" + integrity sha512-9mY5Yoblq+ZMqJpBzgS+RpSq+SUfP2miOR3H/NR9drGf08WCrY9B6HAGJZEm6+ThsVP917VHAahSOjM6k1vhPg== dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.0" - lodash "^4.2.1" + concat-stream "^1.6.0" + conventional-changelog-preset-loader "^2.0.2" + conventional-commits-filter "^2.0.1" + conventional-commits-parser "^3.0.1" + git-raw-commits "2.0.0" + git-semver-tags "^2.0.2" meow "^4.0.0" - split2 "^2.0.0" - through2 "^2.0.0" - trim-off-newlines "^1.0.0" - -conventional-recommended-bump@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.2.1.tgz#1b7137efb5091f99fe009e2fe9ddb7cc490e9375" - integrity sha512-oJjG6DkRgtnr/t/VrPdzmf4XZv8c4xKVJrVT4zrSHd92KEL+EYxSbYoKq8lQ7U5yLMw7130wrcQTLRjM/T+d4w== - dependencies: - concat-stream "^1.4.10" - conventional-commits-filter "^1.1.1" - conventional-commits-parser "^2.1.1" - git-raw-commits "^1.3.0" - git-semver-tags "^1.3.0" - meow "^3.3.0" - object-assign "^4.0.1" + q "^1.5.1" convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0: version "1.5.1" @@ -2804,6 +3400,18 @@ convert-source-map@~1.1.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.1.3.tgz#4829c877e9fe49b3161f3bf3673888e204699860" integrity sha1-SCnId+n+SbMWHzvzZziI4gRpmGA= +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -2841,6 +3449,16 @@ cosmiconfig@5.0.6, cosmiconfig@^5.0.6: js-yaml "^3.9.0" parse-json "^4.0.0" +cosmiconfig@^5.0.2: + version "5.0.7" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.7.tgz#39826b292ee0d78eda137dfa3173bd1c21a43b04" + integrity sha512-PcLqxTKiDmNT6pSpy4N6KtuPwb53W+2tzNvwOZw0WH9N6O0vLIBq0x8aj8Oj75ere4YcGi48bDFCL+3fRJdlNA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + create-ecdh@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d" @@ -2849,13 +3467,6 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-error-class@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" - integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= - dependencies: - capture-stack-trace "^1.0.0" - create-hash@^1.1.0, create-hash@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd" @@ -2956,6 +3567,11 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" +cyclist@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" @@ -2997,6 +3613,13 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== +debug@3.1.0, debug@^3.0.0, debug@^3.0.1, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3004,13 +3627,6 @@ debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: dependencies: ms "2.0.0" -debug@^3.0.0, debug@^3.0.1, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - debug@^4.0.1, debug@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" @@ -3018,6 +3634,11 @@ debug@^4.0.1, debug@^4.1.0: dependencies: ms "^2.1.1" +debuglog@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" + integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= + decamelize-keys@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -3026,7 +3647,7 @@ decamelize-keys@^1.0.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2: +decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -3212,6 +3833,14 @@ detective@^5.0.2: defined "^1.0.0" minimist "^1.1.1" +dezalgo@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" + integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= + dependencies: + asap "^2.0.0" + wrappy "1" + diff@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" @@ -3226,6 +3855,14 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +dir-glob@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -3293,6 +3930,13 @@ dot-prop@^3.0.0: dependencies: is-obj "^1.0.0" +dot-prop@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== + dependencies: + is-obj "^1.0.0" + duplexer2@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" @@ -3307,17 +3951,12 @@ duplexer2@^0.1.2, duplexer2@~0.1.0, duplexer2@~0.1.2: dependencies: readable-stream "^2.0.2" -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - duplexer@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= -duplexify@^3.6.0: +duplexify@^3.4.2, duplexify@^3.6.0: version "3.6.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.1.tgz#b1a7a29c4abfd639585efaecce80d666b1e34125" integrity sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA== @@ -3399,6 +4038,11 @@ entities@^1.1.1, entities@~1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" integrity sha1-blwtClYhtdra7O+AuQ7ftc13cvA= +err-code@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" + integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= + errno@^0.1.3: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" @@ -3462,6 +4106,18 @@ es6-map@^0.1.3: es6-symbol "~3.1.1" event-emitter "~0.3.5" +es6-promise@^4.0.3: + version "4.2.5" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054" + integrity sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + es6-set@~0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" @@ -3695,12 +4351,12 @@ exec-sh@^0.2.0: dependencies: merge "^1.1.3" -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= +execa@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" + integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw== dependencies: - cross-spawn "^5.0.1" + cross-spawn "^6.0.0" get-stream "^3.0.0" is-stream "^1.1.0" npm-run-path "^2.0.0" @@ -3708,10 +4364,10 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" - integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo= +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -3812,14 +4468,10 @@ extend@^3.0.0, extend@~3.0.1: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" integrity sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ= -external-editor@^2.0.4: - version "2.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" - integrity sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA== - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== external-editor@^3.0.0: version "3.0.3" @@ -3895,6 +4547,18 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== +fast-glob@^2.0.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.4.tgz#e54f4b66d378040e0e4d6a68ec36bbc5b04363c0" + integrity sha512-FjK2nCGI/McyzgNtTESqaWP3trPvHyRyoyY70hxjc3oKPNmDe8taohLZpoVKoUjW85tbU5txaYUZCNtVzygl1g== + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -3917,6 +4581,11 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" +figgy-pudding@^3.1.0, figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" + integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== + figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -3983,6 +4652,11 @@ find-cache-dir@^1.0.0: make-dir "^1.0.0" pkg-dir "^2.0.0" +find-npm-prefix@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz#8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf" + integrity sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA== + find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" @@ -4058,7 +4732,7 @@ flow-bin@^0.87.0: resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.87.0.tgz#fab7f984d8cc767e93fa9eb01cf7d57ed744f19d" integrity sha512-mnvBXXZkUp4y6A96bR5BHa3q1ioIIN2L10w5osxJqagAakTXFYZwjl0t9cT3y2aCEf1wnK6n91xgYypQS/Dqbw== -flush-write-stream@^1.0.2: +flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" integrity sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw== @@ -4104,6 +4778,15 @@ form-data@~2.3.1: combined-stream "1.0.6" mime-types "^2.1.12" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -4111,10 +4794,18 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fs-extra@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-extra@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" @@ -4140,6 +4831,25 @@ fs-readdir-recursive@^1.1.0: resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== +fs-vacuum@^1.2.10: + version "1.2.10" + resolved "https://registry.yarnpkg.com/fs-vacuum/-/fs-vacuum-1.2.10.tgz#b7629bec07a4031a2548fdf99f5ecf1cc8b31e36" + integrity sha1-t2Kb7AekAxolSP35n17PHMizHjY= + dependencies: + graceful-fs "^4.1.2" + path-is-inside "^1.0.1" + rimraf "^2.5.2" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -4153,6 +4863,16 @@ fsevents@^1.1.1, fsevents@^1.2.2: nan "^2.9.2" node-pre-gyp "^0.10.0" +fstream@^1.0.0, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + integrity sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE= + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -4186,6 +4906,25 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +genfun@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" + integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== + +gentle-fs@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.0.1.tgz#585cfd612bfc5cd52471fdb42537f016a5ce3687" + integrity sha512-cEng5+3fuARewXktTEGbwsktcldA+YsnUEaXZwcK/3pjSE1X9ObnTs+/8rYf8s+RnIcQm2D5x3rwpN7Zom8Bew== + dependencies: + aproba "^1.1.2" + fs-vacuum "^1.2.10" + graceful-fs "^4.1.11" + iferr "^0.1.5" + mkdirp "^0.5.1" + path-is-inside "^1.0.2" + read-cmd-shim "^1.0.1" + slide "^1.1.6" + get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" @@ -4227,7 +4966,7 @@ get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= -get-stream@^4.0.0: +get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== @@ -4246,21 +4985,10 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -git-raw-commits@^1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.4.tgz#442c3df5985b4f5689e9e43597f5194736aac001" - integrity sha512-G3O+41xHbscpgL5nA0DUkbFVgaAz5rd57AMSIMew8p7C8SyFwZDyn08MoXHkTl9zcD0LmxsLFPxbqFY4YPbpPA== - dependencies: - dargs "^4.0.1" - lodash.template "^4.0.2" - meow "^4.0.0" - split2 "^2.0.0" - through2 "^2.0.0" - -git-raw-commits@^1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.6.tgz#27c35a32a67777c1ecd412a239a6c19d71b95aff" - integrity sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg== +git-raw-commits@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" + integrity sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg== dependencies: dargs "^4.0.1" lodash.template "^4.0.2" @@ -4276,18 +5004,10 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.3.4.tgz#2ceb2a355c6d7514c123c35e297067d08caf3a92" - integrity sha512-Xe2Z74MwXZfAezuaO6e6cA4nsgeCiARPzaBp23gma325c/OXdt//PhrknptIaynNeUp2yWtmikV7k5RIicgGIQ== - dependencies: - meow "^4.0.0" - semver "^5.5.0" - -git-semver-tags@^1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.3.6.tgz#357ea01f7280794fe0927f2806bee6414d2caba5" - integrity sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig== +git-semver-tags@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.2.tgz#f506ec07caade191ac0c8d5a21bdb8131b4934e3" + integrity sha512-34lMF7Yo1xEmsK2EkbArdoU79umpvm0MfzaDkSNYSJqtM5QLAVTPWgpiXSVI5o/O9EvZPSrP4Zvnec/CqhSd5w== dependencies: meow "^4.0.0" semver "^5.5.0" @@ -4338,6 +5058,11 @@ glob-stream@^6.1.0: to-absolute-glob "^2.0.0" unique-stream "^2.0.2" +glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + glob-watcher@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.1.tgz#239aaa621b6bd843b288fdf6b155f50963c7d7ea" @@ -4360,6 +5085,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" @@ -4418,6 +5155,19 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" +globby@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" + integrity sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw== + dependencies: + array-union "^1.0.1" + dir-glob "^2.0.0" + fast-glob "^2.0.2" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + glogg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810" @@ -4425,23 +5175,6 @@ glogg@^1.0.0: dependencies: sparkles "^1.0.0" -got@^6.7.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" - integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= - dependencies: - create-error-class "^3.0.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-redirect "^1.0.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - lowercase-keys "^1.0.0" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - unzip-response "^2.0.1" - url-parse-lax "^1.0.0" - graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -4616,6 +5349,14 @@ har-validator@~5.0.3: ajv "^5.1.0" har-schema "^2.0.0" +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -4650,7 +5391,7 @@ has-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= -has-unicode@^2.0.0: +has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= @@ -4770,10 +5511,10 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" integrity sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg== -hosted-git-info@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" - integrity sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw== +hosted-git-info@^2.6.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== html-encoding-sniffer@^1.0.2: version "1.0.2" @@ -4824,6 +5565,19 @@ htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^2.0.2" +http-cache-semantics@^3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== + +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== + dependencies: + agent-base "4" + debug "3.1.0" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -4838,6 +5592,21 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= +https-proxy-agent@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" + integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== + dependencies: + agent-base "^4.1.0" + debug "^3.1.0" + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= + dependencies: + ms "^2.0.0" + husky@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/husky/-/husky-1.2.0.tgz#d631dda1e4a9ee8ba69a10b0c51a0e2c66e711e5" @@ -4854,7 +5623,7 @@ husky@^1.2.0: run-node "^1.0.0" slash "^2.0.0" -iconv-lite@0.4.19, iconv-lite@^0.4.17, iconv-lite@~0.4.13: +iconv-lite@0.4.19, iconv-lite@~0.4.13: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" integrity sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ== @@ -4878,6 +5647,11 @@ ieee754@^1.1.4: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" integrity sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q= +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= + ignore-walk@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" @@ -4885,11 +5659,24 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" +ignore@^3.3.5: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + import-local@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" @@ -4928,7 +5715,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= @@ -4938,11 +5725,25 @@ inherits@2.0.1: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= -ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +init-package-json@^1.10.3: + version "1.10.3" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" + integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== + dependencies: + glob "^7.1.1" + npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" + promzard "^0.3.0" + read "~1.0.1" + read-package-json "1 || 2" + semver "2.x || 3.x || 4 || 5" + validate-npm-package-license "^3.0.1" + validate-npm-package-name "^3.0.0" + inline-source-map@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/inline-source-map/-/inline-source-map-0.5.0.tgz#4a4c5dd8e4fb5e9b3cda60c822dfadcaee66e0af" @@ -4957,30 +5758,29 @@ inline-source-map@~0.6.0: dependencies: source-map "~0.5.3" -inquirer@^3.2.2: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== +inquirer@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" + integrity sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^2.0.4" + external-editor "^3.0.0" figures "^2.0.0" - lodash "^4.3.0" + lodash "^4.17.10" mute-stream "0.0.7" run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" + rxjs "^6.1.0" string-width "^2.1.0" strip-ansi "^4.0.0" through "^2.3.6" -inquirer@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" - integrity sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg== +inquirer@^6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.1.tgz#9943fc4882161bdb0b0c9276769c75b32dbfcd52" + integrity sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" @@ -4993,7 +5793,7 @@ inquirer@^6.1.0: run-async "^2.2.0" rxjs "^6.1.0" string-width "^2.1.0" - strip-ansi "^4.0.0" + strip-ansi "^5.0.0" through "^2.3.6" insert-module-globals@^7.0.0: @@ -5034,6 +5834,16 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= + is-absolute@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" @@ -5314,11 +6124,6 @@ is-promise@^2.1.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= -is-redirect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" - integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= - is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" @@ -5343,12 +6148,7 @@ is-resolvable@^1.1.0: resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== -is-retry-allowed@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= - -is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -5905,6 +6705,11 @@ json-loader@^0.5.4: resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" integrity sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w== +json-parse-better-errors@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + json-parse-better-errors@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a" @@ -6082,6 +6887,13 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + lead@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" @@ -6107,50 +6919,28 @@ lerna-changelog@^0.5.0: string.prototype.padend "^3.0.0" yargs "^6.6.0" -lerna@^2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.11.0.tgz#89b5681e286d388dda5bbbdbbf6b84c8094eff65" - integrity sha512-kgM6zwe2P2tR30MYvgiLLW+9buFCm6E7o8HnRlhTgm70WVBvXVhydqv+q/MF2HrVZkCawfVtCfetyQmtd4oHhQ== - dependencies: - async "^1.5.0" - chalk "^2.1.0" - cmd-shim "^2.0.2" - columnify "^1.5.4" - command-join "^2.0.0" - conventional-changelog-cli "^1.3.13" - conventional-recommended-bump "^1.2.1" - dedent "^0.7.0" - execa "^0.8.0" - find-up "^2.1.0" - fs-extra "^4.0.1" - get-port "^3.2.0" - glob "^7.1.2" - glob-parent "^3.1.0" - globby "^6.1.0" - graceful-fs "^4.1.11" - hosted-git-info "^2.5.0" - inquirer "^3.2.2" - is-ci "^1.0.10" - load-json-file "^4.0.0" - lodash "^4.17.4" - minimatch "^3.0.4" - npmlog "^4.1.2" - p-finally "^1.0.0" - package-json "^4.0.1" - path-exists "^3.0.0" - read-cmd-shim "^1.0.1" - read-pkg "^3.0.0" - rimraf "^2.6.1" - safe-buffer "^5.1.1" - semver "^5.4.1" - signal-exit "^3.0.2" - slash "^1.0.0" - strong-log-transformer "^1.0.6" - temp-write "^3.3.0" - write-file-atomic "^2.3.0" - write-json-file "^2.2.0" - write-pkg "^3.1.0" - yargs "^8.0.2" +lerna@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.6.0.tgz#b6616873fa038ee1dae514e04322c191ff71a369" + integrity sha512-iQFAgrgtv18SI5LtQBBca0WVeYvk2r8eYgiEQtcZBT63T5R9RVv+snsviIiOp0z6gD43tcyiWXiLvBdp1IY/Rg== + dependencies: + "@lerna/add" "^3.6.0" + "@lerna/bootstrap" "^3.6.0" + "@lerna/changed" "^3.6.0" + "@lerna/clean" "^3.6.0" + "@lerna/cli" "^3.6.0" + "@lerna/create" "^3.6.0" + "@lerna/diff" "^3.6.0" + "@lerna/exec" "^3.6.0" + "@lerna/import" "^3.6.0" + "@lerna/init" "^3.6.0" + "@lerna/link" "^3.6.0" + "@lerna/list" "^3.6.0" + "@lerna/publish" "^3.6.0" + "@lerna/run" "^3.6.0" + "@lerna/version" "^3.6.0" + import-local "^1.0.0" + libnpm "^2.0.1" leven@^2.1.0: version "2.1.0" @@ -6172,6 +6962,105 @@ lexical-scope@^1.2.0: dependencies: astw "^2.0.0" +libnpm@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/libnpm/-/libnpm-2.0.1.tgz#a48fcdee3c25e13c77eb7c60a0efe561d7fb0d8f" + integrity sha512-qTKoxyJvpBxHZQB6k0AhSLajyXq9ZE/lUsZzuHAplr2Bpv9G+k4YuYlExYdUCeVRRGqcJt8hvkPh4tBwKoV98w== + dependencies: + bin-links "^1.1.2" + bluebird "^3.5.3" + find-npm-prefix "^1.0.2" + libnpmaccess "^3.0.1" + libnpmconfig "^1.2.1" + libnpmhook "^5.0.2" + libnpmorg "^1.0.0" + libnpmpublish "^1.1.0" + libnpmsearch "^2.0.0" + libnpmteam "^1.0.1" + lock-verify "^2.0.2" + npm-lifecycle "^2.1.0" + npm-logical-tree "^1.2.1" + npm-package-arg "^6.1.0" + npm-profile "^4.0.1" + npm-registry-fetch "^3.8.0" + npmlog "^4.1.2" + pacote "^9.2.3" + read-package-json "^2.0.13" + stringify-package "^1.0.0" + +libnpmaccess@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.1.tgz#5b3a9de621f293d425191aa2e779102f84167fa8" + integrity sha512-RlZ7PNarCBt+XbnP7R6PoVgOq9t+kou5rvhaInoNibhPO7eMlRfS0B8yjatgn2yaHIwWNyoJDolC/6Lc5L/IQA== + dependencies: + aproba "^2.0.0" + get-stream "^4.0.0" + npm-package-arg "^6.1.0" + npm-registry-fetch "^3.8.0" + +libnpmconfig@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/libnpmconfig/-/libnpmconfig-1.2.1.tgz#c0c2f793a74e67d4825e5039e7a02a0044dfcbc0" + integrity sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA== + dependencies: + figgy-pudding "^3.5.1" + find-up "^3.0.0" + ini "^1.3.5" + +libnpmhook@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/libnpmhook/-/libnpmhook-5.0.2.tgz#d12817b0fb893f36f1d5be20017f2aea25825d94" + integrity sha512-vLenmdFWhRfnnZiNFPNMog6CK7Ujofy2TWiM2CrpZUjBRIhHkJeDaAbJdYCT6W4lcHtyrJR8yXW8KFyq6UAp1g== + dependencies: + aproba "^2.0.0" + figgy-pudding "^3.4.1" + get-stream "^4.0.0" + npm-registry-fetch "^3.8.0" + +libnpmorg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/libnpmorg/-/libnpmorg-1.0.0.tgz#979b868c48ba28c5820e3bb9d9e73c883c16a232" + integrity sha512-o+4eVJBoDGMgRwh2lJY0a8pRV2c/tQM/SxlqXezjcAg26Qe9jigYVs+Xk0vvlYDWCDhP0g74J8UwWeAgsB7gGw== + dependencies: + aproba "^2.0.0" + figgy-pudding "^3.4.1" + get-stream "^4.0.0" + npm-registry-fetch "^3.8.0" + +libnpmpublish@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-1.1.0.tgz#773bd6fc9ed247e4a41a68ebd69fdc096ea630a3" + integrity sha512-mQ3LT2EWlpJ6Q8mgHTNqarQVCgcY32l6xadPVPMcjWLtVLz7II4WlWkzlbYg1nHGAf+xyABDwS+3aNUiRLkyaA== + dependencies: + aproba "^2.0.0" + figgy-pudding "^3.5.1" + get-stream "^4.0.0" + lodash.clonedeep "^4.5.0" + normalize-package-data "^2.4.0" + npm-package-arg "^6.1.0" + npm-registry-fetch "^3.8.0" + semver "^5.5.1" + ssri "^6.0.1" + +libnpmsearch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/libnpmsearch/-/libnpmsearch-2.0.0.tgz#de05af47ada81554a5f64276a69599070d4a5685" + integrity sha512-vd+JWbTGzOSfiOc+72MU6y7WqmBXn49egCCrIXp27iE/88bX8EpG64ST1blWQI1bSMUr9l1AKPMVsqa2tS5KWA== + dependencies: + figgy-pudding "^3.5.1" + get-stream "^4.0.0" + npm-registry-fetch "^3.8.0" + +libnpmteam@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/libnpmteam/-/libnpmteam-1.0.1.tgz#ff704b1b6c06ea674b3b1101ac3e305f5114f213" + integrity sha512-gDdrflKFCX7TNwOMX1snWojCoDE5LoRWcfOC0C/fqF7mBq8Uz9zWAX4B2RllYETNO7pBupBaSyBDkTAC15cAMg== + dependencies: + aproba "^2.0.0" + figgy-pudding "^3.4.1" + get-stream "^4.0.0" + npm-registry-fetch "^3.8.0" + liftoff@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec" @@ -6322,6 +7211,14 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +lock-verify@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lock-verify/-/lock-verify-2.0.2.tgz#148e4f85974915c9e3c34d694b7de9ecb18ee7a8" + integrity sha512-QNVwK0EGZBS4R3YQ7F1Ox8p41Po9VGl2QG/2GsuvTbkJZYSsPeWHKMbbH6iZMCHWSMww5nrJroZYnGzI4cePuw== + dependencies: + npm-package-arg "^5.1.2 || 6" + semver "^5.4.1" + lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" @@ -6372,6 +7269,11 @@ lodash.clone@^4.3.2: resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -6461,7 +7363,7 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: +lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1: version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" integrity sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw== @@ -6519,11 +7421,6 @@ lower-case@^1.1.1: resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= -lowercase-keys@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - lru-cache@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" @@ -6532,6 +7429,14 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" +lru-cache@^4.1.2, lru-cache@^4.1.3: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + make-dir@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" @@ -6551,6 +7456,23 @@ make-error@^1.2.0: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" integrity sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g== +make-fetch-happen@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083" + integrity sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ== + dependencies: + agentkeepalive "^3.4.1" + cacache "^11.0.1" + http-cache-semantics "^3.8.1" + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.1" + lru-cache "^4.1.2" + mississippi "^3.0.0" + node-fetch-npm "^2.0.2" + promise-retry "^1.1.1" + socks-proxy-agent "^4.0.0" + ssri "^6.0.0" + make-iterator@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.0.tgz#57bef5dc85d23923ba23767324d8e8f8f3d9694b" @@ -6565,6 +7487,13 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + map-cache@^0.2.0, map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -6619,6 +7548,15 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" +mem@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.0.0.tgz#6437690d9471678f6cc83659c00cbafcd6b0cdaf" + integrity sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^1.0.0" + p-is-promise "^1.1.0" + memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -6665,6 +7603,11 @@ merge-stream@^1.0.1: dependencies: readable-stream "^2.0.1" +merge2@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" + integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== + merge@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" @@ -6708,7 +7651,7 @@ micromatch@^3.0.4, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -micromatch@^3.1.8: +micromatch@^3.1.10, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -6740,6 +7683,11 @@ mime-db@~1.33.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== +mime-db@~1.37.0: + version "1.37.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" + integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== + mime-types@^2.1.12, mime-types@~2.1.17: version "2.1.18" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" @@ -6747,6 +7695,13 @@ mime-types@^2.1.12, mime-types@~2.1.17: dependencies: mime-db "~1.33.0" +mime-types@~2.1.19: + version "2.1.21" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" + integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== + dependencies: + mime-db "~1.37.0" + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -6782,11 +7737,6 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" - integrity sha1-md9lelJXTCHJBXSX33QnkLK0wN4= - minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -6802,7 +7752,15 @@ minipass@^2.2.1, minipass@^2.2.4: resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40" integrity sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g== dependencies: - safe-buffer "^5.1.1" + safe-buffer "^5.1.1" + yallist "^3.0.0" + +minipass@^2.3.4, minipass@^2.3.5: + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== + dependencies: + safe-buffer "^5.1.2" yallist "^3.0.0" minizlib@^1.1.0: @@ -6812,6 +7770,29 @@ minizlib@^1.1.0: dependencies: minipass "^2.2.1" +minizlib@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" + integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== + dependencies: + minipass "^2.2.1" + +mississippi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^3.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" @@ -6820,7 +7801,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -6853,22 +7834,29 @@ module-deps@^6.0.0: through2 "^2.0.0" xtend "^4.0.0" -moment@^2.6.0: - version "2.21.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a" - integrity sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ== +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@^2.1.1: +ms@^2.0.0, ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== -multimatch@^2.0.0: +multimatch@^2.0.0, multimatch@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" integrity sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis= @@ -6890,7 +7878,7 @@ mute-stdout@^1.0.0: resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.0.tgz#5b32ea07eb43c9ded6130434cf926f46b2a7fd4d" integrity sha1-WzLqB+tDyd7WEwQ0z5JvRrKn/U0= -mute-stream@0.0.7: +mute-stream@0.0.7, mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= @@ -6956,6 +7944,15 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" +node-fetch-npm@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" + integrity sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw== + dependencies: + encoding "^0.1.11" + json-parse-better-errors "^1.0.0" + safe-buffer "^5.1.1" + node-fetch@^1.7.0: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -6964,6 +7961,24 @@ node-fetch@^1.7.0: encoding "^0.1.11" is-stream "^1.0.1" +node-gyp@^3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" + integrity sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA== + dependencies: + fstream "^1.0.0" + glob "^7.0.3" + graceful-fs "^4.1.2" + mkdirp "^0.5.0" + nopt "2 || 3" + npmlog "0 || 1 || 2 || 3 || 4" + osenv "0" + request "^2.87.0" + rimraf "2" + semver "~5.3.0" + tar "^2.0.0" + which "1" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -7036,6 +8051,13 @@ node-releases@^1.0.5: dependencies: semver "^5.3.0" +"nopt@2 || 3": + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= + dependencies: + abbrev "1" + nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -7044,7 +8066,7 @@ nopt@^4.0.1: abbrev "1" osenv "^0.1.4" -normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: +normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== @@ -7073,6 +8095,43 @@ npm-bundled@^1.0.1: resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" integrity sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow== +npm-lifecycle@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-2.1.0.tgz#1eda2eedb82db929e3a0c50341ab0aad140ed569" + integrity sha512-QbBfLlGBKsktwBZLj6AviHC6Q9Y3R/AY4a2PYSIRhSKSS0/CxRyD/PfxEX6tPeOCXQgMSNdwGeECacstgptc+g== + dependencies: + byline "^5.0.0" + graceful-fs "^4.1.11" + node-gyp "^3.8.0" + resolve-from "^4.0.0" + slide "^1.1.6" + uid-number "0.0.6" + umask "^1.1.0" + which "^1.3.1" + +npm-logical-tree@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz#44610141ca24664cad35d1e607176193fd8f5b88" + integrity sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg== + +"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", "npm-package-arg@^5.1.2 || 6", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" + integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== + dependencies: + hosted-git-info "^2.6.0" + osenv "^0.1.5" + semver "^5.5.0" + validate-npm-package-name "^3.0.0" + +npm-packlist@^1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" + integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-packlist@^1.1.6: version "1.1.10" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" @@ -7088,6 +8147,36 @@ npm-path@^2.0.2: dependencies: which "^1.2.10" +npm-pick-manifest@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40" + integrity sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA== + dependencies: + figgy-pudding "^3.5.1" + npm-package-arg "^6.0.0" + semver "^5.4.1" + +npm-profile@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-4.0.1.tgz#d350f7a5e6b60691c7168fbb8392c3603583f5aa" + integrity sha512-NQ1I/1Q7YRtHZXkcuU1/IyHeLy6pd+ScKg4+DQHdfsm769TGq6HPrkbuNJVJS4zwE+0mvvmeULzQdWn2L2EsVA== + dependencies: + aproba "^1.1.2 || 2" + figgy-pudding "^3.4.1" + npm-registry-fetch "^3.8.0" + +npm-registry-fetch@^3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz#aa7d9a7c92aff94f48dba0984bdef4bd131c88cc" + integrity sha512-hrw8UMD+Nob3Kl3h8Z/YjmKamb1gf7D1ZZch2otrIXM3uFLB5vjEY6DhMlq80z/zZet6eETLbOXcuQudCB3Zpw== + dependencies: + JSONStream "^1.3.4" + bluebird "^3.5.1" + figgy-pudding "^3.4.1" + lru-cache "^4.1.3" + make-fetch-happen "^4.0.1" + npm-package-arg "^6.1.0" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -7104,7 +8193,7 @@ npm-which@^3.0.1: npm-path "^2.0.2" which "^1.2.10" -npmlog@^4.0.2, npmlog@^4.1.2: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.2, npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -7136,6 +8225,11 @@ oauth-sign@~0.8.2: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM= +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + object-assign@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" @@ -7293,12 +8387,21 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" +os-locale@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.0.1.tgz#3b014fbf01d87f60a1e5348d80fe870dc82c4620" + integrity sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw== + dependencies: + execa "^0.10.0" + lcid "^2.0.0" + mem "^4.0.0" + os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.4: +osenv@0, osenv@^0.1.4, osenv@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== @@ -7315,11 +8418,21 @@ output-file-sync@^2.0.0: is-plain-obj "^1.1.0" mkdirp "^0.5.1" +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= +p-is-promise@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" + integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= + p-limit@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" @@ -7348,7 +8461,14 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-map@^1.1.1: +p-map-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" + integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= + dependencies: + p-reduce "^1.0.0" + +p-map@^1.1.1, p-map@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== @@ -7358,6 +8478,16 @@ p-map@^2.0.0: resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.0.0.tgz#be18c5a5adeb8e156460651421aceca56c213a50" integrity sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w== +p-pipe@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" + integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= + +p-reduce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" + integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -7368,21 +8498,60 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== -package-json@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" - integrity sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0= - dependencies: - got "^6.7.1" - registry-auth-token "^3.0.1" - registry-url "^3.0.3" - semver "^5.1.0" +p-waterfall@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-1.0.0.tgz#7ed94b3ceb3332782353af6aae11aa9fc235bb00" + integrity sha1-ftlLPOszMngjU69qrhGqn8I1uwA= + dependencies: + p-reduce "^1.0.0" + +pacote@^9.2.3: + version "9.2.3" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.2.3.tgz#48cfe87beb9177acd6594355a584a538835424b3" + integrity sha512-Y3+yY3nBRAxMlZWvr62XLJxOwCmG9UmkGZkFurWHoCjqF0cZL72cTOCRJTvWw8T4OhJS2RTg13x4oYYriauvEw== + dependencies: + bluebird "^3.5.2" + cacache "^11.2.0" + figgy-pudding "^3.5.1" + get-stream "^4.1.0" + glob "^7.1.3" + lru-cache "^4.1.3" + make-fetch-happen "^4.0.1" + minimatch "^3.0.4" + minipass "^2.3.5" + mississippi "^3.0.0" + mkdirp "^0.5.1" + normalize-package-data "^2.4.0" + npm-package-arg "^6.1.0" + npm-packlist "^1.1.12" + npm-pick-manifest "^2.2.3" + npm-registry-fetch "^3.8.0" + osenv "^0.1.5" + promise-inflight "^1.0.1" + promise-retry "^1.1.1" + protoduck "^5.0.1" + rimraf "^2.6.2" + safe-buffer "^5.1.2" + semver "^5.6.0" + ssri "^6.0.1" + tar "^4.4.6" + unique-filename "^1.1.1" + which "^1.3.1" pako@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" integrity sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg== +parallel-transform@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + integrity sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY= + dependencies: + cyclist "~0.2.2" + inherits "^2.0.3" + readable-stream "^2.1.5" + param-case@2.1.x: version "2.1.1" resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" @@ -7658,11 +8827,6 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" @@ -7723,6 +8887,19 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" integrity sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8= +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +promise-retry@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" + integrity sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0= + dependencies: + err-code "^1.0.0" + retry "^0.10.0" + prompts@^0.1.9: version "0.1.12" resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.12.tgz#39dc42de7d2f0ec3e2af76bf40713fcb8726090d" @@ -7731,6 +8908,25 @@ prompts@^0.1.9: kleur "^1.0.0" sisteransi "^0.1.1" +promzard@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" + integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= + dependencies: + read "1" + +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + +protoduck@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" + integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg== + dependencies: + genfun "^5.0.0" + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -7741,6 +8937,11 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= +psl@^1.1.24: + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" + integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== + public-encrypt@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.0.tgz#39f699f3a46560dd5ebacbca693caf7c65c18cc6" @@ -7768,7 +8969,7 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.5: +pumpify@^1.3.3, pumpify@^1.3.5: version "1.5.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== @@ -7792,7 +8993,7 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= -q@^1.4.1, q@^1.5.1: +q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= @@ -7802,6 +9003,11 @@ qs@~6.5.1: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" integrity sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A== +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + querystring-es3@^0.2.0, querystring-es3@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -7840,7 +9046,7 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" -rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: +rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -7864,6 +9070,29 @@ read-only-stream@^2.0.0: dependencies: readable-stream "^2.0.2" +"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" + integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg== + dependencies: + glob "^7.1.1" + json-parse-better-errors "^1.0.1" + normalize-package-data "^2.0.0" + slash "^1.0.0" + optionalDependencies: + graceful-fs "^4.1.2" + +read-package-tree@^5.1.6: + version "5.2.1" + resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.1.tgz#6218b187d6fac82289ce4387bbbaf8eef536ad63" + integrity sha512-2CNoRoh95LxY47LvqrehIAfUVda2JbuFE/HaGYs42bNrGG+ojbw1h3zOcPcQ+1GQ3+rkzNndZn85u1XyZ3UsIA== + dependencies: + debuglog "^1.0.1" + dezalgo "^1.0.0" + once "^1.3.0" + read-package-json "^2.0.0" + readdir-scoped-modules "^1.0.0" + read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -7888,7 +9117,7 @@ read-pkg-up@^3.0.0: find-up "^2.0.0" read-pkg "^3.0.0" -read-pkg@^1.0.0, read-pkg@^1.1.0: +read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= @@ -7924,17 +9153,14 @@ read-pkg@^4.0.1: parse-json "^4.0.0" pify "^3.0.0" -"readable-stream@>=1.1.13-1 <1.2.0-0", readable-stream@~1.1.9: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= +read@1, read@~1.0.1: + version "1.0.7" + resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" + mute-stream "~0.0.4" -readable-stream@^2.0.0, readable-stream@^2.0.4, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.4, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -7947,6 +9173,16 @@ readable-stream@^2.0.0, readable-stream@^2.0.4, readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" +"readable-stream@>=1.1.13-1 <1.2.0-0", readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3: version "2.3.5" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d" @@ -7972,6 +9208,16 @@ readable-stream@~2.0.0: string_decoder "~0.10.x" util-deprecate "~1.0.1" +readdir-scoped-modules@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" + integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c= + dependencies: + debuglog "^1.0.1" + dezalgo "^1.0.0" + graceful-fs "^4.1.2" + once "^1.3.0" + readdirp@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" @@ -8107,21 +9353,6 @@ regexpu-core@^4.2.0: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.0.2" -registry-auth-token@^3.0.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" - integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= - dependencies: - rc "^1.0.1" - regjsgen@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.3.0.tgz#0ee4a3e9276430cda25f1e789ea6c15b87b0cb43" @@ -8253,6 +9484,32 @@ request@^2.83.0: tunnel-agent "^0.6.0" uuid "^3.1.0" +request@^2.87.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -8296,6 +9553,11 @@ resolve-from@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" integrity sha1-six699nWiBvItuZTM17rywoYh0g= +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-options@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" @@ -8347,6 +9609,11 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +retry@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" + integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -8354,7 +9621,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@2, rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== @@ -8418,17 +9685,12 @@ run-node@^1.0.0: resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A== -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= + aproba "^1.1.1" rxjs@^6.1.0: version "6.3.2" @@ -8498,16 +9760,26 @@ semver-greatest-satisfied-range@^1.1.0: dependencies: sver-compat "^1.5.0" -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== +"semver@2.x || 3.x || 4 || 5", semver@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + semver@^5.5.1: version "5.5.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw== +semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -8632,6 +9904,16 @@ slice-ansi@1.0.0: dependencies: is-fullwidth-code-point "^2.0.0" +slide@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= + +smart-buffer@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" + integrity sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg== + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -8669,6 +9951,22 @@ sntp@2.x.x: dependencies: hoek "4.x.x" +socks-proxy-agent@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473" + integrity sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw== + dependencies: + agent-base "~4.2.0" + socks "~2.2.0" + +socks@~2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.2.tgz#f061219fc2d4d332afb4af93e865c84d3fa26e2b" + integrity sha512-g6wjBnnMOZpE0ym6e0uHSddz9p3a+WsBaaYQaBaSCJYvrC4IXykQR9MNGjLQf38e9iIIhp3b1/Zk8YZI3KGJ0Q== + dependencies: + ip "^1.1.5" + smart-buffer "^4.0.1" + sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -8809,6 +10107,13 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +ssri@^6.0.0, ssri@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" + integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + dependencies: + figgy-pudding "^3.5.1" + stack-trace@0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" @@ -8853,6 +10158,14 @@ stream-combiner2@^1.1.1: duplexer2 "~0.1.0" readable-stream "^2.0.2" +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + stream-exhaust@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" @@ -8956,6 +10269,11 @@ stringify-object@^3.2.2: is-obj "^1.0.1" is-regexp "^1.0.0" +stringify-package@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.0.tgz#e02828089333d7d45cd8c287c30aa9a13375081b" + integrity sha512-JIQqiWmLiEozOC0b0BtxZ/AOUtdUZHCBPgqIZ2kSJJqGwgb9neo44XdTHUC4HZSGqi03hOeB7W/E8rAlKnGe9g== + stringstream@~0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -8975,6 +10293,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.0.0.tgz#f78f68b5d0866c20b2c9b8c61b5298508dc8756f" + integrity sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow== + dependencies: + ansi-regex "^4.0.0" + strip-bom-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca" @@ -9017,15 +10342,13 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strong-log-transformer@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz#f7fb93758a69a571140181277eea0c2eb1301fa3" - integrity sha1-9/uTdYpppXEUAYEnfuoMLrEwH6M= +strong-log-transformer@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" + integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== dependencies: - byline "^5.0.0" duplexer "^0.1.1" - minimist "^0.1.0" - moment "^2.6.0" + minimist "^1.2.0" through "^2.3.4" subarg@^1.0.0: @@ -9101,6 +10424,15 @@ tapable@^0.2.7: resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" integrity sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI= +tar@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + integrity sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE= + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + tar@^4: version "4.4.1" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.1.tgz#b25d5a8470c976fd7a9a8a350f42c59e9fa81749" @@ -9114,12 +10446,25 @@ tar@^4: safe-buffer "^5.1.1" yallist "^3.0.2" +tar@^4.4.6: + version "4.4.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" + integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.3.4" + minizlib "^1.1.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= -temp-write@^3.3.0: +temp-write@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492" integrity sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= @@ -9131,14 +10476,6 @@ temp-write@^3.3.0: temp-dir "^1.0.0" uuid "^3.0.1" -tempfile@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" - integrity sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I= - dependencies: - os-tmpdir "^1.0.0" - uuid "^2.0.1" - test-exclude@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" @@ -9215,11 +10552,6 @@ time-stamp@^1.0.0: resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= -timed-out@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - timers-browserify@^1.0.1: version "1.4.2" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" @@ -9308,7 +10640,15 @@ tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.3: dependencies: punycode "^1.4.1" -tr46@^1.0.0: +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tr46@^1.0.0, tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= @@ -9406,6 +10746,16 @@ uglifyjs-webpack-plugin@^0.4.6: uglify-js "^2.8.29" webpack-sources "^1.0.1" +uid-number@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= + +umask@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" + integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= + umd@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.1.tgz#8ae556e11011f63c2596708a8837259f01b3d60e" @@ -9492,6 +10842,20 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" +unique-filename@^1.1.0, unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.1.tgz#5e9edc6d1ce8fb264db18a507ef9bd8544451ca6" + integrity sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg== + dependencies: + imurmurhash "^0.1.4" + unique-stream@^2.0.2: version "2.2.1" resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369" @@ -9513,11 +10877,6 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -unzip-response@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" - integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= - upath@^1.0.5: version "1.1.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" @@ -9540,13 +10899,6 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= - dependencies: - prepend-http "^1.0.1" - url@^0.11.0, url@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -9584,16 +10936,16 @@ util@0.10.3, util@^0.10.3, util@~0.10.1: dependencies: inherits "2.0.1" -uuid@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" - integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho= - uuid@^3.0.1, uuid@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" integrity sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA== +uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + v8flags@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.0.2.tgz#ad6a78a20a6b23d03a8debc11211e3cc23149477" @@ -9609,6 +10961,21 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +validate-npm-package-license@^3.0.3: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +validate-npm-package-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" + integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= + dependencies: + builtins "^1.0.3" + value-or-function@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" @@ -9871,6 +11238,15 @@ whatwg-url@^6.4.0: tr46 "^1.0.0" webidl-conversions "^4.0.1" +whatwg-url@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" @@ -9881,6 +11257,13 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= +which@1, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + which@^1.2.10, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" @@ -9945,7 +11328,7 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-json-file@^2.2.0: +write-json-file@^2.2.0, write-json-file@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.3.0.tgz#2b64c8a33004d54b8698c76d585a77ceb61da32f" integrity sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8= @@ -10000,6 +11383,11 @@ y18n@^3.2.1: resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= +"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -10010,6 +11398,14 @@ yallist@^3.0.0, yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k= +yargs-parser@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" + integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" @@ -10056,6 +11452,24 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" +yargs@^12.0.1: + version "12.0.5" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" + integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== + dependencies: + cliui "^4.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^1.0.1" + os-locale "^3.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1 || ^4.0.0" + yargs-parser "^11.1.1" + yargs@^6.5.0, yargs@^6.6.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" From 0bb720401bc73c99b6326fe8c61710803dc4d3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 20 Dec 2018 12:18:31 +0100 Subject: [PATCH 168/563] v7.2.3 --- lerna.json | 6 +++--- packages/babel-cli/package.json | 2 +- .../package.json | 4 ++-- packages/babel-helper-replace-supers/package.json | 4 ++-- packages/babel-parser/package.json | 2 +- .../package.json | 4 ++-- packages/babel-plugin-proposal-decorators/package.json | 4 ++-- .../babel-plugin-proposal-private-methods/package.json | 4 ++-- .../package.json | 2 +- packages/babel-polyfill/package.json | 2 +- packages/babel-preset-env-standalone/package.json | 6 +++--- packages/babel-preset-env/package.json | 4 ++-- packages/babel-standalone/package.json | 10 +++++----- packages/babel-traverse/package.json | 4 ++-- 14 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lerna.json b/lerna.json index 76d7779c18b9..c21684e2f908 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "7.2.2", + "version": "7.2.3", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", @@ -26,8 +26,8 @@ } }, "packages": [ - "packages/*", - "codemods/*" + "codemods/*", + "packages/*" ], "npmClient": "yarn", "npmClientArgs": [ diff --git a/packages/babel-cli/package.json b/packages/babel-cli/package.json index 9e56768fd1db..e596d173c1cc 100644 --- a/packages/babel-cli/package.json +++ b/packages/babel-cli/package.json @@ -1,6 +1,6 @@ { "name": "@babel/cli", - "version": "7.2.0", + "version": "7.2.3", "description": "Babel command line.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-helper-create-class-features-plugin/package.json b/packages/babel-helper-create-class-features-plugin/package.json index 5825e3bfe5a3..f8e3dfa2f613 100644 --- a/packages/babel-helper-create-class-features-plugin/package.json +++ b/packages/babel-helper-create-class-features-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-create-class-features-plugin", - "version": "7.2.2", + "version": "7.2.3", "author": "The Babel Team (https://babeljs.io/team)", "license": "MIT", "description": "Compile class public and private fields, private methods and decorators to ES6", @@ -18,7 +18,7 @@ "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0" + "@babel/helper-replace-supers": "^7.2.3" }, "peerDependencies": { "@babel/core": "^7.0.0" diff --git a/packages/babel-helper-replace-supers/package.json b/packages/babel-helper-replace-supers/package.json index 23fe71896e59..309e682b3abe 100644 --- a/packages/babel-helper-replace-supers/package.json +++ b/packages/babel-helper-replace-supers/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-replace-supers", - "version": "7.1.0", + "version": "7.2.3", "description": "Helper function to replace supers", "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-replace-supers", "license": "MIT", @@ -11,7 +11,7 @@ "dependencies": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.1.0", + "@babel/traverse": "^7.2.3", "@babel/types": "^7.0.0" } } diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index cb9896a4789b..e3898084ae9d 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/parser", - "version": "7.2.2", + "version": "7.2.3", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-plugin-proposal-class-properties/package.json b/packages/babel-plugin-proposal-class-properties/package.json index d9a98b2a3184..d1ef8d8fc685 100644 --- a/packages/babel-plugin-proposal-class-properties/package.json +++ b/packages/babel-plugin-proposal-class-properties/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-class-properties", - "version": "7.2.1", + "version": "7.2.3", "description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-class-properties", "license": "MIT", @@ -12,7 +12,7 @@ "babel-plugin" ], "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.2.1", + "@babel/helper-create-class-features-plugin": "^7.2.3", "@babel/helper-plugin-utils": "^7.0.0" }, "peerDependencies": { diff --git a/packages/babel-plugin-proposal-decorators/package.json b/packages/babel-plugin-proposal-decorators/package.json index 60f07b300d1d..3af095a5af21 100644 --- a/packages/babel-plugin-proposal-decorators/package.json +++ b/packages/babel-plugin-proposal-decorators/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-decorators", - "version": "7.2.2", + "version": "7.2.3", "author": "Logan Smyth ", "license": "MIT", "publishConfig": { @@ -15,7 +15,7 @@ "decorators" ], "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.2.2", + "@babel/helper-create-class-features-plugin": "^7.2.3", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-syntax-decorators": "^7.2.0" }, diff --git a/packages/babel-plugin-proposal-private-methods/package.json b/packages/babel-plugin-proposal-private-methods/package.json index e234970d0bb9..77b5be36df75 100644 --- a/packages/babel-plugin-proposal-private-methods/package.json +++ b/packages/babel-plugin-proposal-private-methods/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-private-methods", - "version": "7.2.1", + "version": "7.2.3", "description": "This plugin transforms private class methods", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-private-methods", "license": "MIT", @@ -12,7 +12,7 @@ "babel-plugin" ], "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.2.1", + "@babel/helper-create-class-features-plugin": "^7.2.3", "@babel/helper-plugin-utils": "^7.0.0" }, "peerDependencies": { diff --git a/packages/babel-plugin-transform-flow-strip-types/package.json b/packages/babel-plugin-transform-flow-strip-types/package.json index 0fd75b100ac9..765f29d27d92 100644 --- a/packages/babel-plugin-transform-flow-strip-types/package.json +++ b/packages/babel-plugin-transform-flow-strip-types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-flow-strip-types", - "version": "7.2.0", + "version": "7.2.3", "description": "Strip flow type annotations from your output code.", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-flow-strip-types", "license": "MIT", diff --git a/packages/babel-polyfill/package.json b/packages/babel-polyfill/package.json index 3e5ed2cba3ee..28fe22d43fe4 100644 --- a/packages/babel-polyfill/package.json +++ b/packages/babel-polyfill/package.json @@ -1,6 +1,6 @@ { "name": "@babel/polyfill", - "version": "7.0.0", + "version": "7.2.3", "description": "Provides polyfills necessary for a full ES2015+ environment", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-preset-env-standalone/package.json b/packages/babel-preset-env-standalone/package.json index 496176fd000e..4e2325bd41ad 100644 --- a/packages/babel-preset-env-standalone/package.json +++ b/packages/babel-preset-env-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/preset-env-standalone", - "version": "7.2.2", + "version": "7.2.3", "description": "Standalone build of babel-prest-env for use in non-Node.js environments.", "main": "babel-preset-env.js", "files": [ @@ -11,8 +11,8 @@ "devDependencies": { "@babel/plugin-proposal-json-strings": "^7.0.0", "@babel/plugin-transform-new-target": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/standalone": "^7.2.2" + "@babel/preset-env": "^7.2.3", + "@babel/standalone": "^7.2.3" }, "keywords": [ "babel", diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index 5bbf47d0e131..531f5af533aa 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -1,6 +1,6 @@ { "name": "@babel/preset-env", - "version": "7.2.0", + "version": "7.2.3", "description": "A Babel preset for each environment.", "author": "Henry Zhu ", "homepage": "https://babeljs.io/", @@ -60,7 +60,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/cli": "^7.2.0", + "@babel/cli": "^7.2.3", "@babel/core": "^7.2.0", "@babel/helper-fixtures": "^7.2.0", "@babel/helper-plugin-test-runner": "^7.0.0", diff --git a/packages/babel-standalone/package.json b/packages/babel-standalone/package.json index 020aedf504a2..2617471e0877 100644 --- a/packages/babel-standalone/package.json +++ b/packages/babel-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/standalone", - "version": "7.2.2", + "version": "7.2.3", "description": "Standalone build of Babel for use in non-Node.js environments.", "main": "babel.js", "files": [ @@ -13,8 +13,8 @@ "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-external-helpers": "^7.2.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-class-properties": "^7.2.0", - "@babel/plugin-proposal-decorators": "^7.2.2", + "@babel/plugin-proposal-class-properties": "^7.2.3", + "@babel/plugin-proposal-decorators": "^7.2.3", "@babel/plugin-proposal-do-expressions": "^7.2.0", "@babel/plugin-proposal-export-default-from": "^7.2.0", "@babel/plugin-proposal-export-namespace-from": "^7.2.0", @@ -27,7 +27,7 @@ "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-optional-chaining": "^7.2.0", "@babel/plugin-proposal-pipeline-operator": "^7.2.0", - "@babel/plugin-proposal-private-methods": "^7.2.0", + "@babel/plugin-proposal-private-methods": "^7.2.3", "@babel/plugin-proposal-throw-expressions": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", "@babel/plugin-syntax-async-generators": "^7.2.0", @@ -57,7 +57,7 @@ "@babel/plugin-transform-duplicate-keys": "^7.2.0", "@babel/plugin-transform-exponentiation-operator": "^7.2.0", "@babel/plugin-transform-flow-comments": "^7.2.0", - "@babel/plugin-transform-flow-strip-types": "^7.2.0", + "@babel/plugin-transform-flow-strip-types": "^7.2.3", "@babel/plugin-transform-for-of": "^7.2.0", "@babel/plugin-transform-function-name": "^7.2.0", "@babel/plugin-transform-instanceof": "^7.2.0", diff --git a/packages/babel-traverse/package.json b/packages/babel-traverse/package.json index c4f278770438..4495b3a9de1c 100644 --- a/packages/babel-traverse/package.json +++ b/packages/babel-traverse/package.json @@ -1,6 +1,6 @@ { "name": "@babel/traverse", - "version": "7.2.2", + "version": "7.2.3", "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -15,7 +15,7 @@ "@babel/generator": "^7.2.2", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.2", + "@babel/parser": "^7.2.3", "@babel/types": "^7.2.2", "debug": "^4.1.0", "globals": "^11.1.0", From e4174373550138fb1b0317e927436b3d3c2df874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 20 Dec 2018 12:50:41 +0100 Subject: [PATCH 169/563] Minify standalone --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index caeb4c8e8c63..3c0c0cebe4ca 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ prepublish: make test publish: prepublish - ./node_modules/.bin/lerna publish --force-publish="@babel/runtime,@babel/runtime-corejs2,@babel/standalone,@babel/preset-env-standalone" + ./node_modules/.bin/lerna publish --force-publish="@babel/runtime,@babel/runtime-corejs2,@babel/standalone,@babel/preset-env-standalone" --require-scripts make clean bootstrap: clean-all From 21228abfde5696a552bb42303f307b34bdf7ef6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 20 Dec 2018 13:08:41 +0100 Subject: [PATCH 170/563] v7.2.4 --- lerna.json | 2 +- packages/babel-preset-env-standalone/package.json | 4 ++-- packages/babel-standalone/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lerna.json b/lerna.json index c21684e2f908..4a8afbea137e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "7.2.3", + "version": "7.2.4", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-preset-env-standalone/package.json b/packages/babel-preset-env-standalone/package.json index 4e2325bd41ad..459395ebf206 100644 --- a/packages/babel-preset-env-standalone/package.json +++ b/packages/babel-preset-env-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/preset-env-standalone", - "version": "7.2.3", + "version": "7.2.4", "description": "Standalone build of babel-prest-env for use in non-Node.js environments.", "main": "babel-preset-env.js", "files": [ @@ -12,7 +12,7 @@ "@babel/plugin-proposal-json-strings": "^7.0.0", "@babel/plugin-transform-new-target": "^7.0.0", "@babel/preset-env": "^7.2.3", - "@babel/standalone": "^7.2.3" + "@babel/standalone": "^7.2.4" }, "keywords": [ "babel", diff --git a/packages/babel-standalone/package.json b/packages/babel-standalone/package.json index 2617471e0877..c94be6ef20db 100644 --- a/packages/babel-standalone/package.json +++ b/packages/babel-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/standalone", - "version": "7.2.3", + "version": "7.2.4", "description": "Standalone build of Babel for use in non-Node.js environments.", "main": "babel.js", "files": [ From bc347bab7aeb2a1d14c22443648134ba124311db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 21 Dec 2018 10:08:47 +0100 Subject: [PATCH 171/563] Add @babel/helpers to devDependencies of runtime and runtime-corejs2 (#9222) --- packages/babel-runtime-corejs2/package.json | 3 +++ packages/babel-runtime/package.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/babel-runtime-corejs2/package.json b/packages/babel-runtime-corejs2/package.json index 162641912c2f..46974a5e281b 100644 --- a/packages/babel-runtime-corejs2/package.json +++ b/packages/babel-runtime-corejs2/package.json @@ -11,5 +11,8 @@ "dependencies": { "core-js": "^2.5.7", "regenerator-runtime": "^0.12.0" + }, + "devDependencies": { + "@babel/helpers": "^7.2.0" } } diff --git a/packages/babel-runtime/package.json b/packages/babel-runtime/package.json index ad7b677d6dfd..a5b684245b61 100644 --- a/packages/babel-runtime/package.json +++ b/packages/babel-runtime/package.json @@ -10,5 +10,8 @@ "author": "Sebastian McKenzie ", "dependencies": { "regenerator-runtime": "^0.12.0" + }, + "devDependencies": { + "@babel/helpers": "^7.2.0" } } From f130981546ee1f825e1645df27510185c221b7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 21 Dec 2018 23:32:48 +0100 Subject: [PATCH 172/563] v7.2.5 --- lerna.json | 2 +- packages/babel-polyfill/package.json | 2 +- packages/babel-preset-env-standalone/package.json | 4 ++-- packages/babel-standalone/package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lerna.json b/lerna.json index 4a8afbea137e..acfea31df672 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "7.2.4", + "version": "7.2.5", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-polyfill/package.json b/packages/babel-polyfill/package.json index 28fe22d43fe4..e3cac1d392af 100644 --- a/packages/babel-polyfill/package.json +++ b/packages/babel-polyfill/package.json @@ -1,6 +1,6 @@ { "name": "@babel/polyfill", - "version": "7.2.3", + "version": "7.2.5", "description": "Provides polyfills necessary for a full ES2015+ environment", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-preset-env-standalone/package.json b/packages/babel-preset-env-standalone/package.json index 459395ebf206..ddeb959d0b99 100644 --- a/packages/babel-preset-env-standalone/package.json +++ b/packages/babel-preset-env-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/preset-env-standalone", - "version": "7.2.4", + "version": "7.2.5", "description": "Standalone build of babel-prest-env for use in non-Node.js environments.", "main": "babel-preset-env.js", "files": [ @@ -12,7 +12,7 @@ "@babel/plugin-proposal-json-strings": "^7.0.0", "@babel/plugin-transform-new-target": "^7.0.0", "@babel/preset-env": "^7.2.3", - "@babel/standalone": "^7.2.4" + "@babel/standalone": "^7.2.5" }, "keywords": [ "babel", diff --git a/packages/babel-standalone/package.json b/packages/babel-standalone/package.json index c94be6ef20db..86b68360adf1 100644 --- a/packages/babel-standalone/package.json +++ b/packages/babel-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/standalone", - "version": "7.2.4", + "version": "7.2.5", "description": "Standalone build of Babel for use in non-Node.js environments.", "main": "babel.js", "files": [ From d1aa665657792f00ff2a2a1658be242465f3651a Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Fri, 21 Dec 2018 21:39:06 -0500 Subject: [PATCH 173/563] update sponsors [skip ci] --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 78f533936c08..39bb8655e41b 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,6 @@ Become a sponsor and get your logo on our README on Github with a link to your s ## Bronze - ## Intro @@ -83,7 +82,7 @@ Try it out at our [REPL](https://babeljs.io/repl/build/master#?code_lz=NoRgNATGD ### Who maintains Babel? -Mostly a handful of volunteers! Please check out our [team page](https://babeljs.io/team)! +Mostly a handful of volunteers, funded by you! Please check out our [team page](https://babeljs.io/team)! ### Looking for support? From b5177ce2904640f94c3ef803fb89673224ad5b78 Mon Sep 17 00:00:00 2001 From: Armano Date: Sun, 23 Dec 2018 00:18:32 +0100 Subject: [PATCH 174/563] babel-parser: typescript: add missing bigint keyword (#9230) --- .../babel-parser/src/plugins/typescript.js | 2 + packages/babel-parser/src/types.js | 1 + .../typescript/types/keywords/input.js | 1 + .../typescript/types/keywords/output.json | 93 +++++++++++++++++-- 4 files changed, 91 insertions(+), 6 deletions(-) diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 95f8e61d02e9..c3c72d8139b0 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -45,6 +45,8 @@ function keywordTypeFromName( return "TSAnyKeyword"; case "boolean": return "TSBooleanKeyword"; + case "bigint": + return "TSBigIntKeyword"; case "never": return "TSNeverKeyword"; case "number": diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 7becea9d47b9..12cf06048c6e 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -1157,6 +1157,7 @@ export type TsKeywordTypeType = | "TSNumberKeyword" | "TSObjectKeyword" | "TSBooleanKeyword" + | "TSBigIntKeyword" | "TSStringKeyword" | "TSSymbolKeyword" | "TSVoidKeyword" diff --git a/packages/babel-parser/test/fixtures/typescript/types/keywords/input.js b/packages/babel-parser/test/fixtures/typescript/types/keywords/input.js index 0fec8f608a1c..e75b629a04cd 100644 --- a/packages/babel-parser/test/fixtures/typescript/types/keywords/input.js +++ b/packages/babel-parser/test/fixtures/typescript/types/keywords/input.js @@ -9,3 +9,4 @@ let st: string; let sy: symbol; let u: undefined; let v: void; +let n: bigint; diff --git a/packages/babel-parser/test/fixtures/typescript/types/keywords/output.json b/packages/babel-parser/test/fixtures/typescript/types/keywords/output.json index b223120ab536..4c6e48290b18 100644 --- a/packages/babel-parser/test/fixtures/typescript/types/keywords/output.json +++ b/packages/babel-parser/test/fixtures/typescript/types/keywords/output.json @@ -1,29 +1,29 @@ { "type": "File", "start": 0, - "end": 169, + "end": 184, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 11, - "column": 12 + "line": 12, + "column": 14 } }, "program": { "type": "Program", "start": 0, - "end": 169, + "end": 184, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 11, - "column": 12 + "line": 12, + "column": 14 } }, "sourceType": "module", @@ -919,6 +919,87 @@ } ], "kind": "let" + }, + { + "type": "VariableDeclaration", + "start": 170, + "end": 184, + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 14 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 174, + "end": 183, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 13 + } + }, + "id": { + "type": "Identifier", + "start": 174, + "end": 183, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 13 + }, + "identifierName": "n" + }, + "name": "n", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 175, + "end": 183, + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + }, + "typeAnnotation": { + "type": "TSBigIntKeyword", + "start": 177, + "end": 183, + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + } + }, + "init": null + } + ], + "kind": "let" } ], "directives": [] From 60ffe1d103b6b949d05211651f3347a0fd8598fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=C2=A0S=2E=C2=A0Choi?= Date: Thu, 20 Dec 2018 00:15:11 -0500 Subject: [PATCH 175/563] =?UTF-8?q?parser,=20smart=20pipes:=20Add=20test?= =?UTF-8?q?=20for=20async=E2=80=93await?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../input.js | 3 + .../options.json | 3 + .../output.json | 181 ++++++++++++++++++ 3 files changed, 187 insertions(+) create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/output.json diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/input.js new file mode 100644 index 000000000000..ea421c59a0f3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/input.js @@ -0,0 +1,3 @@ +async function f () { + return x |> await #; +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/output.json new file mode 100644 index 000000000000..9337eb29bf60 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-async-await/output.json @@ -0,0 +1,181 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "f" + }, + "name": "f" + }, + "generator": false, + "async": true, + "params": [], + "body": { + "type": "BlockStatement", + "start": 20, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 24, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 31, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 21 + } + }, + "left": { + "type": "Identifier", + "start": 31, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 36, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 21 + } + }, + "expression": { + "type": "AwaitExpression", + "start": 36, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 21 + } + }, + "argument": { + "type": "PipelinePrimaryTopicReference", + "start": 42, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file From c586d4e8cac816941bf2ba559472fd9cc3150921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=C2=A0S=2E=C2=A0Choi?= Date: Thu, 20 Dec 2018 00:21:27 -0500 Subject: [PATCH 176/563] parser, smart pipes: Add support for yield in pipeline bodies Fixes #9178. --- packages/babel-parser/src/tokenizer/types.js | 9 +- .../input.js | 3 + .../options.json | 3 + .../output.json | 186 ++++++++++++++++++ 4 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/output.json diff --git a/packages/babel-parser/src/tokenizer/types.js b/packages/babel-parser/src/tokenizer/types.js index b83c75def710..7bc41f9dbc37 100644 --- a/packages/babel-parser/src/tokenizer/types.js +++ b/packages/babel-parser/src/tokenizer/types.js @@ -13,7 +13,12 @@ // expressions and divisions. It is set on all token types that can // be followed by an expression (thus, a slash after them would be a // regular expression). -// + +// The `startsExpr` property is used to determine whether an expression +// may be the “argument” subexpression of a `yield` expression or +// `yield` statement. It is set on all token types that may be at the +// start of a subexpression. + // `isLoop` marks a keyword as starting a loop, which is important // to know when parsing a label, in order to allow or disallow // continue jumps to that label. @@ -104,7 +109,7 @@ export const types: { [name: string]: TokenType } = { backQuote: new TokenType("`", { startsExpr }), dollarBraceL: new TokenType("${", { beforeExpr, startsExpr }), at: new TokenType("@"), - hash: new TokenType("#"), + hash: new TokenType("#", { startsExpr }), // Special hashbang token. interpreterDirective: new TokenType("#!..."), diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/input.js b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/input.js new file mode 100644 index 000000000000..c35ae3c9db32 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/input.js @@ -0,0 +1,3 @@ +function * f () { + return x |> (yield #); +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/options.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/options.json new file mode 100644 index 000000000000..17e4e327bbad --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/options.json @@ -0,0 +1,3 @@ +{ + "plugins": [["pipelineOperator", { "proposal": "smart" }]] +} diff --git a/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/output.json b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/output.json new file mode 100644 index 000000000000..ad59accc2de2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/pipeline-operator/proposal-smart-topic-style,-generator-yield/output.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "f" + }, + "name": "f" + }, + "generator": true, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 16, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 20, + "end": 42, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 24 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 27, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "left": { + "type": "Identifier", + "start": 27, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + }, + "identifierName": "x" + }, + "name": "x" + }, + "operator": "|>", + "right": { + "type": "PipelineTopicExpression", + "start": 32, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "expression": { + "type": "YieldExpression", + "start": 33, + "end": 40, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "delegate": false, + "argument": { + "type": "PipelinePrimaryTopicReference", + "start": 39, + "end": 40, + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "extra": { + "parenthesized": true, + "parenStart": 32 + } + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file From 3f9a1c08cc70ac5bfc21bff13ef51eea1bd06f27 Mon Sep 17 00:00:00 2001 From: David Laban Date: Thu, 27 Dec 2018 11:49:34 +0000 Subject: [PATCH 177/563] Add tests for babel-types.isType (#9243) --- packages/babel-types/test/validators.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/babel-types/test/validators.js b/packages/babel-types/test/validators.js index f285b1105694..4b59edeb2725 100644 --- a/packages/babel-types/test/validators.js +++ b/packages/babel-types/test/validators.js @@ -122,4 +122,19 @@ describe("validators", function() { expect(t.isReferenced(node, parent)).toBe(true); }); }); + + describe("isType", function() { + it("returns true if nodeType equals targetType", function() { + expect(t.isType("Identifier", "Identifier")).toBe(true); + }); + it("returns false if targetType is a primary node type", function() { + expect(t.isType("Expression", "ArrayExpression")).toBe(false); + }); + it("returns true if targetType is an alias of nodeType", function() { + expect(t.isType("ArrayExpression", "Expression")).toBe(true); + }); + it("returns false if nodeType and targetType are unrelated", function() { + expect(t.isType("ArrayExpression", "ClassBody")).toBe(false); + }); + }); }); From ea1c436ea1f021a9e7815e6d561cc07ad4b6e056 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Thu, 27 Dec 2018 09:54:28 -0600 Subject: [PATCH 178/563] Fix handling scoped packages in preset-env include/exclude options (#9219) --- .../babel-preset-env/src/normalize-options.js | 2 +- .../preset-options/include-scoped/input.mjs | 1 + .../include-scoped/options.json | 14 ++++++ .../preset-options/include-scoped/output.mjs | 5 ++ .../test/normalize-options.spec.js | 50 +++++++++++++++---- 5 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/include-scoped/input.mjs create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/include-scoped/options.json create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/include-scoped/output.mjs diff --git a/packages/babel-preset-env/src/normalize-options.js b/packages/babel-preset-env/src/normalize-options.js index 75144356e137..77ea2cd0cf7d 100644 --- a/packages/babel-preset-env/src/normalize-options.js +++ b/packages/babel-preset-env/src/normalize-options.js @@ -76,7 +76,7 @@ const validBrowserslistTargets = [ ]; export const normalizePluginName = (plugin: string): string => - plugin.replace(/^babel-plugin-/, ""); + plugin.replace(/^(@babel\/|babel-)(plugin-)?/, ""); export const checkDuplicateIncludeExcludes = ( include: Array = [], diff --git a/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/input.mjs b/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/input.mjs new file mode 100644 index 000000000000..4e6a6de65314 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/input.mjs @@ -0,0 +1 @@ +class Foo {} diff --git a/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/options.json b/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/options.json new file mode 100644 index 000000000000..e990f37eb8d0 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/options.json @@ -0,0 +1,14 @@ +{ + "presets": [ + [ + "../../../../lib", + { + "targets": { + "chrome": 61 + }, + "include": ["@babel/plugin-transform-classes"], + "modules": false + } + ] + ] +} diff --git a/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/output.mjs new file mode 100644 index 000000000000..0040583f4714 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/include-scoped/output.mjs @@ -0,0 +1,5 @@ +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +let Foo = function Foo() { + _classCallCheck(this, Foo); +}; diff --git a/packages/babel-preset-env/test/normalize-options.spec.js b/packages/babel-preset-env/test/normalize-options.spec.js index 7a0f481f7bf7..fa0825216056 100644 --- a/packages/babel-preset-env/test/normalize-options.spec.js +++ b/packages/babel-preset-env/test/normalize-options.spec.js @@ -12,11 +12,30 @@ describe("normalize-options", () => { describe("normalizeOptions", () => { it("should return normalized `include` and `exclude`", () => { const normalized = normalizeOptions.default({ - include: ["babel-plugin-transform-spread", "transform-classes"], + include: [ + "babel-plugin-transform-spread", + "transform-classes", + "@babel/plugin-transform-unicode-regex", + "@babel/transform-block-scoping", + ], + exclude: [ + "babel-plugin-transform-for-of", + "transform-parameters", + "@babel/plugin-transform-regenerator", + "@babel/transform-new-target", + ], }); expect(normalized.include).toEqual([ "transform-spread", "transform-classes", + "transform-unicode-regex", + "transform-block-scoping", + ]); + expect(normalized.exclude).toEqual([ + "transform-for-of", + "transform-parameters", + "transform-regenerator", + "transform-new-target", ]); }); @@ -25,15 +44,26 @@ describe("normalize-options", () => { expect(normalized).toBe("prefix-babel-plugin-postfix"); }); - it("should throw if duplicate names in `include` and `exclude`", () => { - const normalizeWithSameIncludes = () => { - normalizeOptions.default({ - include: ["babel-plugin-transform-spread"], - exclude: ["transform-spread"], - }); - }; - expect(normalizeWithSameIncludes).toThrow(); - }); + test.each` + include | exclude + ${["babel-plugin-transform-spread"]} | ${["transform-spread"]} + ${["@babel/plugin-transform-spread"]} | ${["transform-spread"]} + ${["transform-spread"]} | ${["babel-plugin-transform-spread"]} + ${["transform-spread"]} | ${["@babel/plugin-transform-spread"]} + ${["babel-plugin-transform-spread"]} | ${["@babel/plugin-transform-spread"]} + ${["@babel/plugin-transform-spread"]} | ${["babel-plugin-transform-spread"]} + ${["@babel/plugin-transform-spread"]} | ${["@babel/transform-spread"]} + ${["@babel/transform-spread"]} | ${["@babel/plugin-transform-spread"]} + ${["babel-plugin-transform-spread"]} | ${["@babel/transform-spread"]} + ${["@babel/transform-spread"]} | ${["babel-plugin-transform-spread"]} + `( + "should throw if with includes $include and excludes $exclude", + ({ include, exclude }) => { + expect(() => + normalizeOptions.default({ include, exclude }), + ).toThrowError(/were found in both/); + }, + ); }); describe("Config format validation", () => { From 9d1d0fe57af8e02e200007d65340592d85298b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 29 Dec 2018 22:54:30 +0100 Subject: [PATCH 179/563] Add mixins support to the _decorate helper (#9166) --- packages/babel-helpers/src/helpers.js | 799 ++++++++++++++------------ 1 file changed, 416 insertions(+), 383 deletions(-) diff --git a/packages/babel-helpers/src/helpers.js b/packages/babel-helpers/src/helpers.js index 4c3c896fcc48..79f525509696 100644 --- a/packages/babel-helpers/src/helpers.js +++ b/packages/babel-helpers/src/helpers.js @@ -1213,23 +1213,430 @@ helpers.decorate = helper("7.1.5")` */ + /*:: + + type Placements = { + static: Key[], + prototype: Key[], + own: Key[], + }; + + */ + // ClassDefinitionEvaluation (Steps 26-*) export default function _decorate( decorators /*: ClassDecorator[] */, factory /*: ClassFactory */, superClass /*: ?Class<*> */, + mixins /*: ?Array */, ) /*: Class<*> */ { + var api = _getDecoratorsApi(); + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + api = mixins[i](api); + } + } + var r = factory(function initialize(O) { - _initializeInstanceElements(O, decorated.elements); + api.initializeInstanceElements(O, decorated.elements); }, superClass); - var decorated = _decorateClass( + var decorated = api.decorateClass( _coalesceClassElements(r.d.map(_createElementDescriptor)), decorators, ); - _initializeClassElements(r.F, decorated.elements); + api.initializeClassElements(r.F, decorated.elements); - return _runClassFinishers(r.F, decorated.finishers); + return api.runClassFinishers(r.F, decorated.finishers); + } + + function _getDecoratorsApi() { + _getDecoratorsApi = function() { + return api; + }; + + var api = { + elementsDefinitionOrder: [["method"], ["field"]], + + // InitializeInstanceElements + initializeInstanceElements: function( + /*::*/ O /*: C */, + elements /*: ElementDescriptor[] */, + ) { + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element /*: ElementDescriptor */) { + if (element.kind === kind && element.placement === "own") { + this.defineClassElement(O, element); + } + }, this); + }, this); + }, + + // InitializeClassElements + initializeClassElements: function( + /*::*/ F /*: Class */, + elements /*: ElementDescriptor[] */, + ) { + var proto = F.prototype; + + ["method", "field"].forEach(function(kind) { + elements.forEach(function(element /*: ElementDescriptor */) { + var placement = element.placement; + if ( + element.kind === kind && + (placement === "static" || placement === "prototype") + ) { + var receiver = placement === "static" ? F : proto; + this.defineClassElement(receiver, element); + } + }, this); + }, this); + }, + + // DefineClassElement + defineClassElement: function( + /*::*/ receiver /*: C | Class */, + element /*: ElementDescriptor */, + ) { + var descriptor /*: PropertyDescriptor */ = element.descriptor; + if (element.kind === "field") { + var initializer = element.initializer; + descriptor = { + enumerable: descriptor.enumerable, + writable: descriptor.writable, + configurable: descriptor.configurable, + value: initializer === void 0 ? void 0 : initializer.call(receiver), + }; + } + Object.defineProperty(receiver, element.key, descriptor); + }, + + // DecorateClass + decorateClass: function( + elements /*: ElementDescriptor[] */, + decorators /*: ClassDecorator[] */, + ) /*: ElementsFinishers */ { + var newElements /*: ElementDescriptor[] */ = []; + var finishers /*: ClassFinisher[] */ = []; + var placements /*: Placements */ = { + static: [], + prototype: [], + own: [], + }; + + elements.forEach(function(element /*: ElementDescriptor */) { + this.addElementPlacement(element, placements); + }, this); + + elements.forEach(function(element /*: ElementDescriptor */) { + if (!_hasDecorators(element)) return newElements.push(element); + + var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement( + element, + placements, + ); + newElements.push(elementFinishersExtras.element); + newElements.push.apply(newElements, elementFinishersExtras.extras); + finishers.push.apply(finishers, elementFinishersExtras.finishers); + }, this); + + if (!decorators) { + return { elements: newElements, finishers: finishers }; + } + + var result /*: ElementsFinishers */ = this.decorateConstructor( + newElements, + decorators, + ); + finishers.push.apply(finishers, result.finishers); + result.finishers = finishers; + + return result; + }, + + // AddElementPlacement + addElementPlacement: function( + element /*: ElementDescriptor */, + placements /*: Placements */, + silent /*: boolean */, + ) { + var keys = placements[element.placement]; + if (!silent && keys.indexOf(element.key) !== -1) { + throw new TypeError("Duplicated element (" + element.key + ")"); + } + keys.push(element.key); + }, + + // DecorateElement + decorateElement: function( + element /*: ElementDescriptor */, + placements /*: Placements */, + ) /*: ElementFinishersExtras */ { + var extras /*: ElementDescriptor[] */ = []; + var finishers /*: ClassFinisher[] */ = []; + + for ( + var decorators = element.decorators, i = decorators.length - 1; + i >= 0; + i-- + ) { + // (inlined) RemoveElementPlacement + var keys = placements[element.placement]; + keys.splice(keys.indexOf(element.key), 1); + + var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor( + element, + ); + var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras( + (0, decorators[i])(elementObject) /*: ElementObjectOutput */ || + elementObject, + ); + + element = elementFinisherExtras.element; + this.addElementPlacement(element, placements); + + if (elementFinisherExtras.finisher) { + finishers.push(elementFinisherExtras.finisher); + } + + var newExtras /*: ElementDescriptor[] | void */ = + elementFinisherExtras.extras; + if (newExtras) { + for (var j = 0; j < newExtras.length; j++) { + this.addElementPlacement(newExtras[j], placements); + } + extras.push.apply(extras, newExtras); + } + } + + return { element: element, finishers: finishers, extras: extras }; + }, + + // DecorateConstructor + decorateConstructor: function( + elements /*: ElementDescriptor[] */, + decorators /*: ClassDecorator[] */, + ) /*: ElementsFinishers */ { + var finishers /*: ClassFinisher[] */ = []; + + for (var i = decorators.length - 1; i >= 0; i--) { + var obj /*: ClassObject */ = this.fromClassDescriptor(elements); + var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor( + (0, decorators[i])(obj) /*: ClassObject */ || obj, + ); + + if (elementsAndFinisher.finisher !== undefined) { + finishers.push(elementsAndFinisher.finisher); + } + + if (elementsAndFinisher.elements !== undefined) { + elements = elementsAndFinisher.elements; + + for (var j = 0; j < elements.length - 1; j++) { + for (var k = j + 1; k < elements.length; k++) { + if ( + elements[j].key === elements[k].key && + elements[j].placement === elements[k].placement + ) { + throw new TypeError( + "Duplicated element (" + elements[j].key + ")", + ); + } + } + } + } + } + + return { elements: elements, finishers: finishers }; + }, + + // FromElementDescriptor + fromElementDescriptor: function( + element /*: ElementDescriptor */, + ) /*: ElementObject */ { + var obj /*: ElementObject */ = { + kind: element.kind, + key: element.key, + placement: element.placement, + descriptor: element.descriptor, + }; + + var desc = { + value: "Descriptor", + configurable: true, + }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + + if (element.kind === "field") obj.initializer = element.initializer; + + return obj; + }, + + // ToElementDescriptors + toElementDescriptors: function( + elementObjects /*: ElementObject[] */, + ) /*: ElementDescriptor[] */ { + if (elementObjects === undefined) return; + return toArray(elementObjects).map(function(elementObject) { + var element = this.toElementDescriptor(elementObject); + this.disallowProperty(elementObject, "finisher", "An element descriptor"); + this.disallowProperty(elementObject, "extras", "An element descriptor"); + return element; + }, this); + }, + + // ToElementDescriptor + toElementDescriptor: function( + elementObject /*: ElementObject */, + ) /*: ElementDescriptor */ { + var kind = String(elementObject.kind); + if (kind !== "method" && kind !== "field") { + throw new TypeError( + 'An element descriptor\\'s .kind property must be either "method" or' + + ' "field", but a decorator created an element descriptor with' + + ' .kind "' + + kind + + '"', + ); + } + + var key = toPropertyKey(elementObject.key); + + var placement = String(elementObject.placement); + if ( + placement !== "static" && + placement !== "prototype" && + placement !== "own" + ) { + throw new TypeError( + 'An element descriptor\\'s .placement property must be one of "static",' + + ' "prototype" or "own", but a decorator created an element descriptor' + + ' with .placement "' + + placement + + '"', + ); + } + + var descriptor /*: PropertyDescriptor */ = elementObject.descriptor; + + this.disallowProperty(elementObject, "elements", "An element descriptor"); + + var element /*: ElementDescriptor */ = { + kind: kind, + key: key, + placement: placement, + descriptor: Object.assign({}, descriptor), + }; + + if (kind !== "field") { + this.disallowProperty(elementObject, "initializer", "A method descriptor"); + } else { + this.disallowProperty( + descriptor, + "get", + "The property descriptor of a field descriptor", + ); + this.disallowProperty( + descriptor, + "set", + "The property descriptor of a field descriptor", + ); + this.disallowProperty( + descriptor, + "value", + "The property descriptor of a field descriptor", + ); + + element.initializer = elementObject.initializer; + } + + return element; + }, + + toElementFinisherExtras: function( + elementObject /*: ElementObject */, + ) /*: ElementFinisherExtras */ { + var element /*: ElementDescriptor */ = this.toElementDescriptor( + elementObject, + ); + var finisher /*: ClassFinisher */ = _optionalCallableProperty( + elementObject, + "finisher", + ); + var extras /*: ElementDescriptors[] */ = this.toElementDescriptors( + elementObject.extras, + ); + + return { element: element, finisher: finisher, extras: extras }; + }, + + // FromClassDescriptor + fromClassDescriptor: function( + elements /*: ElementDescriptor[] */, + ) /*: ClassObject */ { + var obj = { + kind: "class", + elements: elements.map(this.fromElementDescriptor, this), + }; + + var desc = { value: "Descriptor", configurable: true }; + Object.defineProperty(obj, Symbol.toStringTag, desc); + + return obj; + }, + + // ToClassDescriptor + toClassDescriptor: function( + obj /*: ClassObject */, + ) /*: ElementsFinisher */ { + var kind = String(obj.kind); + if (kind !== "class") { + throw new TypeError( + 'A class descriptor\\'s .kind property must be "class", but a decorator' + + ' created a class descriptor with .kind "' + + kind + + '"', + ); + } + + this.disallowProperty(obj, "key", "A class descriptor"); + this.disallowProperty(obj, "placement", "A class descriptor"); + this.disallowProperty(obj, "descriptor", "A class descriptor"); + this.disallowProperty(obj, "initializer", "A class descriptor"); + this.disallowProperty(obj, "extras", "A class descriptor"); + + var finisher = _optionalCallableProperty(obj, "finisher"); + var elements = this.toElementDescriptors(obj.elements); + + return { elements: elements, finisher: finisher }; + }, + + // RunClassFinishers + runClassFinishers: function( + constructor /*: Class<*> */, + finishers /*: ClassFinisher[] */, + ) /*: Class<*> */ { + for (var i = 0; i < finishers.length; i++) { + var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor); + if (newConstructor !== undefined) { + // NOTE: This should check if IsConstructor(newConstructor) is false. + if (typeof newConstructor !== "function") { + throw new TypeError("Finishers must return a constructor."); + } + constructor = newConstructor; + } + } + return constructor; + }, + + disallowProperty: function(obj, name, objectType) { + if (obj[name] !== undefined) { + throw new TypeError(objectType + " can't have a ." + name + " property."); + } + } + }; + + return api; } // ClassElementEvaluation @@ -1264,8 +1671,8 @@ helpers.decorate = helper("7.1.5")` placement: def.static ? "static" : def.kind === "field" - ? "own" - : "prototype", + ? "own" + : "prototype", descriptor: descriptor, }; if (def.decorators) element.decorators = def.decorators; @@ -1292,7 +1699,9 @@ helpers.decorate = helper("7.1.5")` ) /*: ElementDescriptor[] */ { var newElements /*: ElementDescriptor[] */ = []; - var isSameElement = function(other /*: ElementDescriptor */) /*: boolean */ { + var isSameElement = function( + other /*: ElementDescriptor */, + ) /*: boolean */ { return ( other.kind === "method" && other.key === element.key && @@ -1351,365 +1760,6 @@ helpers.decorate = helper("7.1.5")` ); } - // InitializeClassElements - function _initializeClassElements /*::*/( - F /*: Class */, - elements /*: ElementDescriptor[] */, - ) { - var proto = F.prototype; - - ["method", "field"].forEach(function(kind) { - elements.forEach(function(element /*: ElementDescriptor */) { - var placement = element.placement; - if ( - element.kind === kind && - (placement === "static" || placement === "prototype") - ) { - var receiver = placement === "static" ? F : proto; - _defineClassElement(receiver, element); - } - }); - }); - } - - // InitializeInstanceElements - function _initializeInstanceElements /*::*/( - O /*: C */, - elements /*: ElementDescriptor[] */, - ) { - ["method", "field"].forEach(function(kind) { - elements.forEach(function(element /*: ElementDescriptor */) { - if (element.kind === kind && element.placement === "own") { - _defineClassElement(O, element); - } - }); - }); - } - - // DefineClassElement - function _defineClassElement /*::*/( - receiver /*: C | Class */, - element /*: ElementDescriptor */, - ) { - var descriptor /*: PropertyDescriptor */ = element.descriptor; - if (element.kind === "field") { - var initializer = element.initializer; - descriptor = { - enumerable: descriptor.enumerable, - writable: descriptor.writable, - configurable: descriptor.configurable, - value: initializer === void 0 ? void 0 : initializer.call(receiver), - }; - } - Object.defineProperty(receiver, element.key, descriptor); - } - - /*:: - - type Placements = { - static: Key[], - prototype: Key[], - own: Key[], - }; - - */ - - // DecorateClass - function _decorateClass( - elements /*: ElementDescriptor[] */, - decorators /*: ClassDecorator[] */, - ) /*: ElementsFinishers */ { - var newElements /*: ElementDescriptor[] */ = []; - var finishers /*: ClassFinisher[] */ = []; - var placements /*: Placements */ = { static: [], prototype: [], own: [] }; - - elements.forEach(function(element /*: ElementDescriptor */) { - _addElementPlacement(element, placements); - }); - - elements.forEach(function(element /*: ElementDescriptor */) { - if (!_hasDecorators(element)) return newElements.push(element); - - var elementFinishersExtras /*: ElementFinishersExtras */ = _decorateElement( - element, - placements, - ); - newElements.push(elementFinishersExtras.element); - newElements.push.apply(newElements, elementFinishersExtras.extras); - finishers.push.apply(finishers, elementFinishersExtras.finishers); - }); - - if (!decorators) { - return { elements: newElements, finishers: finishers }; - } - - var result /*: ElementsFinishers */ = _decorateConstructor( - newElements, - decorators, - ); - finishers.push.apply(finishers, result.finishers); - result.finishers = finishers; - - return result; - } - - // AddElementPlacement - function _addElementPlacement( - element /*: ElementDescriptor */, - placements /*: Placements */, - silent /*: boolean */, - ) { - var keys = placements[element.placement]; - if (!silent && keys.indexOf(element.key) !== -1) { - throw new TypeError("Duplicated element (" + element.key + ")"); - } - keys.push(element.key); - } - - // DecorateElement - function _decorateElement( - element /*: ElementDescriptor */, - placements /*: Placements */, - ) /*: ElementFinishersExtras */ { - var extras /*: ElementDescriptor[] */ = []; - var finishers /*: ClassFinisher[] */ = []; - - for ( - var decorators = element.decorators, i = decorators.length - 1; - i >= 0; - i-- - ) { - // (inlined) RemoveElementPlacement - var keys = placements[element.placement]; - keys.splice(keys.indexOf(element.key), 1); - - var elementObject /*: ElementObjectInput */ = _fromElementDescriptor( - element, - ); - var elementFinisherExtras /*: ElementFinisherExtras */ = _toElementFinisherExtras( - (0, decorators[i])(elementObject) /*: ElementObjectOutput */ || - elementObject, - ); - - element = elementFinisherExtras.element; - _addElementPlacement(element, placements); - - if (elementFinisherExtras.finisher) { - finishers.push(elementFinisherExtras.finisher); - } - - var newExtras /*: ElementDescriptor[] | void */ = - elementFinisherExtras.extras; - if (newExtras) { - for (var j = 0; j < newExtras.length; j++) { - _addElementPlacement(newExtras[j], placements); - } - extras.push.apply(extras, newExtras); - } - } - - return { element: element, finishers: finishers, extras: extras }; - } - - // DecorateConstructor - function _decorateConstructor( - elements /*: ElementDescriptor[] */, - decorators /*: ClassDecorator[] */, - ) /*: ElementsFinishers */ { - var finishers /*: ClassFinisher[] */ = []; - - for (var i = decorators.length - 1; i >= 0; i--) { - var obj /*: ClassObject */ = _fromClassDescriptor(elements); - var elementsAndFinisher /*: ElementsFinisher */ = _toClassDescriptor( - (0, decorators[i])(obj) /*: ClassObject */ || obj, - ); - - if (elementsAndFinisher.finisher !== undefined) { - finishers.push(elementsAndFinisher.finisher); - } - - if (elementsAndFinisher.elements !== undefined) { - elements = elementsAndFinisher.elements; - - for (var j = 0; j < elements.length - 1; j++) { - for (var k = j + 1; k < elements.length; k++) { - if ( - elements[j].key === elements[k].key && - elements[j].placement === elements[k].placement - ) { - throw new TypeError("Duplicated element (" + elements[j].key + ")"); - } - } - } - } - } - - return { elements: elements, finishers: finishers }; - } - - // FromElementDescriptor - function _fromElementDescriptor( - element /*: ElementDescriptor */, - ) /*: ElementObject */ { - var obj /*: ElementObject */ = { - kind: element.kind, - key: element.key, - placement: element.placement, - descriptor: element.descriptor, - }; - - var desc = { - value: "Descriptor", - configurable: true, - }; - Object.defineProperty(obj, Symbol.toStringTag, desc); - - if (element.kind === "field") obj.initializer = element.initializer; - - return obj; - } - - // ToElementDescriptors - function _toElementDescriptors( - elementObjects /*: ElementObject[] */, - ) /*: ElementDescriptor[] */ { - if (elementObjects === undefined) return; - return toArray(elementObjects).map(function(elementObject) { - var element = _toElementDescriptor(elementObject); - _disallowProperty(elementObject, "finisher", "An element descriptor"); - _disallowProperty(elementObject, "extras", "An element descriptor"); - return element; - }); - } - - // ToElementDescriptor - function _toElementDescriptor( - elementObject /*: ElementObject */, - ) /*: ElementDescriptor */ { - var kind = String(elementObject.kind); - if (kind !== "method" && kind !== "field") { - throw new TypeError( - 'An element descriptor\\'s .kind property must be either "method" or' + - ' "field", but a decorator created an element descriptor with' + - ' .kind "' + - kind + - '"', - ); - } - - var key = toPropertyKey(elementObject.key); - - var placement = String(elementObject.placement); - if ( - placement !== "static" && - placement !== "prototype" && - placement !== "own" - ) { - throw new TypeError( - 'An element descriptor\\'s .placement property must be one of "static",' + - ' "prototype" or "own", but a decorator created an element descriptor' + - ' with .placement "' + - placement + - '"', - ); - } - - var descriptor /*: PropertyDescriptor */ = elementObject.descriptor; - - _disallowProperty(elementObject, "elements", "An element descriptor"); - - var element /*: ElementDescriptor */ = { - kind: kind, - key: key, - placement: placement, - descriptor: Object.assign({}, descriptor), - }; - - if (kind !== "field") { - _disallowProperty(elementObject, "initializer", "A method descriptor"); - } else { - _disallowProperty( - descriptor, - "get", - "The property descriptor of a field descriptor", - ); - _disallowProperty( - descriptor, - "set", - "The property descriptor of a field descriptor", - ); - _disallowProperty( - descriptor, - "value", - "The property descriptor of a field descriptor", - ); - - element.initializer = elementObject.initializer; - } - - return element; - } - - function _toElementFinisherExtras( - elementObject /*: ElementObject */, - ) /*: ElementFinisherExtras */ { - var element /*: ElementDescriptor */ = _toElementDescriptor(elementObject); - var finisher /*: ClassFinisher */ = _optionalCallableProperty( - elementObject, - "finisher", - ); - var extras /*: ElementDescriptors[] */ = _toElementDescriptors( - elementObject.extras, - ); - - return { element: element, finisher: finisher, extras: extras }; - } - - // FromClassDescriptor - function _fromClassDescriptor( - elements /*: ElementDescriptor[] */, - ) /*: ClassObject */ { - var obj = { - kind: "class", - elements: elements.map(_fromElementDescriptor), - }; - - var desc = { value: "Descriptor", configurable: true }; - Object.defineProperty(obj, Symbol.toStringTag, desc); - - return obj; - } - - // ToClassDescriptor - function _toClassDescriptor(obj /*: ClassObject */) /*: ElementsFinisher */ { - var kind = String(obj.kind); - if (kind !== "class") { - throw new TypeError( - 'A class descriptor\\'s .kind property must be "class", but a decorator' + - ' created a class descriptor with .kind "' + - kind + - '"', - ); - } - - _disallowProperty(obj, "key", "A class descriptor"); - _disallowProperty(obj, "placement", "A class descriptor"); - _disallowProperty(obj, "descriptor", "A class descriptor"); - _disallowProperty(obj, "initializer", "A class descriptor"); - _disallowProperty(obj, "extras", "A class descriptor"); - - var finisher = _optionalCallableProperty(obj, "finisher"); - var elements = _toElementDescriptors(obj.elements); - - return { elements: elements, finisher: finisher }; - } - - function _disallowProperty(obj, name, objectType) { - if (obj[name] !== undefined) { - throw new TypeError(objectType + " can't have a ." + name + " property."); - } - } - function _optionalCallableProperty /*::*/( obj /*: T */, name /*: $Keys */, @@ -1721,23 +1771,6 @@ helpers.decorate = helper("7.1.5")` return value; } - // RunClassFinishers - function _runClassFinishers( - constructor /*: Class<*> */, - finishers /*: ClassFinisher[] */, - ) /*: Class<*> */ { - for (var i = 0; i < finishers.length; i++) { - var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor); - if (newConstructor !== undefined) { - // NOTE: This should check if IsConstructor(newConstructor) is false. - if (typeof newConstructor !== "function") { - throw new TypeError("Finishers must return a constructor."); - } - constructor = newConstructor; - } - } - return constructor; - } `; helpers.classPrivateMethodGet = helper("7.1.6")` From 49f52bbcb353342b1873d0e12ea9e05199a169fc Mon Sep 17 00:00:00 2001 From: Berlam Henderson Date: Thu, 3 Jan 2019 23:12:03 +0800 Subject: [PATCH 180/563] Bump license years for 2019 (#9271) --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index a06ec0e70f28..194ee0743bf3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2018 Sebastian McKenzie and other contributors +Copyright (c) 2014-2019 Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From 865eb93c2dd34ceb5ef7fbfae09242b435bc219e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 3 Jan 2019 20:33:44 +0100 Subject: [PATCH 181/563] [private methods] Define private methods before executing initializers (#9248) --- .../src/fields.js | 4 +-- .../before-fields/exec.js | 16 +++++++++ .../before-fields/input.js | 13 +++++++ .../before-fields/output.js | 33 ++++++++++++++++++ .../private-method/before-fields/exec.js | 16 +++++++++ .../private-method/before-fields/input.js | 13 +++++++ .../private-method/before-fields/output.js | 34 +++++++++++++++++++ 7 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/exec.js create mode 100644 packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/input.js create mode 100644 packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/output.js create mode 100644 packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/exec.js create mode 100644 packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/input.js create mode 100644 packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/output.js diff --git a/packages/babel-helper-create-class-features-plugin/src/fields.js b/packages/babel-helper-create-class-features-plugin/src/fields.js index c1807bb132aa..a895e28310d5 100644 --- a/packages/babel-helper-create-class-features-plugin/src/fields.js +++ b/packages/babel-helper-create-class-features-plugin/src/fields.js @@ -366,7 +366,7 @@ export function buildFieldsInitNodes( ); break; case isInstance && isPrivate && isMethod && loose: - instanceNodes.push( + instanceNodes.unshift( buildPrivateMethodInitLoose( t.thisExpression(), prop, @@ -378,7 +378,7 @@ export function buildFieldsInitNodes( ); break; case isInstance && isPrivate && isMethod && !loose: - instanceNodes.push( + instanceNodes.unshift( buildPrivateInstanceMethodInitSpec( t.thisExpression(), prop, diff --git a/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/exec.js b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/exec.js new file mode 100644 index 000000000000..26caf2d02c1f --- /dev/null +++ b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/exec.js @@ -0,0 +1,16 @@ +class Cl { + prop = this.#method(1); + + #priv = this.#method(2); + + #method(x) { + return x; + } + + getPriv() { + return this.#priv; + } +} + +expect(new Cl().prop).toBe(1); +expect(new Cl().getPriv()).toBe(2); diff --git a/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/input.js b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/input.js new file mode 100644 index 000000000000..2fcb7857468f --- /dev/null +++ b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/input.js @@ -0,0 +1,13 @@ +class Cl { + prop = this.#method(1); + + #priv = this.#method(2); + + #method(x) { + return x; + } + + getPriv() { + return this.#priv; + } +} diff --git a/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/output.js b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/output.js new file mode 100644 index 000000000000..60b5075fa17a --- /dev/null +++ b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/before-fields/output.js @@ -0,0 +1,33 @@ +var Cl = +/*#__PURE__*/ +function () { + "use strict"; + + function Cl() { + babelHelpers.classCallCheck(this, Cl); + Object.defineProperty(this, _method, { + value: _method2 + }); + this.prop = babelHelpers.classPrivateFieldLooseBase(this, _method)[_method](1); + Object.defineProperty(this, _priv, { + writable: true, + value: babelHelpers.classPrivateFieldLooseBase(this, _method)[_method](2) + }); + } + + babelHelpers.createClass(Cl, [{ + key: "getPriv", + value: function getPriv() { + return babelHelpers.classPrivateFieldLooseBase(this, _priv)[_priv]; + } + }]); + return Cl; +}(); + +var _priv = babelHelpers.classPrivateFieldLooseKey("priv"); + +var _method = babelHelpers.classPrivateFieldLooseKey("method"); + +var _method2 = function _method2(x) { + return x; +}; diff --git a/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/exec.js b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/exec.js new file mode 100644 index 000000000000..26caf2d02c1f --- /dev/null +++ b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/exec.js @@ -0,0 +1,16 @@ +class Cl { + prop = this.#method(1); + + #priv = this.#method(2); + + #method(x) { + return x; + } + + getPriv() { + return this.#priv; + } +} + +expect(new Cl().prop).toBe(1); +expect(new Cl().getPriv()).toBe(2); diff --git a/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/input.js b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/input.js new file mode 100644 index 000000000000..2fcb7857468f --- /dev/null +++ b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/input.js @@ -0,0 +1,13 @@ +class Cl { + prop = this.#method(1); + + #priv = this.#method(2); + + #method(x) { + return x; + } + + getPriv() { + return this.#priv; + } +} diff --git a/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/output.js b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/output.js new file mode 100644 index 000000000000..905eb0968284 --- /dev/null +++ b/packages/babel-plugin-proposal-private-methods/test/fixtures/private-method/before-fields/output.js @@ -0,0 +1,34 @@ +var Cl = +/*#__PURE__*/ +function () { + "use strict"; + + function Cl() { + babelHelpers.classCallCheck(this, Cl); + + _method.add(this); + + babelHelpers.defineProperty(this, "prop", babelHelpers.classPrivateMethodGet(this, _method, _method2).call(this, 1)); + + _priv.set(this, { + writable: true, + value: babelHelpers.classPrivateMethodGet(this, _method, _method2).call(this, 2) + }); + } + + babelHelpers.createClass(Cl, [{ + key: "getPriv", + value: function getPriv() { + return babelHelpers.classPrivateFieldGet(this, _priv); + } + }]); + return Cl; +}(); + +var _priv = new WeakMap(); + +var _method = new WeakSet(); + +var _method2 = function _method2(x) { + return x; +}; From a58893d1e316221c278ff3106e02c47fbf4d8838 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Fri, 4 Jan 2019 10:02:09 -0600 Subject: [PATCH 182/563] Ensure modifiers are included in TSParameterProperty ranges (#9276) --- .../babel-parser/src/plugins/typescript.js | 17 +++++++---- .../options.json | 2 +- .../output.json | 4 +-- .../class/parameter-properties/output.json | 28 +++++++++---------- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index c3c72d8139b0..0d5d380c307c 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -1364,6 +1364,10 @@ export default (superClass: Class): Class => allowModifiers: ?boolean, decorators: N.Decorator[], ): N.Pattern | N.TSParameterProperty { + // Store original location/position to include modifiers in range + const startPos = this.state.start; + const startLoc = this.state.startLoc; + let accessibility: ?N.Accessibility; let readonly = false; if (allowModifiers) { @@ -1375,7 +1379,7 @@ export default (superClass: Class): Class => this.parseAssignableListItemTypes(left); const elt = this.parseMaybeDefault(left.start, left.loc.start, left); if (accessibility || readonly) { - const pp: N.TSParameterProperty = this.startNodeAtNode(elt); + const pp: N.TSParameterProperty = this.startNodeAt(startPos, startLoc); if (decorators.length) { pp.decorators = decorators; } @@ -1389,12 +1393,13 @@ export default (superClass: Class): Class => } pp.parameter = elt; return this.finishNode(pp, "TSParameterProperty"); - } else { - if (decorators.length) { - left.decorators = decorators; - } - return elt; } + + if (decorators.length) { + left.decorators = decorators; + } + + return elt; } parseFunctionBodyAndFinish( diff --git a/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/options.json b/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/options.json index 67137f21076c..b84b0421721a 100644 --- a/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/options.json +++ b/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-binding-patterns/options.json @@ -1,3 +1,3 @@ { - "throws": "A parameter property may not be declared using a binding pattern. (2:23)" + "throws": "A parameter property may not be declared using a binding pattern. (2:16)" } diff --git a/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-with-decorators/output.json b/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-with-decorators/output.json index 22072d89e474..a131ac8e6978 100644 --- a/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-with-decorators/output.json +++ b/packages/babel-parser/test/fixtures/typescript/class/parameter-properties-with-decorators/output.json @@ -116,12 +116,12 @@ "params": [ { "type": "TSParameterProperty", - "start": 40, + "start": 31, "end": 49, "loc": { "start": { "line": 2, - "column": 30 + "column": 21 }, "end": { "line": 2, diff --git a/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/output.json b/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/output.json index 8b9473031680..219e2a2a60b7 100644 --- a/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/output.json +++ b/packages/babel-parser/test/fixtures/typescript/class/parameter-properties/output.json @@ -116,12 +116,12 @@ "params": [ { "type": "TSParameterProperty", - "start": 44, + "start": 35, "end": 45, "loc": { "start": { "line": 3, - "column": 17 + "column": 8 }, "end": { "line": 3, @@ -149,12 +149,12 @@ }, { "type": "TSParameterProperty", - "start": 62, + "start": 55, "end": 72, "loc": { "start": { "line": 4, - "column": 15 + "column": 8 }, "end": { "line": 4, @@ -212,12 +212,12 @@ }, { "type": "TSParameterProperty", - "start": 92, + "start": 82, "end": 95, "loc": { "start": { "line": 5, - "column": 18 + "column": 8 }, "end": { "line": 5, @@ -246,12 +246,12 @@ }, { "type": "TSParameterProperty", - "start": 113, + "start": 105, "end": 124, "loc": { "start": { "line": 6, - "column": 16 + "column": 8 }, "end": { "line": 6, @@ -310,12 +310,12 @@ }, { "type": "TSParameterProperty", - "start": 150, + "start": 134, "end": 153, "loc": { "start": { "line": 7, - "column": 24 + "column": 8 }, "end": { "line": 7, @@ -344,12 +344,12 @@ }, { "type": "TSParameterProperty", - "start": 215, + "start": 206, "end": 220, "loc": { "start": { "line": 9, - "column": 17 + "column": 8 }, "end": { "line": 9, @@ -430,12 +430,12 @@ }, { "type": "TSParameterProperty", - "start": 237, + "start": 230, "end": 251, "loc": { "start": { "line": 10, - "column": 15 + "column": 8 }, "end": { "line": 10, From 54f072991d1ba5ecfabe5fa61b7a6b483306729c Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Sat, 5 Jan 2019 22:22:49 -0800 Subject: [PATCH 183/563] Revert "Revert babel-helper-builder-react-jsx change from #4988" (#9119) This reverts commit dbc07220ae9188a3fb2bdea3d826ff7f48532a2e. # Conflicts: # packages/babel-helper-builder-react-jsx/src/index.js --- packages/babel-helper-builder-react-jsx/src/index.js | 7 +++++++ .../react/should-disallow-spread-children/input.js | 1 + .../react/should-disallow-spread-children/options.json | 3 +++ 3 files changed, 11 insertions(+) create mode 100644 packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/input.js create mode 100644 packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/options.json diff --git a/packages/babel-helper-builder-react-jsx/src/index.js b/packages/babel-helper-builder-react-jsx/src/index.js index 4f2473ae5062..3602ecb8496e 100644 --- a/packages/babel-helper-builder-react-jsx/src/index.js +++ b/packages/babel-helper-builder-react-jsx/src/index.js @@ -19,6 +19,13 @@ You can turn on the 'throwIfNamespace' flag to bypass this warning.`, ); } }; + + visitor.JSXSpreadChild = function(path) { + throw path.buildCodeFrameError( + "Spread children are not supported in React.", + ); + }; + visitor.JSXElement = { exit(path, file) { const callExpr = buildElementCall(path, file); diff --git a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/input.js b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/input.js new file mode 100644 index 000000000000..6a05e108dc66 --- /dev/null +++ b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/input.js @@ -0,0 +1 @@ +
{...children}
; diff --git a/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/options.json b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/options.json new file mode 100644 index 000000000000..bcb773e34314 --- /dev/null +++ b/packages/babel-plugin-transform-react-jsx/test/fixtures/react/should-disallow-spread-children/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Spread children are not supported in React." +} From efc60a1703d788b6f4962a7824e9c90abcaaa598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sun, 6 Jan 2019 20:59:02 +0100 Subject: [PATCH 184/563] Add test sources to prettierignore (#9287) [skip ci] --- .prettierignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.prettierignore b/.prettierignore index 0318d666e9dc..e86c7aa505d3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,5 @@ package.json packages/babel-preset-env/data +packages/*/test/fixtures/**/input.* +packages/*/test/fixtures/**/exec.* +packages/*/test/fixtures/**/output.* From e43777bb5f00a3037a3ee37589c9684384148414 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Sun, 6 Jan 2019 16:39:14 -0800 Subject: [PATCH 185/563] Fix location for typescript type assertions in AST (#9284) --- packages/babel-parser/src/plugins/typescript.js | 3 ++- .../fixtures/typescript/cast/need-parentheses/output.json | 4 ++-- .../typescript/cast/type-assertion-after-operator/output.json | 4 ++-- .../typescript/cast/type-assertion-and-assign/output.json | 4 ++-- .../cast/type-assertion-before-operator/output.json | 4 ++-- .../test/fixtures/typescript/cast/type-assertion/output.json | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 0d5d380c307c..1a0c8c7a652d 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -896,6 +896,7 @@ export default (superClass: Class): Class => tsParseTypeAssertion(): N.TsTypeAssertion { const node: N.TsTypeAssertion = this.startNode(); + this.next(); // < // Not actually necessary to set state.inType because we never reach here if JSX plugin is enabled, // but need `tsInType` to satisfy the assertion in `tsParseType`. node.typeAnnotation = this.tsInType(() => this.tsParseType()); @@ -2001,7 +2002,7 @@ export default (superClass: Class): Class => // Handle type assertions parseMaybeUnary(refShorthandDefaultPos?: ?Pos): N.Expression { - if (!this.hasPlugin("jsx") && this.eatRelational("<")) { + if (!this.hasPlugin("jsx") && this.isRelational("<")) { return this.tsParseTypeAssertion(); } else { return super.parseMaybeUnary(refShorthandDefaultPos); diff --git a/packages/babel-parser/test/fixtures/typescript/cast/need-parentheses/output.json b/packages/babel-parser/test/fixtures/typescript/cast/need-parentheses/output.json index 8895830ae739..bb02e0d6956a 100644 --- a/packages/babel-parser/test/fixtures/typescript/cast/need-parentheses/output.json +++ b/packages/babel-parser/test/fixtures/typescript/cast/need-parentheses/output.json @@ -59,12 +59,12 @@ }, "object": { "type": "TSTypeAssertion", - "start": 2, + "start": 1, "end": 6, "loc": { "start": { "line": 1, - "column": 2 + "column": 1 }, "end": { "line": 1, diff --git a/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-after-operator/output.json b/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-after-operator/output.json index 8f2d74a4e5fa..f8020782bcc6 100644 --- a/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-after-operator/output.json +++ b/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-after-operator/output.json @@ -80,12 +80,12 @@ "operator": "+", "right": { "type": "TSTypeAssertion", - "start": 5, + "start": 4, "end": 14, "loc": { "start": { "line": 1, - "column": 5 + "column": 4 }, "end": { "line": 1, diff --git a/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-and-assign/output.json b/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-and-assign/output.json index 84ad7e4d64d0..964e552cfc5f 100644 --- a/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-and-assign/output.json +++ b/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-and-assign/output.json @@ -60,12 +60,12 @@ "operator": "+=", "left": { "type": "TSTypeAssertion", - "start": 2, + "start": 1, "end": 11, "loc": { "start": { "line": 1, - "column": 2 + "column": 1 }, "end": { "line": 1, diff --git a/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-before-operator/output.json b/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-before-operator/output.json index 1599d9ec1425..34f750336a37 100644 --- a/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-before-operator/output.json +++ b/packages/babel-parser/test/fixtures/typescript/cast/type-assertion-before-operator/output.json @@ -59,12 +59,12 @@ }, "left": { "type": "TSTypeAssertion", - "start": 1, + "start": 0, "end": 10, "loc": { "start": { "line": 1, - "column": 1 + "column": 0 }, "end": { "line": 1, diff --git a/packages/babel-parser/test/fixtures/typescript/cast/type-assertion/output.json b/packages/babel-parser/test/fixtures/typescript/cast/type-assertion/output.json index 5d5a05d21acf..0da048e7ef02 100644 --- a/packages/babel-parser/test/fixtures/typescript/cast/type-assertion/output.json +++ b/packages/babel-parser/test/fixtures/typescript/cast/type-assertion/output.json @@ -45,12 +45,12 @@ }, "expression": { "type": "TSTypeAssertion", - "start": 1, + "start": 0, "end": 10, "loc": { "start": { "line": 1, - "column": 1 + "column": 0 }, "end": { "line": 1, From 25e880d3559fea54fd7bf93ba60db4abbb39076c Mon Sep 17 00:00:00 2001 From: James George Date: Mon, 7 Jan 2019 20:19:20 +0530 Subject: [PATCH 186/563] Add follow on twitter badge (#9264) [skip ci] --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 39bb8655e41b..eb6b885d448f 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Coverage Status Slack Status npm Downloads + Follow on Twitter

Supporting Babel

From b211b810d1a610a5e84422c835bf90b3d9a248d7 Mon Sep 17 00:00:00 2001 From: Sven Sauleau Date: Mon, 7 Jan 2019 22:52:11 +0800 Subject: [PATCH 187/563] Use 2014-present in license (#9290) --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 194ee0743bf3..f31575ec773b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2019 Sebastian McKenzie and other contributors +Copyright (c) 2014-present Sebastian McKenzie and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From a55382e4ad6aac34a75c4996da36eb6e5a751281 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 7 Jan 2019 08:52:36 -0600 Subject: [PATCH 188/563] Test262 update (#9288) --- Makefile | 4 +- .../test262/run_babel_parser_test262_utils.js | 137 +- scripts/tests/test262/test262_whitelist.txt | 2437 +++++++++-------- 3 files changed, 1381 insertions(+), 1197 deletions(-) diff --git a/Makefile b/Makefile index 3c0c0cebe4ca..5f9edf90b22c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ MAKEFLAGS = -j1 -FLOW_COMMIT = e192e1a4793dd8e43415fbfe8046d832cb513c8b -TEST262_COMMIT = 238c88d4a084d9928372954e2fec54af2c951281 +FLOW_COMMIT = 2ac56861e3ceff9ca406ae586fbafb3480c6c0b7 +TEST262_COMMIT = f77b930e6720f8005d5302acaedd434e13bf2fe2 # Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967 export FORCE_COLOR = true diff --git a/scripts/tests/test262/run_babel_parser_test262_utils.js b/scripts/tests/test262/run_babel_parser_test262_utils.js index 249e1b7c2c8a..4a0bf1b25756 100644 --- a/scripts/tests/test262/run_babel_parser_test262_utils.js +++ b/scripts/tests/test262/run_babel_parser_test262_utils.js @@ -13,96 +13,98 @@ const pfs = { const parse = require("../../../packages/babel-parser").parse; const ignoredFeatures = [ + "Array.prototype.flat", + "Array.prototype.flatMap", + "Array.prototype.values", + "ArrayBuffer", "async-functions", "async-iteration", "arrow-function", + "Atomics", + "caller", "class", + "computed-property-names", "const", + "cross-realm", + "DataView", + "DataView.prototype.getFloat32", + "DataView.prototype.getFloat64", + "DataView.prototype.getInt8", + "DataView.prototype.getInt16", + "DataView.prototype.getInt32", + "DataView.prototype.getUint16", + "DataView.prototype.getUint32", + "DataView.prototype.setUint8", + "default-parameters", "destructuring-assignment", + "destructuring-binding", + "Float32Array", + "Float64Array", "for-of", "generators", - "let", - "template", - "Reflect.construct", - "Symbol", - "TypedArray", - "cross-realm", - "Reflect", - "DataView", - "ArrayBuffer", - "Symbol.toStringTag", - "Atomics", - "SharedArrayBuffer", - "Int8Array", - "Symbol.toPrimitive", - "caller", - "Symbol.iterator", - "u180e", - "Proxy", - "Symbol.match", - "regexp-dotall", - "Symbol.matchAll", - "Set", - "WeakSet", "globalThis", + "Int8Array", + "Int32Array", + "Intl.ListFormat", "Intl.Locale", - "tail-call-optimization", - "default-parameters", + "Intl.NumberFormat-unified", + "Intl.RelativeTimeFormat", + "Intl.Segmenter", + "IsHTMLDDA", + "json-superset", + "let", + "Map", "new.target", - "super", - "Symbol.unscopables", - "Symbol.species", - "Symbol.asyncIterator", - "Float32Array", - "Float64Array", - "Uint16Array", - "Uint8Array", - "Uint8ClampedArray", - "computed-property-names", - "well-formed-json-stringify", - "object-spread", - "object-rest", - "optional-catch-binding", "Object.fromEntries", "Object.is", - "Reflect.setPrototypeOf", + "object-rest", + "object-spread", + "optional-catch-binding", + "Promise.prototype.finally", + "Proxy", + "Reflect", + "Reflect.construct", "Reflect.set", - "String.fromCodePoint", + "Reflect.setPrototypeOf", + "regexp-dotall", "regexp-lookbehind", "regexp-named-groups", "regexp-unicode-property-escapes", - "Symbol.hasInstance", - "Symbol.isConcatSpreadable", - "Symbol.replace", - "Symbol.search", - "Symbol.split", - "Array.prototype.values", - "Intl.ListFormat", - "Intl.RelativeTimeFormat", - "Intl.Segmenter", - "destructuring-binding", - "json-superset", - "Map", - "IsHTMLDDA", - "Array.prototype.flat", - "Array.prototype.flatMap", - "DataView.prototype.setUint8", - "DataView.prototype.getFloat32", - "DataView.prototype.getFloat64", - "DataView.prototype.getInt16", - "DataView.prototype.getInt32", - "DataView.prototype.getInt8", - "DataView.prototype.getUint16", - "DataView.prototype.getUint32", - "WeakMap", - "Promise.prototype.finally", + "SharedArrayBuffer", + "Set", + "String.fromCodePoint", "String.prototype.endsWith", "String.prototype.includes", "String.prototype.matchAll", - "string-trimming", "String.prototype.trimEnd", "String.prototype.trimStart", + "string-trimming", + "super", + "Symbol", + "Symbol.asyncIterator", + "Symbol.hasInstance", + "Symbol.isConcatSpreadable", + "Symbol.iterator", + "Symbol.match", + "Symbol.matchAll", "Symbol.prototype.description", + "Symbol.replace", + "Symbol.search", + "Symbol.split", + "Symbol.species", + "Symbol.toPrimitive", + "Symbol.toStringTag", + "Symbol.unscopables", + "tail-call-optimization", + "template", + "TypedArray", + "u180e", + "Uint8Array", + "Uint8ClampedArray", + "Uint16Array", + "WeakMap", + "WeakSet", + "well-formed-json-stringify", ]; const featuresToPlugins = { @@ -228,6 +230,7 @@ exports.updateWhitelist = function(filename, summary) { return line !== null; }) .concat(toAdd) + .sort() .join("\n"); return pfs.writeFile(filename, newContents, "utf-8"); diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index c1601fbfc893..603c65360c94 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -1,4 +1,3 @@ - annexB/language/function-code/if-decl-else-decl-a-func-block-scoping.js(default) annexB/language/function-code/if-decl-else-decl-a-func-existing-block-fn-no-init.js(default) annexB/language/function-code/if-decl-else-decl-a-func-existing-block-fn-update.js(default) @@ -179,470 +178,8 @@ annexB/language/global-code/if-stmt-else-decl-global-skip-early-err-switch.js(de annexB/language/global-code/if-stmt-else-decl-global-skip-early-err-try.js(default) annexB/language/global-code/if-stmt-else-decl-global-skip-early-err.js(default) annexB/language/global-code/if-stmt-else-decl-global-update.js(default) -language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(default) -language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(strict mode) -language/expressions/assignment/dstr-obj-id-identifier-yield-ident-valid.js(default) -language/expressions/object/let-non-strict-access.js(default) -language/expressions/object/let-non-strict-syntax.js(default) -language/expressions/object/yield-non-strict-access.js(default) -language/expressions/object/yield-non-strict-syntax.js(default) -language/statements/for/head-lhs-let.js(default) -language/statements/for/let-block-with-newline.js(default) -language/statements/for/let-identifier-with-newline.js(default) -language/statements/for-await-of/let-block-with-newline.js(default) -language/statements/for-await-of/let-identifier-with-newline.js(default) -language/statements/for-in/head-lhs-let.js(default) -language/statements/for-in/head-var-bound-names-let.js(default) -language/statements/for-in/identifier-let-allowed-as-lefthandside-expression-not-strict.js(default) -language/statements/for-in/let-block-with-newline.js(default) -language/statements/for-in/let-identifier-with-newline.js(default) -language/statements/for-of/dstr-obj-id-identifier-yield-ident-valid.js(default) -language/statements/for-of/head-var-bound-names-let.js(default) -language/statements/for-of/let-block-with-newline.js(default) -language/statements/for-of/let-identifier-with-newline.js(default) -language/statements/if/let-block-with-newline.js(default) -language/statements/if/let-identifier-with-newline.js(default) -language/statements/labeled/let-block-with-newline.js(default) -language/statements/labeled/let-identifier-with-newline.js(default) -language/statements/labeled/value-yield-non-strict-escaped.js(default) -language/statements/labeled/value-yield-non-strict.js(default) -language/statements/let/syntax/escaped-let.js(default) -language/statements/while/let-block-with-newline.js(default) -language/statements/while/let-identifier-with-newline.js(default) -language/statements/with/let-block-with-newline.js(default) -language/statements/with/let-identifier-with-newline.js(default) annexB/language/statements/for-in/bare-initializer.js(default) annexB/language/statements/for-in/bare-initializer.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/expressions/assignment/dstr-array-rest-before-elision.js(default) -language/expressions/assignment/dstr-array-rest-before-elision.js(strict mode) -language/expressions/assignment/dstr-array-rest-elision-invalid.js(default) -language/expressions/assignment/dstr-array-rest-elision-invalid.js(strict mode) -language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-default.js(default) -language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-default.js(strict mode) -language/expressions/async-arrow-function/early-errors-arrow-await-in-formals.js(default) -language/expressions/async-arrow-function/early-errors-arrow-await-in-formals.js(strict mode) -language/expressions/async-arrow-function/early-errors-arrow-formals-body-duplicate.js(default) -language/expressions/async-arrow-function/early-errors-arrow-formals-body-duplicate.js(strict mode) -language/expressions/async-function/early-errors-expression-formals-body-duplicate.js(default) -language/expressions/async-function/early-errors-expression-formals-body-duplicate.js(strict mode) -language/expressions/async-function/named-dflt-params-duplicates.js(default) -language/expressions/async-function/nameless-dflt-params-duplicates.js(default) -language/expressions/function/dflt-params-duplicates.js(default) -language/expressions/generators/dflt-params-duplicates.js(default) -language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(default) -language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(strict mode) -language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js(default) -language/expressions/object/method-definition/gen-meth-dflt-params-duplicates.js(default) -language/expressions/object/method-definition/generator-param-redecl-const.js(default) -language/expressions/object/method-definition/generator-param-redecl-const.js(strict mode) -language/expressions/object/method-definition/generator-param-redecl-let.js(default) -language/expressions/object/method-definition/generator-param-redecl-let.js(strict mode) -language/expressions/object/method-definition/meth-dflt-params-duplicates.js(default) -language/expressions/object/method-definition/name-param-redecl.js(default) -language/expressions/object/method-definition/name-param-redecl.js(strict mode) -language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js(default) -language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js(strict mode) -language/expressions/yield/in-iteration-stmt.js(default) -language/expressions/yield/in-iteration-stmt.js(strict mode) -language/expressions/yield/star-in-iteration-stmt.js(default) -language/expressions/yield/star-in-iteration-stmt.js(strict mode) -language/global-code/new.target-arrow.js(default) -language/global-code/new.target-arrow.js(strict mode) -language/import/dup-bound-names.js(default) -language/import/dup-bound-names.js(strict mode) -language/literals/regexp/early-err-pattern.js(default) -language/literals/regexp/early-err-pattern.js(strict mode) -language/literals/regexp/invalid-braced-quantifier-exact.js(default) -language/literals/regexp/invalid-braced-quantifier-exact.js(strict mode) -language/literals/regexp/invalid-braced-quantifier-lower.js(default) -language/literals/regexp/invalid-braced-quantifier-lower.js(strict mode) -language/literals/regexp/invalid-braced-quantifier-range.js(default) -language/literals/regexp/invalid-braced-quantifier-range.js(strict mode) -language/literals/regexp/u-dec-esc.js(default) -language/literals/regexp/u-dec-esc.js(strict mode) -language/literals/regexp/u-invalid-class-escape.js(default) -language/literals/regexp/u-invalid-class-escape.js(strict mode) -language/literals/regexp/u-invalid-extended-pattern-char.js(default) -language/literals/regexp/u-invalid-extended-pattern-char.js(strict mode) -language/literals/regexp/u-invalid-identity-escape.js(default) -language/literals/regexp/u-invalid-identity-escape.js(strict mode) -language/literals/regexp/u-invalid-legacy-octal-escape.js(default) -language/literals/regexp/u-invalid-legacy-octal-escape.js(strict mode) -language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.js(default) -language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.js(strict mode) -language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.js(default) -language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.js(strict mode) -language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.js(default) -language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.js(strict mode) -language/literals/regexp/u-invalid-non-empty-class-ranges.js(default) -language/literals/regexp/u-invalid-non-empty-class-ranges.js(strict mode) -language/literals/regexp/u-invalid-oob-decimal-escape.js(default) -language/literals/regexp/u-invalid-oob-decimal-escape.js(strict mode) -language/literals/regexp/u-unicode-esc-bounds.js(default) -language/literals/regexp/u-unicode-esc-bounds.js(strict mode) -language/literals/regexp/u-unicode-esc-non-hex.js(default) -language/literals/regexp/u-unicode-esc-non-hex.js(strict mode) -language/literals/regexp/unicode-escape-nls-err.js(default) -language/literals/regexp/unicode-escape-nls-err.js(strict mode) -language/literals/string/legacy-non-octal-escape-sequence-strict.js(strict mode) -language/module-code/early-export-global.js(default) -language/module-code/early-export-global.js(strict mode) -language/module-code/early-export-unresolvable.js(default) -language/module-code/early-export-unresolvable.js(strict mode) -language/module-code/early-lex-and-var.js(default) -language/module-code/early-lex-and-var.js(strict mode) -language/module-code/parse-err-hoist-lex-fun.js(default) -language/module-code/parse-err-hoist-lex-fun.js(strict mode) -language/module-code/parse-err-hoist-lex-gen.js(default) -language/module-code/parse-err-hoist-lex-gen.js(strict mode) -language/statements/async-function/dflt-params-duplicates.js(default) -language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(default) -language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(strict mode) -language/statements/class/async-meth-escaped-async.js(default) -language/statements/class/async-meth-escaped-async.js(strict mode) -language/statements/class/strict-mode/with.js(default) -language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(default) -language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(strict mode) -language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(default) -language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(strict mode) -language/statements/const/redeclaration-error-from-within-strict-mode-function-const.js(default) -language/statements/do-while/decl-async-fun.js(default) -language/statements/do-while/decl-async-fun.js(strict mode) -language/statements/do-while/labelled-fn-stmt.js(default) -language/statements/for/decl-async-fun.js(default) -language/statements/for/decl-async-fun.js(strict mode) -language/statements/for/head-let-bound-names-in-stmt.js(default) -language/statements/for/head-let-bound-names-in-stmt.js(strict mode) -language/statements/for/labelled-fn-stmt-expr.js(default) -language/statements/for/labelled-fn-stmt-let.js(default) -language/statements/for/labelled-fn-stmt-var.js(default) -language/statements/for-in/decl-async-fun.js(default) -language/statements/for-in/decl-async-fun.js(strict mode) -language/statements/for-in/dstr-array-rest-before-elision.js(default) -language/statements/for-in/dstr-array-rest-before-elision.js(strict mode) -language/statements/for-in/dstr-array-rest-elision-invalid.js(default) -language/statements/for-in/dstr-array-rest-elision-invalid.js(strict mode) -language/statements/for-in/head-const-bound-names-dup.js(default) -language/statements/for-in/head-const-bound-names-dup.js(strict mode) -language/statements/for-in/head-const-bound-names-in-stmt.js(default) -language/statements/for-in/head-const-bound-names-in-stmt.js(strict mode) -language/statements/for-in/head-let-bound-names-dup.js(default) -language/statements/for-in/head-let-bound-names-dup.js(strict mode) -language/statements/for-in/head-let-bound-names-in-stmt.js(default) -language/statements/for-in/head-let-bound-names-in-stmt.js(strict mode) -language/statements/for-in/labelled-fn-stmt-const.js(default) -language/statements/for-in/labelled-fn-stmt-let.js(default) -language/statements/for-in/labelled-fn-stmt-lhs.js(default) -language/statements/for-in/labelled-fn-stmt-var.js(default) -language/statements/for-of/decl-async-fun.js(default) -language/statements/for-of/decl-async-fun.js(strict mode) -language/statements/for-of/dstr-array-rest-before-elision.js(default) -language/statements/for-of/dstr-array-rest-before-elision.js(strict mode) -language/statements/for-of/dstr-array-rest-elision-invalid.js(default) -language/statements/for-of/dstr-array-rest-elision-invalid.js(strict mode) -language/statements/for-of/head-const-bound-names-dup.js(default) -language/statements/for-of/head-const-bound-names-dup.js(strict mode) -language/statements/for-of/head-const-bound-names-in-stmt.js(default) -language/statements/for-of/head-const-bound-names-in-stmt.js(strict mode) -language/statements/for-of/head-decl-no-expr.js(default) -language/statements/for-of/head-decl-no-expr.js(strict mode) -language/statements/for-of/head-expr-no-expr.js(default) -language/statements/for-of/head-expr-no-expr.js(strict mode) -language/statements/for-of/head-let-bound-names-dup.js(default) -language/statements/for-of/head-let-bound-names-dup.js(strict mode) -language/statements/for-of/head-let-bound-names-in-stmt.js(default) -language/statements/for-of/head-let-bound-names-in-stmt.js(strict mode) -language/statements/for-of/head-var-no-expr.js(default) -language/statements/for-of/head-var-no-expr.js(strict mode) -language/statements/for-of/labelled-fn-stmt-const.js(default) -language/statements/for-of/labelled-fn-stmt-let.js(default) -language/statements/for-of/labelled-fn-stmt-lhs.js(default) -language/statements/for-of/labelled-fn-stmt-var.js(default) -language/statements/function/dflt-params-duplicates.js(default) -language/statements/generators/dflt-params-duplicates.js(default) -language/statements/if/if-async-fun-else-async-fun.js(default) -language/statements/if/if-async-fun-else-async-fun.js(strict mode) -language/statements/if/if-async-fun-else-stmt.js(default) -language/statements/if/if-async-fun-else-stmt.js(strict mode) -language/statements/if/if-async-fun-no-else.js(default) -language/statements/if/if-async-fun-no-else.js(strict mode) -language/statements/if/if-stmt-else-async-fun.js(default) -language/statements/if/if-stmt-else-async-fun.js(strict mode) -language/statements/if/labelled-fn-stmt-first.js(default) -language/statements/if/labelled-fn-stmt-lone.js(default) -language/statements/if/labelled-fn-stmt-second.js(default) -language/statements/let/redeclaration-error-from-within-strict-mode-function.js(default) -language/statements/let/syntax/attempt-to-redeclare-let-binding-with-function-declaration.js(default) -language/statements/let/syntax/attempt-to-redeclare-let-binding-with-function-declaration.js(strict mode) -language/statements/let/syntax/attempt-to-redeclare-let-binding-with-var.js(default) -language/statements/let/syntax/attempt-to-redeclare-let-binding-with-var.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/try/early-catch-lex.js(default) -language/statements/try/early-catch-lex.js(strict mode) -language/statements/try/early-catch-var.js(default) -language/statements/try/early-catch-var.js(strict mode) -language/statements/while/decl-async-fun.js(default) -language/statements/while/decl-async-fun.js(strict mode) -language/statements/while/labelled-fn-stmt.js(default) -language/statements/with/decl-async-fun.js(default) -language/statements/with/labelled-fn-stmt.js(default) - -language/identifiers/unicode-escape-nls-err.js(default) -language/identifiers/unicode-escape-nls-err.js(strict mode) -language/module-code/privatename-not-valid-earlyerr-module-1.js(default) -language/module-code/privatename-not-valid-earlyerr-module-1.js(strict mode) -language/module-code/privatename-not-valid-earlyerr-module-2.js(default) -language/module-code/privatename-not-valid-earlyerr-module-2.js(strict mode) -language/module-code/privatename-not-valid-earlyerr-module-3.js(default) -language/module-code/privatename-not-valid-earlyerr-module-3.js(strict mode) -language/module-code/privatename-not-valid-earlyerr-module-4.js(default) -language/module-code/privatename-not-valid-earlyerr-module-4.js(strict mode) -language/expressions/class/fields-duplicate-privatenames.js(default) -language/expressions/class/fields-duplicate-privatenames.js(strict mode) -language/expressions/template-literal/unicode-escape-nls-err.js(default) -language/expressions/template-literal/unicode-escape-nls-err.js(strict mode) -language/literals/numeric/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js(default) -language/literals/string/unicode-escape-nls-err-double.js(default) -language/literals/string/unicode-escape-nls-err-double.js(strict mode) -language/literals/string/unicode-escape-nls-err-single.js(default) -language/literals/string/unicode-escape-nls-err-single.js(strict mode) -language/statements/class/fields-duplicate-privatenames.js(default) -language/statements/class/fields-duplicate-privatenames.js(strict mode) -language/statements/class/privatename-not-valid-earlyerr-script-1.js(default) -language/statements/class/privatename-not-valid-earlyerr-script-1.js(strict mode) -language/statements/class/privatename-not-valid-earlyerr-script-2.js(default) -language/statements/class/privatename-not-valid-earlyerr-script-2.js(strict mode) -language/statements/class/privatename-not-valid-earlyerr-script-3.js(default) -language/statements/class/privatename-not-valid-earlyerr-script-3.js(strict mode) -language/statements/class/privatename-not-valid-earlyerr-script-4.js(default) -language/statements/class/privatename-not-valid-earlyerr-script-4.js(strict mode) -language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js(default) -language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js(strict mode) -language/expressions/async-arrow-function/await-as-param-nested-arrow-parameter-position.js(default) -language/expressions/async-arrow-function/await-as-param-nested-arrow-parameter-position.js(strict mode) -language/expressions/async-arrow-function/await-as-param-rest-nested-arrow-parameter-position.js(default) -language/expressions/async-arrow-function/await-as-param-rest-nested-arrow-parameter-position.js(strict mode) -language/expressions/class/class-name-ident-static-escaped.js(default) -language/expressions/class/class-name-ident-static.js(default) -language/literals/regexp/invalid-optional-lookbehind.js(default) -language/literals/regexp/invalid-optional-lookbehind.js(strict mode) -language/literals/regexp/invalid-optional-negative-lookbehind.js(default) -language/literals/regexp/invalid-optional-negative-lookbehind.js(strict mode) -language/literals/regexp/invalid-range-lookbehind.js(default) -language/literals/regexp/invalid-range-lookbehind.js(strict mode) -language/literals/regexp/invalid-range-negative-lookbehind.js(default) -language/literals/regexp/invalid-range-negative-lookbehind.js(strict mode) -language/literals/regexp/u-invalid-optional-lookahead.js(default) -language/literals/regexp/u-invalid-optional-lookahead.js(strict mode) -language/literals/regexp/u-invalid-optional-lookbehind.js(default) -language/literals/regexp/u-invalid-optional-lookbehind.js(strict mode) -language/literals/regexp/u-invalid-optional-negative-lookahead.js(default) -language/literals/regexp/u-invalid-optional-negative-lookahead.js(strict mode) -language/literals/regexp/u-invalid-optional-negative-lookbehind.js(default) -language/literals/regexp/u-invalid-optional-negative-lookbehind.js(strict mode) -language/literals/regexp/u-invalid-range-lookahead.js(default) -language/literals/regexp/u-invalid-range-lookahead.js(strict mode) -language/literals/regexp/u-invalid-range-lookbehind.js(default) -language/literals/regexp/u-invalid-range-lookbehind.js(strict mode) -language/literals/regexp/u-invalid-range-negative-lookahead.js(default) -language/literals/regexp/u-invalid-range-negative-lookahead.js(strict mode) -language/literals/regexp/u-invalid-range-negative-lookbehind.js(default) -language/literals/regexp/u-invalid-range-negative-lookbehind.js(strict mode) -language/statements/class/class-name-ident-static-escaped.js(default) -language/statements/class/class-name-ident-static.js(default) -language/statements/try/early-catch-function.js(default) -language/statements/try/early-catch-function.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js(strict mode) built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js(default) built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js(strict mode) built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F.js(default) @@ -759,10 +296,10 @@ built-ins/RegExp/property-escapes/loose-matching-06-negated.js(default) built-ins/RegExp/property-escapes/loose-matching-06-negated.js(strict mode) built-ins/RegExp/property-escapes/loose-matching-06.js(default) built-ins/RegExp/property-escapes/loose-matching-06.js(strict mode) -built-ins/RegExp/property-escapes/loose-matching-07.js(default) -built-ins/RegExp/property-escapes/loose-matching-07.js(strict mode) built-ins/RegExp/property-escapes/loose-matching-07-negated.js(default) built-ins/RegExp/property-escapes/loose-matching-07-negated.js(strict mode) +built-ins/RegExp/property-escapes/loose-matching-07.js(default) +built-ins/RegExp/property-escapes/loose-matching-07.js(strict mode) built-ins/RegExp/property-escapes/loose-matching-08-negated.js(default) built-ins/RegExp/property-escapes/loose-matching-08-negated.js(strict mode) built-ins/RegExp/property-escapes/loose-matching-08.js(default) @@ -927,457 +464,569 @@ built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js( built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js(strict mode) built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js(default) built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js(strict mode) -language/expressions/class/fields-literal-name-static-propname-constructor.js(default) -language/expressions/class/fields-literal-name-static-propname-constructor.js(strict mode) -language/expressions/class/fields-string-name-static-propname-constructor.js(default) -language/expressions/class/fields-string-name-static-propname-constructor.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) -language/expressions/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) -language/statements/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) -language/statements/class/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) -language/expressions/class/fields-after-same-line-gen-rs-private-getter-alt.js(default) -language/expressions/class/fields-after-same-line-gen-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-gen-rs-private-getter.js(default) -language/expressions/class/fields-after-same-line-gen-rs-private-getter.js(strict mode) -language/expressions/class/fields-after-same-line-gen-rs-private-method-alt.js(default) -language/expressions/class/fields-after-same-line-gen-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-after-same-line-gen-rs-private-method.js(default) -language/expressions/class/fields-after-same-line-gen-rs-private-method.js(strict mode) -language/expressions/class/fields-after-same-line-gen-rs-private-setter-alt.js(default) -language/expressions/class/fields-after-same-line-gen-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-gen-rs-private-setter.js(default) -language/expressions/class/fields-after-same-line-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-method-rs-private-getter-alt.js(default) -language/expressions/class/fields-after-same-line-method-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-method-rs-private-getter.js(default) -language/expressions/class/fields-after-same-line-method-rs-private-getter.js(strict mode) -language/expressions/class/fields-after-same-line-method-rs-private-method-alt.js(default) -language/expressions/class/fields-after-same-line-method-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-after-same-line-method-rs-private-method.js(default) -language/expressions/class/fields-after-same-line-method-rs-private-method.js(strict mode) -language/expressions/class/fields-after-same-line-method-rs-private-setter-alt.js(default) -language/expressions/class/fields-after-same-line-method-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-method-rs-private-setter.js(default) -language/expressions/class/fields-after-same-line-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(default) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter.js(default) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-getter.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-method-alt.js(default) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-method.js(default) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-method.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-setter-alt.js(default) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-setter.js(default) -language/expressions/class/fields-after-same-line-static-async-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-getter-alt.js(default) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-getter.js(default) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-getter.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-method-alt.js(default) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-method.js(default) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-method.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(default) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter.js(default) -language/expressions/class/fields-after-same-line-static-async-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(default) -language/expressions/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-rs-private-getter.js(default) -language/expressions/class/fields-after-same-line-static-gen-rs-private-getter.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-rs-private-method-alt.js(default) -language/expressions/class/fields-after-same-line-static-gen-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-rs-private-method.js(default) -language/expressions/class/fields-after-same-line-static-gen-rs-private-method.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(default) -language/expressions/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-rs-private-setter.js(default) -language/expressions/class/fields-after-same-line-static-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-rs-private-getter-alt.js(default) -language/expressions/class/fields-after-same-line-static-method-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-rs-private-getter.js(default) -language/expressions/class/fields-after-same-line-static-method-rs-private-getter.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-rs-private-method-alt.js(default) -language/expressions/class/fields-after-same-line-static-method-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-rs-private-method.js(default) -language/expressions/class/fields-after-same-line-static-method-rs-private-method.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-rs-private-setter-alt.js(default) -language/expressions/class/fields-after-same-line-static-method-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-rs-private-setter.js(default) -language/expressions/class/fields-after-same-line-static-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-multiple-definitions-rs-private-getter-alt.js(default) -language/expressions/class/fields-multiple-definitions-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-multiple-definitions-rs-private-getter.js(default) -language/expressions/class/fields-multiple-definitions-rs-private-getter.js(strict mode) -language/expressions/class/fields-multiple-definitions-rs-private-method-alt.js(default) -language/expressions/class/fields-multiple-definitions-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-multiple-definitions-rs-private-method.js(default) -language/expressions/class/fields-multiple-definitions-rs-private-method.js(strict mode) -language/expressions/class/fields-multiple-definitions-rs-private-setter-alt.js(default) -language/expressions/class/fields-multiple-definitions-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-multiple-definitions-rs-private-setter.js(default) -language/expressions/class/fields-multiple-definitions-rs-private-setter.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(default) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter.js(default) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-getter.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-method-alt.js(default) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-method.js(default) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-method.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(default) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter.js(default) -language/expressions/class/fields-multiple-stacked-definitions-rs-private-setter.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(default) -language/expressions/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-rs-private-getter.js(default) -language/expressions/class/fields-new-no-sc-line-method-rs-private-getter.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-rs-private-method-alt.js(default) -language/expressions/class/fields-new-no-sc-line-method-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-rs-private-method.js(default) -language/expressions/class/fields-new-no-sc-line-method-rs-private-method.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(default) -language/expressions/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-rs-private-setter.js(default) -language/expressions/class/fields-new-no-sc-line-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-rs-private-getter-alt.js(default) -language/expressions/class/fields-new-sc-line-gen-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-rs-private-getter.js(default) -language/expressions/class/fields-new-sc-line-gen-rs-private-getter.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-rs-private-method-alt.js(default) -language/expressions/class/fields-new-sc-line-gen-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-rs-private-method.js(default) -language/expressions/class/fields-new-sc-line-gen-rs-private-method.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-rs-private-setter-alt.js(default) -language/expressions/class/fields-new-sc-line-gen-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-rs-private-setter.js(default) -language/expressions/class/fields-new-sc-line-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-new-sc-line-method-rs-private-getter-alt.js(default) -language/expressions/class/fields-new-sc-line-method-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-new-sc-line-method-rs-private-getter.js(default) -language/expressions/class/fields-new-sc-line-method-rs-private-getter.js(strict mode) -language/expressions/class/fields-new-sc-line-method-rs-private-method-alt.js(default) -language/expressions/class/fields-new-sc-line-method-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-new-sc-line-method-rs-private-method.js(default) -language/expressions/class/fields-new-sc-line-method-rs-private-method.js(strict mode) -language/expressions/class/fields-new-sc-line-method-rs-private-setter-alt.js(default) -language/expressions/class/fields-new-sc-line-method-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-new-sc-line-method-rs-private-setter.js(default) -language/expressions/class/fields-new-sc-line-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(default) -language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(strict mode) -language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(default) -language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(strict mode) -language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall.js(default) -language/expressions/class/fields-private-derived-cls-direct-eval-err-contains-supercall.js(strict mode) -language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-1.js(default) -language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-1.js(strict mode) -language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-2.js(default) -language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-2.js(strict mode) -language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall.js(default) -language/expressions/class/fields-private-derived-cls-indirect-eval-err-contains-supercall.js(strict mode) -language/expressions/class/fields-regular-definitions-rs-private-getter-alt.js(default) -language/expressions/class/fields-regular-definitions-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-regular-definitions-rs-private-getter.js(default) -language/expressions/class/fields-regular-definitions-rs-private-getter.js(strict mode) -language/expressions/class/fields-regular-definitions-rs-private-method-alt.js(default) -language/expressions/class/fields-regular-definitions-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-regular-definitions-rs-private-method.js(default) -language/expressions/class/fields-regular-definitions-rs-private-method.js(strict mode) -language/expressions/class/fields-regular-definitions-rs-private-setter-alt.js(default) -language/expressions/class/fields-regular-definitions-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-regular-definitions-rs-private-setter.js(default) -language/expressions/class/fields-regular-definitions-rs-private-setter.js(strict mode) -language/expressions/class/fields-same-line-async-gen-rs-private-getter-alt.js(default) -language/expressions/class/fields-same-line-async-gen-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-same-line-async-gen-rs-private-getter.js(default) -language/expressions/class/fields-same-line-async-gen-rs-private-getter.js(strict mode) -language/expressions/class/fields-same-line-async-gen-rs-private-method-alt.js(default) -language/expressions/class/fields-same-line-async-gen-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-same-line-async-gen-rs-private-method.js(default) -language/expressions/class/fields-same-line-async-gen-rs-private-method.js(strict mode) -language/expressions/class/fields-same-line-async-gen-rs-private-setter-alt.js(default) -language/expressions/class/fields-same-line-async-gen-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-same-line-async-gen-rs-private-setter.js(default) -language/expressions/class/fields-same-line-async-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-same-line-async-method-rs-private-getter-alt.js(default) -language/expressions/class/fields-same-line-async-method-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-same-line-async-method-rs-private-getter.js(default) -language/expressions/class/fields-same-line-async-method-rs-private-getter.js(strict mode) -language/expressions/class/fields-same-line-async-method-rs-private-method-alt.js(default) -language/expressions/class/fields-same-line-async-method-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-same-line-async-method-rs-private-method.js(default) -language/expressions/class/fields-same-line-async-method-rs-private-method.js(strict mode) -language/expressions/class/fields-same-line-async-method-rs-private-setter-alt.js(default) -language/expressions/class/fields-same-line-async-method-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-same-line-async-method-rs-private-setter.js(default) -language/expressions/class/fields-same-line-async-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-same-line-gen-rs-private-getter-alt.js(default) -language/expressions/class/fields-same-line-gen-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-same-line-gen-rs-private-getter.js(default) -language/expressions/class/fields-same-line-gen-rs-private-getter.js(strict mode) -language/expressions/class/fields-same-line-gen-rs-private-method-alt.js(default) -language/expressions/class/fields-same-line-gen-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-same-line-gen-rs-private-method.js(default) -language/expressions/class/fields-same-line-gen-rs-private-method.js(strict mode) -language/expressions/class/fields-same-line-gen-rs-private-setter-alt.js(default) -language/expressions/class/fields-same-line-gen-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-same-line-gen-rs-private-setter.js(default) -language/expressions/class/fields-same-line-gen-rs-private-setter.js(strict mode) -language/expressions/class/fields-same-line-method-rs-private-getter-alt.js(default) -language/expressions/class/fields-same-line-method-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-same-line-method-rs-private-getter.js(default) -language/expressions/class/fields-same-line-method-rs-private-getter.js(strict mode) -language/expressions/class/fields-same-line-method-rs-private-method-alt.js(default) -language/expressions/class/fields-same-line-method-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-same-line-method-rs-private-method.js(default) -language/expressions/class/fields-same-line-method-rs-private-method.js(strict mode) -language/expressions/class/fields-same-line-method-rs-private-setter-alt.js(default) -language/expressions/class/fields-same-line-method-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-same-line-method-rs-private-setter.js(default) -language/expressions/class/fields-same-line-method-rs-private-setter.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-rs-private-getter-alt.js(default) -language/expressions/class/fields-wrapped-in-sc-rs-private-getter-alt.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-rs-private-getter.js(default) -language/expressions/class/fields-wrapped-in-sc-rs-private-getter.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-rs-private-method-alt.js(default) -language/expressions/class/fields-wrapped-in-sc-rs-private-method-alt.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-rs-private-method.js(default) -language/expressions/class/fields-wrapped-in-sc-rs-private-method.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-rs-private-setter-alt.js(default) -language/expressions/class/fields-wrapped-in-sc-rs-private-setter-alt.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-rs-private-setter.js(default) -language/expressions/class/fields-wrapped-in-sc-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-gen-rs-private-getter-alt.js(default) -language/statements/class/fields-after-same-line-gen-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-after-same-line-gen-rs-private-getter.js(default) -language/statements/class/fields-after-same-line-gen-rs-private-getter.js(strict mode) -language/statements/class/fields-after-same-line-gen-rs-private-method-alt.js(default) -language/statements/class/fields-after-same-line-gen-rs-private-method-alt.js(strict mode) -language/statements/class/fields-after-same-line-gen-rs-private-method.js(default) -language/statements/class/fields-after-same-line-gen-rs-private-method.js(strict mode) -language/statements/class/fields-after-same-line-gen-rs-private-setter-alt.js(default) -language/statements/class/fields-after-same-line-gen-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-after-same-line-gen-rs-private-setter.js(default) -language/statements/class/fields-after-same-line-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-method-rs-private-getter-alt.js(default) -language/statements/class/fields-after-same-line-method-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-after-same-line-method-rs-private-getter.js(default) -language/statements/class/fields-after-same-line-method-rs-private-getter.js(strict mode) -language/statements/class/fields-after-same-line-method-rs-private-method-alt.js(default) -language/statements/class/fields-after-same-line-method-rs-private-method-alt.js(strict mode) -language/statements/class/fields-after-same-line-method-rs-private-method.js(default) -language/statements/class/fields-after-same-line-method-rs-private-method.js(strict mode) -language/statements/class/fields-after-same-line-method-rs-private-setter-alt.js(default) -language/statements/class/fields-after-same-line-method-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-after-same-line-method-rs-private-setter.js(default) -language/statements/class/fields-after-same-line-method-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(default) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter.js(default) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-getter.js(strict mode) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-method-alt.js(default) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-method-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-method.js(default) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-method.js(strict mode) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-setter-alt.js(default) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-setter.js(default) -language/statements/class/fields-after-same-line-static-async-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-rs-private-getter-alt.js(default) -language/statements/class/fields-after-same-line-static-async-method-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-rs-private-getter.js(default) -language/statements/class/fields-after-same-line-static-async-method-rs-private-getter.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-rs-private-method-alt.js(default) -language/statements/class/fields-after-same-line-static-async-method-rs-private-method-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-rs-private-method.js(default) -language/statements/class/fields-after-same-line-static-async-method-rs-private-method.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(default) -language/statements/class/fields-after-same-line-static-async-method-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-rs-private-setter.js(default) -language/statements/class/fields-after-same-line-static-async-method-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(default) -language/statements/class/fields-after-same-line-static-gen-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-rs-private-getter.js(default) -language/statements/class/fields-after-same-line-static-gen-rs-private-getter.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-rs-private-method-alt.js(default) -language/statements/class/fields-after-same-line-static-gen-rs-private-method-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-rs-private-method.js(default) -language/statements/class/fields-after-same-line-static-gen-rs-private-method.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(default) -language/statements/class/fields-after-same-line-static-gen-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-rs-private-setter.js(default) -language/statements/class/fields-after-same-line-static-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-after-same-line-static-method-rs-private-getter-alt.js(default) -language/statements/class/fields-after-same-line-static-method-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-method-rs-private-getter.js(default) -language/statements/class/fields-after-same-line-static-method-rs-private-getter.js(strict mode) -language/statements/class/fields-after-same-line-static-method-rs-private-method-alt.js(default) -language/statements/class/fields-after-same-line-static-method-rs-private-method-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-method-rs-private-method.js(default) -language/statements/class/fields-after-same-line-static-method-rs-private-method.js(strict mode) -language/statements/class/fields-after-same-line-static-method-rs-private-setter-alt.js(default) -language/statements/class/fields-after-same-line-static-method-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-after-same-line-static-method-rs-private-setter.js(default) -language/statements/class/fields-after-same-line-static-method-rs-private-setter.js(strict mode) -language/statements/class/fields-multiple-definitions-rs-private-getter-alt.js(default) -language/statements/class/fields-multiple-definitions-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-multiple-definitions-rs-private-getter.js(default) -language/statements/class/fields-multiple-definitions-rs-private-getter.js(strict mode) -language/statements/class/fields-multiple-definitions-rs-private-method-alt.js(default) -language/statements/class/fields-multiple-definitions-rs-private-method-alt.js(strict mode) -language/statements/class/fields-multiple-definitions-rs-private-method.js(default) -language/statements/class/fields-multiple-definitions-rs-private-method.js(strict mode) -language/statements/class/fields-multiple-definitions-rs-private-setter-alt.js(default) -language/statements/class/fields-multiple-definitions-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-multiple-definitions-rs-private-setter.js(default) -language/statements/class/fields-multiple-definitions-rs-private-setter.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(default) -language/statements/class/fields-multiple-stacked-definitions-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-rs-private-getter.js(default) -language/statements/class/fields-multiple-stacked-definitions-rs-private-getter.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-rs-private-method-alt.js(default) -language/statements/class/fields-multiple-stacked-definitions-rs-private-method-alt.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-rs-private-method.js(default) -language/statements/class/fields-multiple-stacked-definitions-rs-private-method.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(default) -language/statements/class/fields-multiple-stacked-definitions-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-rs-private-setter.js(default) -language/statements/class/fields-multiple-stacked-definitions-rs-private-setter.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(default) -language/statements/class/fields-new-no-sc-line-method-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-rs-private-getter.js(default) -language/statements/class/fields-new-no-sc-line-method-rs-private-getter.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-rs-private-method-alt.js(default) -language/statements/class/fields-new-no-sc-line-method-rs-private-method-alt.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-rs-private-method.js(default) -language/statements/class/fields-new-no-sc-line-method-rs-private-method.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(default) -language/statements/class/fields-new-no-sc-line-method-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-rs-private-setter.js(default) -language/statements/class/fields-new-no-sc-line-method-rs-private-setter.js(strict mode) -language/statements/class/fields-new-sc-line-gen-rs-private-getter-alt.js(default) -language/statements/class/fields-new-sc-line-gen-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-new-sc-line-gen-rs-private-getter.js(default) -language/statements/class/fields-new-sc-line-gen-rs-private-getter.js(strict mode) -language/statements/class/fields-new-sc-line-gen-rs-private-method-alt.js(default) -language/statements/class/fields-new-sc-line-gen-rs-private-method-alt.js(strict mode) -language/statements/class/fields-new-sc-line-gen-rs-private-method.js(default) -language/statements/class/fields-new-sc-line-gen-rs-private-method.js(strict mode) -language/statements/class/fields-new-sc-line-gen-rs-private-setter-alt.js(default) -language/statements/class/fields-new-sc-line-gen-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-new-sc-line-gen-rs-private-setter.js(default) -language/statements/class/fields-new-sc-line-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-new-sc-line-method-rs-private-getter-alt.js(default) -language/statements/class/fields-new-sc-line-method-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-new-sc-line-method-rs-private-method-alt.js(default) -language/statements/class/fields-new-sc-line-method-rs-private-method-alt.js(strict mode) -language/statements/class/fields-new-sc-line-method-rs-private-getter.js(default) -language/statements/class/fields-new-sc-line-method-rs-private-getter.js(strict mode) -language/statements/class/fields-new-sc-line-method-rs-private-method.js(default) -language/statements/class/fields-new-sc-line-method-rs-private-method.js(strict mode) -language/statements/class/fields-new-sc-line-method-rs-private-setter-alt.js(default) -language/statements/class/fields-new-sc-line-method-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-new-sc-line-method-rs-private-setter.js(default) -language/statements/class/fields-new-sc-line-method-rs-private-setter.js(strict mode) -language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(default) -language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-1.js(strict mode) -language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(default) -language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall-2.js(strict mode) -language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall.js(default) -language/statements/class/fields-private-derived-cls-direct-eval-err-contains-supercall.js(strict mode) -language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-1.js(default) -language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-1.js(strict mode) -language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-2.js(default) -language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall-2.js(strict mode) -language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall.js(default) -language/statements/class/fields-private-derived-cls-indirect-eval-err-contains-supercall.js(strict mode) -language/statements/class/fields-regular-definitions-rs-private-getter-alt.js(default) -language/statements/class/fields-regular-definitions-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-regular-definitions-rs-private-getter.js(default) -language/statements/class/fields-regular-definitions-rs-private-getter.js(strict mode) -language/statements/class/fields-regular-definitions-rs-private-method-alt.js(default) -language/statements/class/fields-regular-definitions-rs-private-method-alt.js(strict mode) -language/statements/class/fields-regular-definitions-rs-private-method.js(default) -language/statements/class/fields-regular-definitions-rs-private-method.js(strict mode) -language/statements/class/fields-regular-definitions-rs-private-setter-alt.js(default) -language/statements/class/fields-regular-definitions-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-regular-definitions-rs-private-setter.js(default) -language/statements/class/fields-regular-definitions-rs-private-setter.js(strict mode) -language/statements/class/fields-same-line-async-gen-rs-private-getter-alt.js(default) -language/statements/class/fields-same-line-async-gen-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-same-line-async-gen-rs-private-getter.js(default) -language/statements/class/fields-same-line-async-gen-rs-private-getter.js(strict mode) -language/statements/class/fields-same-line-async-gen-rs-private-method-alt.js(default) -language/statements/class/fields-same-line-async-gen-rs-private-method-alt.js(strict mode) -language/statements/class/fields-same-line-async-gen-rs-private-method.js(default) -language/statements/class/fields-same-line-async-gen-rs-private-method.js(strict mode) -language/statements/class/fields-same-line-async-gen-rs-private-setter-alt.js(default) -language/statements/class/fields-same-line-async-gen-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-same-line-async-gen-rs-private-setter.js(default) -language/statements/class/fields-same-line-async-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-same-line-async-method-rs-private-getter-alt.js(default) -language/statements/class/fields-same-line-async-method-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-same-line-async-method-rs-private-getter.js(default) -language/statements/class/fields-same-line-async-method-rs-private-getter.js(strict mode) -language/statements/class/fields-same-line-async-method-rs-private-method-alt.js(default) -language/statements/class/fields-same-line-async-method-rs-private-method-alt.js(strict mode) -language/statements/class/fields-same-line-async-method-rs-private-method.js(default) -language/statements/class/fields-same-line-async-method-rs-private-method.js(strict mode) -language/statements/class/fields-same-line-async-method-rs-private-setter-alt.js(default) -language/statements/class/fields-same-line-async-method-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-same-line-async-method-rs-private-setter.js(default) -language/statements/class/fields-same-line-async-method-rs-private-setter.js(strict mode) -language/statements/class/fields-same-line-gen-rs-private-getter-alt.js(default) -language/statements/class/fields-same-line-gen-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-same-line-gen-rs-private-getter.js(default) -language/statements/class/fields-same-line-gen-rs-private-getter.js(strict mode) -language/statements/class/fields-same-line-gen-rs-private-method-alt.js(default) -language/statements/class/fields-same-line-gen-rs-private-method-alt.js(strict mode) -language/statements/class/fields-same-line-gen-rs-private-method.js(default) -language/statements/class/fields-same-line-gen-rs-private-method.js(strict mode) -language/statements/class/fields-same-line-gen-rs-private-setter-alt.js(default) -language/statements/class/fields-same-line-gen-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-same-line-gen-rs-private-setter.js(default) -language/statements/class/fields-same-line-gen-rs-private-setter.js(strict mode) -language/statements/class/fields-same-line-method-rs-private-getter-alt.js(default) -language/statements/class/fields-same-line-method-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-same-line-method-rs-private-getter.js(default) -language/statements/class/fields-same-line-method-rs-private-getter.js(strict mode) -language/statements/class/fields-same-line-method-rs-private-method-alt.js(default) -language/statements/class/fields-same-line-method-rs-private-method-alt.js(strict mode) -language/statements/class/fields-same-line-method-rs-private-method.js(default) -language/statements/class/fields-same-line-method-rs-private-method.js(strict mode) -language/statements/class/fields-same-line-method-rs-private-setter.js(default) -language/statements/class/fields-same-line-method-rs-private-setter.js(strict mode) -language/statements/class/fields-same-line-method-rs-private-setter-alt.js(default) -language/statements/class/fields-same-line-method-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-wrapped-in-sc-rs-private-getter-alt.js(default) -language/statements/class/fields-wrapped-in-sc-rs-private-getter-alt.js(strict mode) -language/statements/class/fields-wrapped-in-sc-rs-private-getter.js(default) -language/statements/class/fields-wrapped-in-sc-rs-private-getter.js(strict mode) -language/statements/class/fields-wrapped-in-sc-rs-private-method-alt.js(default) -language/statements/class/fields-wrapped-in-sc-rs-private-method-alt.js(strict mode) -language/statements/class/fields-wrapped-in-sc-rs-private-method.js(default) -language/statements/class/fields-wrapped-in-sc-rs-private-method.js(strict mode) -language/statements/class/fields-wrapped-in-sc-rs-private-setter-alt.js(default) -language/statements/class/fields-wrapped-in-sc-rs-private-setter-alt.js(strict mode) -language/statements/class/fields-wrapped-in-sc-rs-private-setter.js(default) -language/statements/class/fields-wrapped-in-sc-rs-private-setter.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-no-trailing-comma.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js(default) +language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js(default) +language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js(strict mode) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js(default) +language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js(strict mode) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js(default) +language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js(strict mode) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js(default) +language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js(strict mode) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js(default) +language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js(strict mode) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js(default) +language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-async-function.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-async-generator.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-class.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-class.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-const.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-const.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-function.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-function.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-generator.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-generator.js(strict mode) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-let.js(default) +language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-let.js(strict mode) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js(default) +language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js(strict mode) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js(default) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js(default) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js(default) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js(strict mode) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js(default) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js(strict mode) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js(default) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js(strict mode) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js(default) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js(strict mode) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js(default) +language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js(strict mode) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-async-function.js(default) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-async-function.js(strict mode) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-async-generator.js(default) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-async-generator.js(strict mode) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-class.js(default) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-class.js(strict mode) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-const.js(default) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-const.js(strict mode) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-function.js(default) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-function.js(strict mode) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-generator.js(default) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-generator.js(strict mode) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-let.js(default) +language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-let.js(strict mode) +language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(default) +language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(strict mode) +language/expressions/assignment/dstr/array-rest-before-elision.js(default) +language/expressions/assignment/dstr/array-rest-before-elision.js(strict mode) +language/expressions/assignment/dstr/array-rest-elision-invalid.js(default) +language/expressions/assignment/dstr/array-rest-elision-invalid.js(strict mode) +language/expressions/assignment/dstr/obj-id-identifier-yield-ident-valid.js(default) +language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js(default) +language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js(strict mode) +language/expressions/async-arrow-function/await-as-param-nested-arrow-parameter-position.js(default) +language/expressions/async-arrow-function/await-as-param-nested-arrow-parameter-position.js(strict mode) +language/expressions/async-arrow-function/await-as-param-rest-nested-arrow-parameter-position.js(default) +language/expressions/async-arrow-function/await-as-param-rest-nested-arrow-parameter-position.js(strict mode) +language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-default.js(default) +language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-default.js(strict mode) +language/expressions/async-arrow-function/early-errors-arrow-await-in-formals.js(default) +language/expressions/async-arrow-function/early-errors-arrow-await-in-formals.js(strict mode) +language/expressions/async-arrow-function/early-errors-arrow-formals-body-duplicate.js(default) +language/expressions/async-arrow-function/early-errors-arrow-formals-body-duplicate.js(strict mode) +language/expressions/async-function/early-errors-expression-formals-body-duplicate.js(default) +language/expressions/async-function/early-errors-expression-formals-body-duplicate.js(strict mode) +language/expressions/async-function/named-dflt-params-duplicates.js(default) +language/expressions/async-function/nameless-dflt-params-duplicates.js(default) +language/expressions/async-generator/dflt-params-duplicates.js(default) +language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(default) +language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(strict mode) +language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(default) +language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(strict mode) +language/expressions/async-generator/named-dflt-params-duplicates.js(default) +language/expressions/class/class-name-ident-static-escaped.js(default) +language/expressions/class/class-name-ident-static.js(default) +language/expressions/class/elements/after-same-line-gen-private-field-usage.js(default) +language/expressions/class/elements/after-same-line-gen-private-field-usage.js(strict mode) +language/expressions/class/elements/after-same-line-gen-rs-private-getter-alt.js(default) +language/expressions/class/elements/after-same-line-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-gen-rs-private-getter.js(default) +language/expressions/class/elements/after-same-line-gen-rs-private-getter.js(strict mode) +language/expressions/class/elements/after-same-line-gen-rs-private-method-alt.js(default) +language/expressions/class/elements/after-same-line-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/after-same-line-gen-rs-private-method.js(default) +language/expressions/class/elements/after-same-line-gen-rs-private-method.js(strict mode) +language/expressions/class/elements/after-same-line-gen-rs-private-setter-alt.js(default) +language/expressions/class/elements/after-same-line-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-gen-rs-private-setter.js(default) +language/expressions/class/elements/after-same-line-gen-rs-private-setter.js(strict mode) +language/expressions/class/elements/after-same-line-method-private-field-usage.js(default) +language/expressions/class/elements/after-same-line-method-private-field-usage.js(strict mode) +language/expressions/class/elements/after-same-line-method-rs-private-getter-alt.js(default) +language/expressions/class/elements/after-same-line-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-method-rs-private-getter.js(default) +language/expressions/class/elements/after-same-line-method-rs-private-getter.js(strict mode) +language/expressions/class/elements/after-same-line-method-rs-private-method-alt.js(default) +language/expressions/class/elements/after-same-line-method-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/after-same-line-method-rs-private-method.js(default) +language/expressions/class/elements/after-same-line-method-rs-private-method.js(strict mode) +language/expressions/class/elements/after-same-line-method-rs-private-setter-alt.js(default) +language/expressions/class/elements/after-same-line-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-method-rs-private-setter.js(default) +language/expressions/class/elements/after-same-line-method-rs-private-setter.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-gen-private-field-usage.js(default) +language/expressions/class/elements/after-same-line-static-async-gen-private-field-usage.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js(default) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-getter.js(default) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-getter.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js(default) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-method.js(default) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-method.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js(default) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-setter.js(default) +language/expressions/class/elements/after-same-line-static-async-gen-rs-private-setter.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-method-private-field-usage.js(default) +language/expressions/class/elements/after-same-line-static-async-method-private-field-usage.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js(default) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-getter.js(default) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-getter.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-method-alt.js(default) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-method.js(default) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-method.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js(default) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-setter.js(default) +language/expressions/class/elements/after-same-line-static-async-method-rs-private-setter.js(strict mode) +language/expressions/class/elements/after-same-line-static-gen-private-field-usage.js(default) +language/expressions/class/elements/after-same-line-static-gen-private-field-usage.js(strict mode) +language/expressions/class/elements/after-same-line-static-gen-rs-private-getter-alt.js(default) +language/expressions/class/elements/after-same-line-static-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-gen-rs-private-getter.js(default) +language/expressions/class/elements/after-same-line-static-gen-rs-private-getter.js(strict mode) +language/expressions/class/elements/after-same-line-static-gen-rs-private-method-alt.js(default) +language/expressions/class/elements/after-same-line-static-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-gen-rs-private-method.js(default) +language/expressions/class/elements/after-same-line-static-gen-rs-private-method.js(strict mode) +language/expressions/class/elements/after-same-line-static-gen-rs-private-setter-alt.js(default) +language/expressions/class/elements/after-same-line-static-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-gen-rs-private-setter.js(default) +language/expressions/class/elements/after-same-line-static-gen-rs-private-setter.js(strict mode) +language/expressions/class/elements/after-same-line-static-method-private-field-usage.js(default) +language/expressions/class/elements/after-same-line-static-method-private-field-usage.js(strict mode) +language/expressions/class/elements/after-same-line-static-method-rs-private-getter-alt.js(default) +language/expressions/class/elements/after-same-line-static-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-method-rs-private-getter.js(default) +language/expressions/class/elements/after-same-line-static-method-rs-private-getter.js(strict mode) +language/expressions/class/elements/after-same-line-static-method-rs-private-method-alt.js(default) +language/expressions/class/elements/after-same-line-static-method-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-method-rs-private-method.js(default) +language/expressions/class/elements/after-same-line-static-method-rs-private-method.js(strict mode) +language/expressions/class/elements/after-same-line-static-method-rs-private-setter-alt.js(default) +language/expressions/class/elements/after-same-line-static-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/after-same-line-static-method-rs-private-setter.js(default) +language/expressions/class/elements/after-same-line-static-method-rs-private-setter.js(strict mode) +language/expressions/class/elements/fields-duplicate-privatenames.js(default) +language/expressions/class/elements/fields-duplicate-privatenames.js(strict mode) +language/expressions/class/elements/fields-literal-name-static-propname-constructor.js(default) +language/expressions/class/elements/fields-literal-name-static-propname-constructor.js(strict mode) +language/expressions/class/elements/fields-string-name-static-propname-constructor.js(default) +language/expressions/class/elements/fields-string-name-static-propname-constructor.js(strict mode) +language/expressions/class/elements/multiple-definitions-private-field-usage.js(default) +language/expressions/class/elements/multiple-definitions-private-field-usage.js(strict mode) +language/expressions/class/elements/multiple-definitions-rs-private-getter-alt.js(default) +language/expressions/class/elements/multiple-definitions-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/multiple-definitions-rs-private-getter.js(default) +language/expressions/class/elements/multiple-definitions-rs-private-getter.js(strict mode) +language/expressions/class/elements/multiple-definitions-rs-private-method-alt.js(default) +language/expressions/class/elements/multiple-definitions-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/multiple-definitions-rs-private-method.js(default) +language/expressions/class/elements/multiple-definitions-rs-private-method.js(strict mode) +language/expressions/class/elements/multiple-definitions-rs-private-setter-alt.js(default) +language/expressions/class/elements/multiple-definitions-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/multiple-definitions-rs-private-setter.js(default) +language/expressions/class/elements/multiple-definitions-rs-private-setter.js(strict mode) +language/expressions/class/elements/multiple-stacked-definitions-private-field-usage.js(default) +language/expressions/class/elements/multiple-stacked-definitions-private-field-usage.js(strict mode) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js(default) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-getter.js(default) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-getter.js(strict mode) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-method-alt.js(default) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-method.js(default) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-method.js(strict mode) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js(default) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-setter.js(default) +language/expressions/class/elements/multiple-stacked-definitions-rs-private-setter.js(strict mode) +language/expressions/class/elements/new-no-sc-line-method-private-field-usage.js(default) +language/expressions/class/elements/new-no-sc-line-method-private-field-usage.js(strict mode) +language/expressions/class/elements/new-no-sc-line-method-rs-private-getter-alt.js(default) +language/expressions/class/elements/new-no-sc-line-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/new-no-sc-line-method-rs-private-getter.js(default) +language/expressions/class/elements/new-no-sc-line-method-rs-private-getter.js(strict mode) +language/expressions/class/elements/new-no-sc-line-method-rs-private-method-alt.js(default) +language/expressions/class/elements/new-no-sc-line-method-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/new-no-sc-line-method-rs-private-method.js(default) +language/expressions/class/elements/new-no-sc-line-method-rs-private-method.js(strict mode) +language/expressions/class/elements/new-no-sc-line-method-rs-private-setter-alt.js(default) +language/expressions/class/elements/new-no-sc-line-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/new-no-sc-line-method-rs-private-setter.js(default) +language/expressions/class/elements/new-no-sc-line-method-rs-private-setter.js(strict mode) +language/expressions/class/elements/new-sc-line-gen-private-field-usage.js(default) +language/expressions/class/elements/new-sc-line-gen-private-field-usage.js(strict mode) +language/expressions/class/elements/new-sc-line-gen-rs-private-getter-alt.js(default) +language/expressions/class/elements/new-sc-line-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/new-sc-line-gen-rs-private-getter.js(default) +language/expressions/class/elements/new-sc-line-gen-rs-private-getter.js(strict mode) +language/expressions/class/elements/new-sc-line-gen-rs-private-method-alt.js(default) +language/expressions/class/elements/new-sc-line-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/new-sc-line-gen-rs-private-method.js(default) +language/expressions/class/elements/new-sc-line-gen-rs-private-method.js(strict mode) +language/expressions/class/elements/new-sc-line-gen-rs-private-setter-alt.js(default) +language/expressions/class/elements/new-sc-line-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/new-sc-line-gen-rs-private-setter.js(default) +language/expressions/class/elements/new-sc-line-gen-rs-private-setter.js(strict mode) +language/expressions/class/elements/new-sc-line-method-private-field-usage.js(default) +language/expressions/class/elements/new-sc-line-method-private-field-usage.js(strict mode) +language/expressions/class/elements/new-sc-line-method-rs-private-getter-alt.js(default) +language/expressions/class/elements/new-sc-line-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/new-sc-line-method-rs-private-getter.js(default) +language/expressions/class/elements/new-sc-line-method-rs-private-getter.js(strict mode) +language/expressions/class/elements/new-sc-line-method-rs-private-method-alt.js(default) +language/expressions/class/elements/new-sc-line-method-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/new-sc-line-method-rs-private-method.js(default) +language/expressions/class/elements/new-sc-line-method-rs-private-method.js(strict mode) +language/expressions/class/elements/new-sc-line-method-rs-private-setter-alt.js(default) +language/expressions/class/elements/new-sc-line-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/new-sc-line-method-rs-private-setter.js(default) +language/expressions/class/elements/new-sc-line-method-rs-private-setter.js(strict mode) +language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js(default) +language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js(strict mode) +language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js(default) +language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js(strict mode) +language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js(default) +language/expressions/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js(strict mode) +language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js(default) +language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js(strict mode) +language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js(default) +language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js(strict mode) +language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js(default) +language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js(strict mode) +language/expressions/class/elements/private-methods/prod-private-method-initialize-order.js(default) +language/expressions/class/elements/private-methods/prod-private-method-initialize-order.js(strict mode) +language/expressions/class/elements/regular-definitions-private-field-usage.js(default) +language/expressions/class/elements/regular-definitions-private-field-usage.js(strict mode) +language/expressions/class/elements/regular-definitions-rs-private-getter-alt.js(default) +language/expressions/class/elements/regular-definitions-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/regular-definitions-rs-private-getter.js(default) +language/expressions/class/elements/regular-definitions-rs-private-getter.js(strict mode) +language/expressions/class/elements/regular-definitions-rs-private-method-alt.js(default) +language/expressions/class/elements/regular-definitions-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/regular-definitions-rs-private-method.js(default) +language/expressions/class/elements/regular-definitions-rs-private-method.js(strict mode) +language/expressions/class/elements/regular-definitions-rs-private-setter-alt.js(default) +language/expressions/class/elements/regular-definitions-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/regular-definitions-rs-private-setter.js(default) +language/expressions/class/elements/regular-definitions-rs-private-setter.js(strict mode) +language/expressions/class/elements/same-line-async-gen-private-field-usage.js(default) +language/expressions/class/elements/same-line-async-gen-private-field-usage.js(strict mode) +language/expressions/class/elements/same-line-async-gen-rs-private-getter-alt.js(default) +language/expressions/class/elements/same-line-async-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/same-line-async-gen-rs-private-getter.js(default) +language/expressions/class/elements/same-line-async-gen-rs-private-getter.js(strict mode) +language/expressions/class/elements/same-line-async-gen-rs-private-method-alt.js(default) +language/expressions/class/elements/same-line-async-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/same-line-async-gen-rs-private-method.js(default) +language/expressions/class/elements/same-line-async-gen-rs-private-method.js(strict mode) +language/expressions/class/elements/same-line-async-gen-rs-private-setter-alt.js(default) +language/expressions/class/elements/same-line-async-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/same-line-async-gen-rs-private-setter.js(default) +language/expressions/class/elements/same-line-async-gen-rs-private-setter.js(strict mode) +language/expressions/class/elements/same-line-async-method-private-field-usage.js(default) +language/expressions/class/elements/same-line-async-method-private-field-usage.js(strict mode) +language/expressions/class/elements/same-line-async-method-rs-private-getter-alt.js(default) +language/expressions/class/elements/same-line-async-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/same-line-async-method-rs-private-getter.js(default) +language/expressions/class/elements/same-line-async-method-rs-private-getter.js(strict mode) +language/expressions/class/elements/same-line-async-method-rs-private-method-alt.js(default) +language/expressions/class/elements/same-line-async-method-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/same-line-async-method-rs-private-method.js(default) +language/expressions/class/elements/same-line-async-method-rs-private-method.js(strict mode) +language/expressions/class/elements/same-line-async-method-rs-private-setter-alt.js(default) +language/expressions/class/elements/same-line-async-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/same-line-async-method-rs-private-setter.js(default) +language/expressions/class/elements/same-line-async-method-rs-private-setter.js(strict mode) +language/expressions/class/elements/same-line-gen-private-field-usage.js(default) +language/expressions/class/elements/same-line-gen-private-field-usage.js(strict mode) +language/expressions/class/elements/same-line-gen-rs-private-getter-alt.js(default) +language/expressions/class/elements/same-line-gen-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/same-line-gen-rs-private-getter.js(default) +language/expressions/class/elements/same-line-gen-rs-private-getter.js(strict mode) +language/expressions/class/elements/same-line-gen-rs-private-method-alt.js(default) +language/expressions/class/elements/same-line-gen-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/same-line-gen-rs-private-method.js(default) +language/expressions/class/elements/same-line-gen-rs-private-method.js(strict mode) +language/expressions/class/elements/same-line-gen-rs-private-setter-alt.js(default) +language/expressions/class/elements/same-line-gen-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/same-line-gen-rs-private-setter.js(default) +language/expressions/class/elements/same-line-gen-rs-private-setter.js(strict mode) +language/expressions/class/elements/same-line-method-private-field-usage.js(default) +language/expressions/class/elements/same-line-method-private-field-usage.js(strict mode) +language/expressions/class/elements/same-line-method-rs-private-getter-alt.js(default) +language/expressions/class/elements/same-line-method-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/same-line-method-rs-private-getter.js(default) +language/expressions/class/elements/same-line-method-rs-private-getter.js(strict mode) +language/expressions/class/elements/same-line-method-rs-private-method-alt.js(default) +language/expressions/class/elements/same-line-method-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/same-line-method-rs-private-method.js(default) +language/expressions/class/elements/same-line-method-rs-private-method.js(strict mode) +language/expressions/class/elements/same-line-method-rs-private-setter-alt.js(default) +language/expressions/class/elements/same-line-method-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/same-line-method-rs-private-setter.js(default) +language/expressions/class/elements/same-line-method-rs-private-setter.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-call-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-call-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-call-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-call-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-bad-reference.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-bad-reference.js(strict mode) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(default) +language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(strict mode) +language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(default) +language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(strict mode) +language/expressions/class/elements/wrapped-in-sc-private-field-usage.js(default) +language/expressions/class/elements/wrapped-in-sc-private-field-usage.js(strict mode) +language/expressions/class/elements/wrapped-in-sc-rs-private-getter-alt.js(default) +language/expressions/class/elements/wrapped-in-sc-rs-private-getter-alt.js(strict mode) +language/expressions/class/elements/wrapped-in-sc-rs-private-getter.js(default) +language/expressions/class/elements/wrapped-in-sc-rs-private-getter.js(strict mode) +language/expressions/class/elements/wrapped-in-sc-rs-private-method-alt.js(default) +language/expressions/class/elements/wrapped-in-sc-rs-private-method-alt.js(strict mode) +language/expressions/class/elements/wrapped-in-sc-rs-private-method.js(default) +language/expressions/class/elements/wrapped-in-sc-rs-private-method.js(strict mode) +language/expressions/class/elements/wrapped-in-sc-rs-private-setter-alt.js(default) +language/expressions/class/elements/wrapped-in-sc-rs-private-setter-alt.js(strict mode) +language/expressions/class/elements/wrapped-in-sc-rs-private-setter.js(default) +language/expressions/class/elements/wrapped-in-sc-rs-private-setter.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-no-trailing-comma.js(default) language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-no-trailing-comma.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-no-new-call-expression.js(default) language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-no-new-call-expression.js(strict mode) @@ -1395,6 +1044,10 @@ language/expressions/dynamic-import/syntax/invalid/nested-async-function-return- language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-no-new-call-expression.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js(default) language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(strict mode) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(default) +language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-no-new-call-expression.js(default) language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-no-new-call-expression.js(strict mode) language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-no-trailing-comma.js(default) @@ -1443,217 +1096,72 @@ language/expressions/dynamic-import/syntax/invalid/top-level-no-new-call-express language/expressions/dynamic-import/syntax/invalid/top-level-no-new-call-expression.js(strict mode) language/expressions/dynamic-import/syntax/invalid/top-level-not-extensible-no-trailing-comma.js(default) language/expressions/dynamic-import/syntax/invalid/top-level-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(strict mode) -language/expressions/class/syntax/early-errors/super-private-access-invalid.js(default) -language/expressions/class/syntax/early-errors/super-private-access-invalid.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(strict mode) -language/statements/class/syntax/early-errors/super-private-access-invalid.js(default) -language/statements/class/syntax/early-errors/super-private-access-invalid.js(strict mode) -language/statements/class/fields-literal-name-static-propname-constructor.js(default) -language/statements/class/fields-literal-name-static-propname-constructor.js(strict mode) -language/statements/class/fields-string-name-static-propname-constructor.js(default) -language/statements/class/fields-string-name-static-propname-constructor.js(strict mode) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) -language/expressions/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) -language/statements/class/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) - -language/expressions/class/fields-after-same-line-gen-private-field-usage.js(default) -language/expressions/class/fields-after-same-line-gen-private-field-usage.js(strict mode) -language/expressions/class/fields-after-same-line-method-private-field-usage.js(default) -language/expressions/class/fields-after-same-line-method-private-field-usage.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-gen-private-field-usage.js(default) -language/expressions/class/fields-after-same-line-static-async-gen-private-field-usage.js(strict mode) -language/expressions/class/fields-after-same-line-static-async-method-private-field-usage.js(default) -language/expressions/class/fields-after-same-line-static-async-method-private-field-usage.js(strict mode) -language/expressions/class/fields-after-same-line-static-gen-private-field-usage.js(default) -language/expressions/class/fields-after-same-line-static-gen-private-field-usage.js(strict mode) -language/expressions/class/fields-after-same-line-static-method-private-field-usage.js(default) -language/expressions/class/fields-after-same-line-static-method-private-field-usage.js(strict mode) -language/expressions/class/fields-multiple-definitions-private-field-usage.js(default) -language/expressions/class/fields-multiple-definitions-private-field-usage.js(strict mode) -language/expressions/class/fields-multiple-stacked-definitions-private-field-usage.js(default) -language/expressions/class/fields-multiple-stacked-definitions-private-field-usage.js(strict mode) -language/expressions/class/fields-new-no-sc-line-method-private-field-usage.js(default) -language/expressions/class/fields-new-no-sc-line-method-private-field-usage.js(strict mode) -language/expressions/class/fields-new-sc-line-gen-private-field-usage.js(default) -language/expressions/class/fields-new-sc-line-gen-private-field-usage.js(strict mode) -language/expressions/class/fields-new-sc-line-method-private-field-usage.js(default) -language/expressions/class/fields-new-sc-line-method-private-field-usage.js(strict mode) -language/expressions/class/fields-regular-definitions-private-field-usage.js(default) -language/expressions/class/fields-regular-definitions-private-field-usage.js(strict mode) -language/expressions/class/fields-same-line-async-gen-private-field-usage.js(default) -language/expressions/class/fields-same-line-async-gen-private-field-usage.js(strict mode) -language/expressions/class/fields-same-line-async-method-private-field-usage.js(default) -language/expressions/class/fields-same-line-async-method-private-field-usage.js(strict mode) -language/expressions/class/fields-same-line-gen-private-field-usage.js(default) -language/expressions/class/fields-same-line-gen-private-field-usage.js(strict mode) -language/expressions/class/fields-same-line-method-private-field-usage.js(default) -language/expressions/class/fields-same-line-method-private-field-usage.js(strict mode) -language/expressions/class/fields-wrapped-in-sc-private-field-usage.js(default) -language/expressions/class/fields-wrapped-in-sc-private-field-usage.js(strict mode) -language/statements/class/fields-after-same-line-gen-private-field-usage.js(default) -language/statements/class/fields-after-same-line-gen-private-field-usage.js(strict mode) -language/statements/class/fields-after-same-line-method-private-field-usage.js(default) -language/statements/class/fields-after-same-line-method-private-field-usage.js(strict mode) -language/statements/class/fields-after-same-line-static-async-gen-private-field-usage.js(default) -language/statements/class/fields-after-same-line-static-async-gen-private-field-usage.js(strict mode) -language/statements/class/fields-after-same-line-static-async-method-private-field-usage.js(default) -language/statements/class/fields-after-same-line-static-async-method-private-field-usage.js(strict mode) -language/statements/class/fields-after-same-line-static-gen-private-field-usage.js(default) -language/statements/class/fields-after-same-line-static-gen-private-field-usage.js(strict mode) -language/statements/class/fields-after-same-line-static-method-private-field-usage.js(default) -language/statements/class/fields-after-same-line-static-method-private-field-usage.js(strict mode) -language/statements/class/fields-multiple-definitions-private-field-usage.js(default) -language/statements/class/fields-multiple-definitions-private-field-usage.js(strict mode) -language/statements/class/fields-multiple-stacked-definitions-private-field-usage.js(default) -language/statements/class/fields-multiple-stacked-definitions-private-field-usage.js(strict mode) -language/statements/class/fields-new-no-sc-line-method-private-field-usage.js(default) -language/statements/class/fields-new-no-sc-line-method-private-field-usage.js(strict mode) -language/statements/class/fields-new-sc-line-gen-private-field-usage.js(default) -language/statements/class/fields-new-sc-line-gen-private-field-usage.js(strict mode) -language/statements/class/fields-new-sc-line-method-private-field-usage.js(default) -language/statements/class/fields-new-sc-line-method-private-field-usage.js(strict mode) -language/statements/class/fields-regular-definitions-private-field-usage.js(default) -language/statements/class/fields-regular-definitions-private-field-usage.js(strict mode) -language/statements/class/fields-same-line-async-gen-private-field-usage.js(default) -language/statements/class/fields-same-line-async-gen-private-field-usage.js(strict mode) -language/statements/class/fields-same-line-async-method-private-field-usage.js(default) -language/statements/class/fields-same-line-async-method-private-field-usage.js(strict mode) -language/statements/class/fields-same-line-gen-private-field-usage.js(default) -language/statements/class/fields-same-line-gen-private-field-usage.js(strict mode) -language/statements/class/fields-same-line-method-private-field-usage.js(default) -language/statements/class/fields-same-line-method-private-field-usage.js(strict mode) -language/statements/class/fields-wrapped-in-sc-private-field-usage.js(default) -language/statements/class/fields-wrapped-in-sc-private-field-usage.js(strict mode) -language/expressions/async-generator/dflt-params-duplicates.js(default) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(default) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(strict mode) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(default) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(strict mode) -language/expressions/async-generator/named-dflt-params-duplicates.js(default) -language/statements/async-generator/dflt-params-duplicates.js(default) -language/statements/class/async-gen-meth-escaped-async.js(default) -language/statements/class/async-gen-meth-escaped-async.js(strict mode) -language/statements/do-while/decl-async-gen.js(default) -language/statements/do-while/decl-async-gen.js(strict mode) -language/statements/for/decl-async-gen.js(default) -language/statements/for/decl-async-gen.js(strict mode) -language/statements/for-in/decl-async-gen.js(default) -language/statements/for-in/decl-async-gen.js(strict mode) -language/statements/for-of/decl-async-gen.js(default) -language/statements/for-of/decl-async-gen.js(strict mode) -language/statements/if/if-async-gen-else-async-gen.js(default) -language/statements/if/if-async-gen-else-async-gen.js(strict mode) -language/statements/if/if-async-gen-else-stmt.js(default) -language/statements/if/if-async-gen-else-stmt.js(strict mode) -language/statements/if/if-async-gen-no-else.js(default) -language/statements/if/if-async-gen-no-else.js(strict mode) -language/statements/if/if-stmt-else-async-gen.js(default) -language/statements/if/if-stmt-else-async-gen.js(strict mode) -language/statements/while/decl-async-gen.js(default) -language/statements/while/decl-async-gen.js(strict mode) -language/statements/with/decl-async-gen.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/block-scope/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/block-scope/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/expressions/function/dflt-params-duplicates.js(default) +language/expressions/generators/dflt-params-duplicates.js(default) +language/expressions/object/let-non-strict-access.js(default) +language/expressions/object/let-non-strict-syntax.js(default) language/expressions/object/method-definition/async-gen-meth-dflt-params-duplicates.js(default) language/expressions/object/method-definition/async-meth-dflt-params-duplicates.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-class-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-const-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-function-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-let-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(default) -language/statements/switch/syntax/redeclaration/async-generator-declaration-attempt-to-redeclare-with-var-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/class-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/const-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/generator-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/let-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(default) -language/statements/switch/syntax/redeclaration/var-declaration-attempt-to-redeclare-with-async-generator-declaration.js(strict mode) +language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(default) +language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(strict mode) +language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js(default) +language/expressions/object/method-definition/gen-meth-dflt-params-duplicates.js(default) +language/expressions/object/method-definition/generator-param-redecl-const.js(default) +language/expressions/object/method-definition/generator-param-redecl-const.js(strict mode) +language/expressions/object/method-definition/generator-param-redecl-let.js(default) +language/expressions/object/method-definition/generator-param-redecl-let.js(strict mode) +language/expressions/object/method-definition/meth-dflt-params-duplicates.js(default) +language/expressions/object/method-definition/name-param-redecl.js(default) +language/expressions/object/method-definition/name-param-redecl.js(strict mode) +language/expressions/object/method-definition/private-name-early-error-async-fn-inside-class.js(default) +language/expressions/object/method-definition/private-name-early-error-async-fn-inside-class.js(strict mode) +language/expressions/object/method-definition/private-name-early-error-async-gen-inside-class.js(default) +language/expressions/object/method-definition/private-name-early-error-async-gen-inside-class.js(strict mode) +language/expressions/object/method-definition/private-name-early-error-gen-inside-class.js(default) +language/expressions/object/method-definition/private-name-early-error-gen-inside-class.js(strict mode) +language/expressions/object/method-definition/private-name-early-error-method-inside-class.js(default) +language/expressions/object/method-definition/private-name-early-error-method-inside-class.js(strict mode) +language/expressions/object/yield-non-strict-access.js(default) +language/expressions/object/yield-non-strict-syntax.js(default) +language/expressions/postfix-decrement/arguments-nostrict.js(default) +language/expressions/postfix-decrement/eval-nostrict.js(default) +language/expressions/postfix-increment/arguments-nostrict.js(default) +language/expressions/postfix-increment/eval-nostrict.js(default) +language/expressions/prefix-decrement/arguments-nostrict.js(default) +language/expressions/prefix-decrement/eval-nostrict.js(default) +language/expressions/prefix-increment/arguments-nostrict.js(default) +language/expressions/prefix-increment/eval-nostrict.js(default) +language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js(default) +language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js(strict mode) +language/expressions/template-literal/unicode-escape-nls-err.js(default) +language/expressions/template-literal/unicode-escape-nls-err.js(strict mode) +language/expressions/yield/in-iteration-stmt.js(default) +language/expressions/yield/in-iteration-stmt.js(strict mode) +language/expressions/yield/star-in-iteration-stmt.js(default) +language/expressions/yield/star-in-iteration-stmt.js(strict mode) +language/global-code/new.target-arrow.js(default) +language/global-code/new.target-arrow.js(strict mode) +language/identifiers/unicode-escape-nls-err.js(default) +language/identifiers/unicode-escape-nls-err.js(strict mode) +language/import/dup-bound-names.js(default) +language/import/dup-bound-names.js(strict mode) +language/literals/numeric/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js(default) +language/literals/regexp/early-err-pattern.js(default) +language/literals/regexp/early-err-pattern.js(strict mode) +language/literals/regexp/invalid-braced-quantifier-exact.js(default) +language/literals/regexp/invalid-braced-quantifier-exact.js(strict mode) +language/literals/regexp/invalid-braced-quantifier-lower.js(default) +language/literals/regexp/invalid-braced-quantifier-lower.js(strict mode) +language/literals/regexp/invalid-braced-quantifier-range.js(default) +language/literals/regexp/invalid-braced-quantifier-range.js(strict mode) +language/literals/regexp/invalid-optional-lookbehind.js(default) +language/literals/regexp/invalid-optional-lookbehind.js(strict mode) +language/literals/regexp/invalid-optional-negative-lookbehind.js(default) +language/literals/regexp/invalid-optional-negative-lookbehind.js(strict mode) +language/literals/regexp/invalid-range-lookbehind.js(default) +language/literals/regexp/invalid-range-lookbehind.js(strict mode) +language/literals/regexp/invalid-range-negative-lookbehind.js(default) +language/literals/regexp/invalid-range-negative-lookbehind.js(strict mode) language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.js(default) language/literals/regexp/named-groups/invalid-dangling-groupname-2-u.js(strict mode) language/literals/regexp/named-groups/invalid-dangling-groupname-2.js(default) @@ -1760,9 +1268,682 @@ language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.j language/literals/regexp/named-groups/invalid-punctuator-within-groupspecifier.js(strict mode) language/literals/regexp/named-groups/invalid-u-escape-in-groupspecifier-2.js(default) language/literals/regexp/named-groups/invalid-u-escape-in-groupspecifier-2.js(strict mode) -language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.js(default) -language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.js(strict mode) language/literals/regexp/named-groups/invalid-u-escape-in-groupspecifier.js(default) language/literals/regexp/named-groups/invalid-u-escape-in-groupspecifier.js(strict mode) +language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.js(default) +language/literals/regexp/named-groups/invalid-unterminated-groupspecifier-u.js(strict mode) language/literals/regexp/named-groups/invalid-unterminated-groupspecifier.js(default) -language/literals/regexp/named-groups/invalid-unterminated-groupspecifier.js(strict mode) \ No newline at end of file +language/literals/regexp/named-groups/invalid-unterminated-groupspecifier.js(strict mode) +language/literals/regexp/u-dec-esc.js(default) +language/literals/regexp/u-dec-esc.js(strict mode) +language/literals/regexp/u-invalid-class-escape.js(default) +language/literals/regexp/u-invalid-class-escape.js(strict mode) +language/literals/regexp/u-invalid-extended-pattern-char.js(default) +language/literals/regexp/u-invalid-extended-pattern-char.js(strict mode) +language/literals/regexp/u-invalid-identity-escape.js(default) +language/literals/regexp/u-invalid-identity-escape.js(strict mode) +language/literals/regexp/u-invalid-legacy-octal-escape.js(default) +language/literals/regexp/u-invalid-legacy-octal-escape.js(strict mode) +language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.js(default) +language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-a.js(strict mode) +language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.js(default) +language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-ab.js(strict mode) +language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.js(default) +language/literals/regexp/u-invalid-non-empty-class-ranges-no-dash-b.js(strict mode) +language/literals/regexp/u-invalid-non-empty-class-ranges.js(default) +language/literals/regexp/u-invalid-non-empty-class-ranges.js(strict mode) +language/literals/regexp/u-invalid-oob-decimal-escape.js(default) +language/literals/regexp/u-invalid-oob-decimal-escape.js(strict mode) +language/literals/regexp/u-invalid-optional-lookahead.js(default) +language/literals/regexp/u-invalid-optional-lookahead.js(strict mode) +language/literals/regexp/u-invalid-optional-lookbehind.js(default) +language/literals/regexp/u-invalid-optional-lookbehind.js(strict mode) +language/literals/regexp/u-invalid-optional-negative-lookahead.js(default) +language/literals/regexp/u-invalid-optional-negative-lookahead.js(strict mode) +language/literals/regexp/u-invalid-optional-negative-lookbehind.js(default) +language/literals/regexp/u-invalid-optional-negative-lookbehind.js(strict mode) +language/literals/regexp/u-invalid-range-lookahead.js(default) +language/literals/regexp/u-invalid-range-lookahead.js(strict mode) +language/literals/regexp/u-invalid-range-lookbehind.js(default) +language/literals/regexp/u-invalid-range-lookbehind.js(strict mode) +language/literals/regexp/u-invalid-range-negative-lookahead.js(default) +language/literals/regexp/u-invalid-range-negative-lookahead.js(strict mode) +language/literals/regexp/u-invalid-range-negative-lookbehind.js(default) +language/literals/regexp/u-invalid-range-negative-lookbehind.js(strict mode) +language/literals/regexp/u-unicode-esc-bounds.js(default) +language/literals/regexp/u-unicode-esc-bounds.js(strict mode) +language/literals/regexp/u-unicode-esc-non-hex.js(default) +language/literals/regexp/u-unicode-esc-non-hex.js(strict mode) +language/literals/regexp/unicode-escape-nls-err.js(default) +language/literals/regexp/unicode-escape-nls-err.js(strict mode) +language/literals/string/legacy-non-octal-escape-sequence-strict.js(strict mode) +language/literals/string/unicode-escape-nls-err-double.js(default) +language/literals/string/unicode-escape-nls-err-double.js(strict mode) +language/literals/string/unicode-escape-nls-err-single.js(default) +language/literals/string/unicode-escape-nls-err-single.js(strict mode) +language/module-code/early-export-global.js(default) +language/module-code/early-export-global.js(strict mode) +language/module-code/early-export-unresolvable.js(default) +language/module-code/early-export-unresolvable.js(strict mode) +language/module-code/early-lex-and-var.js(default) +language/module-code/early-lex-and-var.js(strict mode) +language/module-code/parse-err-hoist-lex-fun.js(default) +language/module-code/parse-err-hoist-lex-fun.js(strict mode) +language/module-code/parse-err-hoist-lex-gen.js(default) +language/module-code/parse-err-hoist-lex-gen.js(strict mode) +language/module-code/privatename-not-valid-earlyerr-module-1.js(default) +language/module-code/privatename-not-valid-earlyerr-module-1.js(strict mode) +language/module-code/privatename-not-valid-earlyerr-module-2.js(default) +language/module-code/privatename-not-valid-earlyerr-module-2.js(strict mode) +language/module-code/privatename-not-valid-earlyerr-module-3.js(default) +language/module-code/privatename-not-valid-earlyerr-module-3.js(strict mode) +language/module-code/privatename-not-valid-earlyerr-module-4.js(default) +language/module-code/privatename-not-valid-earlyerr-module-4.js(strict mode) +language/statements/async-function/dflt-params-duplicates.js(default) +language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(default) +language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(strict mode) +language/statements/async-generator/dflt-params-duplicates.js(default) +language/statements/class/async-gen-meth-escaped-async.js(default) +language/statements/class/async-gen-meth-escaped-async.js(strict mode) +language/statements/class/async-meth-escaped-async.js(default) +language/statements/class/async-meth-escaped-async.js(strict mode) +language/statements/class/class-name-ident-static-escaped.js(default) +language/statements/class/class-name-ident-static.js(default) +language/statements/class/elements/after-same-line-gen-private-field-usage.js(default) +language/statements/class/elements/after-same-line-gen-private-field-usage.js(strict mode) +language/statements/class/elements/after-same-line-gen-rs-private-getter-alt.js(default) +language/statements/class/elements/after-same-line-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/after-same-line-gen-rs-private-getter.js(default) +language/statements/class/elements/after-same-line-gen-rs-private-getter.js(strict mode) +language/statements/class/elements/after-same-line-gen-rs-private-method-alt.js(default) +language/statements/class/elements/after-same-line-gen-rs-private-method-alt.js(strict mode) +language/statements/class/elements/after-same-line-gen-rs-private-method.js(default) +language/statements/class/elements/after-same-line-gen-rs-private-method.js(strict mode) +language/statements/class/elements/after-same-line-gen-rs-private-setter-alt.js(default) +language/statements/class/elements/after-same-line-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/after-same-line-gen-rs-private-setter.js(default) +language/statements/class/elements/after-same-line-gen-rs-private-setter.js(strict mode) +language/statements/class/elements/after-same-line-method-private-field-usage.js(default) +language/statements/class/elements/after-same-line-method-private-field-usage.js(strict mode) +language/statements/class/elements/after-same-line-method-rs-private-getter-alt.js(default) +language/statements/class/elements/after-same-line-method-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/after-same-line-method-rs-private-getter.js(default) +language/statements/class/elements/after-same-line-method-rs-private-getter.js(strict mode) +language/statements/class/elements/after-same-line-method-rs-private-method-alt.js(default) +language/statements/class/elements/after-same-line-method-rs-private-method-alt.js(strict mode) +language/statements/class/elements/after-same-line-method-rs-private-method.js(default) +language/statements/class/elements/after-same-line-method-rs-private-method.js(strict mode) +language/statements/class/elements/after-same-line-method-rs-private-setter-alt.js(default) +language/statements/class/elements/after-same-line-method-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/after-same-line-method-rs-private-setter.js(default) +language/statements/class/elements/after-same-line-method-rs-private-setter.js(strict mode) +language/statements/class/elements/after-same-line-static-async-gen-private-field-usage.js(default) +language/statements/class/elements/after-same-line-static-async-gen-private-field-usage.js(strict mode) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js(default) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter.js(default) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-getter.js(strict mode) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js(default) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-method-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-method.js(default) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-method.js(strict mode) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js(default) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter.js(default) +language/statements/class/elements/after-same-line-static-async-gen-rs-private-setter.js(strict mode) +language/statements/class/elements/after-same-line-static-async-method-private-field-usage.js(default) +language/statements/class/elements/after-same-line-static-async-method-private-field-usage.js(strict mode) +language/statements/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js(default) +language/statements/class/elements/after-same-line-static-async-method-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-async-method-rs-private-getter.js(default) +language/statements/class/elements/after-same-line-static-async-method-rs-private-getter.js(strict mode) +language/statements/class/elements/after-same-line-static-async-method-rs-private-method-alt.js(default) +language/statements/class/elements/after-same-line-static-async-method-rs-private-method-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-async-method-rs-private-method.js(default) +language/statements/class/elements/after-same-line-static-async-method-rs-private-method.js(strict mode) +language/statements/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js(default) +language/statements/class/elements/after-same-line-static-async-method-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-async-method-rs-private-setter.js(default) +language/statements/class/elements/after-same-line-static-async-method-rs-private-setter.js(strict mode) +language/statements/class/elements/after-same-line-static-gen-private-field-usage.js(default) +language/statements/class/elements/after-same-line-static-gen-private-field-usage.js(strict mode) +language/statements/class/elements/after-same-line-static-gen-rs-private-getter-alt.js(default) +language/statements/class/elements/after-same-line-static-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-gen-rs-private-getter.js(default) +language/statements/class/elements/after-same-line-static-gen-rs-private-getter.js(strict mode) +language/statements/class/elements/after-same-line-static-gen-rs-private-method-alt.js(default) +language/statements/class/elements/after-same-line-static-gen-rs-private-method-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-gen-rs-private-method.js(default) +language/statements/class/elements/after-same-line-static-gen-rs-private-method.js(strict mode) +language/statements/class/elements/after-same-line-static-gen-rs-private-setter-alt.js(default) +language/statements/class/elements/after-same-line-static-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-gen-rs-private-setter.js(default) +language/statements/class/elements/after-same-line-static-gen-rs-private-setter.js(strict mode) +language/statements/class/elements/after-same-line-static-method-private-field-usage.js(default) +language/statements/class/elements/after-same-line-static-method-private-field-usage.js(strict mode) +language/statements/class/elements/after-same-line-static-method-rs-private-getter-alt.js(default) +language/statements/class/elements/after-same-line-static-method-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-method-rs-private-getter.js(default) +language/statements/class/elements/after-same-line-static-method-rs-private-getter.js(strict mode) +language/statements/class/elements/after-same-line-static-method-rs-private-method-alt.js(default) +language/statements/class/elements/after-same-line-static-method-rs-private-method-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-method-rs-private-method.js(default) +language/statements/class/elements/after-same-line-static-method-rs-private-method.js(strict mode) +language/statements/class/elements/after-same-line-static-method-rs-private-setter-alt.js(default) +language/statements/class/elements/after-same-line-static-method-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/after-same-line-static-method-rs-private-setter.js(default) +language/statements/class/elements/after-same-line-static-method-rs-private-setter.js(strict mode) +language/statements/class/elements/fields-duplicate-privatenames.js(default) +language/statements/class/elements/fields-duplicate-privatenames.js(strict mode) +language/statements/class/elements/fields-literal-name-static-propname-constructor.js(default) +language/statements/class/elements/fields-literal-name-static-propname-constructor.js(strict mode) +language/statements/class/elements/fields-string-name-static-propname-constructor.js(default) +language/statements/class/elements/fields-string-name-static-propname-constructor.js(strict mode) +language/statements/class/elements/multiple-definitions-private-field-usage.js(default) +language/statements/class/elements/multiple-definitions-private-field-usage.js(strict mode) +language/statements/class/elements/multiple-definitions-rs-private-getter-alt.js(default) +language/statements/class/elements/multiple-definitions-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/multiple-definitions-rs-private-getter.js(default) +language/statements/class/elements/multiple-definitions-rs-private-getter.js(strict mode) +language/statements/class/elements/multiple-definitions-rs-private-method-alt.js(default) +language/statements/class/elements/multiple-definitions-rs-private-method-alt.js(strict mode) +language/statements/class/elements/multiple-definitions-rs-private-method.js(default) +language/statements/class/elements/multiple-definitions-rs-private-method.js(strict mode) +language/statements/class/elements/multiple-definitions-rs-private-setter-alt.js(default) +language/statements/class/elements/multiple-definitions-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/multiple-definitions-rs-private-setter.js(default) +language/statements/class/elements/multiple-definitions-rs-private-setter.js(strict mode) +language/statements/class/elements/multiple-stacked-definitions-private-field-usage.js(default) +language/statements/class/elements/multiple-stacked-definitions-private-field-usage.js(strict mode) +language/statements/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js(default) +language/statements/class/elements/multiple-stacked-definitions-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/multiple-stacked-definitions-rs-private-getter.js(default) +language/statements/class/elements/multiple-stacked-definitions-rs-private-getter.js(strict mode) +language/statements/class/elements/multiple-stacked-definitions-rs-private-method-alt.js(default) +language/statements/class/elements/multiple-stacked-definitions-rs-private-method-alt.js(strict mode) +language/statements/class/elements/multiple-stacked-definitions-rs-private-method.js(default) +language/statements/class/elements/multiple-stacked-definitions-rs-private-method.js(strict mode) +language/statements/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js(default) +language/statements/class/elements/multiple-stacked-definitions-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/multiple-stacked-definitions-rs-private-setter.js(default) +language/statements/class/elements/multiple-stacked-definitions-rs-private-setter.js(strict mode) +language/statements/class/elements/new-no-sc-line-method-private-field-usage.js(default) +language/statements/class/elements/new-no-sc-line-method-private-field-usage.js(strict mode) +language/statements/class/elements/new-no-sc-line-method-rs-private-getter-alt.js(default) +language/statements/class/elements/new-no-sc-line-method-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/new-no-sc-line-method-rs-private-getter.js(default) +language/statements/class/elements/new-no-sc-line-method-rs-private-getter.js(strict mode) +language/statements/class/elements/new-no-sc-line-method-rs-private-method-alt.js(default) +language/statements/class/elements/new-no-sc-line-method-rs-private-method-alt.js(strict mode) +language/statements/class/elements/new-no-sc-line-method-rs-private-method.js(default) +language/statements/class/elements/new-no-sc-line-method-rs-private-method.js(strict mode) +language/statements/class/elements/new-no-sc-line-method-rs-private-setter-alt.js(default) +language/statements/class/elements/new-no-sc-line-method-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/new-no-sc-line-method-rs-private-setter.js(default) +language/statements/class/elements/new-no-sc-line-method-rs-private-setter.js(strict mode) +language/statements/class/elements/new-sc-line-gen-private-field-usage.js(default) +language/statements/class/elements/new-sc-line-gen-private-field-usage.js(strict mode) +language/statements/class/elements/new-sc-line-gen-rs-private-getter-alt.js(default) +language/statements/class/elements/new-sc-line-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/new-sc-line-gen-rs-private-getter.js(default) +language/statements/class/elements/new-sc-line-gen-rs-private-getter.js(strict mode) +language/statements/class/elements/new-sc-line-gen-rs-private-method-alt.js(default) +language/statements/class/elements/new-sc-line-gen-rs-private-method-alt.js(strict mode) +language/statements/class/elements/new-sc-line-gen-rs-private-method.js(default) +language/statements/class/elements/new-sc-line-gen-rs-private-method.js(strict mode) +language/statements/class/elements/new-sc-line-gen-rs-private-setter-alt.js(default) +language/statements/class/elements/new-sc-line-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/new-sc-line-gen-rs-private-setter.js(default) +language/statements/class/elements/new-sc-line-gen-rs-private-setter.js(strict mode) +language/statements/class/elements/new-sc-line-method-private-field-usage.js(default) +language/statements/class/elements/new-sc-line-method-private-field-usage.js(strict mode) +language/statements/class/elements/new-sc-line-method-rs-private-getter-alt.js(default) +language/statements/class/elements/new-sc-line-method-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/new-sc-line-method-rs-private-getter.js(default) +language/statements/class/elements/new-sc-line-method-rs-private-getter.js(strict mode) +language/statements/class/elements/new-sc-line-method-rs-private-method-alt.js(default) +language/statements/class/elements/new-sc-line-method-rs-private-method-alt.js(strict mode) +language/statements/class/elements/new-sc-line-method-rs-private-method.js(default) +language/statements/class/elements/new-sc-line-method-rs-private-method.js(strict mode) +language/statements/class/elements/new-sc-line-method-rs-private-setter-alt.js(default) +language/statements/class/elements/new-sc-line-method-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/new-sc-line-method-rs-private-setter.js(default) +language/statements/class/elements/new-sc-line-method-rs-private-setter.js(strict mode) +language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js(default) +language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-1.js(strict mode) +language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js(default) +language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall-2.js(strict mode) +language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js(default) +language/statements/class/elements/private-derived-cls-direct-eval-err-contains-supercall.js(strict mode) +language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js(default) +language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js(strict mode) +language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js(default) +language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js(strict mode) +language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js(default) +language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js(strict mode) +language/statements/class/elements/private-methods/prod-private-method-initialize-order.js(default) +language/statements/class/elements/private-methods/prod-private-method-initialize-order.js(strict mode) +language/statements/class/elements/privatename-not-valid-earlyerr-script-1.js(default) +language/statements/class/elements/privatename-not-valid-earlyerr-script-1.js(strict mode) +language/statements/class/elements/privatename-not-valid-earlyerr-script-2.js(default) +language/statements/class/elements/privatename-not-valid-earlyerr-script-2.js(strict mode) +language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js(default) +language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js(strict mode) +language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js(default) +language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js(strict mode) +language/statements/class/elements/regular-definitions-private-field-usage.js(default) +language/statements/class/elements/regular-definitions-private-field-usage.js(strict mode) +language/statements/class/elements/regular-definitions-rs-private-getter-alt.js(default) +language/statements/class/elements/regular-definitions-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/regular-definitions-rs-private-getter.js(default) +language/statements/class/elements/regular-definitions-rs-private-getter.js(strict mode) +language/statements/class/elements/regular-definitions-rs-private-method-alt.js(default) +language/statements/class/elements/regular-definitions-rs-private-method-alt.js(strict mode) +language/statements/class/elements/regular-definitions-rs-private-method.js(default) +language/statements/class/elements/regular-definitions-rs-private-method.js(strict mode) +language/statements/class/elements/regular-definitions-rs-private-setter-alt.js(default) +language/statements/class/elements/regular-definitions-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/regular-definitions-rs-private-setter.js(default) +language/statements/class/elements/regular-definitions-rs-private-setter.js(strict mode) +language/statements/class/elements/same-line-async-gen-private-field-usage.js(default) +language/statements/class/elements/same-line-async-gen-private-field-usage.js(strict mode) +language/statements/class/elements/same-line-async-gen-rs-private-getter-alt.js(default) +language/statements/class/elements/same-line-async-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/same-line-async-gen-rs-private-getter.js(default) +language/statements/class/elements/same-line-async-gen-rs-private-getter.js(strict mode) +language/statements/class/elements/same-line-async-gen-rs-private-method-alt.js(default) +language/statements/class/elements/same-line-async-gen-rs-private-method-alt.js(strict mode) +language/statements/class/elements/same-line-async-gen-rs-private-method.js(default) +language/statements/class/elements/same-line-async-gen-rs-private-method.js(strict mode) +language/statements/class/elements/same-line-async-gen-rs-private-setter-alt.js(default) +language/statements/class/elements/same-line-async-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/same-line-async-gen-rs-private-setter.js(default) +language/statements/class/elements/same-line-async-gen-rs-private-setter.js(strict mode) +language/statements/class/elements/same-line-async-method-private-field-usage.js(default) +language/statements/class/elements/same-line-async-method-private-field-usage.js(strict mode) +language/statements/class/elements/same-line-async-method-rs-private-getter-alt.js(default) +language/statements/class/elements/same-line-async-method-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/same-line-async-method-rs-private-getter.js(default) +language/statements/class/elements/same-line-async-method-rs-private-getter.js(strict mode) +language/statements/class/elements/same-line-async-method-rs-private-method-alt.js(default) +language/statements/class/elements/same-line-async-method-rs-private-method-alt.js(strict mode) +language/statements/class/elements/same-line-async-method-rs-private-method.js(default) +language/statements/class/elements/same-line-async-method-rs-private-method.js(strict mode) +language/statements/class/elements/same-line-async-method-rs-private-setter-alt.js(default) +language/statements/class/elements/same-line-async-method-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/same-line-async-method-rs-private-setter.js(default) +language/statements/class/elements/same-line-async-method-rs-private-setter.js(strict mode) +language/statements/class/elements/same-line-gen-private-field-usage.js(default) +language/statements/class/elements/same-line-gen-private-field-usage.js(strict mode) +language/statements/class/elements/same-line-gen-rs-private-getter-alt.js(default) +language/statements/class/elements/same-line-gen-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/same-line-gen-rs-private-getter.js(default) +language/statements/class/elements/same-line-gen-rs-private-getter.js(strict mode) +language/statements/class/elements/same-line-gen-rs-private-method-alt.js(default) +language/statements/class/elements/same-line-gen-rs-private-method-alt.js(strict mode) +language/statements/class/elements/same-line-gen-rs-private-method.js(default) +language/statements/class/elements/same-line-gen-rs-private-method.js(strict mode) +language/statements/class/elements/same-line-gen-rs-private-setter-alt.js(default) +language/statements/class/elements/same-line-gen-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/same-line-gen-rs-private-setter.js(default) +language/statements/class/elements/same-line-gen-rs-private-setter.js(strict mode) +language/statements/class/elements/same-line-method-private-field-usage.js(default) +language/statements/class/elements/same-line-method-private-field-usage.js(strict mode) +language/statements/class/elements/same-line-method-rs-private-getter-alt.js(default) +language/statements/class/elements/same-line-method-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/same-line-method-rs-private-getter.js(default) +language/statements/class/elements/same-line-method-rs-private-getter.js(strict mode) +language/statements/class/elements/same-line-method-rs-private-method-alt.js(default) +language/statements/class/elements/same-line-method-rs-private-method-alt.js(strict mode) +language/statements/class/elements/same-line-method-rs-private-method.js(default) +language/statements/class/elements/same-line-method-rs-private-method.js(strict mode) +language/statements/class/elements/same-line-method-rs-private-setter-alt.js(default) +language/statements/class/elements/same-line-method-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/same-line-method-rs-private-setter.js(default) +language/statements/class/elements/same-line-method-rs-private-setter.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) +language/statements/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-field.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-get.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-meth.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-set.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticfield.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-meth-staticmeth.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-field.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(default) +language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-set-set.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-call-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-call-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-fn-member-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/field-init-member-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-call-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-call-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-fn-member-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-call-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-call-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-bad-reference.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-bad-reference.js(strict mode) +language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(default) +language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(strict mode) +language/statements/class/elements/syntax/early-errors/super-private-access-invalid.js(default) +language/statements/class/elements/syntax/early-errors/super-private-access-invalid.js(strict mode) +language/statements/class/elements/wrapped-in-sc-private-field-usage.js(default) +language/statements/class/elements/wrapped-in-sc-private-field-usage.js(strict mode) +language/statements/class/elements/wrapped-in-sc-rs-private-getter-alt.js(default) +language/statements/class/elements/wrapped-in-sc-rs-private-getter-alt.js(strict mode) +language/statements/class/elements/wrapped-in-sc-rs-private-getter.js(default) +language/statements/class/elements/wrapped-in-sc-rs-private-getter.js(strict mode) +language/statements/class/elements/wrapped-in-sc-rs-private-method-alt.js(default) +language/statements/class/elements/wrapped-in-sc-rs-private-method-alt.js(strict mode) +language/statements/class/elements/wrapped-in-sc-rs-private-method.js(default) +language/statements/class/elements/wrapped-in-sc-rs-private-method.js(strict mode) +language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js(default) +language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js(strict mode) +language/statements/class/elements/wrapped-in-sc-rs-private-setter.js(default) +language/statements/class/elements/wrapped-in-sc-rs-private-setter.js(strict mode) +language/statements/class/strict-mode/with.js(default) +language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(default) +language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(strict mode) +language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(default) +language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(strict mode) +language/statements/const/redeclaration-error-from-within-strict-mode-function-const.js(default) +language/statements/do-while/decl-async-fun.js(default) +language/statements/do-while/decl-async-fun.js(strict mode) +language/statements/do-while/decl-async-gen.js(default) +language/statements/do-while/decl-async-gen.js(strict mode) +language/statements/do-while/labelled-fn-stmt.js(default) +language/statements/for-await-of/let-block-with-newline.js(default) +language/statements/for-await-of/let-identifier-with-newline.js(default) +language/statements/for-in/decl-async-fun.js(default) +language/statements/for-in/decl-async-fun.js(strict mode) +language/statements/for-in/decl-async-gen.js(default) +language/statements/for-in/decl-async-gen.js(strict mode) +language/statements/for-in/dstr/array-rest-before-elision.js(default) +language/statements/for-in/dstr/array-rest-before-elision.js(strict mode) +language/statements/for-in/dstr/array-rest-elision-invalid.js(default) +language/statements/for-in/dstr/array-rest-elision-invalid.js(strict mode) +language/statements/for-in/head-const-bound-names-dup.js(default) +language/statements/for-in/head-const-bound-names-dup.js(strict mode) +language/statements/for-in/head-const-bound-names-in-stmt.js(default) +language/statements/for-in/head-const-bound-names-in-stmt.js(strict mode) +language/statements/for-in/head-let-bound-names-dup.js(default) +language/statements/for-in/head-let-bound-names-dup.js(strict mode) +language/statements/for-in/head-let-bound-names-in-stmt.js(default) +language/statements/for-in/head-let-bound-names-in-stmt.js(strict mode) +language/statements/for-in/head-lhs-let.js(default) +language/statements/for-in/head-var-bound-names-let.js(default) +language/statements/for-in/identifier-let-allowed-as-lefthandside-expression-not-strict.js(default) +language/statements/for-in/labelled-fn-stmt-const.js(default) +language/statements/for-in/labelled-fn-stmt-let.js(default) +language/statements/for-in/labelled-fn-stmt-lhs.js(default) +language/statements/for-in/labelled-fn-stmt-var.js(default) +language/statements/for-in/let-block-with-newline.js(default) +language/statements/for-in/let-identifier-with-newline.js(default) +language/statements/for-of/decl-async-fun.js(default) +language/statements/for-of/decl-async-fun.js(strict mode) +language/statements/for-of/decl-async-gen.js(default) +language/statements/for-of/decl-async-gen.js(strict mode) +language/statements/for-of/dstr/array-rest-before-elision.js(default) +language/statements/for-of/dstr/array-rest-before-elision.js(strict mode) +language/statements/for-of/dstr/array-rest-elision-invalid.js(default) +language/statements/for-of/dstr/array-rest-elision-invalid.js(strict mode) +language/statements/for-of/dstr/obj-id-identifier-yield-ident-valid.js(default) +language/statements/for-of/head-const-bound-names-dup.js(default) +language/statements/for-of/head-const-bound-names-dup.js(strict mode) +language/statements/for-of/head-const-bound-names-in-stmt.js(default) +language/statements/for-of/head-const-bound-names-in-stmt.js(strict mode) +language/statements/for-of/head-decl-no-expr.js(default) +language/statements/for-of/head-decl-no-expr.js(strict mode) +language/statements/for-of/head-expr-no-expr.js(default) +language/statements/for-of/head-expr-no-expr.js(strict mode) +language/statements/for-of/head-let-bound-names-dup.js(default) +language/statements/for-of/head-let-bound-names-dup.js(strict mode) +language/statements/for-of/head-let-bound-names-in-stmt.js(default) +language/statements/for-of/head-let-bound-names-in-stmt.js(strict mode) +language/statements/for-of/head-var-bound-names-let.js(default) +language/statements/for-of/head-var-no-expr.js(default) +language/statements/for-of/head-var-no-expr.js(strict mode) +language/statements/for-of/labelled-fn-stmt-const.js(default) +language/statements/for-of/labelled-fn-stmt-let.js(default) +language/statements/for-of/labelled-fn-stmt-lhs.js(default) +language/statements/for-of/labelled-fn-stmt-var.js(default) +language/statements/for-of/let-block-with-newline.js(default) +language/statements/for-of/let-identifier-with-newline.js(default) +language/statements/for/decl-async-fun.js(default) +language/statements/for/decl-async-fun.js(strict mode) +language/statements/for/decl-async-gen.js(default) +language/statements/for/decl-async-gen.js(strict mode) +language/statements/for/head-let-bound-names-in-stmt.js(default) +language/statements/for/head-let-bound-names-in-stmt.js(strict mode) +language/statements/for/head-lhs-let.js(default) +language/statements/for/labelled-fn-stmt-expr.js(default) +language/statements/for/labelled-fn-stmt-let.js(default) +language/statements/for/labelled-fn-stmt-var.js(default) +language/statements/for/let-block-with-newline.js(default) +language/statements/for/let-identifier-with-newline.js(default) +language/statements/function/dflt-params-duplicates.js(default) +language/statements/generators/dflt-params-duplicates.js(default) +language/statements/if/if-async-fun-else-async-fun.js(default) +language/statements/if/if-async-fun-else-async-fun.js(strict mode) +language/statements/if/if-async-fun-else-stmt.js(default) +language/statements/if/if-async-fun-else-stmt.js(strict mode) +language/statements/if/if-async-fun-no-else.js(default) +language/statements/if/if-async-fun-no-else.js(strict mode) +language/statements/if/if-async-gen-else-async-gen.js(default) +language/statements/if/if-async-gen-else-async-gen.js(strict mode) +language/statements/if/if-async-gen-else-stmt.js(default) +language/statements/if/if-async-gen-else-stmt.js(strict mode) +language/statements/if/if-async-gen-no-else.js(default) +language/statements/if/if-async-gen-no-else.js(strict mode) +language/statements/if/if-stmt-else-async-fun.js(default) +language/statements/if/if-stmt-else-async-fun.js(strict mode) +language/statements/if/if-stmt-else-async-gen.js(default) +language/statements/if/if-stmt-else-async-gen.js(strict mode) +language/statements/if/labelled-fn-stmt-first.js(default) +language/statements/if/labelled-fn-stmt-lone.js(default) +language/statements/if/labelled-fn-stmt-second.js(default) +language/statements/if/let-block-with-newline.js(default) +language/statements/if/let-identifier-with-newline.js(default) +language/statements/labeled/let-block-with-newline.js(default) +language/statements/labeled/let-identifier-with-newline.js(default) +language/statements/labeled/value-yield-non-strict-escaped.js(default) +language/statements/labeled/value-yield-non-strict.js(default) +language/statements/let/redeclaration-error-from-within-strict-mode-function.js(default) +language/statements/let/syntax/escaped-let.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js(strict mode) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js(strict mode) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js(strict mode) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js(strict mode) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js(strict mode) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js(default) +language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js(default) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js(default) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js(default) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js(default) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js(default) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js(default) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js(default) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js(strict mode) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js(default) +language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js(strict mode) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js(default) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js(strict mode) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js(default) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js(default) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js(strict mode) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js(default) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js(strict mode) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js(default) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js(strict mode) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js(default) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js(default) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js(strict mode) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js(default) +language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js(strict mode) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js(default) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js(strict mode) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js(default) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js(default) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js(strict mode) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js(default) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js(strict mode) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js(default) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js(strict mode) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js(default) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js(default) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js(strict mode) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js(default) +language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js(strict mode) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js(default) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js(strict mode) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js(default) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js(default) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js(strict mode) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js(default) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js(strict mode) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-function.js(strict mode) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js(default) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js(default) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js(strict mode) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js(default) +language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js(default) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js(default) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js(default) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js(default) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js(default) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js(default) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js(default) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js(strict mode) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js(default) +language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js(strict mode) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js(default) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js(strict mode) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js(default) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js(default) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js(strict mode) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js(default) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js(strict mode) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js(default) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js(strict mode) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js(default) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js(default) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js(strict mode) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js(default) +language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js(strict mode) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js(default) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js(strict mode) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js(default) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js(default) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js(strict mode) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js(default) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js(strict mode) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js(default) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js(strict mode) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js(default) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js(strict mode) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js(default) +language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js(strict mode) +language/statements/try/early-catch-function.js(default) +language/statements/try/early-catch-function.js(strict mode) +language/statements/try/early-catch-lex.js(default) +language/statements/try/early-catch-lex.js(strict mode) +language/statements/try/early-catch-var.js(default) +language/statements/try/early-catch-var.js(strict mode) +language/statements/while/decl-async-fun.js(default) +language/statements/while/decl-async-fun.js(strict mode) +language/statements/while/decl-async-gen.js(default) +language/statements/while/decl-async-gen.js(strict mode) +language/statements/while/labelled-fn-stmt.js(default) +language/statements/while/let-block-with-newline.js(default) +language/statements/while/let-identifier-with-newline.js(default) +language/statements/with/decl-async-fun.js(default) +language/statements/with/decl-async-gen.js(default) +language/statements/with/labelled-fn-stmt.js(default) +language/statements/with/let-block-with-newline.js(default) +language/statements/with/let-identifier-with-newline.js(default) From 9803253363105c6b0ae6f7651fc8ec11c90b14b1 Mon Sep 17 00:00:00 2001 From: David Laban Date: Mon, 7 Jan 2019 14:53:01 +0000 Subject: [PATCH 189/563] flow type update: babel-types.isType(?string, string): boolean (#9275) --- packages/babel-types/src/validators/isType.js | 2 +- packages/babel-types/test/validators.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/babel-types/src/validators/isType.js b/packages/babel-types/src/validators/isType.js index 6b5e0feade71..cf9a681a0a00 100644 --- a/packages/babel-types/src/validators/isType.js +++ b/packages/babel-types/src/validators/isType.js @@ -4,7 +4,7 @@ import { FLIPPED_ALIAS_KEYS, ALIAS_KEYS } from "../definitions"; /** * Test if a `nodeType` is a `targetType` or if `targetType` is an alias of `nodeType`. */ -export default function isType(nodeType: string, targetType: string): boolean { +export default function isType(nodeType: ?string, targetType: string): boolean { if (nodeType === targetType) return true; // This is a fast-path. If the test above failed, but an alias key is found, then the diff --git a/packages/babel-types/test/validators.js b/packages/babel-types/test/validators.js index 4b59edeb2725..ce4740288105 100644 --- a/packages/babel-types/test/validators.js +++ b/packages/babel-types/test/validators.js @@ -136,5 +136,8 @@ describe("validators", function() { it("returns false if nodeType and targetType are unrelated", function() { expect(t.isType("ArrayExpression", "ClassBody")).toBe(false); }); + it("returns false if nodeType is undefined", function() { + expect(t.isType(undefined, "Expression")).toBe(false); + }); }); }); From 03022d169e07ebdb245de7ec4f2ff5c7cda6aa1f Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 7 Jan 2019 15:27:27 -0600 Subject: [PATCH 190/563] Throw error if TypeScript class has empty implements (#9292) --- .../babel-parser/src/plugins/typescript.js | 18 +++- .../typescript/class/extends-empty/input.js | 2 + .../class/extends-empty/options.json | 3 + .../class/extends-implements-empty/input.js | 2 + .../extends-implements-empty/options.json | 3 + .../class/implements-empty/input.js | 2 + .../class/implements-empty/options.json | 3 + .../typescript/type-arguments/empty/input.js | 1 + .../type-arguments/empty/output.json | 99 +++++++++++++++++++ 9 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/typescript/class/extends-empty/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/class/extends-empty/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/class/implements-empty/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/class/implements-empty/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/type-arguments/empty/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/type-arguments/empty/output.json diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 1a0c8c7a652d..07e57b99140b 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -905,11 +905,21 @@ export default (superClass: Class): Class => return this.finishNode(node, "TSTypeAssertion"); } - tsParseHeritageClause(): $ReadOnlyArray { - return this.tsParseDelimitedList( + tsParseHeritageClause( + descriptor: string, + ): $ReadOnlyArray { + const originalStart = this.state.start; + + const delimitedList = this.tsParseDelimitedList( "HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this), ); + + if (!delimitedList.length) { + this.raise(originalStart, `'${descriptor}' list cannot be empty.`); + } + + return delimitedList; } tsParseExpressionWithTypeArguments(): N.TsExpressionWithTypeArguments { @@ -930,7 +940,7 @@ export default (superClass: Class): Class => node.id = this.parseIdentifier(); node.typeParameters = this.tsTryParseTypeParameters(); if (this.eat(tt._extends)) { - node.extends = this.tsParseHeritageClause(); + node.extends = this.tsParseHeritageClause("extends"); } const body: N.TSInterfaceBody = this.startNode(); body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); @@ -1879,7 +1889,7 @@ export default (superClass: Class): Class => node.superTypeParameters = this.tsParseTypeArguments(); } if (this.eatContextual("implements")) { - node.implements = this.tsParseHeritageClause(); + node.implements = this.tsParseHeritageClause("implements"); } } diff --git a/packages/babel-parser/test/fixtures/typescript/class/extends-empty/input.js b/packages/babel-parser/test/fixtures/typescript/class/extends-empty/input.js new file mode 100644 index 000000000000..8b826e7919db --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/extends-empty/input.js @@ -0,0 +1,2 @@ +interface foo extends { +} diff --git a/packages/babel-parser/test/fixtures/typescript/class/extends-empty/options.json b/packages/babel-parser/test/fixtures/typescript/class/extends-empty/options.json new file mode 100644 index 000000000000..3de0ab8596c4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/extends-empty/options.json @@ -0,0 +1,3 @@ +{ + "throws": "'extends' list cannot be empty. (1:22)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/input.js b/packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/input.js new file mode 100644 index 000000000000..aa9ed6dca28c --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/input.js @@ -0,0 +1,2 @@ +class Foo extends Bar implements { +} diff --git a/packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/options.json b/packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/options.json new file mode 100644 index 000000000000..950506446835 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/extends-implements-empty/options.json @@ -0,0 +1,3 @@ +{ + "throws": "'implements' list cannot be empty. (1:33)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/class/implements-empty/input.js b/packages/babel-parser/test/fixtures/typescript/class/implements-empty/input.js new file mode 100644 index 000000000000..f72f480995bd --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/implements-empty/input.js @@ -0,0 +1,2 @@ +class Foo implements { +} diff --git a/packages/babel-parser/test/fixtures/typescript/class/implements-empty/options.json b/packages/babel-parser/test/fixtures/typescript/class/implements-empty/options.json new file mode 100644 index 000000000000..6751fbcc5443 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/implements-empty/options.json @@ -0,0 +1,3 @@ +{ + "throws": "'implements' list cannot be empty. (1:21)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/type-arguments/empty/input.js b/packages/babel-parser/test/fixtures/typescript/type-arguments/empty/input.js new file mode 100644 index 000000000000..63cf8bbeecd8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/type-arguments/empty/input.js @@ -0,0 +1 @@ +foo<>() diff --git a/packages/babel-parser/test/fixtures/typescript/type-arguments/empty/output.json b/packages/babel-parser/test/fixtures/typescript/type-arguments/empty/output.json new file mode 100644 index 000000000000..ce11198360c5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/type-arguments/empty/output.json @@ -0,0 +1,99 @@ +{ + "type": "File", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "expression": { + "type": "CallExpression", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "callee": { + "type": "Identifier", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "arguments": [], + "typeParameters": { + "type": "TSTypeParameterInstantiation", + "start": 3, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "params": [] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file From 46e3f6df1f010ec1276eb6e0f961c51fca5affcb Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 8 Jan 2019 14:19:55 +0100 Subject: [PATCH 191/563] @babel/parser: include leading character into range of generic ArrowFunctionExpression (#9295) --- packages/babel-parser/src/plugins/typescript.js | 5 +---- .../typescript/arrow-function/generic-tsx/output.json | 6 +++--- .../fixtures/typescript/arrow-function/generic/output.json | 6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 07e57b99140b..c25eaec0a327 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -2001,10 +2001,7 @@ export default (superClass: Class): Class => // Correct TypeScript code should have at least 1 type parameter, but don't crash on bad code. if (typeParameters && typeParameters.params.length !== 0) { - this.resetStartLocationFromNode( - arrowExpression, - typeParameters.params[0], - ); + this.resetStartLocationFromNode(arrowExpression, typeParameters); } arrowExpression.typeParameters = typeParameters; return arrowExpression; diff --git a/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx/output.json b/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx/output.json index ee5c663d37a9..58c3d9672124 100644 --- a/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx/output.json +++ b/packages/babel-parser/test/fixtures/typescript/arrow-function/generic-tsx/output.json @@ -45,12 +45,12 @@ }, "expression": { "type": "ArrowFunctionExpression", - "start": 62, + "start": 61, "end": 78, "loc": { "start": { "line": 2, - "column": 1 + "column": 0 }, "end": { "line": 2, @@ -264,4 +264,4 @@ } } ] -} \ No newline at end of file +} diff --git a/packages/babel-parser/test/fixtures/typescript/arrow-function/generic/output.json b/packages/babel-parser/test/fixtures/typescript/arrow-function/generic/output.json index 5b7f66c90e1b..1f99918b7ad3 100644 --- a/packages/babel-parser/test/fixtures/typescript/arrow-function/generic/output.json +++ b/packages/babel-parser/test/fixtures/typescript/arrow-function/generic/output.json @@ -45,12 +45,12 @@ }, "expression": { "type": "ArrowFunctionExpression", - "start": 1, + "start": 0, "end": 17, "loc": { "start": { "line": 1, - "column": 1 + "column": 0 }, "end": { "line": 1, @@ -228,4 +228,4 @@ ], "directives": [] } -} \ No newline at end of file +} From 778a61a3c2ee367e598da8e6c3a2ab9ffe85a064 Mon Sep 17 00:00:00 2001 From: Cameron Martin Date: Tue, 8 Jan 2019 23:14:31 +0000 Subject: [PATCH 192/563] [@babel/types] Moved generators related to babel-types into the babel-types package directory. (#9245) --- Makefile | 7 ++++--- .../babel-types/scripts}/generators/docs.js | 9 +++++---- .../babel-types/scripts}/generators/flow.js | 11 ++++++----- .../babel-types/scripts}/generators/typescript.js | 13 ++++++------- .../babel-types/scripts/utils/stringifyValidator.js | 10 +--------- .../babel-types/scripts/utils/toFunctionName.js | 4 ++++ 6 files changed, 26 insertions(+), 28 deletions(-) rename {scripts => packages/babel-types/scripts}/generators/docs.js (92%) rename {scripts => packages/babel-types/scripts}/generators/flow.js (90%) rename {scripts => packages/babel-types/scripts}/generators/typescript.js (92%) rename scripts/generators/utils.js => packages/babel-types/scripts/utils/stringifyValidator.js (77%) create mode 100644 packages/babel-types/scripts/utils/toFunctionName.js diff --git a/Makefile b/Makefile index 5f9edf90b22c..e7e8663f0938 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ build: clean clean-lib # call build again as the generated files might need to be compiled again. ./node_modules/.bin/gulp build # generate flow and typescript typings - node scripts/generators/flow.js > ./packages/babel-types/lib/index.js.flow - node scripts/generators/typescript.js > ./packages/babel-types/lib/index.d.ts + node packages/babel-types/scripts/generators/flow.js > ./packages/babel-types/lib/index.js.flow + node packages/babel-types/scripts/generators/typescript.js > ./packages/babel-types/lib/index.d.ts ifneq ("$(BABEL_COVERAGE)", "true") make build-standalone make build-preset-env-standalone @@ -46,7 +46,8 @@ watch: clean clean-lib # development too. BABEL_ENV=development ./node_modules/.bin/gulp build-no-bundle node ./packages/babel-types/scripts/generateTypeHelpers.js - node scripts/generators/flow.js > ./packages/babel-types/lib/index.js.flow + node packages/babel-types/scripts/generators/flow.js > ./packages/babel-types/lib/index.js.flow + node packages/babel-types/scripts/generators/typescript.js > ./packages/babel-types/lib/index.d.ts BABEL_ENV=development ./node_modules/.bin/gulp watch flow: diff --git a/scripts/generators/docs.js b/packages/babel-types/scripts/generators/docs.js similarity index 92% rename from scripts/generators/docs.js rename to packages/babel-types/scripts/generators/docs.js index a4f9e6c12b7a..3bbb52362400 100644 --- a/scripts/generators/docs.js +++ b/packages/babel-types/scripts/generators/docs.js @@ -1,9 +1,10 @@ "use strict"; const util = require("util"); -const utils = require("./utils"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); -const types = require("../../packages/babel-types"); +const types = require("../../"); const readme = [ `# @babel/types @@ -43,7 +44,7 @@ Object.keys(types.BUILDER_KEYS) readme.push("```javascript"); readme.push( "t." + - utils.toFunctionName(key) + + toFunctionName(key) + "(" + types.BUILDER_KEYS[key].join(", ") + ")" @@ -87,7 +88,7 @@ Object.keys(types.BUILDER_KEYS) } else if (validator) { try { fieldDescription.push( - ": `" + utils.stringifyValidator(validator, "") + "`" + ": `" + stringifyValidator(validator, "") + "`" ); } catch (ex) { if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") { diff --git a/scripts/generators/flow.js b/packages/babel-types/scripts/generators/flow.js similarity index 90% rename from scripts/generators/flow.js rename to packages/babel-types/scripts/generators/flow.js index 55fc28292c5c..1ef30ad55b82 100644 --- a/scripts/generators/flow.js +++ b/packages/babel-types/scripts/generators/flow.js @@ -1,12 +1,13 @@ "use strict"; -const t = require("../../packages/babel-types"); -const utils = require("./utils"); +const t = require("../../"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); const NODE_PREFIX = "BabelNode"; let code = `// NOTE: This file is autogenerated. Do not modify. -// See scripts/generators/flow.js for script used. +// See packages/babel-types/scripts/generators/flow.js for script used. declare class ${NODE_PREFIX}Comment { value: string; @@ -73,7 +74,7 @@ for (const type in t.NODE_FIELDS) { const validate = field.validate; if (validate) { - typeAnnotation = utils.stringifyValidator(validate, NODE_PREFIX); + typeAnnotation = stringifyValidator(validate, NODE_PREFIX); } if (typeAnnotation) { @@ -94,7 +95,7 @@ for (const type in t.NODE_FIELDS) { // Flow chokes on super() and import() :/ if (type !== "Super" && type !== "Import") { lines.push( - `declare function ${utils.toFunctionName(type)}(${args.join( + `declare function ${toFunctionName(type)}(${args.join( ", " )}): ${NODE_PREFIX}${type};` ); diff --git a/scripts/generators/typescript.js b/packages/babel-types/scripts/generators/typescript.js similarity index 92% rename from scripts/generators/typescript.js rename to packages/babel-types/scripts/generators/typescript.js index 5b4ea4fe3e80..9a286f208600 100644 --- a/scripts/generators/typescript.js +++ b/packages/babel-types/scripts/generators/typescript.js @@ -1,10 +1,11 @@ "use strict"; -const t = require("../../packages/babel-types"); -const utils = require("./utils"); +const t = require("../../"); +const stringifyValidator = require("../utils/stringifyValidator"); +const toFunctionName = require("../utils/toFunctionName"); let code = `// NOTE: This file is autogenerated. Do not modify. -// See scripts/generators/typescript.js for script used. +// See packages/babel-types/scripts/generators/typescript.js for script used. interface BaseComment { value: string; @@ -61,7 +62,7 @@ for (const type in t.NODE_FIELDS) { fieldNames.forEach(fieldName => { const field = fields[fieldName]; - let typeAnnotation = utils.stringifyValidator(field.validate, ""); + let typeAnnotation = stringifyValidator(field.validate, ""); if (isNullable(field) && !hasDefault(field)) { typeAnnotation += " | null"; @@ -97,9 +98,7 @@ for (const type in t.NODE_FIELDS) { // super and import are reserved words in JavaScript if (type !== "Super" && type !== "Import") { lines.push( - `export function ${utils.toFunctionName(type)}(${args.join( - ", " - )}): ${type};` + `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};` ); } } diff --git a/scripts/generators/utils.js b/packages/babel-types/scripts/utils/stringifyValidator.js similarity index 77% rename from scripts/generators/utils.js rename to packages/babel-types/scripts/utils/stringifyValidator.js index 4f217edfcb30..ff33e8e25ade 100644 --- a/scripts/generators/utils.js +++ b/packages/babel-types/scripts/utils/stringifyValidator.js @@ -1,7 +1,4 @@ -exports.stringifyValidator = function stringifyValidator( - validator, - nodePrefix -) { +module.exports = function stringifyValidator(validator, nodePrefix) { if (validator === undefined) { return "any"; } @@ -37,11 +34,6 @@ exports.stringifyValidator = function stringifyValidator( return ["any"]; }; -exports.toFunctionName = function toFunctionName(typeName) { - const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx"); - return _.slice(0, 1).toLowerCase() + _.slice(1); -}; - /** * Heuristic to decide whether or not the given type is a value type (eg. "null") * or a Node type (eg. "Expression"). diff --git a/packages/babel-types/scripts/utils/toFunctionName.js b/packages/babel-types/scripts/utils/toFunctionName.js new file mode 100644 index 000000000000..627c9a7d8f01 --- /dev/null +++ b/packages/babel-types/scripts/utils/toFunctionName.js @@ -0,0 +1,4 @@ +module.exports = function toFunctionName(typeName) { + const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx"); + return _.slice(0, 1).toLowerCase() + _.slice(1); +}; From 8e051cae4641826f35254134e49e67ba3871c91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 10 Jan 2019 00:45:02 +0100 Subject: [PATCH 193/563] [decorators] Set method names at compile time instead of at runtime (#9244) --- .../src/decorators.js | 30 ++++++++++++------- packages/babel-helpers/src/helpers.js | 4 --- .../computed-keys-same-ast/output.js | 8 ++--- .../computed-keys-same-value/output.js | 8 ++--- .../misc/method-name-not-shadow/exec.js | 13 ++++++++ .../misc/method-name-not-shadow/input.js | 8 +++++ .../misc/method-name-not-shadow/output.js | 22 ++++++++++++++ .../transformation/arguments/output.js | 4 +-- .../async-generator-method/output.js | 12 ++------ .../transformation/strict-directive/output.js | 8 ++--- 10 files changed, 73 insertions(+), 44 deletions(-) create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/exec.js create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/input.js create mode 100644 packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/output.js diff --git a/packages/babel-helper-create-class-features-plugin/src/decorators.js b/packages/babel-helper-create-class-features-plugin/src/decorators.js index 4b0df1aef49c..74fc7d059523 100644 --- a/packages/babel-helper-create-class-features-plugin/src/decorators.js +++ b/packages/babel-helper-create-class-features-plugin/src/decorators.js @@ -1,5 +1,6 @@ import { types as t, template } from "@babel/core"; import ReplaceSupers from "@babel/helper-replace-supers"; +import nameFunction from "@babel/helper-function-name"; export function hasOwnDecorators(node) { return !!(node.decorators && node.decorators.length); @@ -14,11 +15,13 @@ function prop(key, value) { return t.objectProperty(t.identifier(key), value); } -function value(body, params = [], async, generator) { - const method = t.objectMethod("method", t.identifier("value"), params, body); - method.async = !!async; - method.generator = !!generator; - return method; +function method(key, body) { + return t.objectMethod( + "method", + t.identifier(key), + [], + t.blockStatement(body), + ); } function takeDecorators(node) { @@ -74,13 +77,20 @@ function extractElementDescriptor(/* this: File, */ classRef, superRef, path) { prop("decorators", takeDecorators(node)), prop("static", node.static && t.booleanLiteral(true)), prop("key", getKey(node)), - isMethod - ? value(node.body, node.params, node.async, node.generator) - : node.value - ? value(template.ast`{ return ${node.value} }`) - : prop("value", scope.buildUndefinedNode()), ].filter(Boolean); + if (isMethod) { + const id = node.computed ? null : node.key; + t.toExpression(node); + properties.push(prop("value", nameFunction({ node, id, scope }) || node)); + } else if (node.value) { + properties.push( + method("value", template.statements.ast`return ${node.value}`), + ); + } else { + properties.push(prop("value", scope.buildUndefinedNode())); + } + path.remove(); return t.objectExpression(properties); diff --git a/packages/babel-helpers/src/helpers.js b/packages/babel-helpers/src/helpers.js index 79f525509696..6a78ae8397f3 100644 --- a/packages/babel-helpers/src/helpers.js +++ b/packages/babel-helpers/src/helpers.js @@ -1653,10 +1653,6 @@ helpers.decorate = helper("7.1.5")` configurable: true, enumerable: false, }; - Object.defineProperty(def.value, "name", { - value: typeof key === "symbol" ? "" : key, - configurable: true, - }); } else if (def.kind === "get") { descriptor = { get: def.value, configurable: true, enumerable: false }; } else if (def.kind === "set") { diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-ast/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-ast/output.js index a08d2e1db86d..99ce59522cb1 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-ast/output.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-ast/output.js @@ -13,19 +13,15 @@ let Foo = babelHelpers.decorate([_ => desc = _], function (_initialize) { d: [{ kind: "method", key: getKey(), - - value() { + value: function () { return 1; } - }, { kind: "method", key: getKey(), - - value() { + value: function () { return 2; } - }] }; }); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-value/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-value/output.js index bffa9e17a1d9..a4f7d0e22920 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-value/output.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/duplicated-keys/computed-keys-same-value/output.js @@ -13,19 +13,15 @@ let Foo = babelHelpers.decorate([_ => desc = _], function (_initialize) { d: [{ kind: "method", key: getKeyI(), - - value() { + value: function () { return 1; } - }, { kind: "method", key: getKeyJ(), - - value() { + value: function () { return 2; } - }] }; }); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/exec.js b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/exec.js new file mode 100644 index 000000000000..b9d3327d304d --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/exec.js @@ -0,0 +1,13 @@ +function decorator() {} + +var method = 1; + +@decorator +class Foo { + method() { + return method; + } +} + +expect(new Foo().method()).toBe(1); +expect(Foo.prototype.method.name).toBe("method"); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/input.js b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/input.js new file mode 100644 index 000000000000..ce5f357574c3 --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/input.js @@ -0,0 +1,8 @@ +var method = 1; + +@decorator +class Foo { + method() { + return method; + } +} diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/output.js new file mode 100644 index 000000000000..df5e4ae17032 --- /dev/null +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/misc/method-name-not-shadow/output.js @@ -0,0 +1,22 @@ +var _method = 1; +let Foo = babelHelpers.decorate([decorator], function (_initialize) { + "use strict"; + + class Foo { + constructor() { + _initialize(this); + } + + } + + return { + F: Foo, + d: [{ + kind: "method", + key: "method", + value: function method() { + return _method; + } + }] + }; +}); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/arguments/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/arguments/output.js index d8a47bf3a19c..5be9a05bed5b 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/arguments/output.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/arguments/output.js @@ -14,9 +14,7 @@ let A = babelHelpers.decorate([dec(a, b, ...c)], function (_initialize) { kind: "method", decorators: [dec(a, b, ...c)], key: "method", - - value() {} - + value: function method() {} }] }; }); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/output.js index 75ce76d3f1d7..973d53b8620a 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/output.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/async-generator-method/output.js @@ -13,21 +13,15 @@ let Foo = babelHelpers.decorate([decorator], function (_initialize) { d: [{ kind: "method", key: "f1", - - async value() {} - + value: async function f1() {} }, { kind: "method", key: "f2", - - *value() {} - + value: function* f2() {} }, { kind: "method", key: "f3", - - async *value() {} - + value: async function* f3() {} }] }; }); diff --git a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/strict-directive/output.js b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/strict-directive/output.js index 65f4fbb073ea..e1a4d147adbf 100644 --- a/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/strict-directive/output.js +++ b/packages/babel-plugin-proposal-decorators/test/fixtures/transformation/strict-directive/output.js @@ -14,9 +14,7 @@ d: [{ kind: "method", key: "method", - - value() {} - + value: function method() {} }] }; }); @@ -38,9 +36,7 @@ d: [{ kind: "method", key: "method", - - value() {} - + value: function method() {} }] }; }); From 2cc0376756f5dd368a8c01a922ca03ab8db86448 Mon Sep 17 00:00:00 2001 From: Armano Date: Thu, 10 Jan 2019 17:14:48 +0100 Subject: [PATCH 194/563] @babel/parser(ts): Add parsing of type import (#9302) --- .../babel-parser/src/plugins/typescript.js | 30 +- packages/babel-parser/src/types.js | 10 +- .../fixtures/typescript/types/import/input.js | 3 + .../typescript/types/import/output.json | 451 ++++++++++++++++++ 4 files changed, 492 insertions(+), 2 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/typescript/types/import/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/import/output.json diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index c25eaec0a327..b81ab14afc88 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -220,6 +220,28 @@ export default (superClass: Class): Class => return result; } + tsParseImportType(): N.TsImportType { + const node: N.TsImportType = this.startNode(); + this.expect(tt._import); + this.expect(tt.parenL); + if (!this.match(tt.string)) { + throw this.unexpected( + null, + "Argument in a type import must be a string literal", + ); + } + node.argument = this.parseLiteral(this.state.value, "StringLiteral"); + this.expect(tt.parenR); + + if (this.eat(tt.dot)) { + node.qualifier = this.tsParseEntityName(/* allowReservedWords */ true); + } + if (this.isRelational("<")) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSImportType"); + } + tsParseEntityName(allowReservedWords: boolean): N.TsEntityName { let entity: N.TsEntityName = this.parseIdentifier(); while (this.eat(tt.dot)) { @@ -257,7 +279,11 @@ export default (superClass: Class): Class => tsParseTypeQuery(): N.TsTypeQuery { const node: N.TsTypeQuery = this.startNode(); this.expect(tt._typeof); - node.exprName = this.tsParseEntityName(/* allowReservedWords */ true); + if (this.match(tt._import)) { + node.exprName = this.tsParseImportType(); + } else { + node.exprName = this.tsParseEntityName(/* allowReservedWords */ true); + } return this.finishNode(node, "TSTypeQuery"); } @@ -645,6 +671,8 @@ export default (superClass: Class): Class => } case tt._typeof: return this.tsParseTypeQuery(); + case tt._import: + return this.tsParseImportType(); case tt.braceL: return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 12cf06048c6e..433c9340d1ec 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -1146,6 +1146,7 @@ export type TsType = | TsIndexedAccessType | TsMappedType | TsLiteralType + | TsImportType // TODO: This probably shouldn't be included here. | TsTypePredicate; @@ -1201,7 +1202,7 @@ export type TsTypePredicate = TsTypeBase & { // `typeof` operator export type TsTypeQuery = TsTypeBase & { type: "TSTypeQuery", - exprName: TsEntityName, + exprName: TsEntityName | TsImportType, }; export type TsTypeLiteral = TsTypeBase & { @@ -1286,6 +1287,13 @@ export type TsLiteralType = TsTypeBase & { literal: NumericLiteral | StringLiteral | BooleanLiteral, }; +export type TsImportType = TsTypeBase & { + type: "TsImportType", + argument: StringLiteral, + qualifier?: TsEntityName, + typeParameters?: TsTypeParameterInstantiation, +}; + // ================ // TypeScript declarations // ================ diff --git a/packages/babel-parser/test/fixtures/typescript/types/import/input.js b/packages/babel-parser/test/fixtures/typescript/types/import/input.js new file mode 100644 index 000000000000..7bae7e8301b3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/import/input.js @@ -0,0 +1,3 @@ +let x: typeof import('./x'); +let Y: import('./y').Y; +let z: import("/z").foo.bar; diff --git a/packages/babel-parser/test/fixtures/typescript/types/import/output.json b/packages/babel-parser/test/fixtures/typescript/types/import/output.json new file mode 100644 index 000000000000..a3aa6c8c537b --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/import/output.json @@ -0,0 +1,451 @@ +{ + "type": "File", + "start": 0, + "end": 89, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 36 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 89, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 36 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 27 + }, + "identifierName": "x" + }, + "name": "x", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 5, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "typeAnnotation": { + "type": "TSTypeQuery", + "start": 7, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "exprName": { + "type": "TSImportType", + "start": 14, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "argument": { + "type": "StringLiteral", + "start": 21, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "extra": { + "rawValue": "./x", + "raw": "'./x'" + }, + "value": "./x" + } + } + } + } + }, + "init": null + } + ], + "kind": "let" + }, + { + "type": "VariableDeclaration", + "start": 29, + "end": 52, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 23 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 33, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "id": { + "type": "Identifier", + "start": 33, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 22 + }, + "identifierName": "Y" + }, + "name": "Y", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 34, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "typeAnnotation": { + "type": "TSImportType", + "start": 36, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "argument": { + "type": "StringLiteral", + "start": 43, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "extra": { + "rawValue": "./y", + "raw": "'./y'" + }, + "value": "./y" + }, + "qualifier": { + "type": "Identifier", + "start": 50, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + }, + "identifierName": "Y" + }, + "name": "Y" + } + } + } + }, + "init": null + } + ], + "kind": "let" + }, + { + "type": "VariableDeclaration", + "start": 53, + "end": 89, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 36 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 57, + "end": 88, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 35 + } + }, + "id": { + "type": "Identifier", + "start": 57, + "end": 88, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 35 + }, + "identifierName": "z" + }, + "name": "z", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 58, + "end": 88, + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 35 + } + }, + "typeAnnotation": { + "type": "TSImportType", + "start": 60, + "end": 88, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 35 + } + }, + "argument": { + "type": "StringLiteral", + "start": 67, + "end": 71, + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 18 + } + }, + "extra": { + "rawValue": "/z", + "raw": "\"/z\"" + }, + "value": "/z" + }, + "qualifier": { + "type": "TSQualifiedName", + "start": 73, + "end": 80, + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + }, + "left": { + "type": "Identifier", + "start": 73, + "end": 76, + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 23 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "right": { + "type": "Identifier", + "start": 77, + "end": 80, + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 27 + }, + "identifierName": "bar" + }, + "name": "bar" + } + }, + "typeParameters": { + "type": "TSTypeParameterInstantiation", + "start": 80, + "end": 88, + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 35 + } + }, + "params": [ + { + "type": "TSStringKeyword", + "start": 81, + "end": 87, + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + ] + } + } + } + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } +} \ No newline at end of file From 4c2f8d9337c2c45da345e536c1f44157d64a14bd Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Thu, 10 Jan 2019 13:57:00 -0500 Subject: [PATCH 195/563] @babel/generator: Add emit and builder for TSImportType (#9309) --- .../babel-generator/src/generators/typescript.js | 15 +++++++++++++++ .../typescript/types-import-type/input.js | 3 +++ .../typescript/types-import-type/output.js | 3 +++ .../babel-types/src/definitions/typescript.js | 12 +++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 packages/babel-generator/test/fixtures/typescript/types-import-type/input.js create mode 100644 packages/babel-generator/test/fixtures/typescript/types-import-type/output.js diff --git a/packages/babel-generator/src/generators/typescript.js b/packages/babel-generator/src/generators/typescript.js index 33489ebbb278..83c279c1f1db 100644 --- a/packages/babel-generator/src/generators/typescript.js +++ b/packages/babel-generator/src/generators/typescript.js @@ -476,6 +476,21 @@ export function TSModuleBlock(node) { this.tsPrintBraced(node.body, node); } +export function TSImportType(node) { + const { argument, qualifier, typeParameters } = node; + this.word("import"); + this.token("("); + this.print(argument, node); + this.token(")"); + if (qualifier) { + this.token("."); + this.print(qualifier, node); + } + if (typeParameters) { + this.print(typeParameters, node); + } +} + export function TSImportEqualsDeclaration(node) { const { isExport, id, moduleReference } = node; if (isExport) { diff --git a/packages/babel-generator/test/fixtures/typescript/types-import-type/input.js b/packages/babel-generator/test/fixtures/typescript/types-import-type/input.js new file mode 100644 index 000000000000..848a461d3c57 --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/types-import-type/input.js @@ -0,0 +1,3 @@ +let x: typeof import('./x'); +let Y: import('./y').Y; +let z: import("/z").foo.bar; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/typescript/types-import-type/output.js b/packages/babel-generator/test/fixtures/typescript/types-import-type/output.js new file mode 100644 index 000000000000..848a461d3c57 --- /dev/null +++ b/packages/babel-generator/test/fixtures/typescript/types-import-type/output.js @@ -0,0 +1,3 @@ +let x: typeof import('./x'); +let Y: import('./y').Y; +let z: import("/z").foo.bar; \ No newline at end of file diff --git a/packages/babel-types/src/definitions/typescript.js b/packages/babel-types/src/definitions/typescript.js index 297185357568..4f321adb3bef 100644 --- a/packages/babel-types/src/definitions/typescript.js +++ b/packages/babel-types/src/definitions/typescript.js @@ -185,7 +185,7 @@ defineType("TSTypeQuery", { aliases: ["TSType"], visitor: ["exprName"], fields: { - exprName: validateType("TSEntityName"), + exprName: validateType(["TSEntityName", "TSImportType"]), }, }); @@ -405,6 +405,16 @@ defineType("TSModuleBlock", { }, }); +defineType("TSImportType", { + aliases: ["TSType"], + visitor: ["argument", "qualifier", "typeParameters"], + fields: { + argument: validateType("StringLiteral"), + qualifier: validateOptionalType("TSEntityName"), + typeParameters: validateOptionalType("TSTypeParameterInstantiation"), + }, +}); + defineType("TSImportEqualsDeclaration", { aliases: ["Statement"], visitor: ["id", "moduleReference"], From 28b70e591019061effa31aee3197eb124f6d437b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 11 Jan 2019 11:46:15 +0100 Subject: [PATCH 196/563] Generate types for TSImportType --- .../babel-types/src/asserts/generated/index.js | 3 +++ .../babel-types/src/builders/generated/index.js | 5 +++++ .../src/validators/generated/index.js | 17 ++++++++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/babel-types/src/asserts/generated/index.js b/packages/babel-types/src/asserts/generated/index.js index b59008770da1..890e3d6e8d3d 100644 --- a/packages/babel-types/src/asserts/generated/index.js +++ b/packages/babel-types/src/asserts/generated/index.js @@ -939,6 +939,9 @@ export function assertTSModuleDeclaration( export function assertTSModuleBlock(node: Object, opts?: Object = {}): void { assert("TSModuleBlock", node, opts); } +export function assertTSImportType(node: Object, opts?: Object = {}): void { + assert("TSImportType", node, opts); +} export function assertTSImportEqualsDeclaration( node: Object, opts?: Object = {}, diff --git a/packages/babel-types/src/builders/generated/index.js b/packages/babel-types/src/builders/generated/index.js index 3ef4c396f91b..a77b43cbb613 100644 --- a/packages/babel-types/src/builders/generated/index.js +++ b/packages/babel-types/src/builders/generated/index.js @@ -914,6 +914,11 @@ export function TSModuleBlock(...args: Array): Object { } export { TSModuleBlock as tsModuleBlock }; export { TSModuleBlock as tSModuleBlock }; +export function TSImportType(...args: Array): Object { + return builder("TSImportType", ...args); +} +export { TSImportType as tsImportType }; +export { TSImportType as tSImportType }; export function TSImportEqualsDeclaration(...args: Array): Object { return builder("TSImportEqualsDeclaration", ...args); } diff --git a/packages/babel-types/src/validators/generated/index.js b/packages/babel-types/src/validators/generated/index.js index e23dc5de2cda..a93ccb5ce181 100644 --- a/packages/babel-types/src/validators/generated/index.js +++ b/packages/babel-types/src/validators/generated/index.js @@ -3031,6 +3031,20 @@ export function isTSModuleBlock(node: Object, opts?: Object): boolean { return false; } +export function isTSImportType(node: Object, opts?: Object): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "TSImportType") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} export function isTSImportEqualsDeclaration( node: Object, opts?: Object, @@ -4254,7 +4268,8 @@ export function isTSType(node: Object, opts?: Object): boolean { "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || - "TSExpressionWithTypeArguments" === nodeType + "TSExpressionWithTypeArguments" === nodeType || + "TSImportType" === nodeType ) { if (typeof opts === "undefined") { return true; From 9764718c32228b439b658d13ba405a26533246f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 11 Jan 2019 13:08:38 +0100 Subject: [PATCH 197/563] Disallow trailing comma after rest (#9311) * Add new tests * Use state instead of param and disallow comma in [...a,]=[] * Unify error messages * Object destructuring * Update whitelist --- .../babel-parser/src/parser/expression.js | 106 +++++--------- packages/babel-parser/src/parser/lval.js | 70 ++++++---- .../babel-parser/src/plugins/typescript.js | 14 +- packages/babel-parser/src/tokenizer/state.js | 7 + .../core/uncategorised/396/options.json | 2 +- .../core/uncategorised/555/options.json | 2 +- .../comma-after-rest/input.js | 1 + .../comma-after-rest}/options.json | 0 .../comma-after-spread/input.js | 1 + .../comma-after-spread/output.json | 99 +++++++++++++ .../invalid-location/options.json | 2 +- .../comma-after-rest-param/options.json | 2 +- .../invalid-rest-in-params/options.json | 2 +- .../input.js | 1 - .../es2015/uncategorised/277/options.json | 2 +- .../es2015/uncategorised/283/options.json | 2 +- .../es2015/uncategorised/292/input.js | 1 - .../es2015/uncategorised/292/output.json | 132 ------------------ .../options.json | 2 +- .../es2018/object-rest-spread/7/options.json | 2 +- .../es2018/object-rest-spread/8/options.json | 2 +- .../es2018/object-rest-spread/9/options.json | 2 +- .../comma-after-rest/input.js | 1 + .../comma-after-rest/options.json | 3 + .../comma-after-spread/input.js | 1 + .../comma-after-spread/output.json | 103 ++++++++++++++ .../options.json | 2 +- .../arrow-with-multiple-rest/options.json | 2 +- .../invalid-syntax/migrated_0258/options.json | 2 +- .../types/tuple-rest-invalid/options.json | 2 +- scripts/tests/test262/test262_whitelist.txt | 4 - 31 files changed, 312 insertions(+), 262 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/input.js rename packages/babel-parser/test/fixtures/es2015/{arrow-functions/params-invalid-rest-trailing-comma => array-rest-spread/comma-after-rest}/options.json (100%) create mode 100644 packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread/output.json delete mode 100644 packages/babel-parser/test/fixtures/es2015/arrow-functions/params-invalid-rest-trailing-comma/input.js delete mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/292/input.js delete mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/292/output.json create mode 100644 packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/input.js create mode 100644 packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/options.json create mode 100644 packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread/input.js create mode 100644 packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 07fad7964f7c..970d4acaf178 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -130,6 +130,9 @@ export default class ExpressionParser extends LValParser { return left; } + const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; + this.state.commaAfterSpreadAt = -1; + let failOnShorthandAssign; if (refShorthandDefaultPos) { failOnShorthandAssign = false; @@ -169,21 +172,26 @@ export default class ExpressionParser extends LValParser { this.checkLVal(left, undefined, undefined, "assignment expression"); - if (left.extra && left.extra.parenthesized) { - let errorMsg; - if (left.type === "ObjectPattern") { - errorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (left.type === "ArrayPattern") { - errorMsg = "`([a]) = 0` use `([a] = 0)`"; - } - if (errorMsg) { - this.raise( - left.start, - `You're trying to assign to a parenthesized expression, eg. instead of ${errorMsg}`, - ); - } + let patternErrorMsg; + let elementName; + if (left.type === "ObjectPattern") { + patternErrorMsg = "`({a}) = 0` use `({a} = 0)`"; + elementName = "property"; + } else if (left.type === "ArrayPattern") { + patternErrorMsg = "`([a]) = 0` use `([a] = 0)`"; + elementName = "element"; + } + + if (patternErrorMsg && left.extra && left.extra.parenthesized) { + this.raise( + left.start, + `You're trying to assign to a parenthesized expression, eg. instead of ${patternErrorMsg}`, + ); } + if (elementName) this.checkCommaAfterRestFromSpread(elementName); + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; + this.next(); node.right = this.parseMaybeAssign(noIn); return this.finishNode(node, "AssignmentExpression"); @@ -191,6 +199,8 @@ export default class ExpressionParser extends LValParser { this.unexpected(refShorthandDefaultPos.start); } + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; + return left; } @@ -580,15 +590,12 @@ export default class ExpressionParser extends LValParser { let node = this.startNodeAt(startPos, startLoc); node.callee = base; - // TODO: Clean up/merge this into `this.state` or a class like acorn's - // `DestructuringErrors` alongside refShorthandDefaultPos and - // refNeedsArrowPos. - const refTrailingCommaPos: Pos = { start: -1 }; + const oldCommaAfterSpreadAt = this.state.commaAfterSpreadAt; + this.state.commaAfterSpreadAt = -1; node.arguments = this.parseCallExpressionArguments( tt.parenR, possibleAsync, - refTrailingCommaPos, ); if (!state.optionalChainMember) { this.finishCallExpression(node); @@ -599,12 +606,7 @@ export default class ExpressionParser extends LValParser { if (possibleAsync && this.shouldParseAsyncArrow()) { state.stop = true; - if (refTrailingCommaPos.start > -1) { - this.raise( - refTrailingCommaPos.start, - "A trailing comma is not permitted after the rest element", - ); - } + this.checkCommaAfterRestFromSpread("parameter"); node = this.parseAsyncArrowFromCallExpression( this.startNodeAt(startPos, startLoc), @@ -621,6 +623,7 @@ export default class ExpressionParser extends LValParser { } this.state.maybeInArrowParameters = oldMaybeInArrowParameters; + this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; return node; } else if (this.match(tt.backQuote)) { @@ -700,7 +703,6 @@ export default class ExpressionParser extends LValParser { parseCallExpressionArguments( close: TokenType, possibleAsyncArrow: boolean, - refTrailingCommaPos?: Pos, ): $ReadOnlyArray { const elts = []; let innerParenStart; @@ -725,7 +727,6 @@ export default class ExpressionParser extends LValParser { false, possibleAsyncArrow ? { start: 0 } : undefined, possibleAsyncArrow ? { start: 0 } : undefined, - possibleAsyncArrow ? refTrailingCommaPos : undefined, ), ); } @@ -1192,14 +1193,7 @@ export default class ExpressionParser extends LValParser { ), ); - if (this.match(tt.comma)) { - const nextTokenType = this.lookahead().type; - const errorMessage = - nextTokenType === tt.parenR - ? "A trailing comma is not permitted after the rest element" - : "Rest parameter must be last formal parameter"; - this.raise(this.state.start, errorMessage); - } + this.checkCommaAfterRest(tt.parenR, "parameter"); break; } else { @@ -1398,8 +1392,6 @@ export default class ExpressionParser extends LValParser { node.properties = []; this.next(); - let firstRestLocation = null; - while (!this.eat(tt.braceR)) { if (first) { first = false; @@ -1435,34 +1427,14 @@ export default class ExpressionParser extends LValParser { if (this.match(tt.ellipsis)) { prop = this.parseSpread(isPattern ? { start: 0 } : undefined); - if (isPattern) { - this.toAssignable(prop, true, "object pattern"); - } node.properties.push(prop); if (isPattern) { - const position = this.state.start; - if (firstRestLocation !== null) { - this.unexpected( - firstRestLocation, - "Cannot have multiple rest elements when destructuring", - ); - } else if (this.eat(tt.braceR)) { - break; - } else if ( - this.match(tt.comma) && - this.lookahead().type === tt.braceR - ) { - this.unexpected( - position, - "A trailing comma is not permitted after the rest element", - ); - } else { - firstRestLocation = position; - continue; - } - } else { - continue; + this.toAssignable(prop, true, "object pattern"); + this.checkCommaAfterRest(tt.braceR, "property"); + this.expect(tt.braceR); + break; } + continue; } prop.method = false; @@ -1519,13 +1491,6 @@ export default class ExpressionParser extends LValParser { node.properties.push(prop); } - if (firstRestLocation !== null) { - this.unexpected( - firstRestLocation, - "The rest element has to be the last element when destructuring", - ); - } - if (decorators.length) { this.raise( this.state.start, @@ -1923,7 +1888,6 @@ export default class ExpressionParser extends LValParser { allowEmpty: ?boolean, refShorthandDefaultPos: ?Pos, refNeedsArrowPos: ?Pos, - refTrailingCommaPos?: Pos, ): ?N.Expression { let elt; if (allowEmpty && this.match(tt.comma)) { @@ -1936,10 +1900,6 @@ export default class ExpressionParser extends LValParser { spreadNodeStartPos, spreadNodeStartLoc, ); - - if (refTrailingCommaPos && this.match(tt.comma)) { - refTrailingCommaPos.start = this.state.start; - } } else { elt = this.parseMaybeAssign( false, diff --git a/packages/babel-parser/src/parser/lval.js b/packages/babel-parser/src/parser/lval.js index 5fc48b90d277..76613bba31fe 100644 --- a/packages/babel-parser/src/parser/lval.js +++ b/packages/babel-parser/src/parser/lval.js @@ -122,10 +122,7 @@ export default class LValParser extends NodeUtils { this.raise(prop.key.start, error); } else if (prop.type === "SpreadElement" && !isLast) { - this.raise( - prop.start, - "The rest element has to be the last element when destructuring", - ); + this.raiseRestNotLast(prop.start, "property"); } else { this.toAssignable(prop, isBinding, "object destructuring pattern"); } @@ -162,13 +159,12 @@ export default class LValParser extends NodeUtils { } for (let i = 0; i < end; i++) { const elt = exprList[i]; - if (elt && elt.type === "SpreadElement") { - this.raise( - elt.start, - "The rest element has to be the last element when destructuring", - ); + if (elt) { + this.toAssignable(elt, isBinding, contextDescription); + if (elt.type === "RestElement") { + this.raiseRestNotLast(elt.start, "element"); + } } - if (elt) this.toAssignable(elt, isBinding, contextDescription); } return exprList; } @@ -199,10 +195,10 @@ export default class LValParser extends NodeUtils { // Parses spread element. - parseSpread( + parseSpread( refShorthandDefaultPos: ?Pos, refNeedsArrowPos?: ?Pos, - ): T { + ): SpreadElement { const node = this.startNode(); this.next(); node.argument = this.parseMaybeAssign( @@ -211,6 +207,11 @@ export default class LValParser extends NodeUtils { undefined, refNeedsArrowPos, ); + + if (this.state.commaAfterSpreadAt === -1 && this.match(tt.comma)) { + this.state.commaAfterSpreadAt = this.state.start; + } + return this.finishNode(node, "SpreadElement"); } @@ -273,20 +274,13 @@ export default class LValParser extends NodeUtils { break; } else if (this.match(tt.ellipsis)) { elts.push(this.parseAssignableListItemTypes(this.parseRest())); - if ( - this.state.inFunction && - this.state.inParameters && - this.match(tt.comma) - ) { - const nextTokenType = this.lookahead().type; - const errorMessage = - nextTokenType === tt.parenR - ? "A trailing comma is not permitted after the rest element" - : "Rest parameter must be last formal parameter"; - this.raise(this.state.start, errorMessage); - } else { - this.expect(close); - } + this.checkCommaAfterRest( + close, + this.state.inFunction && this.state.inParameters + ? "parameter" + : "element", + ); + this.expect(close); break; } else { const decorators = []; @@ -440,4 +434,28 @@ export default class LValParser extends NodeUtils { this.raise(node.argument.start, "Invalid rest operator's argument"); } + + checkCommaAfterRest(close: TokenType, kind: string): void { + if (this.match(tt.comma)) { + if (this.lookahead().type === close) { + this.raiseCommaAfterRest(this.state.start, kind); + } else { + this.raiseRestNotLast(this.state.start, kind); + } + } + } + + checkCommaAfterRestFromSpread(kind: string): void { + if (this.state.commaAfterSpreadAt > -1) { + this.raiseCommaAfterRest(this.state.commaAfterSpreadAt, kind); + } + } + + raiseCommaAfterRest(pos: number, kind: string) { + this.raise(pos, `A trailing comma is not permitted after the rest ${kind}`); + } + + raiseRestNotLast(pos: number, kind: string) { + this.raise(pos, `The rest ${kind} must be the last ${kind}`); + } } diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index b81ab14afc88..02cdd54b8987 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -546,17 +546,10 @@ export default (superClass: Class): Class => // No mandatory elements may follow optional elements // If there's a rest element, it must be at the end of the tuple let seenOptionalElement = false; - node.elementTypes.forEach((elementNode, i) => { - if (elementNode.type === "TSRestType") { - if (i !== node.elementTypes.length - 1) { - this.raise( - elementNode.start, - "A rest element must be last in a tuple type.", - ); - } - } else if (elementNode.type === "TSOptionalType") { + node.elementTypes.forEach(elementNode => { + if (elementNode.type === "TSOptionalType") { seenOptionalElement = true; - } else if (seenOptionalElement) { + } else if (seenOptionalElement && elementNode.type !== "TSRestType") { this.raise( elementNode.start, "A required element cannot follow an optional element.", @@ -573,6 +566,7 @@ export default (superClass: Class): Class => const restNode: N.TsRestType = this.startNode(); this.next(); // skips ellipsis restNode.typeAnnotation = this.tsParseType(); + this.checkCommaAfterRest(tt.bracketR, "type"); return this.finishNode(restNode, "TSRestType"); } diff --git a/packages/babel-parser/src/tokenizer/state.js b/packages/babel-parser/src/tokenizer/state.js index debcaacbf1bc..d857cea13441 100644 --- a/packages/babel-parser/src/tokenizer/state.js +++ b/packages/babel-parser/src/tokenizer/state.js @@ -15,6 +15,8 @@ export default class State { this.input = input; + this.commaAfterSpreadAt = -1; + this.potentialArrowAt = -1; this.noArrowAt = []; @@ -87,6 +89,11 @@ export default class State { // TODO input: string; + // A comma after "...a" is only allowed in spread, but not in rest. + // Since we parse destructuring patterns as array/object literals + // and then convert them, we need to track it. + commaAfterSpreadAt: number; + // Used to signify the start of a potential arrow function potentialArrowAt: number; diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/396/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/396/options.json index b8808d8a689a..029befcedaa1 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/396/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/396/options.json @@ -1,3 +1,3 @@ { - "throws": "Rest parameter must be last formal parameter (1:18)" + "throws": "The rest parameter must be the last parameter (1:18)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/555/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/555/options.json index 837fa24c9163..baad06556ff8 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/555/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/555/options.json @@ -1,3 +1,3 @@ { - "throws": "Rest parameter must be last formal parameter (3:13)" + "throws": "The rest parameter must be the last parameter (3:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/input.js b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/input.js new file mode 100644 index 000000000000..d4aba7bf5562 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/input.js @@ -0,0 +1 @@ +[...a,] = []; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/params-invalid-rest-trailing-comma/options.json b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/options.json similarity index 100% rename from packages/babel-parser/test/fixtures/es2015/arrow-functions/params-invalid-rest-trailing-comma/options.json rename to packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/options.json diff --git a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread/input.js b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread/input.js new file mode 100644 index 000000000000..7161cc852a5d --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread/input.js @@ -0,0 +1 @@ +[...a,]; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread/output.json b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread/output.json new file mode 100644 index 000000000000..5874666e2695 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-spread/output.json @@ -0,0 +1,99 @@ +{ + "type": "File", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "expression": { + "type": "ArrayExpression", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "elements": [ + { + "type": "SpreadElement", + "start": 1, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "argument": { + "type": "Identifier", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "a" + }, + "name": "a" + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json index beef14a21449..083dcaaa2cb0 100644 --- a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json +++ b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest element has to be the last element when destructuring (1:1)" + "throws": "The rest element must be the last element (1:1)" } diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/options.json b/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/options.json index babb96d8b73b..d866b41af70c 100644 --- a/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/options.json +++ b/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/options.json @@ -1,3 +1,3 @@ { - "throws": "A trailing comma is not permitted after the rest element (1:8)" + "throws": "A trailing comma is not permitted after the rest parameter (1:8)" } diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/options.json b/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/options.json index 837fa24c9163..baad06556ff8 100644 --- a/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/options.json +++ b/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/options.json @@ -1,3 +1,3 @@ { - "throws": "Rest parameter must be last formal parameter (3:13)" + "throws": "The rest parameter must be the last parameter (3:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/params-invalid-rest-trailing-comma/input.js b/packages/babel-parser/test/fixtures/es2015/arrow-functions/params-invalid-rest-trailing-comma/input.js deleted file mode 100644 index d55ef5bce0b8..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/arrow-functions/params-invalid-rest-trailing-comma/input.js +++ /dev/null @@ -1 +0,0 @@ -(...a,) => {}; diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/277/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/277/options.json index b8808d8a689a..029befcedaa1 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/277/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/277/options.json @@ -1,3 +1,3 @@ { - "throws": "Rest parameter must be last formal parameter (1:18)" + "throws": "The rest parameter must be the last parameter (1:18)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/283/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/283/options.json index 263bbbb08029..3ead3a4299f8 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/283/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/283/options.json @@ -1,3 +1,3 @@ { - "throws": "Rest parameter must be last formal parameter (1:5)" + "throws": "The rest parameter must be the last parameter (1:5)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/292/input.js b/packages/babel-parser/test/fixtures/es2015/uncategorised/292/input.js deleted file mode 100644 index e15ba6bf99fa..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/292/input.js +++ /dev/null @@ -1 +0,0 @@ -[...a, ] = b \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/292/output.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/292/output.json deleted file mode 100644 index 6a0709961325..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/292/output.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "ExpressionStatement", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "expression": { - "type": "AssignmentExpression", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "operator": "=", - "left": { - "type": "ArrayPattern", - "start": 0, - "end": 8, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 8 - } - }, - "elements": [ - { - "type": "RestElement", - "start": 1, - "end": 5, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 5 - } - }, - "argument": { - "type": "Identifier", - "start": 4, - "end": 5, - "loc": { - "start": { - "line": 1, - "column": 4 - }, - "end": { - "line": 1, - "column": 5 - }, - "identifierName": "a" - }, - "name": "a" - } - } - ] - }, - "right": { - "type": "Identifier", - "start": 11, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 12 - }, - "identifierName": "b" - }, - "name": "b" - } - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/options.json index 52560b0a85b7..231d5fccd5ff 100644 --- a/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/options.json +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/options.json @@ -1,3 +1,3 @@ { - "throws": "A trailing comma is not permitted after the rest element (1:11)" + "throws": "A trailing comma is not permitted after the rest parameter (1:11)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json index 09b3275eae5c..253a786581de 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest element has to be the last element when destructuring (1:10)" + "throws": "The rest property must be the last property (1:10)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json index 4a97ac85eafa..e5efb196646c 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json @@ -1,3 +1,3 @@ { - "throws": "A trailing comma is not permitted after the rest element (1:16)" + "throws": "A trailing comma is not permitted after the rest property (1:16)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json index 03ba1e37e899..e1bf843ed1c1 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json @@ -1,3 +1,3 @@ { - "throws": "Cannot have multiple rest elements when destructuring (1:13)" + "throws": "The rest property must be the last property (1:13)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/input.js new file mode 100644 index 000000000000..aef29a7f3bb7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/input.js @@ -0,0 +1 @@ +({...a,} = {}); \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/options.json new file mode 100644 index 000000000000..a19bb078b172 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/options.json @@ -0,0 +1,3 @@ +{ + "throws": "A trailing comma is not permitted after the rest property (1:6)" +} diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread/input.js b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread/input.js new file mode 100644 index 000000000000..d8dd574f40cb --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread/input.js @@ -0,0 +1 @@ +({...a,}); \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread/output.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread/output.json new file mode 100644 index 000000000000..ffb978345c27 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-spread/output.json @@ -0,0 +1,103 @@ +{ + "type": "File", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "properties": [ + { + "type": "SpreadElement", + "start": 2, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "argument": { + "type": "Identifier", + "start": 5, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "a" + }, + "name": "a" + } + } + ], + "extra": { + "parenthesized": true, + "parenStart": 0 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json index d2981263bf2c..015adf82cda0 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest element has to be the last element when destructuring (1:2)" + "throws": "The rest property must be the last property (1:2)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json index 263bbbb08029..3ead3a4299f8 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json @@ -1,3 +1,3 @@ { - "throws": "Rest parameter must be last formal parameter (1:5)" + "throws": "The rest parameter must be the last parameter (1:5)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json index b8808d8a689a..029befcedaa1 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json @@ -1,3 +1,3 @@ { - "throws": "Rest parameter must be last formal parameter (1:18)" + "throws": "The rest parameter must be the last parameter (1:18)" } diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json index 653f8ee82760..a500c245e78f 100644 --- a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json @@ -1,5 +1,5 @@ { "sourceType": "module", "plugins": ["typescript"], - "throws": "A rest element must be last in a tuple type. (1:8)" + "throws": "The rest type must be the last type (1:19)" } diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 603c65360c94..e0b544e95216 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -649,10 +649,6 @@ language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-let.js language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-let.js(strict mode) language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(default) language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(strict mode) -language/expressions/assignment/dstr/array-rest-before-elision.js(default) -language/expressions/assignment/dstr/array-rest-before-elision.js(strict mode) -language/expressions/assignment/dstr/array-rest-elision-invalid.js(default) -language/expressions/assignment/dstr/array-rest-elision-invalid.js(strict mode) language/expressions/assignment/dstr/obj-id-identifier-yield-ident-valid.js(default) language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js(default) language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js(strict mode) From 5889620a6a9e4a370590b279c4443e0a2f1d6fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 11 Jan 2019 18:59:51 +0100 Subject: [PATCH 198/563] Disallow `new import(x)` and `import(x,)` (#9313) * Disallow "new import(...)" * Disallow trailing comma inside dynamic import * Rename test * Update error message --- .../babel-parser/src/parser/expression.js | 21 ++++- .../dynamic-import/invalid-new/input.js | 1 + .../dynamic-import/invalid-new/options.json | 3 + .../invalid-trailing-comma/input.js | 1 + .../invalid-trailing-comma/options.json | 3 + scripts/tests/test262/test262_whitelist.txt | 82 +------------------ 6 files changed, 26 insertions(+), 85 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-new/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-new/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-trailing-comma/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-trailing-comma/options.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 970d4acaf178..fb390e136155 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -596,6 +596,7 @@ export default class ExpressionParser extends LValParser { node.arguments = this.parseCallExpressionArguments( tt.parenR, possibleAsync, + base.type === "Import", ); if (!state.optionalChainMember) { this.finishCallExpression(node); @@ -703,6 +704,7 @@ export default class ExpressionParser extends LValParser { parseCallExpressionArguments( close: TokenType, possibleAsyncArrow: boolean, + dynamicImport?: boolean, ): $ReadOnlyArray { const elts = []; let innerParenStart; @@ -713,7 +715,15 @@ export default class ExpressionParser extends LValParser { first = false; } else { this.expect(tt.comma); - if (this.eat(close)) break; + if (this.eat(close)) { + if (dynamicImport) { + this.raise( + this.state.lastTokStart, + "Trailing comma is disallowed inside import(...) arguments", + ); + } + break; + } } // we need to make sure that if this is an async arrow functions, @@ -1306,7 +1316,10 @@ export default class ExpressionParser extends LValParser { } node.callee = this.parseNoCallExpr(); - if ( + + if (node.callee.type === "Import") { + this.raise(node.callee.start, "Cannot use new with import(...)"); + } else if ( node.callee.type === "OptionalMemberExpression" || node.callee.type === "OptionalCallExpression" ) { @@ -1314,13 +1327,13 @@ export default class ExpressionParser extends LValParser { this.state.lastTokEnd, "constructors in/after an Optional Chain are not allowed", ); - } - if (this.eat(tt.questionDot)) { + } else if (this.eat(tt.questionDot)) { this.raise( this.state.start, "constructors in/after an Optional Chain are not allowed", ); } + this.parseNewArguments(node); return this.finishNode(node, "NewExpression"); } diff --git a/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-new/input.js b/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-new/input.js new file mode 100644 index 000000000000..eb88f1a997e4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-new/input.js @@ -0,0 +1 @@ +new import("foo"); diff --git a/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-new/options.json b/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-new/options.json new file mode 100644 index 000000000000..26e64ffc5d96 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-new/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Cannot use new with import(...) (1:4)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-trailing-comma/input.js b/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-trailing-comma/input.js new file mode 100644 index 000000000000..6596802add47 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-trailing-comma/input.js @@ -0,0 +1 @@ +import("foo",); \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-trailing-comma/options.json b/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-trailing-comma/options.json new file mode 100644 index 000000000000..770750c7f91f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/dynamic-import/invalid-trailing-comma/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Trailing comma is disallowed inside import(...) arguments (1:13)" +} diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index e0b544e95216..9dbaf7fea2f6 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -1012,86 +1012,6 @@ language/expressions/class/elements/wrapped-in-sc-rs-private-setter-alt.js(defau language/expressions/class/elements/wrapped-in-sc-rs-private-setter-alt.js(strict mode) language/expressions/class/elements/wrapped-in-sc-rs-private-setter.js(default) language/expressions/class/elements/wrapped-in-sc-rs-private-setter.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-arrow-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-await-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-arrow-function-return-await-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-await-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-function-return-await-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-async-gen-await-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-block-labeled-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-block-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-block-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-block-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-block-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-do-while-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-do-while-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-do-while-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-do-while-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-else-braceless-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-else-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-else-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-else-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-else-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-function-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-function-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-function-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-function-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-function-return-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-function-return-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-function-return-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-function-return-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-if-braceless-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-if-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-if-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-if-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-if-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-while-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-while-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-while-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-while-not-extensible-no-trailing-comma.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/nested-with-expression-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-with-expression-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-with-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/nested-with-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/top-level-no-new-call-expression.js(default) -language/expressions/dynamic-import/syntax/invalid/top-level-no-new-call-expression.js(strict mode) -language/expressions/dynamic-import/syntax/invalid/top-level-not-extensible-no-trailing-comma.js(default) -language/expressions/dynamic-import/syntax/invalid/top-level-not-extensible-no-trailing-comma.js(strict mode) language/expressions/function/dflt-params-duplicates.js(default) language/expressions/generators/dflt-params-duplicates.js(default) language/expressions/object/let-non-strict-access.js(default) @@ -1942,4 +1862,4 @@ language/statements/with/decl-async-fun.js(default) language/statements/with/decl-async-gen.js(default) language/statements/with/labelled-fn-stmt.js(default) language/statements/with/let-block-with-newline.js(default) -language/statements/with/let-identifier-with-newline.js(default) +language/statements/with/let-identifier-with-newline.js(default) \ No newline at end of file From 28319eb07ea8510dcf2d7e510cfc945d733e7cb3 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Fri, 11 Jan 2019 13:50:48 -0500 Subject: [PATCH 199/563] add sponsor [skip ci] --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eb6b885d448f..c3c8424d6bdf 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ Become a sponsor and get your logo on our README on Github with a link to your s ## Bronze - + + ## Intro From 3e4b608a80120f33ac3ddd8449bd1497736ffbfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sat, 12 Jan 2019 14:54:23 +0100 Subject: [PATCH 200/563] Parse class heritage as strict mode code (#9315) --- packages/babel-parser/src/parser/statement.js | 12 ++++++++---- .../fixtures/es2015/class/extends-strict/input.js | 4 ++++ .../es2015/class/extends-strict/options.json | 3 +++ .../es2015/yield/in-class-heritage/options.json | 2 +- scripts/tests/test262/test262_whitelist.txt | 1 - 5 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/es2015/class/extends-strict/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/class/extends-strict/options.json diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 553da03d6167..0f70b8c3a72b 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -994,8 +994,16 @@ export default class StatementParser extends ExpressionParser { this.next(); this.takeDecorators(node); this.parseClassId(node, isStatement, optionalId); + + // class bodies and heritages are implicitly strict + const oldStrict = this.state.strict; + this.state.strict = true; + this.parseClassSuper(node); this.parseClassBody(node); + + this.state.strict = oldStrict; + return this.finishNode( node, isStatement ? "ClassDeclaration" : "ClassExpression", @@ -1020,9 +1028,6 @@ export default class StatementParser extends ExpressionParser { } parseClassBody(node: N.Class): void { - // class bodies are implicitly strict - const oldStrict = this.state.strict; - this.state.strict = true; this.state.classLevel++; const state = { hadConstructor: false }; @@ -1087,7 +1092,6 @@ export default class StatementParser extends ExpressionParser { node.body = this.finishNode(classBody, "ClassBody"); this.state.classLevel--; - this.state.strict = oldStrict; } parseClassMember( diff --git a/packages/babel-parser/test/fixtures/es2015/class/extends-strict/input.js b/packages/babel-parser/test/fixtures/es2015/class/extends-strict/input.js new file mode 100644 index 000000000000..2bc6c813e8ed --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/extends-strict/input.js @@ -0,0 +1,4 @@ +class C extends (function B() { + with ({}); + return B; +}()) {} diff --git a/packages/babel-parser/test/fixtures/es2015/class/extends-strict/options.json b/packages/babel-parser/test/fixtures/es2015/class/extends-strict/options.json new file mode 100644 index 000000000000..01d854a2e769 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/extends-strict/options.json @@ -0,0 +1,3 @@ +{ + "throws": "'with' in strict mode (2:2)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/options.json b/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/options.json index 7fc68d96502e..a2857a14add7 100644 --- a/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/options.json +++ b/packages/babel-parser/test/fixtures/es2015/yield/in-class-heritage/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token, expected \"{\" (1:22)" + "throws": "yield is a reserved word in strict mode (1:16)" } diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 9dbaf7fea2f6..9995fc248479 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -1611,7 +1611,6 @@ language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js(defaul language/statements/class/elements/wrapped-in-sc-rs-private-setter-alt.js(strict mode) language/statements/class/elements/wrapped-in-sc-rs-private-setter.js(default) language/statements/class/elements/wrapped-in-sc-rs-private-setter.js(strict mode) -language/statements/class/strict-mode/with.js(default) language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(default) language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(strict mode) language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(default) From d6b4ab75eeaabd44ec037cd690f0fdeec6efefd3 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Sat, 12 Jan 2019 10:41:49 -0500 Subject: [PATCH 201/563] fix sponsor link [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c3c8424d6bdf..50638bce1065 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s ## Bronze - + ## Intro From a24206eb9670a6b7f66495d6359b3f1d288a00da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sun, 13 Jan 2019 00:35:22 +0100 Subject: [PATCH 202/563] Fix error for decorators not enabled (#9321) * Fix error for decorators not enabled * Update error message --- .../src/features.js | 12 ++++++++++-- .../decorators-legacy-interop/wrong-order/input.js | 2 ++ .../wrong-order/options.json | 7 +++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 packages/babel-plugin-proposal-class-properties/test/fixtures/decorators-legacy-interop/wrong-order/input.js create mode 100644 packages/babel-plugin-proposal-class-properties/test/fixtures/decorators-legacy-interop/wrong-order/options.json diff --git a/packages/babel-helper-create-class-features-plugin/src/features.js b/packages/babel-helper-create-class-features-plugin/src/features.js index afd8a29f2030..9772a5dd4e00 100644 --- a/packages/babel-helper-create-class-features-plugin/src/features.js +++ b/packages/babel-helper-create-class-features-plugin/src/features.js @@ -39,9 +39,17 @@ export function isLoose(file, feature) { } export function verifyUsedFeatures(path, file) { - if (hasOwnDecorators(path)) { + if (hasOwnDecorators(path.node)) { if (!hasFeature(file, FEATURES.decorators)) { - throw path.buildCodeFrameError("Decorators are not enabled."); + throw path.buildCodeFrameError( + "Decorators are not enabled." + + "\nIf you are using " + + '["@babel/plugin-proposal-decorators", { "legacy": true }], ' + + 'make sure it comes *before* "@babel/plugin-proposal-class-properties" ' + + "and enable loose mode, like so:\n" + + '\t["@babel/plugin-proposal-decorators", { "legacy": true }]\n' + + '\t["@babel/plugin-proposal-class-properties", { "loose": true }]', + ); } if (path.isPrivate()) { diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/decorators-legacy-interop/wrong-order/input.js b/packages/babel-plugin-proposal-class-properties/test/fixtures/decorators-legacy-interop/wrong-order/input.js new file mode 100644 index 000000000000..248eee836d59 --- /dev/null +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/decorators-legacy-interop/wrong-order/input.js @@ -0,0 +1,2 @@ +@deco +class Foo {} \ No newline at end of file diff --git a/packages/babel-plugin-proposal-class-properties/test/fixtures/decorators-legacy-interop/wrong-order/options.json b/packages/babel-plugin-proposal-class-properties/test/fixtures/decorators-legacy-interop/wrong-order/options.json new file mode 100644 index 000000000000..64fd0cbcea65 --- /dev/null +++ b/packages/babel-plugin-proposal-class-properties/test/fixtures/decorators-legacy-interop/wrong-order/options.json @@ -0,0 +1,7 @@ +{ + "plugins": [ + ["proposal-class-properties", { "loose": true }], + ["proposal-decorators", { "legacy": true }] + ], + "throws": "Decorators are not enabled." +} From 4944e9e180a4cf329d7191e3ea0dffbab527b36c Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Sun, 13 Jan 2019 08:00:46 -0500 Subject: [PATCH 203/563] update sponsor link again [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50638bce1065..27c05f25ac2d 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s ## Bronze - + ## Intro From 40ae6568a45bdeb6e25bc4f4ef180ca9894a0ecd Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Sun, 13 Jan 2019 08:32:33 -0600 Subject: [PATCH 204/563] Add support for proposal-json-strings in preset-env (#9323) --- packages/babel-preset-env/data/built-ins.json | 35 ++++++++++++++++++- .../babel-preset-env/data/plugin-features.js | 2 +- packages/babel-preset-env/data/plugins.json | 10 +++++- packages/babel-preset-env/package.json | 3 +- .../babel-preset-env/scripts/build-data.js | 2 +- .../babel-preset-env/src/available-plugins.js | 1 + 6 files changed, 48 insertions(+), 5 deletions(-) diff --git a/packages/babel-preset-env/data/built-ins.json b/packages/babel-preset-env/data/built-ins.json index d6c82dccc9f3..32897b655299 100644 --- a/packages/babel-preset-env/data/built-ins.json +++ b/packages/babel-preset-env/data/built-ins.json @@ -19,6 +19,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.fill": { @@ -41,6 +42,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.find": { @@ -73,6 +75,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.from": { @@ -105,6 +108,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.is-array": { @@ -117,6 +121,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.iterator": { @@ -139,6 +144,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.map": { @@ -151,6 +157,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.of": { @@ -173,6 +180,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.reduce-right": { @@ -185,6 +193,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.some": { @@ -197,6 +206,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.array.sort": { @@ -230,6 +240,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.date.to-iso-string": { @@ -242,6 +253,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.date.to-json": { @@ -276,6 +288,7 @@ "ie": "10", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.function.bind": { @@ -287,7 +300,8 @@ "node": "0.10", "ie": "9", "android": "4.0", - "ios": "7" + "ios": "7", + "phantom": "2" }, "es6.function.has-instance": { "chrome": "51", @@ -308,6 +322,7 @@ "node": "0.12", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.map": { @@ -611,6 +626,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es7.object.define-getter": { @@ -643,6 +659,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.object.define-properties": { @@ -655,6 +672,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es7.object.entries": { @@ -1075,6 +1093,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.big": { @@ -1085,6 +1104,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.blink": { @@ -1095,6 +1115,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.bold": { @@ -1105,6 +1126,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.code-point-at": { @@ -1135,6 +1157,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.fontcolor": { @@ -1145,6 +1168,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.fontsize": { @@ -1155,6 +1179,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.from-code-point": { @@ -1185,6 +1210,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.iterator": { @@ -1205,6 +1231,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es7.string.pad-start": { @@ -1255,6 +1282,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.starts-with": { @@ -1275,6 +1303,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.sub": { @@ -1285,6 +1314,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.sup": { @@ -1295,6 +1325,7 @@ "node": "0.12", "android": "4.0", "ios": "7", + "phantom": "2", "electron": "1.1" }, "es6.string.trim": { @@ -1307,6 +1338,7 @@ "ie": "9", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.typed.array-buffer": { @@ -1329,6 +1361,7 @@ "ie": "10", "android": "4.0", "ios": "6", + "phantom": "2", "electron": "1.1" }, "es6.typed.int8-array": { diff --git a/packages/babel-preset-env/data/plugin-features.js b/packages/babel-preset-env/data/plugin-features.js index 9f1e10324acd..4fcdf4a6b644 100644 --- a/packages/babel-preset-env/data/plugin-features.js +++ b/packages/babel-preset-env/data/plugin-features.js @@ -96,7 +96,7 @@ const es = { "proposal-object-rest-spread": "object rest/spread properties", "proposal-unicode-property-regex": "RegExp Unicode Property Escapes", - "proposal-json-strings": "", // Awaiting mapping in compat-table + "proposal-json-strings": "JSON superset", "proposal-optional-catch-binding": "optional catch binding", }; diff --git a/packages/babel-preset-env/data/plugins.json b/packages/babel-preset-env/data/plugins.json index b24d39d456a5..a4c706b3f572 100644 --- a/packages/babel-preset-env/data/plugins.json +++ b/packages/babel-preset-env/data/plugins.json @@ -253,7 +253,15 @@ "opera": "51", "electron": "3" }, - "proposal-json-strings": {}, + "proposal-json-strings": { + "chrome": "66", + "firefox": "62", + "safari": "12", + "node": "10.13", + "ios": "12", + "opera": "53", + "electron": "3" + }, "proposal-optional-catch-binding": { "chrome": "66", "firefox": "58", diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index 531f5af533aa..3cf0f539c1d8 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -22,6 +22,7 @@ "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-json-strings": "^7.2.0", "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", "@babel/plugin-transform-arrow-functions": "^7.2.0", @@ -65,7 +66,7 @@ "@babel/helper-fixtures": "^7.2.0", "@babel/helper-plugin-test-runner": "^7.0.0", "caniuse-db": "1.0.30000851", - "compat-table": "kangax/compat-table#7655c84581184806d4f94ef97fbaac7abd5852d8", + "compat-table": "kangax/compat-table#29db20b301e3351d036890d4a72d3b25980cd70d", "electron-to-chromium": "1.3.79" } } diff --git a/packages/babel-preset-env/scripts/build-data.js b/packages/babel-preset-env/scripts/build-data.js index 82288ac702ae..3706d8148ae0 100644 --- a/packages/babel-preset-env/scripts/build-data.js +++ b/packages/babel-preset-env/scripts/build-data.js @@ -192,7 +192,7 @@ const getLowestImplementedVersion = ({ features }, env) => { // only doing this for built-ins atm // // NOTE: when/if compat-table adds a babel7 key, we'll want to update this - if (!test.babel6 && isBuiltIn) { + if (!test.babel6corejs2 && isBuiltIn) { return "-1"; } diff --git a/packages/babel-preset-env/src/available-plugins.js b/packages/babel-preset-env/src/available-plugins.js index 559e5478a4b3..09d820f5c39d 100644 --- a/packages/babel-preset-env/src/available-plugins.js +++ b/packages/babel-preset-env/src/available-plugins.js @@ -1,5 +1,6 @@ export default { "syntax-async-generators": require("@babel/plugin-syntax-async-generators"), + "syntax-json-strings": require("@babel/plugin-syntax-json-strings"), "syntax-object-rest-spread": require("@babel/plugin-syntax-object-rest-spread"), "syntax-optional-catch-binding": require("@babel/plugin-syntax-optional-catch-binding"), "transform-async-to-generator": require("@babel/plugin-transform-async-to-generator"), From 694e3fd8cf321988c0f1d97e59a3df77adabad5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Sun, 13 Jan 2019 23:54:44 +0100 Subject: [PATCH 205/563] Merge declaration and init of props in parser's state (#9312) * Merge declaration and init of props in parser's state * Move type def --- packages/babel-parser/src/tokenizer/state.js | 205 +++++++------------ packages/babel-parser/src/tokenizer/types.js | 14 -- 2 files changed, 79 insertions(+), 140 deletions(-) diff --git a/packages/babel-parser/src/tokenizer/state.js b/packages/babel-parser/src/tokenizer/state.js index d857cea13441..e03c4b1f2b89 100644 --- a/packages/babel-parser/src/tokenizer/state.js +++ b/packages/babel-parser/src/tokenizer/state.js @@ -6,102 +6,50 @@ import { Position } from "../util/location"; import { types as ct, type TokContext } from "./context"; import type { Token } from "./index"; -import { types as tt, type TokenType, type TopicContextState } from "./types"; +import { types as tt, type TokenType } from "./types"; -export default class State { - init(options: Options, input: string): void { - this.strict = - options.strictMode === false ? false : options.sourceType === "module"; - - this.input = input; - - this.commaAfterSpreadAt = -1; +type TopicContextState = { + // When a topic binding has been currently established, + // then this is 1. Otherwise, it is 0. This is forwards compatible + // with a future plugin for multiple lexical topics. + maxNumOfResolvableTopics: number, - this.potentialArrowAt = -1; + // When a topic binding has been currently established, and if that binding + // has been used as a topic reference `#`, then this is 0. Otherwise, it is + // `null`. This is forwards compatible with a future plugin for multiple + // lexical topics. + maxTopicIndex: null | 0, +}; - this.noArrowAt = []; - this.noArrowParamsConversionAt = []; - - this.inMethod = false; - this.inFunction = false; - this.inParameters = false; - this.maybeInArrowParameters = false; - this.inGenerator = false; - this.inAsync = false; - this.inPipeline = false; - this.inPropertyName = false; - this.inType = false; - this.inClassProperty = false; - this.noAnonFunctionType = false; - this.hasFlowComment = false; - this.isIterator = false; - - // Used by smartPipelines. - this.topicContext = { - maxNumOfResolvableTopics: 0, - maxTopicIndex: null, - }; - - this.classLevel = 0; - - this.labels = []; - - this.decoratorStack = [[]]; +export default class State { + strict: boolean; + input: string; - this.yieldOrAwaitInPossibleArrowParameters = null; + curLine: number; - this.tokens = []; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + startLoc: Position; + endLoc: Position; - this.comments = []; + init(options: Options, input: string): void { + this.strict = + options.strictMode === false ? false : options.sourceType === "module"; - this.trailingComments = []; - this.leadingComments = []; - this.commentStack = []; - // $FlowIgnore - this.commentPreviousNode = null; + this.input = input; - this.pos = this.lineStart = 0; this.curLine = options.startLine; - - this.type = tt.eof; - this.value = null; - this.start = this.end = this.pos; this.startLoc = this.endLoc = this.curPosition(); - - // $FlowIgnore - this.lastTokEndLoc = this.lastTokStartLoc = null; - this.lastTokStart = this.lastTokEnd = this.pos; - - this.context = [ct.braceStatement]; - this.exprAllowed = true; - - this.containsEsc = this.containsOctal = false; - this.octalPosition = null; - - this.invalidTemplateEscapePosition = null; - - this.exportedIdentifiers = []; } - // TODO - strict: boolean; - - // TODO - input: string; - - // A comma after "...a" is only allowed in spread, but not in rest. - // Since we parse destructuring patterns as array/object literals - // and then convert them, we need to track it. - commaAfterSpreadAt: number; - // Used to signify the start of a potential arrow function - potentialArrowAt: number; + potentialArrowAt: number = -1; // Used to signify the start of an expression which looks like a // typed arrow function, but it isn't // e.g. a ? (b) : c => d // ^ - noArrowAt: number[]; + noArrowAt: number[] = []; // Used to signify the start of an expression whose params, if it looks like // an arrow function, shouldn't be converted to assignable nodes. @@ -109,40 +57,48 @@ export default class State { // conditional expressions. // e.g. a ? (b) : c => d // ^ - noArrowParamsConversionAt: number[]; + noArrowParamsConversionAt: number[] = []; + + // A comma after "...a" is only allowed in spread, but not in rest. + // Since we parse destructuring patterns as array/object literals + // and then convert them, we need to track it. + commaAfterSpreadAt: number = -1; // Flags to track whether we are in a function, a generator. - inFunction: boolean; - inParameters: boolean; - maybeInArrowParameters: boolean; - inGenerator: boolean; - inMethod: boolean | N.MethodKind; - inAsync: boolean; - inPipeline: boolean; - inType: boolean; - noAnonFunctionType: boolean; - inPropertyName: boolean; - inClassProperty: boolean; - hasFlowComment: boolean; - isIterator: boolean; + inFunction: boolean = false; + inParameters: boolean = false; + maybeInArrowParameters: boolean = false; + inGenerator: boolean = false; + inMethod: boolean | N.MethodKind = false; + inAsync: boolean = false; + inPipeline: boolean = false; + inType: boolean = false; + noAnonFunctionType: boolean = false; + inPropertyName: boolean = false; + inClassProperty: boolean = false; + hasFlowComment: boolean = false; + isIterator: boolean = false; // For the smartPipelines plugin: - topicContext: TopicContextState; + topicContext: TopicContextState = { + maxNumOfResolvableTopics: 0, + maxTopicIndex: null, + }; // Check whether we are in a (nested) class or not. - classLevel: number; + classLevel: number = 0; // Labels in scope. labels: Array<{ kind: ?("loop" | "switch"), name?: ?string, statementStart?: number, - }>; + }> = []; // Leading decorators. Last element of the stack represents the decorators in current context. // Supports nesting of decorators, e.g. @foo(@bar class inner {}) class outer {} // where @foo belongs to the outer class and @bar to the inner - decoratorStack: Array>; + decoratorStack: Array> = [[]]; // The first yield or await expression inside parenthesized expressions // and arrow function parameters. It is used to disallow yield and await in @@ -150,72 +106,69 @@ export default class State { yieldOrAwaitInPossibleArrowParameters: | N.YieldExpression | N.AwaitExpression - | null; + | null = null; // Token store. - tokens: Array; + tokens: Array = []; // Comment store. - comments: Array; + comments: Array = []; // Comment attachment store - trailingComments: Array; - leadingComments: Array; + trailingComments: Array = []; + leadingComments: Array = []; commentStack: Array<{ start: number, leadingComments: ?Array, trailingComments: ?Array, type: string, - }>; - commentPreviousNode: N.Node; + }> = []; + // $FlowIgnore this is initialized when the parser starts. + commentPreviousNode: N.Node = null; // The current position of the tokenizer in the input. - pos: number; - lineStart: number; - curLine: number; + pos: number = 0; + lineStart: number = 0; // Properties of the current token: // Its type - type: TokenType; + type: TokenType = tt.eof; // For tokens that include more information than their type, the value - value: any; + value: any = null; // Its start and end offset - start: number; - end: number; - - // And, if locations are used, the {line, column} object - // corresponding to those offsets - startLoc: Position; - endLoc: Position; + start: number = 0; + end: number = 0; // Position information for the previous token - lastTokEndLoc: Position; - lastTokStartLoc: Position; - lastTokStart: number; - lastTokEnd: number; + // $FlowIgnore this is initialized when generating the second token. + lastTokEndLoc: Position = null; + // $FlowIgnore this is initialized when generating the second token. + lastTokStartLoc: Position = null; + lastTokStart: number = 0; + lastTokEnd: number = 0; // The context stack is used to superficially track syntactic // context to predict whether a regular expression is allowed in a // given position. - context: Array; - exprAllowed: boolean; + context: Array = [ct.braceStatement]; + exprAllowed: boolean = true; // Used to signal to callers of `readWord1` whether the word // contained any escape sequences. This is needed because words with // escape sequences must not be interpreted as keywords. - containsEsc: boolean; + containsEsc: boolean = false; // TODO - containsOctal: boolean; - octalPosition: ?number; + containsOctal: boolean = false; + octalPosition: ?number = null; // Names of exports store. `default` is stored as a name for both // `export default foo;` and `export { foo as default };`. - exportedIdentifiers: Array; + exportedIdentifiers: Array = []; - invalidTemplateEscapePosition: ?number; + invalidTemplateEscapePosition: ?number = null; curPosition(): Position { return new Position(this.curLine, this.pos - this.lineStart); diff --git a/packages/babel-parser/src/tokenizer/types.js b/packages/babel-parser/src/tokenizer/types.js index 7bc41f9dbc37..5212e626084f 100644 --- a/packages/babel-parser/src/tokenizer/types.js +++ b/packages/babel-parser/src/tokenizer/types.js @@ -198,17 +198,3 @@ export const keywords = { Object.keys(keywords).forEach(name => { types["_" + name] = keywords[name]; }); - -// A type for the smartPipelines plugin. -export type TopicContextState = { - // When a topic binding has been currently established, - // then this is 1. Otherwise, it is 0. This is forwards compatible - // with a future plugin for multiple lexical topics. - maxNumOfResolvableTopics: number, - - // When a topic binding has been currently established, and if that binding - // has been used as a topic reference `#`, then this is 0. Otherwise, it is - // `null`. This is forwards compatible with a future plugin for multiple - // lexical topics. - maxTopicIndex: null | 0, -}; From e8038863c3869f6b3c15ee23f43cbf3de3e7d656 Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 15 Jan 2019 10:35:49 +0100 Subject: [PATCH 206/563] Fix range on TypeScript this type predicate (#9339) --- .../babel-parser/src/plugins/typescript.js | 2 +- .../typescript/class/predicate-types/input.js | 6 + .../class/predicate-types/output.json | 361 ++++++++++++++++++ 3 files changed, 368 insertions(+), 1 deletion(-) create mode 100644 packages/babel-parser/test/fixtures/typescript/class/predicate-types/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/class/predicate-types/output.json diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 02cdd54b8987..0aa6211748d2 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -264,7 +264,7 @@ export default (superClass: Class): Class => tsParseThisTypePredicate(lhs: N.TsThisType): N.TsTypePredicate { this.next(); - const node: N.TsTypePredicate = this.startNode(); + const node: N.TsTypePredicate = this.startNodeAtNode(lhs); node.parameterName = lhs; node.typeAnnotation = this.tsParseTypeAnnotation(/* eatColon */ false); return this.finishNode(node, "TSTypePredicate"); diff --git a/packages/babel-parser/test/fixtures/typescript/class/predicate-types/input.js b/packages/babel-parser/test/fixtures/typescript/class/predicate-types/input.js new file mode 100644 index 000000000000..5a4be8de8ab7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/predicate-types/input.js @@ -0,0 +1,6 @@ +class Foo { + isBar(): this is string { + } + isBaz = (): this is string => { + } +} diff --git a/packages/babel-parser/test/fixtures/typescript/class/predicate-types/output.json b/packages/babel-parser/test/fixtures/typescript/class/predicate-types/output.json new file mode 100644 index 000000000000..a0f7f5f5f39b --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/predicate-types/output.json @@ -0,0 +1,361 @@ +{ + "type": "File", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "Foo" + }, + "name": "Foo" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 10, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "body": [ + { + "type": "ClassMethod", + "start": 14, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 3, + "column": 3 + } + }, + "static": false, + "key": { + "type": "Identifier", + "start": 14, + "end": 19, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "isBar" + }, + "name": "isBar" + }, + "computed": false, + "kind": "method", + "id": null, + "generator": false, + "async": false, + "params": [], + "returnType": { + "type": "TSTypeAnnotation", + "start": 21, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "typeAnnotation": { + "type": "TSTypePredicate", + "start": 23, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "parameterName": { + "type": "TSThisType", + "start": 23, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 31, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "typeAnnotation": { + "type": "TSStringKeyword", + "start": 31, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + } + } + }, + "body": { + "type": "BlockStatement", + "start": 38, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 3, + "column": 3 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "ClassProperty", + "start": 46, + "end": 81, + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + }, + "static": false, + "key": { + "type": "Identifier", + "start": 46, + "end": 51, + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 7 + }, + "identifierName": "isBaz" + }, + "name": "isBaz" + }, + "computed": false, + "value": { + "type": "ArrowFunctionExpression", + "start": 54, + "end": 81, + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 5, + "column": 3 + } + }, + "returnType": { + "type": "TSTypeAnnotation", + "start": 56, + "end": 72, + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 28 + } + }, + "typeAnnotation": { + "type": "TSTypePredicate", + "start": 58, + "end": 72, + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 28 + } + }, + "parameterName": { + "type": "TSThisType", + "start": 58, + "end": 62, + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 66, + "end": 72, + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 28 + } + }, + "typeAnnotation": { + "type": "TSStringKeyword", + "start": 66, + "end": 72, + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + } + } + }, + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 76, + "end": 81, + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 5, + "column": 3 + } + }, + "body": [], + "directives": [] + } + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file From 34c9890f41c84436940e0dbc9ba894c2b8281c6d Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Tue, 15 Jan 2019 06:52:33 -0600 Subject: [PATCH 207/563] Fix range on TypeScript index signature parameters (#9335) --- packages/babel-parser/src/plugins/typescript.js | 5 +++-- .../typescript/class/declare/output.json | 8 ++++---- .../typescript/class/index-signature/output.json | 16 ++++++++-------- .../interface/index-signature/output.json | 8 ++++---- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 0aa6211748d2..1f382db90f02 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -398,8 +398,9 @@ export default (superClass: Class): Class => this.expect(tt.bracketL); const id = this.parseIdentifier(); - this.expect(tt.colon); - id.typeAnnotation = this.tsParseTypeAnnotation(/* eatColon */ false); + id.typeAnnotation = this.tsParseTypeAnnotation(); + this.finishNode(id, "Identifier"); // set end position to end of type + this.expect(tt.bracketR); node.parameters = [id]; diff --git a/packages/babel-parser/test/fixtures/typescript/class/declare/output.json b/packages/babel-parser/test/fixtures/typescript/class/declare/output.json index 9c183f96b858..f52b40639e43 100644 --- a/packages/babel-parser/test/fixtures/typescript/class/declare/output.json +++ b/packages/babel-parser/test/fixtures/typescript/class/declare/output.json @@ -94,7 +94,7 @@ { "type": "Identifier", "start": 23, - "end": 24, + "end": 32, "loc": { "start": { "line": 2, @@ -102,19 +102,19 @@ }, "end": { "line": 2, - "column": 6 + "column": 14 }, "identifierName": "x" }, "name": "x", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 26, + "start": 24, "end": 32, "loc": { "start": { "line": 2, - "column": 8 + "column": 6 }, "end": { "line": 2, diff --git a/packages/babel-parser/test/fixtures/typescript/class/index-signature/output.json b/packages/babel-parser/test/fixtures/typescript/class/index-signature/output.json index 64364c101560..b1b3fd1a3517 100644 --- a/packages/babel-parser/test/fixtures/typescript/class/index-signature/output.json +++ b/packages/babel-parser/test/fixtures/typescript/class/index-signature/output.json @@ -94,7 +94,7 @@ { "type": "Identifier", "start": 15, - "end": 16, + "end": 24, "loc": { "start": { "line": 2, @@ -102,19 +102,19 @@ }, "end": { "line": 2, - "column": 6 + "column": 14 }, "identifierName": "x" }, "name": "x", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 18, + "start": 16, "end": 24, "loc": { "start": { "line": 2, - "column": 8 + "column": 6 }, "end": { "line": 2, @@ -189,7 +189,7 @@ { "type": "Identifier", "start": 46, - "end": 47, + "end": 55, "loc": { "start": { "line": 3, @@ -197,19 +197,19 @@ }, "end": { "line": 3, - "column": 15 + "column": 23 }, "identifierName": "x" }, "name": "x", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 49, + "start": 47, "end": 55, "loc": { "start": { "line": 3, - "column": 17 + "column": 15 }, "end": { "line": 3, diff --git a/packages/babel-parser/test/fixtures/typescript/interface/index-signature/output.json b/packages/babel-parser/test/fixtures/typescript/interface/index-signature/output.json index e34dff90a1a2..6a4a98afb573 100644 --- a/packages/babel-parser/test/fixtures/typescript/interface/index-signature/output.json +++ b/packages/babel-parser/test/fixtures/typescript/interface/index-signature/output.json @@ -93,7 +93,7 @@ { "type": "Identifier", "start": 19, - "end": 20, + "end": 28, "loc": { "start": { "line": 2, @@ -101,19 +101,19 @@ }, "end": { "line": 2, - "column": 6 + "column": 14 }, "identifierName": "s" }, "name": "s", "typeAnnotation": { "type": "TSTypeAnnotation", - "start": 22, + "start": 20, "end": 28, "loc": { "start": { "line": 2, - "column": 8 + "column": 6 }, "end": { "line": 2, From aaec2cd51dd24a1ecf52b82e0bbad0a5ccd60b6f Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Tue, 15 Jan 2019 06:56:52 -0600 Subject: [PATCH 208/563] Fix handling newline with TypeScript declare and abstract classes (#9328) --- .../babel-parser/src/plugins/typescript.js | 18 +- .../class/abstract-new-line/input.js | 2 + .../class/abstract-new-line/output.json | 116 ++++++ .../class/declare-new-line/input.js | 2 + .../class/declare-new-line/output.json | 116 ++++++ .../declare/const-new-line/input.js | 2 + .../declare/const-new-line/output.json | 211 ++++++++++ .../declare/destructure-new-line/input.js | 2 + .../declare/destructure-new-line/output.json | 386 ++++++++++++++++++ .../declare/interface-new-line/input.js | 2 + .../declare/interface-new-line/output.json | 115 ++++++ .../typescript/declare/let-new-line/input.js | 2 + .../declare/let-new-line/output.json | 118 ++++++ .../typescript/declare/var-new-line/input.js | 5 + .../declare/var-new-line/output.json | 231 +++++++++++ .../interface/new-line-error/input.js | 2 + .../interface/new-line-error/options.json | 3 + .../typescript/interface/new-line/input.js | 3 + .../typescript/interface/new-line/output.json | 116 ++++++ .../module-new-line-error/input.js | 2 + .../module-new-line-error/options.json | 3 + .../module-namespace/module-new-line/input.js | 3 + .../module-new-line/output.json | 116 ++++++ .../namespace-new-line-error/input.js | 2 + .../namespace-new-line-error/options.json | 3 + .../namespace-new-line/input.js | 3 + .../namespace-new-line/output.json | 116 ++++++ .../typescript/types/new-line/input.js | 2 + .../typescript/types/new-line/output.json | 132 ++++++ 29 files changed, 1829 insertions(+), 5 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/typescript/class/abstract-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/class/abstract-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/class/declare-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/class/declare-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/const-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/const-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/interface-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/interface-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/let-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/let-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/var-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/declare/var-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/interface/new-line-error/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/interface/new-line-error/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/interface/new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/interface/new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/types/new-line/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/types/new-line/output.json diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 1f382db90f02..c73bc6fe9d99 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -1187,6 +1187,10 @@ export default (superClass: Class): Class => } tsTryParseDeclare(nany: any): ?N.Declaration { + if (this.isLineTerminator()) { + return; + } + switch (this.state.type) { case tt._function: this.next(); @@ -1263,7 +1267,7 @@ export default (superClass: Class): Class => ): ?N.Declaration { switch (value) { case "abstract": - if (next || this.match(tt._class)) { + if (this.tsCheckLineTerminatorAndMatch(tt._class, next)) { const cls: N.ClassDeclaration = node; cls.abstract = true; if (next) this.next(); @@ -1283,7 +1287,7 @@ export default (superClass: Class): Class => break; case "interface": - if (next || this.match(tt.name)) { + if (this.tsCheckLineTerminatorAndMatch(tt.name, next)) { if (next) this.next(); return this.tsParseInterfaceDeclaration(node); } @@ -1293,20 +1297,20 @@ export default (superClass: Class): Class => if (next) this.next(); if (this.match(tt.string)) { return this.tsParseAmbientExternalModuleDeclaration(node); - } else if (next || this.match(tt.name)) { + } else if (this.tsCheckLineTerminatorAndMatch(tt.name, next)) { return this.tsParseModuleOrNamespaceDeclaration(node); } break; case "namespace": - if (next || this.match(tt.name)) { + if (this.tsCheckLineTerminatorAndMatch(tt.name, next)) { if (next) this.next(); return this.tsParseModuleOrNamespaceDeclaration(node); } break; case "type": - if (next || this.match(tt.name)) { + if (this.tsCheckLineTerminatorAndMatch(tt.name, next)) { if (next) this.next(); return this.tsParseTypeAliasDeclaration(node); } @@ -1314,6 +1318,10 @@ export default (superClass: Class): Class => } } + tsCheckLineTerminatorAndMatch(tokenType: TokenType, next: boolean) { + return !this.isLineTerminator() && (next || this.match(tokenType)); + } + tsTryParseGenericAsyncArrowFunction( startPos: number, startLoc: Position, diff --git a/packages/babel-parser/test/fixtures/typescript/class/abstract-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/class/abstract-new-line/input.js new file mode 100644 index 000000000000..7c56988be397 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/abstract-new-line/input.js @@ -0,0 +1,2 @@ +abstract +class B {} diff --git a/packages/babel-parser/test/fixtures/typescript/class/abstract-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/class/abstract-new-line/output.json new file mode 100644 index 000000000000..08760bb11d2b --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/abstract-new-line/output.json @@ -0,0 +1,116 @@ +{ + "type": "File", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + }, + "identifierName": "abstract" + }, + "name": "abstract" + } + }, + { + "type": "ClassDeclaration", + "start": 9, + "end": 19, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "B" + }, + "name": "B" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 17, + "end": 19, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/class/declare-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/class/declare-new-line/input.js new file mode 100644 index 000000000000..2710f781ffdb --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/declare-new-line/input.js @@ -0,0 +1,2 @@ +declare +class B {} diff --git a/packages/babel-parser/test/fixtures/typescript/class/declare-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/class/declare-new-line/output.json new file mode 100644 index 000000000000..764a3d2f7efa --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/class/declare-new-line/output.json @@ -0,0 +1,116 @@ +{ + "type": "File", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "declare" + }, + "name": "declare" + } + }, + { + "type": "ClassDeclaration", + "start": 8, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "B" + }, + "name": "B" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 16, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/declare/const-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/declare/const-new-line/input.js new file mode 100644 index 000000000000..f8d2e9cb8ae9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/const-new-line/input.js @@ -0,0 +1,2 @@ +declare +const x: number, y: string; diff --git a/packages/babel-parser/test/fixtures/typescript/declare/const-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/declare/const-new-line/output.json new file mode 100644 index 000000000000..4d58e741f456 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/const-new-line/output.json @@ -0,0 +1,211 @@ +{ + "type": "File", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "declare" + }, + "name": "declare" + } + }, + { + "type": "VariableDeclaration", + "start": 8, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "id": { + "type": "Identifier", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 15 + }, + "identifierName": "x" + }, + "name": "x", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 15, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "typeAnnotation": { + "type": "TSNumberKeyword", + "start": 17, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + }, + "init": null + }, + { + "type": "VariableDeclarator", + "start": 25, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "id": { + "type": "Identifier", + "start": 25, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 26 + }, + "identifierName": "y" + }, + "name": "y", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 26, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "typeAnnotation": { + "type": "TSStringKeyword", + "start": 28, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 26 + } + } + } + } + }, + "init": null + } + ], + "kind": "const" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/input.js new file mode 100644 index 000000000000..0a7a9c97706c --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/input.js @@ -0,0 +1,2 @@ +declare +const { x, y }: { x: number, y: number }; diff --git a/packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/output.json new file mode 100644 index 000000000000..a4ed43a77f94 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/destructure-new-line/output.json @@ -0,0 +1,386 @@ +{ + "type": "File", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 49, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 41 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "declare" + }, + "name": "declare" + } + }, + { + "type": "VariableDeclaration", + "start": 8, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 41 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 14, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 40 + } + }, + "id": { + "type": "ObjectPattern", + "start": 14, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 40 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + }, + "identifierName": "x" + }, + "name": "x" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 16, + "end": 17, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + }, + "identifierName": "x" + }, + "name": "x" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "y" + }, + "name": "y" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "y" + }, + "name": "y" + }, + "extra": { + "shorthand": true + } + } + ], + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 22, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 40 + } + }, + "typeAnnotation": { + "type": "TSTypeLiteral", + "start": 24, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 40 + } + }, + "members": [ + { + "type": "TSPropertySignature", + "start": 26, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 28 + } + }, + "key": { + "type": "Identifier", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + }, + "identifierName": "x" + }, + "name": "x" + }, + "computed": false, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 27, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "typeAnnotation": { + "type": "TSNumberKeyword", + "start": 29, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + }, + { + "type": "TSPropertySignature", + "start": 37, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 38 + } + }, + "key": { + "type": "Identifier", + "start": 37, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 30 + }, + "identifierName": "y" + }, + "name": "y" + }, + "computed": false, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 38, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 38 + } + }, + "typeAnnotation": { + "type": "TSNumberKeyword", + "start": 40, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 38 + } + } + } + } + } + ] + } + } + }, + "init": null + } + ], + "kind": "const" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/declare/interface-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/declare/interface-new-line/input.js new file mode 100644 index 000000000000..ba761fb2190e --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/interface-new-line/input.js @@ -0,0 +1,2 @@ +declare +interface I {} diff --git a/packages/babel-parser/test/fixtures/typescript/declare/interface-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/declare/interface-new-line/output.json new file mode 100644 index 000000000000..249423eab47e --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/interface-new-line/output.json @@ -0,0 +1,115 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "declare" + }, + "name": "declare" + } + }, + { + "type": "TSInterfaceDeclaration", + "start": 8, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "id": { + "type": "Identifier", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + }, + "identifierName": "I" + }, + "name": "I" + }, + "body": { + "type": "TSInterfaceBody", + "start": 20, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/declare/let-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/declare/let-new-line/input.js new file mode 100644 index 000000000000..900228beaa82 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/let-new-line/input.js @@ -0,0 +1,2 @@ +declare +let x; diff --git a/packages/babel-parser/test/fixtures/typescript/declare/let-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/declare/let-new-line/output.json new file mode 100644 index 000000000000..2b7786be2c95 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/let-new-line/output.json @@ -0,0 +1,118 @@ +{ + "type": "File", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "declare" + }, + "name": "declare" + } + }, + { + "type": "VariableDeclaration", + "start": 8, + "end": 14, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + }, + "id": { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + }, + "identifierName": "x" + }, + "name": "x" + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/declare/var-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/declare/var-new-line/input.js new file mode 100644 index 000000000000..7baf8686e1fd --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/var-new-line/input.js @@ -0,0 +1,5 @@ +declare +var x; + +declare +var x: any; diff --git a/packages/babel-parser/test/fixtures/typescript/declare/var-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/declare/var-new-line/output.json new file mode 100644 index 000000000000..63eaea000fef --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/declare/var-new-line/output.json @@ -0,0 +1,231 @@ +{ + "type": "File", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 11 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 11 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "declare" + }, + "name": "declare" + } + }, + { + "type": "VariableDeclaration", + "start": 8, + "end": 14, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + }, + "id": { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + }, + "identifierName": "x" + }, + "name": "x" + }, + "init": null + } + ], + "kind": "var" + }, + { + "type": "ExpressionStatement", + "start": 16, + "end": 23, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + }, + "expression": { + "type": "Identifier", + "start": 16, + "end": 23, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + }, + "identifierName": "declare" + }, + "name": "declare" + } + }, + { + "type": "VariableDeclaration", + "start": 24, + "end": 35, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 28, + "end": 34, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 28, + "end": 34, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + }, + "identifierName": "x" + }, + "name": "x", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "typeAnnotation": { + "type": "TSAnyKeyword", + "start": 31, + "end": 34, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + } + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/interface/new-line-error/input.js b/packages/babel-parser/test/fixtures/typescript/interface/new-line-error/input.js new file mode 100644 index 000000000000..707fdd6cfe2c --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/interface/new-line-error/input.js @@ -0,0 +1,2 @@ +interface +F {} diff --git a/packages/babel-parser/test/fixtures/typescript/interface/new-line-error/options.json b/packages/babel-parser/test/fixtures/typescript/interface/new-line-error/options.json new file mode 100644 index 000000000000..d36d386ca060 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/interface/new-line-error/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (2:2)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/interface/new-line/input.js b/packages/babel-parser/test/fixtures/typescript/interface/new-line/input.js new file mode 100644 index 000000000000..2c77ad6a91ed --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/interface/new-line/input.js @@ -0,0 +1,3 @@ +interface +F +{} diff --git a/packages/babel-parser/test/fixtures/typescript/interface/new-line/output.json b/packages/babel-parser/test/fixtures/typescript/interface/new-line/output.json new file mode 100644 index 000000000000..56e109b261fa --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/interface/new-line/output.json @@ -0,0 +1,116 @@ +{ + "type": "File", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "interface" + }, + "name": "interface" + } + }, + { + "type": "ExpressionStatement", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + }, + "expression": { + "type": "Identifier", + "start": 10, + "end": 11, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + }, + "identifierName": "F" + }, + "name": "F" + } + }, + { + "type": "BlockStatement", + "start": 12, + "end": 14, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "body": [], + "directives": [] + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/input.js b/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/input.js new file mode 100644 index 000000000000..999e730ad0a2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/input.js @@ -0,0 +1,2 @@ +module +Foo {} diff --git a/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/options.json b/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/options.json new file mode 100644 index 000000000000..cd6a9c1b1a0a --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line-error/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (2:4)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line/input.js new file mode 100644 index 000000000000..f3a399f41cb7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line/input.js @@ -0,0 +1,3 @@ +module +Foo +{} diff --git a/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line/output.json new file mode 100644 index 000000000000..bee3b058a55a --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/module-namespace/module-new-line/output.json @@ -0,0 +1,116 @@ +{ + "type": "File", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + }, + "identifierName": "module" + }, + "name": "module" + } + }, + { + "type": "ExpressionStatement", + "start": 7, + "end": 10, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "expression": { + "type": "Identifier", + "start": 7, + "end": 10, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + }, + "identifierName": "Foo" + }, + "name": "Foo" + } + }, + { + "type": "BlockStatement", + "start": 11, + "end": 13, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "body": [], + "directives": [] + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/input.js b/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/input.js new file mode 100644 index 000000000000..20f300ac2e1a --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/input.js @@ -0,0 +1,2 @@ +namespace +Foo {} diff --git a/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/options.json b/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/options.json new file mode 100644 index 000000000000..cd6a9c1b1a0a --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line-error/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (2:4)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line/input.js b/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line/input.js new file mode 100644 index 000000000000..65385432e336 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line/input.js @@ -0,0 +1,3 @@ +namespace +Foo +{} diff --git a/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line/output.json b/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line/output.json new file mode 100644 index 000000000000..eadadded2851 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/module-namespace/namespace-new-line/output.json @@ -0,0 +1,116 @@ +{ + "type": "File", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "namespace" + }, + "name": "namespace" + } + }, + { + "type": "ExpressionStatement", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "expression": { + "type": "Identifier", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + }, + "identifierName": "Foo" + }, + "name": "Foo" + } + }, + { + "type": "BlockStatement", + "start": 14, + "end": 16, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "body": [], + "directives": [] + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/types/new-line/input.js b/packages/babel-parser/test/fixtures/typescript/types/new-line/input.js new file mode 100644 index 000000000000..24e7eba5895e --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/new-line/input.js @@ -0,0 +1,2 @@ +type +Foo = string; diff --git a/packages/babel-parser/test/fixtures/typescript/types/new-line/output.json b/packages/babel-parser/test/fixtures/typescript/types/new-line/output.json new file mode 100644 index 000000000000..7acae4a0d346 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/types/new-line/output.json @@ -0,0 +1,132 @@ +{ + "type": "File", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + }, + "identifierName": "type" + }, + "name": "type" + } + }, + { + "type": "ExpressionStatement", + "start": 5, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 5, + "end": 17, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 5, + "end": 8, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + }, + "identifierName": "Foo" + }, + "name": "Foo" + }, + "right": { + "type": "Identifier", + "start": 11, + "end": 17, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "string" + }, + "name": "string" + } + } + } + ], + "directives": [] + } +} \ No newline at end of file From a27b9b42990d44c4c2b5bf9e1184a10e49686a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 15 Jan 2019 18:21:17 +0100 Subject: [PATCH 209/563] Add @babel/plugin-transform-named-capturing-groups-regex (#7105) When the `runtime` flag is on (by default), this plugin adds a new helper which wraps the native `RegExp` class to provide groups support. People nees to use a polyfill (I implemented it in core-js) for browsers that don't support ES6 regexps. --- packages/babel-helpers/src/helpers.js | 72 +++++++++++++++++++ .../.npmignore | 3 + .../README.md | 19 +++++ .../package.json | 26 +++++++ .../src/index.js | 54 ++++++++++++++ .../test/fixtures/runtime/exec.js | 15 ++++ .../fixtures/runtime/instanceof-regexp.js | 3 + .../test/fixtures/runtime/match.js | 15 ++++ .../test/fixtures/runtime/no-groups.js | 4 ++ .../test/fixtures/runtime/options.json | 3 + .../test/fixtures/runtime/replace-string.js | 5 ++ .../test/fixtures/syntax/basic/input.js | 1 + .../test/fixtures/syntax/basic/options.json | 6 ++ .../test/fixtures/syntax/basic/output.js | 1 + .../syntax/escape-no-unicode-flag/input.js | 1 + .../escape-no-unicode-flag/options.json | 3 + .../syntax/escape-unicode-flag/input.js | 1 + .../syntax/escape-unicode-flag/output.js | 1 + .../test/fixtures/syntax/options.json | 6 ++ .../test/fixtures/wrapper/basic/input.js | 1 + .../test/fixtures/wrapper/basic/output.js | 3 + .../wrapper/looks-like-a-group/input.js | 1 + .../wrapper/looks-like-a-group/output.js | 1 + .../wrapper/only-when-named-groups/input.js | 1 + .../wrapper/only-when-named-groups/output.js | 1 + .../test/fixtures/wrapper/options.json | 6 ++ .../skips-anonymous-capturing-groups/input.js | 1 + .../output.js | 3 + .../fixtures/wrapper/test-method/input.js | 1 + .../fixtures/wrapper/test-method/output.js | 1 + .../test/index.js | 3 + 31 files changed, 262 insertions(+) create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/.npmignore create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/README.md create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/package.json create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/src/index.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/exec.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/instanceof-regexp.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/match.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/no-groups.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/options.json create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/replace-string.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/input.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/options.json create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/output.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-no-unicode-flag/input.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-no-unicode-flag/options.json create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-unicode-flag/input.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-unicode-flag/output.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/options.json create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/basic/input.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/basic/output.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/looks-like-a-group/input.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/looks-like-a-group/output.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/only-when-named-groups/input.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/only-when-named-groups/output.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/options.json create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/skips-anonymous-capturing-groups/input.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/skips-anonymous-capturing-groups/output.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/test-method/input.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/test-method/output.js create mode 100644 packages/babel-plugin-transform-named-capturing-groups-regex/test/index.js diff --git a/packages/babel-helpers/src/helpers.js b/packages/babel-helpers/src/helpers.js index 6a78ae8397f3..1b29a1ce6b69 100644 --- a/packages/babel-helpers/src/helpers.js +++ b/packages/babel-helpers/src/helpers.js @@ -1783,3 +1783,75 @@ helpers.classPrivateMethodSet = helper("7.1.6")` throw new TypeError("attempted to reassign private method"); } `; + +helpers.wrapRegExp = helper("7.2.6")` + import wrapNativeSuper from "wrapNativeSuper"; + import getPrototypeOf from "getPrototypeOf"; + import possibleConstructorReturn from "possibleConstructorReturn"; + import inherits from "inherits"; + + export default function _wrapRegExp(re, groups) { + _wrapRegExp = function(re, groups) { + return new BabelRegExp(re, groups); + }; + + var _RegExp = wrapNativeSuper(RegExp); + var _super = RegExp.prototype; + var _groups = new WeakMap(); + + function BabelRegExp(re, groups) { + var _this = _RegExp.call(this, re); + _groups.set(_this, groups); + return _this; + } + inherits(BabelRegExp, _RegExp); + + BabelRegExp.prototype.exec = function(str) { + var result = _super.exec.call(this, str); + if (result) result.groups = buildGroups(result, this); + return result; + }; + BabelRegExp.prototype[Symbol.replace] = function(str, substitution) { + if (typeof substitution === "string") { + var groups = _groups.get(this); + return _super[Symbol.replace].call( + this, + str, + substitution.replace(/\\$<([^>]+)>/g, function(_, name) { + return "$" + groups[name]; + }) + ); + } else if (typeof substitution === "function") { + var _this = this; + return _super[Symbol.replace].call( + this, + str, + function() { + var args = []; + args.push.apply(args, arguments); + if (typeof args[args.length - 1] !== "object") { + // Modern engines already pass result.groups as the last arg. + args.push(buildGroups(args, _this)); + } + return substitution.apply(this, args); + } + ); + } else { + return _super[Symbol.replace].call(this, str, substitution); + } + } + + function buildGroups(result, re) { + // NOTE: This function should return undefined if there are no groups, + // but in that case Babel doesn't add the wrapper anyway. + + var g = _groups.get(re); + return Object.keys(groups).reduce(function(groups, name) { + groups[name] = result[g[name]]; + return groups; + }, Object.create(null)); + } + + return _wrapRegExp.apply(this, arguments); + } +`; diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/.npmignore b/packages/babel-plugin-transform-named-capturing-groups-regex/.npmignore new file mode 100644 index 000000000000..f9806945836e --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/.npmignore @@ -0,0 +1,3 @@ +src +test +*.log diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/README.md b/packages/babel-plugin-transform-named-capturing-groups-regex/README.md new file mode 100644 index 000000000000..a04992d5c64b --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/README.md @@ -0,0 +1,19 @@ +# @babel/plugin-transform-named-capturing-groups-regex + +> Compile regular expressions using named groups to ES5. + +See our website [@babel/plugin-transform-named-capturing-groups-regex](https://babeljs.io/docs/en/next/babel-plugin-transform-named-capturing-groups-regex.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/plugin-transform-named-capturing-groups-regex +``` + +or using yarn: + +```sh +yarn add @babel/plugin-transform-named-capturing-groups-regex --dev +``` diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/package.json b/packages/babel-plugin-transform-named-capturing-groups-regex/package.json new file mode 100644 index 000000000000..5012e9e8c749 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/package.json @@ -0,0 +1,26 @@ +{ + "name": "@babel/plugin-transform-named-capturing-groups-regex", + "version": "7.2.5", + "description": "Compile regular expressions using named groups to ES5.", + "homepage": "https://babeljs.io/", + "license": "MIT", + "main": "lib/index.js", + "keywords": [ + "babel-plugin", + "regex", + "regexp", + "regular expressions" + ], + "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-named-capturing-groups-regex", + "bugs": "https://github.com/babel/babel/issues", + "dependencies": { + "regexp-tree": "^0.1.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + }, + "devDependencies": { + "@babel/core": "^7.0.0", + "@babel/helper-plugin-test-runner": "^7.0.0" + } +} diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/src/index.js b/packages/babel-plugin-transform-named-capturing-groups-regex/src/index.js new file mode 100644 index 000000000000..042d16de9d4d --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/src/index.js @@ -0,0 +1,54 @@ +import regexpTree from "regexp-tree"; + +export default function({ types: t }, options) { + const { runtime = true } = options; + if (typeof runtime !== "boolean") { + throw new Error("The 'runtime' option must be boolean"); + } + + return { + name: "transform-named-capturing-groups-regex", + + visitor: { + RegExpLiteral(path) { + const node = path.node; + if (node.pattern.indexOf("(?<") === -1) { + // Return early if there are no named groups. + // The .indexOf check may have false positives (e.g. /\(? 0 + ) { + node.pattern = result.getSource(); + + if (runtime && !isRegExpTest(path)) { + path.replaceWith( + t.callExpression(this.addHelper("wrapRegExp"), [ + node, + t.valueToNode(namedCapturingGroups), + ]), + ); + } + } + }, + }, + }; +} + +function isRegExpTest(path) { + return ( + path.parentPath.isMemberExpression({ + object: path.node, + computed: false, + }) && path.parentPath.get("property").isIdentifier({ name: "test" }) + ); +} diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/exec.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/exec.js new file mode 100644 index 000000000000..6f6e7eb9770b --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/exec.js @@ -0,0 +1,15 @@ +var re = /(?\d{4})-(?\d{2})-(?\d{2})/; + +var result = re.exec("2017-12-23"); + +expect(result.groups).toEqual({ + year: "2017", + month: "12", + day: "23", +}); + +expect(result.groups).toEqual({ + year: result[1], + month: result[2], + day: result[3], +}); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/instanceof-regexp.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/instanceof-regexp.js new file mode 100644 index 000000000000..7b3eea56647e --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/instanceof-regexp.js @@ -0,0 +1,3 @@ +var re = /(?)/; + +expect(re instanceof RegExp).toBeTruthy(); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/match.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/match.js new file mode 100644 index 000000000000..9fbe902285ab --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/match.js @@ -0,0 +1,15 @@ +var re = /(?\d{4})-(?\d{2})-(?\d{2})/; + +var result = "1999-09-29".match(re); + +expect(result.groups).toEqual({ + year: "1999", + month: "09", + day: "29", +}); + +expect(result.groups).toEqual({ + year: result[1], + month: result[2], + day: result[3], +}); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/no-groups.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/no-groups.js new file mode 100644 index 000000000000..030be5eea3c9 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/no-groups.js @@ -0,0 +1,4 @@ +var re = /no-groups-\(?looks\)/; +var result = re.exec("no-groups-(looks)") + +expect(result.groups).toBeUndefined(); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/options.json b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/options.json new file mode 100644 index 000000000000..8b8fe93e5deb --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-named-capturing-groups-regex"] +} diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/replace-string.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/replace-string.js new file mode 100644 index 000000000000..2902c419f5f9 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/runtime/replace-string.js @@ -0,0 +1,5 @@ +var re = /(?\d{4})-(?\d{2})-(?\d{2})/; + +var result = "2015-10-31".replace(re, "$/$/$") + +expect(result).toBe("31/10/2015"); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/input.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/input.js new file mode 100644 index 000000000000..8414081fd509 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/input.js @@ -0,0 +1 @@ +/(?)\k/; \ No newline at end of file diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/options.json b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/options.json new file mode 100644 index 000000000000..3b43d3bd5d98 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/options.json @@ -0,0 +1,6 @@ +{ + "plugins": [ + "external-helpers", + ["transform-named-capturing-groups-regex", { "runtime": false }] + ] +} diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/output.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/output.js new file mode 100644 index 000000000000..67c955321e66 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/basic/output.js @@ -0,0 +1 @@ +/()\1/; diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-no-unicode-flag/input.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-no-unicode-flag/input.js new file mode 100644 index 000000000000..2393cc30f52a --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-no-unicode-flag/input.js @@ -0,0 +1 @@ +/(?<\u{41}>)\k<\u{41}>/; diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-no-unicode-flag/options.json b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-no-unicode-flag/options.json new file mode 100644 index 000000000000..47dc981e754b --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-no-unicode-flag/options.json @@ -0,0 +1,3 @@ +{ + "throws": "invalid group Unicode name \"\\u{41}\", use `u` flag." +} diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-unicode-flag/input.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-unicode-flag/input.js new file mode 100644 index 000000000000..e455e5e672b5 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-unicode-flag/input.js @@ -0,0 +1 @@ +/(?<\u{41}>)\k<\u{41}>/u; \ No newline at end of file diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-unicode-flag/output.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-unicode-flag/output.js new file mode 100644 index 000000000000..5548e7368638 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/escape-unicode-flag/output.js @@ -0,0 +1 @@ +/()\1/u; diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/options.json b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/options.json new file mode 100644 index 000000000000..2490cf9876bf --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/syntax/options.json @@ -0,0 +1,6 @@ +{ + "plugins": [ + ["external-helpers", { "helperVersion": "7.1000.0" }], + ["transform-named-capturing-groups-regex", { "runtime": false }] + ] +} diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/basic/input.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/basic/input.js new file mode 100644 index 000000000000..2761445e091b --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/basic/input.js @@ -0,0 +1 @@ +"foo".match(/(?.)\k/); \ No newline at end of file diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/basic/output.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/basic/output.js new file mode 100644 index 000000000000..2c6eed2f6dec --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/basic/output.js @@ -0,0 +1,3 @@ +"foo".match(babelHelpers.wrapRegExp(/(.)\1/, { + double: 1 +})); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/looks-like-a-group/input.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/looks-like-a-group/input.js new file mode 100644 index 000000000000..4c55ef0dbe17 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/looks-like-a-group/input.js @@ -0,0 +1 @@ +/no-groups-\(?looks\)/; diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/looks-like-a-group/output.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/looks-like-a-group/output.js new file mode 100644 index 000000000000..4c55ef0dbe17 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/looks-like-a-group/output.js @@ -0,0 +1 @@ +/no-groups-\(?looks\)/; diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/only-when-named-groups/input.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/only-when-named-groups/input.js new file mode 100644 index 000000000000..581032632ae1 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/only-when-named-groups/input.js @@ -0,0 +1 @@ +"foo".match(/(.)\1/); \ No newline at end of file diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/only-when-named-groups/output.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/only-when-named-groups/output.js new file mode 100644 index 000000000000..c545e42ac5ca --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/only-when-named-groups/output.js @@ -0,0 +1 @@ +"foo".match(/(.)\1/); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/options.json b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/options.json new file mode 100644 index 000000000000..ce85d0c0f4a6 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/options.json @@ -0,0 +1,6 @@ +{ + "plugins": [ + ["external-helpers", { "helperVersion": "7.1000.0" }], + "transform-named-capturing-groups-regex" + ] +} diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/skips-anonymous-capturing-groups/input.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/skips-anonymous-capturing-groups/input.js new file mode 100644 index 000000000000..86639f6f7e17 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/skips-anonymous-capturing-groups/input.js @@ -0,0 +1 @@ +"abba".match(/(.)(?.)\k\1/); \ No newline at end of file diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/skips-anonymous-capturing-groups/output.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/skips-anonymous-capturing-groups/output.js new file mode 100644 index 000000000000..f9da17ab47a1 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/skips-anonymous-capturing-groups/output.js @@ -0,0 +1,3 @@ +"abba".match(babelHelpers.wrapRegExp(/(.)(.)\2\1/, { + n: 2 +})); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/test-method/input.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/test-method/input.js new file mode 100644 index 000000000000..3e26e4ee498a --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/test-method/input.js @@ -0,0 +1 @@ +/^(?.)\k$/.test("aa"); \ No newline at end of file diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/test-method/output.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/test-method/output.js new file mode 100644 index 000000000000..808fc64e4f90 --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/fixtures/wrapper/test-method/output.js @@ -0,0 +1 @@ +/^(.)\1$/.test("aa"); diff --git a/packages/babel-plugin-transform-named-capturing-groups-regex/test/index.js b/packages/babel-plugin-transform-named-capturing-groups-regex/test/index.js new file mode 100644 index 000000000000..1b534b8fc64a --- /dev/null +++ b/packages/babel-plugin-transform-named-capturing-groups-regex/test/index.js @@ -0,0 +1,3 @@ +import runner from "@babel/helper-plugin-test-runner"; + +runner(__dirname); From 0a88230ec4714e5f74a5aea75c1dc20ee4d5687d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 17 Jan 2019 23:07:48 +0100 Subject: [PATCH 210/563] Disallow async functions as loop bodies (#9314) --- packages/babel-parser/src/parser/statement.js | 20 +++++-- .../invalid-fn-decl-inside-loop}/input.js | 0 .../invalid-fn-decl-inside-loop/options.json | 3 + .../input.js | 1 + .../options.json | 3 + .../es2015/uncategorised/330/options.json | 3 - .../invalid-inside-loop/input.js | 1 + .../invalid-inside-loop/options.json | 3 + scripts/tests/test262/test262_whitelist.txt | 55 ------------------- 9 files changed, 27 insertions(+), 62 deletions(-) rename packages/babel-parser/test/fixtures/{es2015/uncategorised/330 => core/categorized/invalid-fn-decl-inside-loop}/input.js (100%) create mode 100644 packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/options.json create mode 100644 packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/input.js create mode 100644 packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/options.json delete mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/330/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/options.json diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 0f70b8c3a72b..a02441114085 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -106,7 +106,12 @@ export default class StatementParser extends ExpressionParser { return this.parseForStatement(node); case tt._function: if (this.lookahead().type === tt.dot) break; - if (!declaration) this.unexpected(); + if (!declaration) { + this.raise( + this.state.start, + "Function declaration not allowed in this context", + ); + } return this.parseFunctionStatement(node); case tt._class: @@ -189,7 +194,13 @@ export default class StatementParser extends ExpressionParser { const state = this.state.clone(); this.next(); if (this.match(tt._function) && !this.canInsertSemicolon()) { - this.expect(tt._function); + if (!declaration) { + this.raise( + this.state.lastTokStart, + "Function declaration not allowed in this context", + ); + } + this.next(); return this.parseFunction(node, true, false, true); } else { this.state = state; @@ -210,7 +221,7 @@ export default class StatementParser extends ExpressionParser { expr.type === "Identifier" && this.eat(tt.colon) ) { - return this.parseLabeledStatement(node, maybeName, expr); + return this.parseLabeledStatement(node, maybeName, expr, declaration); } else { return this.parseExpressionStatement(node, expr); } @@ -649,6 +660,7 @@ export default class StatementParser extends ExpressionParser { node: N.LabeledStatement, maybeName: string, expr: N.Identifier, + declaration: boolean, ): N.LabeledStatement { for (const label of this.state.labels) { if (label.name === maybeName) { @@ -676,7 +688,7 @@ export default class StatementParser extends ExpressionParser { kind: kind, statementStart: this.state.start, }); - node.body = this.parseStatement(true); + node.body = this.parseStatement(declaration); if ( node.body.type == "ClassDeclaration" || diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/330/input.js b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/es2015/uncategorised/330/input.js rename to packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/input.js diff --git a/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/options.json b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/options.json new file mode 100644 index 000000000000..c1cad1bfedad --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Function declaration not allowed in this context (1:10)" +} diff --git a/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/input.js b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/input.js new file mode 100644 index 000000000000..241ddc1cde1c --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/input.js @@ -0,0 +1 @@ +while (1) foo: bar: function foo(){} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/options.json b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/options.json new file mode 100644 index 000000000000..1397e6a76220 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Function declaration not allowed in this context (1:20)" +} diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/330/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/330/options.json deleted file mode 100644 index 89bfc2d73f8a..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/330/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Unexpected token (1:10)" -} diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/input.js new file mode 100644 index 000000000000..c519d6ea261a --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/input.js @@ -0,0 +1 @@ +while (1) async function foo(){} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/options.json new file mode 100644 index 000000000000..c1cad1bfedad --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Function declaration not allowed in this context (1:10)" +} diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 9995fc248479..061bbac1fe13 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -1616,17 +1616,8 @@ language/statements/class/syntax/early-errors/class-definition-evaluation-block- language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(default) language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(strict mode) language/statements/const/redeclaration-error-from-within-strict-mode-function-const.js(default) -language/statements/do-while/decl-async-fun.js(default) -language/statements/do-while/decl-async-fun.js(strict mode) -language/statements/do-while/decl-async-gen.js(default) -language/statements/do-while/decl-async-gen.js(strict mode) -language/statements/do-while/labelled-fn-stmt.js(default) language/statements/for-await-of/let-block-with-newline.js(default) language/statements/for-await-of/let-identifier-with-newline.js(default) -language/statements/for-in/decl-async-fun.js(default) -language/statements/for-in/decl-async-fun.js(strict mode) -language/statements/for-in/decl-async-gen.js(default) -language/statements/for-in/decl-async-gen.js(strict mode) language/statements/for-in/dstr/array-rest-before-elision.js(default) language/statements/for-in/dstr/array-rest-before-elision.js(strict mode) language/statements/for-in/dstr/array-rest-elision-invalid.js(default) @@ -1642,16 +1633,8 @@ language/statements/for-in/head-let-bound-names-in-stmt.js(strict mode) language/statements/for-in/head-lhs-let.js(default) language/statements/for-in/head-var-bound-names-let.js(default) language/statements/for-in/identifier-let-allowed-as-lefthandside-expression-not-strict.js(default) -language/statements/for-in/labelled-fn-stmt-const.js(default) -language/statements/for-in/labelled-fn-stmt-let.js(default) -language/statements/for-in/labelled-fn-stmt-lhs.js(default) -language/statements/for-in/labelled-fn-stmt-var.js(default) language/statements/for-in/let-block-with-newline.js(default) language/statements/for-in/let-identifier-with-newline.js(default) -language/statements/for-of/decl-async-fun.js(default) -language/statements/for-of/decl-async-fun.js(strict mode) -language/statements/for-of/decl-async-gen.js(default) -language/statements/for-of/decl-async-gen.js(strict mode) language/statements/for-of/dstr/array-rest-before-elision.js(default) language/statements/for-of/dstr/array-rest-before-elision.js(strict mode) language/statements/for-of/dstr/array-rest-elision-invalid.js(default) @@ -1672,45 +1655,15 @@ language/statements/for-of/head-let-bound-names-in-stmt.js(strict mode) language/statements/for-of/head-var-bound-names-let.js(default) language/statements/for-of/head-var-no-expr.js(default) language/statements/for-of/head-var-no-expr.js(strict mode) -language/statements/for-of/labelled-fn-stmt-const.js(default) -language/statements/for-of/labelled-fn-stmt-let.js(default) -language/statements/for-of/labelled-fn-stmt-lhs.js(default) -language/statements/for-of/labelled-fn-stmt-var.js(default) language/statements/for-of/let-block-with-newline.js(default) language/statements/for-of/let-identifier-with-newline.js(default) -language/statements/for/decl-async-fun.js(default) -language/statements/for/decl-async-fun.js(strict mode) -language/statements/for/decl-async-gen.js(default) -language/statements/for/decl-async-gen.js(strict mode) language/statements/for/head-let-bound-names-in-stmt.js(default) language/statements/for/head-let-bound-names-in-stmt.js(strict mode) language/statements/for/head-lhs-let.js(default) -language/statements/for/labelled-fn-stmt-expr.js(default) -language/statements/for/labelled-fn-stmt-let.js(default) -language/statements/for/labelled-fn-stmt-var.js(default) language/statements/for/let-block-with-newline.js(default) language/statements/for/let-identifier-with-newline.js(default) language/statements/function/dflt-params-duplicates.js(default) language/statements/generators/dflt-params-duplicates.js(default) -language/statements/if/if-async-fun-else-async-fun.js(default) -language/statements/if/if-async-fun-else-async-fun.js(strict mode) -language/statements/if/if-async-fun-else-stmt.js(default) -language/statements/if/if-async-fun-else-stmt.js(strict mode) -language/statements/if/if-async-fun-no-else.js(default) -language/statements/if/if-async-fun-no-else.js(strict mode) -language/statements/if/if-async-gen-else-async-gen.js(default) -language/statements/if/if-async-gen-else-async-gen.js(strict mode) -language/statements/if/if-async-gen-else-stmt.js(default) -language/statements/if/if-async-gen-else-stmt.js(strict mode) -language/statements/if/if-async-gen-no-else.js(default) -language/statements/if/if-async-gen-no-else.js(strict mode) -language/statements/if/if-stmt-else-async-fun.js(default) -language/statements/if/if-stmt-else-async-fun.js(strict mode) -language/statements/if/if-stmt-else-async-gen.js(default) -language/statements/if/if-stmt-else-async-gen.js(strict mode) -language/statements/if/labelled-fn-stmt-first.js(default) -language/statements/if/labelled-fn-stmt-lone.js(default) -language/statements/if/labelled-fn-stmt-second.js(default) language/statements/if/let-block-with-newline.js(default) language/statements/if/let-identifier-with-newline.js(default) language/statements/labeled/let-block-with-newline.js(default) @@ -1850,15 +1803,7 @@ language/statements/try/early-catch-lex.js(default) language/statements/try/early-catch-lex.js(strict mode) language/statements/try/early-catch-var.js(default) language/statements/try/early-catch-var.js(strict mode) -language/statements/while/decl-async-fun.js(default) -language/statements/while/decl-async-fun.js(strict mode) -language/statements/while/decl-async-gen.js(default) -language/statements/while/decl-async-gen.js(strict mode) -language/statements/while/labelled-fn-stmt.js(default) language/statements/while/let-block-with-newline.js(default) language/statements/while/let-identifier-with-newline.js(default) -language/statements/with/decl-async-fun.js(default) -language/statements/with/decl-async-gen.js(default) -language/statements/with/labelled-fn-stmt.js(default) language/statements/with/let-block-with-newline.js(default) language/statements/with/let-identifier-with-newline.js(default) \ No newline at end of file From e9588061d75a45cf6c1938dd98fc0051841159ea Mon Sep 17 00:00:00 2001 From: unconfident <30427068+unconfident@users.noreply.github.com> Date: Fri, 18 Jan 2019 00:12:16 +0200 Subject: [PATCH 211/563] Copy "optional" property when cloning Identifier node (#9333) Fixes #9331 --- packages/babel-types/src/clone/cloneNode.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/babel-types/src/clone/cloneNode.js b/packages/babel-types/src/clone/cloneNode.js index 1da6c930e040..f1e36d3ad0d6 100644 --- a/packages/babel-types/src/clone/cloneNode.js +++ b/packages/babel-types/src/clone/cloneNode.js @@ -38,6 +38,10 @@ export default function cloneNode(node: T, deep: boolean = true): T { if (type === "Identifier") { newNode.name = node.name; + if (has(node, "optional") && typeof node.optional === "boolean") { + newNode.optional = node.optional; + } + if (has(node, "typeAnnotation")) { newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true) From ae154c86edd9dfed4337b4079e8a03b3e0f3ef0e Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 15 Jan 2019 00:03:39 -0800 Subject: [PATCH 212/563] perf: Minor optimizations --- packages/babel-parser/src/tokenizer/index.js | 39 +++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 368ffb686610..3a7312b48655 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -311,6 +311,11 @@ export default class Tokenizer extends LocationParser { loop: while (this.state.pos < this.input.length) { const ch = this.input.charCodeAt(this.state.pos); switch (ch) { + case charCodes.space: + case charCodes.nonBreakingSpace: + case charCodes.tab: + ++this.state.pos; + break; case charCodes.carriageReturn: if ( this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed @@ -651,10 +656,6 @@ export default class Tokenizer extends LocationParser { getTokenFromCode(code: number): void { switch (code) { - case charCodes.numberSign: - this.readToken_numberSign(); - return; - // The interpretation of a dot depends on whether it is followed // by a digit or another two dots. @@ -720,10 +721,6 @@ export default class Tokenizer extends LocationParser { case charCodes.questionMark: this.readToken_question(); return; - case charCodes.atSign: - ++this.state.pos; - this.finishToken(tt.at); - return; case charCodes.graveAccent: ++this.state.pos; @@ -809,6 +806,15 @@ export default class Tokenizer extends LocationParser { case charCodes.tilde: this.finishOp(tt.tilde, 1); return; + + case charCodes.atSign: + ++this.state.pos; + this.finishToken(tt.at); + return; + + case charCodes.numberSign: + this.readToken_numberSign(); + return; } this.raise( @@ -1266,10 +1272,11 @@ export default class Tokenizer extends LocationParser { // as a micro-optimization. readWord1(): string { + let word = ""; this.state.containsEsc = false; - let word = "", - first = true, - chunkStart = this.state.pos; + const start = this.state.pos; + let chunkStart = this.state.pos; + while (this.state.pos < this.input.length) { const ch = this.input.codePointAt(this.state.pos); if (isIdentifierChar(ch)) { @@ -1281,6 +1288,8 @@ export default class Tokenizer extends LocationParser { word += this.input.slice(chunkStart, this.state.pos); const escStart = this.state.pos; + const identifierCheck = + this.state.pos === start ? isIdentifierStart : isIdentifierChar; if (this.input.charCodeAt(++this.state.pos) !== charCodes.lowercaseU) { this.raise( @@ -1291,8 +1300,11 @@ export default class Tokenizer extends LocationParser { ++this.state.pos; const esc = this.readCodePoint(true); - // $FlowFixMe (thinks esc may be null, but throwOnInvalid is true) - if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) { + + if ( + // $FlowFixMe (thinks esc may be null, but throwOnInvalid is true) + !identifierCheck(esc, true) + ) { this.raise(escStart, "Invalid Unicode escape"); } @@ -1302,7 +1314,6 @@ export default class Tokenizer extends LocationParser { } else { break; } - first = false; } return word + this.input.slice(chunkStart, this.state.pos); } From 2dc1c91955791eac031bdd2eaa79e8f2338ce14e Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 15 Jan 2019 12:45:36 -0800 Subject: [PATCH 213/563] perf: Move input to state and precalculate length This also fixes a bug with async functions --- packages/babel-parser/src/parser/base.js | 1 - .../babel-parser/src/parser/expression.js | 11 +- packages/babel-parser/src/parser/index.js | 1 - packages/babel-parser/src/parser/location.js | 2 +- packages/babel-parser/src/parser/statement.js | 10 +- packages/babel-parser/src/parser/util.js | 2 +- packages/babel-parser/src/plugins/flow.js | 20 +- .../babel-parser/src/plugins/jsx/index.js | 34 +-- .../babel-parser/src/tokenizer/context.js | 4 +- packages/babel-parser/src/tokenizer/index.js | 197 ++++++++++-------- packages/babel-parser/src/tokenizer/state.js | 2 + .../export-invalid/options.json | 2 +- 12 files changed, 160 insertions(+), 126 deletions(-) diff --git a/packages/babel-parser/src/parser/base.js b/packages/babel-parser/src/parser/base.js index 7c84857752fb..96fd7fed8394 100644 --- a/packages/babel-parser/src/parser/base.js +++ b/packages/babel-parser/src/parser/base.js @@ -16,7 +16,6 @@ export default class BaseParser { // Initialized by Tokenizer state: State; - input: string; isReservedWord(word: string): boolean { if (word === "await") { diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index fb390e136155..12174c78f340 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -1146,7 +1146,11 @@ export default class ExpressionParser extends LValParser { const node = this.startNodeAt(startPos, startLoc); this.addExtra(node, "rawValue", value); - this.addExtra(node, "raw", this.input.slice(startPos, this.state.end)); + this.addExtra( + node, + "raw", + this.state.input.slice(startPos, this.state.end), + ); node.value = value; this.next(); return this.finishNode(node, type); @@ -1365,7 +1369,7 @@ export default class ExpressionParser extends LValParser { } } elem.value = { - raw: this.input + raw: this.state.input .slice(this.state.start, this.state.end) .replace(/\r\n?/g, "\n"), cooked: this.state.value, @@ -1967,7 +1971,8 @@ export default class ExpressionParser extends LValParser { if ( (name === "class" || name === "function") && (this.state.lastTokEnd !== this.state.lastTokStart + 1 || - this.input.charCodeAt(this.state.lastTokStart) !== charCodes.dot) + this.state.input.charCodeAt(this.state.lastTokStart) !== + charCodes.dot) ) { this.state.context.pop(); } diff --git a/packages/babel-parser/src/parser/index.js b/packages/babel-parser/src/parser/index.js index 6d6d9cfd8b7b..35e7e01f6c56 100644 --- a/packages/babel-parser/src/parser/index.js +++ b/packages/babel-parser/src/parser/index.js @@ -22,7 +22,6 @@ export default class Parser extends StatementParser { this.options = options; this.inModule = this.options.sourceType === "module"; - this.input = input; this.plugins = pluginsMap(this.options.plugins); this.filename = options.sourceFilename; } diff --git a/packages/babel-parser/src/parser/location.js b/packages/babel-parser/src/parser/location.js index 79db584a4995..f73724004b06 100644 --- a/packages/babel-parser/src/parser/location.js +++ b/packages/babel-parser/src/parser/location.js @@ -21,7 +21,7 @@ export default class LocationParser extends CommentsParser { code?: string, } = {}, ): empty { - const loc = getLineInfo(this.input, pos); + const loc = getLineInfo(this.state.input, pos); message += ` (${loc.line}:${loc.column})`; // $FlowIgnore const err: SyntaxError & { pos: number, loc: Position } = new SyntaxError( diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index a02441114085..6f17c547092c 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -44,7 +44,7 @@ export default class StatementParser extends ExpressionParser { const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start); const directive = this.startNodeAt(stmt.start, stmt.loc.start); - const raw = this.input.slice(expr.start, expr.end); + const raw = this.state.input.slice(expr.start, expr.end); const val = (directiveLiteral.value = raw.slice(1, -1)); // remove quotes this.addExtra(directiveLiteral, "raw", raw); @@ -551,7 +551,9 @@ export default class StatementParser extends ExpressionParser { parseThrowStatement(node: N.ThrowStatement): N.ThrowStatement { this.next(); if ( - lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)) + lineBreak.test( + this.state.input.slice(this.state.lastTokEnd, this.state.start), + ) ) { this.raise(this.state.lastTokEnd, "Illegal newline after throw"); } @@ -1521,7 +1523,7 @@ export default class StatementParser extends ExpressionParser { isAsyncFunction() { if (!this.isContextual("async")) return false; - const { input, pos } = this.state; + const { input, pos, length } = this.state; skipWhiteSpace.lastIndex = pos; const skip = skipWhiteSpace.exec(input); @@ -1533,7 +1535,7 @@ export default class StatementParser extends ExpressionParser { return ( !lineBreak.test(input.slice(pos, next)) && input.slice(next, next + 8) === "function" && - (next + 8 === input.length || !isIdentifierChar(input.charAt(next + 8))) + (next + 8 === length || !isIdentifierChar(input.charCodeAt(next + 8))) ); } diff --git a/packages/babel-parser/src/parser/util.js b/packages/babel-parser/src/parser/util.js index d889982f8376..6538ee7f1b74 100644 --- a/packages/babel-parser/src/parser/util.js +++ b/packages/babel-parser/src/parser/util.js @@ -87,7 +87,7 @@ export default class UtilParser extends Tokenizer { hasPrecedingLineBreak(): boolean { return lineBreak.test( - this.input.slice(this.state.lastTokEnd, this.state.start), + this.state.input.slice(this.state.lastTokEnd, this.state.start), ); } diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 8e190929c686..50e4e7fa3c2f 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -1124,7 +1124,7 @@ export default (superClass: Class): Class => node.types = []; this.expect(tt.bracketL); // We allow trailing commas - while (this.state.pos < this.input.length && !this.match(tt.bracketR)) { + while (this.state.pos < this.state.length && !this.match(tt.bracketR)) { node.types.push(this.flowParseType()); if (this.match(tt.bracketR)) break; this.expect(tt.comma); @@ -1934,7 +1934,7 @@ export default (superClass: Class): Class => // ensure that inside flow types, we bypass the jsx parser plugin readToken(code: number): void { - const next = this.input.charCodeAt(this.state.pos + 1); + const next = this.state.input.charCodeAt(this.state.pos + 1); if ( this.state.inType && (code === charCodes.greaterThan || code === charCodes.lessThan) @@ -2686,7 +2686,7 @@ export default (superClass: Class): Class => } readToken_mult_modulo(code: number): void { - const next = this.input.charCodeAt(this.state.pos + 1); + const next = this.state.input.charCodeAt(this.state.pos + 1); if ( code === charCodes.asterisk && next === charCodes.slash && @@ -2728,7 +2728,7 @@ export default (superClass: Class): Class => } if (this.hasPlugin("flow") && this.state.hasFlowComment) { - const end = this.input.indexOf("*-/", (this.state.pos += 2)); + const end = this.state.input.indexOf("*-/", (this.state.pos += 2)); if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); this.state.pos = end + 3; return; @@ -2742,20 +2742,22 @@ export default (superClass: Class): Class => let shiftToFirstNonWhiteSpace = 2; while ( [charCodes.space, charCodes.tab].includes( - this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace), + this.state.input.charCodeAt(pos + shiftToFirstNonWhiteSpace), ) ) { shiftToFirstNonWhiteSpace++; } - const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); - const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); + const ch2 = this.state.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); + const ch3 = this.state.input.charCodeAt( + shiftToFirstNonWhiteSpace + pos + 1, + ); if (ch2 === charCodes.colon && ch3 === charCodes.colon) { return shiftToFirstNonWhiteSpace + 2; // check for /*:: } if ( - this.input.slice( + this.state.input.slice( shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12, ) === "flow-include" @@ -2769,7 +2771,7 @@ export default (superClass: Class): Class => } hasFlowCommentCompletion(): void { - const end = this.input.indexOf("*/", this.state.pos); + const end = this.state.input.indexOf("*/", this.state.pos); if (end === -1) { this.raise(this.state.pos, "Unterminated comment"); } diff --git a/packages/babel-parser/src/plugins/jsx/index.js b/packages/babel-parser/src/plugins/jsx/index.js index 0271aeffed9d..7a814cfbce31 100644 --- a/packages/babel-parser/src/plugins/jsx/index.js +++ b/packages/babel-parser/src/plugins/jsx/index.js @@ -79,11 +79,11 @@ export default (superClass: Class): Class => let out = ""; let chunkStart = this.state.pos; for (;;) { - if (this.state.pos >= this.input.length) { + if (this.state.pos >= this.state.length) { this.raise(this.state.start, "Unterminated JSX contents"); } - const ch = this.input.charCodeAt(this.state.pos); + const ch = this.state.input.charCodeAt(this.state.pos); switch (ch) { case charCodes.lessThan: @@ -95,18 +95,18 @@ export default (superClass: Class): Class => } return this.getTokenFromCode(ch); } - out += this.input.slice(chunkStart, this.state.pos); + out += this.state.input.slice(chunkStart, this.state.pos); return this.finishToken(tt.jsxText, out); case charCodes.ampersand: - out += this.input.slice(chunkStart, this.state.pos); + out += this.state.input.slice(chunkStart, this.state.pos); out += this.jsxReadEntity(); chunkStart = this.state.pos; break; default: if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); + out += this.state.input.slice(chunkStart, this.state.pos); out += this.jsxReadNewLine(true); chunkStart = this.state.pos; } else { @@ -117,12 +117,12 @@ export default (superClass: Class): Class => } jsxReadNewLine(normalizeCRLF: boolean): string { - const ch = this.input.charCodeAt(this.state.pos); + const ch = this.state.input.charCodeAt(this.state.pos); let out; ++this.state.pos; if ( ch === charCodes.carriageReturn && - this.input.charCodeAt(this.state.pos) === charCodes.lineFeed + this.state.input.charCodeAt(this.state.pos) === charCodes.lineFeed ) { ++this.state.pos; out = normalizeCRLF ? "\n" : "\r\n"; @@ -139,25 +139,25 @@ export default (superClass: Class): Class => let out = ""; let chunkStart = ++this.state.pos; for (;;) { - if (this.state.pos >= this.input.length) { + if (this.state.pos >= this.state.length) { this.raise(this.state.start, "Unterminated string constant"); } - const ch = this.input.charCodeAt(this.state.pos); + const ch = this.state.input.charCodeAt(this.state.pos); if (ch === quote) break; if (ch === charCodes.ampersand) { - out += this.input.slice(chunkStart, this.state.pos); + out += this.state.input.slice(chunkStart, this.state.pos); out += this.jsxReadEntity(); chunkStart = this.state.pos; } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); + out += this.state.input.slice(chunkStart, this.state.pos); out += this.jsxReadNewLine(false); chunkStart = this.state.pos; } else { ++this.state.pos; } } - out += this.input.slice(chunkStart, this.state.pos++); + out += this.state.input.slice(chunkStart, this.state.pos++); return this.finishToken(tt.string, out); } @@ -165,11 +165,11 @@ export default (superClass: Class): Class => let str = ""; let count = 0; let entity; - let ch = this.input[this.state.pos]; + let ch = this.state.input[this.state.pos]; const startPos = ++this.state.pos; - while (this.state.pos < this.input.length && count++ < 10) { - ch = this.input[this.state.pos++]; + while (this.state.pos < this.state.length && count++ < 10) { + ch = this.state.input[this.state.pos++]; if (ch === ";") { if (str[0] === "#") { if (str[1] === "x") { @@ -208,11 +208,11 @@ export default (superClass: Class): Class => let ch; const start = this.state.pos; do { - ch = this.input.charCodeAt(++this.state.pos); + ch = this.state.input.charCodeAt(++this.state.pos); } while (isIdentifierChar(ch) || ch === charCodes.dash); return this.finishToken( tt.jsxName, - this.input.slice(start, this.state.pos), + this.state.input.slice(start, this.state.pos), ); } diff --git a/packages/babel-parser/src/tokenizer/context.js b/packages/babel-parser/src/tokenizer/context.js index 6bb2b9491275..6add1a4cf7d3 100644 --- a/packages/babel-parser/src/tokenizer/context.js +++ b/packages/babel-parser/src/tokenizer/context.js @@ -107,7 +107,9 @@ tt._function.updateContext = tt._class.updateContext = function(prevType) { prevType !== tt._else && !( prevType === tt._return && - lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)) + lineBreak.test( + this.state.input.slice(this.state.lastTokEnd, this.state.start), + ) ) && !( (prevType === tt.colon || prevType === tt.braceL) && diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index 3a7312b48655..558cd069cb44 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -185,7 +185,7 @@ export default class Tokenizer extends LocationParser { this.state.pos = this.state.start; while (this.state.pos < this.state.lineStart) { this.state.lineStart = - this.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; + this.state.input.lastIndexOf("\n", this.state.lineStart - 2) + 1; --this.state.curLine; } this.nextToken(); @@ -206,7 +206,7 @@ export default class Tokenizer extends LocationParser { this.state.octalPosition = null; this.state.start = this.state.pos; this.state.startLoc = this.state.curPosition(); - if (this.state.pos >= this.input.length) { + if (this.state.pos >= this.state.length) { this.finishToken(tt.eof); return; } @@ -214,7 +214,7 @@ export default class Tokenizer extends LocationParser { if (curContext.override) { curContext.override(this); } else { - this.readToken(this.input.codePointAt(this.state.pos)); + this.readToken(this.state.input.codePointAt(this.state.pos)); } } @@ -254,14 +254,14 @@ export default class Tokenizer extends LocationParser { skipBlockComment(): void { const startLoc = this.state.curPosition(); const start = this.state.pos; - const end = this.input.indexOf("*/", (this.state.pos += 2)); + const end = this.state.input.indexOf("*/", (this.state.pos += 2)); if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment"); this.state.pos = end + 2; lineBreakG.lastIndex = start; let match; while ( - (match = lineBreakG.exec(this.input)) && + (match = lineBreakG.exec(this.state.input)) && match.index < this.state.pos ) { ++this.state.curLine; @@ -270,7 +270,7 @@ export default class Tokenizer extends LocationParser { this.pushComment( true, - this.input.slice(start + 2, end), + this.state.input.slice(start + 2, end), start, this.state.pos, startLoc, @@ -281,22 +281,22 @@ export default class Tokenizer extends LocationParser { skipLineComment(startSkip: number): void { const start = this.state.pos; const startLoc = this.state.curPosition(); - let ch = this.input.charCodeAt((this.state.pos += startSkip)); - if (this.state.pos < this.input.length) { + let ch = this.state.input.charCodeAt((this.state.pos += startSkip)); + if (this.state.pos < this.state.length) { while ( ch !== charCodes.lineFeed && ch !== charCodes.carriageReturn && ch !== charCodes.lineSeparator && ch !== charCodes.paragraphSeparator && - ++this.state.pos < this.input.length + ++this.state.pos < this.state.length ) { - ch = this.input.charCodeAt(this.state.pos); + ch = this.state.input.charCodeAt(this.state.pos); } } this.pushComment( false, - this.input.slice(start + startSkip, this.state.pos), + this.state.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, @@ -308,8 +308,8 @@ export default class Tokenizer extends LocationParser { // whitespace and comments, and. skipSpace(): void { - loop: while (this.state.pos < this.input.length) { - const ch = this.input.charCodeAt(this.state.pos); + loop: while (this.state.pos < this.state.length) { + const ch = this.state.input.charCodeAt(this.state.pos); switch (ch) { case charCodes.space: case charCodes.nonBreakingSpace: @@ -318,7 +318,8 @@ export default class Tokenizer extends LocationParser { break; case charCodes.carriageReturn: if ( - this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed + this.state.input.charCodeAt(this.state.pos + 1) === + charCodes.lineFeed ) { ++this.state.pos; } @@ -332,7 +333,7 @@ export default class Tokenizer extends LocationParser { break; case charCodes.slash: - switch (this.input.charCodeAt(this.state.pos + 1)) { + switch (this.state.input.charCodeAt(this.state.pos + 1)) { case charCodes.asterisk: this.skipBlockComment(); break; @@ -387,7 +388,7 @@ export default class Tokenizer extends LocationParser { } const nextPos = this.state.pos + 1; - const next = this.input.charCodeAt(nextPos); + const next = this.state.input.charCodeAt(nextPos); if (next >= charCodes.digit0 && next <= charCodes.digit9) { this.raise(this.state.pos, "Unexpected digit after hash token"); } @@ -410,13 +411,13 @@ export default class Tokenizer extends LocationParser { } readToken_dot(): void { - const next = this.input.charCodeAt(this.state.pos + 1); + const next = this.state.input.charCodeAt(this.state.pos + 1); if (next >= charCodes.digit0 && next <= charCodes.digit9) { this.readNumber(true); return; } - const next2 = this.input.charCodeAt(this.state.pos + 2); + const next2 = this.state.input.charCodeAt(this.state.pos + 2); if (next === charCodes.dot && next2 === charCodes.dot) { this.state.pos += 3; this.finishToken(tt.ellipsis); @@ -434,7 +435,7 @@ export default class Tokenizer extends LocationParser { return; } - const next = this.input.charCodeAt(this.state.pos + 1); + const next = this.state.input.charCodeAt(this.state.pos + 1); if (next === charCodes.equalsTo) { this.finishOp(tt.assign, 2); } else { @@ -443,12 +444,12 @@ export default class Tokenizer extends LocationParser { } readToken_interpreter(): boolean { - if (this.state.pos !== 0 || this.state.input.length < 2) return false; + if (this.state.pos !== 0 || this.state.length < 2) return false; const start = this.state.pos; this.state.pos += 1; - let ch = this.input.charCodeAt(this.state.pos); + let ch = this.state.input.charCodeAt(this.state.pos); if (ch !== charCodes.exclamationMark) return false; while ( @@ -456,12 +457,12 @@ export default class Tokenizer extends LocationParser { ch !== charCodes.carriageReturn && ch !== charCodes.lineSeparator && ch !== charCodes.paragraphSeparator && - ++this.state.pos < this.input.length + ++this.state.pos < this.state.length ) { - ch = this.input.charCodeAt(this.state.pos); + ch = this.state.input.charCodeAt(this.state.pos); } - const value = this.input.slice(start + 2, this.state.pos); + const value = this.state.input.slice(start + 2, this.state.pos); this.finishToken(tt.interpreterDirective, value); @@ -472,13 +473,13 @@ export default class Tokenizer extends LocationParser { // '%*' let type = code === charCodes.asterisk ? tt.star : tt.modulo; let width = 1; - let next = this.input.charCodeAt(this.state.pos + 1); + let next = this.state.input.charCodeAt(this.state.pos + 1); const exprAllowed = this.state.exprAllowed; // Exponentiation operator ** if (code === charCodes.asterisk && next === charCodes.asterisk) { width++; - next = this.input.charCodeAt(this.state.pos + 2); + next = this.state.input.charCodeAt(this.state.pos + 2); type = tt.exponent; } @@ -492,10 +493,12 @@ export default class Tokenizer extends LocationParser { readToken_pipe_amp(code: number): void { // '|&' - const next = this.input.charCodeAt(this.state.pos + 1); + const next = this.state.input.charCodeAt(this.state.pos + 1); if (next === code) { - if (this.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo) { + if ( + this.state.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo + ) { this.finishOp(tt.assign, 3); } else { this.finishOp( @@ -531,7 +534,7 @@ export default class Tokenizer extends LocationParser { readToken_caret(): void { // '^' - const next = this.input.charCodeAt(this.state.pos + 1); + const next = this.state.input.charCodeAt(this.state.pos + 1); if (next === charCodes.equalsTo) { this.finishOp(tt.assign, 2); } else { @@ -541,14 +544,17 @@ export default class Tokenizer extends LocationParser { readToken_plus_min(code: number): void { // '+-' - const next = this.input.charCodeAt(this.state.pos + 1); + const next = this.state.input.charCodeAt(this.state.pos + 1); if (next === code) { if ( next === charCodes.dash && !this.inModule && - this.input.charCodeAt(this.state.pos + 2) === charCodes.greaterThan && - lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos)) + this.state.input.charCodeAt(this.state.pos + 2) === + charCodes.greaterThan && + lineBreak.test( + this.state.input.slice(this.state.lastTokEnd, this.state.pos), + ) ) { // A `-->` line comment this.skipLineComment(3); @@ -569,16 +575,20 @@ export default class Tokenizer extends LocationParser { readToken_lt_gt(code: number): void { // '<>' - const next = this.input.charCodeAt(this.state.pos + 1); + const next = this.state.input.charCodeAt(this.state.pos + 1); let size = 1; if (next === code) { size = code === charCodes.greaterThan && - this.input.charCodeAt(this.state.pos + 2) === charCodes.greaterThan + this.state.input.charCodeAt(this.state.pos + 2) === + charCodes.greaterThan ? 3 : 2; - if (this.input.charCodeAt(this.state.pos + size) === charCodes.equalsTo) { + if ( + this.state.input.charCodeAt(this.state.pos + size) === + charCodes.equalsTo + ) { this.finishOp(tt.assign, size + 1); return; } @@ -590,8 +600,8 @@ export default class Tokenizer extends LocationParser { next === charCodes.exclamationMark && code === charCodes.lessThan && !this.inModule && - this.input.charCodeAt(this.state.pos + 2) === charCodes.dash && - this.input.charCodeAt(this.state.pos + 3) === charCodes.dash + this.state.input.charCodeAt(this.state.pos + 2) === charCodes.dash && + this.state.input.charCodeAt(this.state.pos + 3) === charCodes.dash ) { // `"; +const CHANGELOG = path.resolve(GITHUB_WORKSPACE, "CHANGELOG.md"); + +main(); +async function main() { + let [stdin, changelog] = await Promise.all([ + getStdin(), + fs.readFile(CHANGELOG, "utf8"), + ]); + + if (!changelog.includes(INSERTION_POINT)) { + throw new Error(`Missing "${INSERTION_POINT}" in CHANGELOG.md`); + } + + // Remove committers + stdin = stdin.split("\n\n#### Committers")[0]; + changelog = changelog.replace( + INSERTION_POINT, + INSERTION_POINT + "\n" + stdin + ); + + await fs.writeFile(CHANGELOG, changelog); +} diff --git a/.github/main.workflow b/.github/main.workflow index bb88d85128d8..1a6c5a4058d2 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -7,6 +7,11 @@ action "Trigger GitHub release" { uses = "./.github/actions/trigger-github-release/" secrets = ["GITHUB_TOKEN"] + env = { + COMMIT_AUTHOR_NAME = "Babel Bot" + COMMIT_AUTHOR_EMAIL = "babel@hopeinsource.com" + } + # When GitHub Actions will support the "release" event for public # repositories, we won't need these checks anymore. needs = [ diff --git a/CHANGELOG.md b/CHANGELOG.md index ec87f4f4176a..b31d200c469b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ See [CHANGELOG - v4](/.github/CHANGELOG-v4.md), [CHANGELOG - v5](/.github/CHANGE See [CHANGELOG - 6to5](/.github/CHANGELOG-6to5.md) for the pre-4.0.0 version changelog. See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0.0-beta.29 version changelog. + + + ## v7.3.3 (2019-02-15) #### :eyeglasses: Spec Compliancy From 1f6454cc90fe33e0a32260871212e2f719f35741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 25 Feb 2019 19:29:12 +0100 Subject: [PATCH 314/563] v7.3.4 --- lerna.json | 2 +- packages/babel-core/package.json | 10 ++++---- packages/babel-generator/package.json | 6 ++--- .../package.json | 6 ++--- .../babel-helper-replace-supers/package.json | 6 ++--- packages/babel-parser/package.json | 2 +- .../package.json | 6 ++--- .../package.json | 4 ++-- .../package.json | 6 ++--- .../package.json | 4 ++-- .../package.json | 4 ++-- .../package.json | 6 ++--- .../package.json | 4 ++-- .../package.json | 4 ++-- .../package.json | 4 ++-- .../package.json | 10 ++++---- .../babel-preset-env-standalone/package.json | 6 ++--- packages/babel-preset-env/package.json | 16 ++++++------- packages/babel-runtime-corejs2/package.json | 2 +- packages/babel-runtime/package.json | 2 +- packages/babel-standalone/package.json | 24 +++++++++---------- packages/babel-traverse/package.json | 8 +++---- packages/babel-types/package.json | 6 ++--- 23 files changed, 74 insertions(+), 74 deletions(-) diff --git a/lerna.json b/lerna.json index ce4edadaea0a..806b98265731 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "7.3.3", + "version": "7.3.4", "changelog": { "repo": "babel/babel", "cacheDir": ".changelog", diff --git a/packages/babel-core/package.json b/packages/babel-core/package.json index a3820f8a760d..d07beafc0c8b 100644 --- a/packages/babel-core/package.json +++ b/packages/babel-core/package.json @@ -1,6 +1,6 @@ { "name": "@babel/core", - "version": "7.3.3", + "version": "7.3.4", "description": "Babel compiler core.", "main": "lib/index.js", "author": "Sebastian McKenzie ", @@ -34,12 +34,12 @@ }, "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.3.3", + "@babel/generator": "^7.3.4", "@babel/helpers": "^7.2.0", - "@babel/parser": "^7.3.3", + "@babel/parser": "^7.3.4", "@babel/template": "^7.2.2", - "@babel/traverse": "^7.2.2", - "@babel/types": "^7.3.3", + "@babel/traverse": "^7.3.4", + "@babel/types": "^7.3.4", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", diff --git a/packages/babel-generator/package.json b/packages/babel-generator/package.json index ed5860c96e80..85fe45c82400 100644 --- a/packages/babel-generator/package.json +++ b/packages/babel-generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/generator", - "version": "7.3.3", + "version": "7.3.4", "description": "Turns an AST into code.", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "lib" ], "dependencies": { - "@babel/types": "^7.3.3", + "@babel/types": "^7.3.4", "jsesc": "^2.5.1", "lodash": "^4.17.11", "source-map": "^0.5.0", @@ -22,6 +22,6 @@ }, "devDependencies": { "@babel/helper-fixtures": "^7.2.0", - "@babel/parser": "^7.3.3" + "@babel/parser": "^7.3.4" } } diff --git a/packages/babel-helper-create-class-features-plugin/package.json b/packages/babel-helper-create-class-features-plugin/package.json index 81056b4bef10..54f3d95dd86b 100644 --- a/packages/babel-helper-create-class-features-plugin/package.json +++ b/packages/babel-helper-create-class-features-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-create-class-features-plugin", - "version": "7.3.2", + "version": "7.3.4", "author": "The Babel Team (https://babeljs.io/team)", "license": "MIT", "description": "Compile class public and private fields, private methods and decorators to ES6", @@ -18,14 +18,14 @@ "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.2.3", + "@babel/helper-replace-supers": "^7.3.4", "@babel/helper-split-export-declaration": "^7.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" }, "devDependencies": { - "@babel/core": "^7.2.2", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-helper-replace-supers/package.json b/packages/babel-helper-replace-supers/package.json index 309e682b3abe..1bc336576a3a 100644 --- a/packages/babel-helper-replace-supers/package.json +++ b/packages/babel-helper-replace-supers/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-replace-supers", - "version": "7.2.3", + "version": "7.3.4", "description": "Helper function to replace supers", "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-replace-supers", "license": "MIT", @@ -11,7 +11,7 @@ "dependencies": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.2.3", - "@babel/types": "^7.0.0" + "@babel/traverse": "^7.3.4", + "@babel/types": "^7.3.4" } } diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index 555014a52b19..cf31022a2ccc 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/parser", - "version": "7.3.3", + "version": "7.3.4", "description": "A JavaScript parser", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", diff --git a/packages/babel-plugin-proposal-class-properties/package.json b/packages/babel-plugin-proposal-class-properties/package.json index 67b9c5dc1cb0..1ef6ae5a6465 100644 --- a/packages/babel-plugin-proposal-class-properties/package.json +++ b/packages/babel-plugin-proposal-class-properties/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-class-properties", - "version": "7.3.3", + "version": "7.3.4", "description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-class-properties", "license": "MIT", @@ -12,14 +12,14 @@ "babel-plugin" ], "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.3.0", + "@babel/helper-create-class-features-plugin": "^7.3.4", "@babel/helper-plugin-utils": "^7.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.3.3", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-proposal-object-rest-spread/package.json b/packages/babel-plugin-proposal-object-rest-spread/package.json index 5393072d5241..f3154500e817 100644 --- a/packages/babel-plugin-proposal-object-rest-spread/package.json +++ b/packages/babel-plugin-proposal-object-rest-spread/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-object-rest-spread", - "version": "7.3.2", + "version": "7.3.4", "description": "Compile object rest and spread to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-object-rest-spread", "license": "MIT", @@ -19,7 +19,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-proposal-private-methods/package.json b/packages/babel-plugin-proposal-private-methods/package.json index 19677ee72a73..eedfe8ca427b 100644 --- a/packages/babel-plugin-proposal-private-methods/package.json +++ b/packages/babel-plugin-proposal-private-methods/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-proposal-private-methods", - "version": "7.3.2", + "version": "7.3.4", "description": "This plugin transforms private class methods", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-private-methods", "license": "MIT", @@ -12,14 +12,14 @@ "babel-plugin" ], "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.3.2", + "@babel/helper-create-class-features-plugin": "^7.3.4", "@babel/helper-plugin-utils": "^7.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-transform-async-to-generator/package.json b/packages/babel-plugin-transform-async-to-generator/package.json index 315b8fe9eb01..2ebabcc5e44d 100644 --- a/packages/babel-plugin-transform-async-to-generator/package.json +++ b/packages/babel-plugin-transform-async-to-generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-async-to-generator", - "version": "7.2.0", + "version": "7.3.4", "description": "Turn async functions into ES2015 generators", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-async-to-generator", "license": "MIT", @@ -20,7 +20,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-transform-block-scoping/package.json b/packages/babel-plugin-transform-block-scoping/package.json index d33ff7e546ca..8c5e6ce4fb24 100644 --- a/packages/babel-plugin-transform-block-scoping/package.json +++ b/packages/babel-plugin-transform-block-scoping/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-block-scoping", - "version": "7.2.0", + "version": "7.3.4", "description": "Compile ES2015 block scoping (const and let) to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-block-scoping", "license": "MIT", @@ -19,7 +19,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-transform-classes/package.json b/packages/babel-plugin-transform-classes/package.json index f11bd579cafc..6691ee8d0ea0 100644 --- a/packages/babel-plugin-transform-classes/package.json +++ b/packages/babel-plugin-transform-classes/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-classes", - "version": "7.3.3", + "version": "7.3.4", "description": "Compile ES2015 classes to ES5", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-classes", "license": "MIT", @@ -14,7 +14,7 @@ "@babel/helper-function-name": "^7.1.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0", + "@babel/helper-replace-supers": "^7.3.4", "@babel/helper-split-export-declaration": "^7.0.0", "globals": "^11.1.0" }, @@ -25,7 +25,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.3.3", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-transform-flow-strip-types/package.json b/packages/babel-plugin-transform-flow-strip-types/package.json index 765f29d27d92..8a4d321097db 100644 --- a/packages/babel-plugin-transform-flow-strip-types/package.json +++ b/packages/babel-plugin-transform-flow-strip-types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-flow-strip-types", - "version": "7.2.3", + "version": "7.3.4", "description": "Strip flow type annotations from your output code.", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-flow-strip-types", "license": "MIT", @@ -19,7 +19,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-transform-modules-systemjs/package.json b/packages/babel-plugin-transform-modules-systemjs/package.json index c2ba50d968e5..90782b80892e 100644 --- a/packages/babel-plugin-transform-modules-systemjs/package.json +++ b/packages/babel-plugin-transform-modules-systemjs/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-modules-systemjs", - "version": "7.2.0", + "version": "7.3.4", "description": "This plugin transforms ES2015 modules to SystemJS", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-modules-systemjs", "license": "MIT", @@ -19,7 +19,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0" } diff --git a/packages/babel-plugin-transform-regenerator/package.json b/packages/babel-plugin-transform-regenerator/package.json index a0b491feea4f..069c8bd78da9 100644 --- a/packages/babel-plugin-transform-regenerator/package.json +++ b/packages/babel-plugin-transform-regenerator/package.json @@ -2,7 +2,7 @@ "name": "@babel/plugin-transform-regenerator", "author": "Ben Newman ", "description": "Explode async and generator functions into a state machine.", - "version": "7.0.0", + "version": "7.3.4", "homepage": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-regenerator", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-regenerator", "main": "lib/index.js", @@ -17,7 +17,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.0.0", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0" } } diff --git a/packages/babel-plugin-transform-runtime/package.json b/packages/babel-plugin-transform-runtime/package.json index 932aad78f1a1..773794e3d57e 100644 --- a/packages/babel-plugin-transform-runtime/package.json +++ b/packages/babel-plugin-transform-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-transform-runtime", - "version": "7.2.0", + "version": "7.3.4", "description": "Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals", "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime", "license": "MIT", @@ -21,12 +21,12 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.2.0", + "@babel/core": "^7.3.4", "@babel/helper-plugin-test-runner": "^7.0.0", "@babel/helpers": "^7.2.0", - "@babel/plugin-transform-runtime": "^7.2.0", - "@babel/preset-env": "^7.2.0", - "@babel/runtime": "^7.2.0", + "@babel/plugin-transform-runtime": "^7.3.4", + "@babel/preset-env": "^7.3.4", + "@babel/runtime": "^7.3.4", "@babel/template": "^7.0.0", "@babel/types": "7.0.0-beta.53" } diff --git a/packages/babel-preset-env-standalone/package.json b/packages/babel-preset-env-standalone/package.json index dd404a10a445..ece2257a407b 100644 --- a/packages/babel-preset-env-standalone/package.json +++ b/packages/babel-preset-env-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/preset-env-standalone", - "version": "7.3.3", + "version": "7.3.4", "description": "Standalone build of babel-prest-env for use in non-Node.js environments.", "main": "babel-preset-env.js", "files": [ @@ -12,8 +12,8 @@ "@babel/plugin-proposal-json-strings": "^7.0.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", "@babel/plugin-transform-new-target": "^7.0.0", - "@babel/preset-env": "^7.3.1", - "@babel/standalone": "^7.3.3" + "@babel/preset-env": "^7.3.4", + "@babel/standalone": "^7.3.4" }, "keywords": [ "babel", diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index 8106cdf0a094..234208b68a99 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -1,6 +1,6 @@ { "name": "@babel/preset-env", - "version": "7.3.1", + "version": "7.3.4", "description": "A Babel preset for each environment.", "author": "Henry Zhu ", "homepage": "https://babeljs.io/", @@ -18,7 +18,7 @@ "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.3.1", + "@babel/plugin-proposal-object-rest-spread": "^7.3.4", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", "@babel/plugin-syntax-async-generators": "^7.2.0", @@ -26,10 +26,10 @@ "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.2.0", + "@babel/plugin-transform-async-to-generator": "^7.3.4", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.2.0", - "@babel/plugin-transform-classes": "^7.2.0", + "@babel/plugin-transform-block-scoping": "^7.3.4", + "@babel/plugin-transform-classes": "^7.3.4", "@babel/plugin-transform-computed-properties": "^7.2.0", "@babel/plugin-transform-destructuring": "^7.2.0", "@babel/plugin-transform-dotall-regex": "^7.2.0", @@ -40,13 +40,13 @@ "@babel/plugin-transform-literals": "^7.2.0", "@babel/plugin-transform-modules-amd": "^7.2.0", "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/plugin-transform-modules-systemjs": "^7.2.0", + "@babel/plugin-transform-modules-systemjs": "^7.3.4", "@babel/plugin-transform-modules-umd": "^7.2.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", "@babel/plugin-transform-new-target": "^7.0.0", "@babel/plugin-transform-object-super": "^7.2.0", "@babel/plugin-transform-parameters": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.0.0", + "@babel/plugin-transform-regenerator": "^7.3.4", "@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-spread": "^7.2.0", "@babel/plugin-transform-sticky-regex": "^7.2.0", @@ -63,7 +63,7 @@ }, "devDependencies": { "@babel/cli": "^7.2.3", - "@babel/core": "^7.2.0", + "@babel/core": "^7.3.4", "@babel/helper-fixtures": "^7.2.0", "@babel/helper-plugin-test-runner": "^7.0.0", "caniuse-db": "1.0.30000851", diff --git a/packages/babel-runtime-corejs2/package.json b/packages/babel-runtime-corejs2/package.json index 6bfa58204018..e2c4304aecac 100644 --- a/packages/babel-runtime-corejs2/package.json +++ b/packages/babel-runtime-corejs2/package.json @@ -1,6 +1,6 @@ { "name": "@babel/runtime-corejs2", - "version": "7.3.1", + "version": "7.3.4", "description": "babel's modular runtime helpers with core-js@2 polyfilling", "license": "MIT", "publishConfig": { diff --git a/packages/babel-runtime/package.json b/packages/babel-runtime/package.json index 678b6ae4d616..b0b406145355 100644 --- a/packages/babel-runtime/package.json +++ b/packages/babel-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@babel/runtime", - "version": "7.3.1", + "version": "7.3.4", "description": "babel's modular runtime helpers", "license": "MIT", "publishConfig": { diff --git a/packages/babel-standalone/package.json b/packages/babel-standalone/package.json index 3fa63ee985b3..f3108bab07de 100644 --- a/packages/babel-standalone/package.json +++ b/packages/babel-standalone/package.json @@ -1,6 +1,6 @@ { "name": "@babel/standalone", - "version": "7.3.3", + "version": "7.3.4", "description": "Standalone build of Babel for use in non-Node.js environments.", "main": "babel.js", "files": [ @@ -9,11 +9,11 @@ "src" ], "devDependencies": { - "@babel/core": "^7.3.3", + "@babel/core": "^7.3.4", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-external-helpers": "^7.2.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", - "@babel/plugin-proposal-class-properties": "^7.3.3", + "@babel/plugin-proposal-class-properties": "^7.3.4", "@babel/plugin-proposal-decorators": "^7.3.0", "@babel/plugin-proposal-do-expressions": "^7.2.0", "@babel/plugin-proposal-export-default-from": "^7.2.0", @@ -24,11 +24,11 @@ "@babel/plugin-proposal-logical-assignment-operators": "^7.2.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.2.0", "@babel/plugin-proposal-numeric-separator": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.3.2", + "@babel/plugin-proposal-object-rest-spread": "^7.3.4", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-optional-chaining": "^7.2.0", "@babel/plugin-proposal-pipeline-operator": "^7.3.2", - "@babel/plugin-proposal-private-methods": "^7.3.2", + "@babel/plugin-proposal-private-methods": "^7.3.4", "@babel/plugin-proposal-throw-expressions": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", "@babel/plugin-syntax-async-generators": "^7.2.0", @@ -48,17 +48,17 @@ "@babel/plugin-syntax-pipeline-operator": "^7.3.0", "@babel/plugin-syntax-typescript": "^7.3.3", "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.2.0", + "@babel/plugin-transform-async-to-generator": "^7.3.4", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.2.0", - "@babel/plugin-transform-classes": "^7.3.3", + "@babel/plugin-transform-block-scoping": "^7.3.4", + "@babel/plugin-transform-classes": "^7.3.4", "@babel/plugin-transform-computed-properties": "^7.2.0", "@babel/plugin-transform-destructuring": "^7.3.2", "@babel/plugin-transform-dotall-regex": "^7.2.0", "@babel/plugin-transform-duplicate-keys": "^7.2.0", "@babel/plugin-transform-exponentiation-operator": "^7.2.0", "@babel/plugin-transform-flow-comments": "^7.2.0", - "@babel/plugin-transform-flow-strip-types": "^7.2.3", + "@babel/plugin-transform-flow-strip-types": "^7.3.4", "@babel/plugin-transform-for-of": "^7.2.0", "@babel/plugin-transform-function-name": "^7.2.0", "@babel/plugin-transform-instanceof": "^7.2.0", @@ -67,7 +67,7 @@ "@babel/plugin-transform-member-expression-literals": "^7.2.0", "@babel/plugin-transform-modules-amd": "^7.2.0", "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/plugin-transform-modules-systemjs": "^7.2.0", + "@babel/plugin-transform-modules-systemjs": "^7.3.4", "@babel/plugin-transform-modules-umd": "^7.2.0", "@babel/plugin-transform-new-target": "^7.0.0", "@babel/plugin-transform-object-assign": "^7.2.0", @@ -84,8 +84,8 @@ "@babel/plugin-transform-react-jsx-compat": "^7.2.0", "@babel/plugin-transform-react-jsx-self": "^7.2.0", "@babel/plugin-transform-react-jsx-source": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.2.0", + "@babel/plugin-transform-regenerator": "^7.3.4", + "@babel/plugin-transform-runtime": "^7.3.4", "@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-spread": "^7.2.2", "@babel/plugin-transform-sticky-regex": "^7.2.0", diff --git a/packages/babel-traverse/package.json b/packages/babel-traverse/package.json index 993535f4aa4c..e71adbc215c1 100644 --- a/packages/babel-traverse/package.json +++ b/packages/babel-traverse/package.json @@ -1,6 +1,6 @@ { "name": "@babel/traverse", - "version": "7.2.3", + "version": "7.3.4", "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -12,11 +12,11 @@ "main": "lib/index.js", "dependencies": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.2.2", + "@babel/generator": "^7.3.4", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.3", - "@babel/types": "^7.2.2", + "@babel/parser": "^7.3.4", + "@babel/types": "^7.3.4", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.11" diff --git a/packages/babel-types/package.json b/packages/babel-types/package.json index b88f576df2fd..f402356a1b03 100644 --- a/packages/babel-types/package.json +++ b/packages/babel-types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/types", - "version": "7.3.3", + "version": "7.3.4", "description": "Babel Types is a Lodash-esque utility library for AST nodes", "author": "Sebastian McKenzie ", "homepage": "https://babeljs.io/", @@ -14,7 +14,7 @@ "to-fast-properties": "^2.0.0" }, "devDependencies": { - "@babel/generator": "^7.3.3", - "@babel/parser": "^7.3.3" + "@babel/generator": "^7.3.4", + "@babel/parser": "^7.3.4" } } From 918f149a6385f2c59fffabe7bb558724aacdb217 Mon Sep 17 00:00:00 2001 From: Babel Bot Date: Mon, 25 Feb 2019 18:37:14 +0000 Subject: [PATCH 315/563] Add v7.3.4 to CHANGELOG.md [skip ci] --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b31d200c469b..f0a65682a747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,34 @@ See [Babylon's CHANGELOG](packages/babylon/CHANGELOG.md) for the Babylon pre-7.0 +## v7.3.4 (2019-02-25) + +#### :bug: Bug Fix +* `babel-parser` + * [#9572](https://github.com/babel/babel/pull/9572) Fix TypeScript parsers missing token check (#9571) ([@elevatebart](https://github.com/elevatebart)) + * [#9521](https://github.com/babel/babel/pull/9521) Also check AssignmentPatterns for duplicate export name ([@danez](https://github.com/danez)) +* `babel-helper-create-class-features-plugin`, `babel-helper-replace-supers`, `babel-plugin-proposal-class-properties`, `babel-traverse` + * [#9508](https://github.com/babel/babel/pull/9508) Use correct "this" in static fields ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-preset-env` + * [#9566](https://github.com/babel/babel/pull/9566) Closes [#9465](https://github.com/babel/babel/issues/9465) ([@zloirock](https://github.com/zloirock)) +* `babel-types` + * [#9539](https://github.com/babel/babel/pull/9539) babel-types is* type checks accept null | undefiend as value TS type ([@ian-craig](https://github.com/ian-craig)) +* `babel-plugin-transform-block-scoping`, `babel-traverse` + * [#9532](https://github.com/babel/babel/pull/9532) Migrate some duplicate binding tests to traverse ([@danez](https://github.com/danez)) +* `babel-generator` + * [#9524](https://github.com/babel/babel/pull/9524) Fix typescript generator params ([@tanhauhau](https://github.com/tanhauhau)) + * [#9523](https://github.com/babel/babel/pull/9523) Fix flow babel-generator function parantheses ([@tanhauhau](https://github.com/tanhauhau)) + +#### :house: Internal +* Other + * [#9561](https://github.com/babel/babel/pull/9561) Update CHANGELOG.md using the "Trigger GitHub release" action ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) +* `babel-plugin-proposal-object-rest-spread`, `babel-plugin-transform-modules-systemjs` + * [#9541](https://github.com/babel/babel/pull/9541) Enable eqeqeq rule in eslint ([@danez](https://github.com/danez)) +* `babel-generator`, `babel-parser`, `babel-plugin-transform-flow-strip-types`, `babel-traverse` + * [#9522](https://github.com/babel/babel/pull/9522) Make tests spec compliant by avoiding duplicate declarations in input files ([@danez](https://github.com/danez)) +* `babel-plugin-transform-proto-to-assign` + * [#9533](https://github.com/babel/babel/pull/9533) Add import/no-extraneous-dependencies to ESLint ([@nicolo-ribaudo](https://github.com/nicolo-ribaudo)) + ## v7.3.3 (2019-02-15) #### :eyeglasses: Spec Compliancy From a7391144b3db8cb3b360ecd6fb32a681e8ef9e98 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 25 Feb 2019 11:04:52 -0800 Subject: [PATCH 316/563] Introduce scope tracking in the parser (#9493) * Introduce scope tracking * Fix tests * Add new tests * Remove constructor-super check from transform as it is now in parser * Correctly handle class properties and class scope * Fix duplicate name check * Convert scope identifier storage to array * Enter a new scope in typescript module blocks * Add test for duplicate declaration * Rename error for duplicate exports * Treat class declarations as lexical declaration * Update whitelist * Add tests * Fix scope tracking for function declarations * Migrate try-catch duplicate error * Fix test * More tests * One more test * Make scope a separate class and fix review comments * Do not allow new.target in top scope arrow function * Correctly enter new scope for declare module and treat type aliases as lexical declarations * Tests for typescript scope tracking to not mark type aliases as duplicate * Fix flow scope tracking * Remove ident from test names as redundant * Add test case for var and function * Improve error messages * Improve literal regex --- .../fixtures/flow/declare-exports/input.js | 8 +- .../fixtures/flow/declare-exports/output.js | 8 +- .../fixtures/flow/def-site-variance/input.js | 8 +- .../fixtures/flow/def-site-variance/output.js | 8 +- .../test/fixtures/flow/internal-slot/input.js | 10 +- .../fixtures/flow/internal-slot/output.js | 12 +- .../flow/object-literal-types/input.js | 18 +- .../flow/object-literal-types/output.js | 18 +- .../fixtures/flow/opaque-type-alias/input.js | 2 +- .../fixtures/flow/opaque-type-alias/output.js | 2 +- .../test/fixtures/flow/type-alias/input.js | 2 +- .../test/fixtures/flow/type-alias/output.js | 2 +- packages/babel-parser/src/parser/base.js | 2 + .../babel-parser/src/parser/expression.js | 202 ++++--- packages/babel-parser/src/parser/index.js | 4 + packages/babel-parser/src/parser/lval.js | 35 +- packages/babel-parser/src/parser/statement.js | 291 +++++---- packages/babel-parser/src/parser/util.js | 18 +- packages/babel-parser/src/plugins/estree.js | 14 +- packages/babel-parser/src/plugins/flow.js | 44 +- .../babel-parser/src/plugins/typescript.js | 43 +- .../babel-parser/src/tokenizer/context.js | 2 +- packages/babel-parser/src/tokenizer/state.js | 6 +- packages/babel-parser/src/util/scope.js | 160 +++++ packages/babel-parser/src/util/scopeflags.js | 52 ++ .../fail/7/options.json | 2 +- .../invalid-fn-decl-inside-loop/options.json | 2 +- .../options.json | 2 +- .../scope/dupl-bind-catch-arr-destr/input.js | 3 + .../dupl-bind-catch-arr-destr/options.json | 3 + .../scope/dupl-bind-catch-dbl-let/input.js | 1 + .../dupl-bind-catch-dbl-let/options.json | 3 + .../core/scope/dupl-bind-catch-func/input.js | 4 + .../scope/dupl-bind-catch-func/options.json | 3 + .../scope/dupl-bind-catch-hang-func/input.js | 4 + .../dupl-bind-catch-hang-func/output.json | 207 +++++++ .../dupl-bind-catch-let-outside/input.js | 4 + .../dupl-bind-catch-let-outside/output.json | 169 ++++++ .../core/scope/dupl-bind-catch-let/input.js | 4 + .../scope/dupl-bind-catch-let/options.json | 3 + .../scope/dupl-bind-catch-obj-destr/input.js | 3 + .../dupl-bind-catch-obj-destr/options.json | 3 + .../dupl-bind-catch-var-arr-destr/input.js | 4 + .../options.json | 3 + .../scope/dupl-bind-catch-var-nested/input.js | 7 + .../dupl-bind-catch-var-nested/output.json | 254 ++++++++ .../dupl-bind-catch-var-obj-destr/input.js | 4 + .../options.json | 3 + .../dupl-bind-catch-var-outside/input.js | 4 + .../dupl-bind-catch-var-outside/output.json | 169 ++++++ .../core/scope/dupl-bind-catch-var/input.js | 4 + .../scope/dupl-bind-catch-var/output.json | 170 ++++++ .../core/scope/dupl-bind-class-class/input.js | 2 + .../scope/dupl-bind-class-class/options.json | 3 + .../core/scope/dupl-bind-class-const/input.js | 2 + .../scope/dupl-bind-class-const/options.json | 3 + .../core/scope/dupl-bind-class-func/input.js | 2 + .../scope/dupl-bind-class-func/options.json | 3 + .../core/scope/dupl-bind-class-let/input.js | 2 + .../scope/dupl-bind-class-let/options.json | 3 + .../core/scope/dupl-bind-class-var/input.js | 2 + .../scope/dupl-bind-class-var/options.json | 3 + .../core/scope/dupl-bind-const-const/input.js | 1 + .../scope/dupl-bind-const-const/options.json | 3 + .../core/scope/dupl-bind-func-gen/input.js | 1 + .../scope/dupl-bind-func-gen/options.json | 3 + .../dupl-bind-func-module-sloppy/input.js | 1 + .../dupl-bind-func-module-sloppy/options.json | 4 + .../core/scope/dupl-bind-func-module/input.js | 2 + .../scope/dupl-bind-func-module/options.json | 4 + .../dupl-bind-func-script-sloppy/input.js | 1 + .../dupl-bind-func-script-sloppy/options.json | 3 + .../dupl-bind-func-script-sloppy/output.json | 157 +++++ .../core/scope/dupl-bind-func-script/input.js | 2 + .../scope/dupl-bind-func-script/options.json | 3 + .../scope/dupl-bind-func-script/output.json | 139 +++++ .../scope/dupl-bind-func-var-sloppy/input.js | 4 + .../dupl-bind-func-var-sloppy/options.json | 3 + .../core/scope/dupl-bind-func-var/input.js | 2 + .../core/scope/dupl-bind-func-var/output.json | 157 +++++ .../core/scope/dupl-bind-gen-func/input.js | 1 + .../scope/dupl-bind-gen-func/options.json | 3 + .../scope/dupl-bind-gen-gen-script/input.js | 2 + .../dupl-bind-gen-gen-script/options.json | 3 + .../dupl-bind-gen-gen-script/output.json | 169 ++++++ .../core/scope/dupl-bind-let-let/input.js | 1 + .../core/scope/dupl-bind-let-let/options.json | 3 + .../scope/dupl-bind-nested-let-var/input.js | 4 + .../dupl-bind-nested-let-var/options.json | 3 + .../scope/dupl-bind-nested-var-let/input.js | 4 + .../dupl-bind-nested-var-let/output.json | 173 ++++++ .../core/scope/dupl-bind-var-var/input.js | 1 + .../core/scope/dupl-bind-var-var/output.json | 119 ++++ .../fixtures/core/scope/let-assign/input.js | 1 + .../core/scope/let-assign/output.json | 173 ++++++ .../core/uncategorised/401/options.json | 2 +- .../core/uncategorised/402/options.json | 2 +- .../core/uncategorised/403/options.json | 2 +- .../core/uncategorised/404/options.json | 2 +- .../core/uncategorised/514/options.json | 2 +- .../core/uncategorised/517/options.json | 2 +- .../core/uncategorised/518/options.json | 2 +- .../core/uncategorised/519/options.json | 2 +- .../options.json | 2 +- .../generators/invalid-hanging/input.js | 1 + .../generators/invalid-hanging/options.json | 3 + .../meta-properties/expression/input.js | 3 + .../meta-properties/expression/output.json | 186 ++++++ .../invalid-arrow-function/input.js | 3 + .../invalid-arrow-function/options.json | 3 + .../nested-arrow-function/input.js | 1 + .../nested-arrow-function/output.json | 171 ++++++ .../es2015/meta-properties/statement/input.js | 3 + .../meta-properties/statement/output.json | 152 +++++ .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../options.json | 2 +- .../label-invalid-const/options.json | 2 +- .../label-invalid-func-async/options.json | 2 +- .../label-invalid-func-generator/options.json | 2 +- .../label-invalid-func-strict/options.json | 2 +- .../es2015/uncategorised/123/options.json | 3 + .../es2015/uncategorised/123/output.json | 243 -------- .../es2015/uncategorised/166/options.json | 3 + .../es2015/uncategorised/166/output.json | 177 ------ .../es2015/uncategorised/226/options.json | 2 +- .../es2015/uncategorised/228/options.json | 2 +- .../es2015/uncategorised/248/options.json | 2 +- .../es2015/uncategorised/280/options.json | 2 +- .../es2015/uncategorised/281/options.json | 2 +- .../es2015/uncategorised/329/options.json | 2 +- .../input.js | 9 + .../output.json | 552 +++++++++++++++++ .../array-pattern-default/options.json | 2 +- .../array-pattern/options.json | 2 +- .../arrow-function/options.json | 2 +- .../async-arrow-function/options.json | 2 +- .../async-function/options.json | 2 +- .../default/options.json | 2 +- .../generator-function/options.json | 2 +- .../generator-method/options.json | 2 +- .../simple-parameter-list/method/options.json | 2 +- .../object-pattern-default/options.json | 2 +- .../object-pattern/options.json | 2 +- .../simple-parameter-list/rest/options.json | 2 +- .../invalid-inside-loop/options.json | 2 +- .../es2018/object-rest-spread/11/options.json | 2 +- .../es2018/object-rest-spread/12/options.json | 2 +- .../es2018/object-rest-spread/13/options.json | 2 +- .../es2018/object-rest-spread/14/options.json | 2 +- .../es2018/object-rest-spread/15/options.json | 2 +- .../dupe-param/options.json | 2 +- .../invalid-dup-param/options.json | 2 +- .../dupe-param-1/options.json | 2 +- .../dupe-param-2/options.json | 2 +- .../dupe-param-3/options.json | 2 +- .../patterned-catch-dupe/input.js | 1 - .../patterned-catch-dupe/options.json | 3 - .../options.json | 2 +- .../invalid-duplicated-params/options.json | 2 +- .../invalid-syntax/migrated_0092/options.json | 2 +- .../invalid-syntax/migrated_0093/options.json | 2 +- .../invalid-syntax/migrated_0142/options.json | 2 +- .../invalid-syntax/migrated_0240/options.json | 2 +- .../invalid-syntax/migrated_0243/options.json | 2 +- .../invalid-syntax/migrated_0244/options.json | 2 +- .../invalid-syntax/migrated_0245/options.json | 2 +- .../invalid-syntax/migrated_0249/options.json | 2 +- .../super-call/options.json | 2 +- .../class-properties/super-call/options.json | 2 +- .../flow/declare-statements/15/input.js | 2 +- .../flow/declare-statements/15/output.json | 76 +-- .../.dupl-decl-const-declare-class/input.js | 2 + .../options.json | 3 + .../input.js | 2 + .../options.json | 3 + .../scope/.dupl-decl-const-interface/input.js | 2 + .../.dupl-decl-const-interface/options.json | 3 + .../input.js | 2 + .../input.js | 2 + .../options.json | 3 + .../input.js | 2 + .../output.json | 197 +++++++ .../input.js | 2 + .../options.json | 3 + .../.dupl-decl-declare-func-func/input.js | 2 + .../.dupl-decl-declare-func-func/options.json | 3 + .../.dupl-decl-declare-func-let/input.js | 2 + .../.dupl-decl-declare-func-let/options.json | 3 + .../input.js | 2 + .../options.json | 3 + .../input.js | 2 + .../output.json | 159 +++++ .../scope/.dupl-decl-declare-var-let/input.js | 2 + .../.dupl-decl-declare-var-let/options.json | 3 + .../.dupl-decl-interface-interface/input.js | 2 + .../options.json | 3 + .../.dupl-decl-let-declare-class/input.js | 2 + .../.dupl-decl-let-declare-class/options.json | 3 + .../.dupl-decl-let-declare-interface/input.js | 2 + .../options.json | 3 + .../scope/.dupl-decl-let-interface/input.js | 2 + .../.dupl-decl-let-interface/options.json | 3 + .../scope/.dupl-decl-type-interface/input.js | 2 + .../.dupl-decl-type-interface/options.json | 3 + .../.dupl-decl-var-declare-class/input.js | 2 + .../.dupl-decl-var-declare-class/options.json | 3 + .../.dupl-decl-var-declare-interface/input.js | 2 + .../options.json | 3 + .../scope/.dupl-decl-var-interface/input.js | 2 + .../.dupl-decl-var-interface/options.json | 3 + .../flow/scope/declare-module/input.js | 5 + .../flow/scope/declare-module/output.json | 190 ++++++ .../dupl-decl-const-opaque-type/input.js | 2 + .../dupl-decl-const-opaque-type/options.json | 3 + .../flow/scope/dupl-decl-const-type/input.js | 2 + .../scope/dupl-decl-const-type/options.json | 3 + .../scope/dupl-decl-let-opaque-type/input.js | 2 + .../dupl-decl-let-opaque-type/options.json | 3 + .../flow/scope/dupl-decl-let-type/input.js | 2 + .../scope/dupl-decl-let-type/options.json | 3 + .../dupl-decl-opaque-type-const/input.js | 2 + .../dupl-decl-opaque-type-const/options.json | 3 + .../scope/dupl-decl-opaque-type-let/input.js | 2 + .../dupl-decl-opaque-type-let/options.json | 3 + .../input.js | 2 + .../options.json | 3 + .../scope/dupl-decl-opaque-type-type/input.js | 2 + .../dupl-decl-opaque-type-type/options.json | 3 + .../scope/dupl-decl-opaque-type-var/input.js | 2 + .../dupl-decl-opaque-type-var/options.json | 3 + .../flow/scope/dupl-decl-type-const/input.js | 2 + .../scope/dupl-decl-type-const/options.json | 3 + .../flow/scope/dupl-decl-type-let/input.js | 2 + .../scope/dupl-decl-type-let/options.json | 3 + .../scope/dupl-decl-type-opaque-type/input.js | 2 + .../dupl-decl-type-opaque-type/options.json | 3 + .../flow/scope/dupl-decl-type-type/input.js | 2 + .../scope/dupl-decl-type-type/options.json | 3 + .../flow/scope/dupl-decl-type-var/input.js | 2 + .../scope/dupl-decl-type-var/options.json | 3 + .../scope/dupl-decl-var-opaque-type/input.js | 2 + .../dupl-decl-var-opaque-type/options.json | 3 + .../flow/scope/dupl-decl-var-type/input.js | 2 + .../scope/dupl-decl-var-type/options.json | 3 + .../sourcetype-script/export-named/input.js | 2 +- .../export-named/output.json | 32 +- .../flow/type-annotations/builtin/input.js | 26 +- .../flow/type-annotations/builtin/output.json | 340 +++++------ .../object-type-method/input.js | 18 +- .../object-type-method/output.json | 556 +++++++++--------- .../scope/no-dupl-decl-type-const/input.js | 2 + .../scope/no-dupl-decl-type-const/output.json | 152 +++++ .../scope/no-dupl-decl-type-let/input.js | 2 + .../scope/no-dupl-decl-type-let/output.json | 152 +++++ .../scope/no-dupl-decl-type-var/input.js | 2 + .../scope/no-dupl-decl-type-var/output.json | 152 +++++ .../src/transformClass.js | 23 - .../input.js | 5 - .../options.json | 4 - .../options.json | 2 +- .../flow-comments/export-type-alias/input.js | 4 +- .../flow-comments/export-type-alias/output.js | 4 +- .../strip-types/def-site-variance/input.js | 8 +- .../strip-opaque-type-alias/input.js | 6 +- .../strip-types/strip-type-alias/input.js | 2 +- .../fixtures/errors/new-target-arrow/input.js | 5 - .../errors/new-target-arrow/options.json | 4 - scripts/tests/test262/test262_whitelist.txt | 370 ------------ 284 files changed, 5792 insertions(+), 1730 deletions(-) create mode 100644 packages/babel-parser/src/util/scope.js create mode 100644 packages/babel-parser/src/util/scopeflags.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-hang-func/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-hang-func/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let-outside/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let-outside/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-nested/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-nested/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-outside/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-outside/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-var-let/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-var-let/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-var-var/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-var-var/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/let-assign/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/let-assign/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/expression/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/expression/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/nested-arrow-function/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/nested-arrow-function/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/statement/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/statement/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/123/options.json delete mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/123/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/166/options.json delete mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/166/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/yield/accessor-name-inst-computed-yield-expr/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/yield/accessor-name-inst-computed-yield-expr/output.json delete mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/input.js delete mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-class/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-class/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-class/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-func/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-func/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-var/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-var/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-func/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-func/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-let/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-let/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-interface-declare-class/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-interface-declare-class/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-declare-var/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-declare-var/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-let/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-let/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-interface-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-interface-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-class/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-class/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-type-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-type-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-class/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-class/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-interface/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-interface/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/declare-module/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/declare-module/output.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-opaque-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-opaque-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-opaque-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-opaque-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-const/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-const/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-let/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-let/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-opaque-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-opaque-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-var/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-var/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-const/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-const/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-let/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-let/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-opaque-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-opaque-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-var/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-var/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-opaque-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-opaque-type/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-type/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-type/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-const/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-const/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-let/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-let/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-var/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-var/output.json delete mode 100644 packages/babel-plugin-transform-classes/test/fixtures/spec/super-call-only-allowed-in-derived-constructor/input.js delete mode 100644 packages/babel-plugin-transform-classes/test/fixtures/spec/super-call-only-allowed-in-derived-constructor/options.json delete mode 100644 packages/babel-plugin-transform-new-target/test/fixtures/errors/new-target-arrow/input.js delete mode 100644 packages/babel-plugin-transform-new-target/test/fixtures/errors/new-target-arrow/options.json diff --git a/packages/babel-generator/test/fixtures/flow/declare-exports/input.js b/packages/babel-generator/test/fixtures/flow/declare-exports/input.js index ea4a8c7cd463..279e6ab4f9f9 100644 --- a/packages/babel-generator/test/fixtures/flow/declare-exports/input.js +++ b/packages/babel-generator/test/fixtures/flow/declare-exports/input.js @@ -24,9 +24,9 @@ declare module B { } declare module "foo" { declare export type * from "bar"; } -declare export opaque type Foo; +declare export opaque type Foo1; declare export opaque type Bar; declare export opaque type Baz: Foo; -declare export opaque type Foo: Bar; -declare export opaque type Foo: Bar; -declare export opaque type Foo: Bar; +declare export opaque type Foo3: Bar; +declare export opaque type Foo4: Bar; +declare export opaque type Foo5: Bar; diff --git a/packages/babel-generator/test/fixtures/flow/declare-exports/output.js b/packages/babel-generator/test/fixtures/flow/declare-exports/output.js index da22c014154d..877c43099415 100644 --- a/packages/babel-generator/test/fixtures/flow/declare-exports/output.js +++ b/packages/babel-generator/test/fixtures/flow/declare-exports/output.js @@ -33,9 +33,9 @@ declare module B { declare module "foo" { declare export type * from "bar"; } -declare export opaque type Foo; +declare export opaque type Foo1; declare export opaque type Bar; declare export opaque type Baz: Foo; -declare export opaque type Foo: Bar; -declare export opaque type Foo: Bar; -declare export opaque type Foo: Bar; \ No newline at end of file +declare export opaque type Foo3: Bar; +declare export opaque type Foo4: Bar; +declare export opaque type Foo5: Bar; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/flow/def-site-variance/input.js b/packages/babel-generator/test/fixtures/flow/def-site-variance/input.js index 5cda68f8e9c5..9f00e80993d1 100644 --- a/packages/babel-generator/test/fixtures/flow/def-site-variance/input.js +++ b/packages/babel-generator/test/fixtures/flow/def-site-variance/input.js @@ -1,10 +1,10 @@ class C1<+T, -U> {} function f<+T, -U>() {} type T<+T, -U> = {}; -type T = { +p: T }; -type T = { -p: T }; -type T = { +[k:K]: V }; -type T = { -[k:K]: V }; +type T2 = { +p: T }; +type T3 = { -p: T }; +type T4 = { +[k:K]: V }; +type T5 = { -[k:K]: V }; interface I { +p: T } interface I { -p: T } interface I { +[k:K]: V } diff --git a/packages/babel-generator/test/fixtures/flow/def-site-variance/output.js b/packages/babel-generator/test/fixtures/flow/def-site-variance/output.js index e411f4646133..5c2b69d1a6dd 100644 --- a/packages/babel-generator/test/fixtures/flow/def-site-variance/output.js +++ b/packages/babel-generator/test/fixtures/flow/def-site-variance/output.js @@ -3,16 +3,16 @@ class C1<+T, -U> {} function f<+T, -U>() {} type T<+T, -U> = {}; -type T = { +type T2 = { +p: T }; -type T = { +type T3 = { -p: T }; -type T = { +type T4 = { +[k: K]: V }; -type T = { +type T5 = { -[k: K]: V }; interface I { diff --git a/packages/babel-generator/test/fixtures/flow/internal-slot/input.js b/packages/babel-generator/test/fixtures/flow/internal-slot/input.js index 7888fc6cb43e..b00d3bd76f22 100644 --- a/packages/babel-generator/test/fixtures/flow/internal-slot/input.js +++ b/packages/babel-generator/test/fixtures/flow/internal-slot/input.js @@ -1,7 +1,7 @@ declare class C { static [[foo]]: T } declare class C { [[foo]]: T } -interface T { [[foo]]: X } -interface T { [[foo]](): X } -type T = { [[foo]]: X } -type T = { [[foo]](): X } -type T = { [[foo]]?: X } +interface I { [[foo]]: X } +interface I { [[foo]](): X } +type T1 = { [[foo]]: X } +type T2 = { [[foo]](): X } +type T3 = { [[foo]]?: X } diff --git a/packages/babel-generator/test/fixtures/flow/internal-slot/output.js b/packages/babel-generator/test/fixtures/flow/internal-slot/output.js index a8c375a2c456..2a48fb9f186a 100644 --- a/packages/babel-generator/test/fixtures/flow/internal-slot/output.js +++ b/packages/babel-generator/test/fixtures/flow/internal-slot/output.js @@ -4,18 +4,18 @@ declare class C { declare class C { [[foo]]: T } -interface T { +interface I { [[foo]]: X } -interface T { +interface I { [[foo]]() => X } -type T = { +type T1 = { [[foo]]: X }; -type T = { +type T2 = { [[foo]]() => X }; -type T = { +type T3 = { [[foo]]?: X -}; +}; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/flow/object-literal-types/input.js b/packages/babel-generator/test/fixtures/flow/object-literal-types/input.js index 6d747ee65e10..f3139a94e350 100644 --- a/packages/babel-generator/test/fixtures/flow/object-literal-types/input.js +++ b/packages/babel-generator/test/fixtures/flow/object-literal-types/input.js @@ -1,11 +1,11 @@ type U = {}; type V = {}; -type T = { ...U, }; -type T = { ...U, ...V }; -type T = { p: V, ...U }; -type T = { ...U, p: V, }; -type T = { ...{}|{ p: V, }}; -type T = { foo(): number } -type T = { foo: () => number } -type T = { [string]: U }; -type T = { [param: string]: U }; +type T1 = { ...U, }; +type T2 = { ...U, ...V }; +type T3 = { p: V, ...U }; +type T4 = { ...U, p: V, }; +type T5 = { ...{}|{ p: V, }}; +type T6 = { foo(): number } +type T7 = { foo: () => number } +type T8 = { [string]: U }; +type T9 = { [param: string]: U }; diff --git a/packages/babel-generator/test/fixtures/flow/object-literal-types/output.js b/packages/babel-generator/test/fixtures/flow/object-literal-types/output.js index 952f62e3022e..5c02e095e3fa 100644 --- a/packages/babel-generator/test/fixtures/flow/object-literal-types/output.js +++ b/packages/babel-generator/test/fixtures/flow/object-literal-types/output.js @@ -1,30 +1,30 @@ type U = {}; type V = {}; -type T = { ...U +type T1 = { ...U }; -type T = { ...U, +type T2 = { ...U, ...V, }; -type T = { +type T3 = { p: V, ...U, }; -type T = { ...U, +type T4 = { ...U, p: V, }; -type T = { ...{} | { +type T5 = { ...{} | { p: V } }; -type T = { +type T6 = { foo(): number }; -type T = { +type T7 = { foo: () => number }; -type T = { +type T8 = { [string]: U }; -type T = { +type T9 = { [param: string]: U }; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/flow/opaque-type-alias/input.js b/packages/babel-generator/test/fixtures/flow/opaque-type-alias/input.js index 1988fcaeed71..3e77fce2b1ca 100644 --- a/packages/babel-generator/test/fixtures/flow/opaque-type-alias/input.js +++ b/packages/babel-generator/test/fixtures/flow/opaque-type-alias/input.js @@ -1,7 +1,7 @@ opaque type ID = string; opaque type Foo = Bar; opaque type Maybe = _Maybe; -export opaque type Foo = number; +export opaque type Foo2 = number; opaque type union = | {type: "A"} diff --git a/packages/babel-generator/test/fixtures/flow/opaque-type-alias/output.js b/packages/babel-generator/test/fixtures/flow/opaque-type-alias/output.js index b4f20f2d705e..293f54010947 100644 --- a/packages/babel-generator/test/fixtures/flow/opaque-type-alias/output.js +++ b/packages/babel-generator/test/fixtures/flow/opaque-type-alias/output.js @@ -1,7 +1,7 @@ opaque type ID = string; opaque type Foo = Bar; opaque type Maybe = _Maybe; -export opaque type Foo = number; +export opaque type Foo2 = number; opaque type union = { type: "A" } | { diff --git a/packages/babel-generator/test/fixtures/flow/type-alias/input.js b/packages/babel-generator/test/fixtures/flow/type-alias/input.js index f71342c5265f..c1d567e6dfdd 100644 --- a/packages/babel-generator/test/fixtures/flow/type-alias/input.js +++ b/packages/babel-generator/test/fixtures/flow/type-alias/input.js @@ -1,7 +1,7 @@ type FBID = number; type Foo = Bar; type Maybe = _Maybe; -export type Foo = number; +export type Foo2 = number; type union = | {type: "A"} diff --git a/packages/babel-generator/test/fixtures/flow/type-alias/output.js b/packages/babel-generator/test/fixtures/flow/type-alias/output.js index a8263f67218b..51933a7a774e 100644 --- a/packages/babel-generator/test/fixtures/flow/type-alias/output.js +++ b/packages/babel-generator/test/fixtures/flow/type-alias/output.js @@ -1,7 +1,7 @@ type FBID = number; type Foo = Bar; type Maybe = _Maybe; -export type Foo = number; +export type Foo2 = number; type union = { type: "A" } | { diff --git a/packages/babel-parser/src/parser/base.js b/packages/babel-parser/src/parser/base.js index a56058c7c2b7..f0719402338f 100644 --- a/packages/babel-parser/src/parser/base.js +++ b/packages/babel-parser/src/parser/base.js @@ -3,11 +3,13 @@ import type { Options } from "../options"; import type State from "../tokenizer/state"; import type { PluginsMap } from "./index"; +import type ScopeHandler from "../util/scope"; export default class BaseParser { // Properties set by constructor in index.js options: Options; inModule: boolean; + scope: ScopeHandler; plugins: PluginsMap; filename: ?string; sawUnambiguousESM: boolean = false; diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 01f7dc03a2e1..f2bcfb19d3ad 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -29,10 +29,23 @@ import { } from "../util/identifier"; import type { Pos, Position } from "../util/location"; import * as charCodes from "charcodes"; +import { + BIND_OUTSIDE, + BIND_VAR, + functionFlags, + SCOPE_ARROW, + SCOPE_CLASS, + SCOPE_DIRECT_SUPER, + SCOPE_SUPER, + SCOPE_PROGRAM, +} from "../util/scopeflags"; export default class ExpressionParser extends LValParser { // Forward-declaration: defined in statement.js - +parseBlock: (allowDirectives?: boolean) => N.BlockStatement; + +parseBlock: ( + allowDirectives?: boolean, + createNewLexicalScope?: boolean, + ) => N.BlockStatement; +parseClass: ( node: N.Class, isStatement: boolean, @@ -41,10 +54,9 @@ export default class ExpressionParser extends LValParser { +parseDecorators: (allowExport?: boolean) => void; +parseFunction: ( node: T, - isStatement: boolean, + statement?: number, allowExpressionBody?: boolean, isAsync?: boolean, - optionalId?: boolean, ) => T; +parseFunctionParams: (node: N.Function, allowModifiers?: boolean) => void; +takeDecorators: (node: N.HasDecorators) => void; @@ -74,6 +86,7 @@ export default class ExpressionParser extends LValParser { // Convenience method to parse an Expression only getExpression(): N.Expression { + this.scope.enter(SCOPE_PROGRAM); this.nextToken(); const expr = this.parseExpression(); if (!this.match(tt.eof)) { @@ -128,7 +141,7 @@ export default class ExpressionParser extends LValParser { const startPos = this.state.start; const startLoc = this.state.startLoc; if (this.isContextual("yield")) { - if (this.state.inGenerator) { + if (this.scope.inGenerator) { let left = this.parseYield(noIn); if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); @@ -336,7 +349,7 @@ export default class ExpressionParser extends LValParser { if ( this.match(tt.name) && this.state.value === "await" && - this.state.inAsync + this.scope.inAsync ) { throw this.raise( this.state.start, @@ -421,8 +434,8 @@ export default class ExpressionParser extends LValParser { parseMaybeUnary(refShorthandDefaultPos: ?Pos): N.Expression { if ( this.isContextual("await") && - (this.state.inAsync || - (!this.state.inFunction && this.options.allowAwaitOutsideFunction)) + (this.scope.inAsync || + (!this.scope.inFunction && this.options.allowAwaitOutsideFunction)) ) { return this.parseAwait(); } else if (this.state.type.prefix) { @@ -806,11 +819,7 @@ export default class ExpressionParser extends LValParser { switch (this.state.type) { case tt._super: - if ( - !this.state.inMethod && - !this.state.inClassProperty && - !this.options.allowSuperOutsideMethod - ) { + if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { this.raise( this.state.start, "super is only allowed in object methods and classes", @@ -819,24 +828,26 @@ export default class ExpressionParser extends LValParser { node = this.startNode(); this.next(); - if ( - !this.match(tt.parenL) && - !this.match(tt.bracketL) && - !this.match(tt.dot) - ) { - this.unexpected(); - } if ( this.match(tt.parenL) && - this.state.inMethod !== "constructor" && + !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod ) { this.raise( node.start, - "super() is only valid inside a class constructor. " + - "Make sure the method name is spelled exactly as 'constructor'.", + "super() is only valid inside a class constructor of a subclass. " + + "Maybe a typo in the method name ('constructor') or not extending another class?", ); } + + if ( + !this.match(tt.parenL) && + !this.match(tt.bracketL) && + !this.match(tt.dot) + ) { + this.unexpected(); + } + return this.finishNode(node, "Super"); case tt._import: @@ -870,20 +881,17 @@ export default class ExpressionParser extends LValParser { !this.canInsertSemicolon() ) { this.next(); - return this.parseFunction(node, false, false, true); + return this.parseFunction(node, undefined, false, true); } else if ( canBeArrow && id.name === "async" && this.match(tt.name) && !this.canInsertSemicolon() ) { - const oldInAsync = this.state.inAsync; - this.state.inAsync = true; const params = [this.parseIdentifier()]; this.expect(tt.arrow); // let foo = async bar => {}; this.parseArrowExpression(node, params, true); - this.state.inAsync = oldInAsync; return node; } @@ -900,12 +908,9 @@ export default class ExpressionParser extends LValParser { this.expectPlugin("doExpressions"); const node = this.startNode(); this.next(); - const oldInFunction = this.state.inFunction; const oldLabels = this.state.labels; this.state.labels = []; - this.state.inFunction = false; - node.body = this.parseBlock(false); - this.state.inFunction = oldInFunction; + node.body = this.parseBlock(); this.state.labels = oldLabels; return this.finishNode(node, "DoExpression"); } @@ -1068,10 +1073,10 @@ export default class ExpressionParser extends LValParser { this.next(); meta = this.createIdentifier(meta, "function"); - if (this.state.inGenerator && this.eat(tt.dot)) { + if (this.scope.inGenerator && this.eat(tt.dot)) { return this.parseMetaProperty(node, meta, "sent"); } - return this.parseFunction(node, false); + return this.parseFunction(node); } parseMetaProperty( @@ -1309,7 +1314,7 @@ export default class ExpressionParser extends LValParser { if (this.eat(tt.dot)) { const metaProp = this.parseMetaProperty(node, meta, "target"); - if (!this.state.inFunction && !this.state.inClassProperty) { + if (!this.scope.inNonArrowFunction && !this.state.inClassProperty) { let error = "new.target can only be used in functions"; if (this.hasPlugin("classProperties")) { @@ -1575,6 +1580,7 @@ export default class ExpressionParser extends LValParser { isGenerator, isAsync, /* isConstructor */ false, + false, "ObjectMethod", ); } @@ -1588,6 +1594,7 @@ export default class ExpressionParser extends LValParser { /* isGenerator */ false, /* isAsync */ false, /* isConstructor */ false, + false, "ObjectMethod", ); this.checkGetterSetterParams(prop); @@ -1713,32 +1720,28 @@ export default class ExpressionParser extends LValParser { isGenerator: boolean, isAsync: boolean, isConstructor: boolean, + allowDirectSuper: boolean, type: string, + inClassScope: boolean = false, ): T { - const oldInFunc = this.state.inFunction; - const oldInMethod = this.state.inMethod; - const oldInAsync = this.state.inAsync; - const oldInGenerator = this.state.inGenerator; const oldYieldPos = this.state.yieldPos; const oldAwaitPos = this.state.awaitPos; - this.state.inFunction = true; - this.state.inMethod = node.kind || true; - this.state.inAsync = isAsync; - this.state.inGenerator = isGenerator; this.state.yieldPos = 0; this.state.awaitPos = 0; this.initFunction(node, isAsync); node.generator = !!isGenerator; const allowModifiers = isConstructor; // For TypeScript parameter properties + this.scope.enter( + functionFlags(isAsync, node.generator) | + SCOPE_SUPER | + (inClassScope ? SCOPE_CLASS : 0) | + (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0), + ); this.parseFunctionParams((node: any), allowModifiers); this.checkYieldAwaitInDefaultParams(); this.parseFunctionBodyAndFinish(node, type); - this.state.inFunction = oldInFunc; - this.state.inMethod = oldInMethod; - this.state.inAsync = oldInAsync; - this.state.inGenerator = oldInGenerator; this.state.yieldPos = oldYieldPos; this.state.awaitPos = oldAwaitPos; @@ -1753,17 +1756,12 @@ export default class ExpressionParser extends LValParser { params: ?(N.Expression[]), isAsync: boolean, ): N.ArrowFunctionExpression { + this.scope.enter(functionFlags(isAsync, false) | SCOPE_ARROW); this.initFunction(node, isAsync); - const oldInFunc = this.state.inFunction; - const oldInAsync = this.state.inAsync; - const oldInGenerator = this.state.inGenerator; const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; const oldYieldPos = this.state.yieldPos; const oldAwaitPos = this.state.awaitPos; - this.state.inFunction = true; - this.state.inAsync = isAsync; - this.state.inGenerator = false; this.state.maybeInArrowParameters = false; this.state.yieldPos = 0; this.state.awaitPos = 0; @@ -1771,9 +1769,6 @@ export default class ExpressionParser extends LValParser { if (params) this.setArrowFunctionParameters(node, params); this.parseFunctionBody(node, true); - this.state.inAsync = oldInAsync; - this.state.inGenerator = oldInGenerator; - this.state.inFunction = oldInFunc; this.state.maybeInArrowParameters = oldMaybeInArrowParameters; this.state.yieldPos = oldYieldPos; this.state.awaitPos = oldAwaitPos; @@ -1819,55 +1814,87 @@ export default class ExpressionParser extends LValParser { // Parse function body and check parameters. parseFunctionBody(node: N.Function, allowExpression: ?boolean): void { const isExpression = allowExpression && !this.match(tt.braceL); + const oldStrict = this.state.strict; + let useStrict = false; const oldInParameters = this.state.inParameters; this.state.inParameters = false; if (isExpression) { node.body = this.parseMaybeAssign(); + this.checkParams(node, false, allowExpression); } else { + const nonSimple = !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.state.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) { + // This logic is here to align the error location with the estree plugin + const errorPos = + // $FlowIgnore + (node.kind === "method" || node.kind === "constructor") && + // $FlowIgnore + !!node.key + ? node.key.end + : node.start; + this.raise( + errorPos, + "Illegal 'use strict' directive in function with non-simple parameter list", + ); + } + } // Start a new scope with regard to labels // flag (restore them to their old value afterwards). - const oldInFunc = this.state.inFunction; const oldLabels = this.state.labels; - this.state.inFunction = true; this.state.labels = []; - node.body = this.parseBlock(true); - this.state.inFunction = oldInFunc; + if (useStrict) this.state.strict = true; + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams( + node, + !oldStrict && !useStrict && !allowExpression && !nonSimple, + allowExpression, + ); + node.body = this.parseBlock(true, false); this.state.labels = oldLabels; } + this.scope.exit(); - this.checkFunctionNameAndParams(node, allowExpression); this.state.inParameters = oldInParameters; + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.state.strict && node.id) { + this.checkLVal(node.id, BIND_OUTSIDE, undefined, "function name"); + } + this.state.strict = oldStrict; } - checkFunctionNameAndParams( + isSimpleParamList( + params: $ReadOnlyArray, + ): boolean { + for (let i = 0, len = params.length; i < len; i++) { + if (params[i].type !== "Identifier") return false; + } + return true; + } + + checkParams( node: N.Function, + allowDuplicates: boolean, + // eslint-disable-next-line no-unused-vars isArrowFunction: ?boolean, ): void { - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - const isStrict = this.isStrictBody(node); - // Also check for arrow functions - const checkLVal = this.state.strict || isStrict || isArrowFunction; - - const oldStrict = this.state.strict; - if (isStrict) this.state.strict = isStrict; - - if (checkLVal) { - const nameHash: any = Object.create(null); - if (node.id) { - this.checkLVal(node.id, true, undefined, "function name"); - } - for (const param of node.params) { - if (isStrict && param.type !== "Identifier") { - this.raise(param.start, "Non-simple parameter in strict mode"); - } - this.checkLVal(param, true, nameHash, "function parameter list"); - } + // $FlowIssue + const nameHash: {} = Object.create(null); + for (let i = 0; i < node.params.length; i++) { + this.checkLVal( + node.params[i], + BIND_VAR, + allowDuplicates ? null : nameHash, + "function paramter list", + ); } - this.state.strict = oldStrict; } // Parses a comma-separated list of expressions, and returns them as @@ -1987,22 +2014,21 @@ export default class ExpressionParser extends LValParser { checkKeywords: boolean, isBinding: boolean, ): void { - const state = this.state; - if (state.inGenerator && word === "yield") { + if (this.scope.inGenerator && word === "yield") { this.raise( startLoc, "Can not use 'yield' as identifier inside a generator", ); } - if (state.inAsync && word === "await") { + if (this.scope.inAsync && word === "await") { this.raise( startLoc, "Can not use 'await' as identifier inside an async function", ); } - if (state.inClassProperty && word === "arguments") { + if (this.state.inClassProperty && word === "arguments") { this.raise( startLoc, "'arguments' is not allowed in class field initializer", @@ -2012,14 +2038,14 @@ export default class ExpressionParser extends LValParser { this.raise(startLoc, `Unexpected keyword '${word}'`); } - const reservedTest = !state.strict + const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; if (reservedTest(word, this.inModule)) { - if (!state.inAsync && word === "await") { + if (!this.scope.inAsync && word === "await") { this.raise( startLoc, "Can not use keyword 'await' outside an async function", diff --git a/packages/babel-parser/src/parser/index.js b/packages/babel-parser/src/parser/index.js index 00617bd8632c..b92ecb8203ad 100644 --- a/packages/babel-parser/src/parser/index.js +++ b/packages/babel-parser/src/parser/index.js @@ -5,6 +5,8 @@ import type { File, JSXOpeningElement } from "../types"; import type { PluginList } from "../plugin-utils"; import { getOptions } from "../options"; import StatementParser from "./statement"; +import { SCOPE_PROGRAM } from "../util/scopeflags"; +import ScopeHandler from "../util/scope"; export type PluginsMap = Map; @@ -20,11 +22,13 @@ export default class Parser extends StatementParser { this.options = options; this.inModule = this.options.sourceType === "module"; + this.scope = new ScopeHandler(this.raise.bind(this), this.inModule); this.plugins = pluginsMap(this.options.plugins); this.filename = options.sourceFilename; } parse(): File { + this.scope.enter(SCOPE_PROGRAM); const file = this.startNode(); const program = this.startNode(); this.nextToken(); diff --git a/packages/babel-parser/src/parser/lval.js b/packages/babel-parser/src/parser/lval.js index 6b9e6c6ac979..1711b7ae7d81 100644 --- a/packages/babel-parser/src/parser/lval.js +++ b/packages/babel-parser/src/parser/lval.js @@ -16,6 +16,7 @@ import type { import type { Pos, Position } from "../util/location"; import { isStrictBindReservedWord } from "../util/identifier"; import { NodeUtils } from "./node"; +import { type BindingTypes, BIND_NONE, BIND_OUTSIDE } from "../util/scopeflags"; export default class LValParser extends NodeUtils { // Forward-declaration: defined in expression.js @@ -262,7 +263,7 @@ export default class LValParser extends NodeUtils { elts.push(this.parseAssignableListItemTypes(this.parseRest())); this.checkCommaAfterRest( close, - this.state.inFunction && this.state.inParameters + this.scope.inFunction && this.state.inParameters ? "parameter" : "element", ); @@ -325,7 +326,7 @@ export default class LValParser extends NodeUtils { checkLVal( expr: Expression, - isBinding: ?boolean, + bindingType: ?BindingTypes = BIND_NONE, checkClashes: ?{ [key: string]: boolean }, contextDescription: string, ): void { @@ -337,7 +338,7 @@ export default class LValParser extends NodeUtils { ) { this.raise( expr.start, - `${isBinding ? "Binding" : "Assigning to"} '${ + `${bindingType === BIND_NONE ? "Assigning to" : "Binding"} '${ expr.name }' in strict mode`, ); @@ -358,15 +359,20 @@ export default class LValParser extends NodeUtils { const key = `_${expr.name}`; if (checkClashes[key]) { - this.raise(expr.start, "Argument name clash in strict mode"); + this.raise(expr.start, "Argument name clash"); } else { checkClashes[key] = true; } } + if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) { + this.scope.declareName(expr.name, bindingType, expr.start); + } break; case "MemberExpression": - if (isBinding) this.raise(expr.start, "Binding member expression"); + if (bindingType !== BIND_NONE) { + this.raise(expr.start, "Binding member expression"); + } break; case "ObjectPattern": @@ -374,7 +380,7 @@ export default class LValParser extends NodeUtils { if (prop.type === "ObjectProperty") prop = prop.value; this.checkLVal( prop, - isBinding, + bindingType, checkClashes, "object destructuring pattern", ); @@ -386,7 +392,7 @@ export default class LValParser extends NodeUtils { if (elem) { this.checkLVal( elem, - isBinding, + bindingType, checkClashes, "array destructuring pattern", ); @@ -397,21 +403,26 @@ export default class LValParser extends NodeUtils { case "AssignmentPattern": this.checkLVal( expr.left, - isBinding, + bindingType, checkClashes, "assignment pattern", ); break; case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes, "rest element"); + this.checkLVal( + expr.argument, + bindingType, + checkClashes, + "rest element", + ); break; default: { const message = - (isBinding - ? /* istanbul ignore next */ "Binding invalid" - : "Invalid") + + (bindingType === BIND_NONE + ? "Invalid" + : /* istanbul ignore next */ "Binding invalid") + " left-hand side" + (contextDescription ? " in " + contextDescription diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 88d6555d5f30..5e77de8ba31a 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -10,6 +10,17 @@ import { } from "../util/identifier"; import { lineBreak, skipWhiteSpace } from "../util/whitespace"; import * as charCodes from "charcodes"; +import { + BIND_SIMPLE_CATCH, + BIND_LEXICAL, + BIND_VAR, + BIND_FUNCTION, + functionFlags, + SCOPE_CLASS, + SCOPE_OTHER, + SCOPE_SIMPLE_CATCH, + SCOPE_SUPER, +} from "../util/scopeflags"; // Reused empty array added for node fields that are always empty. @@ -18,6 +29,11 @@ const empty = []; const loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" }; +const FUNC_NO_FLAGS = 0b000, + FUNC_STATEMENT = 0b001, + FUNC_HANGING_STATEMENT = 0b010, + FUNC_NULLABLE_ID = 0b100; + export default class StatementParser extends ExpressionParser { // ### Statement parsing @@ -144,26 +160,24 @@ export default class StatementParser extends ExpressionParser { return this.parseDoStatement(node); case tt._for: return this.parseForStatement(node); - case tt._function: { + case tt._function: if (this.lookahead().type === tt.dot) break; - if ( - context && - (this.state.strict || (context !== "if" && context !== "label")) - ) { - this.raise( - this.state.start, - "Function declaration not allowed in this context", - ); - } - const result = this.parseFunctionStatement(node); - - // TODO: Remove this once we have proper scope tracking in place. - if (context && result.generator) { - this.unexpected(node.start); + if (context) { + if (this.state.strict) { + this.raise( + this.state.start, + "In strict mode code, functions can only be declared at top level or inside a block", + ); + } else if (context !== "if" && context !== "label") { + this.raise( + this.state.start, + "In non-strict mode code, functions can only be declared at top level, " + + "inside a block, or as the body of an if statement", + ); + } } + return this.parseFunctionStatement(node, false, !context); - return result; - } case tt._class: if (context) this.unexpected(); return this.parseClass(node, true); @@ -182,7 +196,12 @@ export default class StatementParser extends ExpressionParser { case tt._const: case tt._var: kind = kind || this.state.value; - if (context && kind !== "var") this.unexpected(); + if (context && kind !== "var") { + this.unexpected( + this.state.start, + "Lexical declaration cannot appear in a single-statement context", + ); + } return this.parseVarStatement(node, kind); case tt._while: @@ -237,24 +256,19 @@ export default class StatementParser extends ExpressionParser { return result; } - case tt.name: - if (this.isContextual("async")) { - // peek ahead and see if next token is a function - const state = this.state.clone(); - this.next(); - if (this.match(tt._function) && !this.canInsertSemicolon()) { - if (context) { - this.raise( - this.state.lastTokStart, - "Function declaration not allowed in this context", - ); - } - this.next(); - return this.parseFunction(node, true, false, true); - } else { - this.state = state; + + default: { + if (this.isAsyncFunction()) { + if (context) { + this.unexpected( + null, + "Async functions can only be declared at the top level or inside a block", + ); } + this.next(); + return this.parseFunctionStatement(node, true, !context); } + } } // If the statement does not start with a statement keyword or a @@ -461,12 +475,13 @@ export default class StatementParser extends ExpressionParser { let awaitAt = -1; if ( - (this.state.inAsync || - (!this.state.inFunction && this.options.allowAwaitOutsideFunction)) && + (this.scope.inAsync || + (!this.scope.inFunction && this.options.allowAwaitOutsideFunction)) && this.eatContextual("await") ) { awaitAt = this.state.lastTokStart; } + this.scope.enter(SCOPE_OTHER); this.expect(tt.parenL); if (this.match(tt.semi)) { @@ -524,9 +539,18 @@ export default class StatementParser extends ExpressionParser { return this.parseFor(node, init); } - parseFunctionStatement(node: N.FunctionDeclaration): N.FunctionDeclaration { + parseFunctionStatement( + node: N.FunctionDeclaration, + isAsync?: boolean, + declarationPosition?: boolean, + ): N.FunctionDeclaration { this.next(); - return this.parseFunction(node, true); + return this.parseFunction( + node, + FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), + false, + isAsync, + ); } parseIfStatement(node: N.IfStatement): N.IfStatement { @@ -538,7 +562,7 @@ export default class StatementParser extends ExpressionParser { } parseReturnStatement(node: N.ReturnStatement): N.ReturnStatement { - if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) { + if (!this.scope.inFunction && !this.options.allowReturnOutsideFunction) { this.raise(this.state.start, "'return' outside of function"); } @@ -564,6 +588,7 @@ export default class StatementParser extends ExpressionParser { const cases = (node.cases = []); this.expect(tt.braceL); this.state.labels.push(switchLabel); + this.scope.enter(SCOPE_OTHER); // Statements under must be grouped (by label) in SwitchCase // nodes. `cur` is used to keep the node that we are currently @@ -595,6 +620,7 @@ export default class StatementParser extends ExpressionParser { } } } + this.scope.exit(); if (cur) this.finishNode(cur, "SwitchCase"); this.next(); // Closing brace this.state.labels.pop(); @@ -627,11 +653,18 @@ export default class StatementParser extends ExpressionParser { if (this.match(tt.parenL)) { this.expect(tt.parenL); clause.param = this.parseBindingAtom(); - const clashes: any = Object.create(null); - this.checkLVal(clause.param, true, clashes, "catch clause"); + const simple = clause.param.type === "Identifier"; + this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLVal( + clause.param, + simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL, + null, + "catch clause", + ); this.expect(tt.parenR); } else { clause.param = null; + this.scope.enter(SCOPE_OTHER); } clause.body = @@ -641,8 +674,9 @@ export default class StatementParser extends ExpressionParser { // outside of the function body. this.withTopicForbiddingContext(() => // Parse the catch clause's body. - this.parseBlock(false), + this.parseBlock(false, false), ); + this.scope.exit(); node.handler = this.finishNode(clause, "CatchClause"); } @@ -769,10 +803,19 @@ export default class StatementParser extends ExpressionParser { // strict"` declarations when `allowStrict` is true (used for // function bodies). - parseBlock(allowDirectives?: boolean): N.BlockStatement { + parseBlock( + allowDirectives?: boolean = false, + createNewLexicalScope?: boolean = true, + ): N.BlockStatement { const node = this.startNode(); this.expect(tt.braceL); + if (createNewLexicalScope) { + this.scope.enter(SCOPE_OTHER); + } this.parseBlockBody(node, allowDirectives, false, tt.braceR); + if (createNewLexicalScope) { + this.scope.exit(); + } return this.finishNode(node, "BlockStatement"); } @@ -858,6 +901,7 @@ export default class StatementParser extends ExpressionParser { node.update = this.match(tt.parenR) ? null : this.parseExpression(); this.expect(tt.parenR); + this.scope.exit(); node.body = // For the smartPipelines plugin: Disable topic references from outer // contexts within the loop body. They are permitted in test expressions, @@ -893,6 +937,7 @@ export default class StatementParser extends ExpressionParser { node.right = this.parseExpression(); this.expect(tt.parenR); + this.scope.exit(); node.body = // For the smartPipelines plugin: // Disable topic references from outer contexts within the loop body. @@ -954,7 +999,12 @@ export default class StatementParser extends ExpressionParser { this.unexpected(null, "let is disallowed as a lexically bound name"); } decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, true, undefined, "variable declaration"); + this.checkLVal( + decl.id, + kind === "var" ? BIND_VAR : BIND_LEXICAL, + undefined, + "variable declaration", + ); } // Parse a function declaration or literal (depending on the @@ -962,51 +1012,56 @@ export default class StatementParser extends ExpressionParser { parseFunction( node: T, - isStatement: boolean, + statement?: number = FUNC_NO_FLAGS, allowExpressionBody?: boolean = false, isAsync?: boolean = false, - optionalId?: boolean = false, ): T { - const oldInFunc = this.state.inFunction; - const oldInMethod = this.state.inMethod; - const oldInAsync = this.state.inAsync; - const oldInGenerator = this.state.inGenerator; - const oldInClassProperty = this.state.inClassProperty; - const oldYieldPos = this.state.yieldPos; - const oldAwaitPos = this.state.awaitPos; - this.state.inFunction = true; - this.state.inMethod = false; - this.state.inClassProperty = false; - this.state.yieldPos = 0; - this.state.awaitPos = 0; + const isStatement = statement & FUNC_STATEMENT; + const isHangingStatement = statement & FUNC_HANGING_STATEMENT; this.initFunction(node, isAsync); + if (this.match(tt.star) && isHangingStatement) { + this.unexpected( + this.state.start, + "Generators can only be declared at the top level or inside a block", + ); + } node.generator = this.eat(tt.star); - if (isStatement && !optionalId && !this.match(tt.name)) { - this.unexpected(); + if (isStatement) { + node.id = + statement & FUNC_NULLABLE_ID && !this.match(tt.name) + ? null + : this.parseIdentifier(); + if (node.id && !isHangingStatement) { + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + this.checkLVal( + node.id, + this.state.strict || node.generator || node.async + ? this.scope.treatFunctionsAsVar + ? BIND_VAR + : BIND_LEXICAL + : BIND_FUNCTION, + null, + "function name", + ); + } } - // When parsing function expression, the binding identifier is parsed - // according to the rules inside the function. - // e.g. (function* yield() {}) is invalid because "yield" is disallowed in - // generators. - // This isn't the case with function declarations: function* yield() {} is - // valid because yield is parsed as if it was outside the generator. - // Therefore, this.state.inGenerator is set before or after parsing the - // function id according to the "isStatement" parameter. - // The same applies to await & async functions. + const oldInClassProperty = this.state.inClassProperty; + const oldYieldPos = this.state.yieldPos; + const oldAwaitPos = this.state.awaitPos; + this.state.inClassProperty = false; + this.state.yieldPos = 0; + this.state.awaitPos = 0; + this.scope.enter(functionFlags(node.async, node.generator)); + if (!isStatement) { - this.state.inAsync = isAsync; - this.state.inGenerator = node.generator; - } - if (this.match(tt.name)) { - node.id = this.parseIdentifier(); - } - if (isStatement) { - this.state.inAsync = isAsync; - this.state.inGenerator = node.generator; + node.id = this.match(tt.name) ? this.parseIdentifier() : null; } this.parseFunctionParams(node); @@ -1023,10 +1078,6 @@ export default class StatementParser extends ExpressionParser { ); }); - this.state.inFunction = oldInFunc; - this.state.inMethod = oldInMethod; - this.state.inAsync = oldInAsync; - this.state.inGenerator = oldInGenerator; this.state.inClassProperty = oldInClassProperty; this.state.yieldPos = oldYieldPos; this.state.awaitPos = oldAwaitPos; @@ -1099,11 +1150,12 @@ export default class StatementParser extends ExpressionParser { const state = { hadConstructor: false }; let decorators: N.Decorator[] = []; const classBody: N.ClassBody = this.startNode(); - classBody.body = []; this.expect(tt.braceL); + const constructorAllowsSuper = node.superClass !== null; + // For the smartPipelines plugin: Disable topic references from outer // contexts within the class body. They are permitted in test expressions, // outside of the class body. @@ -1133,7 +1185,7 @@ export default class StatementParser extends ExpressionParser { decorators = []; } - this.parseClassMember(classBody, member, state); + this.parseClassMember(classBody, member, state, constructorAllowsSuper); if ( member.kind === "constructor" && @@ -1164,6 +1216,7 @@ export default class StatementParser extends ExpressionParser { classBody: N.ClassBody, member: N.ClassMember, state: { hadConstructor: boolean }, + constructorAllowsSuper: boolean, ): void { let isStatic = false; const containsEsc = this.state.containsEsc; @@ -1185,6 +1238,7 @@ export default class StatementParser extends ExpressionParser { false, false, /* isConstructor */ false, + false, ); return; } else if (this.isClassProperty()) { @@ -1204,7 +1258,13 @@ export default class StatementParser extends ExpressionParser { isStatic = true; } - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); + this.parseClassMemberWithIsStatic( + classBody, + member, + state, + isStatic, + constructorAllowsSuper, + ); } parseClassMemberWithIsStatic( @@ -1212,6 +1272,7 @@ export default class StatementParser extends ExpressionParser { member: N.ClassMember, state: { hadConstructor: boolean }, isStatic: boolean, + constructorAllowsSuper: boolean, ) { const publicMethod: $FlowSubtype = member; const privateMethod: $FlowSubtype = member; @@ -1244,6 +1305,7 @@ export default class StatementParser extends ExpressionParser { true, false, /* isConstructor */ false, + false, ); return; @@ -1266,7 +1328,7 @@ export default class StatementParser extends ExpressionParser { // a normal method const isConstructor = this.isNonstaticConstructor(publicMethod); - + let allowsDirectSuper = false; if (isConstructor) { publicMethod.kind = "constructor"; @@ -1282,6 +1344,7 @@ export default class StatementParser extends ExpressionParser { this.raise(key.start, "Duplicate constructor in the same class"); } state.hadConstructor = true; + allowsDirectSuper = constructorAllowsSuper; } this.pushClassMethod( @@ -1290,6 +1353,7 @@ export default class StatementParser extends ExpressionParser { false, false, isConstructor, + allowsDirectSuper, ); } else if (this.isClassProperty()) { if (isPrivate) { @@ -1327,6 +1391,7 @@ export default class StatementParser extends ExpressionParser { isGenerator, true, /* isConstructor */ false, + false, ); } } else if ( @@ -1356,6 +1421,7 @@ export default class StatementParser extends ExpressionParser { false, false, /* isConstructor */ false, + false, ); } @@ -1422,6 +1488,7 @@ export default class StatementParser extends ExpressionParser { isGenerator: boolean, isAsync: boolean, isConstructor: boolean, + allowsDirectSuper: boolean, ): void { classBody.body.push( this.parseMethod( @@ -1429,7 +1496,9 @@ export default class StatementParser extends ExpressionParser { isGenerator, isAsync, isConstructor, + allowsDirectSuper, "ClassMethod", + true, ), ); } @@ -1447,7 +1516,9 @@ export default class StatementParser extends ExpressionParser { isGenerator, isAsync, /* isConstructor */ false, + false, "ClassPrivateMethod", + true, ), ); } @@ -1466,13 +1537,16 @@ export default class StatementParser extends ExpressionParser { parseClassPrivateProperty( node: N.ClassPrivateProperty, ): N.ClassPrivateProperty { - const oldInMethod = this.state.inMethod; - this.state.inMethod = false; this.state.inClassProperty = true; + + this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); + node.value = this.eat(tt.eq) ? this.parseMaybeAssign() : null; this.semicolon(); this.state.inClassProperty = false; - this.state.inMethod = oldInMethod; + + this.scope.exit(); + return this.finishNode(node, "ClassPrivateProperty"); } @@ -1481,10 +1555,10 @@ export default class StatementParser extends ExpressionParser { this.expectPlugin("classProperties"); } - const oldInMethod = this.state.inMethod; - this.state.inMethod = false; this.state.inClassProperty = true; + this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); + if (this.match(tt.eq)) { this.expectPlugin("classProperties"); this.next(); @@ -1494,7 +1568,8 @@ export default class StatementParser extends ExpressionParser { } this.semicolon(); this.state.inClassProperty = false; - this.state.inMethod = oldInMethod; + + this.scope.exit(); return this.finishNode(node, "ClassProperty"); } @@ -1506,6 +1581,9 @@ export default class StatementParser extends ExpressionParser { ): void { if (this.match(tt.name)) { node.id = this.parseIdentifier(); + if (isStatement) { + this.checkLVal(node.id, BIND_LEXICAL, undefined, "class name"); + } } else { if (optionalId || !isStatement) { node.id = null; @@ -1642,7 +1720,7 @@ export default class StatementParser extends ExpressionParser { return false; } - isAsyncFunction() { + isAsyncFunction(): boolean { if (!this.isContextual("async")) return false; const { input, pos, length } = this.state; @@ -1666,13 +1744,18 @@ export default class StatementParser extends ExpressionParser { const isAsync = this.isAsyncFunction(); - if (this.eat(tt._function) || isAsync) { + if (this.match(tt._function) || isAsync) { + this.next(); if (isAsync) { - this.eatContextual("async"); - this.expect(tt._function); + this.next(); } - return this.parseFunction(expr, true, false, isAsync, true); + return this.parseFunction( + expr, + FUNC_STATEMENT | FUNC_NULLABLE_ID, + false, + isAsync, + ); } else if (this.match(tt._class)) { return this.parseClass(expr, true, true); } else if (this.match(tt.at)) { @@ -1927,7 +2010,12 @@ export default class StatementParser extends ExpressionParser { contextDescription: string, ): void { specifier.local = this.parseIdentifier(); - this.checkLVal(specifier.local, true, undefined, contextDescription); + this.checkLVal( + specifier.local, + BIND_LEXICAL, + undefined, + contextDescription, + ); node.specifiers.push(this.finishNode(specifier, type)); } @@ -2000,7 +2088,12 @@ export default class StatementParser extends ExpressionParser { ); specifier.local = specifier.imported.__clone(); } - this.checkLVal(specifier.local, true, undefined, "import specifier"); + this.checkLVal( + specifier.local, + BIND_LEXICAL, + undefined, + "import specifier", + ); node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); } } diff --git a/packages/babel-parser/src/parser/util.js b/packages/babel-parser/src/parser/util.js index 1ea8aeaf8f1c..4c8eb453a8c3 100644 --- a/packages/babel-parser/src/parser/util.js +++ b/packages/babel-parser/src/parser/util.js @@ -3,7 +3,9 @@ import { types as tt, type TokenType } from "../tokenizer/types"; import Tokenizer from "../tokenizer"; import type { Node } from "../types"; -import { lineBreak } from "../util/whitespace"; +import { lineBreak, skipWhiteSpace } from "../util/whitespace"; + +const literal = /^(?:;|('|")((?:\\?.)*?)\1)/; // ## Parser utilities @@ -165,4 +167,18 @@ export default class UtilParser extends Tokenizer { ); } } + + strictDirective(start: number): boolean { + for (;;) { + skipWhiteSpace.lastIndex = start; + // $FlowIgnore + start += skipWhiteSpace.exec(this.state.input)[0].length; + const match = literal.exec(this.state.input.slice(start)); + if (!match) break; + if (match[2] === "use strict") return true; + start += match[0].length; + } + + return false; + } } diff --git a/packages/babel-parser/src/plugins/estree.js b/packages/babel-parser/src/plugins/estree.js index ae859107b066..0a5a276a2bf0 100644 --- a/packages/babel-parser/src/plugins/estree.js +++ b/packages/babel-parser/src/plugins/estree.js @@ -4,6 +4,7 @@ import { types as tt, TokenType } from "../tokenizer/types"; import type Parser from "../parser"; import * as N from "../types"; import type { Pos, Position } from "../util/location"; +import { type BindingTypes, BIND_NONE } from "../util/scopeflags"; function isSimpleProperty(node: N.Node): boolean { return ( @@ -104,7 +105,7 @@ export default (superClass: Class): Class => checkLVal( expr: N.Expression, - isBinding: ?boolean, + bindingType: ?BindingTypes = BIND_NONE, checkClashes: ?{ [key: string]: boolean }, contextDescription: string, ): void { @@ -113,14 +114,14 @@ export default (superClass: Class): Class => expr.properties.forEach(prop => { this.checkLVal( prop.type === "Property" ? prop.value : prop, - isBinding, + bindingType, checkClashes, "object destructuring pattern", ); }); break; default: - super.checkLVal(expr, isBinding, checkClashes, contextDescription); + super.checkLVal(expr, bindingType, checkClashes, contextDescription); } } @@ -203,13 +204,16 @@ export default (superClass: Class): Class => isGenerator: boolean, isAsync: boolean, isConstructor: boolean, + allowsDirectSuper: boolean, ): void { this.parseMethod( method, isGenerator, isAsync, isConstructor, + allowsDirectSuper, "MethodDefinition", + true, ); if (method.typeParameters) { // $FlowIgnore @@ -265,7 +269,9 @@ export default (superClass: Class): Class => isGenerator: boolean, isAsync: boolean, isConstructor: boolean, + allowDirectSuper: boolean, type: string, + inClassScope: boolean = false, ): T { let funcNode = this.startNode(); funcNode.kind = node.kind; // provide kind, so super method correctly sets state @@ -274,7 +280,9 @@ export default (superClass: Class): Class => isGenerator, isAsync, isConstructor, + allowDirectSuper, "FunctionExpression", + inClassScope, ); delete funcNode.kind; // $FlowIgnore diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 1effe1725c0e..af151c317dfe 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -9,6 +9,12 @@ import type State from "../tokenizer/state"; import { types as tc } from "../tokenizer/context"; import * as charCodes from "charcodes"; import { isIteratorStart } from "../util/identifier"; +import { + type BindingTypes, + BIND_NONE, + BIND_LEXICAL, + SCOPE_OTHER, +} from "../util/scopeflags"; const reservedTypes = [ "any", @@ -257,6 +263,8 @@ export default (superClass: Class): Class => flowParseDeclareModule(node: N.FlowDeclareModule): N.FlowDeclareModule { this.next(); + this.scope.enter(SCOPE_OTHER); + if (this.match(tt.string)) { node.id = this.parseExprAtom(); } else { @@ -290,6 +298,9 @@ export default (superClass: Class): Class => body.push(bodyNode); } + + this.scope.exit(); + this.expect(tt.braceR); this.finishNode(bodyNode, "BlockStatement"); @@ -518,6 +529,7 @@ export default (superClass: Class): Class => flowParseTypeAlias(node: N.FlowTypeAlias): N.FlowTypeAlias { node.id = this.flowParseRestrictedIdentifier(); + this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); if (this.isRelational("<")) { node.typeParameters = this.flowParseTypeParameterDeclaration(); @@ -537,6 +549,7 @@ export default (superClass: Class): Class => ): N.FlowOpaqueType { this.expectContextual("type"); node.id = this.flowParseRestrictedIdentifier(/*liberal*/ true); + this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); if (this.isRelational("<")) { node.typeParameters = this.flowParseTypeParameterDeclaration(); @@ -1761,7 +1774,7 @@ export default (superClass: Class): Class => "arrow function parameters", ); // Use super's method to force the parameters to be checked - super.checkFunctionNameAndParams(node, true); + super.checkParams(node, false, true); } else { arrows.push(node); } @@ -1995,14 +2008,14 @@ export default (superClass: Class): Class => checkLVal( expr: N.Expression, - isBinding: ?boolean, + bindingType: ?BindingTypes = BIND_NONE, checkClashes: ?{ [key: string]: boolean }, contextDescription: string, ): void { if (expr.type !== "TypeCastExpression") { return super.checkLVal( expr, - isBinding, + bindingType, checkClashes, contextDescription, ); @@ -2047,6 +2060,7 @@ export default (superClass: Class): Class => isGenerator: boolean, isAsync: boolean, isConstructor: boolean, + allowsDirectSuper: boolean, ): void { if ((method: $FlowFixMe).variance) { this.unexpected((method: $FlowFixMe).variance.start); @@ -2064,6 +2078,7 @@ export default (superClass: Class): Class => isGenerator, isAsync, isConstructor, + allowsDirectSuper, ); } @@ -2217,7 +2232,12 @@ export default (superClass: Class): Class => ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier(); - this.checkLVal(specifier.local, true, undefined, contextDescription); + this.checkLVal( + specifier.local, + BIND_LEXICAL, + undefined, + contextDescription, + ); node.specifiers.push(this.finishNode(specifier, type)); } @@ -2327,12 +2347,17 @@ export default (superClass: Class): Class => ); } - this.checkLVal(specifier.local, true, undefined, "import specifier"); + this.checkLVal( + specifier.local, + BIND_LEXICAL, + undefined, + "import specifier", + ); node.specifiers.push(this.finishNode(specifier, "ImportSpecifier")); } // parse function type parameters - function foo() {} - parseFunctionParams(node: N.Function): void { + parseFunctionParams(node: N.Function, allowModifiers?: boolean): void { // $FlowFixMe const kind = node.kind; if (kind !== "get" && kind !== "set" && this.isRelational("<")) { @@ -2340,7 +2365,7 @@ export default (superClass: Class): Class => /* allowDefault */ false, ); } - super.parseFunctionParams(node); + super.parseFunctionParams(node, allowModifiers); } // parse flow type annotations on variable declarator heads - let foo: string = bar @@ -2519,8 +2544,9 @@ export default (superClass: Class): Class => } } - checkFunctionNameAndParams( + checkParams( node: N.Function, + allowDuplicates: boolean, isArrowFunction: ?boolean, ): void { if ( @@ -2530,7 +2556,7 @@ export default (superClass: Class): Class => return; } - return super.checkFunctionNameAndParams(node, isArrowFunction); + return super.checkParams(node, allowDuplicates, isArrowFunction); } parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression { diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 1c0961ab9733..7418fd7221ea 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -6,6 +6,13 @@ import { types as ct } from "../tokenizer/context"; import * as N from "../types"; import type { Pos, Position } from "../util/location"; import Parser from "../parser"; +import { + type BindingTypes, + functionFlags, + BIND_NONE, + SCOPE_ARROW, + SCOPE_OTHER, +} from "../util/scopeflags"; type TsModifier = | "readonly" @@ -1071,6 +1078,8 @@ export default (superClass: Class): Class => tsParseModuleBlock(): N.TsModuleBlock { const node: N.TsModuleBlock = this.startNode(); + this.scope.enter(SCOPE_OTHER); + this.expect(tt.braceL); // Inside of a module block is considered "top-level", meaning it can have imports and exports. this.parseBlockOrModuleBlockBody( @@ -1079,6 +1088,7 @@ export default (superClass: Class): Class => /* topLevel */ true, /* end */ tt.braceR, ); + this.scope.exit(); return this.finishNode(node, "TSModuleBlock"); } @@ -1217,8 +1227,7 @@ export default (superClass: Class): Class => switch (starttype) { case tt._function: - this.next(); - return this.parseFunction(nany, /* isStatement */ true); + return this.parseFunctionStatement(nany); case tt._class: return this.parseClass( nany, @@ -1372,17 +1381,13 @@ export default (superClass: Class): Class => return undefined; } - const oldInAsync = this.state.inAsync; - const oldInGenerator = this.state.inGenerator; - this.state.inAsync = true; - this.state.inGenerator = false; + this.scope.enter(functionFlags(true, false) | SCOPE_ARROW); + res.id = null; res.generator = false; res.expression = true; // May be set again by parseFunctionBody. res.async = true; this.parseFunctionBody(res, true); - this.state.inAsync = oldInAsync; - this.state.inGenerator = oldInGenerator; return this.finishNode(res, "ArrowFunctionExpression"); } @@ -1721,11 +1726,12 @@ export default (superClass: Class): Class => classBody: N.ClassBody, member: any, state: { hadConstructor: boolean }, + constructorAllowsSuper: boolean, ): void { const accessibility = this.parseAccessModifier(); if (accessibility) member.accessibility = accessibility; - super.parseClassMember(classBody, member, state); + super.parseClassMember(classBody, member, state, constructorAllowsSuper); } parseClassMemberWithIsStatic( @@ -1733,6 +1739,7 @@ export default (superClass: Class): Class => member: any, state: { hadConstructor: boolean }, isStatic: boolean, + constructorAllowsSuper: boolean, ): void { const methodOrProp: N.ClassMethod | N.ClassProperty = member; const prop: N.ClassProperty = member; @@ -1773,7 +1780,13 @@ export default (superClass: Class): Class => return; } - super.parseClassMemberWithIsStatic(classBody, member, state, isStatic); + super.parseClassMemberWithIsStatic( + classBody, + member, + state, + isStatic, + constructorAllowsSuper, + ); } parsePostMemberNameModifiers( @@ -1923,6 +1936,7 @@ export default (superClass: Class): Class => isGenerator: boolean, isAsync: boolean, isConstructor: boolean, + allowsDirectSuper: boolean, ): void { const typeParameters = this.tsTryParseTypeParameters(); if (typeParameters) method.typeParameters = typeParameters; @@ -1932,6 +1946,7 @@ export default (superClass: Class): Class => isGenerator, isAsync, isConstructor, + allowsDirectSuper, ); } @@ -2154,7 +2169,7 @@ export default (superClass: Class): Class => checkLVal( expr: N.Expression, - isBinding: ?boolean, + bindingType: ?BindingTypes = BIND_NONE, checkClashes: ?{ [key: string]: boolean }, contextDescription: string, ): void { @@ -2167,7 +2182,7 @@ export default (superClass: Class): Class => case "TSParameterProperty": this.checkLVal( expr.parameter, - isBinding, + bindingType, checkClashes, "parameter property", ); @@ -2177,13 +2192,13 @@ export default (superClass: Class): Class => case "TSTypeAssertion": this.checkLVal( expr.expression, - isBinding, + bindingType, checkClashes, contextDescription, ); return; default: - super.checkLVal(expr, isBinding, checkClashes, contextDescription); + super.checkLVal(expr, bindingType, checkClashes, contextDescription); return; } } diff --git a/packages/babel-parser/src/tokenizer/context.js b/packages/babel-parser/src/tokenizer/context.js index 6add1a4cf7d3..f89897b27a04 100644 --- a/packages/babel-parser/src/tokenizer/context.js +++ b/packages/babel-parser/src/tokenizer/context.js @@ -60,7 +60,7 @@ tt.name.updateContext = function(prevType) { if (prevType !== tt.dot) { if ( (this.state.value === "of" && !this.state.exprAllowed) || - (this.state.value === "yield" && this.state.inGenerator) + (this.state.value === "yield" && this.scope.inGenerator) ) { allowed = true; } diff --git a/packages/babel-parser/src/tokenizer/state.js b/packages/babel-parser/src/tokenizer/state.js index 0215532dd0f8..c8ef367425dc 100644 --- a/packages/babel-parser/src/tokenizer/state.js +++ b/packages/babel-parser/src/tokenizer/state.js @@ -66,13 +66,9 @@ export default class State { // and then convert them, we need to track it. commaAfterSpreadAt: number = -1; - // Flags to track whether we are in a function, a generator. - inFunction: boolean = false; + // Flags to track inParameters: boolean = false; maybeInArrowParameters: boolean = false; - inGenerator: boolean = false; - inMethod: boolean | N.MethodKind = false; - inAsync: boolean = false; inPipeline: boolean = false; inType: boolean = false; noAnonFunctionType: boolean = false; diff --git a/packages/babel-parser/src/util/scope.js b/packages/babel-parser/src/util/scope.js new file mode 100644 index 000000000000..496814cd96b0 --- /dev/null +++ b/packages/babel-parser/src/util/scope.js @@ -0,0 +1,160 @@ +// @flow +import { + SCOPE_ARROW, + SCOPE_ASYNC, + SCOPE_DIRECT_SUPER, + SCOPE_FUNCTION, + SCOPE_GENERATOR, + SCOPE_SIMPLE_CATCH, + SCOPE_SUPER, + SCOPE_PROGRAM, + SCOPE_VAR, + BIND_SIMPLE_CATCH, + BIND_LEXICAL, + BIND_FUNCTION, + type ScopeFlags, + type BindingTypes, + SCOPE_CLASS, +} from "./scopeflags"; + +// Start an AST node, attaching a start offset. +class Scope { + flags: ScopeFlags; + // A list of var-declared names in the current lexical scope + var: string[] = []; + // A list of lexically-declared names in the current lexical scope + lexical: string[] = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + functions: string[] = []; + + constructor(flags: ScopeFlags) { + this.flags = flags; + } +} + +type raiseFunction = (number, string) => void; + +// The functions in this module keep track of declared variables in the +// current scope in order to detect duplicate variable names. +export default class ScopeHandler { + scopeStack: Array = []; + raise: raiseFunction; + inModule: boolean; + + constructor(raise: raiseFunction, inModule: boolean) { + this.raise = raise; + this.inModule = inModule; + } + + get inFunction() { + return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0; + } + get inGenerator() { + return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0; + } + get inAsync() { + return (this.currentVarScope().flags & SCOPE_ASYNC) > 0; + } + get allowSuper() { + return (this.currentThisScope().flags & SCOPE_SUPER) > 0; + } + get allowDirectSuper() { + return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0; + } + get inNonArrowFunction() { + return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0; + } + get treatFunctionsAsVar() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + } + + enter(flags: ScopeFlags) { + this.scopeStack.push(new Scope(flags)); + } + + exit() { + this.scopeStack.pop(); + } + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + treatFunctionsAsVarInScope(scope: Scope): boolean { + return !!( + scope.flags & SCOPE_FUNCTION || + (!this.inModule && scope.flags & SCOPE_PROGRAM) + ); + } + + declareName(name: string, bindingType: ?BindingTypes, pos: number) { + let redeclared = false; + if (bindingType === BIND_LEXICAL) { + const scope = this.currentScope(); + redeclared = + scope.lexical.indexOf(name) > -1 || + scope.functions.indexOf(name) > -1 || + scope.var.indexOf(name) > -1; + scope.lexical.push(name); + } else if (bindingType === BIND_SIMPLE_CATCH) { + const scope = this.currentScope(); + scope.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + const scope = this.currentScope(); + if (this.treatFunctionsAsVar) { + redeclared = scope.lexical.indexOf(name) > -1; + } else { + redeclared = + scope.lexical.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + } + scope.functions.push(name); + } else { + for (let i = this.scopeStack.length - 1; i >= 0; --i) { + const scope = this.scopeStack[i]; + if ( + (scope.lexical.indexOf(name) > -1 && + !(scope.flags & SCOPE_SIMPLE_CATCH) && + scope.lexical[0] === name) || + (!this.treatFunctionsAsVarInScope(scope) && + scope.functions.indexOf(name) > -1) + ) { + redeclared = true; + break; + } + scope.var.push(name); + + if (scope.flags & SCOPE_VAR) break; + } + } + if (redeclared) { + this.raise(pos, `Identifier '${name}' has already been declared`); + } + } + + currentScope(): Scope { + return this.scopeStack[this.scopeStack.length - 1]; + } + + // $FlowIgnore + currentVarScope(): Scope { + for (let i = this.scopeStack.length - 1; ; i--) { + const scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { + return scope; + } + } + } + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + // $FlowIgnore + currentThisScope(): Scope { + for (let i = this.scopeStack.length - 1; ; i--) { + const scope = this.scopeStack[i]; + if ( + (scope.flags & SCOPE_VAR || scope.flags & SCOPE_CLASS) && + !(scope.flags & SCOPE_ARROW) + ) { + return scope; + } + } + } +} diff --git a/packages/babel-parser/src/util/scopeflags.js b/packages/babel-parser/src/util/scopeflags.js new file mode 100644 index 000000000000..35ba7fe30301 --- /dev/null +++ b/packages/babel-parser/src/util/scopeflags.js @@ -0,0 +1,52 @@ +// @flow + +// Each scope gets a bitset that may contain these flags +// prettier-ignore +export const SCOPE_OTHER = 0b000000000, + SCOPE_PROGRAM = 0b000000001, + SCOPE_FUNCTION = 0b000000010, + SCOPE_ASYNC = 0b000000100, + SCOPE_GENERATOR = 0b000001000, + SCOPE_ARROW = 0b000010000, + SCOPE_SIMPLE_CATCH = 0b000100000, + SCOPE_SUPER = 0b001000000, + SCOPE_DIRECT_SUPER = 0b010000000, + SCOPE_CLASS = 0b100000000, + SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION; + +export type ScopeFlags = + | typeof SCOPE_OTHER + | typeof SCOPE_PROGRAM + | typeof SCOPE_FUNCTION + | typeof SCOPE_VAR + | typeof SCOPE_ASYNC + | typeof SCOPE_GENERATOR + | typeof SCOPE_ARROW + | typeof SCOPE_SIMPLE_CATCH + | typeof SCOPE_SUPER + | typeof SCOPE_DIRECT_SUPER + | typeof SCOPE_CLASS; + +export function functionFlags(isAsync: boolean, isGenerator: boolean) { + return ( + SCOPE_FUNCTION | + (isAsync ? SCOPE_ASYNC : 0) | + (isGenerator ? SCOPE_GENERATOR : 0) + ); +} + +// Used in checkLVal and declareName to determine the type of a binding +export const BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + +export type BindingTypes = + | typeof BIND_NONE + | typeof BIND_VAR + | typeof BIND_LEXICAL + | typeof BIND_FUNCTION + | typeof BIND_SIMPLE_CATCH + | typeof BIND_OUTSIDE; diff --git a/packages/babel-parser/test/expressions/is-expression-babel-parser/fail/7/options.json b/packages/babel-parser/test/expressions/is-expression-babel-parser/fail/7/options.json index d58bb015bf01..12b18792fcc4 100644 --- a/packages/babel-parser/test/expressions/is-expression-babel-parser/fail/7/options.json +++ b/packages/babel-parser/test/expressions/is-expression-babel-parser/fail/7/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:10)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/options.json b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/options.json index c1cad1bfedad..05a7826ae8ba 100644 --- a/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/options.json +++ b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-inside-loop/options.json @@ -1,3 +1,3 @@ { - "throws": "Function declaration not allowed in this context (1:10)" + "throws": "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement (1:10)" } diff --git a/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/options.json b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/options.json index 1397e6a76220..395620bfa2f8 100644 --- a/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/options.json +++ b/packages/babel-parser/test/fixtures/core/categorized/invalid-fn-decl-labeled-inside-loop/options.json @@ -1,3 +1,3 @@ { - "throws": "Function declaration not allowed in this context (1:20)" + "throws": "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement (1:20)" } diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/input.js new file mode 100644 index 000000000000..0ed8680e4854 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/input.js @@ -0,0 +1,3 @@ +try { +} catch ([foo, foo]) { +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/options.json new file mode 100644 index 000000000000..70121ca46ead --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-arr-destr/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (2:15)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/input.js new file mode 100644 index 000000000000..5ccd99323ac8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/input.js @@ -0,0 +1 @@ +let foo; try {} catch (foo) {} let foo; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/options.json new file mode 100644 index 000000000000..386e81ecdc4c --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-dbl-let/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (1:35)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/input.js new file mode 100644 index 000000000000..c53b6b3d03fc --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/input.js @@ -0,0 +1,4 @@ +try { +} catch (foo) { + function foo() {} +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/options.json new file mode 100644 index 000000000000..62b0c73eb164 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-func/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (3:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-hang-func/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-hang-func/input.js new file mode 100644 index 000000000000..32d85119a543 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-hang-func/input.js @@ -0,0 +1,4 @@ +try { +} catch (foo) { + if (1) function foo() {} +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-hang-func/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-hang-func/output.json new file mode 100644 index 000000000000..b576780b7063 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-hang-func/output.json @@ -0,0 +1,207 @@ +{ + "type": "File", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "TryStatement", + "start": 0, + "end": 50, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "block": { + "type": "BlockStatement", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 2, + "column": 1 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 8, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "param": { + "type": "Identifier", + "start": 15, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "body": { + "type": "BlockStatement", + "start": 20, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 24, + "end": 48, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 26 + } + }, + "test": { + "type": "NumericLiteral", + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + }, + "consequent": { + "type": "FunctionDeclaration", + "start": 31, + "end": 48, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + }, + "id": { + "type": "Identifier", + "start": 40, + "end": 43, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 46, + "end": 48, + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 26 + } + }, + "body": [], + "directives": [] + } + }, + "alternate": null + } + ], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let-outside/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let-outside/input.js new file mode 100644 index 000000000000..f223972849fe --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let-outside/input.js @@ -0,0 +1,4 @@ +try { +} catch (foo) { +} +let foo; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let-outside/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let-outside/output.json new file mode 100644 index 000000000000..677fad5fcdc7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let-outside/output.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "TryStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "block": { + "type": "BlockStatement", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 2, + "column": 1 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 8, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "param": { + "type": "Identifier", + "start": 15, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "body": { + "type": "BlockStatement", + "start": 20, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + }, + { + "type": "VariableDeclaration", + "start": 24, + "end": 32, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 28, + "end": 31, + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 28, + "end": 31, + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/input.js new file mode 100644 index 000000000000..8e4af00ffaed --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/input.js @@ -0,0 +1,4 @@ +try { +} catch (foo) { + let foo; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/options.json new file mode 100644 index 000000000000..254a763e653e --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-let/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (3:6)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/input.js new file mode 100644 index 000000000000..b8a800685aa4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/input.js @@ -0,0 +1,3 @@ +try { +} catch ({ a: foo, b: { c: [foo] } }) { +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/options.json new file mode 100644 index 000000000000..a00c2989e1b1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-obj-destr/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (2:28)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/input.js new file mode 100644 index 000000000000..0c5630af7e93 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/input.js @@ -0,0 +1,4 @@ +try { +} catch ([foo]) { + var foo; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/options.json new file mode 100644 index 000000000000..ff69adb0860a --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-arr-destr/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (3:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-nested/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-nested/input.js new file mode 100644 index 000000000000..6cdcb267c2b3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-nested/input.js @@ -0,0 +1,7 @@ +try { +} catch (foo) { + try { + } catch (_) { + var foo; + } +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-nested/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-nested/output.json new file mode 100644 index 000000000000..6b4c229346ab --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-nested/output.json @@ -0,0 +1,254 @@ +{ + "type": "File", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "TryStatement", + "start": 0, + "end": 64, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "block": { + "type": "BlockStatement", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 2, + "column": 1 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 8, + "end": 64, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "param": { + "type": "Identifier", + "start": 15, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "body": { + "type": "BlockStatement", + "start": 20, + "end": 64, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 7, + "column": 1 + } + }, + "body": [ + { + "type": "TryStatement", + "start": 24, + "end": 62, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + }, + "block": { + "type": "BlockStatement", + "start": 28, + "end": 33, + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 4, + "column": 3 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 34, + "end": 62, + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 6, + "column": 3 + } + }, + "param": { + "type": "Identifier", + "start": 41, + "end": 42, + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 12 + }, + "identifierName": "_" + }, + "name": "_" + }, + "body": { + "type": "BlockStatement", + "start": 44, + "end": 62, + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 6, + "column": 3 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 50, + "end": 58, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 12 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 54, + "end": 57, + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 11 + } + }, + "id": { + "type": "Identifier", + "start": 54, + "end": 57, + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 11 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/input.js new file mode 100644 index 000000000000..a93f6a37bda5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/input.js @@ -0,0 +1,4 @@ +try { +} catch ({ foo }) { + var foo; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/options.json new file mode 100644 index 000000000000..ff69adb0860a --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-obj-destr/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (3:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-outside/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-outside/input.js new file mode 100644 index 000000000000..cd2df9964963 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-outside/input.js @@ -0,0 +1,4 @@ +try { +} catch (foo) { +} +var foo; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-outside/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-outside/output.json new file mode 100644 index 000000000000..439f7f105f01 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var-outside/output.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "TryStatement", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "block": { + "type": "BlockStatement", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 2, + "column": 1 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 8, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "param": { + "type": "Identifier", + "start": 15, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "body": { + "type": "BlockStatement", + "start": 20, + "end": 23, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + }, + { + "type": "VariableDeclaration", + "start": 24, + "end": 32, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 28, + "end": 31, + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 28, + "end": 31, + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var/input.js new file mode 100644 index 000000000000..e2983d96dca8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var/input.js @@ -0,0 +1,4 @@ +try { +} catch (foo) { + var foo; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var/output.json new file mode 100644 index 000000000000..66d668784cab --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-catch-var/output.json @@ -0,0 +1,170 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "TryStatement", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "block": { + "type": "BlockStatement", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 2, + "column": 1 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 8, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "param": { + "type": "Identifier", + "start": 15, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "body": { + "type": "BlockStatement", + "start": 20, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 24, + "end": 32, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 28, + "end": 31, + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 28, + "end": 31, + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 9 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [] + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/input.js new file mode 100644 index 000000000000..3996f21e1238 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/input.js @@ -0,0 +1,2 @@ +class foo {}; +class foo {}; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/options.json new file mode 100644 index 000000000000..cdd0ac832c57 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-class/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (2:6)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/input.js new file mode 100644 index 000000000000..0f7aaf2b6905 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/input.js @@ -0,0 +1,2 @@ +class foo {}; +const foo = 1; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/options.json new file mode 100644 index 000000000000..c45b9bf38290 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-const/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (2:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/input.js new file mode 100644 index 000000000000..0953b37d0ca1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/input.js @@ -0,0 +1,2 @@ +class foo {}; +function foo () {}; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/options.json new file mode 100644 index 000000000000..58aaf9d99d22 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-func/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (2:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/input.js new file mode 100644 index 000000000000..970f577a71e9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/input.js @@ -0,0 +1,2 @@ +class foo {}; +let foo = 1; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/options.json new file mode 100644 index 000000000000..bf89e4692c99 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-let/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (2:4)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/input.js new file mode 100644 index 000000000000..0cbd916cdb6b --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/input.js @@ -0,0 +1,2 @@ +class foo {}; +var foo; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/options.json new file mode 100644 index 000000000000..bf89e4692c99 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-class-var/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (2:4)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/input.js new file mode 100644 index 000000000000..206de74b498c --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/input.js @@ -0,0 +1 @@ +const foo=1, foo=2; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/options.json new file mode 100644 index 000000000000..d62aabfd1b07 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-const-const/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (1:13)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/input.js new file mode 100644 index 000000000000..b5a6ac21d8aa --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/input.js @@ -0,0 +1 @@ +{ function f() {} function* f() {} } diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/options.json new file mode 100644 index 000000000000..c083e3d4c063 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-gen/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'f' has already been declared (1:28)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/input.js new file mode 100644 index 000000000000..31ea14cffbb8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/input.js @@ -0,0 +1 @@ +{ function foo() {} function foo() {} } diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/options.json new file mode 100644 index 000000000000..3f4250fbe917 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module-sloppy/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Identifier 'foo' has already been declared (1:29)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/input.js new file mode 100644 index 000000000000..11a6da2a7eb8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/input.js @@ -0,0 +1,2 @@ +function foo() {} +function foo() {} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/options.json new file mode 100644 index 000000000000..23553cce3705 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-module/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws":"Identifier 'foo' has already been declared (2:9)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/input.js new file mode 100644 index 000000000000..31ea14cffbb8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/input.js @@ -0,0 +1 @@ +{ function foo() {} function foo() {} } diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/options.json new file mode 100644 index 000000000000..b412ffe6712f --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/options.json @@ -0,0 +1,3 @@ +{ + "sourceType": "script" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/output.json new file mode 100644 index 000000000000..94ae24d249a9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script-sloppy/output.json @@ -0,0 +1,157 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "BlockStatement", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "start": 2, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "id": { + "type": "Identifier", + "start": 11, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 14 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "FunctionDeclaration", + "start": 20, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "id": { + "type": "Identifier", + "start": 29, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 32 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 35, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/input.js new file mode 100644 index 000000000000..11a6da2a7eb8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/input.js @@ -0,0 +1,2 @@ +function foo() {} +function foo() {} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/options.json new file mode 100644 index 000000000000..b412ffe6712f --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/options.json @@ -0,0 +1,3 @@ +{ + "sourceType": "script" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/output.json new file mode 100644 index 000000000000..af377ce80461 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-script/output.json @@ -0,0 +1,139 @@ +{ + "type": "File", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "FunctionDeclaration", + "start": 18, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 17 + } + }, + "id": { + "type": "Identifier", + "start": 27, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 33, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 17 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/input.js new file mode 100644 index 000000000000..7f32f625bccf --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/input.js @@ -0,0 +1,4 @@ +{ + function foo() {} + var foo = 1; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/options.json new file mode 100644 index 000000000000..ff69adb0860a --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var-sloppy/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (3:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var/input.js new file mode 100644 index 000000000000..3248c1cf455b --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var/input.js @@ -0,0 +1,2 @@ +function foo() {} +var foo = 1; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var/output.json new file mode 100644 index 000000000000..d2a2c6f9982d --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-func-var/output.json @@ -0,0 +1,157 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 15, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "VariableDeclaration", + "start": 18, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 22, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + }, + "id": { + "type": "Identifier", + "start": 22, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": { + "type": "NumericLiteral", + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + ], + "kind": "var" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/input.js new file mode 100644 index 000000000000..cc9c09466785 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/input.js @@ -0,0 +1 @@ +{ function* f() {} function f() {} } diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/options.json new file mode 100644 index 000000000000..c083e3d4c063 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-func/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'f' has already been declared (1:28)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/input.js new file mode 100644 index 000000000000..a43e0c8581d5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/input.js @@ -0,0 +1,2 @@ +function *foo() {}; +function *foo() {}; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/options.json new file mode 100644 index 000000000000..b412ffe6712f --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/options.json @@ -0,0 +1,3 @@ +{ + "sourceType": "script" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/output.json new file mode 100644 index 000000000000..e5bce9fb21da --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-gen-gen-script/output.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "id": { + "type": "Identifier", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": true, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 16, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "EmptyStatement", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "FunctionDeclaration", + "start": 20, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "id": { + "type": "Identifier", + "start": 30, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "generator": true, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 36, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "EmptyStatement", + "start": 38, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/input.js new file mode 100644 index 000000000000..60494395b6a6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/input.js @@ -0,0 +1 @@ +let foo, foo; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/options.json new file mode 100644 index 000000000000..714354e14501 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-let-let/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/input.js new file mode 100644 index 000000000000..79a65c0ee2de --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/input.js @@ -0,0 +1,4 @@ +{ + let a; + { var a; } +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/options.json new file mode 100644 index 000000000000..a0925d495610 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-let-var/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'a' has already been declared (3:8)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-var-let/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-var-let/input.js new file mode 100644 index 000000000000..b5bbb6d44168 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-var-let/input.js @@ -0,0 +1,4 @@ +{ + var a; + { let a; } +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-var-let/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-var-let/output.json new file mode 100644 index 000000000000..239db26973c2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-nested-var-let/output.json @@ -0,0 +1,173 @@ +{ + "type": "File", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "BlockStatement", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 4, + "end": 10, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "a" + }, + "name": "a" + }, + "init": null + } + ], + "kind": "var" + }, + { + "type": "BlockStatement", + "start": 13, + "end": 23, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 15, + "end": 21, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + }, + "identifierName": "a" + }, + "name": "a" + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } + ], + "directives": [] + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-var-var/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-var-var/input.js new file mode 100644 index 000000000000..260da8ced85a --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-var-var/input.js @@ -0,0 +1 @@ +var foo, foo; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-var-var/output.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-var-var/output.json new file mode 100644 index 000000000000..0be8a0eea29f --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-var-var/output.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + }, + { + "type": "VariableDeclarator", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/let-assign/input.js b/packages/babel-parser/test/fixtures/core/scope/let-assign/input.js new file mode 100644 index 000000000000..a66eb5ab6774 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/let-assign/input.js @@ -0,0 +1 @@ +let x = 1; x = 2; diff --git a/packages/babel-parser/test/fixtures/core/scope/let-assign/output.json b/packages/babel-parser/test/fixtures/core/scope/let-assign/output.json new file mode 100644 index 000000000000..508af9fc85d2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/let-assign/output.json @@ -0,0 +1,173 @@ +{ + "type": "File", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "x" + }, + "name": "x" + }, + "init": { + "type": "NumericLiteral", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + ], + "kind": "let" + }, + { + "type": "ExpressionStatement", + "start": 11, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 11, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 11, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "x" + }, + "name": "x" + }, + "right": { + "type": "NumericLiteral", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/401/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/401/options.json index 2a28555f76db..fa57d4f43f70 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/401/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/401/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:9)" + "throws": "Unexpected keyword 'null' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/402/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/402/options.json index 2a28555f76db..c4a7ead13704 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/402/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/402/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:9)" + "throws": "Unexpected keyword 'true' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/403/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/403/options.json index 2a28555f76db..0e9cf8962aae 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/403/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/403/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:9)" + "throws": "Unexpected keyword 'false' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/404/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/404/options.json index 2a28555f76db..a87aa98c0e01 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/404/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/404/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:9)" + "throws": "Unexpected keyword 'if' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/514/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/514/options.json index e23388601bb0..8b20b9a7df36 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/514/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/514/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:14)" + "throws": "Argument name clash (1:14)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/517/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/517/options.json index 660e54ca2a82..9d2a58081596 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/517/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/517/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:43)" + "throws": "Argument name clash (1:43)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/518/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/518/options.json index 28545ded1456..61c3bbb5abe0 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/518/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/518/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:15)" + "throws": "Argument name clash (1:15)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/519/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/519/options.json index 0f592c74a35b..ae469fbd59da 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/519/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/519/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:44)" + "throws": "Argument name clash (1:44)" } diff --git a/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/options.json b/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/options.json index faef53359bea..9461325c423a 100644 --- a/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/options.json +++ b/packages/babel-parser/test/fixtures/es2015/class-methods/direct-super-outside-constructor/options.json @@ -1,3 +1,3 @@ { - "throws": "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (2:8)" + "throws": "super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (2:8)" } diff --git a/packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/input.js b/packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/input.js new file mode 100644 index 000000000000..b6864d7c339c --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/input.js @@ -0,0 +1 @@ +if (1) function *foo() {} diff --git a/packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/options.json b/packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/options.json new file mode 100644 index 000000000000..8cdac51705a1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/generators/invalid-hanging/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Generators can only be declared at the top level or inside a block (1:16)" +} diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/expression/input.js b/packages/babel-parser/test/fixtures/es2015/meta-properties/expression/input.js new file mode 100644 index 000000000000..932ee841bdb3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/expression/input.js @@ -0,0 +1,3 @@ +const A = function() { + new.target; +}; diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/expression/output.json b/packages/babel-parser/test/fixtures/es2015/meta-properties/expression/output.json new file mode 100644 index 000000000000..f5f3e41b514d --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/expression/output.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "A" + }, + "name": "A" + }, + "init": { + "type": "FunctionExpression", + "start": 10, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 21, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 25, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "expression": { + "type": "MetaProperty", + "start": 25, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "meta": { + "type": "Identifier", + "start": 25, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 5 + }, + "identifierName": "new" + }, + "name": "new" + }, + "property": { + "type": "Identifier", + "start": 29, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "target" + }, + "name": "target" + } + } + } + ], + "directives": [] + } + } + } + ], + "kind": "const" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/input.js b/packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/input.js new file mode 100644 index 000000000000..f13bdd7175a1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/input.js @@ -0,0 +1,3 @@ +const A = () => { + new.target; +} diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/options.json b/packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/options.json new file mode 100644 index 000000000000..4be1533d8e29 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/invalid-arrow-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "new.target can only be used in functions (2:2)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/nested-arrow-function/input.js b/packages/babel-parser/test/fixtures/es2015/meta-properties/nested-arrow-function/input.js new file mode 100644 index 000000000000..a3f74c60f128 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/nested-arrow-function/input.js @@ -0,0 +1 @@ +function A() { return () => new.target } diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/nested-arrow-function/output.json b/packages/babel-parser/test/fixtures/es2015/meta-properties/nested-arrow-function/output.json new file mode 100644 index 000000000000..447bc2741c32 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/nested-arrow-function/output.json @@ -0,0 +1,171 @@ +{ + "type": "File", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "A" + }, + "name": "A" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 15, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "argument": { + "type": "ArrowFunctionExpression", + "start": 22, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "MetaProperty", + "start": 28, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "meta": { + "type": "Identifier", + "start": 28, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + }, + "identifierName": "new" + }, + "name": "new" + }, + "property": { + "type": "Identifier", + "start": 32, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 38 + }, + "identifierName": "target" + }, + "name": "target" + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/statement/input.js b/packages/babel-parser/test/fixtures/es2015/meta-properties/statement/input.js new file mode 100644 index 000000000000..ecd7c772f6c6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/statement/input.js @@ -0,0 +1,3 @@ +function A() { + new.target; +} diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/statement/output.json b/packages/babel-parser/test/fixtures/es2015/meta-properties/statement/output.json new file mode 100644 index 000000000000..80af5ec9a8db --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/statement/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "A" + }, + "name": "A" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 13, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 17, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "expression": { + "type": "MetaProperty", + "start": 17, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "meta": { + "type": "Identifier", + "start": 17, + "end": 20, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 5 + }, + "identifierName": "new" + }, + "name": "new" + }, + "property": { + "type": "Identifier", + "start": 21, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "target" + }, + "name": "target" + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/options.json index c8c111d88d34..446a980f5409 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring10/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:20)" + "throws": "Identifier 'foo' has already been declared (2:20)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/options.json index cf1dcd59dc8e..09b3fa97a0d1 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring11/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo4` has already been exported. Exported identifiers must be unique. (2:50)" + "throws": "Identifier 'foo4' has already been declared (2:50)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/options.json index c2f8cdda986d..3a7173c837e3 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring12/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo4` has already been exported. Exported identifiers must be unique. (2:49)" + "throws": "Identifier 'foo4' has already been declared (2:49)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/options.json index 1cd229e76cc6..d3fc42a61ba1 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo4` has already been exported. Exported identifiers must be unique. (2:58)" + "throws": "Identifier 'foo4' has already been declared (2:58)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/options.json index e6aaa311fc54..80640e0ce127 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring14/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:21)" + "throws": "Identifier 'foo' has already been declared (2:21)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/options.json index 4eb6f26f952b..ea3a9b62f493 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring15/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo2` has already been exported. Exported identifiers must be unique. (2:13)" + "throws": "Identifier 'foo2' has already been declared (2:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/options.json index 4f3ba9d9d20a..42c862ad273a 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring16/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:22)" + "throws": "Identifier 'foo' has already been declared (2:22)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/options.json index dab0e075b01d..125c2618435d 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring17/options.json @@ -1,3 +1,3 @@ { - "throws": "`bar` has already been exported. Exported identifiers must be unique. (2:13)" + "throws": "Identifier 'bar' has already been declared (2:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/options.json index 7ee0cc434182..bf345ea77127 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring18/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:28)" + "throws": "Identifier 'foo' has already been declared (2:28)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/options.json index 72b54a0a77cb..bf2483362193 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring19/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:29)" + "throws": "Identifier 'foo' has already been declared (2:29)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/options.json index f28333f6f8ad..2cbe06c40914 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring2/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:15)" + "throws": "Identifier 'foo' has already been declared (2:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/options.json index 1923e4752336..d36390356990 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring3/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:0)" + "throws": "Identifier 'foo' has already been declared (2:16)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/options.json index 37d131b70f3c..46358493589c 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring4/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:14)" + "throws": "Identifier 'foo' has already been declared (2:14)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/options.json index 1923e4752336..d36390356990 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring5/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:0)" + "throws": "Identifier 'foo' has already been declared (2:16)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/options.json index 37d131b70f3c..46358493589c 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring6/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:14)" + "throws": "Identifier 'foo' has already been declared (2:14)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/options.json index f28333f6f8ad..2cbe06c40914 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring7/options.json @@ -1,3 +1,3 @@ { - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:15)" + "throws": "Identifier 'foo' has already been declared (2:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/options.json index 8ef246d83cc0..982078d803c6 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring8/options.json @@ -1,3 +1,3 @@ { - "throws": "`Foo` has already been exported. Exported identifiers must be unique. (2:15)" + "throws": "Identifier 'Foo' has already been declared (2:15)" } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/options.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/options.json index 6b46482b6ed6..f79b5469b1c0 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/options.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring9/options.json @@ -1,3 +1,3 @@ { - "throws": "`Foo` has already been exported. Exported identifiers must be unique. (2:14)" + "throws": "Identifier 'Foo' has already been declared (2:14)" } diff --git a/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-const/options.json b/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-const/options.json index 91b308200e05..a064a678e553 100644 --- a/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-const/options.json +++ b/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-const/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:5)" + "throws": "Lexical declaration cannot appear in a single-statement context (1:5)" } diff --git a/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-async/options.json b/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-async/options.json index 042d7e196224..95aaacb458f8 100644 --- a/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-async/options.json +++ b/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-async/options.json @@ -1,3 +1,3 @@ { - "throws": "Function declaration not allowed in this context (1:5)" + "throws": "Async functions can only be declared at the top level or inside a block (1:5)" } diff --git a/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-generator/options.json b/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-generator/options.json index 91b308200e05..3f6e90c7cd27 100644 --- a/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-generator/options.json +++ b/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-generator/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:5)" + "throws": "Generators can only be declared at the top level or inside a block (1:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-strict/options.json b/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-strict/options.json index ee5cd5b13513..1eebe15c408e 100644 --- a/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-strict/options.json +++ b/packages/babel-parser/test/fixtures/es2015/statements/label-invalid-func-strict/options.json @@ -1,3 +1,3 @@ { - "throws": "Function declaration not allowed in this context (1:35)" + "throws": "In strict mode code, functions can only be declared at top level or inside a block (1:35)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/123/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/123/options.json new file mode 100644 index 000000000000..fdf74cefe1b2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/123/options.json @@ -0,0 +1,3 @@ +{ + "throws": "super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (1:40)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/123/output.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/123/output.json deleted file mode 100644 index 56f49a7b6964..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/123/output.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 51, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 51 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 51, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 51 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "ExpressionStatement", - "start": 14, - "end": 51, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 51 - } - }, - "expression": { - "type": "ClassExpression", - "start": 15, - "end": 50, - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 50 - } - }, - "id": { - "type": "Identifier", - "start": 21, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 22 - }, - "identifierName": "A" - }, - "name": "A" - }, - "superClass": null, - "body": { - "type": "ClassBody", - "start": 23, - "end": 50, - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 50 - } - }, - "body": [ - { - "type": "ClassMethod", - "start": 24, - "end": 49, - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 49 - } - }, - "static": false, - "key": { - "type": "Identifier", - "start": 24, - "end": 35, - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 35 - }, - "identifierName": "constructor" - }, - "name": "constructor" - }, - "computed": false, - "kind": "constructor", - "id": null, - "generator": false, - "async": false, - "params": [], - "body": { - "type": "BlockStatement", - "start": 38, - "end": 49, - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 49 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 40, - "end": 47, - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 47 - } - }, - "expression": { - "type": "CallExpression", - "start": 40, - "end": 47, - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 47 - } - }, - "callee": { - "type": "Super", - "start": 40, - "end": 45, - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 45 - } - } - }, - "arguments": [] - } - } - ], - "directives": [] - } - } - ] - }, - "extra": { - "parenthesized": true, - "parenStart": 14 - } - } - } - ], - "directives": [ - { - "type": "Directive", - "start": 0, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "value": { - "type": "DirectiveLiteral", - "start": 0, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "value": "use strict", - "extra": { - "raw": "\"use strict\"", - "rawValue": "use strict" - } - } - } - ] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/166/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/166/options.json new file mode 100644 index 000000000000..3481bedf3cc1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/166/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Argument name clash (1:16)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/166/output.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/166/output.json deleted file mode 100644 index 8f278a52ae1e..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/166/output.json +++ /dev/null @@ -1,177 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 22 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 22 - } - }, - "sourceType": "script", - "interpreter": null, - "body": [ - { - "type": "FunctionDeclaration", - "start": 0, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 22 - } - }, - "id": { - "type": "Identifier", - "start": 9, - "end": 10, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 10 - }, - "identifierName": "x" - }, - "name": "x" - }, - "generator": false, - "async": false, - "params": [ - { - "type": "Identifier", - "start": 11, - "end": 12, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 12 - }, - "identifierName": "a" - }, - "name": "a" - }, - { - "type": "ObjectPattern", - "start": 14, - "end": 19, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 19 - } - }, - "properties": [ - { - "type": "ObjectProperty", - "start": 16, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 17 - } - }, - "method": false, - "key": { - "type": "Identifier", - "start": 16, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "a" - }, - "name": "a" - }, - "computed": false, - "shorthand": true, - "value": { - "type": "Identifier", - "start": 16, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "a" - }, - "name": "a" - }, - "extra": { - "shorthand": true - } - } - ] - } - ], - "body": { - "type": "BlockStatement", - "start": 20, - "end": 22, - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 22 - } - }, - "body": [], - "directives": [] - } - } - ], - "directives": [] - } -} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/226/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/226/options.json index 2a28555f76db..74c1a72d5030 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/226/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/226/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:9)" + "throws": "Unexpected keyword 'default' (1:9)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/228/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/228/options.json index 9f34dba23230..a33dde469094 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/228/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/228/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:37)" + "throws": "Argument name clash (1:37)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/248/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/248/options.json index 6d0445e20eb7..b99fd35222b1 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/248/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/248/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:18)" + "throws": "Argument name clash (1:18)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/280/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/280/options.json index 0c0a9d0136e3..5cbee309bd50 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/280/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/280/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:30)" + "throws": "Argument name clash (1:30)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/281/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/281/options.json index 4773c60e5b99..8dba9882c0dc 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/281/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/281/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:47)" + "throws": "Argument name clash (1:47)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/329/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/329/options.json index 2a28555f76db..97818d2eea7e 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/329/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/329/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:9)" + "throws": "Lexical declaration cannot appear in a single-statement context (1:9)" } diff --git a/packages/babel-parser/test/fixtures/es2015/yield/accessor-name-inst-computed-yield-expr/input.js b/packages/babel-parser/test/fixtures/es2015/yield/accessor-name-inst-computed-yield-expr/input.js new file mode 100644 index 000000000000..c1ce97544cdb --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/yield/accessor-name-inst-computed-yield-expr/input.js @@ -0,0 +1,9 @@ +var yieldSet, C, iter; +function* g() { + class C_ { + get [yield]() { return 'get yield'; } + set [yield](param) { yieldSet = param; } + } + + C = C_; +} diff --git a/packages/babel-parser/test/fixtures/es2015/yield/accessor-name-inst-computed-yield-expr/output.json b/packages/babel-parser/test/fixtures/es2015/yield/accessor-name-inst-computed-yield-expr/output.json new file mode 100644 index 000000000000..1082894c21d5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/yield/accessor-name-inst-computed-yield-expr/output.json @@ -0,0 +1,552 @@ +{ + "type": "File", + "start": 0, + "end": 155, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 155, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "yieldSet" + }, + "name": "yieldSet" + }, + "init": null + }, + { + "type": "VariableDeclarator", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "id": { + "type": "Identifier", + "start": 14, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "C" + }, + "name": "C" + }, + "init": null + }, + { + "type": "VariableDeclarator", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "id": { + "type": "Identifier", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "iter" + }, + "name": "iter" + }, + "init": null + } + ], + "kind": "var" + }, + { + "type": "FunctionDeclaration", + "start": 23, + "end": 155, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 33, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + }, + "identifierName": "g" + }, + "name": "g" + }, + "generator": true, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 37, + "end": 155, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "body": [ + { + "type": "ClassDeclaration", + "start": 41, + "end": 142, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + }, + "id": { + "type": "Identifier", + "start": 47, + "end": 49, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + }, + "identifierName": "C_" + }, + "name": "C_" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 50, + "end": 142, + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 6, + "column": 3 + } + }, + "body": [ + { + "type": "ClassMethod", + "start": 56, + "end": 93, + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 41 + } + }, + "static": false, + "key": { + "type": "YieldExpression", + "start": 61, + "end": 66, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "delegate": false, + "argument": null + }, + "computed": true, + "kind": "get", + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 70, + "end": 93, + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 41 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 72, + "end": 91, + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 39 + } + }, + "argument": { + "type": "StringLiteral", + "start": 79, + "end": 90, + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 38 + } + }, + "extra": { + "rawValue": "get yield", + "raw": "'get yield'" + }, + "value": "get yield" + } + } + ], + "directives": [] + } + }, + { + "type": "ClassMethod", + "start": 98, + "end": 138, + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 44 + } + }, + "static": false, + "key": { + "type": "YieldExpression", + "start": 103, + "end": 108, + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 14 + } + }, + "delegate": false, + "argument": null + }, + "computed": true, + "kind": "set", + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 110, + "end": 115, + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 21 + }, + "identifierName": "param" + }, + "name": "param" + } + ], + "body": { + "type": "BlockStatement", + "start": 117, + "end": 138, + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 44 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 119, + "end": 136, + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 42 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 119, + "end": 135, + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 41 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 119, + "end": 127, + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 33 + }, + "identifierName": "yieldSet" + }, + "name": "yieldSet" + }, + "right": { + "type": "Identifier", + "start": 130, + "end": 135, + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 41 + }, + "identifierName": "param" + }, + "name": "param" + } + } + } + ], + "directives": [] + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 146, + "end": 153, + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 9 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 146, + "end": 152, + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 146, + "end": 147, + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 3 + }, + "identifierName": "C" + }, + "name": "C" + }, + "right": { + "type": "Identifier", + "start": 150, + "end": 152, + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 8 + }, + "identifierName": "C_" + }, + "name": "C_" + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern-default/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern-default/options.json index 5a257f4e5d33..12b18792fcc4 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern-default/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern-default/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:11)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern/options.json index 5a257f4e5d33..12b18792fcc4 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/array-pattern/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:11)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/arrow-function/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/arrow-function/options.json index 2e6ae0771c86..089b542c3704 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/arrow-function/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/arrow-function/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:9)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:8)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-arrow-function/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-arrow-function/options.json index 0c31636171e0..089b542c3704 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-arrow-function/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-arrow-function/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:15)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:8)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-function/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-function/options.json index ff8a46ae1aec..12b18792fcc4 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-function/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/async-function/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:17)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/default/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/default/options.json index 5a257f4e5d33..12b18792fcc4 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/default/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/default/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:11)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-function/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-function/options.json index 65ff709b5f39..12b18792fcc4 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-function/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-function/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:12)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-method/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-method/options.json index dd467e6578aa..9908b496fd2a 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-method/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/generator-method/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (2:6)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (2:5)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/method/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/method/options.json index ac620235e917..5d0e394f2b9d 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/method/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/method/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (2:4)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (2:3)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern-default/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern-default/options.json index 5a257f4e5d33..12b18792fcc4 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern-default/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern-default/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:11)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern/options.json index 5a257f4e5d33..12b18792fcc4 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/object-pattern/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:11)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/rest/options.json b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/rest/options.json index 5a257f4e5d33..12b18792fcc4 100644 --- a/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/rest/options.json +++ b/packages/babel-parser/test/fixtures/es2016/simple-parameter-list/rest/options.json @@ -1,3 +1,3 @@ { - "throws": "Non-simple parameter in strict mode (1:11)" + "throws": "Illegal 'use strict' directive in function with non-simple parameter list (1:0)" } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/options.json index c1cad1bfedad..4bcd823e98be 100644 --- a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/options.json +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-inside-loop/options.json @@ -1,3 +1,3 @@ { - "throws": "Function declaration not allowed in this context (1:10)" + "throws": "Async functions can only be declared at the top level or inside a block (1:10)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/options.json index b382a06ac5d7..6dad74eebd16 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/11/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:23)" + "throws": "Identifier 'foo' has already been declared (2:23)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/options.json index d6149ed84502..165223a448a3 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/12/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "`bar` has already been exported. Exported identifiers must be unique. (2:13)" + "throws": "Identifier 'bar' has already been declared (2:13)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/options.json index 8daa306ff731..68df28e41c41 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/13/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:30)" + "throws": "Identifier 'foo' has already been declared (2:30)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/options.json index a87b46d55ac6..280073b140f0 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/14/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:29)" + "throws": "Identifier 'foo' has already been declared (2:29)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/options.json index 8daa306ff731..68df28e41c41 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/15/options.json @@ -1,4 +1,4 @@ { "sourceType": "module", - "throws": "`foo` has already been exported. Exported identifiers must be unique. (2:30)" + "throws": "Identifier 'foo' has already been declared (2:30)" } diff --git a/packages/babel-parser/test/fixtures/esprima/declaration-function/dupe-param/options.json b/packages/babel-parser/test/fixtures/esprima/declaration-function/dupe-param/options.json index e23388601bb0..8b20b9a7df36 100644 --- a/packages/babel-parser/test/fixtures/esprima/declaration-function/dupe-param/options.json +++ b/packages/babel-parser/test/fixtures/esprima/declaration-function/dupe-param/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:14)" + "throws": "Argument name clash (1:14)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/options.json index 34197d2efee7..a4a6e207d28c 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-array-binding-pattern/invalid-dup-param/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:11)" + "throws": "Argument name clash (1:11)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/options.json index d498cd8bd087..49e8d8e86314 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-1/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (2:14)" + "throws": "Argument name clash (2:14)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/options.json index e3176a8e57eb..3829082a4878 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-2/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (2:17)" + "throws": "Argument name clash (2:17)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/options.json index 2d74a95450d0..782073313a19 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/dupe-param-3/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (2:19)" + "throws": "Argument name clash (2:19)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/input.js deleted file mode 100644 index 417d6fc8492f..000000000000 --- a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/input.js +++ /dev/null @@ -1 +0,0 @@ -try {} catch ([a,a]) {} diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json deleted file mode 100644 index 7d5bec6e9b7b..000000000000 --- a/packages/babel-parser/test/fixtures/esprima/es2015-array-pattern/patterned-catch-dupe/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Argument name clash in strict mode (1:17)" -} diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json index 4ebe77e8fc2b..fd74c5228531 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/complex-rest-in-arrow-not-allowed/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:7)" + "throws": "Argument name clash (1:7)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/options.json index 0590c2b7e6bf..368006ae58bd 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/invalid-duplicated-params/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:4)" + "throws": "Argument name clash (1:4)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json index 0590c2b7e6bf..368006ae58bd 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0092/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:4)" + "throws": "Argument name clash (1:4)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0093/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0093/options.json index 6d0445e20eb7..b99fd35222b1 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0093/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0093/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:18)" + "throws": "Argument name clash (1:18)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0142/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0142/options.json index 2a28555f76db..97818d2eea7e 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0142/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0142/options.json @@ -1,3 +1,3 @@ { - "throws": "Unexpected token (1:9)" + "throws": "Lexical declaration cannot appear in a single-statement context (1:9)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0240/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0240/options.json index e23388601bb0..8b20b9a7df36 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0240/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0240/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:14)" + "throws": "Argument name clash (1:14)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0243/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0243/options.json index 660e54ca2a82..9d2a58081596 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0243/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0243/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:43)" + "throws": "Argument name clash (1:43)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0244/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0244/options.json index 28545ded1456..61c3bbb5abe0 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0244/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0244/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:15)" + "throws": "Argument name clash (1:15)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0245/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0245/options.json index 0f592c74a35b..ae469fbd59da 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0245/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0245/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:44)" + "throws": "Argument name clash (1:44)" } diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0249/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0249/options.json index 172760cf2cf6..505798d5a203 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0249/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0249/options.json @@ -1,3 +1,3 @@ { - "throws": "Argument name clash in strict mode (1:36)" + "throws": "Argument name clash (1:36)" } diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-properties/super-call/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-properties/super-call/options.json index e20043c3fa2e..2154c844bfd7 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-properties/super-call/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-properties/super-call/options.json @@ -1,4 +1,4 @@ { "plugins": ["classPrivateProperties"], - "throws": "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (4:13)" + "throws": "super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (4:13)" } diff --git a/packages/babel-parser/test/fixtures/experimental/class-properties/super-call/options.json b/packages/babel-parser/test/fixtures/experimental/class-properties/super-call/options.json index 3f06e4fecfc3..e8d509e27740 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-properties/super-call/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-properties/super-call/options.json @@ -1,4 +1,4 @@ { "plugins": ["classProperties"], - "throws": "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'. (4:12)" + "throws": "super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class? (4:12)" } diff --git a/packages/babel-parser/test/fixtures/flow/declare-statements/15/input.js b/packages/babel-parser/test/fixtures/flow/declare-statements/15/input.js index e5d2353e55bd..63a4ecdb5b7e 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-statements/15/input.js +++ b/packages/babel-parser/test/fixtures/flow/declare-statements/15/input.js @@ -1,2 +1,2 @@ declare interface I { foo: string } -declare interface I { foo: T } +declare interface I2 { foo: T } diff --git a/packages/babel-parser/test/fixtures/flow/declare-statements/15/output.json b/packages/babel-parser/test/fixtures/flow/declare-statements/15/output.json index 6af031abc60f..619a44a76feb 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-statements/15/output.json +++ b/packages/babel-parser/test/fixtures/flow/declare-statements/15/output.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 69, + "end": 70, "loc": { "start": { "line": 1, @@ -9,13 +9,13 @@ }, "end": { "line": 2, - "column": 33 + "column": 34 } }, "program": { "type": "Program", "start": 0, - "end": 69, + "end": 70, "loc": { "start": { "line": 1, @@ -23,7 +23,7 @@ }, "end": { "line": 2, - "column": 33 + "column": 34 } }, "sourceType": "module", @@ -142,7 +142,7 @@ { "type": "DeclareInterface", "start": 36, - "end": 69, + "end": 70, "loc": { "start": { "line": 2, @@ -150,13 +150,13 @@ }, "end": { "line": 2, - "column": 33 + "column": 34 } }, "id": { "type": "Identifier", "start": 54, - "end": 55, + "end": 56, "loc": { "start": { "line": 2, @@ -164,39 +164,39 @@ }, "end": { "line": 2, - "column": 19 + "column": 20 }, - "identifierName": "I" + "identifierName": "I2" }, - "name": "I" + "name": "I2" }, "typeParameters": { "type": "TypeParameterDeclaration", - "start": 55, - "end": 58, + "start": 56, + "end": 59, "loc": { "start": { "line": 2, - "column": 19 + "column": 20 }, "end": { "line": 2, - "column": 22 + "column": 23 } }, "params": [ { "type": "TypeParameter", - "start": 56, - "end": 57, + "start": 57, + "end": 58, "loc": { "start": { "line": 2, - "column": 20 + "column": 21 }, "end": { "line": 2, - "column": 21 + "column": 22 } }, "name": "T", @@ -209,46 +209,46 @@ "mixins": [], "body": { "type": "ObjectTypeAnnotation", - "start": 59, - "end": 69, + "start": 60, + "end": 70, "loc": { "start": { "line": 2, - "column": 23 + "column": 24 }, "end": { "line": 2, - "column": 33 + "column": 34 } }, "callProperties": [], "properties": [ { "type": "ObjectTypeProperty", - "start": 61, - "end": 67, + "start": 62, + "end": 68, "loc": { "start": { "line": 2, - "column": 25 + "column": 26 }, "end": { "line": 2, - "column": 31 + "column": 32 } }, "key": { "type": "Identifier", - "start": 61, - "end": 64, + "start": 62, + "end": 65, "loc": { "start": { "line": 2, - "column": 25 + "column": 26 }, "end": { "line": 2, - "column": 28 + "column": 29 }, "identifierName": "foo" }, @@ -260,31 +260,31 @@ "method": false, "value": { "type": "GenericTypeAnnotation", - "start": 66, - "end": 67, + "start": 67, + "end": 68, "loc": { "start": { "line": 2, - "column": 30 + "column": 31 }, "end": { "line": 2, - "column": 31 + "column": 32 } }, "typeParameters": null, "id": { "type": "Identifier", - "start": 66, - "end": 67, + "start": 67, + "end": 68, "loc": { "start": { "line": 2, - "column": 30 + "column": 31 }, "end": { "line": 2, - "column": 31 + "column": 32 }, "identifierName": "T" }, diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-class/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-class/input.js new file mode 100644 index 000000000000..6165683a9167 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-class/input.js @@ -0,0 +1,2 @@ +const A = 1; +declare class A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-class/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-class/options.json new file mode 100644 index 000000000000..4a1b4e5c5cd4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-class/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:14)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-interface/input.js new file mode 100644 index 000000000000..c432acb46b72 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-interface/input.js @@ -0,0 +1,2 @@ +const A = 1; +declare interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-interface/options.json new file mode 100644 index 000000000000..187fea591b95 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-declare-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:18)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-interface/input.js new file mode 100644 index 000000000000..a03017e55c99 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-interface/input.js @@ -0,0 +1,2 @@ +const A = 1; +interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-interface/options.json new file mode 100644 index 000000000000..04242bd1565b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-const-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:10)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-class/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-class/input.js new file mode 100644 index 000000000000..32acf9e66e25 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-class/input.js @@ -0,0 +1,2 @@ +declare class A {} +declare class A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-interface/input.js new file mode 100644 index 000000000000..99bf15306148 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-interface/input.js @@ -0,0 +1,2 @@ +declare class A {} +declare interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-interface/options.json new file mode 100644 index 000000000000..187fea591b95 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-class-declare-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:18)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-func/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-func/input.js new file mode 100644 index 000000000000..c3a6f63af3b3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-func/input.js @@ -0,0 +1,2 @@ +declare function A(): void; +declare function A(): void; diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-func/output.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-func/output.json new file mode 100644 index 000000000000..c4c86f1991cd --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-func/output.json @@ -0,0 +1,197 @@ +{ + "type": "File", + "start": 0, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "DeclareFunction", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "id": { + "type": "Identifier", + "start": 17, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 26 + }, + "identifierName": "A" + }, + "name": "A", + "typeAnnotation": { + "type": "TypeAnnotation", + "start": 18, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "typeAnnotation": { + "type": "FunctionTypeAnnotation", + "start": 18, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "typeParameters": null, + "params": [], + "rest": null, + "returnType": { + "type": "VoidTypeAnnotation", + "start": 22, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + } + } + }, + "predicate": null + }, + { + "type": "DeclareFunction", + "start": 28, + "end": 55, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "id": { + "type": "Identifier", + "start": 45, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 26 + }, + "identifierName": "A" + }, + "name": "A", + "typeAnnotation": { + "type": "TypeAnnotation", + "start": 46, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "typeAnnotation": { + "type": "FunctionTypeAnnotation", + "start": 46, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "typeParameters": null, + "params": [], + "rest": null, + "returnType": { + "type": "VoidTypeAnnotation", + "start": 50, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 26 + } + } + } + } + } + }, + "predicate": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-var/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-var/input.js new file mode 100644 index 000000000000..e1e2e647fa89 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-var/input.js @@ -0,0 +1,2 @@ +declare function A(): void; +declare var A: number; diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-var/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-var/options.json new file mode 100644 index 000000000000..81dc2c90799f --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-declare-var/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:12)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-func/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-func/input.js new file mode 100644 index 000000000000..ccce4b510933 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-func/input.js @@ -0,0 +1,2 @@ +declare function A(): void; +function A() {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-func/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-func/options.json new file mode 100644 index 000000000000..5f6027f8dd3b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-func/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:9)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-let/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-let/input.js new file mode 100644 index 000000000000..58df0295d818 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-let/input.js @@ -0,0 +1,2 @@ +declare function A(): number; +let A; diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-let/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-let/options.json new file mode 100644 index 000000000000..b6ff3a4b0987 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-func-let/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:4)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-interface-declare-class/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-interface-declare-class/input.js new file mode 100644 index 000000000000..ab4fe6e51ff7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-interface-declare-class/input.js @@ -0,0 +1,2 @@ +declare interface A {} +declare class A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-interface-declare-class/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-interface-declare-class/options.json new file mode 100644 index 000000000000..4a1b4e5c5cd4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-interface-declare-class/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:14)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-declare-var/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-declare-var/input.js new file mode 100644 index 000000000000..7e5419c9a6c5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-declare-var/input.js @@ -0,0 +1,2 @@ +declare var A: number; +declare var A: number; diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-declare-var/output.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-declare-var/output.json new file mode 100644 index 000000000000..532ca8848c0b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-declare-var/output.json @@ -0,0 +1,159 @@ +{ + "type": "File", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "DeclareVariable", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "id": { + "type": "Identifier", + "start": 12, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "A" + }, + "name": "A", + "typeAnnotation": { + "type": "TypeAnnotation", + "start": 13, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "typeAnnotation": { + "type": "NumberTypeAnnotation", + "start": 15, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 21 + } + } + } + } + } + }, + { + "type": "DeclareVariable", + "start": 23, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "id": { + "type": "Identifier", + "start": 35, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 21 + }, + "identifierName": "A" + }, + "name": "A", + "typeAnnotation": { + "type": "TypeAnnotation", + "start": 36, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 21 + } + }, + "typeAnnotation": { + "type": "NumberTypeAnnotation", + "start": 38, + "end": 44, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-let/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-let/input.js new file mode 100644 index 000000000000..8e7279314635 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-let/input.js @@ -0,0 +1,2 @@ +declare var A: number; +let A; diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-let/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-let/options.json new file mode 100644 index 000000000000..b6ff3a4b0987 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-declare-var-let/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:4)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-interface-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-interface-interface/input.js new file mode 100644 index 000000000000..5f780ecff9a5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-interface-interface/input.js @@ -0,0 +1,2 @@ +interface A {} +interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-interface-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-interface-interface/options.json new file mode 100644 index 000000000000..04242bd1565b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-interface-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:10)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-class/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-class/input.js new file mode 100644 index 000000000000..61596821e374 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-class/input.js @@ -0,0 +1,2 @@ +let A = 1; +declare class A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-class/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-class/options.json new file mode 100644 index 000000000000..4a1b4e5c5cd4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-class/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:14)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-interface/input.js new file mode 100644 index 000000000000..97428603f0e4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-interface/input.js @@ -0,0 +1,2 @@ +let A = 1; +declare interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-interface/options.json new file mode 100644 index 000000000000..187fea591b95 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-declare-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:18)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-interface/input.js new file mode 100644 index 000000000000..2e575bbc693d --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-interface/input.js @@ -0,0 +1,2 @@ +let A = 1; +interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-interface/options.json new file mode 100644 index 000000000000..04242bd1565b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-let-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:10)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-type-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-type-interface/input.js new file mode 100644 index 000000000000..38b60058911b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-type-interface/input.js @@ -0,0 +1,2 @@ +type A = number; +interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-type-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-type-interface/options.json new file mode 100644 index 000000000000..04242bd1565b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-type-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:10)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-class/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-class/input.js new file mode 100644 index 000000000000..c534e4739b49 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-class/input.js @@ -0,0 +1,2 @@ +var A = 1; +declare class A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-class/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-class/options.json new file mode 100644 index 000000000000..4a1b4e5c5cd4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-class/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:14)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-interface/input.js new file mode 100644 index 000000000000..07a1fa47aab2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-interface/input.js @@ -0,0 +1,2 @@ +var A = 1; +declare interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-interface/options.json new file mode 100644 index 000000000000..187fea591b95 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-declare-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:18)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-interface/input.js b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-interface/input.js new file mode 100644 index 000000000000..70f7e73cc0ae --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-interface/input.js @@ -0,0 +1,2 @@ +var A = 1; +interface A {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-interface/options.json b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-interface/options.json new file mode 100644 index 000000000000..04242bd1565b --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/.dupl-decl-var-interface/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:10)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/declare-module/input.js b/packages/babel-parser/test/fixtures/flow/scope/declare-module/input.js new file mode 100644 index 000000000000..3b25537ffca6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/declare-module/input.js @@ -0,0 +1,5 @@ +declare module A { + declare class X {} +} + +class X {} diff --git a/packages/babel-parser/test/fixtures/flow/scope/declare-module/output.json b/packages/babel-parser/test/fixtures/flow/scope/declare-module/output.json new file mode 100644 index 000000000000..672f98d0ad8c --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/declare-module/output.json @@ -0,0 +1,190 @@ +{ + "type": "File", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 53, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "DeclareModule", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "A" + }, + "name": "A" + }, + "body": { + "type": "BlockStatement", + "start": 17, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "DeclareClass", + "start": 21, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "id": { + "type": "Identifier", + "start": 35, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + }, + "identifierName": "X" + }, + "name": "X" + }, + "typeParameters": null, + "extends": [], + "implements": [], + "mixins": [], + "body": { + "type": "ObjectTypeAnnotation", + "start": 37, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "callProperties": [], + "properties": [], + "indexers": [], + "internalSlots": [], + "exact": false + } + } + ] + }, + "kind": "CommonJS" + }, + { + "type": "ClassDeclaration", + "start": 43, + "end": 53, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 49, + "end": 50, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + }, + "identifierName": "X" + }, + "name": "X" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 51, + "end": 53, + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 10 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-opaque-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-opaque-type/input.js new file mode 100644 index 000000000000..22286388e087 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-opaque-type/input.js @@ -0,0 +1,2 @@ +const A = 1; +opaque type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-opaque-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-opaque-type/options.json new file mode 100644 index 000000000000..81dc2c90799f --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-opaque-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:12)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-type/input.js new file mode 100644 index 000000000000..09676cc69535 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-type/input.js @@ -0,0 +1,2 @@ +const A = 1; +type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-type/options.json new file mode 100644 index 000000000000..1eed93f49a0e --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-const-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:5)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-opaque-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-opaque-type/input.js new file mode 100644 index 000000000000..f388a626baa6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-opaque-type/input.js @@ -0,0 +1,2 @@ +let A = 1; +opaque type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-opaque-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-opaque-type/options.json new file mode 100644 index 000000000000..81dc2c90799f --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-opaque-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:12)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-type/input.js new file mode 100644 index 000000000000..acd0aedaa643 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-type/input.js @@ -0,0 +1,2 @@ +let A = 1; +type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-type/options.json new file mode 100644 index 000000000000..1eed93f49a0e --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-let-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:5)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-const/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-const/input.js new file mode 100644 index 000000000000..68252d13d604 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-const/input.js @@ -0,0 +1,2 @@ +opaque type A = {}; +const A = 1; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-const/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-const/options.json new file mode 100644 index 000000000000..336686170eb0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-const/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:6)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-let/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-let/input.js new file mode 100644 index 000000000000..cb701d75b873 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-let/input.js @@ -0,0 +1,2 @@ +opaque type A = {}; +let A = 1; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-let/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-let/options.json new file mode 100644 index 000000000000..b6ff3a4b0987 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-let/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:4)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-opaque-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-opaque-type/input.js new file mode 100644 index 000000000000..ea475eaf7548 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-opaque-type/input.js @@ -0,0 +1,2 @@ +opaque type A = {}; +opaque type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-opaque-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-opaque-type/options.json new file mode 100644 index 000000000000..81dc2c90799f --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-opaque-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:12)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-type/input.js new file mode 100644 index 000000000000..9f3827951edb --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-type/input.js @@ -0,0 +1,2 @@ +opaque type A = {}; +type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-type/options.json new file mode 100644 index 000000000000..1eed93f49a0e --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:5)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-var/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-var/input.js new file mode 100644 index 000000000000..265278011940 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-var/input.js @@ -0,0 +1,2 @@ +opaque type A = {}; +var A = 1; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-var/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-var/options.json new file mode 100644 index 000000000000..b6ff3a4b0987 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-opaque-type-var/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:4)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-const/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-const/input.js new file mode 100644 index 000000000000..2b045e915ada --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-const/input.js @@ -0,0 +1,2 @@ +type A = {}; +const A = 1; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-const/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-const/options.json new file mode 100644 index 000000000000..336686170eb0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-const/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:6)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-let/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-let/input.js new file mode 100644 index 000000000000..c827929c6d17 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-let/input.js @@ -0,0 +1,2 @@ +type A = {}; +let A = 1; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-let/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-let/options.json new file mode 100644 index 000000000000..b6ff3a4b0987 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-let/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:4)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-opaque-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-opaque-type/input.js new file mode 100644 index 000000000000..03d17d1612aa --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-opaque-type/input.js @@ -0,0 +1,2 @@ +type A = {}; +opaque type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-opaque-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-opaque-type/options.json new file mode 100644 index 000000000000..81dc2c90799f --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-opaque-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:12)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-type/input.js new file mode 100644 index 000000000000..72146f415607 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-type/input.js @@ -0,0 +1,2 @@ +type A = {}; +type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-type/options.json new file mode 100644 index 000000000000..1eed93f49a0e --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:5)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-var/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-var/input.js new file mode 100644 index 000000000000..04e932fa9c8a --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-var/input.js @@ -0,0 +1,2 @@ +type A = {}; +var A = 1; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-var/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-var/options.json new file mode 100644 index 000000000000..b6ff3a4b0987 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-type-var/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:4)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-opaque-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-opaque-type/input.js new file mode 100644 index 000000000000..e4d5ab41ec30 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-opaque-type/input.js @@ -0,0 +1,2 @@ +var A = 1; +opaque type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-opaque-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-opaque-type/options.json new file mode 100644 index 000000000000..81dc2c90799f --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-opaque-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:12)" +} diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-type/input.js b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-type/input.js new file mode 100644 index 000000000000..3427e135d606 --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-type/input.js @@ -0,0 +1,2 @@ +var A = 1; +type A = {}; diff --git a/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-type/options.json b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-type/options.json new file mode 100644 index 000000000000..1eed93f49a0e --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/scope/dupl-decl-var-type/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'A' has already been declared (2:5)" +} diff --git a/packages/babel-parser/test/fixtures/flow/sourcetype-script/export-named/input.js b/packages/babel-parser/test/fixtures/flow/sourcetype-script/export-named/input.js index f0afdd16f8e5..cd488659aca6 100644 --- a/packages/babel-parser/test/fixtures/flow/sourcetype-script/export-named/input.js +++ b/packages/babel-parser/test/fixtures/flow/sourcetype-script/export-named/input.js @@ -1,2 +1,2 @@ export type Foo = number; -export opaque type Foo = number; +export opaque type Foo2 = number; diff --git a/packages/babel-parser/test/fixtures/flow/sourcetype-script/export-named/output.json b/packages/babel-parser/test/fixtures/flow/sourcetype-script/export-named/output.json index fc72d6467694..70d30bbe8a92 100644 --- a/packages/babel-parser/test/fixtures/flow/sourcetype-script/export-named/output.json +++ b/packages/babel-parser/test/fixtures/flow/sourcetype-script/export-named/output.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 58, + "end": 59, "loc": { "start": { "line": 1, @@ -9,13 +9,13 @@ }, "end": { "line": 2, - "column": 32 + "column": 33 } }, "program": { "type": "Program", "start": 0, - "end": 58, + "end": 59, "loc": { "start": { "line": 1, @@ -23,7 +23,7 @@ }, "end": { "line": 2, - "column": 32 + "column": 33 } }, "sourceType": "script", @@ -98,7 +98,7 @@ { "type": "ExportNamedDeclaration", "start": 26, - "end": 58, + "end": 59, "loc": { "start": { "line": 2, @@ -106,7 +106,7 @@ }, "end": { "line": 2, - "column": 32 + "column": 33 } }, "specifiers": [], @@ -115,7 +115,7 @@ "declaration": { "type": "OpaqueType", "start": 33, - "end": 58, + "end": 59, "loc": { "start": { "line": 2, @@ -123,13 +123,13 @@ }, "end": { "line": 2, - "column": 32 + "column": 33 } }, "id": { "type": "Identifier", "start": 45, - "end": 48, + "end": 49, "loc": { "start": { "line": 2, @@ -137,26 +137,26 @@ }, "end": { "line": 2, - "column": 22 + "column": 23 }, - "identifierName": "Foo" + "identifierName": "Foo2" }, - "name": "Foo" + "name": "Foo2" }, "typeParameters": null, "supertype": null, "impltype": { "type": "NumberTypeAnnotation", - "start": 51, - "end": 57, + "start": 52, + "end": 58, "loc": { "start": { "line": 2, - "column": 25 + "column": 26 }, "end": { "line": 2, - "column": 31 + "column": 32 } } } diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/builtin/input.js b/packages/babel-parser/test/fixtures/flow/type-annotations/builtin/input.js index 777868f31ed8..04fd627b994e 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/builtin/input.js +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/builtin/input.js @@ -1,16 +1,16 @@ // bounds -type T = any; -type T = mixed; -type T = empty; +type T1 = any; +type T2 = mixed; +type T3 = empty; // builtins -type T = void; -type T = number; -type T = string; -type T = bool; -type T = boolean; +type T4 = void; +type T5 = number; +type T6 = string; +type T7 = bool; +type T8 = boolean; // literal type annotations -type T = null; -type T = ""; -type T = 0; -type T = true; -type T = false; +type T9 = null; +type T10 = ""; +type T11 = 0; +type T12 = true; +type T13 = false; diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/builtin/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/builtin/output.json index 379ea71424c4..9b3179172293 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/builtin/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/builtin/output.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 248, + "end": 265, "loc": { "start": { "line": 1, @@ -9,13 +9,13 @@ }, "end": { "line": 16, - "column": 15 + "column": 17 } }, "program": { "type": "Program", "start": 0, - "end": 248, + "end": 265, "loc": { "start": { "line": 1, @@ -23,7 +23,7 @@ }, "end": { "line": 16, - "column": 15 + "column": 17 } }, "sourceType": "module", @@ -32,7 +32,7 @@ { "type": "TypeAlias", "start": 10, - "end": 23, + "end": 24, "loc": { "start": { "line": 2, @@ -40,13 +40,13 @@ }, "end": { "line": 2, - "column": 13 + "column": 14 } }, "id": { "type": "Identifier", "start": 15, - "end": 16, + "end": 17, "loc": { "start": { "line": 2, @@ -54,25 +54,25 @@ }, "end": { "line": 2, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T1" }, - "name": "T" + "name": "T1" }, "typeParameters": null, "right": { "type": "AnyTypeAnnotation", - "start": 19, - "end": 22, + "start": 20, + "end": 23, "loc": { "start": { "line": 2, - "column": 9 + "column": 10 }, "end": { "line": 2, - "column": 12 + "column": 13 } } }, @@ -97,8 +97,8 @@ }, { "type": "TypeAlias", - "start": 24, - "end": 39, + "start": 25, + "end": 41, "loc": { "start": { "line": 3, @@ -106,13 +106,13 @@ }, "end": { "line": 3, - "column": 15 + "column": 16 } }, "id": { "type": "Identifier", - "start": 29, - "end": 30, + "start": 30, + "end": 32, "loc": { "start": { "line": 3, @@ -120,33 +120,33 @@ }, "end": { "line": 3, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T2" }, - "name": "T" + "name": "T2" }, "typeParameters": null, "right": { "type": "MixedTypeAnnotation", - "start": 33, - "end": 38, + "start": 35, + "end": 40, "loc": { "start": { "line": 3, - "column": 9 + "column": 10 }, "end": { "line": 3, - "column": 14 + "column": 15 } } } }, { "type": "TypeAlias", - "start": 40, - "end": 55, + "start": 42, + "end": 58, "loc": { "start": { "line": 4, @@ -154,13 +154,13 @@ }, "end": { "line": 4, - "column": 15 + "column": 16 } }, "id": { "type": "Identifier", - "start": 45, - "end": 46, + "start": 47, + "end": 49, "loc": { "start": { "line": 4, @@ -168,25 +168,25 @@ }, "end": { "line": 4, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T3" }, - "name": "T" + "name": "T3" }, "typeParameters": null, "right": { "type": "EmptyTypeAnnotation", - "start": 49, - "end": 54, + "start": 52, + "end": 57, "loc": { "start": { "line": 4, - "column": 9 + "column": 10 }, "end": { "line": 4, - "column": 14 + "column": 15 } } }, @@ -194,8 +194,8 @@ { "type": "CommentLine", "value": " builtins", - "start": 56, - "end": 67, + "start": 59, + "end": 70, "loc": { "start": { "line": 5, @@ -211,8 +211,8 @@ }, { "type": "TypeAlias", - "start": 68, - "end": 82, + "start": 71, + "end": 86, "loc": { "start": { "line": 6, @@ -220,13 +220,13 @@ }, "end": { "line": 6, - "column": 14 + "column": 15 } }, "id": { "type": "Identifier", - "start": 73, - "end": 74, + "start": 76, + "end": 78, "loc": { "start": { "line": 6, @@ -234,25 +234,25 @@ }, "end": { "line": 6, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T4" }, - "name": "T" + "name": "T4" }, "typeParameters": null, "right": { "type": "VoidTypeAnnotation", - "start": 77, - "end": 81, + "start": 81, + "end": 85, "loc": { "start": { "line": 6, - "column": 9 + "column": 10 }, "end": { "line": 6, - "column": 13 + "column": 14 } } }, @@ -260,8 +260,8 @@ { "type": "CommentLine", "value": " builtins", - "start": 56, - "end": 67, + "start": 59, + "end": 70, "loc": { "start": { "line": 5, @@ -277,8 +277,8 @@ }, { "type": "TypeAlias", - "start": 83, - "end": 99, + "start": 87, + "end": 104, "loc": { "start": { "line": 7, @@ -286,13 +286,13 @@ }, "end": { "line": 7, - "column": 16 + "column": 17 } }, "id": { "type": "Identifier", - "start": 88, - "end": 89, + "start": 92, + "end": 94, "loc": { "start": { "line": 7, @@ -300,33 +300,33 @@ }, "end": { "line": 7, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T5" }, - "name": "T" + "name": "T5" }, "typeParameters": null, "right": { "type": "NumberTypeAnnotation", - "start": 92, - "end": 98, + "start": 97, + "end": 103, "loc": { "start": { "line": 7, - "column": 9 + "column": 10 }, "end": { "line": 7, - "column": 15 + "column": 16 } } } }, { "type": "TypeAlias", - "start": 100, - "end": 116, + "start": 105, + "end": 122, "loc": { "start": { "line": 8, @@ -334,13 +334,13 @@ }, "end": { "line": 8, - "column": 16 + "column": 17 } }, "id": { "type": "Identifier", - "start": 105, - "end": 106, + "start": 110, + "end": 112, "loc": { "start": { "line": 8, @@ -348,33 +348,33 @@ }, "end": { "line": 8, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T6" }, - "name": "T" + "name": "T6" }, "typeParameters": null, "right": { "type": "StringTypeAnnotation", - "start": 109, - "end": 115, + "start": 115, + "end": 121, "loc": { "start": { "line": 8, - "column": 9 + "column": 10 }, "end": { "line": 8, - "column": 15 + "column": 16 } } } }, { "type": "TypeAlias", - "start": 117, - "end": 131, + "start": 123, + "end": 138, "loc": { "start": { "line": 9, @@ -382,13 +382,13 @@ }, "end": { "line": 9, - "column": 14 + "column": 15 } }, "id": { "type": "Identifier", - "start": 122, - "end": 123, + "start": 128, + "end": 130, "loc": { "start": { "line": 9, @@ -396,33 +396,33 @@ }, "end": { "line": 9, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T7" }, - "name": "T" + "name": "T7" }, "typeParameters": null, "right": { "type": "BooleanTypeAnnotation", - "start": 126, - "end": 130, + "start": 133, + "end": 137, "loc": { "start": { "line": 9, - "column": 9 + "column": 10 }, "end": { "line": 9, - "column": 13 + "column": 14 } } } }, { "type": "TypeAlias", - "start": 132, - "end": 149, + "start": 139, + "end": 157, "loc": { "start": { "line": 10, @@ -430,13 +430,13 @@ }, "end": { "line": 10, - "column": 17 + "column": 18 } }, "id": { "type": "Identifier", - "start": 137, - "end": 138, + "start": 144, + "end": 146, "loc": { "start": { "line": 10, @@ -444,25 +444,25 @@ }, "end": { "line": 10, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T8" }, - "name": "T" + "name": "T8" }, "typeParameters": null, "right": { "type": "BooleanTypeAnnotation", - "start": 141, - "end": 148, + "start": 149, + "end": 156, "loc": { "start": { "line": 10, - "column": 9 + "column": 10 }, "end": { "line": 10, - "column": 16 + "column": 17 } } }, @@ -470,8 +470,8 @@ { "type": "CommentLine", "value": " literal type annotations", - "start": 150, - "end": 177, + "start": 158, + "end": 185, "loc": { "start": { "line": 11, @@ -487,8 +487,8 @@ }, { "type": "TypeAlias", - "start": 178, - "end": 192, + "start": 186, + "end": 201, "loc": { "start": { "line": 12, @@ -496,13 +496,13 @@ }, "end": { "line": 12, - "column": 14 + "column": 15 } }, "id": { "type": "Identifier", - "start": 183, - "end": 184, + "start": 191, + "end": 193, "loc": { "start": { "line": 12, @@ -510,25 +510,25 @@ }, "end": { "line": 12, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T9" }, - "name": "T" + "name": "T9" }, "typeParameters": null, "right": { "type": "NullLiteralTypeAnnotation", - "start": 187, - "end": 191, + "start": 196, + "end": 200, "loc": { "start": { "line": 12, - "column": 9 + "column": 10 }, "end": { "line": 12, - "column": 13 + "column": 14 } } }, @@ -536,8 +536,8 @@ { "type": "CommentLine", "value": " literal type annotations", - "start": 150, - "end": 177, + "start": 158, + "end": 185, "loc": { "start": { "line": 11, @@ -553,8 +553,8 @@ }, { "type": "TypeAlias", - "start": 193, - "end": 205, + "start": 202, + "end": 216, "loc": { "start": { "line": 13, @@ -562,13 +562,13 @@ }, "end": { "line": 13, - "column": 12 + "column": 14 } }, "id": { "type": "Identifier", - "start": 198, - "end": 199, + "start": 207, + "end": 210, "loc": { "start": { "line": 13, @@ -576,25 +576,25 @@ }, "end": { "line": 13, - "column": 6 + "column": 8 }, - "identifierName": "T" + "identifierName": "T10" }, - "name": "T" + "name": "T10" }, "typeParameters": null, "right": { "type": "StringLiteralTypeAnnotation", - "start": 202, - "end": 204, + "start": 213, + "end": 215, "loc": { "start": { "line": 13, - "column": 9 + "column": 11 }, "end": { "line": 13, - "column": 11 + "column": 13 } }, "extra": { @@ -606,8 +606,8 @@ }, { "type": "TypeAlias", - "start": 206, - "end": 217, + "start": 217, + "end": 230, "loc": { "start": { "line": 14, @@ -615,13 +615,13 @@ }, "end": { "line": 14, - "column": 11 + "column": 13 } }, "id": { "type": "Identifier", - "start": 211, - "end": 212, + "start": 222, + "end": 225, "loc": { "start": { "line": 14, @@ -629,25 +629,25 @@ }, "end": { "line": 14, - "column": 6 + "column": 8 }, - "identifierName": "T" + "identifierName": "T11" }, - "name": "T" + "name": "T11" }, "typeParameters": null, "right": { "type": "NumberLiteralTypeAnnotation", - "start": 215, - "end": 216, + "start": 228, + "end": 229, "loc": { "start": { "line": 14, - "column": 9 + "column": 11 }, "end": { "line": 14, - "column": 10 + "column": 12 } }, "extra": { @@ -659,8 +659,8 @@ }, { "type": "TypeAlias", - "start": 218, - "end": 232, + "start": 231, + "end": 247, "loc": { "start": { "line": 15, @@ -668,13 +668,13 @@ }, "end": { "line": 15, - "column": 14 + "column": 16 } }, "id": { "type": "Identifier", - "start": 223, - "end": 224, + "start": 236, + "end": 239, "loc": { "start": { "line": 15, @@ -682,25 +682,25 @@ }, "end": { "line": 15, - "column": 6 + "column": 8 }, - "identifierName": "T" + "identifierName": "T12" }, - "name": "T" + "name": "T12" }, "typeParameters": null, "right": { "type": "BooleanLiteralTypeAnnotation", - "start": 227, - "end": 231, + "start": 242, + "end": 246, "loc": { "start": { "line": 15, - "column": 9 + "column": 11 }, "end": { "line": 15, - "column": 13 + "column": 15 } }, "value": true @@ -708,8 +708,8 @@ }, { "type": "TypeAlias", - "start": 233, - "end": 248, + "start": 248, + "end": 265, "loc": { "start": { "line": 16, @@ -717,13 +717,13 @@ }, "end": { "line": 16, - "column": 15 + "column": 17 } }, "id": { "type": "Identifier", - "start": 238, - "end": 239, + "start": 253, + "end": 256, "loc": { "start": { "line": 16, @@ -731,25 +731,25 @@ }, "end": { "line": 16, - "column": 6 + "column": 8 }, - "identifierName": "T" + "identifierName": "T13" }, - "name": "T" + "name": "T13" }, "typeParameters": null, "right": { "type": "BooleanLiteralTypeAnnotation", - "start": 242, - "end": 247, + "start": 259, + "end": 264, "loc": { "start": { "line": 16, - "column": 9 + "column": 11 }, "end": { "line": 16, - "column": 14 + "column": 16 } }, "value": false @@ -778,8 +778,8 @@ { "type": "CommentLine", "value": " builtins", - "start": 56, - "end": 67, + "start": 59, + "end": 70, "loc": { "start": { "line": 5, @@ -794,8 +794,8 @@ { "type": "CommentLine", "value": " literal type annotations", - "start": 150, - "end": 177, + "start": 158, + "end": 185, "loc": { "start": { "line": 11, diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/input.js b/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/input.js index 216a4222b3bb..435219343e08 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/input.js +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/input.js @@ -1,12 +1,12 @@ type T = { a: () => void }; -type T = { a: () => void }; -type T = { a(): void }; -type T = { a(): void }; +type T1 = { a: () => void }; +type T2 = { a(): void }; +type T3 = { a(): void }; -type T = { (): number }; -type T = { (x: T): number; } +type T4 = { (): number }; +type T5 = { (x: T): number; } -declare class T { foo(): number; } -declare class T { static foo(): number; } -declare class T { (): number } -declare class T { static (): number } +declare class T6 { foo(): number; } +declare class T7 { static foo(): number; } +declare class T8 { (): number } +declare class T9 { static (): number } diff --git a/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/output.json b/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/output.json index f72e8ff175f2..49fb1b3a7b0d 100644 --- a/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-annotations/object-type-method/output.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 314, + "end": 323, "loc": { "start": { "line": 1, @@ -9,13 +9,13 @@ }, "end": { "line": 12, - "column": 37 + "column": 38 } }, "program": { "type": "Program", "start": 0, - "end": 314, + "end": 323, "loc": { "start": { "line": 1, @@ -23,7 +23,7 @@ }, "end": { "line": 12, - "column": 37 + "column": 38 } }, "sourceType": "module", @@ -158,7 +158,7 @@ { "type": "TypeAlias", "start": 28, - "end": 58, + "end": 59, "loc": { "start": { "line": 2, @@ -166,13 +166,13 @@ }, "end": { "line": 2, - "column": 30 + "column": 31 } }, "id": { "type": "Identifier", "start": 33, - "end": 34, + "end": 35, "loc": { "start": { "line": 2, @@ -180,55 +180,55 @@ }, "end": { "line": 2, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T1" }, - "name": "T" + "name": "T1" }, "typeParameters": null, "right": { "type": "ObjectTypeAnnotation", - "start": 37, - "end": 57, + "start": 38, + "end": 58, "loc": { "start": { "line": 2, - "column": 9 + "column": 10 }, "end": { "line": 2, - "column": 29 + "column": 30 } }, "callProperties": [], "properties": [ { "type": "ObjectTypeProperty", - "start": 39, - "end": 55, + "start": 40, + "end": 56, "loc": { "start": { "line": 2, - "column": 11 + "column": 12 }, "end": { "line": 2, - "column": 27 + "column": 28 } }, "key": { "type": "Identifier", - "start": 39, - "end": 40, + "start": 40, + "end": 41, "loc": { "start": { "line": 2, - "column": 11 + "column": 12 }, "end": { "line": 2, - "column": 12 + "column": 13 }, "identifierName": "a" }, @@ -240,45 +240,45 @@ "method": false, "value": { "type": "FunctionTypeAnnotation", - "start": 42, - "end": 55, + "start": 43, + "end": 56, "loc": { "start": { "line": 2, - "column": 14 + "column": 15 }, "end": { "line": 2, - "column": 27 + "column": 28 } }, "typeParameters": { "type": "TypeParameterDeclaration", - "start": 42, - "end": 45, + "start": 43, + "end": 46, "loc": { "start": { "line": 2, - "column": 14 + "column": 15 }, "end": { "line": 2, - "column": 17 + "column": 18 } }, "params": [ { "type": "TypeParameter", - "start": 43, - "end": 44, + "start": 44, + "end": 45, "loc": { "start": { "line": 2, - "column": 15 + "column": 16 }, "end": { "line": 2, - "column": 16 + "column": 17 } }, "name": "T", @@ -290,16 +290,16 @@ "rest": null, "returnType": { "type": "VoidTypeAnnotation", - "start": 51, - "end": 55, + "start": 52, + "end": 56, "loc": { "start": { "line": 2, - "column": 23 + "column": 24 }, "end": { "line": 2, - "column": 27 + "column": 28 } } } @@ -316,8 +316,8 @@ }, { "type": "TypeAlias", - "start": 59, - "end": 82, + "start": 60, + "end": 84, "loc": { "start": { "line": 3, @@ -325,13 +325,13 @@ }, "end": { "line": 3, - "column": 23 + "column": 24 } }, "id": { "type": "Identifier", - "start": 64, - "end": 65, + "start": 65, + "end": 67, "loc": { "start": { "line": 3, @@ -339,55 +339,55 @@ }, "end": { "line": 3, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T2" }, - "name": "T" + "name": "T2" }, "typeParameters": null, "right": { "type": "ObjectTypeAnnotation", - "start": 68, - "end": 81, + "start": 70, + "end": 83, "loc": { "start": { "line": 3, - "column": 9 + "column": 10 }, "end": { "line": 3, - "column": 22 + "column": 23 } }, "callProperties": [], "properties": [ { "type": "ObjectTypeProperty", - "start": 70, - "end": 79, + "start": 72, + "end": 81, "loc": { "start": { "line": 3, - "column": 11 + "column": 12 }, "end": { "line": 3, - "column": 20 + "column": 21 } }, "key": { "type": "Identifier", - "start": 70, - "end": 71, + "start": 72, + "end": 73, "loc": { "start": { "line": 3, - "column": 11 + "column": 12 }, "end": { "line": 3, - "column": 12 + "column": 13 }, "identifierName": "a" }, @@ -399,16 +399,16 @@ "method": true, "value": { "type": "FunctionTypeAnnotation", - "start": 70, - "end": 79, + "start": 72, + "end": 81, "loc": { "start": { "line": 3, - "column": 11 + "column": 12 }, "end": { "line": 3, - "column": 20 + "column": 21 } }, "params": [], @@ -416,16 +416,16 @@ "typeParameters": null, "returnType": { "type": "VoidTypeAnnotation", - "start": 75, - "end": 79, + "start": 77, + "end": 81, "loc": { "start": { "line": 3, - "column": 16 + "column": 17 }, "end": { "line": 3, - "column": 20 + "column": 21 } } } @@ -441,8 +441,8 @@ }, { "type": "TypeAlias", - "start": 83, - "end": 109, + "start": 85, + "end": 112, "loc": { "start": { "line": 4, @@ -450,13 +450,13 @@ }, "end": { "line": 4, - "column": 26 + "column": 27 } }, "id": { "type": "Identifier", - "start": 88, - "end": 89, + "start": 90, + "end": 92, "loc": { "start": { "line": 4, @@ -464,55 +464,55 @@ }, "end": { "line": 4, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T3" }, - "name": "T" + "name": "T3" }, "typeParameters": null, "right": { "type": "ObjectTypeAnnotation", - "start": 92, - "end": 108, + "start": 95, + "end": 111, "loc": { "start": { "line": 4, - "column": 9 + "column": 10 }, "end": { "line": 4, - "column": 25 + "column": 26 } }, "callProperties": [], "properties": [ { "type": "ObjectTypeProperty", - "start": 94, - "end": 106, + "start": 97, + "end": 109, "loc": { "start": { "line": 4, - "column": 11 + "column": 12 }, "end": { "line": 4, - "column": 23 + "column": 24 } }, "key": { "type": "Identifier", - "start": 94, - "end": 95, + "start": 97, + "end": 98, "loc": { "start": { "line": 4, - "column": 11 + "column": 12 }, "end": { "line": 4, - "column": 12 + "column": 13 }, "identifierName": "a" }, @@ -524,47 +524,47 @@ "method": true, "value": { "type": "FunctionTypeAnnotation", - "start": 94, - "end": 106, + "start": 97, + "end": 109, "loc": { "start": { "line": 4, - "column": 11 + "column": 12 }, "end": { "line": 4, - "column": 23 + "column": 24 } }, "params": [], "rest": null, "typeParameters": { "type": "TypeParameterDeclaration", - "start": 95, - "end": 98, + "start": 98, + "end": 101, "loc": { "start": { "line": 4, - "column": 12 + "column": 13 }, "end": { "line": 4, - "column": 15 + "column": 16 } }, "params": [ { "type": "TypeParameter", - "start": 96, - "end": 97, + "start": 99, + "end": 100, "loc": { "start": { "line": 4, - "column": 13 + "column": 14 }, "end": { "line": 4, - "column": 14 + "column": 15 } }, "name": "T", @@ -574,16 +574,16 @@ }, "returnType": { "type": "VoidTypeAnnotation", - "start": 102, - "end": 106, + "start": 105, + "end": 109, "loc": { "start": { "line": 4, - "column": 19 + "column": 20 }, "end": { "line": 4, - "column": 23 + "column": 24 } } } @@ -599,8 +599,8 @@ }, { "type": "TypeAlias", - "start": 111, - "end": 135, + "start": 114, + "end": 139, "loc": { "start": { "line": 6, @@ -608,13 +608,13 @@ }, "end": { "line": 6, - "column": 24 + "column": 25 } }, "id": { "type": "Identifier", - "start": 116, - "end": 117, + "start": 119, + "end": 121, "loc": { "start": { "line": 6, @@ -622,55 +622,55 @@ }, "end": { "line": 6, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T4" }, - "name": "T" + "name": "T4" }, "typeParameters": null, "right": { "type": "ObjectTypeAnnotation", - "start": 120, - "end": 134, + "start": 124, + "end": 138, "loc": { "start": { "line": 6, - "column": 9 + "column": 10 }, "end": { "line": 6, - "column": 23 + "column": 24 } }, "callProperties": [ { "type": "ObjectTypeCallProperty", - "start": 122, - "end": 132, + "start": 126, + "end": 136, "loc": { "start": { "line": 6, - "column": 11 + "column": 12 }, "end": { "line": 6, - "column": 21 + "column": 22 } }, "static": false, "value": { "type": "FunctionTypeAnnotation", - "start": 122, - "end": 132, + "start": 126, + "end": 136, "loc": { "start": { "line": 6, - "column": 11 + "column": 12 }, "end": { "line": 6, - "column": 21 + "column": 22 } }, "params": [], @@ -678,16 +678,16 @@ "typeParameters": null, "returnType": { "type": "NumberTypeAnnotation", - "start": 126, - "end": 132, + "start": 130, + "end": 136, "loc": { "start": { "line": 6, - "column": 15 + "column": 16 }, "end": { "line": 6, - "column": 21 + "column": 22 } } } @@ -703,8 +703,8 @@ }, { "type": "TypeAlias", - "start": 136, - "end": 167, + "start": 140, + "end": 172, "loc": { "start": { "line": 7, @@ -712,13 +712,13 @@ }, "end": { "line": 7, - "column": 31 + "column": 32 } }, "id": { "type": "Identifier", - "start": 141, - "end": 142, + "start": 145, + "end": 147, "loc": { "start": { "line": 7, @@ -726,84 +726,84 @@ }, "end": { "line": 7, - "column": 6 + "column": 7 }, - "identifierName": "T" + "identifierName": "T5" }, - "name": "T" + "name": "T5" }, "typeParameters": null, "right": { "type": "ObjectTypeAnnotation", - "start": 145, - "end": 167, + "start": 150, + "end": 172, "loc": { "start": { "line": 7, - "column": 9 + "column": 10 }, "end": { "line": 7, - "column": 31 + "column": 32 } }, "callProperties": [ { "type": "ObjectTypeCallProperty", - "start": 147, - "end": 164, + "start": 152, + "end": 169, "loc": { "start": { "line": 7, - "column": 11 + "column": 12 }, "end": { "line": 7, - "column": 28 + "column": 29 } }, "static": false, "value": { "type": "FunctionTypeAnnotation", - "start": 147, - "end": 164, + "start": 152, + "end": 169, "loc": { "start": { "line": 7, - "column": 11 + "column": 12 }, "end": { "line": 7, - "column": 28 + "column": 29 } }, "params": [ { "type": "FunctionTypeParam", - "start": 151, - "end": 155, + "start": 156, + "end": 160, "loc": { "start": { "line": 7, - "column": 15 + "column": 16 }, "end": { "line": 7, - "column": 19 + "column": 20 } }, "name": { "type": "Identifier", - "start": 151, - "end": 152, + "start": 156, + "end": 157, "loc": { "start": { "line": 7, - "column": 15 + "column": 16 }, "end": { "line": 7, - "column": 16 + "column": 17 }, "identifierName": "x" }, @@ -812,31 +812,31 @@ "optional": false, "typeAnnotation": { "type": "GenericTypeAnnotation", - "start": 154, - "end": 155, + "start": 159, + "end": 160, "loc": { "start": { "line": 7, - "column": 18 + "column": 19 }, "end": { "line": 7, - "column": 19 + "column": 20 } }, "typeParameters": null, "id": { "type": "Identifier", - "start": 154, - "end": 155, + "start": 159, + "end": 160, "loc": { "start": { "line": 7, - "column": 18 + "column": 19 }, "end": { "line": 7, - "column": 19 + "column": 20 }, "identifierName": "T" }, @@ -848,31 +848,31 @@ "rest": null, "typeParameters": { "type": "TypeParameterDeclaration", - "start": 147, - "end": 150, + "start": 152, + "end": 155, "loc": { "start": { "line": 7, - "column": 11 + "column": 12 }, "end": { "line": 7, - "column": 14 + "column": 15 } }, "params": [ { "type": "TypeParameter", - "start": 148, - "end": 149, + "start": 153, + "end": 154, "loc": { "start": { "line": 7, - "column": 12 + "column": 13 }, "end": { "line": 7, - "column": 13 + "column": 14 } }, "name": "T", @@ -882,16 +882,16 @@ }, "returnType": { "type": "NumberTypeAnnotation", - "start": 158, - "end": 164, + "start": 163, + "end": 169, "loc": { "start": { "line": 7, - "column": 22 + "column": 23 }, "end": { "line": 7, - "column": 28 + "column": 29 } } } @@ -907,8 +907,8 @@ }, { "type": "DeclareClass", - "start": 169, - "end": 203, + "start": 174, + "end": 209, "loc": { "start": { "line": 9, @@ -916,13 +916,13 @@ }, "end": { "line": 9, - "column": 34 + "column": 35 } }, "id": { "type": "Identifier", - "start": 183, - "end": 184, + "start": 188, + "end": 190, "loc": { "start": { "line": 9, @@ -930,11 +930,11 @@ }, "end": { "line": 9, - "column": 15 + "column": 16 }, - "identifierName": "T" + "identifierName": "T6" }, - "name": "T" + "name": "T6" }, "typeParameters": null, "extends": [], @@ -942,46 +942,46 @@ "mixins": [], "body": { "type": "ObjectTypeAnnotation", - "start": 185, - "end": 203, + "start": 191, + "end": 209, "loc": { "start": { "line": 9, - "column": 16 + "column": 17 }, "end": { "line": 9, - "column": 34 + "column": 35 } }, "callProperties": [], "properties": [ { "type": "ObjectTypeProperty", - "start": 187, - "end": 200, + "start": 193, + "end": 206, "loc": { "start": { "line": 9, - "column": 18 + "column": 19 }, "end": { "line": 9, - "column": 31 + "column": 32 } }, "key": { "type": "Identifier", - "start": 187, - "end": 190, + "start": 193, + "end": 196, "loc": { "start": { "line": 9, - "column": 18 + "column": 19 }, "end": { "line": 9, - "column": 21 + "column": 22 }, "identifierName": "foo" }, @@ -993,16 +993,16 @@ "method": true, "value": { "type": "FunctionTypeAnnotation", - "start": 187, - "end": 200, + "start": 193, + "end": 206, "loc": { "start": { "line": 9, - "column": 18 + "column": 19 }, "end": { "line": 9, - "column": 31 + "column": 32 } }, "params": [], @@ -1010,16 +1010,16 @@ "typeParameters": null, "returnType": { "type": "NumberTypeAnnotation", - "start": 194, - "end": 200, + "start": 200, + "end": 206, "loc": { "start": { "line": 9, - "column": 25 + "column": 26 }, "end": { "line": 9, - "column": 31 + "column": 32 } } } @@ -1034,8 +1034,8 @@ }, { "type": "DeclareClass", - "start": 204, - "end": 245, + "start": 210, + "end": 252, "loc": { "start": { "line": 10, @@ -1043,13 +1043,13 @@ }, "end": { "line": 10, - "column": 41 + "column": 42 } }, "id": { "type": "Identifier", - "start": 218, - "end": 219, + "start": 224, + "end": 226, "loc": { "start": { "line": 10, @@ -1057,11 +1057,11 @@ }, "end": { "line": 10, - "column": 15 + "column": 16 }, - "identifierName": "T" + "identifierName": "T7" }, - "name": "T" + "name": "T7" }, "typeParameters": null, "extends": [], @@ -1069,46 +1069,46 @@ "mixins": [], "body": { "type": "ObjectTypeAnnotation", - "start": 220, - "end": 245, + "start": 227, + "end": 252, "loc": { "start": { "line": 10, - "column": 16 + "column": 17 }, "end": { "line": 10, - "column": 41 + "column": 42 } }, "callProperties": [], "properties": [ { "type": "ObjectTypeProperty", - "start": 222, - "end": 242, + "start": 229, + "end": 249, "loc": { "start": { "line": 10, - "column": 18 + "column": 19 }, "end": { "line": 10, - "column": 38 + "column": 39 } }, "key": { "type": "Identifier", - "start": 229, - "end": 232, + "start": 236, + "end": 239, "loc": { "start": { "line": 10, - "column": 25 + "column": 26 }, "end": { "line": 10, - "column": 28 + "column": 29 }, "identifierName": "foo" }, @@ -1120,16 +1120,16 @@ "method": true, "value": { "type": "FunctionTypeAnnotation", - "start": 222, - "end": 242, + "start": 229, + "end": 249, "loc": { "start": { "line": 10, - "column": 18 + "column": 19 }, "end": { "line": 10, - "column": 38 + "column": 39 } }, "params": [], @@ -1137,16 +1137,16 @@ "typeParameters": null, "returnType": { "type": "NumberTypeAnnotation", - "start": 236, - "end": 242, + "start": 243, + "end": 249, "loc": { "start": { "line": 10, - "column": 32 + "column": 33 }, "end": { "line": 10, - "column": 38 + "column": 39 } } } @@ -1161,8 +1161,8 @@ }, { "type": "DeclareClass", - "start": 246, - "end": 276, + "start": 253, + "end": 284, "loc": { "start": { "line": 11, @@ -1170,13 +1170,13 @@ }, "end": { "line": 11, - "column": 30 + "column": 31 } }, "id": { "type": "Identifier", - "start": 260, - "end": 261, + "start": 267, + "end": 269, "loc": { "start": { "line": 11, @@ -1184,11 +1184,11 @@ }, "end": { "line": 11, - "column": 15 + "column": 16 }, - "identifierName": "T" + "identifierName": "T8" }, - "name": "T" + "name": "T8" }, "typeParameters": null, "extends": [], @@ -1196,46 +1196,46 @@ "mixins": [], "body": { "type": "ObjectTypeAnnotation", - "start": 262, - "end": 276, + "start": 270, + "end": 284, "loc": { "start": { "line": 11, - "column": 16 + "column": 17 }, "end": { "line": 11, - "column": 30 + "column": 31 } }, "callProperties": [ { "type": "ObjectTypeCallProperty", - "start": 264, - "end": 274, + "start": 272, + "end": 282, "loc": { "start": { "line": 11, - "column": 18 + "column": 19 }, "end": { "line": 11, - "column": 28 + "column": 29 } }, "static": false, "value": { "type": "FunctionTypeAnnotation", - "start": 264, - "end": 274, + "start": 272, + "end": 282, "loc": { "start": { "line": 11, - "column": 18 + "column": 19 }, "end": { "line": 11, - "column": 28 + "column": 29 } }, "params": [], @@ -1243,16 +1243,16 @@ "typeParameters": null, "returnType": { "type": "NumberTypeAnnotation", - "start": 268, - "end": 274, + "start": 276, + "end": 282, "loc": { "start": { "line": 11, - "column": 22 + "column": 23 }, "end": { "line": 11, - "column": 28 + "column": 29 } } } @@ -1267,8 +1267,8 @@ }, { "type": "DeclareClass", - "start": 277, - "end": 314, + "start": 285, + "end": 323, "loc": { "start": { "line": 12, @@ -1276,13 +1276,13 @@ }, "end": { "line": 12, - "column": 37 + "column": 38 } }, "id": { "type": "Identifier", - "start": 291, - "end": 292, + "start": 299, + "end": 301, "loc": { "start": { "line": 12, @@ -1290,11 +1290,11 @@ }, "end": { "line": 12, - "column": 15 + "column": 16 }, - "identifierName": "T" + "identifierName": "T9" }, - "name": "T" + "name": "T9" }, "typeParameters": null, "extends": [], @@ -1302,46 +1302,46 @@ "mixins": [], "body": { "type": "ObjectTypeAnnotation", - "start": 293, - "end": 314, + "start": 302, + "end": 323, "loc": { "start": { "line": 12, - "column": 16 + "column": 17 }, "end": { "line": 12, - "column": 37 + "column": 38 } }, "callProperties": [ { "type": "ObjectTypeCallProperty", - "start": 295, - "end": 312, + "start": 304, + "end": 321, "loc": { "start": { "line": 12, - "column": 18 + "column": 19 }, "end": { "line": 12, - "column": 35 + "column": 36 } }, "static": true, "value": { "type": "FunctionTypeAnnotation", - "start": 302, - "end": 312, + "start": 311, + "end": 321, "loc": { "start": { "line": 12, - "column": 25 + "column": 26 }, "end": { "line": 12, - "column": 35 + "column": 36 } }, "params": [], @@ -1349,16 +1349,16 @@ "typeParameters": null, "returnType": { "type": "NumberTypeAnnotation", - "start": 306, - "end": 312, + "start": 315, + "end": 321, "loc": { "start": { "line": 12, - "column": 29 + "column": 30 }, "end": { "line": 12, - "column": 35 + "column": 36 } } } diff --git a/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-const/input.js b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-const/input.js new file mode 100644 index 000000000000..62acca05efa0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-const/input.js @@ -0,0 +1,2 @@ +const X = ""; +type X = number; diff --git a/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-const/output.json b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-const/output.json new file mode 100644 index 000000000000..b51eb30f5c6c --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-const/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "X" + }, + "name": "X" + }, + "init": { + "type": "StringLiteral", + "start": 10, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "extra": { + "rawValue": "", + "raw": "\"\"" + }, + "value": "" + } + } + ], + "kind": "const" + }, + { + "type": "TSTypeAliasDeclaration", + "start": 14, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "id": { + "type": "Identifier", + "start": 19, + "end": 20, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + }, + "identifierName": "X" + }, + "name": "X" + }, + "typeAnnotation": { + "type": "TSNumberKeyword", + "start": 23, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-let/input.js b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-let/input.js new file mode 100644 index 000000000000..fe2809ad6b22 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-let/input.js @@ -0,0 +1,2 @@ +let X = ""; +type X = number; diff --git a/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-let/output.json b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-let/output.json new file mode 100644 index 000000000000..8c157d8a364d --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-let/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "X" + }, + "name": "X" + }, + "init": { + "type": "StringLiteral", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "extra": { + "rawValue": "", + "raw": "\"\"" + }, + "value": "" + } + } + ], + "kind": "let" + }, + { + "type": "TSTypeAliasDeclaration", + "start": 12, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "id": { + "type": "Identifier", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + }, + "identifierName": "X" + }, + "name": "X" + }, + "typeAnnotation": { + "type": "TSNumberKeyword", + "start": 21, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-var/input.js b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-var/input.js new file mode 100644 index 000000000000..856d8ef6f308 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-var/input.js @@ -0,0 +1,2 @@ +var X = ""; +type X = number; diff --git a/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-var/output.json b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-var/output.json new file mode 100644 index 000000000000..6cfc11c09339 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/scope/no-dupl-decl-type-var/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "X" + }, + "name": "X" + }, + "init": { + "type": "StringLiteral", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "extra": { + "rawValue": "", + "raw": "\"\"" + }, + "value": "" + } + } + ], + "kind": "var" + }, + { + "type": "TSTypeAliasDeclaration", + "start": 12, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "id": { + "type": "Identifier", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + }, + "identifierName": "X" + }, + "name": "X" + }, + "typeAnnotation": { + "type": "TSNumberKeyword", + "start": 21, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-plugin-transform-classes/src/transformClass.js b/packages/babel-plugin-transform-classes/src/transformClass.js index b537c00b3a4e..0335e363439a 100644 --- a/packages/babel-plugin-transform-classes/src/transformClass.js +++ b/packages/babel-plugin-transform-classes/src/transformClass.js @@ -19,22 +19,6 @@ function buildConstructor(classRef, constructorBody, node) { return func; } -const verifyConstructorVisitor = traverse.visitors.merge([ - environmentVisitor, - { - Super(path, state) { - if (state.isDerived) return; - - const { node, parentPath } = path; - if (parentPath.isCallExpression({ callee: node })) { - throw path.buildCodeFrameError( - "super() is only allowed in a derived constructor", - ); - } - }, - }, -]); - export default function transformClass( path: NodePath, file: any, @@ -180,13 +164,6 @@ export default function transformClass( if (t.isClassMethod(node)) { const isConstructor = node.kind === "constructor"; - if (isConstructor) { - path.traverse(verifyConstructorVisitor, { - isDerived: classState.isDerived, - file: classState.file, - }); - } - const replaceSupers = new ReplaceSupers({ methodPath: path, objectRef: classState.classRef, diff --git a/packages/babel-plugin-transform-classes/test/fixtures/spec/super-call-only-allowed-in-derived-constructor/input.js b/packages/babel-plugin-transform-classes/test/fixtures/spec/super-call-only-allowed-in-derived-constructor/input.js deleted file mode 100644 index 036ce36e395c..000000000000 --- a/packages/babel-plugin-transform-classes/test/fixtures/spec/super-call-only-allowed-in-derived-constructor/input.js +++ /dev/null @@ -1,5 +0,0 @@ -class Foo { - constructor() { - super(); - } -} diff --git a/packages/babel-plugin-transform-classes/test/fixtures/spec/super-call-only-allowed-in-derived-constructor/options.json b/packages/babel-plugin-transform-classes/test/fixtures/spec/super-call-only-allowed-in-derived-constructor/options.json deleted file mode 100644 index a4e0aa5c67b6..000000000000 --- a/packages/babel-plugin-transform-classes/test/fixtures/spec/super-call-only-allowed-in-derived-constructor/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "throws": "super() is only allowed in a derived constructor", - "plugins": ["transform-classes"] -} diff --git a/packages/babel-plugin-transform-classes/test/fixtures/spec/super-illegal-non-constructor-call/options.json b/packages/babel-plugin-transform-classes/test/fixtures/spec/super-illegal-non-constructor-call/options.json index 2ff7004be5b7..84442f571d97 100644 --- a/packages/babel-plugin-transform-classes/test/fixtures/spec/super-illegal-non-constructor-call/options.json +++ b/packages/babel-plugin-transform-classes/test/fixtures/spec/super-illegal-non-constructor-call/options.json @@ -1,3 +1,3 @@ { - "throws": "super() is only valid inside a class constructor. Make sure the method name is spelled exactly as 'constructor'." + "throws": "super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?" } diff --git a/packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/export-type-alias/input.js b/packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/export-type-alias/input.js index 53b5bac68e1b..d2cfab8fba1d 100644 --- a/packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/export-type-alias/input.js +++ b/packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/export-type-alias/input.js @@ -1,5 +1,5 @@ export type GraphQLFormattedError = number; -export type GraphQLFormattedError = { +export type GraphQLFormattedError2 = { message: string, locations?: Array<{ line: number, @@ -7,4 +7,4 @@ export type GraphQLFormattedError = { }> }; export interface foo { p: number } -export interface foo { p: T } +export interface foo2 { p: T } diff --git a/packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/export-type-alias/output.js b/packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/export-type-alias/output.js index 9e64ba75a316..7c4a2cffff69 100644 --- a/packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/export-type-alias/output.js +++ b/packages/babel-plugin-transform-flow-comments/test/fixtures/flow-comments/export-type-alias/output.js @@ -1,6 +1,6 @@ /*:: export type GraphQLFormattedError = number;*/ -/*:: export type GraphQLFormattedError = { +/*:: export type GraphQLFormattedError2 = { message: string, locations?: Array<{ line: number, @@ -10,4 +10,4 @@ /*:: export interface foo { p: number }*/ -/*:: export interface foo { p: T }*/ +/*:: export interface foo2 { p: T }*/ diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js index a97695f41813..eb188c5c908a 100644 --- a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js @@ -1,10 +1,10 @@ class C1<+T, -U> {} function f<+T, -U>() {} type T<+T, -U> = {} -type T = { +p: T } -type T = { -p: T } -type T = { +[k:K]: V } -type T = { -[k:K]: V } +type T1 = { +p: T } +type T2 = { -p: T } +type T3 = { +[k:K]: V } +type T4 = { -[k:K]: V } interface I { +p: T } interface I { -p: T } interface I { +[k:K]: V } diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-opaque-type-alias/input.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-opaque-type-alias/input.js index 53dfc2c87440..404f6d84e4c6 100644 --- a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-opaque-type-alias/input.js +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-opaque-type-alias/input.js @@ -1,6 +1,6 @@ opaque type ID = string; opaque type Foo = Bar -export opaque type Foo = number; +export opaque type Foo1 = number; opaque type union = | {type: "A"} @@ -12,5 +12,5 @@ opaque type overloads = & ((x: number) => string) ; -declare opaque type Foo: Bar; -declare export opaque type Foo: Bar; +declare opaque type Foo2: Bar; +declare export opaque type Fo3: Bar; diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-type-alias/input.js b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-type-alias/input.js index 12bfc22fc85e..2718274e2cf6 100644 --- a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-type-alias/input.js +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-type-alias/input.js @@ -1,6 +1,6 @@ type FBID = number; type Foo = Bar -export type Foo = number; +export type Foo1 = number; type union = | {type: "A"} diff --git a/packages/babel-plugin-transform-new-target/test/fixtures/errors/new-target-arrow/input.js b/packages/babel-plugin-transform-new-target/test/fixtures/errors/new-target-arrow/input.js deleted file mode 100644 index 47bd62071480..000000000000 --- a/packages/babel-plugin-transform-new-target/test/fixtures/errors/new-target-arrow/input.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -const a = () => { - new.target; -}; diff --git a/packages/babel-plugin-transform-new-target/test/fixtures/errors/new-target-arrow/options.json b/packages/babel-plugin-transform-new-target/test/fixtures/errors/new-target-arrow/options.json deleted file mode 100644 index bd1ea4079447..000000000000 --- a/packages/babel-plugin-transform-new-target/test/fixtures/errors/new-target-arrow/options.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "plugins": ["transform-new-target"], - "throws": "new.target must be under a (non-arrow) function or a class." -} diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 5d67387a1eba..cc2903a3aca5 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -284,189 +284,6 @@ built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js( built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js(strict mode) built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js(default) built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js(default) -language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js(default) -language/block-scope/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js(strict mode) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js(default) -language/block-scope/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js(strict mode) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js(default) -language/block-scope/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js(strict mode) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/fn-scope-var-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js(default) -language/block-scope/syntax/redeclaration/function-declaration-attempt-to-redeclare-with-var-declaration-nested-in-function.js(strict mode) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js(default) -language/block-scope/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js(strict mode) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js(default) -language/block-scope/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-async-function.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-async-generator.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-class.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-class.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-const.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-const.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-function.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-function.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-generator.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-generator.js(strict mode) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-let.js(default) -language/block-scope/syntax/redeclaration/inner-block-var-redeclaration-attempt-after-let.js(strict mode) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js(default) -language/block-scope/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js(strict mode) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js(default) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js(default) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js(default) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js(strict mode) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js(default) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js(strict mode) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js(default) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js(strict mode) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js(default) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js(strict mode) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js(default) -language/block-scope/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js(strict mode) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-async-function.js(default) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-async-function.js(strict mode) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-async-generator.js(default) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-async-generator.js(strict mode) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-class.js(default) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-class.js(strict mode) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-const.js(default) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-const.js(strict mode) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-function.js(default) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-function.js(strict mode) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-generator.js(default) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-generator.js(strict mode) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-let.js(default) -language/block-scope/syntax/redeclaration/var-redeclaration-attempt-after-let.js(strict mode) language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(default) language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(strict mode) language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js(default) @@ -479,18 +296,6 @@ language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-de language/expressions/async-arrow-function/early-errors-arrow-await-in-formals-default.js(strict mode) language/expressions/async-arrow-function/early-errors-arrow-await-in-formals.js(default) language/expressions/async-arrow-function/early-errors-arrow-await-in-formals.js(strict mode) -language/expressions/async-arrow-function/early-errors-arrow-formals-body-duplicate.js(default) -language/expressions/async-arrow-function/early-errors-arrow-formals-body-duplicate.js(strict mode) -language/expressions/async-function/early-errors-expression-formals-body-duplicate.js(default) -language/expressions/async-function/early-errors-expression-formals-body-duplicate.js(strict mode) -language/expressions/async-function/named-dflt-params-duplicates.js(default) -language/expressions/async-function/nameless-dflt-params-duplicates.js(default) -language/expressions/async-generator/dflt-params-duplicates.js(default) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(default) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-const.js(strict mode) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(default) -language/expressions/async-generator/early-errors-expression-formals-body-duplicate-let.js(strict mode) -language/expressions/async-generator/named-dflt-params-duplicates.js(default) language/expressions/class/elements/fields-duplicate-privatenames.js(default) language/expressions/class/elements/fields-duplicate-privatenames.js(strict mode) language/expressions/class/elements/fields-literal-name-static-propname-constructor.js(default) @@ -511,8 +316,6 @@ language/expressions/class/elements/private-derived-cls-indirect-eval-err-contai language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js(strict mode) language/expressions/class/elements/private-methods/prod-private-method-initialize-order.js(default) language/expressions/class/elements/private-methods/prod-private-method-initialize-order.js(strict mode) -language/expressions/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) -language/expressions/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) @@ -591,21 +394,9 @@ language/expressions/class/elements/syntax/early-errors/invalid-names/method-out language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(strict mode) language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(default) language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(strict mode) -language/expressions/function/dflt-params-duplicates.js(default) -language/expressions/generators/dflt-params-duplicates.js(default) -language/expressions/object/method-definition/async-gen-meth-dflt-params-duplicates.js(default) -language/expressions/object/method-definition/async-meth-dflt-params-duplicates.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(strict mode) language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js(default) -language/expressions/object/method-definition/gen-meth-dflt-params-duplicates.js(default) -language/expressions/object/method-definition/generator-param-redecl-const.js(default) -language/expressions/object/method-definition/generator-param-redecl-const.js(strict mode) -language/expressions/object/method-definition/generator-param-redecl-let.js(default) -language/expressions/object/method-definition/generator-param-redecl-let.js(strict mode) -language/expressions/object/method-definition/meth-dflt-params-duplicates.js(default) -language/expressions/object/method-definition/name-param-redecl.js(default) -language/expressions/object/method-definition/name-param-redecl.js(strict mode) language/expressions/object/method-definition/private-name-early-error-async-fn-inside-class.js(default) language/expressions/object/method-definition/private-name-early-error-async-fn-inside-class.js(strict mode) language/expressions/object/method-definition/private-name-early-error-async-gen-inside-class.js(default) @@ -626,12 +417,8 @@ language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js(de language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js(strict mode) language/expressions/template-literal/unicode-escape-nls-err.js(default) language/expressions/template-literal/unicode-escape-nls-err.js(strict mode) -language/global-code/new.target-arrow.js(default) -language/global-code/new.target-arrow.js(strict mode) language/identifiers/unicode-escape-nls-err.js(default) language/identifiers/unicode-escape-nls-err.js(strict mode) -language/import/dup-bound-names.js(default) -language/import/dup-bound-names.js(strict mode) language/line-terminators/invalid-string-ls.js(default) language/line-terminators/invalid-string-ls.js(strict mode) language/line-terminators/invalid-string-ps.js(default) @@ -816,12 +603,6 @@ language/module-code/early-export-global.js(default) language/module-code/early-export-global.js(strict mode) language/module-code/early-export-unresolvable.js(default) language/module-code/early-export-unresolvable.js(strict mode) -language/module-code/early-lex-and-var.js(default) -language/module-code/early-lex-and-var.js(strict mode) -language/module-code/parse-err-hoist-lex-fun.js(default) -language/module-code/parse-err-hoist-lex-fun.js(strict mode) -language/module-code/parse-err-hoist-lex-gen.js(default) -language/module-code/parse-err-hoist-lex-gen.js(strict mode) language/module-code/privatename-not-valid-earlyerr-module-1.js(default) language/module-code/privatename-not-valid-earlyerr-module-1.js(strict mode) language/module-code/privatename-not-valid-earlyerr-module-2.js(default) @@ -830,10 +611,6 @@ language/module-code/privatename-not-valid-earlyerr-module-3.js(default) language/module-code/privatename-not-valid-earlyerr-module-3.js(strict mode) language/module-code/privatename-not-valid-earlyerr-module-4.js(default) language/module-code/privatename-not-valid-earlyerr-module-4.js(strict mode) -language/statements/async-function/dflt-params-duplicates.js(default) -language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(default) -language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(strict mode) -language/statements/async-generator/dflt-params-duplicates.js(default) language/statements/class/async-gen-meth-escaped-async.js(default) language/statements/class/async-gen-meth-escaped-async.js(strict mode) language/statements/class/async-meth-escaped-async.js(default) @@ -866,8 +643,6 @@ language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js(de language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js(strict mode) language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js(default) language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js(strict mode) -language/statements/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js(default) -language/statements/class/elements/syntax/early-errors/grammar-ctor-super-no-heritage.js(strict mode) language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) @@ -946,174 +721,29 @@ language/statements/class/elements/syntax/early-errors/invalid-names/method-outt language/statements/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(strict mode) language/statements/class/elements/syntax/early-errors/super-private-access-invalid.js(default) language/statements/class/elements/syntax/early-errors/super-private-access-invalid.js(strict mode) -language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(default) -language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js(strict mode) -language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(default) -language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js(strict mode) -language/statements/const/redeclaration-error-from-within-strict-mode-function-const.js(default) language/statements/for-in/dstr/array-rest-before-elision.js(default) language/statements/for-in/dstr/array-rest-before-elision.js(strict mode) language/statements/for-in/dstr/array-rest-elision-invalid.js(default) language/statements/for-in/dstr/array-rest-elision-invalid.js(strict mode) -language/statements/for-in/head-const-bound-names-dup.js(default) -language/statements/for-in/head-const-bound-names-dup.js(strict mode) language/statements/for-in/head-const-bound-names-in-stmt.js(default) language/statements/for-in/head-const-bound-names-in-stmt.js(strict mode) -language/statements/for-in/head-let-bound-names-dup.js(default) -language/statements/for-in/head-let-bound-names-dup.js(strict mode) language/statements/for-in/head-let-bound-names-in-stmt.js(default) language/statements/for-in/head-let-bound-names-in-stmt.js(strict mode) language/statements/for-of/dstr/array-rest-before-elision.js(default) language/statements/for-of/dstr/array-rest-before-elision.js(strict mode) language/statements/for-of/dstr/array-rest-elision-invalid.js(default) language/statements/for-of/dstr/array-rest-elision-invalid.js(strict mode) -language/statements/for-of/head-const-bound-names-dup.js(default) -language/statements/for-of/head-const-bound-names-dup.js(strict mode) language/statements/for-of/head-const-bound-names-in-stmt.js(default) language/statements/for-of/head-const-bound-names-in-stmt.js(strict mode) language/statements/for-of/head-decl-no-expr.js(default) language/statements/for-of/head-decl-no-expr.js(strict mode) language/statements/for-of/head-expr-no-expr.js(default) language/statements/for-of/head-expr-no-expr.js(strict mode) -language/statements/for-of/head-let-bound-names-dup.js(default) -language/statements/for-of/head-let-bound-names-dup.js(strict mode) language/statements/for-of/head-let-bound-names-in-stmt.js(default) language/statements/for-of/head-let-bound-names-in-stmt.js(strict mode) language/statements/for-of/head-var-no-expr.js(default) language/statements/for-of/head-var-no-expr.js(strict mode) language/statements/for/head-let-bound-names-in-stmt.js(default) language/statements/for/head-let-bound-names-in-stmt.js(strict mode) -language/statements/function/dflt-params-duplicates.js(default) -language/statements/generators/dflt-params-duplicates.js(default) -language/statements/let/redeclaration-error-from-within-strict-mode-function.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-class.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-const.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-function.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-let.js(strict mode) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js(default) -language/statements/switch/syntax/redeclaration/async-function-name-redeclaration-attempt-with-var.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js(default) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-function.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js(default) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js(default) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-class.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js(default) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-const.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js(default) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-function.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js(default) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js(default) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-let.js(strict mode) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js(default) -language/statements/switch/syntax/redeclaration/async-generator-name-redeclaration-attempt-with-var.js(strict mode) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js(default) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-function.js(strict mode) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js(default) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js(default) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-class.js(strict mode) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js(default) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-const.js(strict mode) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js(default) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-function.js(strict mode) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js(default) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js(default) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-let.js(strict mode) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js(default) -language/statements/switch/syntax/redeclaration/class-name-redeclaration-attempt-with-var.js(strict mode) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js(default) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-function.js(strict mode) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js(default) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js(default) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-class.js(strict mode) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js(default) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-const.js(strict mode) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js(default) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-function.js(strict mode) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js(default) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js(default) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-let.js(strict mode) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js(default) -language/statements/switch/syntax/redeclaration/const-name-redeclaration-attempt-with-var.js(strict mode) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js(default) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-function.js(strict mode) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js(default) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js(default) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-class.js(strict mode) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js(default) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-const.js(strict mode) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-function.js(strict mode) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js(default) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js(default) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-let.js(strict mode) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js(default) -language/statements/switch/syntax/redeclaration/function-name-redeclaration-attempt-with-var.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js(default) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-function.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js(default) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js(default) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-class.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js(default) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-const.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js(default) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-function.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js(default) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js(default) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-let.js(strict mode) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js(default) -language/statements/switch/syntax/redeclaration/generator-name-redeclaration-attempt-with-var.js(strict mode) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js(default) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-function.js(strict mode) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js(default) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js(default) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-class.js(strict mode) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js(default) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-const.js(strict mode) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js(default) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-function.js(strict mode) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js(default) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js(default) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-let.js(strict mode) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js(default) -language/statements/switch/syntax/redeclaration/let-name-redeclaration-attempt-with-var.js(strict mode) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js(default) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-function.js(strict mode) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js(default) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-async-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js(default) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-class.js(strict mode) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js(default) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-const.js(strict mode) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js(default) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-function.js(strict mode) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js(default) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-generator.js(strict mode) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js(default) -language/statements/switch/syntax/redeclaration/var-name-redeclaration-attempt-with-let.js(strict mode) -language/statements/try/early-catch-function.js(default) -language/statements/try/early-catch-function.js(strict mode) -language/statements/try/early-catch-lex.js(default) -language/statements/try/early-catch-lex.js(strict mode) language/statements/try/early-catch-var.js(default) language/statements/try/early-catch-var.js(strict mode) \ No newline at end of file From 632552f55d4d2b859715f65ecf659bdd524c471d Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 25 Feb 2019 11:52:40 -0800 Subject: [PATCH 317/563] Minify bundles on circle for repl (#9582) --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 95de88499fc5..c43f8398678e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: - run: yarn --version - run: make test-ci-coverage # Builds babel-standalone with the regular Babel config - - run: make build + - run: IS_PUBLISH=true make build # test-ci-coverage doesn't test babel-standalone, as trying to gather coverage # data for a JS file that's several megabytes large is bound to fail. Here, # we just run the babel-standalone test separately. From 0e3968124c226291ca75a7f06086bafcbdb5d6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 25 Feb 2019 21:51:17 +0100 Subject: [PATCH 318/563] Remove unused file (eslint-local-rules.js) (#9583) --- eslint-local-rules.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 eslint-local-rules.js diff --git a/eslint-local-rules.js b/eslint-local-rules.js deleted file mode 100644 index 8b3b7ea4971f..000000000000 --- a/eslint-local-rules.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -const noDeprecatedClone = require("./scripts/eslint_rules/no-deprecated-clone"); -const noUndefinedIdentifier = require("./scripts/eslint_rules/no-undefined-identifier"); -const pluginName = require("./scripts/eslint_rules/plugin-name"); - -module.exports = { - "no-deprecated-clone": noDeprecatedClone, - "no-undefined-identifier": noUndefinedIdentifier, - "plugin-name": pluginName, -}; From 434fd32c90909a577ef9b090c4a6972f9537ba50 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 25 Feb 2019 16:51:38 -0600 Subject: [PATCH 319/563] Update esm and electron mappings in preset-env (#9573) --- .../data/built-in-modules.json | 2 +- packages/babel-preset-env/data/built-ins.json | 93 ++++++++++--------- packages/babel-preset-env/data/plugins.json | 22 ++--- packages/babel-preset-env/package.json | 6 +- .../babel-preset-env/scripts/build-data.js | 9 +- .../scripts/build-modules-support.js | 13 ++- 6 files changed, 76 insertions(+), 69 deletions(-) diff --git a/packages/babel-preset-env/data/built-in-modules.json b/packages/babel-preset-env/data/built-in-modules.json index 9bd7f2aa0016..e1b1e8a6dc4e 100644 --- a/packages/babel-preset-env/data/built-in-modules.json +++ b/packages/babel-preset-env/data/built-in-modules.json @@ -6,6 +6,6 @@ "safari": "10.1", "opera": "48", "ios_saf": "10.3", - "and_ff": "60" + "and_ff": "64" } } diff --git a/packages/babel-preset-env/data/built-ins.json b/packages/babel-preset-env/data/built-ins.json index 2e6321e2b37c..8e2d2570771f 100644 --- a/packages/babel-preset-env/data/built-ins.json +++ b/packages/babel-preset-env/data/built-ins.json @@ -17,7 +17,7 @@ "safari": "3.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -40,7 +40,7 @@ "safari": "3.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -73,7 +73,7 @@ "safari": "3.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -106,7 +106,7 @@ "safari": "3.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -119,7 +119,7 @@ "safari": "4", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -142,7 +142,7 @@ "safari": "3.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -155,7 +155,7 @@ "safari": "3.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -178,7 +178,7 @@ "safari": "4", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -191,7 +191,7 @@ "safari": "4", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -204,7 +204,7 @@ "safari": "3.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -215,10 +215,10 @@ "edge": "12", "firefox": "5", "safari": "10.1", - "node": "10.0", + "node": "10", "ie": "9", "ios": "10.3", - "electron": "3" + "electron": "3.1" }, "es6.array.species": { "chrome": "51", @@ -238,7 +238,7 @@ "safari": "4", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -251,7 +251,7 @@ "safari": "4", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -264,7 +264,7 @@ "safari": "10", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "10", "electron": "1.1" }, @@ -286,7 +286,7 @@ "safari": "3.1", "node": "0.12", "ie": "10", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -299,9 +299,10 @@ "safari": "5.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "7", - "phantom": "2" + "phantom": "2", + "electron": "5" }, "es6.function.has-instance": { "chrome": "51", @@ -320,7 +321,7 @@ "firefox": "2", "safari": "4", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -624,7 +625,7 @@ "safari": "4", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -637,7 +638,7 @@ "node": "8.10", "ios": "9", "opera": "49", - "electron": "3" + "electron": "3.1" }, "es7.object.define-setter": { "chrome": "62", @@ -647,7 +648,7 @@ "node": "8.10", "ios": "9", "opera": "49", - "electron": "3" + "electron": "3.1" }, "es6.object.define-property": { "chrome": "5", @@ -657,7 +658,7 @@ "safari": "5.1", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -670,7 +671,7 @@ "safari": "4", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -742,7 +743,7 @@ "node": "8.10", "ios": "9", "opera": "49", - "electron": "3" + "electron": "3.1" }, "es7.object.lookup-setter": { "chrome": "62", @@ -751,7 +752,7 @@ "node": "8.10", "ios": "9", "opera": "49", - "electron": "3" + "electron": "3.1" }, "es6.object.prevent-extensions": { "chrome": "44", @@ -859,10 +860,10 @@ "edge": "18", "firefox": "58", "safari": "11.1", - "node": "10.0", + "node": "10", "ios": "11.3", "opera": "50", - "electron": "3" + "electron": "3.1" }, "es6.reflect.apply": { "chrome": "49", @@ -1080,10 +1081,10 @@ "chrome": "63", "firefox": "57", "safari": "12", - "node": "10.0", + "node": "10", "ios": "12", "opera": "50", - "electron": "3" + "electron": "3.1" }, "es6.string.anchor": { "chrome": "5", @@ -1091,7 +1092,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1102,7 +1103,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1113,7 +1114,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1124,7 +1125,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1155,7 +1156,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1166,7 +1167,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1177,7 +1178,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1208,7 +1209,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1229,7 +1230,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1280,7 +1281,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1301,7 +1302,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1312,7 +1313,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1323,7 +1324,7 @@ "firefox": "17", "safari": "6", "node": "0.12", - "android": "4.0", + "android": "4", "ios": "7", "phantom": "2", "electron": "1.1" @@ -1336,7 +1337,7 @@ "safari": "4", "node": "0.10", "ie": "9", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -1359,7 +1360,7 @@ "safari": "5.1", "node": "0.12", "ie": "10", - "android": "4.0", + "android": "4", "ios": "6", "phantom": "2", "electron": "1.1" @@ -1478,7 +1479,7 @@ "chrome": "69", "firefox": "62", "safari": "12", - "node": "11.0", + "node": "11", "ios": "12", "opera": "56", "electron": "4" diff --git a/packages/babel-preset-env/data/plugins.json b/packages/babel-preset-env/data/plugins.json index 37c725885368..cb6301765dc6 100644 --- a/packages/babel-preset-env/data/plugins.json +++ b/packages/babel-preset-env/data/plugins.json @@ -125,7 +125,7 @@ "node": "8.10", "ios": "11.3", "opera": "49", - "electron": "3" + "electron": "3.1" }, "transform-unicode-regex": { "chrome": "50", @@ -231,10 +231,10 @@ "chrome": "63", "firefox": "57", "safari": "12", - "node": "10.0", + "node": "10", "ios": "12", "opera": "50", - "electron": "3" + "electron": "3.1" }, "proposal-object-rest-spread": { "chrome": "60", @@ -248,35 +248,35 @@ "proposal-unicode-property-regex": { "chrome": "64", "safari": "11.1", - "node": "10.0", + "node": "10", "ios": "11.3", "opera": "51", - "electron": "3" + "electron": "3.1" }, "proposal-json-strings": { "chrome": "66", "firefox": "62", "safari": "12", - "node": "10.0", + "node": "10", "ios": "12", "opera": "53", - "electron": "3" + "electron": "3.1" }, "proposal-optional-catch-binding": { "chrome": "66", "firefox": "58", "safari": "11.1", - "node": "10.0", + "node": "10", "ios": "11.3", "opera": "53", - "electron": "3" + "electron": "3.1" }, "transform-named-capturing-groups-regex": { "chrome": "64", "safari": "11.1", - "node": "10.0", + "node": "10", "ios": "11.3", "opera": "51", - "electron": "3" + "electron": "3.1" } } diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index 234208b68a99..f4b60f0553be 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -53,7 +53,7 @@ "@babel/plugin-transform-template-literals": "^7.2.0", "@babel/plugin-transform-typeof-symbol": "^7.2.0", "@babel/plugin-transform-unicode-regex": "^7.2.0", - "browserslist": "^4.3.4", + "browserslist": "^4.4.2", "invariant": "^2.2.2", "js-levenshtein": "^1.1.3", "semver": "^5.3.0" @@ -66,8 +66,8 @@ "@babel/core": "^7.3.4", "@babel/helper-fixtures": "^7.2.0", "@babel/helper-plugin-test-runner": "^7.0.0", - "caniuse-db": "1.0.30000851", + "caniuse-db": "1.0.30000938", "compat-table": "kangax/compat-table#1e7b377fbdda9243cf9602872fcb493cdbdd565f", - "electron-to-chromium": "1.3.79" + "electron-to-chromium": "1.3.113" } } diff --git a/packages/babel-preset-env/scripts/build-data.js b/packages/babel-preset-env/scripts/build-data.js index 3706d8148ae0..7e1b2289f990 100644 --- a/packages/babel-preset-env/scripts/build-data.js +++ b/packages/babel-preset-env/scripts/build-data.js @@ -254,7 +254,14 @@ const generateData = (environments, features) => { const version = getLowestImplementedVersion(options, env); if (version !== null) { - plugin[env] = version.toString(); + const versionString = version.toString(); + + // NOTE(bng): A number of environments in compat-table changed to + // include a trailing zero (node10 -> node10_0), so for now stripping + // it to be consistent + plugin[env] = versionString.endsWith(".0") + ? versionString.slice(0, -2) + : versionString; } }); diff --git a/packages/babel-preset-env/scripts/build-modules-support.js b/packages/babel-preset-env/scripts/build-modules-support.js index 1ce611078c15..24528bb0ec65 100644 --- a/packages/babel-preset-env/scripts/build-modules-support.js +++ b/packages/babel-preset-env/scripts/build-modules-support.js @@ -3,23 +3,22 @@ const fs = require("fs"); const moduleSupport = require("caniuse-db/features-json/es6-module.json"); -const acceptedWithCaveats = { - safari: true, - ios_saf: true, -}; +const skipList = new Set(["and_chr", "android", "samsung"]); +const acceptedWithCaveats = new Set(["safari", "ios_saf"]); const { stats } = moduleSupport; const allowedBrowsers = {}; Object.keys(stats).forEach(browser => { - if (browser !== "and_chr") { + if (!skipList.has(browser)) { const browserVersions = stats[browser]; const allowedVersions = Object.keys(browserVersions) .filter(value => { - return acceptedWithCaveats[browser] + // Edge 16/17 are marked as "y #6" + return acceptedWithCaveats.has(browser) ? browserVersions[value][0] === "a" - : browserVersions[value] === "y"; + : browserVersions[value].startsWith("y"); }) .sort((a, b) => a - b); From 45c96908e94f044420f2bf01ad9dfa94abdeb970 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 25 Feb 2019 15:10:48 -0800 Subject: [PATCH 320/563] Update test262 (#9587) * Update test262 * Also remove unrecognized tests from the whitelist --- Makefile | 4 +- .../test262/run_babel_parser_test262_utils.js | 4 +- scripts/tests/test262/test262_whitelist.txt | 54 ++++++++----------- 3 files changed, 28 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index 67adb8378d29..0664763b8dd0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ MAKEFLAGS = -j1 FLOW_COMMIT = 2ac56861e3ceff9ca406ae586fbafb3480c6c0b7 -TEST262_COMMIT = 4f1155c566a222238fd86f179c6635ecb4c289bb +TEST262_COMMIT = b4e15b3d5cf63571151dbd02c0987864544c6a56 # Fix color output until TravisCI fixes https://github.com/travis-ci/travis-ci/issues/7967 export FORCE_COLOR = true @@ -103,7 +103,7 @@ test-flow-update-whitelist: bootstrap-test262: rm -rf ./build/test262 mkdir -p ./build - git clone --branch=master --single-branch --shallow-since=2010-01-10 https://github.com/tc39/test262.git ./build/test262 + git clone --branch=master --single-branch --shallow-since=2019-01-01 https://github.com/tc39/test262.git ./build/test262 cd build/test262 && git checkout $(TEST262_COMMIT) test-test262: diff --git a/scripts/tests/test262/run_babel_parser_test262_utils.js b/scripts/tests/test262/run_babel_parser_test262_utils.js index 4a0bf1b25756..99c173dab66d 100644 --- a/scripts/tests/test262/run_babel_parser_test262_utils.js +++ b/scripts/tests/test262/run_babel_parser_test262_utils.js @@ -43,6 +43,7 @@ const ignoredFeatures = [ "for-of", "generators", "globalThis", + "hashbang", "Int8Array", "Int32Array", "Intl.ListFormat", @@ -209,7 +210,8 @@ exports.updateWhitelist = function(filename, summary) { .concat(summary.disallowed.failure) .map(function(test) { return test.id; - }); + }) + .concat(summary.unrecognized); const toAdd = summary.disallowed.falsePositive .concat(summary.disallowed.falseNegative) .map(function(test) { diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index cc2903a3aca5..716f19338cdd 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -284,6 +284,23 @@ built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js( built-ins/RegExp/property-escapes/unsupported-property-Line_Break-with-value.js(strict mode) built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js(default) built-ins/RegExp/property-escapes/unsupported-property-Line_Break.js(strict mode) +language/comments/hashbang/escaped-bang-041.js(default) +language/comments/hashbang/escaped-bang-u0021.js(default) +language/comments/hashbang/escaped-bang-u21.js(default) +language/comments/hashbang/escaped-bang-x21.js(default) +language/comments/hashbang/escaped-hash-043.js(default) +language/comments/hashbang/escaped-hash-u0023.js(default) +language/comments/hashbang/escaped-hash-u23.js(default) +language/comments/hashbang/escaped-hash-x23.js(default) +language/comments/hashbang/escaped-hashbang.js(default) +language/comments/hashbang/multi-line-comment.js(default) +language/comments/hashbang/preceding-directive-prologue-sc.js(default) +language/comments/hashbang/preceding-directive-prologue.js(default) +language/comments/hashbang/preceding-empty-statement.js(default) +language/comments/hashbang/preceding-hashbang.js(default) +language/comments/hashbang/preceding-line-comment.js(default) +language/comments/hashbang/preceding-multi-line-comment.js(default) +language/comments/hashbang/preceding-whitespace.js(default) language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(default) language/expressions/assignment/destructuring/obj-prop-__proto__dup.js(strict mode) language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js(default) @@ -316,6 +333,8 @@ language/expressions/class/elements/private-derived-cls-indirect-eval-err-contai language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js(strict mode) language/expressions/class/elements/private-methods/prod-private-method-initialize-order.js(default) language/expressions/class/elements/private-methods/prod-private-method-initialize-order.js(strict mode) +language/expressions/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js(default) +language/expressions/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js(strict mode) language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) language/expressions/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) @@ -372,14 +391,6 @@ language/expressions/class/elements/syntax/early-errors/invalid-names/method-her language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js(strict mode) language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js(default) language/expressions/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js(strict mode) -language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js(default) -language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js(strict mode) -language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js(default) -language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js(strict mode) -language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js(default) -language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js(strict mode) -language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js(default) -language/expressions/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js(strict mode) language/expressions/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js(default) language/expressions/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js(strict mode) language/expressions/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js(default) @@ -394,6 +405,7 @@ language/expressions/class/elements/syntax/early-errors/invalid-names/method-out language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(strict mode) language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(default) language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(strict mode) +language/expressions/object/method-definition/early-errors-object-async-method-duplicate-parameters.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(strict mode) language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js(default) @@ -405,24 +417,12 @@ language/expressions/object/method-definition/private-name-early-error-gen-insid language/expressions/object/method-definition/private-name-early-error-gen-inside-class.js(strict mode) language/expressions/object/method-definition/private-name-early-error-method-inside-class.js(default) language/expressions/object/method-definition/private-name-early-error-method-inside-class.js(strict mode) -language/expressions/postfix-decrement/arguments-nostrict.js(default) -language/expressions/postfix-decrement/eval-nostrict.js(default) -language/expressions/postfix-increment/arguments-nostrict.js(default) -language/expressions/postfix-increment/eval-nostrict.js(default) -language/expressions/prefix-decrement/arguments-nostrict.js(default) -language/expressions/prefix-decrement/eval-nostrict.js(default) -language/expressions/prefix-increment/arguments-nostrict.js(default) -language/expressions/prefix-increment/eval-nostrict.js(default) language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js(default) language/expressions/template-literal/invalid-legacy-octal-escape-sequence.js(strict mode) language/expressions/template-literal/unicode-escape-nls-err.js(default) language/expressions/template-literal/unicode-escape-nls-err.js(strict mode) language/identifiers/unicode-escape-nls-err.js(default) language/identifiers/unicode-escape-nls-err.js(strict mode) -language/line-terminators/invalid-string-ls.js(default) -language/line-terminators/invalid-string-ls.js(strict mode) -language/line-terminators/invalid-string-ps.js(default) -language/line-terminators/invalid-string-ps.js(strict mode) language/literals/numeric/numeric-separator-literal-nzd-nsl-dds-leading-zero-err.js(default) language/literals/regexp/early-err-pattern.js(default) language/literals/regexp/early-err-pattern.js(strict mode) @@ -643,6 +643,8 @@ language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js(de language/statements/class/elements/privatename-not-valid-earlyerr-script-3.js(strict mode) language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js(default) language/statements/class/elements/privatename-not-valid-earlyerr-script-4.js(strict mode) +language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js(default) +language/statements/class/elements/syntax/early-errors/grammar-private-field-on-object-destructuring.js(strict mode) language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(default) language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-field.js(strict mode) language/statements/class/elements/syntax/early-errors/grammar-privatemeth-duplicate-get-get.js(default) @@ -699,14 +701,6 @@ language/statements/class/elements/syntax/early-errors/invalid-names/method-heri language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-bad-reference.js(strict mode) language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js(default) language/statements/class/elements/syntax/early-errors/invalid-names/method-heritage-member-expression-this.js(strict mode) -language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js(default) -language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-bad-reference.js(strict mode) -language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js(default) -language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-call-expression-this.js(strict mode) -language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js(default) -language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-bad-reference.js(strict mode) -language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js(default) -language/statements/class/elements/syntax/early-errors/invalid-names/method-inner-member-expression-this.js(strict mode) language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js(default) language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-bad-reference.js(strict mode) language/statements/class/elements/syntax/early-errors/invalid-names/method-member-expression-this.js(default) @@ -744,6 +738,4 @@ language/statements/for-of/head-let-bound-names-in-stmt.js(strict mode) language/statements/for-of/head-var-no-expr.js(default) language/statements/for-of/head-var-no-expr.js(strict mode) language/statements/for/head-let-bound-names-in-stmt.js(default) -language/statements/for/head-let-bound-names-in-stmt.js(strict mode) -language/statements/try/early-catch-var.js(default) -language/statements/try/early-catch-var.js(strict mode) \ No newline at end of file +language/statements/for/head-let-bound-names-in-stmt.js(strict mode) \ No newline at end of file From e6c1065d1987b3f7bdd94d52fafcbc4edb0ad52f Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 25 Feb 2019 15:20:05 -0800 Subject: [PATCH 321/563] Fix strict mode prescanning with EmptyStatement (#9585) --- packages/babel-parser/src/parser/util.js | 11 +- .../use-strict-with-pre-semi/input.js | 3 + .../use-strict-with-pre-semi/output.json | 252 ++++++++++++++++++ 3 files changed, 265 insertions(+), 1 deletion(-) create mode 100644 packages/babel-parser/test/fixtures/core/regression/use-strict-with-pre-semi/input.js create mode 100644 packages/babel-parser/test/fixtures/core/regression/use-strict-with-pre-semi/output.json diff --git a/packages/babel-parser/src/parser/util.js b/packages/babel-parser/src/parser/util.js index 4c8eb453a8c3..6d5234793b6d 100644 --- a/packages/babel-parser/src/parser/util.js +++ b/packages/babel-parser/src/parser/util.js @@ -5,7 +5,7 @@ import Tokenizer from "../tokenizer"; import type { Node } from "../types"; import { lineBreak, skipWhiteSpace } from "../util/whitespace"; -const literal = /^(?:;|('|")((?:\\?.)*?)\1)/; +const literal = /^('|")((?:\\?.)*?)\1/; // ## Parser utilities @@ -170,6 +170,7 @@ export default class UtilParser extends Tokenizer { strictDirective(start: number): boolean { for (;;) { + // Try to find string literal. skipWhiteSpace.lastIndex = start; // $FlowIgnore start += skipWhiteSpace.exec(this.state.input)[0].length; @@ -177,6 +178,14 @@ export default class UtilParser extends Tokenizer { if (!match) break; if (match[2] === "use strict") return true; start += match[0].length; + + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + // $FlowIgnore + start += skipWhiteSpace.exec(this.state.input)[0].length; + if (this.state.input[start] === ";") { + start++; + } } return false; diff --git a/packages/babel-parser/test/fixtures/core/regression/use-strict-with-pre-semi/input.js b/packages/babel-parser/test/fixtures/core/regression/use-strict-with-pre-semi/input.js new file mode 100644 index 000000000000..b6452ebfc3ad --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/regression/use-strict-with-pre-semi/input.js @@ -0,0 +1,3 @@ +function a ([a] = []) { + ; 'use strict'; with ({}) {} +} diff --git a/packages/babel-parser/test/fixtures/core/regression/use-strict-with-pre-semi/output.json b/packages/babel-parser/test/fixtures/core/regression/use-strict-with-pre-semi/output.json new file mode 100644 index 000000000000..694c18f640d7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/regression/use-strict-with-pre-semi/output.json @@ -0,0 +1,252 @@ +{ + "type": "File", + "start": 0, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "a" + }, + "name": "a" + }, + "generator": false, + "async": false, + "params": [ + { + "type": "AssignmentPattern", + "start": 12, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "left": { + "type": "ArrayPattern", + "start": 12, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "elements": [ + { + "type": "Identifier", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + }, + "identifierName": "a" + }, + "name": "a" + } + ] + }, + "right": { + "type": "ArrayExpression", + "start": 18, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "elements": [] + } + } + ], + "body": { + "type": "BlockStatement", + "start": 22, + "end": 55, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "EmptyStatement", + "start": 25, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 2 + } + } + }, + { + "type": "ExpressionStatement", + "start": 27, + "end": 40, + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "expression": { + "type": "StringLiteral", + "start": 27, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "extra": { + "rawValue": "use strict", + "raw": "'use strict'" + }, + "value": "use strict" + } + }, + { + "type": "WithStatement", + "start": 41, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 29 + } + }, + "object": { + "type": "ObjectExpression", + "start": 47, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "properties": [] + }, + "body": { + "type": "BlockStatement", + "start": 51, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 29 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file From d0e196d210545428c78e8e8177464c0637b28f88 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 25 Feb 2019 18:30:51 -0800 Subject: [PATCH 322/563] Treat for loop body as part of loop scope (#9586) --- packages/babel-parser/src/parser/statement.js | 4 +- .../test/fixtures/core/scope/for-let/input.js | 3 + .../fixtures/core/scope/for-let/output.json | 191 ++++++++++++++++++ .../test/fixtures/core/scope/for-var/input.js | 3 + .../fixtures/core/scope/for-var/options.json | 3 + scripts/tests/test262/test262_whitelist.txt | 13 +- 6 files changed, 204 insertions(+), 13 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/core/scope/for-let/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/for-let/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/for-var/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/for-var/options.json diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 5e77de8ba31a..0f55802ea0e2 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -901,7 +901,6 @@ export default class StatementParser extends ExpressionParser { node.update = this.match(tt.parenR) ? null : this.parseExpression(); this.expect(tt.parenR); - this.scope.exit(); node.body = // For the smartPipelines plugin: Disable topic references from outer // contexts within the loop body. They are permitted in test expressions, @@ -911,6 +910,7 @@ export default class StatementParser extends ExpressionParser { this.parseStatement("for"), ); + this.scope.exit(); this.state.labels.pop(); return this.finishNode(node, "ForStatement"); @@ -937,7 +937,6 @@ export default class StatementParser extends ExpressionParser { node.right = this.parseExpression(); this.expect(tt.parenR); - this.scope.exit(); node.body = // For the smartPipelines plugin: // Disable topic references from outer contexts within the loop body. @@ -947,6 +946,7 @@ export default class StatementParser extends ExpressionParser { this.parseStatement("for"), ); + this.scope.exit(); this.state.labels.pop(); return this.finishNode(node, type); diff --git a/packages/babel-parser/test/fixtures/core/scope/for-let/input.js b/packages/babel-parser/test/fixtures/core/scope/for-let/input.js new file mode 100644 index 000000000000..a169b4038040 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/for-let/input.js @@ -0,0 +1,3 @@ +for (let i = 0;;) { + let i; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/for-let/output.json b/packages/babel-parser/test/fixtures/core/scope/for-let/output.json new file mode 100644 index 000000000000..8af98b16aa63 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/for-let/output.json @@ -0,0 +1,191 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ForStatement", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "init": { + "type": "VariableDeclaration", + "start": 5, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "i" + }, + "name": "i" + }, + "init": { + "type": "NumericLiteral", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + } + ], + "kind": "let" + }, + "test": null, + "update": null, + "body": { + "type": "BlockStatement", + "start": 18, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 24, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + }, + "id": { + "type": "Identifier", + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + }, + "identifierName": "i" + }, + "name": "i" + }, + "init": null + } + ], + "kind": "let" + } + ], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/for-var/input.js b/packages/babel-parser/test/fixtures/core/scope/for-var/input.js new file mode 100644 index 000000000000..400b636e5c84 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/for-var/input.js @@ -0,0 +1,3 @@ +for (let i = 0;;) { + var i; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/for-var/options.json b/packages/babel-parser/test/fixtures/core/scope/for-var/options.json new file mode 100644 index 000000000000..10e45adf4560 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/for-var/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'i' has already been declared (2:8)" +} \ No newline at end of file diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 716f19338cdd..0c385c9bc7dc 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -1,3 +1,4 @@ + annexB/language/statements/for-in/bare-initializer.js(default) annexB/language/statements/for-in/bare-initializer.js(strict mode) built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js(default) @@ -719,23 +720,13 @@ language/statements/for-in/dstr/array-rest-before-elision.js(default) language/statements/for-in/dstr/array-rest-before-elision.js(strict mode) language/statements/for-in/dstr/array-rest-elision-invalid.js(default) language/statements/for-in/dstr/array-rest-elision-invalid.js(strict mode) -language/statements/for-in/head-const-bound-names-in-stmt.js(default) -language/statements/for-in/head-const-bound-names-in-stmt.js(strict mode) -language/statements/for-in/head-let-bound-names-in-stmt.js(default) -language/statements/for-in/head-let-bound-names-in-stmt.js(strict mode) language/statements/for-of/dstr/array-rest-before-elision.js(default) language/statements/for-of/dstr/array-rest-before-elision.js(strict mode) language/statements/for-of/dstr/array-rest-elision-invalid.js(default) language/statements/for-of/dstr/array-rest-elision-invalid.js(strict mode) -language/statements/for-of/head-const-bound-names-in-stmt.js(default) -language/statements/for-of/head-const-bound-names-in-stmt.js(strict mode) language/statements/for-of/head-decl-no-expr.js(default) language/statements/for-of/head-decl-no-expr.js(strict mode) language/statements/for-of/head-expr-no-expr.js(default) language/statements/for-of/head-expr-no-expr.js(strict mode) -language/statements/for-of/head-let-bound-names-in-stmt.js(default) -language/statements/for-of/head-let-bound-names-in-stmt.js(strict mode) language/statements/for-of/head-var-no-expr.js(default) -language/statements/for-of/head-var-no-expr.js(strict mode) -language/statements/for/head-let-bound-names-in-stmt.js(default) -language/statements/for/head-let-bound-names-in-stmt.js(strict mode) \ No newline at end of file +language/statements/for-of/head-var-no-expr.js(strict mode) \ No newline at end of file From 8f26f6df8355540dd8f351e9f71f7bf056838e2c Mon Sep 17 00:00:00 2001 From: Florian Adonis Date: Tue, 26 Feb 2019 16:05:43 +0100 Subject: [PATCH 323/563] change var name for coherence (#9579) --- packages/babel-generator/src/printer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-generator/src/printer.js b/packages/babel-generator/src/printer.js index 1d0b2077a160..fb4715d491c5 100644 --- a/packages/babel-generator/src/printer.js +++ b/packages/babel-generator/src/printer.js @@ -367,7 +367,7 @@ export default class Printer { const loc = t.isProgram(node) || t.isFile(node) ? null : node.loc; this.withSource("start", loc, () => { - this[node.type](node, parent); + printMethod.call(this, node, parent); }); this._printTrailingComments(node); From f1ab6120d2617e25d1dbf1eec6c7d74c61ad329b Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Tue, 26 Feb 2019 11:21:00 -0600 Subject: [PATCH 324/563] Bump Babel deps (#9590) --- babel.config.js | 8 +- package.json | 10 +- yarn.lock | 461 +++++++++++++++++++++++------------------------- 3 files changed, 232 insertions(+), 247 deletions(-) diff --git a/babel.config.js b/babel.config.js index 12f4bb16ca83..cb8f2fbf003b 100644 --- a/babel.config.js +++ b/babel.config.js @@ -115,9 +115,11 @@ module.exports = function(api) { "packages/babel-runtime", /[\\/]node_modules[\\/](?:@babel\/runtime|babel-runtime|core-js)[\\/]/, ], - plugins: [includeRuntime ? "@babel/transform-runtime" : null].filter( - Boolean - ), + plugins: [ + includeRuntime + ? ["@babel/transform-runtime", { version: "7.3.4" }] + : null, + ].filter(Boolean), }, ].filter(Boolean), }; diff --git a/package.json b/package.json index d682ce4540bf..109bc6a97be9 100644 --- a/package.json +++ b/package.json @@ -10,17 +10,17 @@ }, "devDependencies": { "@babel/cli": "^7.2.3", - "@babel/core": "^7.2.2", + "@babel/core": "^7.3.4", "@babel/eslint-plugin-development": "^1.0.1", - "@babel/plugin-proposal-class-properties": "^7.3.0", + "@babel/plugin-proposal-class-properties": "^7.3.4", "@babel/plugin-proposal-export-namespace-from": "^7.2.0", "@babel/plugin-proposal-numeric-separator": "^7.2.0", "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/plugin-transform-runtime": "^7.2.0", - "@babel/preset-env": "^7.3.1", + "@babel/plugin-transform-runtime": "^7.3.4", + "@babel/preset-env": "^7.3.4", "@babel/preset-flow": "^7.0.0", "@babel/register": "^7.0.0", - "@babel/runtime": "^7.3.1", + "@babel/runtime": "^7.3.4", "babel-eslint": "^11.0.0-beta.0", "babel-jest": "^24.0.0", "babel-loader": "^8.0.5", diff --git a/yarn.lock b/yarn.lock index e0f7d90ff7d3..ab1eecdd3c33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,7 @@ "@babel/cli@^7.2.3": version "7.2.3" resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.2.3.tgz#1b262e42a3e959d28ab3d205ba2718e1923cfee6" + integrity sha512-bfna97nmJV6nDJhXNPeEfxyMjWnt6+IjUAaDPiYRTBlm8L41n8nvw6UAqUCbvpFfU246gHPxW7sfWwqtF4FcYA== dependencies: commander "^2.8.1" convert-source-map "^1.1.0" @@ -21,24 +22,26 @@ "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@^7.1.0", "@babel/core@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687" +"@babel/core@^7.1.0", "@babel/core@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.3.4.tgz#921a5a13746c21e32445bf0798680e9d11a6530b" + integrity sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.2.2" + "@babel/generator" "^7.3.4" "@babel/helpers" "^7.2.0" - "@babel/parser" "^7.2.2" + "@babel/parser" "^7.3.4" "@babel/template" "^7.2.2" - "@babel/traverse" "^7.2.2" - "@babel/types" "^7.2.2" + "@babel/traverse" "^7.3.4" + "@babel/types" "^7.3.4" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" - lodash "^4.17.10" + lodash "^4.17.11" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" @@ -46,36 +49,30 @@ "@babel/eslint-plugin-development@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@babel/eslint-plugin-development/-/eslint-plugin-development-1.0.1.tgz#1f5206ae95795db09b65e7dbc2b158d66497a44c" + integrity sha512-ioEhN8HgKr4Yx8ef+XryNpKN4FimSFceb0qVVxvoUzpFn3xyq17MlY5AquEqtXObE7Nu7WKq7QL9INzjCrugyw== -"@babel/generator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" - dependencies: - "@babel/types" "^7.0.0" - jsesc "^2.5.1" - lodash "^4.17.10" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/generator@^7.2.2": - version "7.3.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.3.0.tgz#f663838cd7b542366de3aa608a657b8ccb2a99eb" +"@babel/generator@^7.0.0", "@babel/generator@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.3.4.tgz#9aa48c1989257877a9d971296e5b73bfe72e446e" + integrity sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg== dependencies: - "@babel/types" "^7.3.0" + "@babel/types" "^7.3.4" jsesc "^2.5.1" - lodash "^4.17.10" + lodash "^4.17.11" source-map "^0.5.0" trim-right "^1.0.1" "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== dependencies: "@babel/types" "^7.0.0" "@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" + integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== dependencies: "@babel/helper-explode-assignable-expression" "^7.1.0" "@babel/types" "^7.0.0" @@ -83,24 +80,28 @@ "@babel/helper-call-delegate@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" + integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ== dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-create-class-features-plugin@^7.3.0": - version "7.3.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.3.0.tgz#2b01a81b3adc2b1287f9ee193688ef8dc71e718f" +"@babel/helper-create-class-features-plugin@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.3.4.tgz#092711a7a3ad8ea34de3e541644c2ce6af1f6f0c" + integrity sha512-uFpzw6L2omjibjxa8VGZsJUPL5wJH0zzGKpoz0ccBkzIa6C8kWNUbiBmQ0rgOKWlHJ6qzmfa6lTiGchiV8SC+g== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.2.3" + "@babel/helper-replace-supers" "^7.3.4" + "@babel/helper-split-export-declaration" "^7.0.0" "@babel/helper-define-map@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" + integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/types" "^7.0.0" @@ -109,6 +110,7 @@ "@babel/helper-explode-assignable-expression@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" + integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== dependencies: "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" @@ -116,6 +118,7 @@ "@babel/helper-function-name@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== dependencies: "@babel/helper-get-function-arity" "^7.0.0" "@babel/template" "^7.1.0" @@ -124,24 +127,28 @@ "@babel/helper-get-function-arity@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== dependencies: "@babel/types" "^7.0.0" "@babel/helper-hoist-variables@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" + integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w== dependencies: "@babel/types" "^7.0.0" "@babel/helper-member-expression-to-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" + integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-imports@7.0.0-beta.35": version "7.0.0-beta.35" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.35.tgz#308e350e731752cdb4d0f058df1d704925c64e0a" + integrity sha512-vaC1KyIZSuyWb3Lj277fX0pxivyHwuDU4xZsofqgYAbkDxNieMg2vuhzP5AgMweMY7fCQUMTi+BgPqTLjkxXFg== dependencies: "@babel/types" "7.0.0-beta.35" lodash "^4.2.0" @@ -149,39 +156,45 @@ "@babel/helper-module-imports@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" + integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963" + integrity sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/template" "^7.2.2" + "@babel/types" "^7.2.2" lodash "^4.17.10" "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" + integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== dependencies: "@babel/types" "^7.0.0" "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" + integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== "@babel/helper-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" + integrity sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg== dependencies: lodash "^4.17.10" "@babel/helper-remap-async-to-generator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" + integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-wrap-function" "^7.1.0" @@ -189,18 +202,20 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.2.3": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz#19970020cf22677d62b3a689561dbd9644d8c5e5" +"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.3.4.tgz#a795208e9b911a6eeb08e5891faacf06e7013e13" + integrity sha512-pvObL9WVf2ADs+ePg0jrqlhHoxRXlOa+SHRHzAXIz2xkYuOHfGl+fKxPMaS4Fq+uje8JQPobnertBBvyrWnQ1A== dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.2.3" - "@babel/types" "^7.0.0" + "@babel/traverse" "^7.3.4" + "@babel/types" "^7.3.4" "@babel/helper-simple-access@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" + integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== dependencies: "@babel/template" "^7.1.0" "@babel/types" "^7.0.0" @@ -208,56 +223,64 @@ "@babel/helper-split-export-declaration@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" + integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag== dependencies: "@babel/types" "^7.0.0" "@babel/helper-wrap-function@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" + integrity sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/template" "^7.1.0" "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.2.0" "@babel/helpers@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" + version "7.3.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.3.1.tgz#949eec9ea4b45d3210feb7dc1c22db664c9e44b9" + integrity sha512-Q82R3jKsVpUV99mgX50gOPCWwco9Ec5Iln/8Vyu4osNIOQgSrd9RFrQeUvmvddFNoLwMyOUWU+5ckioEKpDoGA== dependencies: "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.5" - "@babel/types" "^7.2.0" + "@babel/types" "^7.3.0" "@babel/highlight@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.2.2", "@babel/parser@^7.2.3": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.1.tgz#8f4ffd45f779e6132780835ffa7a215fa0b2d181" +"@babel/parser@^7.0.0", "@babel/parser@^7.2.2", "@babel/parser@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.4.tgz#a43357e4bbf4b92a437fb9e465c192848287f27c" + integrity sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ== "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" + integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-syntax-async-generators" "^7.2.0" -"@babel/plugin-proposal-class-properties@^7.3.0": - version "7.3.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.0.tgz#272636bc0fa19a0bc46e601ec78136a173ea36cd" +"@babel/plugin-proposal-class-properties@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.4.tgz#410f5173b3dc45939f9ab30ca26684d72901405e" + integrity sha512-lUf8D3HLs4yYlAo8zjuneLvfxN7qfKv1Yzbj5vjqaqMJxgJA3Ipwp4VUJ+OrOdz53Wbww6ahwB8UhB2HQyLotA== dependencies: - "@babel/helper-create-class-features-plugin" "^7.3.0" + "@babel/helper-create-class-features-plugin" "^7.3.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-export-namespace-from@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.2.0.tgz#308fd4d04ff257fc3e4be090550840eeabad5dd9" + integrity sha512-DZUxbHYxQ5fUFIkMEnh75ogEdBLPfL+mQUqrO2hNY2LGm+tqFnxE924+mhAcCOh/8za8AaZsWHbq6bBoS3TAzA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-export-namespace-from" "^7.2.0" @@ -265,6 +288,7 @@ "@babel/plugin-proposal-json-strings@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" + integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.2.0" @@ -272,13 +296,15 @@ "@babel/plugin-proposal-numeric-separator@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.2.0.tgz#646854daf4cd22fd6733f6076013a936310443ac" + integrity sha512-DohMOGDrZiMKS7LthjUZNNcWl8TAf5BZDwZAH4wpm55FuJTHgfqPGdibg7rZDmont/8Yg0zA03IgT6XLeP+4sg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-numeric-separator" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.3.1": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.1.tgz#f69fb6a1ea6a4e1c503994a91d9cf76f3c4b36e8" +"@babel/plugin-proposal-object-rest-spread@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.4.tgz#47f73cf7f2a721aad5c0261205405c642e424654" + integrity sha512-j7VQmbbkA+qrzNqbKHrBsW3ddFnOeva6wzSe/zB7T+xaxGc+RCpwo44wCmRixAIGRoIpmVgvzFzNJqQcO3/9RA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.2.0" @@ -286,6 +312,7 @@ "@babel/plugin-proposal-optional-catch-binding@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" + integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" @@ -293,6 +320,7 @@ "@babel/plugin-proposal-unicode-property-regex@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" + integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -301,54 +329,63 @@ "@babel/plugin-syntax-async-generators@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" + integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-export-namespace-from@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.2.0.tgz#8d257838c6b3b779db52c0224443459bd27fb039" + integrity sha512-1zGA3UNch6A+A11nIzBVEaE3DDJbjfB+eLIcf0GGOh/BJr/8NxL3546MGhV/r0RhH4xADFIEso39TKCfEMlsGA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-flow@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0.tgz#70638aeaad9ee426bc532e51523cff8ff02f6f17" +"@babel/plugin-syntax-flow@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c" + integrity sha512-r6YMuZDWLtLlu0kqIim5o/3TNRAlWb073HwT3e2nKf9I8IIvOggPrnILYPsrrKilmn/mYEMCf/Z07w3yQJF6dg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" + integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-numeric-separator@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.2.0.tgz#7470fe070c2944469a756752a69a6963135018be" + integrity sha512-DroeVNkO/BnGpL2R7+ZNZqW+E24aR/4YWxP3Qb15d6lPU8KDzF8HlIUIRCOJRn4X77/oyW4mJY+7FHfY82NLtQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" + integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" + integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-arrow-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" + integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" +"@babel/plugin-transform-async-to-generator@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.3.4.tgz#4e45408d3c3da231c0e7b823f407a53a7eb3048c" + integrity sha512-Y7nCzv2fw/jEZ9f678MuKdMo99MFDJMT/PvD9LisrR5JDFcJH6vYeH6RnjVt3p5tceyGRvTtEN0VOlU+rgHZjA== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -357,44 +394,50 @@ "@babel/plugin-transform-block-scoped-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" + integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" +"@babel/plugin-transform-block-scoping@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.3.4.tgz#5c22c339de234076eee96c8783b2fed61202c5c4" + integrity sha512-blRr2O8IOZLAOJklXLV4WhcEzpYafYQKSGT3+R26lWG41u/FODJuBggehtOwilVAcFu393v3OFj+HmaE6tVjhA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - lodash "^4.17.10" + lodash "^4.17.11" -"@babel/plugin-transform-classes@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.0.tgz#374f8876075d7d21fea55aeb5c53561259163f96" +"@babel/plugin-transform-classes@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.3.4.tgz#dc173cb999c6c5297e0b5f2277fdaaec3739d0cc" + integrity sha512-J9fAvCFBkXEvBimgYxCjvaVDzL6thk0j0dBvCeZmIUDBwyt+nv6HfbImsSrWsYXfDNDivyANgJlFXDUWRTZBuA== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.1.0" "@babel/helper-function-name" "^7.1.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-replace-supers" "^7.3.4" "@babel/helper-split-export-declaration" "^7.0.0" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" + integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" + version "7.3.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.3.2.tgz#f2f5520be055ba1c38c41c0e094d8a461dd78f2d" + integrity sha512-Lrj/u53Ufqxl/sGxyjsJ2XNtNuEjDyjpqdhMNh5aZ+XFOdThL46KBj27Uem4ggoezSYBxKWAil6Hu8HtwqesYw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-dotall-regex@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" + integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -403,32 +446,37 @@ "@babel/plugin-transform-duplicate-keys@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" + integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-exponentiation-operator@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" + integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A== dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.0.0.tgz#c40ced34c2783985d90d9f9ac77a13e6fb396a01" + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.3.4.tgz#00156236defb7dedddc2d3c9477dcc01a4494327" + integrity sha512-PmQC9R7DwpBFA+7ATKMyzViz3zCaMNouzZMPZN2K5PnbBbtL3AXFYTkDk+Hey5crQq2A90UG5Uthz0mel+XZrA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.2.0" "@babel/plugin-transform-for-of@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" + integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" + integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -436,12 +484,14 @@ "@babel/plugin-transform-literals@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" + integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-amd@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" + integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -449,14 +499,16 @@ "@babel/plugin-transform-modules-commonjs@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" + integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" -"@babel/plugin-transform-modules-systemjs@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068" +"@babel/plugin-transform-modules-systemjs@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.3.4.tgz#813b34cd9acb6ba70a84939f3680be0eb2e58861" + integrity sha512-VZ4+jlGOF36S7TjKs8g4ojp4MEI+ebCQZdswWb/T9I4X84j8OtFAyjXjt/M16iIm5RIZn0UMQgg/VgIwo/87vw== dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -464,6 +516,7 @@ "@babel/plugin-transform-modules-umd@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" + integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -471,39 +524,45 @@ "@babel/plugin-transform-named-capturing-groups-regex@^7.3.0": version "7.3.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.3.0.tgz#140b52985b2d6ef0cb092ef3b29502b990f9cd50" + integrity sha512-NxIoNVhk9ZxS+9lSoAQ/LM0V2UEvARLttEHUrRDGKFaAxOYQcrkN/nLRE+BbbicCAvZPl7wMP0X60HsHE5DtQw== dependencies: regexp-tree "^0.1.0" "@babel/plugin-transform-new-target@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" + integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-object-super@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" + integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.1.0" "@babel/plugin-transform-parameters@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" + version "7.3.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.3.3.tgz#3a873e07114e1a5bee17d04815662c8317f10e30" + integrity sha512-IrIP25VvXWu/VlBWTpsjGptpomtIkYrN/3aDp4UKm7xK6UxZY88kcJ1UwETbzHAlwN21MnNfwlar0u8y3KpiXw== dependencies: "@babel/helper-call-delegate" "^7.1.0" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-regenerator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" +"@babel/plugin-transform-regenerator@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.3.4.tgz#1601655c362f5b38eead6a52631f5106b29fa46a" + integrity sha512-hvJg8EReQvXT6G9H2MvNPXkv9zK36Vxa1+csAVTpE1J3j0zlHplw76uudEbJxgvqZzAq9Yh45FLD4pk5mKRFQA== dependencies: - regenerator-transform "^0.13.3" + regenerator-transform "^0.13.4" -"@babel/plugin-transform-runtime@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.2.0.tgz#566bc43f7d0aedc880eaddbd29168d0f248966ea" +"@babel/plugin-transform-runtime@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.3.4.tgz#57805ac8c1798d102ecd75c03b024a5b3ea9b431" + integrity sha512-PaoARuztAdd5MgeVjAxnIDAIUet5KpogqaefQvPOmPYCxYoaPhautxDh3aO8a4xHsKgT/b9gSxR0BKK1MIewPA== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -513,18 +572,21 @@ "@babel/plugin-transform-shorthand-properties@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" + integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.0.tgz#0c76c12a3b5826130078ee8ec84a7a8e4afd79c4" + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" + integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-sticky-regex@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" + integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -532,6 +594,7 @@ "@babel/plugin-transform-template-literals@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" + integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -539,26 +602,29 @@ "@babel/plugin-transform-typeof-symbol@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" + integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-unicode-regex@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" + integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/preset-env@^7.3.1": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.3.1.tgz#389e8ca6b17ae67aaf9a2111665030be923515db" +"@babel/preset-env@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.3.4.tgz#887cf38b6d23c82f19b5135298bdb160062e33e1" + integrity sha512-2mwqfYMK8weA0g0uBKOt4FE3iEodiHy9/CW0b+nWXcbL+pGzLx8ESYc+j9IIxr6LTDHWKgPm71i9smo02bw+gA== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-async-generator-functions" "^7.2.0" "@babel/plugin-proposal-json-strings" "^7.2.0" - "@babel/plugin-proposal-object-rest-spread" "^7.3.1" + "@babel/plugin-proposal-object-rest-spread" "^7.3.4" "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" "@babel/plugin-syntax-async-generators" "^7.2.0" @@ -566,10 +632,10 @@ "@babel/plugin-syntax-object-rest-spread" "^7.2.0" "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" "@babel/plugin-transform-arrow-functions" "^7.2.0" - "@babel/plugin-transform-async-to-generator" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.3.4" "@babel/plugin-transform-block-scoped-functions" "^7.2.0" - "@babel/plugin-transform-block-scoping" "^7.2.0" - "@babel/plugin-transform-classes" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.3.4" + "@babel/plugin-transform-classes" "^7.3.4" "@babel/plugin-transform-computed-properties" "^7.2.0" "@babel/plugin-transform-destructuring" "^7.2.0" "@babel/plugin-transform-dotall-regex" "^7.2.0" @@ -580,13 +646,13 @@ "@babel/plugin-transform-literals" "^7.2.0" "@babel/plugin-transform-modules-amd" "^7.2.0" "@babel/plugin-transform-modules-commonjs" "^7.2.0" - "@babel/plugin-transform-modules-systemjs" "^7.2.0" + "@babel/plugin-transform-modules-systemjs" "^7.3.4" "@babel/plugin-transform-modules-umd" "^7.2.0" "@babel/plugin-transform-named-capturing-groups-regex" "^7.3.0" "@babel/plugin-transform-new-target" "^7.0.0" "@babel/plugin-transform-object-super" "^7.2.0" "@babel/plugin-transform-parameters" "^7.2.0" - "@babel/plugin-transform-regenerator" "^7.0.0" + "@babel/plugin-transform-regenerator" "^7.3.4" "@babel/plugin-transform-shorthand-properties" "^7.2.0" "@babel/plugin-transform-spread" "^7.2.0" "@babel/plugin-transform-sticky-regex" "^7.2.0" @@ -601,6 +667,7 @@ "@babel/preset-flow@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.0.0.tgz#afd764835d9535ec63d8c7d4caf1c06457263da2" + integrity sha512-bJOHrYOPqJZCkPVbG1Lot2r5OSsB+iUOaxiHdlOeB1yPWS6evswVHwvkDLZ54WTaTRIk89ds0iHmGZSnxlPejQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types" "^7.0.0" @@ -608,6 +675,7 @@ "@babel/register@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827" + integrity sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g== dependencies: core-js "^2.5.7" find-cache-dir "^1.0.0" @@ -617,48 +685,53 @@ pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/runtime@^7.3.1": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.1.tgz#574b03e8e8a9898eaf4a872a92ea20b7846f6f2a" +"@babel/runtime@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83" + integrity sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g== dependencies: regenerator-runtime "^0.12.0" "@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" + integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.2.2" "@babel/types" "^7.2.2" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2", "@babel/traverse@^7.2.3": - version "7.2.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8" +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.3.4.tgz#1330aab72234f8dea091b08c4f8b9d05c7119e06" + integrity sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.2.2" + "@babel/generator" "^7.3.4" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.2.3" - "@babel/types" "^7.2.2" + "@babel/parser" "^7.3.4" + "@babel/types" "^7.3.4" debug "^4.1.0" globals "^11.1.0" - lodash "^4.17.10" + lodash "^4.17.11" "@babel/types@7.0.0-beta.35": version "7.0.0-beta.35" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.35.tgz#cf933a9a9a38484ca724b335b88d83726d5ab960" + integrity sha512-y9XT11CozHDgjWcTdxmhSj13rJVXpa5ZXwjjOiTedjaM0ba5ItqdS02t31EhPl7HtOWxsZkYCCUNrSfrOisA6w== dependencies: esutils "^2.0.2" lodash "^4.2.0" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2", "@babel/types@^7.3.0": - version "7.3.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.0.tgz#61dc0b336a93badc02bf5f69c4cd8e1353f2ffc0" +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2", "@babel/types@^7.3.0", "@babel/types@^7.3.4": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.4.tgz#bf482eaeaffb367a28abbf9357a94963235d90ed" + integrity sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ== dependencies: esutils "^2.0.2" - lodash "^4.17.10" + lodash "^4.17.11" to-fast-properties "^2.0.0" "@iamstarkov/listr-update-renderer@0.4.1": @@ -1899,15 +1972,10 @@ browser-process-hrtime@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" -browser-resolve@^1.11.0, browser-resolve@^1.7.0: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" - dependencies: - resolve "1.1.7" - -browser-resolve@^1.11.3: +browser-resolve@^1.11.0, browser-resolve@^1.11.3, browser-resolve@^1.7.0: version "1.11.3" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== dependencies: resolve "1.1.7" @@ -3978,16 +4046,10 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.2.2: - version "1.2.4" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.10.0" - -fsevents@^1.2.3: +fsevents@^1.2.2, fsevents@^1.2.3: version "1.2.7" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.7.tgz#4851b664a3783e52003b3c66eb0eee1074933aa4" + integrity sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw== dependencies: nan "^2.9.2" node-pre-gyp "^0.10.0" @@ -4175,20 +4237,10 @@ glob-watcher@^5.0.0: just-debounce "^1.0.0" object.defaults "^1.1.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3: +glob@^7.0.0, glob@^7.0.3, glob@^7.1.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -4215,13 +4267,10 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -globals@^11.1.0: - version "11.3.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.3.0.tgz#e04fdb7b9796d8adac9c8f64c14837b2313378b0" - -globals@^11.7.0: - version "11.7.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" +globals@^11.1.0, globals@^11.7.0: + version "11.11.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.11.0.tgz#dcf93757fa2de5486fbeed7118538adf789e9c2e" + integrity sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw== globby@^5.0.0: version "5.0.0" @@ -4262,13 +4311,10 @@ glogg@^1.0.0: dependencies: sparkles "^1.0.0" -graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -graceful-fs@^4.1.15: +graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== growly@^1.3.0: version "1.3.0" @@ -6104,17 +6150,10 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1: - version "4.17.5" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" - -lodash@^4.17.10, lodash@^4.17.5: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - -lodash@^4.17.11: +lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== log-symbols@^1.0.2: version "1.0.2" @@ -6157,29 +6196,18 @@ lower-case@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" -lru-cache@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -lru-cache@^4.1.2, lru-cache@^4.1.3: +lru-cache@^4.0.1, lru-cache@^4.1.2, lru-cache@^4.1.3: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" -make-dir@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" - dependencies: - pify "^3.0.0" - -make-dir@^1.3.0: +make-dir@^1.0.0, make-dir@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== dependencies: pify "^3.0.0" @@ -6349,27 +6377,10 @@ micromatch@^2.1.5, micromatch@^2.3.11: parse-glob "^3.0.4" regex-cache "^0.4.2" -micromatch@^3.0.4, micromatch@^3.1.4: - version "3.1.9" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.9.tgz#15dc93175ae39e52e93087847096effc73efcf89" - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -micromatch@^3.1.10, micromatch@^3.1.8: +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -6392,25 +6403,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - -mime-db@~1.37.0: - version "1.37.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" +mime-db@~1.38.0: + version "1.38.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad" + integrity sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg== -mime-types@^2.1.12: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.22" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.22.tgz#fe6b355a190926ab7698c9a0556a11199b2199bd" + integrity sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog== dependencies: - mime-db "~1.33.0" - -mime-types@~2.1.19: - version "2.1.21" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" - dependencies: - mime-db "~1.37.0" + mime-db "~1.38.0" mimic-fn@^1.0.0: version "1.2.0" @@ -7783,9 +7786,10 @@ regenerator-runtime@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.0.tgz#8052ac952d85b10f3425192cd0c53f45cf65c6cb" -regenerator-transform@^0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" +regenerator-transform@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.4.tgz#18f6763cf1382c69c36df76c6ce122cc694284fb" + integrity sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A== dependencies: private "^0.1.6" @@ -9092,13 +9096,10 @@ util@0.10.3, util@^0.10.3, util@~0.10.1: dependencies: inherits "2.0.1" -uuid@^3.0.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" - -uuid@^3.3.2: +uuid@^3.0.1, uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== v8flags@^3.0.1: version "3.0.2" @@ -9106,16 +9107,10 @@ v8flags@^3.0.1: dependencies: homedir-polyfill "^1.0.1" -validate-npm-package-license@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -validate-npm-package-license@^3.0.3: +validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" @@ -9371,15 +9366,10 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@1, which@^1.3.1: +which@1, which@^1.2.10, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - dependencies: - isexe "^2.0.0" - -which@^1.2.10, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" @@ -9423,17 +9413,10 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -write-file-atomic@^2.0.0, write-file-atomic@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -write-file-atomic@^2.4.2: +write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.2.tgz#a7181706dfba17855d221140a9c06e15fcdd87b9" + integrity sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" From 0345c1bc1ded6af8d66f8605e6fdbeeb9b70c5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 26 Feb 2019 20:09:02 +0100 Subject: [PATCH 325/563] Use `for..of Object.keys` instead of `for..in` (#9518) In https://github.com/babel/babel/issues/9511 (and #9495 is another symptom), @PavelKastornyy reported a node crash becaue the JavaScript heap run out of memory. The problem was that their code was adding enumerable properties to `Object.prototype`: it is something that shouldn't be done, but Babel shouldn't make node crash if someone adds them. I reduced down the problem to `for...in` loops in `@babel/traverse` that grew the memory consumption exponentially because of that unexpected properties. --- .eslintrc.json | 3 ++- packages/babel-helper-define-map/src/index.js | 2 +- .../babel-helper-hoist-variables/src/index.js | 2 +- packages/babel-parser/src/options.js | 2 +- .../test/helpers/runFixtureTests.js | 4 ++-- .../src/index.js | 2 +- .../src/index.js | 20 +++++++++---------- .../src/tdz.js | 2 +- .../src/index.js | 2 +- .../src/index.js | 8 +++++--- packages/babel-traverse/src/path/context.js | 2 +- packages/babel-traverse/src/path/index.js | 2 +- .../babel-traverse/src/path/lib/hoister.js | 6 +++--- .../babel-traverse/src/path/replacement.js | 2 +- packages/babel-traverse/src/scope/index.js | 13 ++++++------ packages/babel-traverse/src/visitors.js | 20 +++++++++---------- packages/babel-types/src/builders/builder.js | 2 +- .../converters/gatherSequenceExpressions.js | 2 +- .../babel-types/src/converters/valueToNode.js | 2 +- packages/babel-types/src/definitions/utils.js | 2 +- .../flow/removeTypeDuplicates.js | 4 ++-- .../babel-types/src/modifications/inherits.js | 2 +- .../src/modifications/removeProperties.js | 2 +- .../src/validators/isNodesEquivalent.js | 7 ++++++- 24 files changed, 60 insertions(+), 55 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8a8366b60be9..a59dc0d9e2dd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,7 +14,8 @@ "rules": { "@babel/development/no-undefined-identifier": "error", "@babel/development/no-deprecated-clone": "error", - "import/no-extraneous-dependencies": "error" + "import/no-extraneous-dependencies": "error", + "guard-for-in": "error" } }, { diff --git a/packages/babel-helper-define-map/src/index.js b/packages/babel-helper-define-map/src/index.js index ff588c1ce380..da81b3a43bd7 100644 --- a/packages/babel-helper-define-map/src/index.js +++ b/packages/babel-helper-define-map/src/index.js @@ -98,7 +98,7 @@ export function push( } export function hasComputed(mutatorMap: Object): boolean { - for (const key in mutatorMap) { + for (const key of Object.keys(mutatorMap)) { if (mutatorMap[key]._computed) { return true; } diff --git a/packages/babel-helper-hoist-variables/src/index.js b/packages/babel-helper-hoist-variables/src/index.js index 4f9c6d938bd7..6b8bb4cf3b03 100644 --- a/packages/babel-helper-hoist-variables/src/index.js +++ b/packages/babel-helper-hoist-variables/src/index.js @@ -28,7 +28,7 @@ const visitor = { ); } - for (const name in declar.getBindingIdentifiers()) { + for (const name of Object.keys(declar.getBindingIdentifiers())) { state.emit(t.identifier(name), name, declar.node.init !== null); } } diff --git a/packages/babel-parser/src/options.js b/packages/babel-parser/src/options.js index 3bab7c04a287..c11dd55cca99 100755 --- a/packages/babel-parser/src/options.js +++ b/packages/babel-parser/src/options.js @@ -61,7 +61,7 @@ export const defaultOptions: Options = { export function getOptions(opts: ?Options): Options { const options: any = {}; - for (const key in defaultOptions) { + for (const key of Object.keys(defaultOptions)) { options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; } return options; diff --git a/packages/babel-parser/test/helpers/runFixtureTests.js b/packages/babel-parser/test/helpers/runFixtureTests.js index be42014fd7d3..a3915587f4e7 100644 --- a/packages/babel-parser/test/helpers/runFixtureTests.js +++ b/packages/babel-parser/test/helpers/runFixtureTests.js @@ -195,12 +195,12 @@ function misMatch(exp, act) { return ppJSON(exp) + " !== " + ppJSON(act); } } else { - for (const prop in exp) { + for (const prop of Object.keys(exp)) { const mis = misMatch(exp[prop], act[prop]); if (mis) return addPath(mis, prop); } - for (const prop in act) { + for (const prop of Object.keys(act)) { if (typeof act[prop] === "function") { continue; } diff --git a/packages/babel-plugin-proposal-object-rest-spread/src/index.js b/packages/babel-plugin-proposal-object-rest-spread/src/index.js index 8506c21db77e..c4738f0c6730 100644 --- a/packages/babel-plugin-proposal-object-rest-spread/src/index.js +++ b/packages/babel-plugin-proposal-object-rest-spread/src/index.js @@ -302,7 +302,7 @@ export default declare((api, opts) => { const specifiers = []; - for (const name in path.getOuterBindingIdentifiers(path)) { + for (const name of Object.keys(path.getOuterBindingIdentifiers(path))) { specifiers.push( t.exportSpecifier(t.identifier(name), t.identifier(name)), ); diff --git a/packages/babel-plugin-transform-block-scoping/src/index.js b/packages/babel-plugin-transform-block-scoping/src/index.js index ef91aa55b959..cc63c554ddcd 100644 --- a/packages/babel-plugin-transform-block-scoping/src/index.js +++ b/packages/babel-plugin-transform-block-scoping/src/index.js @@ -153,8 +153,7 @@ function convertBlockScopedToVar( // Move bindings from current block scope to function scope. if (moveBindingsToParent) { const parentScope = scope.getFunctionParent() || scope.getProgramParent(); - const ids = path.getBindingIdentifiers(); - for (const name in ids) { + for (const name of Object.keys(path.getBindingIdentifiers())) { const binding = scope.getOwnBinding(name); if (binding) binding.kind = "var"; scope.moveBindingTo(name, parentScope); @@ -245,8 +244,7 @@ const loopLabelVisitor = { const continuationVisitor = { enter(path, state) { if (path.isAssignmentExpression() || path.isUpdateExpression()) { - const bindings = path.getBindingIdentifiers(); - for (const name in bindings) { + for (const name of Object.keys(path.getBindingIdentifiers())) { if ( state.outsideReferences[name] !== path.scope.getBindingIdentifier(name) @@ -410,7 +408,7 @@ class BlockScoping { const scope = this.scope; const state = this.state; - for (const name in scope.bindings) { + for (const name of Object.keys(scope.bindings)) { const binding = scope.bindings[name]; if (binding.kind !== "const") continue; @@ -444,7 +442,7 @@ class BlockScoping { const parentScope = scope.getFunctionParent() || scope.getProgramParent(); const letRefs = this.letReferences; - for (const key in letRefs) { + for (const key of Object.keys(letRefs)) { const ref = letRefs[key]; const binding = scope.getBinding(ref.name); if (!binding) continue; @@ -471,7 +469,7 @@ class BlockScoping { // those in upper scopes and then if they do, generate a uid // for them and replace all references with it - for (const key in letRefs) { + for (const key of Object.keys(letRefs)) { // just an Identifier node we collected in `getLetReferences` // this is the defining identifier of a declaration const ref = letRefs[key]; @@ -491,7 +489,7 @@ class BlockScoping { } } - for (const key in outsideLetRefs) { + for (const key of Object.keys(outsideLetRefs)) { const ref = letRefs[key]; // check for collisions with a for loop's init variable and the enclosing scope's bindings // https://github.com/babel/babel/issues/8498 @@ -514,7 +512,7 @@ class BlockScoping { // remap loop heads with colliding variables if (this.loop) { - for (const name in outsideRefs) { + for (const name of Object.keys(outsideRefs)) { const id = outsideRefs[name]; if ( @@ -814,7 +812,7 @@ class BlockScoping { pushDeclar(node: { type: "VariableDeclaration" }): Array { const declars = []; const names = t.getBindingIdentifiers(node); - for (const name in names) { + for (const name of Object.keys(names)) { declars.push(t.variableDeclarator(names[name])); } @@ -852,7 +850,7 @@ class BlockScoping { } if (has.hasBreakContinue) { - for (const key in has.map) { + for (const key of Object.keys(has.map)) { cases.push(t.switchCase(t.stringLiteral(key), [has.map[key]])); } diff --git a/packages/babel-plugin-transform-block-scoping/src/tdz.js b/packages/babel-plugin-transform-block-scoping/src/tdz.js index e1423513489e..9612b8deb210 100644 --- a/packages/babel-plugin-transform-block-scoping/src/tdz.js +++ b/packages/babel-plugin-transform-block-scoping/src/tdz.js @@ -83,7 +83,7 @@ export const visitor = { const nodes = []; const ids = path.getBindingIdentifiers(); - for (const name in ids) { + for (const name of Object.keys(ids)) { const id = ids[name]; if (isReference(id, path.scope, state)) { diff --git a/packages/babel-plugin-transform-destructuring/src/index.js b/packages/babel-plugin-transform-destructuring/src/index.js index 52a76928e19f..de2b9ff4ba16 100644 --- a/packages/babel-plugin-transform-destructuring/src/index.js +++ b/packages/babel-plugin-transform-destructuring/src/index.js @@ -421,7 +421,7 @@ export default declare((api, options) => { const specifiers = []; - for (const name in path.getOuterBindingIdentifiers(path)) { + for (const name of Object.keys(path.getOuterBindingIdentifiers(path))) { specifiers.push( t.exportSpecifier(t.identifier(name), t.identifier(name)), ); diff --git a/packages/babel-plugin-transform-modules-systemjs/src/index.js b/packages/babel-plugin-transform-modules-systemjs/src/index.js index f43fc7a34f53..0159e2257f30 100644 --- a/packages/babel-plugin-transform-modules-systemjs/src/index.js +++ b/packages/babel-plugin-transform-modules-systemjs/src/index.js @@ -113,7 +113,7 @@ export default declare((api, options) => { if (arg.isObjectPattern() || arg.isArrayPattern()) { const exprs = [path.node]; - for (const name in arg.getBindingIdentifiers()) { + for (const name of Object.keys(arg.getBindingIdentifiers())) { if (this.scope.getBinding(name) !== path.scope.getBinding(name)) { return; } @@ -266,7 +266,7 @@ export default declare((api, options) => { } else if (path.isImportDeclaration()) { const source = path.node.source.value; pushModule(source, "imports", path.node.specifiers); - for (const name in path.getBindingIdentifiers()) { + for (const name of Object.keys(path.getBindingIdentifiers())) { path.scope.removeBinding(name); variableIds.push(t.identifier(name)); } @@ -320,7 +320,9 @@ export default declare((api, options) => { addExportName(name, name); path.insertAfter([buildExportCall(name, t.identifier(name))]); } else { - for (const name in declar.getBindingIdentifiers()) { + for (const name of Object.keys( + declar.getBindingIdentifiers(), + )) { addExportName(name, name); } } diff --git a/packages/babel-traverse/src/path/context.js b/packages/babel-traverse/src/path/context.js index a97045e10f16..0057b1694d3f 100644 --- a/packages/babel-traverse/src/path/context.js +++ b/packages/babel-traverse/src/path/context.js @@ -169,7 +169,7 @@ export function _resyncKey() { } } } else { - for (const key in this.container) { + for (const key of Object.keys(this.container)) { if (this.container[key] === this.node) { return this.setKey(key); } diff --git a/packages/babel-traverse/src/path/index.js b/packages/babel-traverse/src/path/index.js index 506a25e95ded..f76ba1ec5ece 100644 --- a/packages/babel-traverse/src/path/index.js +++ b/packages/babel-traverse/src/path/index.js @@ -183,7 +183,7 @@ for (const type of (t.TYPES: Array)) { }; } -for (const type in virtualTypes) { +for (const type of Object.keys(virtualTypes)) { if (type[0] === "_") continue; if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type); diff --git a/packages/babel-traverse/src/path/lib/hoister.js b/packages/babel-traverse/src/path/lib/hoister.js index edd27385105d..2fd8339eaa7d 100644 --- a/packages/babel-traverse/src/path/lib/hoister.js +++ b/packages/babel-traverse/src/path/lib/hoister.js @@ -58,7 +58,7 @@ export default class PathHoister { // A scope is compatible if all required bindings are reachable. isCompatibleScope(scope) { - for (const key in this.bindings) { + for (const key of Object.keys(this.bindings)) { const binding = this.bindings[key]; if (!scope.bindingIdentifierEquals(key, binding.identifier)) { return false; @@ -98,7 +98,7 @@ export default class PathHoister { // avoid hoisting to a scope that contains bindings that are executed after our attachment path if (targetScope.path.isProgram() || targetScope.path.isFunction()) { - for (const name in this.bindings) { + for (const name of Object.keys(this.bindings)) { // check binding is a direct child of this paths scope if (!targetScope.hasOwnBinding(name)) continue; @@ -182,7 +182,7 @@ export default class PathHoister { // Returns true if a scope has param bindings. hasOwnParamBindings(scope) { - for (const name in this.bindings) { + for (const name of Object.keys(this.bindings)) { if (!scope.hasOwnBinding(name)) continue; const binding = this.bindings[name]; diff --git a/packages/babel-traverse/src/path/replacement.js b/packages/babel-traverse/src/path/replacement.js index 07691853345e..0c411cb40163 100644 --- a/packages/babel-traverse/src/path/replacement.js +++ b/packages/babel-traverse/src/path/replacement.js @@ -15,7 +15,7 @@ const hoistVariablesVisitor = { if (path.node.kind !== "var") return; const bindings = path.getBindingIdentifiers(); - for (const key in bindings) { + for (const key of Object.keys(bindings)) { path.scope.push({ id: bindings[key] }); } diff --git a/packages/babel-traverse/src/scope/index.js b/packages/babel-traverse/src/scope/index.js index 88383fa66cf7..2976cff173f6 100644 --- a/packages/babel-traverse/src/scope/index.js +++ b/packages/babel-traverse/src/scope/index.js @@ -97,8 +97,7 @@ const collectorVisitor = { if (binding) binding.reference(path); } else if (t.isVariableDeclaration(declar)) { for (const decl of (declar.declarations: Array)) { - const ids = t.getBindingIdentifiers(decl); - for (const name in ids) { + for (const name of Object.keys(t.getBindingIdentifiers(decl))) { const binding = scope.getBinding(name); if (binding) binding.reference(path); } @@ -388,7 +387,7 @@ export default class Scope { let scope = this; do { console.log("#", scope.block.type); - for (const name in scope.bindings) { + for (const name of Object.keys(scope.bindings)) { const binding = scope.bindings[name]; console.log(" -", name, { constant: binding.constant, @@ -501,7 +500,7 @@ export default class Scope { registerConstantViolation(path: NodePath) { const ids = path.getBindingIdentifiers(); - for (const name in ids) { + for (const name of Object.keys(ids)) { const binding = this.getBinding(name); if (binding) binding.reassign(path); } @@ -521,7 +520,7 @@ export default class Scope { const parent = this.getProgramParent(); const ids = path.getBindingIdentifiers(true); - for (const name in ids) { + for (const name of Object.keys(ids)) { for (const id of (ids[name]: Array)) { const local = this.getOwnBinding(name); @@ -746,7 +745,7 @@ export default class Scope { // register undeclared bindings as globals const ids = path.getBindingIdentifiers(); let programParent; - for (const name in ids) { + for (const name of Object.keys(ids)) { if (path.scope.getBinding(name)) continue; programParent = programParent || path.scope.getProgramParent(); @@ -886,7 +885,7 @@ export default class Scope { for (const kind of (arguments: Array)) { let scope = this; do { - for (const name in scope.bindings) { + for (const name of Object.keys(scope.bindings)) { const binding = scope.bindings[name]; if (binding.kind === kind) ids[name] = binding; } diff --git a/packages/babel-traverse/src/visitors.js b/packages/babel-traverse/src/visitors.js index fd8a8ece29bd..77c1488d5d55 100644 --- a/packages/babel-traverse/src/visitors.js +++ b/packages/babel-traverse/src/visitors.js @@ -23,7 +23,7 @@ export function explode(visitor) { visitor._exploded = true; // normalise pipes - for (const nodeType in visitor) { + for (const nodeType of Object.keys(visitor)) { if (shouldIgnoreKey(nodeType)) continue; const parts: Array = nodeType.split("|"); @@ -59,7 +59,7 @@ export function explode(visitor) { // wrap all the functions const fns = visitor[nodeType]; - for (const type in fns) { + for (const type of Object.keys(fns)) { fns[type] = wrapCheck(wrapper, fns[type]); } @@ -81,7 +81,7 @@ export function explode(visitor) { } // add aliases - for (const nodeType in visitor) { + for (const nodeType of Object.keys(visitor)) { if (shouldIgnoreKey(nodeType)) continue; const fns = visitor[nodeType]; @@ -111,7 +111,7 @@ export function explode(visitor) { } } - for (const nodeType in visitor) { + for (const nodeType of Object.keys(visitor)) { if (shouldIgnoreKey(nodeType)) continue; ensureCallbackArrays(visitor[nodeType]); @@ -130,7 +130,7 @@ export function verify(visitor) { ); } - for (const nodeType in visitor) { + for (const nodeType of Object.keys(visitor)) { if (nodeType === "enter" || nodeType === "exit") { validateVisitorMethods(nodeType, visitor[nodeType]); } @@ -145,7 +145,7 @@ export function verify(visitor) { const visitors = visitor[nodeType]; if (typeof visitors === "object") { - for (const visitorKey in visitors) { + for (const visitorKey of Object.keys(visitors)) { if (visitorKey === "enter" || visitorKey === "exit") { // verify that it just contains functions validateVisitorMethods( @@ -189,7 +189,7 @@ export function merge( explode(visitor); - for (const type in visitor) { + for (const type of Object.keys(visitor)) { let visitorType = visitor[type]; // if we have state or wrapper then overload the callbacks to take it @@ -208,7 +208,7 @@ export function merge( function wrapWithStateOrWrapper(oldVisitor, state, wrapper: ?Function) { const newVisitor = {}; - for (const key in oldVisitor) { + for (const key of Object.keys(oldVisitor)) { let fns = oldVisitor[key]; // not an enter/exit array of callbacks @@ -237,7 +237,7 @@ function wrapWithStateOrWrapper(oldVisitor, state, wrapper: ?Function) { } function ensureEntranceObjects(obj) { - for (const key in obj) { + for (const key of Object.keys(obj)) { if (shouldIgnoreKey(key)) continue; const fns = obj[key]; @@ -278,7 +278,7 @@ function shouldIgnoreKey(key) { } function mergePair(dest, src) { - for (const key in src) { + for (const key of Object.keys(src)) { dest[key] = [].concat(dest[key] || [], src[key]); } } diff --git a/packages/babel-types/src/builders/builder.js b/packages/babel-types/src/builders/builder.js index 7458eb1c92be..e01cf9fd97d6 100644 --- a/packages/babel-types/src/builders/builder.js +++ b/packages/babel-types/src/builders/builder.js @@ -28,7 +28,7 @@ export default function builder(type: string, ...args: Array): Object { i++; }); - for (const key in node) { + for (const key of Object.keys(node)) { validate(node, key, node[key]); } diff --git a/packages/babel-types/src/converters/gatherSequenceExpressions.js b/packages/babel-types/src/converters/gatherSequenceExpressions.js index 4b526767e224..e9808e6ed3ad 100644 --- a/packages/babel-types/src/converters/gatherSequenceExpressions.js +++ b/packages/babel-types/src/converters/gatherSequenceExpressions.js @@ -36,7 +36,7 @@ export default function gatherSequenceExpressions( for (const declar of (node.declarations: Array)) { const bindings = getBindingIdentifiers(declar); - for (const key in bindings) { + for (const key of Object.keys(bindings)) { declars.push({ kind: node.kind, id: cloneNode(bindings[key]), diff --git a/packages/babel-types/src/converters/valueToNode.js b/packages/babel-types/src/converters/valueToNode.js index a4f195765cfd..56bb7ff06be8 100644 --- a/packages/babel-types/src/converters/valueToNode.js +++ b/packages/babel-types/src/converters/valueToNode.js @@ -77,7 +77,7 @@ export default function valueToNode(value: any): Object { // object if (isPlainObject(value)) { const props = []; - for (const key in value) { + for (const key of Object.keys(value)) { let nodeKey; if (isValidIdentifier(key)) { nodeKey = identifier(key); diff --git a/packages/babel-types/src/definitions/utils.js b/packages/babel-types/src/definitions/utils.js index 45cf72b297fa..c1d2ce762daa 100644 --- a/packages/babel-types/src/definitions/utils.js +++ b/packages/babel-types/src/definitions/utils.js @@ -201,7 +201,7 @@ export default function defineType( fields[key] = fields[key] || {}; } - for (const key in fields) { + for (const key of Object.keys(fields)) { const field = fields[key]; if (builder.indexOf(key) === -1) { diff --git a/packages/babel-types/src/modifications/flow/removeTypeDuplicates.js b/packages/babel-types/src/modifications/flow/removeTypeDuplicates.js index d27a8d257140..629c265ff55a 100644 --- a/packages/babel-types/src/modifications/flow/removeTypeDuplicates.js +++ b/packages/babel-types/src/modifications/flow/removeTypeDuplicates.js @@ -73,12 +73,12 @@ export default function removeTypeDuplicates( } // add back in bases - for (const type in bases) { + for (const type of Object.keys(bases)) { types.push(bases[type]); } // add back in generics - for (const name in generics) { + for (const name of Object.keys(generics)) { types.push(generics[name]); } diff --git a/packages/babel-types/src/modifications/inherits.js b/packages/babel-types/src/modifications/inherits.js index dba679c050c6..a8021828593a 100644 --- a/packages/babel-types/src/modifications/inherits.js +++ b/packages/babel-types/src/modifications/inherits.js @@ -16,7 +16,7 @@ export default function inherits(child: T, parent: Object): T { } // force inherit "private" properties - for (const key in parent) { + for (const key of Object.keys(parent)) { if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; } diff --git a/packages/babel-types/src/modifications/removeProperties.js b/packages/babel-types/src/modifications/removeProperties.js index 2f81d9cd7e06..e0f2af6c1a5e 100644 --- a/packages/babel-types/src/modifications/removeProperties.js +++ b/packages/babel-types/src/modifications/removeProperties.js @@ -20,7 +20,7 @@ export default function removeProperties( if (node[key] != null) node[key] = undefined; } - for (const key in node) { + for (const key of Object.keys(node)) { if (key[0] === "_" && node[key] != null) node[key] = undefined; } diff --git a/packages/babel-types/src/validators/isNodesEquivalent.js b/packages/babel-types/src/validators/isNodesEquivalent.js index 68672ff96475..26d61a122f7a 100644 --- a/packages/babel-types/src/validators/isNodesEquivalent.js +++ b/packages/babel-types/src/validators/isNodesEquivalent.js @@ -25,6 +25,11 @@ export default function isNodesEquivalent(a: any, b: any): boolean { if (typeof a[field] !== typeof b[field]) { return false; } + if (a[field] == null && b[field] == null) { + continue; + } else if (a[field] == null || b[field] == null) { + return false; + } if (Array.isArray(a[field])) { if (!Array.isArray(b[field])) { @@ -46,7 +51,7 @@ export default function isNodesEquivalent(a: any, b: any): boolean { typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field)) ) { - for (const key in a[field]) { + for (const key of Object.keys(a[field])) { if (a[field][key] !== b[field][key]) { return false; } From e1ff4c47b94e3e0444867d96be9737eb7aa57ac4 Mon Sep 17 00:00:00 2001 From: Justin Ridgewell Date: Tue, 26 Feb 2019 14:11:49 -0500 Subject: [PATCH 326/563] preset-env: Sort versions before determining lowest (#9595) Likely because of implicit `equals` (ie, Safari 12 support implies iOS Safari 12), the versions in the `res` hash are not always sorted in version order. Doing a semver sort reveals some builtins have actually been supported a little longer than we thought! --- packages/babel-preset-env/data/built-ins.json | 34 ++++----- .../babel-preset-env/scripts/build-data.js | 70 +++++++++++-------- 2 files changed, 59 insertions(+), 45 deletions(-) diff --git a/packages/babel-preset-env/data/built-ins.json b/packages/babel-preset-env/data/built-ins.json index 8e2d2570771f..990d1e0d6031 100644 --- a/packages/babel-preset-env/data/built-ins.json +++ b/packages/babel-preset-env/data/built-ins.json @@ -284,7 +284,7 @@ "edge": "12", "firefox": "2", "safari": "3.1", - "node": "0.12", + "node": "0.10", "ie": "10", "android": "4", "ios": "6", @@ -300,7 +300,7 @@ "node": "0.10", "ie": "9", "android": "4", - "ios": "7", + "ios": "6", "phantom": "2", "electron": "5" }, @@ -320,7 +320,7 @@ "edge": "12", "firefox": "2", "safari": "4", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "6", "phantom": "2", @@ -1091,7 +1091,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1102,7 +1102,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1113,7 +1113,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1124,7 +1124,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1155,7 +1155,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1166,7 +1166,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1177,7 +1177,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1208,7 +1208,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1229,7 +1229,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1280,7 +1280,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1301,7 +1301,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1312,7 +1312,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1323,7 +1323,7 @@ "edge": "12", "firefox": "17", "safari": "6", - "node": "0.12", + "node": "0.10", "android": "4", "ios": "7", "phantom": "2", @@ -1358,7 +1358,7 @@ "edge": "12", "firefox": "15", "safari": "5.1", - "node": "0.12", + "node": "0.10", "ie": "10", "android": "4", "ios": "6", diff --git a/packages/babel-preset-env/scripts/build-data.js b/packages/babel-preset-env/scripts/build-data.js index 7e1b2289f990..cea4a0d5cc61 100644 --- a/packages/babel-preset-env/scripts/build-data.js +++ b/packages/babel-preset-env/scripts/build-data.js @@ -193,27 +193,40 @@ const getLowestImplementedVersion = ({ features }, env) => { // // NOTE: when/if compat-table adds a babel7 key, we'll want to update this if (!test.babel6corejs2 && isBuiltIn) { - return "-1"; + return { + version: "0.0.0", + semver: "0.0.0", + implements: true, + }; } - return ( - Object.keys(test) - .filter(t => t.startsWith(env)) - // Babel assumes strict mode - .filter( - test => tests[i].res[test] === true || tests[i].res[test] === "strict" - ) - // normalize some keys and get version from full string. - .map(test => { - return test.replace("_", ".").replace(env, ""); - }) - // version must be label from the unreleasedLabels (like tp) or number. - .filter( - version => - unreleasedLabelForEnv === version || !isNaN(parseFloat(version)) - ) - .shift() - ); + const reportedVersions = Object.keys(test) + .filter(t => t.startsWith(env)) + .map(t => { + const version = t.replace("_", ".").replace(env, ""); + return { + version, + semver: semver.coerce(version) || version, + // Babel assumes strict mode + implements: tests[i].res[t] === true || tests[i].res[t] === "strict", + }; + }) + // version must be label from the unreleasedLabels (like tp) or number. + .filter( + version => + unreleasedLabelForEnv === version.version || + !isNaN(parseFloat(version.version)) + ) + // Sort in asc order, with unreleasedLabelForEnv coming last. + .sort(({ semver: av }, { semver: bv }) => { + if (av === unreleasedLabelForEnv) return 1; + if (bv === unreleasedLabelForEnv) return -1; + if (semver.gt(av, bv)) return 1; + if (semver.gt(bv, av)) return -1; + return 0; + }); + + return reportedVersions.find(version => version.implements); }); const envFiltered = envTests.filter(t => t); @@ -229,15 +242,16 @@ const getLowestImplementedVersion = ({ features }, env) => { return null; } - return envTests - .map(str => str.replace(env, "")) - .reduce((a, b) => { - if (a === unreleasedLabelForEnv || b === unreleasedLabelForEnv) { - return unreleasedLabelForEnv; - } + return envFiltered.reduce((a, b) => { + if ( + a.semver === unreleasedLabelForEnv || + b.semver === unreleasedLabelForEnv + ) { + return unreleasedLabelForEnv; + } - return semver.lt(semver.coerce(a), semver.coerce(b)) ? b : a; - }); + return semver.lt(a.semver, b.semver) ? b : a; + }); }; const generateData = (environments, features) => { @@ -254,7 +268,7 @@ const generateData = (environments, features) => { const version = getLowestImplementedVersion(options, env); if (version !== null) { - const versionString = version.toString(); + const versionString = version.version; // NOTE(bng): A number of environments in compat-table changed to // include a trailing zero (node10 -> node10_0), so for now stripping From 244e4580e9b89e0c94549a3149f9b5b75a244d6f Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 26 Feb 2019 11:15:34 -0800 Subject: [PATCH 327/563] Remove always false param allowExpressionBody (#9591) --- packages/babel-parser/src/parser/expression.js | 5 ++--- packages/babel-parser/src/parser/statement.js | 4 ---- packages/babel-parser/src/plugins/flow.js | 6 ++---- packages/babel-parser/src/plugins/typescript.js | 6 ++---- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index f2bcfb19d3ad..df72050b7f4d 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -881,7 +881,7 @@ export default class ExpressionParser extends LValParser { !this.canInsertSemicolon() ) { this.next(); - return this.parseFunction(node, undefined, false, true); + return this.parseFunction(node, undefined, true); } else if ( canBeArrow && id.name === "async" && @@ -1804,10 +1804,9 @@ export default class ExpressionParser extends LValParser { parseFunctionBodyAndFinish( node: N.BodilessFunctionOrMethodBase, type: string, - allowExpressionBody?: boolean, ): void { // $FlowIgnore (node is not bodiless if we get here) - this.parseFunctionBody(node, allowExpressionBody); + this.parseFunctionBody(node); this.finishNode(node, type); } diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 0f55802ea0e2..2d98842c8b25 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -548,7 +548,6 @@ export default class StatementParser extends ExpressionParser { return this.parseFunction( node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), - false, isAsync, ); } @@ -1013,7 +1012,6 @@ export default class StatementParser extends ExpressionParser { parseFunction( node: T, statement?: number = FUNC_NO_FLAGS, - allowExpressionBody?: boolean = false, isAsync?: boolean = false, ): T { const isStatement = statement & FUNC_STATEMENT; @@ -1074,7 +1072,6 @@ export default class StatementParser extends ExpressionParser { this.parseFunctionBodyAndFinish( node, isStatement ? "FunctionDeclaration" : "FunctionExpression", - allowExpressionBody, ); }); @@ -1753,7 +1750,6 @@ export default class StatementParser extends ExpressionParser { return this.parseFunction( expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, - false, isAsync, ); } else if (this.match(tt._class)) { diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index af151c317dfe..f76f043c4b1a 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -1557,10 +1557,8 @@ export default (superClass: Class): Class => parseFunctionBodyAndFinish( node: N.BodilessFunctionOrMethodBase, type: string, - allowExpressionBody?: boolean, ): void { - // For arrow functions, `parseArrow` handles the return type itself. - if (!allowExpressionBody && this.match(tt.colon)) { + if (this.match(tt.colon)) { const typeNode = this.startNode(); [ @@ -1575,7 +1573,7 @@ export default (superClass: Class): Class => : null; } - super.parseFunctionBodyAndFinish(node, type, allowExpressionBody); + super.parseFunctionBodyAndFinish(node, type); } // interfaces diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 7418fd7221ea..343975243a11 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -1481,10 +1481,8 @@ export default (superClass: Class): Class => parseFunctionBodyAndFinish( node: N.BodilessFunctionOrMethodBase, type: string, - allowExpressionBody?: boolean, ): void { - // For arrow functions, `parseArrow` handles the return type itself. - if (!allowExpressionBody && this.match(tt.colon)) { + if (this.match(tt.colon)) { node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon); } @@ -1499,7 +1497,7 @@ export default (superClass: Class): Class => return; } - super.parseFunctionBodyAndFinish(node, type, allowExpressionBody); + super.parseFunctionBodyAndFinish(node, type); } parseSubscript( From a029071b8faf8bceccb4fc2a2a805870f7672015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 26 Feb 2019 20:35:18 +0100 Subject: [PATCH 328/563] [TS] Correctly forget `await`s after parsing async arrows with type args (#9593) --- .../babel-parser/src/plugins/typescript.js | 21 +- .../async-await-null/output.json | 1 - .../arrow-function/async-generic/output.json | 1 - .../async-arrow-generic-9560/input.js | 8 + .../async-arrow-generic-9560/options.json | 3 + .../async-arrow-generic-9560/output.json | 342 ++++++++++++++++++ 6 files changed, 359 insertions(+), 17 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/output.json diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 343975243a11..4973d1f6be4f 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -6,13 +6,7 @@ import { types as ct } from "../tokenizer/context"; import * as N from "../types"; import type { Pos, Position } from "../util/location"; import Parser from "../parser"; -import { - type BindingTypes, - functionFlags, - BIND_NONE, - SCOPE_ARROW, - SCOPE_OTHER, -} from "../util/scopeflags"; +import { type BindingTypes, BIND_NONE, SCOPE_OTHER } from "../util/scopeflags"; type TsModifier = | "readonly" @@ -1381,14 +1375,11 @@ export default (superClass: Class): Class => return undefined; } - this.scope.enter(functionFlags(true, false) | SCOPE_ARROW); - - res.id = null; - res.generator = false; - res.expression = true; // May be set again by parseFunctionBody. - res.async = true; - this.parseFunctionBody(res, true); - return this.finishNode(res, "ArrowFunctionExpression"); + return this.parseArrowExpression( + res, + /* params are already set */ null, + /* async */ true, + ); } tsParseTypeArguments(): N.TsTypeParameterInstantiation { diff --git a/packages/babel-parser/test/fixtures/typescript/arrow-function/async-await-null/output.json b/packages/babel-parser/test/fixtures/typescript/arrow-function/async-await-null/output.json index b8ff07769c78..8af1eae03c46 100644 --- a/packages/babel-parser/test/fixtures/typescript/arrow-function/async-await-null/output.json +++ b/packages/babel-parser/test/fixtures/typescript/arrow-function/async-await-null/output.json @@ -93,7 +93,6 @@ "params": [], "id": null, "generator": false, - "expression": true, "async": true, "body": { "type": "AwaitExpression", diff --git a/packages/babel-parser/test/fixtures/typescript/arrow-function/async-generic/output.json b/packages/babel-parser/test/fixtures/typescript/arrow-function/async-generic/output.json index cad181eb8702..89af25ded2c0 100644 --- a/packages/babel-parser/test/fixtures/typescript/arrow-function/async-generic/output.json +++ b/packages/babel-parser/test/fixtures/typescript/arrow-function/async-generic/output.json @@ -205,7 +205,6 @@ }, "id": null, "generator": false, - "expression": true, "async": true, "body": { "type": "Identifier", diff --git a/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/input.js b/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/input.js new file mode 100644 index 000000000000..2f1c5ce9190a --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/input.js @@ -0,0 +1,8 @@ +class Cl { + a = async() => { + await 0; + }; + + b = async() => { + }; +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/options.json b/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/options.json new file mode 100644 index 000000000000..fb92dc3bde16 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["typescript", "classProperties"] +} diff --git a/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/output.json b/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/output.json new file mode 100644 index 000000000000..8cbb94861b92 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/regression/async-arrow-generic-9560/output.json @@ -0,0 +1,342 @@ +{ + "type": "File", + "start": 0, + "end": 80, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 80, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 80, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 8 + }, + "identifierName": "Cl" + }, + "name": "Cl" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 9, + "end": 80, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 8, + "column": 1 + } + }, + "body": [ + { + "type": "ClassProperty", + "start": 13, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 4, + "column": 4 + } + }, + "static": false, + "key": { + "type": "Identifier", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + }, + "identifierName": "a" + }, + "name": "a" + }, + "computed": false, + "value": { + "type": "ArrowFunctionExpression", + "start": 17, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 4, + "column": 3 + } + }, + "typeParameters": { + "type": "TSTypeParameterDeclaration", + "start": 22, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "params": [ + { + "type": "TSTypeParameter", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "name": "T" + } + ] + }, + "params": [], + "id": null, + "generator": false, + "async": true, + "body": { + "type": "BlockStatement", + "start": 31, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 4, + "column": 3 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 37, + "end": 45, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "expression": { + "type": "AwaitExpression", + "start": 37, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "argument": { + "type": "NumericLiteral", + "start": 43, + "end": 44, + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + } + } + ], + "directives": [] + } + } + }, + { + "type": "ClassProperty", + "start": 54, + "end": 78, + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 7, + "column": 4 + } + }, + "static": false, + "key": { + "type": "Identifier", + "start": 54, + "end": 55, + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + }, + "identifierName": "b" + }, + "name": "b" + }, + "computed": false, + "value": { + "type": "ArrowFunctionExpression", + "start": 58, + "end": 77, + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 7, + "column": 3 + } + }, + "typeParameters": { + "type": "TSTypeParameterDeclaration", + "start": 63, + "end": 66, + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 14 + } + }, + "params": [ + { + "type": "TSTypeParameter", + "start": 64, + "end": 65, + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + }, + "name": "T" + } + ] + }, + "params": [], + "id": null, + "generator": false, + "async": true, + "body": { + "type": "BlockStatement", + "start": 72, + "end": 77, + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 7, + "column": 3 + } + }, + "body": [], + "directives": [] + } + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file From 039a74a8b97407c48b7f5a76515b66d85d887e9a Mon Sep 17 00:00:00 2001 From: Justin Ridgewell Date: Tue, 26 Feb 2019 15:18:52 -0500 Subject: [PATCH 329/563] preset-env: minimally supporting version (#9596) * preset-env: minimally supporting version This changes the "does browser support X" algorithm to "lowest version such that all higher versions support it". Eg, given `{ chrome70: true, chrome60: false, chrome50: true }`, the lowest version is chrome70, not chrome50. This is done to remove Tagged Template Literal support from Safari, which introduced a bug in Safari 12 but correctly implemented the feature in Safari 11-9. * Add tests * Fix tests * Fix comment --- packages/babel-preset-env/data/built-ins.json | 8 +++---- packages/babel-preset-env/data/plugins.json | 2 -- packages/babel-preset-env/package.json | 2 +- .../babel-preset-env/scripts/build-data.js | 24 +++++++++++++------ .../specific-targets/stdout.txt | 4 ++-- .../safari-tagged-template-literals/input.js | 1 + .../options.json | 13 ++++++++++ .../safari-tagged-template-literals/output.js | 13 ++++++++++ 8 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/input.js create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/options.json create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/output.js diff --git a/packages/babel-preset-env/data/built-ins.json b/packages/babel-preset-env/data/built-ins.json index 990d1e0d6031..d584df33679c 100644 --- a/packages/babel-preset-env/data/built-ins.json +++ b/packages/babel-preset-env/data/built-ins.json @@ -214,10 +214,10 @@ "opera": "50", "edge": "12", "firefox": "5", - "safari": "10.1", + "safari": "12", "node": "10", "ie": "9", - "ios": "10.3", + "ios": "12", "electron": "3.1" }, "es6.array.species": { @@ -317,7 +317,7 @@ "es6.function.name": { "chrome": "5", "opera": "10.50", - "edge": "12", + "edge": "14", "firefox": "2", "safari": "4", "node": "0.10", @@ -729,7 +729,7 @@ "es6.object.get-prototype-of": { "chrome": "44", "edge": "12", - "firefox": "3.5", + "firefox": "35", "safari": "9", "node": "4", "ios": "9", diff --git a/packages/babel-preset-env/data/plugins.json b/packages/babel-preset-env/data/plugins.json index cb6301765dc6..a869f0bd2111 100644 --- a/packages/babel-preset-env/data/plugins.json +++ b/packages/babel-preset-env/data/plugins.json @@ -3,9 +3,7 @@ "chrome": "41", "edge": "13", "firefox": "34", - "safari": "9", "node": "4", - "ios": "9", "opera": "28", "electron": "0.24" }, diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index f4b60f0553be..d32592e328da 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -67,7 +67,7 @@ "@babel/helper-fixtures": "^7.2.0", "@babel/helper-plugin-test-runner": "^7.0.0", "caniuse-db": "1.0.30000938", - "compat-table": "kangax/compat-table#1e7b377fbdda9243cf9602872fcb493cdbdd565f", + "compat-table": "kangax/compat-table#6d012ba020fa7415e8a2d29e87924bab79b128a3", "electron-to-chromium": "1.3.113" } } diff --git a/packages/babel-preset-env/scripts/build-data.js b/packages/babel-preset-env/scripts/build-data.js index cea4a0d5cc61..28e80b1031f1 100644 --- a/packages/babel-preset-env/scripts/build-data.js +++ b/packages/babel-preset-env/scripts/build-data.js @@ -203,7 +203,7 @@ const getLowestImplementedVersion = ({ features }, env) => { const reportedVersions = Object.keys(test) .filter(t => t.startsWith(env)) .map(t => { - const version = t.replace("_", ".").replace(env, ""); + const version = t.replace(/_/g, ".").replace(env, ""); return { version, semver: semver.coerce(version) || version, @@ -217,16 +217,26 @@ const getLowestImplementedVersion = ({ features }, env) => { unreleasedLabelForEnv === version.version || !isNaN(parseFloat(version.version)) ) - // Sort in asc order, with unreleasedLabelForEnv coming last. + // Sort in desc order, with unreleasedLabelForEnv coming last. .sort(({ semver: av }, { semver: bv }) => { - if (av === unreleasedLabelForEnv) return 1; - if (bv === unreleasedLabelForEnv) return -1; - if (semver.gt(av, bv)) return 1; - if (semver.gt(bv, av)) return -1; + if (av === unreleasedLabelForEnv) return -1; + if (bv === unreleasedLabelForEnv) return 1; + if (semver.gt(av, bv)) return -1; + if (semver.gt(bv, av)) return 1; return 0; }); - return reportedVersions.find(version => version.implements); + // Find the lowest version such that all higher versions implement it. + // Eg, given { chrome70: true, chrome60: false, chrome50: true }, the + // lowest version is chrome70, not chrome50. + let lowest = null; + for (const version of reportedVersions) { + if (!version.implements) { + break; + } + lowest = version; + } + return lowest; }); const envFiltered = envTests.filter(t => t); diff --git a/packages/babel-preset-env/test/debug-fixtures/specific-targets/stdout.txt b/packages/babel-preset-env/test/debug-fixtures/specific-targets/stdout.txt index e27e601607e9..c1caa5390a37 100644 --- a/packages/babel-preset-env/test/debug-fixtures/specific-targets/stdout.txt +++ b/packages/babel-preset-env/test/debug-fixtures/specific-targets/stdout.txt @@ -13,7 +13,7 @@ Using targets: Using modules transform: auto Using plugins: - transform-template-literals { "ie":"10", "safari":"7" } + transform-template-literals { "ie":"10", "ios":"9", "safari":"7" } transform-literals { "firefox":"49", "ie":"10", "safari":"7" } transform-function-name { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" } transform-arrow-functions { "ie":"10", "ios":"9", "safari":"7" } @@ -59,7 +59,7 @@ Using polyfills with `entry` option: es6.date.to-json { "ios":"9", "safari":"7" } es6.date.to-primitive { "edge":"13", "ie":"10", "ios":"9", "safari":"7" } es6.function.has-instance { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" } - es6.function.name { "ie":"10" } + es6.function.name { "edge":"13", "ie":"10" } es6.map { "edge":"13", "firefox":"49", "ie":"10", "ios":"9", "safari":"7" } es6.math.acosh { "ie":"10", "safari":"7" } es6.math.asinh { "ie":"10", "safari":"7" } diff --git a/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/input.js b/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/input.js new file mode 100644 index 000000000000..4d45d4de3a41 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/input.js @@ -0,0 +1 @@ +tag`Safari 12 borked`; diff --git a/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/options.json b/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/options.json new file mode 100644 index 000000000000..97a5889f7656 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/options.json @@ -0,0 +1,13 @@ +{ + "presets": [ + [ + "../../../../lib", + { + "targets": { + "browsers": "safari 9" + }, + "shippedProposals": true + } + ] + ] +} diff --git a/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/output.js b/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/output.js new file mode 100644 index 000000000000..bbeb47d3ed6e --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/safari-tagged-template-literals/output.js @@ -0,0 +1,13 @@ +function _templateObject() { + var data = _taggedTemplateLiteral(["Safari 12 borked"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + +tag(_templateObject()); From c1e51e08d31bb47c8b6b04fb223310d36b093706 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 26 Feb 2019 12:29:10 -0800 Subject: [PATCH 330/563] Update charcodes --- packages/babel-parser/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index cf31022a2ccc..bdd0b80da331 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@babel/code-frame": "^7.0.0", "@babel/helper-fixtures": "^7.2.0", - "charcodes": "0.1.0", + "charcodes": "^0.2.0", "unicode-11.0.0": "^0.7.8" }, "bin": { From 43eed1ac922400cb486bfe6af74883c48ac1d3ed Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 26 Feb 2019 13:28:10 -0800 Subject: [PATCH 331/563] Check exported bindings are defined (#9589) * Check exported bindings are defined * Add tests * Update flow whitelist * Add tests for builtins --- .../fixtures/edgecase/unary-op/options.json | 3 + .../fixtures/flow/declare-exports/input.js | 1 + .../fixtures/flow/declare-exports/output.js | 1 + .../fixtures/flow/type-annotations/input.js | 2 +- .../fixtures/flow/type-annotations/output.js | 4 +- .../harmony-edgecase/exports/input.js | 1 + .../harmony-edgecase/exports/output.js | 1 + .../fixtures/types/ExportSpecifier11/input.js | 1 + .../types/ExportSpecifier11/output.js | 3 +- .../fixtures/types/ExportSpecifier12/input.js | 1 + .../types/ExportSpecifier12/output.js | 3 +- .../fixtures/types/ExportSpecifier13/input.js | 1 + .../types/ExportSpecifier13/output.js | 3 +- .../fixtures/types/ExportSpecifier14/input.js | 1 + .../types/ExportSpecifier14/output.js | 3 +- .../fixtures/types/ExportSpecifier15/input.js | 1 + .../types/ExportSpecifier15/output.js | 3 +- .../types/UnaryExpression/options.json | 3 + .../fixtures/types/WithStatement/options.json | 3 + packages/babel-generator/test/index.js | 2 +- packages/babel-parser/src/parser/statement.js | 18 +- packages/babel-parser/src/types.js | 1 + packages/babel-parser/src/util/scope.js | 19 ++ .../scope/undecl-export-as-default/input.js | 1 + .../undecl-export-as-default/options.json | 4 + .../core/scope/undecl-export-as/input.js | 2 + .../core/scope/undecl-export-as/options.json | 4 + .../core/scope/undecl-export-block/input.js | 4 + .../scope/undecl-export-block/options.json | 4 + .../scope/undecl-export-builtin-as/input.js | 1 + .../undecl-export-builtin-as/options.json | 4 + .../core/scope/undecl-export-builtin/input.js | 1 + .../scope/undecl-export-builtin/options.json | 4 + .../core/scope/undecl-export-if/input.js | 2 + .../core/scope/undecl-export-if/options.json | 4 + .../core/scope/undecl-export-var/input.js | 4 + .../core/scope/undecl-export-var/options.json | 3 + .../core/scope/undecl-export-var/output.json | 172 ++++++++++++++++++ .../core/scope/undecl-export/input.js | 1 + .../core/scope/undecl-export/options.json | 4 + .../duplicate-named-export-builtin/input.js | 2 + .../output.json | 110 +++++++++-- .../fixtures/es2015/uncategorised/86/input.js | 3 +- .../es2015/uncategorised/86/output.json | 68 ++++++- .../fixtures/es2015/uncategorised/87/input.js | 4 +- .../es2015/uncategorised/87/output.json | 165 +++++++++++++---- .../fixtures/es2015/uncategorised/88/input.js | 3 +- .../es2015/uncategorised/88/output.json | 109 +++++++++-- .../fixtures/es2015/uncategorised/89/input.js | 4 +- .../es2015/uncategorised/89/output.json | 165 +++++++++++++---- .../export-named-as-default/input.js | 1 + .../export-named-as-default/output.json | 67 ++++++- .../export-named-as-specifier/input.js | 1 + .../export-named-as-specifier/output.json | 124 +++++++++++-- .../export-named-as-specifiers/input.js | 1 + .../export-named-as-specifiers/output.json | 100 +++++++++- .../export-named-specifier/input.js | 1 + .../export-named-specifier/output.json | 91 +++++++-- .../export-named-specifiers-comma/input.js | 2 + .../export-named-specifiers-comma/output.json | 170 +++++++++++++---- .../export-named-specifiers/input.js | 2 + .../export-named-specifiers/output.json | 170 +++++++++++++---- .../export-named-pattern/input.js | 1 + .../export-named-pattern/output.json | 65 ++++++- .../flow/type-exports/specifier/input.js | 1 + .../flow/type-exports/specifier/output.json | 87 +++++++-- .../strip-type-annotations/input.mjs | 2 +- .../systemjs/export-named-2/input.mjs | 1 + .../systemjs/export-named-2/output.mjs | 13 +- .../systemjs/export-named-3/input.mjs | 1 + .../systemjs/export-named-3/output.mjs | 8 +- .../systemjs/export-named-4/input.mjs | 1 + .../systemjs/export-named-4/output.mjs | 8 +- .../systemjs/export-named-5/input.mjs | 1 + .../systemjs/export-named-5/output.mjs | 13 +- .../fixtures/systemjs/export-named/input.mjs | 1 + .../fixtures/systemjs/export-named/output.mjs | 8 +- .../test/fixtures/systemjs/overview/input.mjs | 4 +- .../fixtures/systemjs/overview/output.mjs | 4 +- scripts/tests/flow/flow_tests_whitelist.txt | 3 + scripts/tests/test262/test262_whitelist.txt | 4 - 81 files changed, 1583 insertions(+), 304 deletions(-) create mode 100644 packages/babel-generator/test/fixtures/edgecase/unary-op/options.json create mode 100644 packages/babel-generator/test/fixtures/types/UnaryExpression/options.json create mode 100644 packages/babel-generator/test/fixtures/types/WithStatement/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-as/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-as/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-block/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-block/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-if/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-if/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-var/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-var/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export-var/output.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/undecl-export/options.json diff --git a/packages/babel-generator/test/fixtures/edgecase/unary-op/options.json b/packages/babel-generator/test/fixtures/edgecase/unary-op/options.json new file mode 100644 index 000000000000..a2e80d9ec294 --- /dev/null +++ b/packages/babel-generator/test/fixtures/edgecase/unary-op/options.json @@ -0,0 +1,3 @@ +{ + "strictMode": false +} diff --git a/packages/babel-generator/test/fixtures/flow/declare-exports/input.js b/packages/babel-generator/test/fixtures/flow/declare-exports/input.js index 279e6ab4f9f9..97544d82b930 100644 --- a/packages/babel-generator/test/fixtures/flow/declare-exports/input.js +++ b/packages/babel-generator/test/fixtures/flow/declare-exports/input.js @@ -17,6 +17,7 @@ declare export * from 'asd'; declare export { a, b }; declare export {}; declare export { c, d } from 'bar'; +var a, b; declare module B { declare export type B = {}; diff --git a/packages/babel-generator/test/fixtures/flow/declare-exports/output.js b/packages/babel-generator/test/fixtures/flow/declare-exports/output.js index 877c43099415..59f3a4c56856 100644 --- a/packages/babel-generator/test/fixtures/flow/declare-exports/output.js +++ b/packages/babel-generator/test/fixtures/flow/declare-exports/output.js @@ -26,6 +26,7 @@ declare export * from 'asd'; declare export { a, b }; declare export {}; declare export { c, d } from 'bar'; +var a, b; declare module B { declare export type B = {}; declare export interface Moon {} diff --git a/packages/babel-generator/test/fixtures/flow/type-annotations/input.js b/packages/babel-generator/test/fixtures/flow/type-annotations/input.js index 76be1b446fac..e7335c30b72a 100644 --- a/packages/babel-generator/test/fixtures/flow/type-annotations/input.js +++ b/packages/babel-generator/test/fixtures/flow/type-annotations/input.js @@ -107,7 +107,7 @@ import { type Foo12 } from "bar"; import { typeof Foo13 } from "bar"; import { type Foo as Bar1 } from "bar"; import { typeof Foo as Bar2 } from "bar"; -export type { foo }; +export type { foo1 }; export type { bar } from "bar"; export interface baz { p: number } export interface qux { p: T } diff --git a/packages/babel-generator/test/fixtures/flow/type-annotations/output.js b/packages/babel-generator/test/fixtures/flow/type-annotations/output.js index cd69710614a1..6465359f336d 100644 --- a/packages/babel-generator/test/fixtures/flow/type-annotations/output.js +++ b/packages/babel-generator/test/fixtures/flow/type-annotations/output.js @@ -231,7 +231,7 @@ import { type Foo12 } from "bar"; import { typeof Foo13 } from "bar"; import { type Foo as Bar1 } from "bar"; import { typeof Foo as Bar2 } from "bar"; -export type { foo }; +export type { foo1 }; export type { bar } from "bar"; export interface baz { p: number @@ -293,4 +293,4 @@ function foo27(numVal: number = 2) {} function foo28(numVal?: number = 2) {} -export type * from "foo"; +export type * from "foo"; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/harmony-edgecase/exports/input.js b/packages/babel-generator/test/fixtures/harmony-edgecase/exports/input.js index ec680f05ac1d..540245d565b3 100644 --- a/packages/babel-generator/test/fixtures/harmony-edgecase/exports/input.js +++ b/packages/babel-generator/test/fixtures/harmony-edgecase/exports/input.js @@ -1,3 +1,4 @@ +var a, c; export * from "OK" export { name } from "OK" export { a as b, c as d } from "hello" diff --git a/packages/babel-generator/test/fixtures/harmony-edgecase/exports/output.js b/packages/babel-generator/test/fixtures/harmony-edgecase/exports/output.js index 5482292b19a7..84c968fe12a3 100644 --- a/packages/babel-generator/test/fixtures/harmony-edgecase/exports/output.js +++ b/packages/babel-generator/test/fixtures/harmony-edgecase/exports/output.js @@ -1,3 +1,4 @@ +var a, c; export * from "OK"; export { name } from "OK"; export { a as b, c as d } from "hello"; diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier11/input.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier11/input.js index f40ac5c3434e..701c971b8991 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier11/input.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier11/input.js @@ -1 +1,2 @@ export { foo }; +var foo; diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier11/output.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier11/output.js index f604032cb6d6..520c0fb1dda1 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier11/output.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier11/output.js @@ -1 +1,2 @@ -export { foo }; \ No newline at end of file +export { foo }; +var foo; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier12/input.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier12/input.js index 9dfa348be312..5e6c6606032a 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier12/input.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier12/input.js @@ -1 +1,2 @@ export { foo, bar }; +var foo, bar; diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier12/output.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier12/output.js index 4cb44a4b2592..be6d973b815d 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier12/output.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier12/output.js @@ -1 +1,2 @@ -export { foo, bar }; \ No newline at end of file +export { foo, bar }; +var foo, bar; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier13/input.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier13/input.js index e4cca384daec..dd1cfea6d77d 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier13/input.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier13/input.js @@ -1 +1,2 @@ export { foo as bar }; +var foo; diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier13/output.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier13/output.js index 5d4569c099d2..d6e7ac50254e 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier13/output.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier13/output.js @@ -1 +1,2 @@ -export { foo as bar }; \ No newline at end of file +export { foo as bar }; +var foo; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier14/input.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier14/input.js index 95daad9d9676..5e840fff920b 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier14/input.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier14/input.js @@ -1 +1,2 @@ export { foo as default }; +var foo; diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier14/output.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier14/output.js index f96da82b3b2c..4a3a9fe44ea7 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier14/output.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier14/output.js @@ -1 +1,2 @@ -export { foo as default }; \ No newline at end of file +export { foo as default }; +var foo; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier15/input.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier15/input.js index ebd14b2d969e..022457fd87a6 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier15/input.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier15/input.js @@ -1 +1,2 @@ export { foo as default, bar }; +var foo, bar; diff --git a/packages/babel-generator/test/fixtures/types/ExportSpecifier15/output.js b/packages/babel-generator/test/fixtures/types/ExportSpecifier15/output.js index 2ef73817d596..974c22ae14f2 100644 --- a/packages/babel-generator/test/fixtures/types/ExportSpecifier15/output.js +++ b/packages/babel-generator/test/fixtures/types/ExportSpecifier15/output.js @@ -1 +1,2 @@ -export { foo as default, bar }; \ No newline at end of file +export { foo as default, bar }; +var foo, bar; \ No newline at end of file diff --git a/packages/babel-generator/test/fixtures/types/UnaryExpression/options.json b/packages/babel-generator/test/fixtures/types/UnaryExpression/options.json new file mode 100644 index 000000000000..a2e80d9ec294 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/UnaryExpression/options.json @@ -0,0 +1,3 @@ +{ + "strictMode": false +} diff --git a/packages/babel-generator/test/fixtures/types/WithStatement/options.json b/packages/babel-generator/test/fixtures/types/WithStatement/options.json new file mode 100644 index 000000000000..a2e80d9ec294 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/WithStatement/options.json @@ -0,0 +1,3 @@ +{ + "strictMode": false +} diff --git a/packages/babel-generator/test/index.js b/packages/babel-generator/test/index.js index c8b60b4051db..057452885063 100644 --- a/packages/babel-generator/test/index.js +++ b/packages/babel-generator/test/index.js @@ -489,7 +489,7 @@ suites.forEach(function(testSuite) { const actualAst = parse(actualCode, { filename: actual.loc, plugins: task.options.plugins || [], - strictMode: false, + strictMode: task.options.strictMode === false ? false : true, sourceType: "module", sourceMaps: !!task.sourceMap, }); diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 2d98842c8b25..d2981c24006a 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -49,6 +49,14 @@ export default class StatementParser extends ExpressionParser { this.parseBlockBody(program, true, true, tt.eof); + if (this.inModule && this.scope.undefinedExports.size > 0) { + for (const [name] of Array.from(this.scope.undefinedExports)) { + const pos = this.scope.undefinedExports.get(name); + // $FlowIssue + this.raise(pos, `Export '${name}' is not defined`); + } + } + file.program = this.finishNode(program, "Program"); file.comments = this.state.comments; @@ -1631,7 +1639,7 @@ export default class StatementParser extends ExpressionParser { } if (isFromRequired || hasSpecifiers || hasDeclaration) { - this.checkExport(node, true); + this.checkExport(node, true, false, !!node.source); return this.finishNode(node, "ExportNamedDeclaration"); } @@ -1845,8 +1853,9 @@ export default class StatementParser extends ExpressionParser { checkExport( node: N.ExportNamedDeclaration, - checkNames: ?boolean, + checkNames?: boolean, isDefault?: boolean, + isFrom?: boolean, ): void { if (checkNames) { // Check for duplicate exports @@ -1857,6 +1866,11 @@ export default class StatementParser extends ExpressionParser { // Named exports for (const specifier of node.specifiers) { this.checkDuplicateExports(specifier, specifier.exported.name); + // check if export is defined + // $FlowIgnore + if (!isFrom && specifier.local) { + this.scope.checkLocalExport(specifier.local); + } } } else if (node.declaration) { // Exported declarations diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 06e5a03a71d8..696589b3e650 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -831,6 +831,7 @@ export type ExportNamedDeclaration = NodeBase & { export type ExportSpecifier = NodeBase & { type: "ExportSpecifier", exported: Identifier, + local: Identifier, }; export type ExportDefaultSpecifier = NodeBase & { diff --git a/packages/babel-parser/src/util/scope.js b/packages/babel-parser/src/util/scope.js index 496814cd96b0..8d9e08b1a816 100644 --- a/packages/babel-parser/src/util/scope.js +++ b/packages/babel-parser/src/util/scope.js @@ -16,6 +16,7 @@ import { type BindingTypes, SCOPE_CLASS, } from "./scopeflags"; +import * as N from "../types"; // Start an AST node, attaching a start offset. class Scope { @@ -40,6 +41,7 @@ export default class ScopeHandler { scopeStack: Array = []; raise: raiseFunction; inModule: boolean; + undefinedExports: Map = new Map(); constructor(raise: raiseFunction, inModule: boolean) { this.raise = raise; @@ -95,6 +97,9 @@ export default class ScopeHandler { scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; scope.lexical.push(name); + if (this.inModule && scope.flags & SCOPE_PROGRAM) { + this.undefinedExports.delete(name); + } } else if (bindingType === BIND_SIMPLE_CATCH) { const scope = this.currentScope(); scope.lexical.push(name); @@ -122,6 +127,10 @@ export default class ScopeHandler { } scope.var.push(name); + if (this.inModule && scope.flags & SCOPE_PROGRAM) { + this.undefinedExports.delete(name); + } + if (scope.flags & SCOPE_VAR) break; } } @@ -130,6 +139,16 @@ export default class ScopeHandler { } } + checkLocalExport(id: N.Identifier) { + // scope.functions must be empty as Module code is always strict. + if ( + this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1 + ) { + this.undefinedExports.set(id.name, id.start); + } + } + currentScope(): Scope { return this.scopeStack[this.scopeStack.length - 1]; } diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/input.js b/packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/input.js new file mode 100644 index 000000000000..df3d92761397 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/input.js @@ -0,0 +1 @@ +export { encrypt as default }; diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/options.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/options.json new file mode 100644 index 000000000000..8448889cf253 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-as-default/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Export 'encrypt' is not defined (1:9)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-as/input.js b/packages/babel-parser/test/fixtures/core/scope/undecl-export-as/input.js new file mode 100644 index 000000000000..f14dc079868b --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-as/input.js @@ -0,0 +1,2 @@ +export { encrypt as decrypt }; +function decrypt() {} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-as/options.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export-as/options.json new file mode 100644 index 000000000000..8448889cf253 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-as/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Export 'encrypt' is not defined (1:9)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-block/input.js b/packages/babel-parser/test/fixtures/core/scope/undecl-export-block/input.js new file mode 100644 index 000000000000..1e993e373a01 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-block/input.js @@ -0,0 +1,4 @@ +{ + function encrypt() {} +} +export { encrypt } diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-block/options.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export-block/options.json new file mode 100644 index 000000000000..0844d3e80e68 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-block/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Export 'encrypt' is not defined (4:9)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/input.js b/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/input.js new file mode 100644 index 000000000000..2ab393fc2343 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/input.js @@ -0,0 +1 @@ +export { Object as Obj }; diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/options.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/options.json new file mode 100644 index 000000000000..cbab70613300 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin-as/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Export 'Object' is not defined (1:9)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/input.js b/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/input.js new file mode 100644 index 000000000000..8ddd96dff319 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/input.js @@ -0,0 +1 @@ +export { Object }; diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/options.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/options.json new file mode 100644 index 000000000000..cbab70613300 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-builtin/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Export 'Object' is not defined (1:9)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-if/input.js b/packages/babel-parser/test/fixtures/core/scope/undecl-export-if/input.js new file mode 100644 index 000000000000..6d6c87fb7a38 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-if/input.js @@ -0,0 +1,2 @@ +export { encrypt }; +if (true) function encrypt() {} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-if/options.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export-if/options.json new file mode 100644 index 000000000000..2c97b3ce5a78 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-if/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "In strict mode code, functions can only be declared at top level or inside a block (2:10)" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/input.js b/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/input.js new file mode 100644 index 000000000000..b8a0b5223551 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/input.js @@ -0,0 +1,4 @@ +{ + var encrypt +} +export { encrypt } diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/options.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/options.json new file mode 100644 index 000000000000..2104ca43283f --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/options.json @@ -0,0 +1,3 @@ +{ + "sourceType": "module" +} diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/output.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/output.json new file mode 100644 index 000000000000..91e34252dbc5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export-var/output.json @@ -0,0 +1,172 @@ +{ + "type": "File", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "BlockStatement", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 4, + "end": 15, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 8, + "end": 15, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "id": { + "type": "Identifier", + "start": 8, + "end": 15, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + }, + "identifierName": "encrypt" + }, + "name": "encrypt" + }, + "init": null + } + ], + "kind": "var" + } + ], + "directives": [] + }, + { + "type": "ExportNamedDeclaration", + "start": 18, + "end": 36, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 18 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 27, + "end": 34, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 16 + } + }, + "local": { + "type": "Identifier", + "start": 27, + "end": 34, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 16 + }, + "identifierName": "encrypt" + }, + "name": "encrypt" + }, + "exported": { + "type": "Identifier", + "start": 27, + "end": 34, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 16 + }, + "identifierName": "encrypt" + }, + "name": "encrypt" + } + } + ], + "source": null, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export/input.js b/packages/babel-parser/test/fixtures/core/scope/undecl-export/input.js new file mode 100644 index 000000000000..7ec871cd2f99 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export/input.js @@ -0,0 +1 @@ +export { encrypt }; diff --git a/packages/babel-parser/test/fixtures/core/scope/undecl-export/options.json b/packages/babel-parser/test/fixtures/core/scope/undecl-export/options.json new file mode 100644 index 000000000000..8448889cf253 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/undecl-export/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Export 'encrypt' is not defined (1:9)" +} diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-builtin/input.js b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-builtin/input.js index 01d2b22e0b82..30c0f0d29bb5 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-builtin/input.js +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-builtin/input.js @@ -1 +1,3 @@ +const toString = 1; + export { toString }; diff --git a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-builtin/output.json b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-builtin/output.json index 190e09b28697..7d37c8dcb67b 100644 --- a/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-builtin/output.json +++ b/packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-builtin/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 20, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 20 } }, "program": { "type": "Program", "start": 0, - "end": 20, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 20 } }, @@ -30,9 +30,9 @@ "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", "start": 0, - "end": 20, + "end": 19, "loc": { "start": { "line": 1, @@ -40,36 +40,105 @@ }, "end": { "line": 1, + "column": 19 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 14 + }, + "identifierName": "toString" + }, + "name": "toString" + }, + "init": { + "type": "NumericLiteral", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + ], + "kind": "const" + }, + { + "type": "ExportNamedDeclaration", + "start": 21, + "end": 41, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, "column": 20 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 9, - "end": 17, + "start": 30, + "end": 38, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 17 } }, "local": { "type": "Identifier", - "start": 9, - "end": 17, + "start": 30, + "end": 38, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 17 }, "identifierName": "toString" @@ -78,15 +147,15 @@ }, "exported": { "type": "Identifier", - "start": 9, - "end": 17, + "start": 30, + "end": 38, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 17 }, "identifierName": "toString" @@ -95,7 +164,8 @@ } } ], - "source": null + "source": null, + "declaration": null } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/86/input.js b/packages/babel-parser/test/fixtures/es2015/uncategorised/86/input.js index ebdd242449e5..bc9adbfd19cc 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/86/input.js +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/86/input.js @@ -1 +1,2 @@ -export { encrypt } \ No newline at end of file +export { encrypt } +function encrypt () {} diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/86/output.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/86/output.json index 6f2e67893ccb..7e4ade49890c 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/86/output.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/86/output.json @@ -1,29 +1,29 @@ { "type": "File", "start": 0, - "end": 18, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 18 + "line": 2, + "column": 22 } }, "program": { "type": "Program", "start": 0, - "end": 18, + "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 18 + "line": 2, + "column": 22 } }, "sourceType": "module", @@ -43,7 +43,6 @@ "column": 18 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", @@ -95,7 +94,60 @@ } } ], - "source": null + "source": null, + "declaration": null + }, + { + "type": "FunctionDeclaration", + "start": 19, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "id": { + "type": "Identifier", + "start": 28, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + }, + "identifierName": "encrypt" + }, + "name": "encrypt" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 39, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 22 + } + }, + "body": [], + "directives": [] + } } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/87/input.js b/packages/babel-parser/test/fixtures/es2015/uncategorised/87/input.js index 04615d4b6f31..9e82122a4077 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/87/input.js +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/87/input.js @@ -1 +1,3 @@ -export { encrypt, decrypt } \ No newline at end of file +function encrypt () {} +class decrypt{} +export { encrypt, decrypt } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/87/output.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/87/output.json index f7a0baef7991..28e7320743b9 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/87/output.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/87/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 27, + "end": 66, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 27 } }, "program": { "type": "Program", "start": 0, - "end": 27, + "end": 66, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 27 } }, @@ -30,9 +30,9 @@ "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "FunctionDeclaration", "start": 0, - "end": 27, + "end": 22, "loc": { "start": { "line": 1, @@ -40,36 +40,136 @@ }, "end": { "line": 1, + "column": 22 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "encrypt" + }, + "name": "encrypt" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 20, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "ClassDeclaration", + "start": 23, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "id": { + "type": "Identifier", + "start": 29, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + }, + "identifierName": "decrypt" + }, + "name": "decrypt" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 36, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "body": [] + } + }, + { + "type": "ExportNamedDeclaration", + "start": 39, + "end": 66, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, "column": 27 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 9, - "end": 16, + "start": 48, + "end": 55, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "local": { "type": "Identifier", - "start": 9, - "end": 16, + "start": 48, + "end": 55, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 16 }, "identifierName": "encrypt" @@ -78,15 +178,15 @@ }, "exported": { "type": "Identifier", - "start": 9, - "end": 16, + "start": 48, + "end": 55, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 16 }, "identifierName": "encrypt" @@ -96,29 +196,29 @@ }, { "type": "ExportSpecifier", - "start": 18, - "end": 25, + "start": 57, + "end": 64, "loc": { "start": { - "line": 1, + "line": 3, "column": 18 }, "end": { - "line": 1, + "line": 3, "column": 25 } }, "local": { "type": "Identifier", - "start": 18, - "end": 25, + "start": 57, + "end": 64, "loc": { "start": { - "line": 1, + "line": 3, "column": 18 }, "end": { - "line": 1, + "line": 3, "column": 25 }, "identifierName": "decrypt" @@ -127,15 +227,15 @@ }, "exported": { "type": "Identifier", - "start": 18, - "end": 25, + "start": 57, + "end": 64, "loc": { "start": { - "line": 1, + "line": 3, "column": 18 }, "end": { - "line": 1, + "line": 3, "column": 25 }, "identifierName": "decrypt" @@ -144,7 +244,8 @@ } } ], - "source": null + "source": null, + "declaration": null } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/88/input.js b/packages/babel-parser/test/fixtures/es2015/uncategorised/88/input.js index 9f663623f952..1f9f9289b167 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/88/input.js +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/88/input.js @@ -1 +1,2 @@ -export { encrypt as default } \ No newline at end of file +import encrypt from ""; +export { encrypt as default } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/88/output.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/88/output.json index 425419eb9509..25b0fd97418a 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/88/output.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/88/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 29, + "end": 53, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 29 } }, "program": { "type": "Program", "start": 0, - "end": 29, + "end": 53, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 29 } }, @@ -30,9 +30,9 @@ "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", "start": 0, - "end": 29, + "end": 23, "loc": { "start": { "line": 1, @@ -40,36 +40,104 @@ }, "end": { "line": 1, + "column": 23 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 14 + }, + "identifierName": "encrypt" + }, + "name": "encrypt" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 20, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "extra": { + "rawValue": "", + "raw": "\"\"" + }, + "value": "" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 24, + "end": 53, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, "column": 29 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 9, - "end": 27, + "start": 33, + "end": 51, "loc": { "start": { - "line": 1, + "line": 2, "column": 9 }, "end": { - "line": 1, + "line": 2, "column": 27 } }, "local": { "type": "Identifier", - "start": 9, - "end": 16, + "start": 33, + "end": 40, "loc": { "start": { - "line": 1, + "line": 2, "column": 9 }, "end": { - "line": 1, + "line": 2, "column": 16 }, "identifierName": "encrypt" @@ -78,15 +146,15 @@ }, "exported": { "type": "Identifier", - "start": 20, - "end": 27, + "start": 44, + "end": 51, "loc": { "start": { - "line": 1, + "line": 2, "column": 20 }, "end": { - "line": 1, + "line": 2, "column": 27 }, "identifierName": "default" @@ -95,7 +163,8 @@ } } ], - "source": null + "source": null, + "declaration": null } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/89/input.js b/packages/babel-parser/test/fixtures/es2015/uncategorised/89/input.js index fec65aa2e838..f1526616e3f4 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/89/input.js +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/89/input.js @@ -1 +1,3 @@ -export { encrypt, decrypt as dec } \ No newline at end of file +function encrypt() {} +class decrypt {} +export { encrypt, decrypt as dec } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/89/output.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/89/output.json index 7f1186d778ed..6e52c6fd4d1f 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/89/output.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/89/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 34, + "end": 73, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 34 } }, "program": { "type": "Program", "start": 0, - "end": 34, + "end": 73, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 3, "column": 34 } }, @@ -30,9 +30,9 @@ "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "FunctionDeclaration", "start": 0, - "end": 34, + "end": 21, "loc": { "start": { "line": 1, @@ -40,36 +40,136 @@ }, "end": { "line": 1, + "column": 21 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "encrypt" + }, + "name": "encrypt" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 19, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "body": [], + "directives": [] + } + }, + { + "type": "ClassDeclaration", + "start": 22, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "id": { + "type": "Identifier", + "start": 28, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 13 + }, + "identifierName": "decrypt" + }, + "name": "decrypt" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 36, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "body": [] + } + }, + { + "type": "ExportNamedDeclaration", + "start": 39, + "end": 73, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, "column": 34 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 9, - "end": 16, + "start": 48, + "end": 55, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 16 } }, "local": { "type": "Identifier", - "start": 9, - "end": 16, + "start": 48, + "end": 55, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 16 }, "identifierName": "encrypt" @@ -78,15 +178,15 @@ }, "exported": { "type": "Identifier", - "start": 9, - "end": 16, + "start": 48, + "end": 55, "loc": { "start": { - "line": 1, + "line": 3, "column": 9 }, "end": { - "line": 1, + "line": 3, "column": 16 }, "identifierName": "encrypt" @@ -96,29 +196,29 @@ }, { "type": "ExportSpecifier", - "start": 18, - "end": 32, + "start": 57, + "end": 71, "loc": { "start": { - "line": 1, + "line": 3, "column": 18 }, "end": { - "line": 1, + "line": 3, "column": 32 } }, "local": { "type": "Identifier", - "start": 18, - "end": 25, + "start": 57, + "end": 64, "loc": { "start": { - "line": 1, + "line": 3, "column": 18 }, "end": { - "line": 1, + "line": 3, "column": 25 }, "identifierName": "decrypt" @@ -127,15 +227,15 @@ }, "exported": { "type": "Identifier", - "start": 29, - "end": 32, + "start": 68, + "end": 71, "loc": { "start": { - "line": 1, + "line": 3, "column": 29 }, "end": { - "line": 1, + "line": 3, "column": 32 }, "identifierName": "dec" @@ -144,7 +244,8 @@ } } ], - "source": null + "source": null, + "declaration": null } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/input.js index 5d32a24de0a9..974ab55e4371 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/input.js +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/input.js @@ -1 +1,2 @@ export {foo as default}; +var foo; diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/output.json index c3d6819265c2..ab9dd47bd5f1 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/output.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-default/output.json @@ -1,29 +1,29 @@ { "type": "File", "start": 0, - "end": 24, + "end": 33, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 24 + "line": 2, + "column": 8 } }, "program": { "type": "Program", "start": 0, - "end": 24, + "end": 33, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 24 + "line": 2, + "column": 8 } }, "sourceType": "module", @@ -43,7 +43,6 @@ "column": 24 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", @@ -95,7 +94,59 @@ } } ], - "source": null + "source": null, + "declaration": null + }, + { + "type": "VariableDeclaration", + "start": 25, + "end": 33, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 29, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 29, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "var" } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/input.js index e7820a6f027c..1d873bf86024 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/input.js +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/input.js @@ -1 +1,2 @@ +var foo, bar; export {foo as bar}; diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/output.json index e1652693b14f..0b8670ce2ef3 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/output.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifier/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 20, + "end": 34, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 20 } }, "program": { "type": "Program", "start": 0, - "end": 20, + "end": 34, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 20 } }, @@ -30,9 +30,9 @@ "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", "start": 0, - "end": 20, + "end": 13, "loc": { "start": { "line": 1, @@ -40,36 +40,119 @@ }, "end": { "line": 1, + "column": 13 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + }, + { + "type": "VariableDeclarator", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "init": null + } + ], + "kind": "var" + }, + { + "type": "ExportNamedDeclaration", + "start": 14, + "end": 34, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, "column": 20 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 8, - "end": 18, + "start": 22, + "end": 32, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 18 } }, "local": { "type": "Identifier", - "start": 8, - "end": 11, + "start": 22, + "end": 25, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 }, "identifierName": "foo" @@ -78,15 +161,15 @@ }, "exported": { "type": "Identifier", - "start": 15, - "end": 18, + "start": 29, + "end": 32, "loc": { "start": { - "line": 1, + "line": 2, "column": 15 }, "end": { - "line": 1, + "line": 2, "column": 18 }, "identifierName": "bar" @@ -95,7 +178,8 @@ } } ], - "source": null + "source": null, + "declaration": null } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/input.js index ff57927839e8..f0218dfca8ab 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/input.js +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/input.js @@ -1 +1,2 @@ export {foo as default, bar}; +var foo, bar; diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/output.json index 8114c32e2924..2a876f042ed1 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/output.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-as-specifiers/output.json @@ -1,29 +1,29 @@ { "type": "File", "start": 0, - "end": 29, + "end": 43, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 29 + "line": 2, + "column": 13 } }, "program": { "type": "Program", "start": 0, - "end": 29, + "end": 43, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 29 + "line": 2, + "column": 13 } }, "sourceType": "module", @@ -43,7 +43,6 @@ "column": 29 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", @@ -144,7 +143,92 @@ } } ], - "source": null + "source": null, + "declaration": null + }, + { + "type": "VariableDeclaration", + "start": 30, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 13 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 34, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 34, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + }, + { + "type": "VariableDeclarator", + "start": 39, + "end": 42, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + } + }, + "id": { + "type": "Identifier", + "start": 39, + "end": 42, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "init": null + } + ], + "kind": "var" } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/input.js index df5f5e609e93..1c36f4346199 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/input.js +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/input.js @@ -1 +1,2 @@ +let foo; export {foo}; diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/output.json index 49c37926ad3c..4faa60a28feb 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/output.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifier/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 13, + "end": 22, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 13 } }, "program": { "type": "Program", "start": 0, - "end": 13, + "end": 22, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 13 } }, @@ -30,9 +30,9 @@ "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", "start": 0, - "end": 13, + "end": 8, "loc": { "start": { "line": 1, @@ -40,36 +40,86 @@ }, "end": { "line": 1, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "let" + }, + { + "type": "ExportNamedDeclaration", + "start": 9, + "end": 22, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, "column": 13 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "local": { "type": "Identifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 }, "identifierName": "foo" @@ -78,15 +128,15 @@ }, "exported": { "type": "Identifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 }, "identifierName": "foo" @@ -95,7 +145,8 @@ } } ], - "source": null + "source": null, + "declaration": null } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/input.js index 61bc40fd77ea..12c55903d5e5 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/input.js +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/input.js @@ -1 +1,3 @@ +var bar; export {foo, bar,}; +var foo; diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/output.json index 0c439126a9ac..3616570c157d 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/output.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers-comma/output.json @@ -1,38 +1,38 @@ { "type": "File", "start": 0, - "end": 19, + "end": 37, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 19 + "line": 3, + "column": 8 } }, "program": { "type": "Program", "start": 0, - "end": 19, + "end": 37, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 19 + "line": 3, + "column": 8 } }, "sourceType": "module", "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", "start": 0, - "end": 19, + "end": 8, "loc": { "start": { "line": 1, @@ -40,36 +40,86 @@ }, "end": { "line": 1, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "init": null + } + ], + "kind": "var" + }, + { + "type": "ExportNamedDeclaration", + "start": 9, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, "column": 19 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "local": { "type": "Identifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 }, "identifierName": "foo" @@ -78,15 +128,15 @@ }, "exported": { "type": "Identifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 }, "identifierName": "foo" @@ -96,29 +146,29 @@ }, { "type": "ExportSpecifier", - "start": 13, - "end": 16, + "start": 22, + "end": 25, "loc": { "start": { - "line": 1, + "line": 2, "column": 13 }, "end": { - "line": 1, + "line": 2, "column": 16 } }, "local": { "type": "Identifier", - "start": 13, - "end": 16, + "start": 22, + "end": 25, "loc": { "start": { - "line": 1, + "line": 2, "column": 13 }, "end": { - "line": 1, + "line": 2, "column": 16 }, "identifierName": "bar" @@ -127,15 +177,15 @@ }, "exported": { "type": "Identifier", - "start": 13, - "end": 16, + "start": 22, + "end": 25, "loc": { "start": { - "line": 1, + "line": 2, "column": 13 }, "end": { - "line": 1, + "line": 2, "column": 16 }, "identifierName": "bar" @@ -144,7 +194,59 @@ } } ], - "source": null + "source": null, + "declaration": null + }, + { + "type": "VariableDeclaration", + "start": 29, + "end": 37, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 33, + "end": 36, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 33, + "end": 36, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "var" } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/input.js index fdbc94275097..8e2977a9e757 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/input.js +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/input.js @@ -1 +1,3 @@ +var foo; export {foo, bar}; +var bar; diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/output.json index b28aaf0d65e4..51d2d56a1f4d 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/output.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/export-named-specifiers/output.json @@ -1,38 +1,38 @@ { "type": "File", "start": 0, - "end": 18, + "end": 36, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 18 + "line": 3, + "column": 8 } }, "program": { "type": "Program", "start": 0, - "end": 18, + "end": 36, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 18 + "line": 3, + "column": 8 } }, "sourceType": "module", "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", "start": 0, - "end": 18, + "end": 8, "loc": { "start": { "line": 1, @@ -40,36 +40,86 @@ }, "end": { "line": 1, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "var" + }, + { + "type": "ExportNamedDeclaration", + "start": 9, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, "column": 18 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 } }, "local": { "type": "Identifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 }, "identifierName": "foo" @@ -78,15 +128,15 @@ }, "exported": { "type": "Identifier", - "start": 8, - "end": 11, + "start": 17, + "end": 20, "loc": { "start": { - "line": 1, + "line": 2, "column": 8 }, "end": { - "line": 1, + "line": 2, "column": 11 }, "identifierName": "foo" @@ -96,29 +146,29 @@ }, { "type": "ExportSpecifier", - "start": 13, - "end": 16, + "start": 22, + "end": 25, "loc": { "start": { - "line": 1, + "line": 2, "column": 13 }, "end": { - "line": 1, + "line": 2, "column": 16 } }, "local": { "type": "Identifier", - "start": 13, - "end": 16, + "start": 22, + "end": 25, "loc": { "start": { - "line": 1, + "line": 2, "column": 13 }, "end": { - "line": 1, + "line": 2, "column": 16 }, "identifierName": "bar" @@ -127,15 +177,15 @@ }, "exported": { "type": "Identifier", - "start": 13, - "end": 16, + "start": 22, + "end": 25, "loc": { "start": { - "line": 1, + "line": 2, "column": 13 }, "end": { - "line": 1, + "line": 2, "column": 16 }, "identifierName": "bar" @@ -144,7 +194,59 @@ } } ], - "source": null + "source": null, + "declaration": null + }, + { + "type": "VariableDeclaration", + "start": 28, + "end": 36, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 32, + "end": 35, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 32, + "end": 35, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "init": null + } + ], + "kind": "var" } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/flow/declare-export/export-named-pattern/input.js b/packages/babel-parser/test/fixtures/flow/declare-export/export-named-pattern/input.js index 6a25a1836566..9c00baefd079 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-export/export-named-pattern/input.js +++ b/packages/babel-parser/test/fixtures/flow/declare-export/export-named-pattern/input.js @@ -1 +1,2 @@ declare module "foo" { declare export {a,}; } +var a; diff --git a/packages/babel-parser/test/fixtures/flow/declare-export/export-named-pattern/output.json b/packages/babel-parser/test/fixtures/flow/declare-export/export-named-pattern/output.json index dda5b894d12c..c3b63e8c2365 100644 --- a/packages/babel-parser/test/fixtures/flow/declare-export/export-named-pattern/output.json +++ b/packages/babel-parser/test/fixtures/flow/declare-export/export-named-pattern/output.json @@ -1,29 +1,29 @@ { "type": "File", "start": 0, - "end": 45, + "end": 52, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 45 + "line": 2, + "column": 6 } }, "program": { "type": "Program", "start": 0, - "end": 45, + "end": 52, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, - "column": 45 + "line": 2, + "column": 6 } }, "sourceType": "module", @@ -92,7 +92,6 @@ "column": 43 } }, - "declaration": null, "specifiers": [ { "type": "ExportSpecifier", @@ -145,11 +144,63 @@ } ], "source": null, + "declaration": null, "default": false } ] }, "kind": "ES" + }, + { + "type": "VariableDeclaration", + "start": 46, + "end": 52, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 50, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + }, + "id": { + "type": "Identifier", + "start": 50, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + }, + "identifierName": "a" + }, + "name": "a" + }, + "init": null + } + ], + "kind": "var" } ], "directives": [] diff --git a/packages/babel-parser/test/fixtures/flow/type-exports/specifier/input.js b/packages/babel-parser/test/fixtures/flow/type-exports/specifier/input.js index e34ea63759dc..168e2cff4a3e 100644 --- a/packages/babel-parser/test/fixtures/flow/type-exports/specifier/input.js +++ b/packages/babel-parser/test/fixtures/flow/type-exports/specifier/input.js @@ -1 +1,2 @@ +let foo; export type { foo }; diff --git a/packages/babel-parser/test/fixtures/flow/type-exports/specifier/output.json b/packages/babel-parser/test/fixtures/flow/type-exports/specifier/output.json index 4481726d786b..f4d18be8251b 100644 --- a/packages/babel-parser/test/fixtures/flow/type-exports/specifier/output.json +++ b/packages/babel-parser/test/fixtures/flow/type-exports/specifier/output.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 20, + "end": 29, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 20 } }, "program": { "type": "Program", "start": 0, - "end": 20, + "end": 29, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 1, + "line": 2, "column": 20 } }, @@ -30,9 +30,9 @@ "interpreter": null, "body": [ { - "type": "ExportNamedDeclaration", + "type": "VariableDeclaration", "start": 0, - "end": 20, + "end": 8, "loc": { "start": { "line": 1, @@ -40,35 +40,86 @@ }, "end": { "line": 1, + "column": 8 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "init": null + } + ], + "kind": "let" + }, + { + "type": "ExportNamedDeclaration", + "start": 9, + "end": 29, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, "column": 20 } }, "specifiers": [ { "type": "ExportSpecifier", - "start": 14, - "end": 17, + "start": 23, + "end": 26, "loc": { "start": { - "line": 1, + "line": 2, "column": 14 }, "end": { - "line": 1, + "line": 2, "column": 17 } }, "local": { "type": "Identifier", - "start": 14, - "end": 17, + "start": 23, + "end": 26, "loc": { "start": { - "line": 1, + "line": 2, "column": 14 }, "end": { - "line": 1, + "line": 2, "column": 17 }, "identifierName": "foo" @@ -77,15 +128,15 @@ }, "exported": { "type": "Identifier", - "start": 14, - "end": 17, + "start": 23, + "end": 26, "loc": { "start": { - "line": 1, + "line": 2, "column": 14 }, "end": { - "line": 1, + "line": 2, "column": 17 }, "identifierName": "foo" diff --git a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-type-annotations/input.mjs b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-type-annotations/input.mjs index 4be37364cf10..8fdbffd7f814 100644 --- a/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-type-annotations/input.mjs +++ b/packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-type-annotations/input.mjs @@ -99,7 +99,7 @@ import type { imp2, imp3 } from "baz"; import type { foo as imp4 } from "baz"; import type from "foo"; import typeof * as namespace from "bar"; -export type { foo }; +export type { foo1 }; export type { foo2 } from "bar"; import {type T} from "foo"; import {type T2, V1} from "foo"; diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-2/input.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-2/input.mjs index fdbc94275097..97b218259d14 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-2/input.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-2/input.mjs @@ -1 +1,2 @@ export {foo, bar}; +var foo, bar; diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-2/output.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-2/output.mjs index ab82079a7c68..bed82c28410d 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-2/output.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-2/output.mjs @@ -1,12 +1,15 @@ System.register([], function (_export, _context) { "use strict"; + var foo, bar; + + _export({ + foo: void 0, + bar: void 0 + }); + return { setters: [], - execute: function () { - _export("foo", foo); - - _export("bar", bar); - } + execute: function () {} }; }); diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-3/input.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-3/input.mjs index e7820a6f027c..2ad49c002c36 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-3/input.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-3/input.mjs @@ -1 +1,2 @@ export {foo as bar}; +var foo; diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-3/output.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-3/output.mjs index 418e0cea9532..d613ff78b938 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-3/output.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-3/output.mjs @@ -1,10 +1,12 @@ System.register([], function (_export, _context) { "use strict"; + var foo; + + _export("foo", void 0); + return { setters: [], - execute: function () { - _export("bar", foo); - } + execute: function () {} }; }); diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-4/input.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-4/input.mjs index 5d32a24de0a9..974ab55e4371 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-4/input.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-4/input.mjs @@ -1 +1,2 @@ export {foo as default}; +var foo; diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-4/output.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-4/output.mjs index 25834444d127..d613ff78b938 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-4/output.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-4/output.mjs @@ -1,10 +1,12 @@ System.register([], function (_export, _context) { "use strict"; + var foo; + + _export("foo", void 0); + return { setters: [], - execute: function () { - _export("default", foo); - } + execute: function () {} }; }); diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-5/input.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-5/input.mjs index ff57927839e8..f0218dfca8ab 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-5/input.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-5/input.mjs @@ -1 +1,2 @@ export {foo as default, bar}; +var foo, bar; diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-5/output.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-5/output.mjs index bc1c7593c0d4..bed82c28410d 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-5/output.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named-5/output.mjs @@ -1,12 +1,15 @@ System.register([], function (_export, _context) { "use strict"; + var foo, bar; + + _export({ + foo: void 0, + bar: void 0 + }); + return { setters: [], - execute: function () { - _export("default", foo); - - _export("bar", bar); - } + execute: function () {} }; }); diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named/input.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named/input.mjs index df5f5e609e93..ff265b20ef19 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named/input.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named/input.mjs @@ -1 +1,2 @@ export {foo}; +var foo; diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named/output.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named/output.mjs index 0981d53ba56a..d613ff78b938 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named/output.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/export-named/output.mjs @@ -1,10 +1,12 @@ System.register([], function (_export, _context) { "use strict"; + var foo; + + _export("foo", void 0); + return { setters: [], - execute: function () { - _export("foo", foo); - } + execute: function () {} }; }); diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/overview/input.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/overview/input.mjs index 1623f8b61e3a..3e062136f23f 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/overview/input.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/overview/input.mjs @@ -6,7 +6,7 @@ import * as foo2 from "foo"; import {bar} from "foo"; import {foo as bar2} from "foo"; -export {test}; +export {foo}; export var test2 = 5; -export default test; +export default foo; diff --git a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/overview/output.mjs b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/overview/output.mjs index 97f9581aa131..e84b007dcd43 100644 --- a/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/overview/output.mjs +++ b/packages/babel-plugin-transform-modules-systemjs/test/fixtures/systemjs/overview/output.mjs @@ -10,11 +10,11 @@ System.register(["foo", "foo-bar", "./directory/foo-bar"], function (_export, _c bar2 = _foo.foo; }, function (_fooBar) {}, function (_directoryFooBar) {}], execute: function () { - _export("test", test); + _export("foo", foo); _export("test2", test2 = 5); - _export("default", test); + _export("default", foo); } }; }); diff --git a/scripts/tests/flow/flow_tests_whitelist.txt b/scripts/tests/flow/flow_tests_whitelist.txt index c5a154762bb3..4c850ac5271a 100644 --- a/scripts/tests/flow/flow_tests_whitelist.txt +++ b/scripts/tests/flow/flow_tests_whitelist.txt @@ -35,3 +35,6 @@ numbers/underscored_float_whole.js numbers/underscored_hex.js numbers/underscored_number.js numbers/underscored_oct.js +ES6/modules/migrated_0020.js +export_import_reserved_words/migrated_0003.js +export_statements/export_trailing_comma.js diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 0c385c9bc7dc..ea959b580202 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -600,10 +600,6 @@ language/literals/string/unicode-escape-nls-err-double.js(default) language/literals/string/unicode-escape-nls-err-double.js(strict mode) language/literals/string/unicode-escape-nls-err-single.js(default) language/literals/string/unicode-escape-nls-err-single.js(strict mode) -language/module-code/early-export-global.js(default) -language/module-code/early-export-global.js(strict mode) -language/module-code/early-export-unresolvable.js(default) -language/module-code/early-export-unresolvable.js(strict mode) language/module-code/privatename-not-valid-earlyerr-module-1.js(default) language/module-code/privatename-not-valid-earlyerr-module-1.js(strict mode) language/module-code/privatename-not-valid-earlyerr-module-2.js(default) From 5c8cc0d536d2fb074d903d56857823935dd84a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Wed, 27 Feb 2019 00:17:11 +0100 Subject: [PATCH 332/563] =?UTF-8?q?Mark=20FOO=20in=20"var=20{=20x:=20FOO?= =?UTF-8?q?=20}=CB=9D=20as=20a=20binding,=20not=20as=20a=20reference=20(#9?= =?UTF-8?q?492)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/index.js | 13 ++++++- .../misc/import-const-throw/output.js | 24 ++++++++----- .../src/path/lib/virtual-types.js | 11 +++--- .../babel-types/src/validators/isBinding.js | 17 +++++++++- .../src/validators/isReferenced.js | 12 +++++-- packages/babel-types/test/validators.js | 34 +++++++++++++++++++ 6 files changed, 95 insertions(+), 16 deletions(-) diff --git a/packages/babel-plugin-proposal-object-rest-spread/src/index.js b/packages/babel-plugin-proposal-object-rest-spread/src/index.js index c4738f0c6730..1eb8e7b70f90 100644 --- a/packages/babel-plugin-proposal-object-rest-spread/src/index.js +++ b/packages/babel-plugin-proposal-object-rest-spread/src/index.js @@ -2,6 +2,17 @@ import { declare } from "@babel/helper-plugin-utils"; import syntaxObjectRestSpread from "@babel/plugin-syntax-object-rest-spread"; import { types as t } from "@babel/core"; +// TODO: Remove in Babel 8 +// @babel/types <=7.3.3 counts FOO as referenced in var { x: FOO }. +// We need to detect this bug to know if "unused" means 0 or 1 references. +const ZERO_REFS = (() => { + const node = t.identifier("a"); + const property = t.objectProperty(t.identifier("key"), node); + const pattern = t.objectPattern([property]); + + return t.isReferenced(node, property, pattern) ? 1 : 0; +})(); + export default declare((api, opts) => { api.assertVersion(7); @@ -98,7 +109,7 @@ export default declare((api, opts) => { Object.keys(bindings).forEach(bindingName => { const bindingParentPath = bindings[bindingName].parentPath; if ( - path.scope.getBinding(bindingName).references > 1 || + path.scope.getBinding(bindingName).references > ZERO_REFS || !bindingParentPath.isObjectProperty() ) { return; diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/misc/import-const-throw/output.js b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/misc/import-const-throw/output.js index 7b05f0c82458..01984ae47f96 100644 --- a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/misc/import-const-throw/output.js +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/misc/import-const-throw/output.js @@ -18,24 +18,32 @@ _baz.Baz = (44, function () { throw new Error('"' + "Baz" + '" is read-only.'); }()); ({ - Foo: _foo.default -} = {}); + Foo +} = ({}, function () { + throw new Error('"' + "Foo" + '" is read-only.'); +}())); ({ Bar } = ({}, function () { throw new Error('"' + "Bar" + '" is read-only.'); }())); ({ - Baz: _baz.Baz -} = {}); + Baz +} = ({}, function () { + throw new Error('"' + "Baz" + '" is read-only.'); +}())); ({ - prop: _foo.default -} = {}); + prop: Foo +} = ({}, function () { + throw new Error('"' + "Foo" + '" is read-only.'); +}())); ({ prop: Bar } = ({}, function () { throw new Error('"' + "Bar" + '" is read-only.'); }())); ({ - prop: _baz.Baz -} = {}); + prop: Baz +} = ({}, function () { + throw new Error('"' + "Baz" + '" is read-only.'); +}())); diff --git a/packages/babel-traverse/src/path/lib/virtual-types.js b/packages/babel-traverse/src/path/lib/virtual-types.js index 35319f6ee894..97cec0e3af99 100644 --- a/packages/babel-traverse/src/path/lib/virtual-types.js +++ b/packages/babel-traverse/src/path/lib/virtual-types.js @@ -4,7 +4,8 @@ import * as t from "@babel/types"; export const ReferencedIdentifier = { types: ["Identifier", "JSXIdentifier"], - checkPath({ node, parent }: NodePath, opts?: Object): boolean { + checkPath(path: NodePath, opts?: Object): boolean { + const { node, parent } = path; if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) { if (t.isJSXIdentifier(node, opts)) { if (react.isCompatTag(node.name)) return false; @@ -15,7 +16,7 @@ export const ReferencedIdentifier = { } // check if node is referenced - return t.isReferenced(node, parent); + return t.isReferenced(node, parent, path.parentPath.parent); }, }; @@ -28,8 +29,10 @@ export const ReferencedMemberExpression = { export const BindingIdentifier = { types: ["Identifier"], - checkPath({ node, parent }: NodePath): boolean { - return t.isIdentifier(node) && t.isBinding(node, parent); + checkPath(path: NodePath): boolean { + const { node, parent } = path; + const grandparent = path.parentPath.parent; + return t.isIdentifier(node) && t.isBinding(node, parent, grandparent); }, }; diff --git a/packages/babel-types/src/validators/isBinding.js b/packages/babel-types/src/validators/isBinding.js index b1719a3b3802..234da4f6ec33 100644 --- a/packages/babel-types/src/validators/isBinding.js +++ b/packages/babel-types/src/validators/isBinding.js @@ -3,7 +3,22 @@ import getBindingIdentifiers from "../retrievers/getBindingIdentifiers"; /** * Check if the input `node` is a binding identifier. */ -export default function isBinding(node: Object, parent: Object): boolean { +export default function isBinding( + node: Object, + parent: Object, + grandparent?: Object, +): boolean { + if ( + grandparent && + node.type === "Identifier" && + parent.type === "ObjectProperty" && + grandparent.type === "ObjectExpression" + ) { + // We need to special-case this, because getBindingIdentifiers + // has an ObjectProperty->value entry for destructuring patterns. + return false; + } + const keys = getBindingIdentifiers.keys[parent.type]; if (keys) { for (let i = 0; i < keys.length; i++) { diff --git a/packages/babel-types/src/validators/isReferenced.js b/packages/babel-types/src/validators/isReferenced.js index b629e625ee4d..6a5a3ebc8ed3 100644 --- a/packages/babel-types/src/validators/isReferenced.js +++ b/packages/babel-types/src/validators/isReferenced.js @@ -2,7 +2,11 @@ /** * Check if the input `node` is a reference to a bound variable. */ -export default function isReferenced(node: Object, parent: Object): boolean { +export default function isReferenced( + node: Object, + parent: Object, + grandparent?: Object, +): boolean { switch (parent.type) { // yes: PARENT[NODE] // yes: NODE.child @@ -37,6 +41,7 @@ export default function isReferenced(node: Object, parent: Object): boolean { // yes: { [NODE]: "" } // no: { NODE: "" } // depends: { NODE } + // depends: { key: NODE } case "ObjectProperty": // no: class { NODE = value; } // yes: class { [NODE] = value; } @@ -51,7 +56,10 @@ export default function isReferenced(node: Object, parent: Object): boolean { if (parent.key === node) { return !!parent.computed; } - return parent.value === node; + if (parent.value === node) { + return !grandparent || grandparent.type !== "ObjectPattern"; + } + return true; // no: class NODE {} // yes: class Foo extends NODE {} diff --git a/packages/babel-types/test/validators.js b/packages/babel-types/test/validators.js index ce4740288105..8e1f18e11545 100644 --- a/packages/babel-types/test/validators.js +++ b/packages/babel-types/test/validators.js @@ -121,6 +121,40 @@ describe("validators", function() { expect(t.isReferenced(node, parent)).toBe(true); }); + + it("returns true if node id a value of ObjectProperty of an expression", function() { + const node = t.identifier("a"); + const parent = t.objectProperty(t.identifier("key"), node); + const grandparent = t.objectExpression([parent]); + + expect(t.isReferenced(node, parent, grandparent)).toBe(true); + }); + + it("returns false if node id a value of ObjectProperty of a pattern", function() { + const node = t.identifier("a"); + const parent = t.objectProperty(t.identifier("key"), node); + const grandparent = t.objectPattern([parent]); + + expect(t.isReferenced(node, parent, grandparent)).toBe(false); + }); + }); + + describe("isBinding", function() { + it("returns false if node id a value of ObjectProperty of an expression", function() { + const node = t.identifier("a"); + const parent = t.objectProperty(t.identifier("key"), node); + const grandparent = t.objectExpression([parent]); + + expect(t.isBinding(node, parent, grandparent)).toBe(false); + }); + + it("returns true if node id a value of ObjectProperty of a pattern", function() { + const node = t.identifier("a"); + const parent = t.objectProperty(t.identifier("key"), node); + const grandparent = t.objectPattern([parent]); + + expect(t.isBinding(node, parent, grandparent)).toBe(true); + }); }); describe("isType", function() { From 9aec606c69b04a4617eb85242b9ffb7229d7379a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 28 Feb 2019 00:34:48 +0100 Subject: [PATCH 333/563] Don't loose "this" in helper-call-delegate (#9601) --- .../babel-helper-call-delegate/src/index.js | 2 +- .../parameters/iife-this-9385/input.mjs | 6 ++++ .../parameters/iife-this-9385/options.json | 4 +++ .../parameters/iife-this-9385/output.js | 35 +++++++++++++++++++ .../fixtures/parameters/iife-this/input.js | 8 +++++ .../fixtures/parameters/iife-this/output.js | 23 ++++++++++++ 6 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/input.mjs create mode 100644 packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/options.json create mode 100644 packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/output.js create mode 100644 packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this/input.js create mode 100644 packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this/output.js diff --git a/packages/babel-helper-call-delegate/src/index.js b/packages/babel-helper-call-delegate/src/index.js index 8aee0276132c..d4bf041d0131 100644 --- a/packages/babel-helper-call-delegate/src/index.js +++ b/packages/babel-helper-call-delegate/src/index.js @@ -41,7 +41,7 @@ export default function(path: NodePath, scope = path.scope) { path.traverse(visitor, state); - if (state.foundArguments) { + if (state.foundArguments || state.foundThis) { callee = t.memberExpression(container, t.identifier("apply")); args = []; diff --git a/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/input.mjs b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/input.mjs new file mode 100644 index 000000000000..971a693e6b72 --- /dev/null +++ b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/input.mjs @@ -0,0 +1,6 @@ +export class Test { + invite(options: { privacy: string } = {}) { + const privacy = options.privacy || "Private" + console.log(this) + } +} \ No newline at end of file diff --git a/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/options.json b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/options.json new file mode 100644 index 000000000000..cc760c8a6ca5 --- /dev/null +++ b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["transform-typescript"], + "presets": ["env"] +} diff --git a/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/output.js b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/output.js new file mode 100644 index 000000000000..0268eef274c1 --- /dev/null +++ b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/output.js @@ -0,0 +1,35 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Test = void 0; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var Test = +/*#__PURE__*/ +function () { + function Test() { + _classCallCheck(this, Test); + } + + _createClass(Test, [{ + key: "invite", + value: function invite() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return function () { + var privacy = options.privacy || "Private"; + console.log(this); + }.apply(this); + } + }]); + + return Test; +}(); + +exports.Test = Test; diff --git a/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this/input.js b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this/input.js new file mode 100644 index 000000000000..b25022747087 --- /dev/null +++ b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this/input.js @@ -0,0 +1,8 @@ +var a; + +class Test { + invite(p = a) { + let a; + this; + } +} \ No newline at end of file diff --git a/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this/output.js b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this/output.js new file mode 100644 index 000000000000..d199a0d7866f --- /dev/null +++ b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this/output.js @@ -0,0 +1,23 @@ +var a; + +var Test = +/*#__PURE__*/ +function () { + "use strict"; + + function Test() { + babelHelpers.classCallCheck(this, Test); + } + + babelHelpers.createClass(Test, [{ + key: "invite", + value: function invite() { + var p = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : a; + return function () { + var a; + this; + }.apply(this); + } + }]); + return Test; +}(); From 5cb280f986bdbb56f09adc89bc59422880d79352 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Wed, 27 Feb 2019 15:53:28 -0800 Subject: [PATCH 334/563] Fix scope check for 2nd+ lexical bindings (#9600) --- packages/babel-parser/src/util/scope.js | 3 +-- .../core/scope/dupl-bind-2nd-lvl-lex-nested/input.js | 5 +++++ .../core/scope/dupl-bind-2nd-lvl-lex-nested/options.json | 3 +++ .../test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/input.js | 3 +++ .../fixtures/core/scope/dupl-bind-2nd-lvl-lex/options.json | 3 +++ .../core/scope/dupl-bind-2nd-lvl-var-nested/input.js | 5 +++++ .../core/scope/dupl-bind-2nd-lvl-var-nested/options.json | 3 +++ .../test/fixtures/core/scope/dupl-bind-2nd-lvl-var/input.js | 3 +++ .../fixtures/core/scope/dupl-bind-2nd-lvl-var/options.json | 3 +++ 9 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/options.json create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/input.js create mode 100644 packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/options.json diff --git a/packages/babel-parser/src/util/scope.js b/packages/babel-parser/src/util/scope.js index 8d9e08b1a816..a9cf9d89edea 100644 --- a/packages/babel-parser/src/util/scope.js +++ b/packages/babel-parser/src/util/scope.js @@ -117,8 +117,7 @@ export default class ScopeHandler { const scope = this.scopeStack[i]; if ( (scope.lexical.indexOf(name) > -1 && - !(scope.flags & SCOPE_SIMPLE_CATCH) && - scope.lexical[0] === name) || + !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical[0] === name)) || (!this.treatFunctionsAsVarInScope(scope) && scope.functions.indexOf(name) > -1) ) { diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/input.js new file mode 100644 index 000000000000..9c289f87c3ee --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/input.js @@ -0,0 +1,5 @@ +{ + let bar; + var foo = 1; + let foo = 1; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/options.json new file mode 100644 index 000000000000..b09098cda9c8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex-nested/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (4:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/input.js new file mode 100644 index 000000000000..512f6888653d --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/input.js @@ -0,0 +1,3 @@ +let bar; +var foo = 1; +let foo = 1; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/options.json new file mode 100644 index 000000000000..37dd7bff7207 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-lex/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (3:4)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/input.js new file mode 100644 index 000000000000..59ae63e301b7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/input.js @@ -0,0 +1,5 @@ +{ + let bar; + let foo = 1; + var foo = 1; +} diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/options.json new file mode 100644 index 000000000000..b09098cda9c8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var-nested/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (4:6)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/input.js b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/input.js new file mode 100644 index 000000000000..aebd03c05710 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/input.js @@ -0,0 +1,3 @@ +let bar; +let foo = 1; +var foo = 1; diff --git a/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/options.json b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/options.json new file mode 100644 index 000000000000..37dd7bff7207 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/scope/dupl-bind-2nd-lvl-var/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Identifier 'foo' has already been declared (3:4)" +} \ No newline at end of file From 208195f42576a70798cedf1abe4d9f1d86979fcc Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Wed, 27 Feb 2019 15:54:07 -0800 Subject: [PATCH 335/563] Disallow duplicate params in methods (#9599) * Disallow duplicate params in methods * Fix plugins --- packages/babel-parser/src/parser/expression.js | 13 +++++++++---- packages/babel-parser/src/plugins/estree.js | 8 ++++++-- packages/babel-parser/src/plugins/flow.js | 13 +++++++++---- packages/babel-parser/src/plugins/typescript.js | 3 ++- .../disallow-duplicate-method-params/input.js | 3 +++ .../disallow-duplicate-method-params/options.json | 3 +++ .../disallow-duplicate-method-params/input.js | 3 +++ .../disallow-duplicate-method-params/options.json | 3 +++ scripts/tests/test262/test262_whitelist.txt | 2 -- 9 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/options.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index df72050b7f4d..63c5cbe0bb2a 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -1740,7 +1740,7 @@ export default class ExpressionParser extends LValParser { ); this.parseFunctionParams((node: any), allowModifiers); this.checkYieldAwaitInDefaultParams(); - this.parseFunctionBodyAndFinish(node, type); + this.parseFunctionBodyAndFinish(node, type, true); this.state.yieldPos = oldYieldPos; this.state.awaitPos = oldAwaitPos; @@ -1804,14 +1804,19 @@ export default class ExpressionParser extends LValParser { parseFunctionBodyAndFinish( node: N.BodilessFunctionOrMethodBase, type: string, + isMethod?: boolean = false, ): void { // $FlowIgnore (node is not bodiless if we get here) - this.parseFunctionBody(node); + this.parseFunctionBody(node, false, isMethod); this.finishNode(node, type); } // Parse function body and check parameters. - parseFunctionBody(node: N.Function, allowExpression: ?boolean): void { + parseFunctionBody( + node: N.Function, + allowExpression: ?boolean, + isMethod?: boolean = false, + ): void { const isExpression = allowExpression && !this.match(tt.braceL); const oldStrict = this.state.strict; let useStrict = false; @@ -1853,7 +1858,7 @@ export default class ExpressionParser extends LValParser { // if a let/const declaration in the function clashes with one of the params. this.checkParams( node, - !oldStrict && !useStrict && !allowExpression && !nonSimple, + !oldStrict && !useStrict && !allowExpression && !isMethod && !nonSimple, allowExpression, ); node.body = this.parseBlock(true, false); diff --git a/packages/babel-parser/src/plugins/estree.js b/packages/babel-parser/src/plugins/estree.js index 0a5a276a2bf0..07891f3086ae 100644 --- a/packages/babel-parser/src/plugins/estree.js +++ b/packages/babel-parser/src/plugins/estree.js @@ -259,8 +259,12 @@ export default (superClass: Class): Class => return node; } - parseFunctionBody(node: N.Function, allowExpression: ?boolean): void { - super.parseFunctionBody(node, allowExpression); + parseFunctionBody( + node: N.Function, + allowExpression: ?boolean, + isMethod?: boolean = false, + ): void { + super.parseFunctionBody(node, allowExpression, isMethod); node.expression = node.body.type !== "BlockStatement"; } diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index f76f043c4b1a..80961e09380b 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -1544,19 +1544,24 @@ export default (superClass: Class): Class => // Overrides // ================================== - parseFunctionBody(node: N.Function, allowExpressionBody: ?boolean): void { + parseFunctionBody( + node: N.Function, + allowExpressionBody: ?boolean, + isMethod?: boolean = false, + ): void { if (allowExpressionBody) { return this.forwardNoArrowParamsConversionAt(node, () => - super.parseFunctionBody(node, true), + super.parseFunctionBody(node, true, isMethod), ); } - return super.parseFunctionBody(node, false); + return super.parseFunctionBody(node, false, isMethod); } parseFunctionBodyAndFinish( node: N.BodilessFunctionOrMethodBase, type: string, + isMethod?: boolean = false, ): void { if (this.match(tt.colon)) { const typeNode = this.startNode(); @@ -1573,7 +1578,7 @@ export default (superClass: Class): Class => : null; } - super.parseFunctionBodyAndFinish(node, type); + super.parseFunctionBodyAndFinish(node, type, isMethod); } // interfaces diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 4973d1f6be4f..c51153661358 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -1472,6 +1472,7 @@ export default (superClass: Class): Class => parseFunctionBodyAndFinish( node: N.BodilessFunctionOrMethodBase, type: string, + isMethod?: boolean = false, ): void { if (this.match(tt.colon)) { node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon); @@ -1488,7 +1489,7 @@ export default (superClass: Class): Class => return; } - super.parseFunctionBodyAndFinish(node, type); + super.parseFunctionBodyAndFinish(node, type, isMethod); } parseSubscript( diff --git a/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/input.js b/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/input.js new file mode 100644 index 000000000000..101e2b77cc79 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/input.js @@ -0,0 +1,3 @@ +class Foo { + bar(a, a) {} +} diff --git a/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/options.json b/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/options.json new file mode 100644 index 000000000000..c7a2c3ba50a0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class-methods/disallow-duplicate-method-params/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Argument name clash (2:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/input.js b/packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/input.js new file mode 100644 index 000000000000..b916cd4df9b4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/input.js @@ -0,0 +1,3 @@ +({ + bar(a, a) {} +}) diff --git a/packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/options.json b/packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/options.json new file mode 100644 index 000000000000..c7a2c3ba50a0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/object/disallow-duplicate-method-params/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Argument name clash (2:11)" +} \ No newline at end of file diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index ea959b580202..2dc847d203a6 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -406,10 +406,8 @@ language/expressions/class/elements/syntax/early-errors/invalid-names/method-out language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(strict mode) language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(default) language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(strict mode) -language/expressions/object/method-definition/early-errors-object-async-method-duplicate-parameters.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(default) language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(strict mode) -language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js(default) language/expressions/object/method-definition/private-name-early-error-async-fn-inside-class.js(default) language/expressions/object/method-definition/private-name-early-error-async-fn-inside-class.js(strict mode) language/expressions/object/method-definition/private-name-early-error-async-gen-inside-class.js(default) From 98ab1b6428e797088bb6245f81963dae174be2f5 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Thu, 28 Feb 2019 11:42:12 -0800 Subject: [PATCH 336/563] Refactor parsing object members (#9607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor parsing object members * Ensure decorators on rest don’t swallow decorators silently * Use hasPrecedingLineBreak * Add test for async with linebreak * Update flow whitelist --- .../babel-parser/src/parser/expression.js | 201 ++++++++++-------- packages/babel-parser/src/parser/lval.js | 35 +-- packages/babel-parser/src/plugins/estree.js | 14 +- .../babel-parser/src/plugins/typescript.js | 2 +- .../core/uncategorised/396/options.json | 2 +- .../core/uncategorised/555/options.json | 2 +- .../comma-after-rest/options.json | 2 +- .../invalid-location/options.json | 2 +- .../comma-after-rest-param/options.json | 2 +- .../invalid-rest-in-params/options.json | 2 +- .../object/async-method-linebreak/input.js | 4 + .../async-method-linebreak/options.json | 3 + .../es2015/uncategorised/277/options.json | 2 +- .../es2015/uncategorised/283/options.json | 2 +- .../es2015/uncategorised/353/input.js | 1 - .../es2015/uncategorised/353/options.json | 3 - .../options.json | 2 +- .../es2018/object-rest-spread/16/options.json | 2 +- .../es2018/object-rest-spread/17/options.json | 2 +- .../es2018/object-rest-spread/19/options.json | 2 +- .../es2018/object-rest-spread/20/options.json | 2 +- .../es2018/object-rest-spread/22/options.json | 2 +- .../es2018/object-rest-spread/23/options.json | 2 +- .../es2018/object-rest-spread/25/options.json | 2 +- .../es2018/object-rest-spread/26/options.json | 2 +- .../es2018/object-rest-spread/7/options.json | 2 +- .../es2018/object-rest-spread/8/options.json | 2 +- .../es2018/object-rest-spread/9/options.json | 2 +- .../comma-after-rest/options.json | 2 +- .../options.json | 2 +- .../arrow-with-multiple-rest/options.json | 2 +- .../options.json | 3 - .../options.json | 3 - .../options.json | 3 - .../options.json | 3 - .../invalid-proto-shorthands/options.json | 3 - .../input.js | 0 .../proto-identifier-shorthand/output.json | 176 +++++++++++++++ .../input.js | 0 .../proto-literal-shorthand/output.json | 179 ++++++++++++++++ .../input.js | 0 .../proto-shorthand-identifier/output.json | 176 +++++++++++++++ .../input.js | 0 .../proto-shorthand-literal/output.json | 179 ++++++++++++++++ .../input.js | 0 .../proto-shorthands/output.json | 181 ++++++++++++++++ .../invalid-syntax/migrated_0258/options.json | 2 +- .../types/tuple-rest-invalid/options.json | 2 +- scripts/tests/flow/flow_tests_whitelist.txt | 1 - .../test262/run_babel_parser_test262_utils.js | 2 +- scripts/tests/test262/test262_whitelist.txt | 5 - 51 files changed, 1054 insertions(+), 173 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/options.json delete mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/353/input.js delete mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/353/options.json delete mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json delete mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json delete mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json delete mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json delete mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json rename packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-identifier-shorthand => proto-identifier-shorthand}/input.js (100%) create mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-shorthand/output.json rename packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-literal-shorthand => proto-literal-shorthand}/input.js (100%) create mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-literal-shorthand/output.json rename packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthand-identifier => proto-shorthand-identifier}/input.js (100%) create mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-identifier/output.json rename packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthand-literal => proto-shorthand-literal}/input.js (100%) create mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-literal/output.json rename packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/{invalid-proto-shorthands => proto-shorthands}/input.js (100%) create mode 100644 packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthands/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 63c5cbe0bb2a..9b05a76d560f 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -67,10 +67,18 @@ export default class ExpressionParser extends LValParser { // strict mode, init properties are also not allowed to be repeated. checkPropClash( - prop: N.ObjectMember, + prop: N.ObjectMember | N.SpreadElement, propHash: { [key: string]: boolean }, ): void { - if (prop.computed || prop.kind) return; + if ( + prop.type === "SpreadElement" || + prop.computed || + prop.kind || + // $FlowIgnore + prop.shorthand + ) { + return; + } const key = prop.key; // It is either an Identifier or a String/NumericLiteral @@ -197,13 +205,10 @@ export default class ExpressionParser extends LValParser { this.checkLVal(left, undefined, undefined, "assignment expression"); let patternErrorMsg; - let elementName; if (left.type === "ObjectPattern") { patternErrorMsg = "`({a}) = 0` use `({a} = 0)`"; - elementName = "property"; } else if (left.type === "ArrayPattern") { patternErrorMsg = "`([a]) = 0` use `([a] = 0)`"; - elementName = "element"; } if (patternErrorMsg && left.extra && left.extra.parenthesized) { @@ -213,7 +218,7 @@ export default class ExpressionParser extends LValParser { ); } - if (elementName) this.checkCommaAfterRestFromSpread(elementName); + if (patternErrorMsg) this.checkCommaAfterRestFromSpread(); this.state.commaAfterSpreadAt = oldCommaAfterSpreadAt; this.next(); @@ -639,7 +644,7 @@ export default class ExpressionParser extends LValParser { if (possibleAsync && this.shouldParseAsyncArrow()) { state.stop = true; - this.checkCommaAfterRestFromSpread("parameter"); + this.checkCommaAfterRestFromSpread(); node = this.parseAsyncArrowFromCallExpression( this.startNodeAt(startPos, startLoc), @@ -1207,13 +1212,13 @@ export default class ExpressionParser extends LValParser { spreadStart = this.state.start; exprList.push( this.parseParenItem( - this.parseRest(), + this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc, ), ); - this.checkCommaAfterRest(tt.parenR, "parameter"); + this.checkCommaAfterRest(); break; } else { @@ -1409,7 +1414,6 @@ export default class ExpressionParser extends LValParser { isPattern: boolean, refShorthandDefaultPos?: ?Pos, ): T { - let decorators = []; const propHash: any = Object.create(null); let first = true; const node = this.startNode(); @@ -1425,108 +1429,117 @@ export default class ExpressionParser extends LValParser { if (this.eat(tt.braceR)) break; } - if (this.match(tt.at)) { - if (this.hasPlugin("decorators")) { - this.raise( - this.state.start, - "Stage 2 decorators disallow object literal property decorators", - ); - } else { - // we needn't check if decorators (stage 0) plugin is enabled since it's checked by - // the call to this.parseDecorator - while (this.match(tt.at)) { - decorators.push(this.parseDecorator()); - } - } - } + const prop = this.parseObjectMember(isPattern, refShorthandDefaultPos); + // $FlowIgnore RestElement will never be returned if !isPattern + if (!isPattern) this.checkPropClash(prop, propHash); - let prop = this.startNode(), - isGenerator = false, - isAsync = false, - startPos, - startLoc; - if (decorators.length) { - prop.decorators = decorators; - decorators = []; - } - - if (this.match(tt.ellipsis)) { - prop = this.parseSpread(isPattern ? { start: 0 } : undefined); - node.properties.push(prop); - if (isPattern) { - this.toAssignable(prop, true, "object pattern"); - this.checkCommaAfterRest(tt.braceR, "property"); - this.expect(tt.braceR); - break; - } - continue; - } - - prop.method = false; - - if (isPattern || refShorthandDefaultPos) { - startPos = this.state.start; - startLoc = this.state.startLoc; + // $FlowIgnore + if (prop.shorthand) { + this.addExtra(prop, "shorthand", true); } - if (!isPattern) { - isGenerator = this.eat(tt.star); - } + node.properties.push(prop); + } - const containsEsc = this.state.containsEsc; + return this.finishNode( + node, + isPattern ? "ObjectPattern" : "ObjectExpression", + ); + } - if (!isPattern && this.isContextual("async")) { - if (isGenerator) this.unexpected(); + isAsyncProp(prop: N.ObjectProperty): boolean { + return ( + !prop.computed && + prop.key.type === "Identifier" && + prop.key.name === "async" && + (this.match(tt.name) || + this.match(tt.num) || + this.match(tt.string) || + this.match(tt.bracketL) || + this.state.type.keyword || + this.match(tt.star)) && + !this.hasPrecedingLineBreak() + ); + } - const asyncId = this.parseIdentifier(); - if ( - this.match(tt.colon) || - this.match(tt.parenL) || - this.match(tt.braceR) || - this.match(tt.eq) || - this.match(tt.comma) - ) { - prop.key = asyncId; - prop.computed = false; - } else { - isAsync = true; - isGenerator = this.eat(tt.star); - this.parsePropertyName(prop); - } + parseObjectMember( + isPattern: boolean, + refShorthandDefaultPos: ?Pos, + ): N.ObjectMember | N.SpreadElement | N.RestElement { + let decorators = []; + if (this.match(tt.at)) { + if (this.hasPlugin("decorators")) { + this.raise( + this.state.start, + "Stage 2 decorators disallow object literal property decorators", + ); } else { - this.parsePropertyName(prop); + // we needn't check if decorators (stage 0) plugin is enabled since it's checked by + // the call to this.parseDecorator + while (this.match(tt.at)) { + decorators.push(this.parseDecorator()); + } } + } - this.parseObjPropValue( - prop, - startPos, - startLoc, - isGenerator, - isAsync, - isPattern, - refShorthandDefaultPos, - containsEsc, - ); - this.checkPropClash(prop, propHash); + const prop = this.startNode(); + let isGenerator = false; + let isAsync = false; + let startPos; + let startLoc; - if (prop.shorthand) { - this.addExtra(prop, "shorthand", true); + if (this.match(tt.ellipsis)) { + if (decorators.length) this.unexpected(); + if (isPattern) { + this.next(); + // Don't use parseRestBinding() as we only allow Identifier here. + prop.argument = this.parseIdentifier(); + this.checkCommaAfterRest(); + return this.finishNode(prop, "RestElement"); } - node.properties.push(prop); + return this.parseSpread(); } if (decorators.length) { - this.raise( - this.state.start, - "You have trailing decorators with no property", - ); + prop.decorators = decorators; + decorators = []; } - return this.finishNode( - node, - isPattern ? "ObjectPattern" : "ObjectExpression", + prop.method = false; + + if (isPattern || refShorthandDefaultPos) { + startPos = this.state.start; + startLoc = this.state.startLoc; + } + + if (!isPattern) { + isGenerator = this.eat(tt.star); + } + + const containsEsc = this.state.containsEsc; + this.parsePropertyName(prop); + + if (!isPattern && !containsEsc && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.eat(tt.star); + this.parsePropertyName(prop); + } else { + isAsync = false; + } + + this.parseObjPropValue( + prop, + startPos, + startLoc, + isGenerator, + isAsync, + isPattern, + refShorthandDefaultPos, + containsEsc, ); + + return prop; } isGetterOrSetterMethod(prop: N.ObjectMethod, isPattern: boolean): boolean { diff --git a/packages/babel-parser/src/parser/lval.js b/packages/babel-parser/src/parser/lval.js index 1711b7ae7d81..dd02c8c97441 100644 --- a/packages/babel-parser/src/parser/lval.js +++ b/packages/babel-parser/src/parser/lval.js @@ -122,7 +122,7 @@ export default class LValParser extends NodeUtils { this.raise(prop.key.start, error); } else if (prop.type === "SpreadElement" && !isLast) { - this.raiseRestNotLast(prop.start, "property"); + this.raiseRestNotLast(prop.start); } else { this.toAssignable(prop, isBinding, "object destructuring pattern"); } @@ -160,7 +160,7 @@ export default class LValParser extends NodeUtils { if (elt) { this.toAssignable(elt, isBinding, contextDescription); if (elt.type === "RestElement") { - this.raiseRestNotLast(elt.start, "element"); + this.raiseRestNotLast(elt.start); } } } @@ -213,7 +213,7 @@ export default class LValParser extends NodeUtils { return this.finishNode(node, "SpreadElement"); } - parseRest(): RestElement { + parseRestBinding(): RestElement { const node = this.startNode(); this.next(); node.argument = this.parseBindingAtom(); @@ -260,13 +260,8 @@ export default class LValParser extends NodeUtils { } else if (this.eat(close)) { break; } else if (this.match(tt.ellipsis)) { - elts.push(this.parseAssignableListItemTypes(this.parseRest())); - this.checkCommaAfterRest( - close, - this.scope.inFunction && this.state.inParameters - ? "parameter" - : "element", - ); + elts.push(this.parseAssignableListItemTypes(this.parseRestBinding())); + this.checkCommaAfterRest(); this.expect(close); break; } else { @@ -441,27 +436,19 @@ export default class LValParser extends NodeUtils { } } - checkCommaAfterRest(close: TokenType, kind: string): void { + checkCommaAfterRest(): void { if (this.match(tt.comma)) { - if (this.lookahead().type === close) { - this.raiseCommaAfterRest(this.state.start, kind); - } else { - this.raiseRestNotLast(this.state.start, kind); - } + this.raiseRestNotLast(this.state.start); } } - checkCommaAfterRestFromSpread(kind: string): void { + checkCommaAfterRestFromSpread(): void { if (this.state.commaAfterSpreadAt > -1) { - this.raiseCommaAfterRest(this.state.commaAfterSpreadAt, kind); + this.raiseRestNotLast(this.state.commaAfterSpreadAt); } } - raiseCommaAfterRest(pos: number, kind: string) { - this.raise(pos, `A trailing comma is not permitted after the rest ${kind}`); - } - - raiseRestNotLast(pos: number, kind: string) { - this.raise(pos, `The rest ${kind} must be the last ${kind}`); + raiseRestNotLast(pos: number) { + this.raise(pos, `Rest element must be last element`); } } diff --git a/packages/babel-parser/src/plugins/estree.js b/packages/babel-parser/src/plugins/estree.js index 07891f3086ae..38e7e2e01cdd 100644 --- a/packages/babel-parser/src/plugins/estree.js +++ b/packages/babel-parser/src/plugins/estree.js @@ -126,16 +126,24 @@ export default (superClass: Class): Class => } checkPropClash( - prop: N.ObjectMember, + prop: N.ObjectMember | N.SpreadElement, propHash: { [key: string]: boolean }, ): void { - if (prop.computed || !isSimpleProperty(prop)) return; + if ( + prop.type === "SpreadElement" || + prop.computed || + prop.method || + // $FlowIgnore + prop.shorthand + ) { + return; + } const key = prop.key; // It is either an Identifier or a String/NumericLiteral const name = key.type === "Identifier" ? key.name : String(key.value); - if (name === "__proto__") { + if (name === "__proto__" && prop.kind === "init") { if (propHash.proto) { this.raise(key.start, "Redefinition of __proto__ property"); } diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index c51153661358..7bc3623d78fe 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -570,7 +570,7 @@ export default (superClass: Class): Class => const restNode: N.TsRestType = this.startNode(); this.next(); // skips ellipsis restNode.typeAnnotation = this.tsParseType(); - this.checkCommaAfterRest(tt.bracketR, "type"); + this.checkCommaAfterRest(); return this.finishNode(restNode, "TSRestType"); } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/396/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/396/options.json index 029befcedaa1..2e1b1cc3aa43 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/396/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/396/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest parameter must be the last parameter (1:18)" + "throws": "Rest element must be last element (1:18)" } diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/555/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/555/options.json index baad06556ff8..c1c6450ba3c0 100644 --- a/packages/babel-parser/test/fixtures/core/uncategorised/555/options.json +++ b/packages/babel-parser/test/fixtures/core/uncategorised/555/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest parameter must be the last parameter (3:13)" + "throws": "Rest element must be last element (3:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/options.json b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/options.json index a85e470aeb8b..daa827f45cc4 100644 --- a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/options.json +++ b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/comma-after-rest/options.json @@ -1,3 +1,3 @@ { - "throws": "A trailing comma is not permitted after the rest element (1:5)" + "throws": "Rest element must be last element (1:5)" } diff --git a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json index 083dcaaa2cb0..0dac59b7a808 100644 --- a/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json +++ b/packages/babel-parser/test/fixtures/es2015/array-rest-spread/invalid-location/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest element must be the last element (1:1)" + "throws": "Rest element must be last element (1:1)" } diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/options.json b/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/options.json index d866b41af70c..65ed8c638978 100644 --- a/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/options.json +++ b/packages/babel-parser/test/fixtures/es2015/arrow-functions/comma-after-rest-param/options.json @@ -1,3 +1,3 @@ { - "throws": "A trailing comma is not permitted after the rest parameter (1:8)" + "throws": "Rest element must be last element (1:8)" } diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/options.json b/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/options.json index baad06556ff8..c1c6450ba3c0 100644 --- a/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/options.json +++ b/packages/babel-parser/test/fixtures/es2015/arrow-functions/invalid-rest-in-params/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest parameter must be the last parameter (3:13)" + "throws": "Rest element must be last element (3:13)" } diff --git a/packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/input.js b/packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/input.js new file mode 100644 index 000000000000..f50ae43d068a --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/input.js @@ -0,0 +1,4 @@ +({ + async + foo() {} +}) diff --git a/packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/options.json b/packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/options.json new file mode 100644 index 000000000000..978486d6a57c --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/object/async-method-linebreak/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \",\" (3:4)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/277/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/277/options.json index 029befcedaa1..2e1b1cc3aa43 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/277/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/277/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest parameter must be the last parameter (1:18)" + "throws": "Rest element must be last element (1:18)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/283/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/283/options.json index 3ead3a4299f8..daa827f45cc4 100644 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/283/options.json +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/283/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest parameter must be the last parameter (1:5)" + "throws": "Rest element must be last element (1:5)" } diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/353/input.js b/packages/babel-parser/test/fixtures/es2015/uncategorised/353/input.js deleted file mode 100644 index 727c567cc1bd..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/353/input.js +++ /dev/null @@ -1 +0,0 @@ -({ __proto__, __proto__: 2 }) \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/353/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/353/options.json deleted file mode 100644 index a8b5ad2f5b20..000000000000 --- a/packages/babel-parser/test/fixtures/es2015/uncategorised/353/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Redefinition of __proto__ property (1:14)" -} diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/options.json index 231d5fccd5ff..f686fb60b45e 100644 --- a/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/options.json +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/params-invalid-rest-trailing-comma/options.json @@ -1,3 +1,3 @@ { - "throws": "A trailing comma is not permitted after the rest parameter (1:11)" + "throws": "Rest element must be last element (1:11)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/options.json index f65c23001ff1..9ce9658f7dfa 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/16/options.json @@ -1,3 +1,3 @@ { - "throws": "Invalid rest operator's argument (1:8)" + "throws": "Unexpected token (1:8)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/options.json index bf0116a7b09f..2a28555f76db 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/17/options.json @@ -1,3 +1,3 @@ { - "throws": "Invalid rest operator's argument (1:9)" + "throws": "Unexpected token (1:9)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/options.json index 6a9895dd9d8c..b8b06c3a03ba 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/19/options.json @@ -1,3 +1,3 @@ { - "throws": "Invalid rest operator's argument (1:18)" + "throws": "Unexpected token (1:18)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/options.json index 6a9895dd9d8c..b8b06c3a03ba 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/20/options.json @@ -1,3 +1,3 @@ { - "throws": "Invalid rest operator's argument (1:18)" + "throws": "Unexpected token (1:18)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/options.json index f65c23001ff1..08b79c43d6cd 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/22/options.json @@ -1,3 +1,3 @@ { - "throws": "Invalid rest operator's argument (1:8)" + "throws": "Unexpected token, expected \",\" (1:10)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/options.json index 6a9895dd9d8c..81e7a97e3f7e 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/23/options.json @@ -1,3 +1,3 @@ { - "throws": "Invalid rest operator's argument (1:18)" + "throws": "Unexpected token, expected \",\" (1:20)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/options.json index f65c23001ff1..9ce9658f7dfa 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/25/options.json @@ -1,3 +1,3 @@ { - "throws": "Invalid rest operator's argument (1:8)" + "throws": "Unexpected token (1:8)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/options.json index 6a9895dd9d8c..b8b06c3a03ba 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/26/options.json @@ -1,3 +1,3 @@ { - "throws": "Invalid rest operator's argument (1:18)" + "throws": "Unexpected token (1:18)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json index 253a786581de..b86f80dc4a72 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest property must be the last property (1:10)" + "throws": "Rest element must be last element (1:10)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json index e5efb196646c..c49db16e2821 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/8/options.json @@ -1,3 +1,3 @@ { - "throws": "A trailing comma is not permitted after the rest property (1:16)" + "throws": "Rest element must be last element (1:16)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json index e1bf843ed1c1..e9effa60cb30 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/9/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest property must be the last property (1:13)" + "throws": "Rest element must be last element (1:13)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/options.json index a19bb078b172..935d087d7ee5 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/comma-after-rest/options.json @@ -1,3 +1,3 @@ { - "throws": "A trailing comma is not permitted after the rest property (1:6)" + "throws": "Rest element must be last element (1:6)" } diff --git a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json index 015adf82cda0..b708967fd223 100644 --- a/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json +++ b/packages/babel-parser/test/fixtures/es2018/object-rest-spread/expression-rest-not-last-invalid/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest property must be the last property (1:2)" + "throws": "Rest element must be last element (1:2)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json index 3ead3a4299f8..daa827f45cc4 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-arrow-function/arrow-with-multiple-rest/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest parameter must be the last parameter (1:5)" + "throws": "Rest element must be last element (1:5)" } diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json deleted file mode 100644 index 5c966843f4fa..000000000000 --- a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Redefinition of __proto__ property (1:20)" -} diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json deleted file mode 100644 index e19950ad14df..000000000000 --- a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Redefinition of __proto__ property (1:22)" -} diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json deleted file mode 100644 index a8b5ad2f5b20..000000000000 --- a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Redefinition of __proto__ property (1:14)" -} diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json deleted file mode 100644 index a8b5ad2f5b20..000000000000 --- a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Redefinition of __proto__ property (1:14)" -} diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json deleted file mode 100644 index a8b5ad2f5b20..000000000000 --- a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "throws": "Redefinition of __proto__ property (1:14)" -} diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-shorthand/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-identifier-shorthand/input.js rename to packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-shorthand/input.js diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-shorthand/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-shorthand/output.json new file mode 100644 index 000000000000..20867c4f1d25 --- /dev/null +++ b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-identifier-shorthand/output.json @@ -0,0 +1,176 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 3, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "computed": false, + "shorthand": false, + "value": { + "type": "NullLiteral", + "start": 14, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 18 + } + } + } + }, + { + "type": "ObjectProperty", + "start": 20, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 20, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 29 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 20, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 29 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "extra": { + "shorthand": true + } + } + ], + "extra": { + "parenthesized": true, + "parenStart": 0 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-literal-shorthand/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-literal-shorthand/input.js rename to packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-literal-shorthand/input.js diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-literal-shorthand/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-literal-shorthand/output.json new file mode 100644 index 000000000000..43f28e81ab32 --- /dev/null +++ b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-literal-shorthand/output.json @@ -0,0 +1,179 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 3, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "method": false, + "key": { + "type": "StringLiteral", + "start": 3, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" + }, + "computed": false, + "shorthand": false, + "value": { + "type": "NullLiteral", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + }, + { + "type": "ObjectProperty", + "start": 22, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 22, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 31 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 22, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 31 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "extra": { + "shorthand": true + } + } + ], + "extra": { + "parenthesized": true, + "parenStart": 0 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-identifier/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-identifier/input.js rename to packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-identifier/input.js diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-identifier/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-identifier/output.json new file mode 100644 index 000000000000..28fc9127cd03 --- /dev/null +++ b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-identifier/output.json @@ -0,0 +1,176 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 14, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "computed": false, + "shorthand": false, + "value": { + "type": "NullLiteral", + "start": 25, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 29 + } + } + } + } + ], + "extra": { + "parenthesized": true, + "parenStart": 0 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-literal/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthand-literal/input.js rename to packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-literal/input.js diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-literal/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-literal/output.json new file mode 100644 index 000000000000..5bfefd1a3925 --- /dev/null +++ b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthand-literal/output.json @@ -0,0 +1,179 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 14, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "method": false, + "key": { + "type": "StringLiteral", + "start": 14, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "extra": { + "rawValue": "__proto__", + "raw": "\"__proto__\"" + }, + "value": "__proto__" + }, + "computed": false, + "shorthand": false, + "value": { + "type": "NullLiteral", + "start": 27, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + } + ], + "extra": { + "parenthesized": true, + "parenStart": 0 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/input.js b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthands/input.js similarity index 100% rename from packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/invalid-proto-shorthands/input.js rename to packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthands/input.js diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthands/output.json b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthands/output.json new file mode 100644 index 000000000000..23f3d43707e1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/esprima/es2015-object-initialiser/proto-shorthands/output.json @@ -0,0 +1,181 @@ +{ + "type": "File", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "expression": { + "type": "ObjectExpression", + "start": 1, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 3, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "computed": false, + "shorthand": true, + "value": { + "type": "Identifier", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "__proto__" + }, + "name": "__proto__" + }, + "extra": { + "shorthand": true + } + } + ], + "extra": { + "parenthesized": true, + "parenStart": 0 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json index 029befcedaa1..2e1b1cc3aa43 100644 --- a/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json +++ b/packages/babel-parser/test/fixtures/esprima/invalid-syntax/migrated_0258/options.json @@ -1,3 +1,3 @@ { - "throws": "The rest parameter must be the last parameter (1:18)" + "throws": "Rest element must be last element (1:18)" } diff --git a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json index a500c245e78f..82b4f09fc940 100644 --- a/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json +++ b/packages/babel-parser/test/fixtures/typescript/types/tuple-rest-invalid/options.json @@ -1,5 +1,5 @@ { "sourceType": "module", "plugins": ["typescript"], - "throws": "The rest type must be the last type (1:19)" + "throws": "Rest element must be last element (1:19)" } diff --git a/scripts/tests/flow/flow_tests_whitelist.txt b/scripts/tests/flow/flow_tests_whitelist.txt index 4c850ac5271a..60ee5e0e6e98 100644 --- a/scripts/tests/flow/flow_tests_whitelist.txt +++ b/scripts/tests/flow/flow_tests_whitelist.txt @@ -10,7 +10,6 @@ JSX_invalid/migrated_0000.js arrow_function_invalid/migrated_0002.js -async_await/async_generic_method.js async_await/migrated_0007.js async_await/migrated_0020.js async_await/migrated_0024.js diff --git a/scripts/tests/test262/run_babel_parser_test262_utils.js b/scripts/tests/test262/run_babel_parser_test262_utils.js index 99c173dab66d..974e4a88e795 100644 --- a/scripts/tests/test262/run_babel_parser_test262_utils.js +++ b/scripts/tests/test262/run_babel_parser_test262_utils.js @@ -229,7 +229,7 @@ exports.updateWhitelist = function(filename, summary) { return line; }) .filter(function(line) { - return line !== null; + return line !== null && line !== ""; }) .concat(toAdd) .sort() diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 2dc847d203a6..03e75b2222f7 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -1,4 +1,3 @@ - annexB/language/statements/for-in/bare-initializer.js(default) annexB/language/statements/for-in/bare-initializer.js(strict mode) built-ins/RegExp/property-escapes/binary-property-with-value-ASCII_-_F-negated.js(default) @@ -406,10 +405,6 @@ language/expressions/class/elements/syntax/early-errors/invalid-names/method-out language/expressions/class/elements/syntax/early-errors/invalid-names/method-outter-member-expression-this.js(strict mode) language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(default) language/expressions/class/elements/syntax/early-errors/super-private-access-invalid.js(strict mode) -language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(default) -language/expressions/object/method-definition/early-errors-object-method-async-lineterminator.js(strict mode) -language/expressions/object/method-definition/private-name-early-error-async-fn-inside-class.js(default) -language/expressions/object/method-definition/private-name-early-error-async-fn-inside-class.js(strict mode) language/expressions/object/method-definition/private-name-early-error-async-gen-inside-class.js(default) language/expressions/object/method-definition/private-name-early-error-async-gen-inside-class.js(strict mode) language/expressions/object/method-definition/private-name-early-error-gen-inside-class.js(default) From d72f3aa7585cfb41c05a7aeb4714b86913a2d749 Mon Sep 17 00:00:00 2001 From: Evan Henley Date: Thu, 28 Feb 2019 15:03:12 -0600 Subject: [PATCH 337/563] [plugin-transform-typescript] Strip type imports used in Enums and object types (#9605) * fix: strip type imports used in Enums and object types * chore: update failing snapshot * docs: correct TSPropertySignature comment * fix: enum value should be considered a reference * chore: add tests for TSPropertySignature and TSEnumMember --- .../parameters/iife-this-9385/output.js | 6 +-- .../test/fixtures/imports/enum-id/input.mjs | 2 + .../test/fixtures/imports/enum-id/output.mjs | 7 +++ .../fixtures/imports/enum-value/input.mjs | 2 + .../fixtures/imports/enum-value/output.mjs | 8 ++++ .../imports/property-signature/input.mjs | 2 + .../imports/property-signature/output.mjs | 3 ++ .../src/validators/isReferenced.js | 14 ++++++ packages/babel-types/test/validators.js | 46 ++++++++++++++++++- 9 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-id/input.mjs create mode 100644 packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-id/output.mjs create mode 100644 packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-value/input.mjs create mode 100644 packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-value/output.mjs create mode 100644 packages/babel-plugin-transform-typescript/test/fixtures/imports/property-signature/input.mjs create mode 100644 packages/babel-plugin-transform-typescript/test/fixtures/imports/property-signature/output.mjs diff --git a/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/output.js b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/output.js index 0268eef274c1..5e502c2384f7 100644 --- a/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/output.js +++ b/packages/babel-plugin-transform-parameters/test/fixtures/parameters/iife-this-9385/output.js @@ -22,10 +22,8 @@ function () { key: "invite", value: function invite() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - return function () { - var privacy = options.privacy || "Private"; - console.log(this); - }.apply(this); + var privacy = options.privacy || "Private"; + console.log(this); } }]); diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-id/input.mjs b/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-id/input.mjs new file mode 100644 index 000000000000..f46a82c360a2 --- /dev/null +++ b/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-id/input.mjs @@ -0,0 +1,2 @@ +import { A } from 'lib' +enum Enum { A }; \ No newline at end of file diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-id/output.mjs b/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-id/output.mjs new file mode 100644 index 000000000000..628c6ba0ff86 --- /dev/null +++ b/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-id/output.mjs @@ -0,0 +1,7 @@ +var Enum; + +(function (Enum) { + Enum[Enum["A"] = 0] = "A"; +})(Enum || (Enum = {})); + +; diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-value/input.mjs b/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-value/input.mjs new file mode 100644 index 000000000000..727760d0ed26 --- /dev/null +++ b/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-value/input.mjs @@ -0,0 +1,2 @@ +import { A } from 'lib' +enum Enum { id = A }; \ No newline at end of file diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-value/output.mjs b/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-value/output.mjs new file mode 100644 index 000000000000..88a2cffb8392 --- /dev/null +++ b/packages/babel-plugin-transform-typescript/test/fixtures/imports/enum-value/output.mjs @@ -0,0 +1,8 @@ +import { A } from 'lib'; +var Enum; + +(function (Enum) { + Enum[Enum["id"] = A] = "id"; +})(Enum || (Enum = {})); + +; diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/imports/property-signature/input.mjs b/packages/babel-plugin-transform-typescript/test/fixtures/imports/property-signature/input.mjs new file mode 100644 index 000000000000..7e242846479e --- /dev/null +++ b/packages/babel-plugin-transform-typescript/test/fixtures/imports/property-signature/input.mjs @@ -0,0 +1,2 @@ +import { A } from 'lib' +const obj: { A: A } = { A: 'foo' }; \ No newline at end of file diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/imports/property-signature/output.mjs b/packages/babel-plugin-transform-typescript/test/fixtures/imports/property-signature/output.mjs new file mode 100644 index 000000000000..cba06b741a87 --- /dev/null +++ b/packages/babel-plugin-transform-typescript/test/fixtures/imports/property-signature/output.mjs @@ -0,0 +1,3 @@ +const obj = { + A: 'foo' +}; diff --git a/packages/babel-types/src/validators/isReferenced.js b/packages/babel-types/src/validators/isReferenced.js index 6a5a3ebc8ed3..f83c7956c493 100644 --- a/packages/babel-types/src/validators/isReferenced.js +++ b/packages/babel-types/src/validators/isReferenced.js @@ -134,6 +134,20 @@ export default function isReferenced( // no: type X = { NODE: OtherType } case "ObjectTypeProperty": return parent.key !== node; + + // yes: enum X { Foo = NODE } + // no: enum X { NODE } + case "TSEnumMember": + return parent.id !== node; + + // yes: { [NODE]: value } + // no: { NODE: value } + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + + return true; } return true; diff --git a/packages/babel-types/test/validators.js b/packages/babel-types/test/validators.js index 8e1f18e11545..3b4ec0d93349 100644 --- a/packages/babel-types/test/validators.js +++ b/packages/babel-types/test/validators.js @@ -122,7 +122,7 @@ describe("validators", function() { expect(t.isReferenced(node, parent)).toBe(true); }); - it("returns true if node id a value of ObjectProperty of an expression", function() { + it("returns true if node is a value of ObjectProperty of an expression", function() { const node = t.identifier("a"); const parent = t.objectProperty(t.identifier("key"), node); const grandparent = t.objectExpression([parent]); @@ -130,13 +130,55 @@ describe("validators", function() { expect(t.isReferenced(node, parent, grandparent)).toBe(true); }); - it("returns false if node id a value of ObjectProperty of a pattern", function() { + it("returns false if node is a value of ObjectProperty of a pattern", function() { const node = t.identifier("a"); const parent = t.objectProperty(t.identifier("key"), node); const grandparent = t.objectPattern([parent]); expect(t.isReferenced(node, parent, grandparent)).toBe(false); }); + + describe("TSPropertySignature", function() { + it("returns false if node is a key", function() { + // { A: string } + const node = t.identifier("A"); + const parent = t.tsPropertySignature( + node, + t.tsTypeAnnotation(t.tsStringKeyword()), + ); + + expect(t.isReferenced(node, parent)).toBe(false); + }); + + it("returns true if node is a value", function() { + // { someKey: A } + const node = t.identifier("A"); + const parent = t.tsPropertySignature( + t.identifier("someKey"), + t.tsTypeAnnotation(t.tsTypeReference(node)), + ); + + expect(t.isReferenced(node, parent)).toBe(true); + }); + }); + + describe("TSEnumMember", function() { + it("returns false if node is an id", function() { + // enum X = { A }; + const node = t.identifier("A"); + const parent = t.tsEnumMember(node); + + expect(t.isReferenced(node, parent)).toBe(false); + }); + + it("returns true if node is a value", function() { + // enum X = { Foo = A } + const node = t.identifier("A"); + const parent = t.tsEnumMember(t.identifier("Foo"), node); + + expect(t.isReferenced(node, parent)).toBe(true); + }); + }); }); describe("isBinding", function() { From f13f4adcbb73bba964ba98bdc9541d4c73f0b2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 28 Feb 2019 23:58:27 +0100 Subject: [PATCH 338/563] [TS] Disallow type casts in arrow parameters (#9612) --- packages/babel-parser/src/plugins/typescript.js | 14 ++++++++++++-- .../cast/arrow-async-parameter-as/input.js | 1 + .../cast/arrow-async-parameter-as/options.json | 3 +++ .../cast/arrow-async-parameter-assertion/input.js | 1 + .../arrow-async-parameter-assertion/options.json | 3 +++ .../typescript/cast/arrow-parameter-as/input.js | 1 + .../cast/arrow-parameter-as/options.json | 3 +++ .../cast/arrow-parameter-assertion/input.js | 1 + .../cast/arrow-parameter-assertion/options.json | 3 +++ 9 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/options.json create mode 100644 packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/options.json diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 7bc3623d78fe..7d1f81d1b8a7 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -2268,8 +2268,18 @@ export default (superClass: Class): Class => ): $ReadOnlyArray { for (let i = 0; i < exprList.length; i++) { const expr = exprList[i]; - if (expr && expr.type === "TSTypeCastExpression") { - exprList[i] = this.typeCastToParameter(expr); + if (!expr) continue; + switch (expr.type) { + case "TSTypeCastExpression": + exprList[i] = this.typeCastToParameter(expr); + break; + case "TSAsExpression": + case "TSTypeAssertion": + this.raise( + expr.start, + "Unexpected type cast in parameter position.", + ); + break; } } return super.toAssignableList(exprList, isBinding, contextDescription); diff --git a/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/input.js b/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/input.js new file mode 100644 index 000000000000..746078a226a0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/input.js @@ -0,0 +1 @@ +async (a as T) => {}; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/options.json b/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/options.json new file mode 100644 index 000000000000..69d91502496d --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-as/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected type cast in parameter position. (1:7)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/input.js b/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/input.js new file mode 100644 index 000000000000..5e3f1481d6e7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/input.js @@ -0,0 +1 @@ +async ( a) => {}; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/options.json b/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/options.json new file mode 100644 index 000000000000..69d91502496d --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/cast/arrow-async-parameter-assertion/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected type cast in parameter position. (1:7)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/input.js b/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/input.js new file mode 100644 index 000000000000..dc2282c6bdc8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/input.js @@ -0,0 +1 @@ +(a as T) => {}; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/options.json b/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/options.json new file mode 100644 index 000000000000..b5bdba868c9f --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-as/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected type cast in parameter position. (1:1)" +} diff --git a/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/input.js b/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/input.js new file mode 100644 index 000000000000..39dae7d0cf4a --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/input.js @@ -0,0 +1 @@ +( a) => {}; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/options.json b/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/options.json new file mode 100644 index 000000000000..b5bdba868c9f --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/cast/arrow-parameter-assertion/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected type cast in parameter position. (1:1)" +} From 17f4195bcc2e2024b9d8ec19ae225e6e074bafc0 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Thu, 28 Feb 2019 15:07:20 -0800 Subject: [PATCH 339/563] Allow any reserved word in `export {} from` specifiers (#9616) --- packages/babel-parser/src/parser/statement.js | 21 ++- .../export-from-valid-reserved-word/input.js | 1 + .../output.json | 122 ++++++++++++++++++ .../invalid-export-default-token/options.json | 5 +- .../invalid-export-named-default/options.json | 5 +- 5 files changed, 139 insertions(+), 15 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/es2015/modules/export-from-valid-reserved-word/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/modules/export-from-valid-reserved-word/output.json diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index d2981c24006a..22cc9b24a001 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -1866,9 +1866,17 @@ export default class StatementParser extends ExpressionParser { // Named exports for (const specifier of node.specifiers) { this.checkDuplicateExports(specifier, specifier.exported.name); - // check if export is defined // $FlowIgnore if (!isFrom && specifier.local) { + // check for keywords used as local names + this.checkReservedWord( + specifier.local.name, + specifier.local.start, + true, + false, + ); + // check if export is defined + // $FlowIgnore this.scope.checkLocalExport(specifier.local); } } @@ -1954,7 +1962,6 @@ export default class StatementParser extends ExpressionParser { parseExportSpecifiers(): Array { const nodes = []; let first = true; - let needsFrom; // export { x, y as z } [from '...'] this.expect(tt.braceL); @@ -1967,22 +1974,14 @@ export default class StatementParser extends ExpressionParser { if (this.eat(tt.braceR)) break; } - const isDefault = this.match(tt._default); - if (isDefault && !needsFrom) needsFrom = true; - const node = this.startNode(); - node.local = this.parseIdentifier(isDefault); + node.local = this.parseIdentifier(true); node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone(); nodes.push(this.finishNode(node, "ExportSpecifier")); } - // https://github.com/ember-cli/ember-cli/pull/3739 - if (needsFrom && !this.isContextual("from")) { - this.unexpected(); - } - return nodes; } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/export-from-valid-reserved-word/input.js b/packages/babel-parser/test/fixtures/es2015/modules/export-from-valid-reserved-word/input.js new file mode 100644 index 000000000000..0248bf7b6bd9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/modules/export-from-valid-reserved-word/input.js @@ -0,0 +1 @@ +export { if } from 'foo' diff --git a/packages/babel-parser/test/fixtures/es2015/modules/export-from-valid-reserved-word/output.json b/packages/babel-parser/test/fixtures/es2015/modules/export-from-valid-reserved-word/output.json new file mode 100644 index 000000000000..5455a5287944 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/modules/export-from-valid-reserved-word/output.json @@ -0,0 +1,122 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "if" + }, + "name": "if" + }, + "exported": { + "type": "Identifier", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "if" + }, + "name": "if" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "extra": { + "rawValue": "foo", + "raw": "'foo'" + }, + "value": "foo" + }, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/options.json index e806dd7b3a52..b6ce2c43af87 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-default-token/options.json @@ -1,3 +1,4 @@ { - "throws": "Unexpected token (1:17)" -} + "sourceType": "module", + "throws": "Unexpected token, expected \";\" (1:17)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/options.json b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/options.json index 4c07f39d1731..e03d273fdcd5 100644 --- a/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/options.json +++ b/packages/babel-parser/test/fixtures/esprima/es2015-export-declaration/invalid-export-named-default/options.json @@ -1,3 +1,4 @@ { - "throws": "Unexpected token (1:16)" -} + "sourceType": "module", + "throws": "Unexpected keyword 'default' (1:8)" +} \ No newline at end of file From f195daa092ae2cbdf3d5c31c99fc50653f6e275e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 1 Mar 2019 00:09:49 +0100 Subject: [PATCH 340/563] Don't add params of anonymous exported function decls to the outer scope (#9613) * Don't add params of anonymous exported function decls to the outer scope * Test --- .../src/index.js | 5 +---- .../test/fixtures/regression/issue-9611/input.mjs | 3 +++ .../test/fixtures/regression/issue-9611/options.json | 3 +++ .../test/fixtures/regression/issue-9611/output.js | 12 ++++++++++++ packages/babel-traverse/src/scope/index.js | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/input.mjs create mode 100644 packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/options.json create mode 100644 packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/output.js diff --git a/packages/babel-helper-split-export-declaration/src/index.js b/packages/babel-helper-split-export-declaration/src/index.js index ffbf52243a05..c591f8746396 100644 --- a/packages/babel-helper-split-export-declaration/src/index.js +++ b/packages/babel-helper-split-export-declaration/src/index.js @@ -49,10 +49,7 @@ export default function splitExportDeclaration(exportDeclaration) { exportDeclaration.replaceWith(updatedDeclaration); if (needBindingRegistration) { - scope.registerBinding( - isClassDeclaration ? "let" : "var", - exportDeclaration, - ); + scope.registerDeclaration(exportDeclaration); } return exportDeclaration; diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/input.mjs b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/input.mjs new file mode 100644 index 000000000000..cdc221254f38 --- /dev/null +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/input.mjs @@ -0,0 +1,3 @@ +import x from './x'; + +export default function(x) {} \ No newline at end of file diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/options.json b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/options.json new file mode 100644 index 000000000000..81e5ce12436d --- /dev/null +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["transform-modules-commonjs"] +} diff --git a/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/output.js b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/output.js new file mode 100644 index 000000000000..d1b46e901e14 --- /dev/null +++ b/packages/babel-plugin-transform-modules-commonjs/test/fixtures/regression/issue-9611/output.js @@ -0,0 +1,12 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +var _x = _interopRequireDefault(require("./x")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _default(x) {} diff --git a/packages/babel-traverse/src/scope/index.js b/packages/babel-traverse/src/scope/index.js index 2976cff173f6..375d5827b970 100644 --- a/packages/babel-traverse/src/scope/index.js +++ b/packages/babel-traverse/src/scope/index.js @@ -518,7 +518,7 @@ export default class Scope { } const parent = this.getProgramParent(); - const ids = path.getBindingIdentifiers(true); + const ids = path.getOuterBindingIdentifiers(true); for (const name of Object.keys(ids)) { for (const id of (ids[name]: Array)) { From 38ef4b74677d7ec5d07c7c33094f4503d3b58b87 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 4 Mar 2019 14:26:22 -0800 Subject: [PATCH 341/563] Add editorconfig for Makefile (#9623) --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index ba48528bbf4b..d38c249a7aa9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,5 +10,8 @@ end_of_line = lf indent_style = space indent_size = 2 +[Makefile] +indent_style = tab + [*.{md,markdown}] trim_trailing_whitespace = false From 37a427f692d073ff9e067671b3f297514779eeb5 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Mon, 4 Mar 2019 14:26:39 -0800 Subject: [PATCH 342/563] Update dependencies (#9624) --- package.json | 4 +- yarn.lock | 759 ++++++++++++++++++++------------------------------- 2 files changed, 295 insertions(+), 468 deletions(-) diff --git a/package.json b/package.json index 109bc6a97be9..642b2c72f5d8 100644 --- a/package.json +++ b/package.json @@ -33,12 +33,12 @@ "duplicate-package-checker-webpack-plugin": "^2.1.0", "enhanced-resolve": "^3.0.0", "eslint": "^5.12.1", - "eslint-config-babel": "^8.0.2", + "eslint-config-babel": "^9.0.0", "eslint-plugin-flowtype": "^3.2.1", "eslint-plugin-import": "^2.16.0", "eslint-plugin-prettier": "^3.0.1", "fancy-log": "^1.3.3", - "flow-bin": "^0.92.1", + "flow-bin": "^0.94.0", "graceful-fs": "^4.1.15", "gulp": "^4.0.0", "gulp-babel": "^8.0.0", diff --git a/yarn.lock b/yarn.lock index ab1eecdd3c33..1a41a9418210 100644 --- a/yarn.lock +++ b/yarn.lock @@ -685,6 +685,13 @@ pirates "^4.0.0" source-map-support "^0.5.9" +"@babel/runtime@7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0.tgz#adeb78fedfc855aa05bc041640f3f6f98e85424c" + integrity sha512-7hGhzlcmg01CvH1EHdSPVXYX1aJ8KCEyz6I9xYIi/asDtzBPMyMhVibhM/K6g/5qnKBwjZtp10bNZIEFTRW1MA== + dependencies: + regenerator-runtime "^0.12.0" + "@babel/runtime@^7.3.4": version "7.3.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83" @@ -734,19 +741,6 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" -"@iamstarkov/listr-update-renderer@0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@iamstarkov/listr-update-renderer/-/listr-update-renderer-0.4.1.tgz#d7c48092a2dcf90fd672b6c8b458649cb350c77e" - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - elegant-spinner "^1.0.1" - figures "^1.7.0" - indent-string "^3.0.0" - log-symbols "^1.0.2" - log-update "^2.3.0" - strip-ansi "^3.0.1" - "@lerna/add@^3.6.0": version "3.6.0" resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.6.0.tgz#eea53efff0b3237774ddac6eaa84957140e89238" @@ -1343,14 +1337,7 @@ "@types/uglify-js" "*" source-map "^0.6.0" -JSONStream@^1.0.3, JSONStream@^1.0.4: - version "1.3.2" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -JSONStream@^1.3.4: +JSONStream@^1.0.3, JSONStream@^1.0.4, JSONStream@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" dependencies: @@ -1406,9 +1393,10 @@ acorn@^5.0.0, acorn@^5.0.3, acorn@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.0.tgz#1abb587fbf051f94e3de20e6b26ef910b1828298" -acorn@^6.0.2: - version "6.0.5" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" +acorn@^6.0.2, acorn@^6.0.7: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" + integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0: version "4.2.1" @@ -1426,9 +1414,10 @@ ajv-keywords@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" -ajv@^6.1.0, ajv@^6.5.3, ajv@^6.5.5: - version "6.7.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.7.0.tgz#e3ce7bb372d6577bb1839f1dfdfcbf5ad2948d96" +ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1: + version "6.9.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.9.2.tgz#4927adb83e7f48e5a32b45729744c71ec39c9c7b" + integrity sha512-4UFy0/LgDo7Oa/+wOAlj44tp9K78u38E5/359eSrqEp1Z5PdVfimCcs7SluXMP755RUQu6d2b4AvF0R1C9RZjg== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -1459,9 +1448,10 @@ ansi-cyan@^0.1.1: dependencies: ansi-wrap "0.1.0" -ansi-escapes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" +ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== ansi-gray@^0.1.1: version "0.1.1" @@ -1747,17 +1737,7 @@ async-settle@^1.0.0: dependencies: async-done "^1.2.2" -async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@^2.1.2: - version "2.6.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" - dependencies: - lodash "^4.14.0" - -async@^2.5.0, async@^2.6.1: +async@^2.1.2, async@^2.5.0, async@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" dependencies: @@ -1787,12 +1767,15 @@ babel-eslint@^11.0.0-beta.0: eslint-visitor-keys "^1.0.0" semver "^5.6.0" -babel-jest@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.0.0.tgz#8a0c767f03f4a595fb921afdab13ff126edd00da" +babel-jest@^24.0.0, babel-jest@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.1.0.tgz#441e23ef75ded3bd547e300ac3194cef87b55190" + integrity sha512-MLcagnVrO9ybQGLEfZUqnOzv36iQzU7Bj4elm39vCukumLVSfoX+tRy3/jW7lUKc7XdpRmB/jech6L/UCsSZjw== dependencies: babel-plugin-istanbul "^5.1.0" - babel-preset-jest "^24.0.0" + babel-preset-jest "^24.1.0" + chalk "^2.4.2" + slash "^2.0.0" babel-loader@^8.0.5: version "8.0.5" @@ -1811,9 +1794,10 @@ babel-plugin-istanbul@^5.1.0: istanbul-lib-instrument "^3.0.0" test-exclude "^5.0.0" -babel-plugin-jest-hoist@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.0.0.tgz#3adf030b6fd67e4311479a54b24077bdfc226ec9" +babel-plugin-jest-hoist@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.1.0.tgz#dfecc491fb15e2668abbd690a697a8fd1411a7f8" + integrity sha512-gljYrZz8w1b6fJzKcsfKsipSru2DU2DmQ39aB6nV3xQ0DDv3zpIzKGortA5gknrhNnPN8DweaEgrnZdmbGmhnw== babel-plugin-transform-charcodes@^0.2.0: version "0.2.0" @@ -1822,12 +1806,13 @@ babel-plugin-transform-charcodes@^0.2.0: "@babel/parser" "^7.0.0" "@babel/traverse" "^7.0.0" -babel-preset-jest@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.0.0.tgz#d23782e5e036cff517859640a80960bd628bd82b" +babel-preset-jest@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.1.0.tgz#83bc564fdcd4903641af65ec63f2f5de6b04132e" + integrity sha512-FfNLDxFWsNX9lUmtwY7NheGlANnagvxq8LZdl5PKnVG3umP+S/g0XbVBfwtA4Ai3Ri/IMkWabBz3Tyk9wdspcw== dependencies: "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - babel-plugin-jest-hoist "^24.0.0" + babel-plugin-jest-hoist "^24.1.0" bach@^1.0.0: version "1.2.0" @@ -2299,15 +2284,7 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^2.3.0: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2316,14 +2293,6 @@ chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.3.1, chalk@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - charcodes@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/charcodes/-/charcodes-0.2.0.tgz#5208d327e6cc05f99eb80ffc814707572d1f14e4" @@ -2362,11 +2331,7 @@ chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.3: optionalDependencies: fsevents "^1.2.2" -chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" - -chownr@^1.1.1: +chownr@^1.0.1, chownr@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" @@ -2385,10 +2350,6 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" -circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" - class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2570,11 +2531,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@2.14.x, commander@^2.8.1, commander@^2.9.0, commander@~2.14.1: +commander@2.14.x, commander@~2.14.1: version "2.14.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" -commander@^2.14.1: +commander@^2.14.1, commander@^2.8.1, commander@^2.9.0: version "2.18.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" @@ -2605,10 +2566,11 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream@^1.6.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.1.tgz#261b8f518301f1d834e36342b9fea095d2620a26" +concat-stream@^1.4.6, concat-stream@^1.5.0, concat-stream@^1.6.0, concat-stream@~1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" dependencies: + buffer-from "^1.0.0" inherits "^2.0.3" readable-stream "^2.2.2" typedarray "^0.0.6" @@ -2621,15 +2583,6 @@ concat-stream@~1.5.1: readable-stream "~2.0.0" typedarray "~0.0.5" -concat-stream@~1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - config-chain@^1.1.11: version "1.1.12" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" @@ -2774,14 +2727,6 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -cosmiconfig@5.0.6: - version "5.0.6" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.6.tgz#dca6cf680a0bd03589aff684700858c81abeeb39" - dependencies: - is-directory "^0.3.1" - js-yaml "^3.9.0" - parse-json "^4.0.0" - cosmiconfig@^5.0.2, cosmiconfig@^5.0.7: version "5.0.7" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.7.tgz#39826b292ee0d78eda137dfa3173bd1c21a43b04" @@ -2927,13 +2872,7 @@ debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: dependencies: ms "2.0.0" -debug@^4.0.1, debug@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - dependencies: - ms "^2.1.1" - -debug@^4.1.1: +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" dependencies: @@ -3022,18 +2961,6 @@ defined@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - del@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" @@ -3137,9 +3064,10 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" @@ -3262,6 +3190,11 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -3418,9 +3351,10 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-babel@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-8.0.2.tgz#01f4b430148078522a4c69ab76944c672092d143" +eslint-config-babel@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-9.0.0.tgz#bcfb9e9a1892aff29b8773cb9d2c76639de83c07" + integrity sha512-J7l2KdDKi2y9QifMqXdSIkghrVXr6fcpxegj+803C+4xBfpp0h2LcY9X5N+ivJMBoX6G2PJ/TBTM1Kro0MELBA== eslint-import-resolver-node@^0.3.2: version "0.3.2" @@ -3439,10 +3373,11 @@ eslint-module-utils@^2.3.0: pkg-dir "^2.0.0" eslint-plugin-flowtype@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.2.1.tgz#45e032aee54e695dfc41a891e92b7afedfc62c77" + version "3.4.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.4.2.tgz#55475e10b05fd714d60bceebbbed596cb8706b16" + integrity sha512-sv6O6fiN3dIwhU4qRxfcyIpbKGVvsxwIQ6vgBLudpQKjH1rEyEFEOjGzGEUBTQP9J8LdTZm37OjiqZ0ZeFOa6g== dependencies: - lodash "^4.17.10" + lodash "^4.17.11" eslint-plugin-import@^2.16.0: version "2.16.0" @@ -3473,9 +3408,10 @@ eslint-scope@3.7.1: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" +eslint-scope@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.2.tgz#5f10cd6cabb1965bf479fa65745673439e21cb0e" + integrity sha512-5q1+B/ogmHl8+paxtOKx38Z8LtWkVGuNt3+GQNErqwLl6ViNp/gdJGMCjZNxZ8j/VYjDNZ2Fo+eQc1TAVPIzbg== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" @@ -3489,52 +3425,53 @@ eslint-visitor-keys@^1.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" eslint@^5.12.1: - version "5.12.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.12.1.tgz#5ca9931fb9029d04e7be92b03ce3b58edfac7e3b" + version "5.15.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.15.0.tgz#f313a2f7c7628d39adeefdba4a9c41f842012c9e" + integrity sha512-xwG7SS5JLeqkiR3iOmVgtF8Y6xPdtr6AAsN6ph7Q6R/fv+3UlKYoika8SmNzmb35qdRF+RfTY35kMEdtbi+9wg== dependencies: "@babel/code-frame" "^7.0.0" - ajv "^6.5.3" + ajv "^6.9.1" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^4.0.1" - doctrine "^2.1.0" - eslint-scope "^4.0.0" + doctrine "^3.0.0" + eslint-scope "^4.0.2" eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" - espree "^5.0.0" + espree "^5.0.1" esquery "^1.0.1" esutils "^2.0.2" - file-entry-cache "^2.0.0" + file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" glob "^7.1.2" globals "^11.7.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.1.0" + inquirer "^6.2.2" js-yaml "^3.12.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.5" + lodash "^4.17.11" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" path-is-inside "^1.0.2" - pluralize "^7.0.0" progress "^2.0.0" regexpp "^2.0.1" semver "^5.5.1" strip-ansi "^4.0.0" strip-json-comments "^2.0.1" - table "^5.0.2" + table "^5.2.3" text-table "^0.2.0" -espree@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.0.tgz#fc7f984b62b36a0f543b13fb9cd7b9f4a7f5b65c" +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== dependencies: - acorn "^6.0.2" + acorn "^6.0.7" acorn-jsx "^5.0.0" eslint-visitor-keys "^1.0.0" @@ -3668,9 +3605,10 @@ expand-tilde@^2.0.0, expand-tilde@^2.0.2: dependencies: homedir-polyfill "^1.0.1" -expect@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-24.0.0.tgz#71f71d88a4202746fc79849bb4c6498008b5ef03" +expect@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-24.1.0.tgz#88e73301c4c785cde5f16da130ab407bdaf8c0f2" + integrity sha512-lVcAPhaYkQcIyMS+F8RVwzbm1jro20IG8OkvxQ6f1JfqhVZyyudCwYogQ7wnktlf14iF3ii7ArIUO/mqvrW9Gw== dependencies: ansi-styles "^3.2.0" jest-get-type "^24.0.0" @@ -3697,15 +3635,11 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -extend@~3.0.2: +extend@^3.0.0, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" -external-editor@^3.0.0: +external-editor@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" dependencies: @@ -3749,7 +3683,7 @@ falafel@^2.1.0: isarray "0.0.1" object-keys "^1.0.6" -fancy-log@1.3.2, fancy-log@^1.3.2: +fancy-log@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" dependencies: @@ -3757,7 +3691,7 @@ fancy-log@1.3.2, fancy-log@^1.3.2: color-support "^1.1.3" time-stamp "^1.0.0" -fancy-log@^1.3.3: +fancy-log@^1.3.2, fancy-log@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" dependencies: @@ -3820,12 +3754,12 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" + flat-cache "^2.0.1" filename-regex@^2.0.0: version "2.0.1" @@ -3934,19 +3868,24 @@ flagged-respawn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.0.tgz#4e79ae9b2eb38bf86b3bb56bf3e0a56aa5fcabd7" -flat-cache@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" + integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== -flow-bin@^0.92.1: - version "0.92.1" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.92.1.tgz#32c136c07235f30c42dc0549a0790f370fad4070" - integrity sha512-F5kC5oQOR2FXROAeybJHFqgZP+moKV9fa/53QK4Q4WayTQHdA0KSl48KD1gP0A9mioRLiKUegTva/7I15cX3Iw== +flow-bin@^0.94.0: + version "0.94.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.94.0.tgz#b5d58fe7559705b73a18229f97edfc3ab6ffffcb" + integrity sha512-DYF7r9CJ/AksfmmB4+q+TyLMoeQPRnqtF1Pk7KY3zgfkB/nVuA3nXyzqgsIPIvnMSiFEXQcFK4z+iPxSLckZhQ== flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: version "1.0.3" @@ -3955,6 +3894,11 @@ flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: inherits "^2.0.1" readable-stream "^2.0.4" +fn-name@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fn-name/-/fn-name-2.0.1.tgz#5214d7537a4d06a4a301c0cc262feb84188002e7" + integrity sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc= + for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -4272,17 +4216,6 @@ globals@^11.1.0, globals@^11.7.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.11.0.tgz#dcf93757fa2de5486fbeed7118538adf789e9c2e" integrity sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw== -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - globby@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -4426,7 +4359,7 @@ gulplog@^1.0.0: dependencies: glogg "^1.0.0" -handlebars@^4.0.11: +handlebars@^4.0.11, handlebars@^4.0.2: version "4.0.12" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" dependencies: @@ -4436,16 +4369,6 @@ handlebars@^4.0.11: optionalDependencies: uglify-js "^3.1.4" -handlebars@^4.0.2: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -4512,13 +4435,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.0, has@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" - dependencies: - function-bind "^1.0.2" - -has@^1.0.3: +has@^1.0.0, has@^1.0.1, has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -4567,11 +4484,7 @@ homedir-polyfill@^1.0.1: dependencies: parse-passwd "^1.0.0" -hosted-git-info@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" - -hosted-git-info@^2.6.0: +hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" @@ -4670,22 +4583,16 @@ husky@^1.3.1: run-node "^1.0.0" slash "^2.0.0" -iconv-lite@0.4.19, iconv-lite@~0.4.13: +iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -iconv-lite@^0.4.24: +iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.4.4: - version "0.4.21" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" - dependencies: - safer-buffer "^2.1.0" - ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" @@ -4798,38 +4705,21 @@ inline-source-map@~0.6.0: dependencies: source-map "~0.5.3" -inquirer@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" +inquirer@^6.2.0, inquirer@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406" + integrity sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA== dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" + ansi-escapes "^3.2.0" + chalk "^2.4.2" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^3.0.0" + external-editor "^3.0.3" figures "^2.0.0" - lodash "^4.17.10" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^6.1.0" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -inquirer@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.1.tgz#9943fc4882161bdb0b0c9276769c75b32dbfcd52" - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^3.0.0" - figures "^2.0.0" - lodash "^4.17.10" + lodash "^4.17.11" mute-stream "0.0.7" run-async "^2.2.0" - rxjs "^6.1.0" + rxjs "^6.4.0" string-width "^2.1.0" strip-ansi "^5.0.0" through "^2.3.6" @@ -4851,13 +4741,7 @@ interpret@^1.0.0, interpret@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" -invariant@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.3.tgz#1a827dfde7dcbd7c323f0ca826be8fa7c5e9d688" - dependencies: - loose-envify "^1.0.0" - -invariant@^2.2.4: +invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -5210,10 +5094,6 @@ istanbul-api@^2.0.8: minimatch "^3.0.4" once "^1.4.0" -istanbul-lib-coverage@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#2aee0e073ad8c5f6a0b00e0dfbf52b4667472eda" - istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#0b891e5ad42312c2b9488554f603795f9a2211ba" @@ -5224,19 +5104,7 @@ istanbul-lib-hook@^2.0.3: dependencies: append-transform "^1.0.0" -istanbul-lib-instrument@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.0.tgz#b5f066b2a161f75788be17a9d556f40a0cf2afc9" - dependencies: - "@babel/generator" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/template" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - istanbul-lib-coverage "^2.0.1" - semver "^5.5.0" - -istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.1.0: +istanbul-lib-instrument@^3.0.0, istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.1.0.tgz#a2b5484a7d445f1f311e93190813fa56dfb62971" dependencies: @@ -5279,9 +5147,10 @@ jest-changed-files@^24.0.0: execa "^1.0.0" throat "^4.0.0" -jest-cli@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.0.0.tgz#691fd4f7bce2574c1865db6844a43b56e60ce2a4" +jest-cli@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.1.0.tgz#f7cc98995f36e7210cce3cbb12974cbf60940843" + integrity sha512-U/iyWPwOI0T1CIxVLtk/2uviOTJ/OiSWJSe8qt6X1VkbbgP+nrtLJlmT9lPBe4lK78VNFJtrJ7pttcNv/s7yCw== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -5295,16 +5164,16 @@ jest-cli@^24.0.0: istanbul-lib-instrument "^3.0.1" istanbul-lib-source-maps "^3.0.1" jest-changed-files "^24.0.0" - jest-config "^24.0.0" + jest-config "^24.1.0" jest-environment-jsdom "^24.0.0" jest-get-type "^24.0.0" jest-haste-map "^24.0.0" jest-message-util "^24.0.0" jest-regex-util "^24.0.0" - jest-resolve-dependencies "^24.0.0" - jest-runner "^24.0.0" - jest-runtime "^24.0.0" - jest-snapshot "^24.0.0" + jest-resolve-dependencies "^24.1.0" + jest-runner "^24.1.0" + jest-runtime "^24.1.0" + jest-snapshot "^24.1.0" jest-util "^24.0.0" jest-validate "^24.0.0" jest-watcher "^24.0.0" @@ -5322,26 +5191,26 @@ jest-cli@^24.0.0: which "^1.2.12" yargs "^12.0.2" -jest-config@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.0.0.tgz#878abe03c060c74a0ec30d3cd5dd1897873e030e" +jest-config@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.1.0.tgz#6ea6881cfdd299bc86cc144ee36d937c97c3850c" + integrity sha512-FbbRzRqtFC6eGjG5VwsbW4E5dW3zqJKLWYiZWhB0/4E5fgsMw8GODLbGSrY5t17kKOtCWb/Z7nsIThRoDpuVyg== dependencies: "@babel/core" "^7.1.0" - babel-jest "^24.0.0" + babel-jest "^24.1.0" chalk "^2.0.1" glob "^7.1.1" jest-environment-jsdom "^24.0.0" jest-environment-node "^24.0.0" jest-get-type "^24.0.0" - jest-jasmine2 "^24.0.0" + jest-jasmine2 "^24.1.0" jest-regex-util "^24.0.0" - jest-resolve "^24.0.0" + jest-resolve "^24.1.0" jest-util "^24.0.0" jest-validate "^24.0.0" micromatch "^3.1.10" pretty-format "^24.0.0" realpath-native "^1.0.2" - uuid "^3.3.2" jest-diff@^24.0.0: version "24.0.0" @@ -5382,10 +5251,6 @@ jest-environment-node@^24.0.0: jest-mock "^24.0.0" jest-util "^24.0.0" -jest-get-type@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" - jest-get-type@^24.0.0: version "24.0.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.0.0.tgz#36e72930b78e33da59a4f63d44d332188278940b" @@ -5403,21 +5268,23 @@ jest-haste-map@^24.0.0: micromatch "^3.1.10" sane "^3.0.0" -jest-jasmine2@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.0.0.tgz#7d87be9d8b32d34ac5980ad646b7ae7f99e33a19" +jest-jasmine2@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.1.0.tgz#8377324b967037c440f0a549ee0bbd9912055db6" + integrity sha512-H+o76SdSNyCh9fM5K8upK45YTo/DiFx5w2YAzblQebSQmukDcoVBVeXynyr7DDnxh+0NTHYRCLwJVf3tC518wg== dependencies: "@babel/traverse" "^7.1.0" chalk "^2.0.1" co "^4.6.0" - expect "^24.0.0" + expect "^24.1.0" is-generator-fn "^2.0.0" jest-each "^24.0.0" jest-matcher-utils "^24.0.0" jest-message-util "^24.0.0" - jest-snapshot "^24.0.0" + jest-snapshot "^24.1.0" jest-util "^24.0.0" pretty-format "^24.0.0" + throat "^4.0.0" jest-leak-detector@^24.0.0: version "24.0.0" @@ -5452,42 +5319,47 @@ jest-regex-util@^24.0.0: version "24.0.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.0.0.tgz#4feee8ec4a358f5bee0a654e94eb26163cb9089a" -jest-resolve-dependencies@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.0.0.tgz#86540611d660bdcaab8b87d069247d3832811d94" +jest-resolve-dependencies@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.1.0.tgz#78f738a2ec59ff4d00751d9da56f176e3f589f6c" + integrity sha512-2VwPsjd3kRPu7qe2cpytAgowCObk5AKeizfXuuiwgm1a9sijJDZe8Kh1sFj6FKvSaNEfCPlBVkZEJa2482m/Uw== dependencies: jest-regex-util "^24.0.0" - jest-snapshot "^24.0.0" + jest-snapshot "^24.1.0" -jest-resolve@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.0.0.tgz#0206cfe842324f8796b01f706f4075309bf7b405" +jest-resolve@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.1.0.tgz#42ff0169b0ea47bfdbd0c52a0067ca7d022c7688" + integrity sha512-TPiAIVp3TG6zAxH28u/6eogbwrvZjBMWroSLBDkwkHKrqxB/RIdwkWDye4uqPlZIXWIaHtifY3L0/eO5Z0f2wg== dependencies: browser-resolve "^1.11.3" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.0.0.tgz#00b280d52d23286111a8ed0362ed958283f7f0e3" +jest-runner@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.1.0.tgz#3686a2bb89ce62800da23d7fdc3da2c32792943b" + integrity sha512-CDGOkT3AIFl16BLL/OdbtYgYvbAprwJ+ExKuLZmGSCSldwsuU2dEGauqkpvd9nphVdAnJUcP12e/EIlnTX0QXg== dependencies: + chalk "^2.4.2" exit "^0.1.2" graceful-fs "^4.1.15" - jest-config "^24.0.0" + jest-config "^24.1.0" jest-docblock "^24.0.0" jest-haste-map "^24.0.0" - jest-jasmine2 "^24.0.0" + jest-jasmine2 "^24.1.0" jest-leak-detector "^24.0.0" jest-message-util "^24.0.0" - jest-runtime "^24.0.0" + jest-runtime "^24.1.0" jest-util "^24.0.0" jest-worker "^24.0.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.0.0.tgz#bc80756f5458c2c8e4db86f44b687ff692026c13" +jest-runtime@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.1.0.tgz#7c157a2e776609e8cf552f956a5a19ec9c985214" + integrity sha512-59/BY6OCuTXxGeDhEMU7+N33dpMQyXq7MLK07cNSIY/QYt2QZgJ7Tjx+rykBI0skAoigFl0A5tmT8UdwX92YuQ== dependencies: "@babel/core" "^7.1.0" babel-plugin-istanbul "^5.1.0" @@ -5497,35 +5369,36 @@ jest-runtime@^24.0.0: fast-json-stable-stringify "^2.0.0" glob "^7.1.3" graceful-fs "^4.1.15" - jest-config "^24.0.0" + jest-config "^24.1.0" jest-haste-map "^24.0.0" jest-message-util "^24.0.0" jest-regex-util "^24.0.0" - jest-resolve "^24.0.0" - jest-snapshot "^24.0.0" + jest-resolve "^24.1.0" + jest-snapshot "^24.1.0" jest-util "^24.0.0" jest-validate "^24.0.0" micromatch "^3.1.10" realpath-native "^1.0.0" slash "^2.0.0" - strip-bom "3.0.0" - write-file-atomic "^2.4.2" + strip-bom "^3.0.0" + write-file-atomic "2.4.1" yargs "^12.0.2" jest-serializer@^24.0.0: version "24.0.0" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.0.0.tgz#522c44a332cdd194d8c0531eb06a1ee5afb4256b" -jest-snapshot@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.0.0.tgz#fb447a753a3271660b3d89d068698014eb14c414" +jest-snapshot@^24.1.0: + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.1.0.tgz#85e22f810357aa5994ab61f236617dc2205f2f5b" + integrity sha512-th6TDfFqEmXvuViacU1ikD7xFb7lQsPn2rJl7OEmnfIVpnrx3QNY2t3PE88meeg0u/mQ0nkyvmC05PBqO4USFA== dependencies: "@babel/types" "^7.0.0" chalk "^2.0.1" jest-diff "^24.0.0" jest-matcher-utils "^24.0.0" jest-message-util "^24.0.0" - jest-resolve "^24.0.0" + jest-resolve "^24.1.0" mkdirp "^0.5.1" natural-compare "^1.4.0" pretty-format "^24.0.0" @@ -5544,15 +5417,6 @@ jest-util@^24.0.0: slash "^2.0.0" source-map "^0.6.0" -jest-validate@^23.5.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^23.6.0" - jest-validate@^24.0.0: version "24.0.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.0.0.tgz#aa8571a46983a6538328fef20406b4a496b6c020" @@ -5580,11 +5444,12 @@ jest-worker@^24.0.0: supports-color "^6.1.0" jest@^24.0.0: - version "24.0.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-24.0.0.tgz#b8e2c8e6274e1092c7f56e57762a1fdc7800201e" + version "24.1.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-24.1.0.tgz#b1e1135caefcf2397950ecf7f90e395fde866fd2" + integrity sha512-+q91L65kypqklvlRFfXfdzUKyngQLOcwGhXQaLmVHv+d09LkNXuBuGxlofTFW42XMzu3giIcChchTsCNUjQ78A== dependencies: import-local "^2.0.0" - jest-cli "^24.0.0" + jest-cli "^24.1.0" js-levenshtein@^1.1.3: version "1.1.3" @@ -5598,20 +5463,13 @@ js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-yaml@^3.12.0: +js-yaml@^3.12.0, js-yaml@^3.2.1, js-yaml@^3.9.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.2.1, js-yaml@^3.9.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -5659,14 +5517,10 @@ json-loader@^0.5.4: version "0.5.7" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" -json-parse-better-errors@^1.0.0: +json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" -json-parse-better-errors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz#50183cd1b2d25275de069e9e71b467ac9eab973a" - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -5979,13 +5833,13 @@ liftoff@^2.5.0: resolve "^1.1.7" lint-staged@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-8.1.0.tgz#dbc3ae2565366d8f20efb9f9799d076da64863f2" + version "8.1.5" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-8.1.5.tgz#372476fe1a58b8834eb562ed4c99126bd60bdd79" + integrity sha512-e5ZavfnSLcBJE1BTzRTqw6ly8OkqVyO3GL2M6teSmTBYQ/2BuueD5GIt2RPsP31u/vjKdexUyDCxSyK75q4BDA== dependencies: - "@iamstarkov/listr-update-renderer" "0.4.1" chalk "^2.3.1" commander "^2.14.1" - cosmiconfig "5.0.6" + cosmiconfig "^5.0.2" debug "^3.1.0" dedent "^0.7.0" del "^3.0.0" @@ -5994,9 +5848,9 @@ lint-staged@^8.1.0: g-status "^2.0.2" is-glob "^4.0.0" is-windows "^1.0.2" - jest-validate "^23.5.0" listr "^0.14.2" - lodash "^4.17.5" + listr-update-renderer "^0.5.0" + lodash "^4.17.11" log-symbols "^2.2.0" micromatch "^3.1.8" npm-which "^3.0.1" @@ -6007,6 +5861,7 @@ lint-staged@^8.1.0: staged-git-files "1.1.2" string-argv "^0.0.2" stringify-object "^3.2.2" + yup "^0.26.10" listr-silent-renderer@^1.1.1: version "1.1.1" @@ -6150,7 +6005,7 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1: +lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== @@ -6452,26 +6307,13 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -minipass@^2.2.1, minipass@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40" - dependencies: - safe-buffer "^5.1.1" - yallist "^3.0.0" - -minipass@^2.3.4, minipass@^2.3.5: +minipass@^2.2.1, minipass@^2.3.4, minipass@^2.3.5: version "2.3.5" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" - dependencies: - minipass "^2.2.1" - minizlib@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" @@ -6781,20 +6623,13 @@ npm-logical-tree@^1.2.1: semver "^5.5.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.12: +npm-packlist@^1.1.12, npm-packlist@^1.1.6: version "1.1.12" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-packlist@^1.1.6: - version "1.1.10" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - npm-path@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" @@ -7377,10 +7212,6 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" -pluralize@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" - pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -7404,15 +7235,9 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^1.16.1: - version "1.16.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.1.tgz#534c2c9d7853f8845e5e078384e71973bd74089f" - -pretty-format@^23.6.0: - version "23.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" + version "1.16.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717" + integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g== pretty-format@^24.0.0: version "24.0.0" @@ -7473,6 +7298,11 @@ promzard@^0.3.0: dependencies: read "1" +property-expr@^1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-1.5.1.tgz#22e8706894a0c8e28d58735804f6ba3a3673314f" + integrity sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g== + proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" @@ -8001,7 +7831,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@2, rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" dependencies: @@ -8066,23 +7896,14 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.1.0: - version "6.3.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.2.tgz#6a688b16c4e6e980e62ea805ec30648e1c60907f" - dependencies: - tslib "^1.9.0" - -rxjs@^6.3.3: - version "6.3.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" +rxjs@^6.3.3, rxjs@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" + integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -safe-buffer@^5.1.2: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -8092,7 +7913,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -8126,18 +7947,10 @@ semver-greatest-satisfied-range@^1.1.0: dependencies: sver-compat "^1.5.0" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - -"semver@2.x || 3.x || 4 || 5", semver@^5.6.0: +"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" -semver@^5.5.1: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" - semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -8241,10 +8054,13 @@ slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" -slice-ansi@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" slide@^1.1.6: @@ -8316,14 +8132,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@^0.5.9: +source-map-support@^0.5.6, source-map-support@^0.5.9: version "0.5.9" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" dependencies: @@ -8338,16 +8147,16 @@ source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, sourc version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" -source-map@^0.4.4, source-map@~0.4.0, source-map@~0.4.2: +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + +source-map@~0.4.0, source-map@~0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: amdefine ">=0.0.4" -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" @@ -8517,6 +8326,15 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.0.0.tgz#5a1690a57cc78211fffd9bf24bbe24d090604eb1" + integrity sha512-rr8CUxBbvOZDUvc5lNIJ+OC1nPVpz+Siw9VBtUjB9b6jZehZLFt0JMCZzShFHIsI8cbhm0EsNIfWJMFV3cu3Ew== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.0.0" + string.prototype.padend@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" @@ -8525,13 +8343,7 @@ string.prototype.padend@^3.0.0: es-abstract "^1.4.3" function-bind "^1.0.2" -string_decoder@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -string_decoder@^1.1.1, string_decoder@~1.1.1: +string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" dependencies: @@ -8578,16 +8390,16 @@ strip-bom-stream@^2.0.0: first-chunk-stream "^2.0.0" strip-bom "^2.0.0" -strip-bom@3.0.0, strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: is-utf8 "^0.2.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" @@ -8657,20 +8469,26 @@ symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" +synchronous-promise@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.6.tgz#de76e0ea2b3558c1e673942e47e714a930fa64aa" + integrity sha512-TyOuWLwkmtPL49LHCX1caIwHjRzcVd62+GF6h8W/jHOeZUFHpnd2XJDVuUlaTaLPH1nuu2M69mfHr5XbQJnf/g== + syntax-error@^1.1.1: version "1.4.0" resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.4.0.tgz#2d9d4ff5c064acb711594a3e3b95054ad51d907c" dependencies: acorn-node "^1.2.0" -table@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/table/-/table-5.1.0.tgz#69a54644f6f01ad1628f8178715b408dc6bf11f7" +table@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/table/-/table-5.2.3.tgz#cde0cc6eb06751c009efab27e8c820ca5b67b7f2" + integrity sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ== dependencies: - ajv "^6.5.3" - lodash "^4.17.10" - slice-ansi "1.0.0" - string-width "^2.1.1" + ajv "^6.9.1" + lodash "^4.17.11" + slice-ansi "^2.1.0" + string-width "^3.0.0" tapable@^0.2.7: version "0.2.8" @@ -8684,19 +8502,7 @@ tar@^2.0.0: fstream "^1.0.2" inherits "2" -tar@^4: - version "4.4.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.1.tgz#b25d5a8470c976fd7a9a8a350f42c59e9fa81749" - dependencies: - chownr "^1.0.1" - fs-minipass "^1.2.5" - minipass "^2.2.4" - minizlib "^1.1.0" - mkdirp "^0.5.0" - safe-buffer "^5.1.1" - yallist "^3.0.2" - -tar@^4.4.6: +tar@^4, tar@^4.4.6: version "4.4.8" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" dependencies: @@ -8852,13 +8658,12 @@ to-through@^2.0.0: dependencies: through2 "^2.0.3" -tough-cookie@>=2.3.3, tough-cookie@^2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - dependencies: - punycode "^1.4.1" +toposort@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" + integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= -tough-cookie@~2.4.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" dependencies: @@ -8919,14 +8724,14 @@ typedarray@^0.0.6, typedarray@~0.0.5: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -uglify-js@3.3.x, uglify-js@^3.0.5: +uglify-js@3.3.x: version "3.3.13" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.3.13.tgz#8a1a89eeb16e2d6a66b0db2b04cb871af3c669cf" dependencies: commander "~2.14.1" source-map "~0.6.1" -uglify-js@^2.6, uglify-js@^2.8.29: +uglify-js@^2.8.29: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" dependencies: @@ -8935,7 +8740,7 @@ uglify-js@^2.6, uglify-js@^2.8.29: optionalDependencies: uglify-to-browserify "~1.0.0" -uglify-js@^3.1.4: +uglify-js@^3.0.5, uglify-js@^3.1.4: version "3.4.9" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" dependencies: @@ -9413,7 +9218,16 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: +write-file-atomic@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" + integrity sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-file-atomic@^2.0.0, write-file-atomic@^2.3.0: version "2.4.2" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.2.tgz#a7181706dfba17855d221140a9c06e15fcdd87b9" integrity sha512-s0b6vB3xIVRLWywa6X9TOMA7k9zio0TMOsl9ZnDkliA/cfJlpHXAscj0gbHVJiTdIuAYpIyqS5GW91fqm6gG5g== @@ -9440,9 +9254,10 @@ write-pkg@^3.1.0: sort-keys "^2.0.0" write-json-file "^2.2.0" -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== dependencies: mkdirp "^0.5.1" @@ -9608,3 +9423,15 @@ yargs@~3.10.0: cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0" + +yup@^0.26.10: + version "0.26.10" + resolved "https://registry.yarnpkg.com/yup/-/yup-0.26.10.tgz#3545839663289038faf25facfc07e11fd67c0cb1" + integrity sha512-keuNEbNSnsOTOuGCt3UJW69jDE3O4P+UHAakO7vSeFMnjaitcmlbij/a3oNb9g1Y1KvSKH/7O1R2PQ4m4TRylw== + dependencies: + "@babel/runtime" "7.0.0" + fn-name "~2.0.1" + lodash "^4.17.10" + property-expr "^1.5.0" + synchronous-promise "^2.0.5" + toposort "^2.0.2" From c60c4dd375a137ae3926679622a496fce1d13bcb Mon Sep 17 00:00:00 2001 From: Behrang Yarahmadi Date: Mon, 14 Jan 2019 17:54:21 +0100 Subject: [PATCH 343/563] Partial Application Syntax: Stage 1 (#9343) * add partial application syntax and some tests * remove unnecessary error message and hasPartial function from parseNewArguments * add types for PartialExpression * Update the tests * rename PartialExpression to Partial * move Partial from expressions to types and rename to ArgumentPlaceholder * add tests for ArgumentPlaceholder in babel-generator * rename Partial to ArgumentPlaceholder * update the tests * remove alias from the type and undo changes in generated folder * adds a nice error message * better definition for the type * auto-generated files * update the conditional for allowPlaceholder message and tests * update CallExpression definition to accept ArgumentPlaceholder * change description * clean up * indent ArgumentPlaceholder entry and revert unwanted changes --- .../babel-generator/src/generators/types.js | 4 + .../types/ArgumentPlaceholder/input.js | 12 + .../types/ArgumentPlaceholder/options.json | 1 + .../types/ArgumentPlaceholder/output.js | 14 + packages/babel-parser/ast/spec.md | 9 + .../babel-parser/src/parser/expression.js | 13 +- packages/babel-parser/src/types.js | 2 + .../partial-application/call-expr/input.js | 1 + .../call-expr/options.json | 3 + .../partial-application/call-expr/output.json | 99 ++++++ .../call-on-SuperProperty/input.js | 5 + .../call-on-SuperProperty/options.json | 3 + .../call-on-SuperProperty/output.json | 305 ++++++++++++++++++ .../partial-application/for-any-arg/input.js | 3 + .../for-any-arg/options.json | 3 + .../for-any-arg/output.json | 260 +++++++++++++++ .../partial-application/from-left/input.js | 3 + .../from-left/options.json | 3 + .../partial-application/from-left/output.json | 230 +++++++++++++ .../partial-application/from-right/input.js | 3 + .../from-right/options.json | 3 + .../from-right/output.json | 230 +++++++++++++ .../partial-application/in-SuperCall/input.js | 6 + .../in-SuperCall/options.json | 4 + .../partial-application/in-new/input.js | 1 + .../partial-application/in-new/options.json | 4 + .../input.js | 1 + .../options.json | 4 + .../top-level-argument-method-call/input.js | 1 + .../options.json | 4 + .../.npmignore | 3 + .../README.md | 19 ++ .../package.json | 23 ++ .../src/index.js | 13 + .../src/asserts/generated/index.js | 6 + .../src/builders/generated/index.js | 4 + packages/babel-types/src/definitions/core.js | 7 +- .../src/definitions/experimental.js | 2 + .../src/validators/generated/index.js | 14 + 39 files changed, 1323 insertions(+), 2 deletions(-) create mode 100644 packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/input.js create mode 100644 packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/options.json create mode 100644 packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/output.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/from-left/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/from-left/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/from-left/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/from-right/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/from-right/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/from-right/output.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/in-SuperCall/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/in-SuperCall/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/in-new/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/in-new/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-binary-expression/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-binary-expression/options.json create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-method-call/input.js create mode 100644 packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-method-call/options.json create mode 100644 packages/babel-plugin-syntax-partial-application/.npmignore create mode 100644 packages/babel-plugin-syntax-partial-application/README.md create mode 100644 packages/babel-plugin-syntax-partial-application/package.json create mode 100644 packages/babel-plugin-syntax-partial-application/src/index.js diff --git a/packages/babel-generator/src/generators/types.js b/packages/babel-generator/src/generators/types.js index 491ae7513828..fdd090dd4113 100644 --- a/packages/babel-generator/src/generators/types.js +++ b/packages/babel-generator/src/generators/types.js @@ -7,6 +7,10 @@ export function Identifier(node: Object) { }); } +export function ArgumentPlaceholder() { + this.token("?"); +} + export function RestElement(node: Object) { this.token("..."); this.print(node.argument, node); diff --git a/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/input.js b/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/input.js new file mode 100644 index 000000000000..29e9b90f83e0 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/input.js @@ -0,0 +1,12 @@ +foo(?); +foo(?, x); +foo(x, ?); +foo(?, x, ?); +obj.foo(x, ?); +obj.foo(?, x); +obj.foo(?, x, ?); +class foo { + constructor() { + baz(this, () => super.bar(?)); + } +} diff --git a/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/options.json b/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/options.json new file mode 100644 index 000000000000..eff064512269 --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/options.json @@ -0,0 +1 @@ +{ "plugins": ["partialApplication"] } diff --git a/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/output.js b/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/output.js new file mode 100644 index 000000000000..7cb1b16bd55e --- /dev/null +++ b/packages/babel-generator/test/fixtures/types/ArgumentPlaceholder/output.js @@ -0,0 +1,14 @@ +foo(?); +foo(?, x); +foo(x, ?); +foo(?, x, ?); +obj.foo(x, ?); +obj.foo(?, x); +obj.foo(?, x, ?); + +class foo { + constructor() { + baz(this, () => super.bar(?)); + } + +} \ No newline at end of file diff --git a/packages/babel-parser/ast/spec.md b/packages/babel-parser/ast/spec.md index 716097280327..b4f5372cb440 100644 --- a/packages/babel-parser/ast/spec.md +++ b/packages/babel-parser/ast/spec.md @@ -72,6 +72,7 @@ These are the core @babel/parser (babylon) AST node types. - [LogicalExpression](#logicalexpression) - [LogicalOperator](#logicaloperator) - [SpreadElement](#spreadelement) + - [ArgumentPlaceholder](#argumentplaceholder) - [MemberExpression](#memberexpression) - [BindExpression](#bindexpression) - [ConditionalExpression](#conditionalexpression) @@ -862,6 +863,14 @@ interface SpreadElement <: Node { } ``` +### ArgumentPlaceholder + +```js +interface ArgumentPlaceholder <: Node { + type: "ArgumentPlaceholder"; +} +``` + ### MemberExpression ```js diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 9b05a76d560f..516aba3aa2db 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -323,7 +323,6 @@ export default class ExpressionParser extends LValParser { const operator = this.state.value; node.left = left; node.operator = operator; - if ( operator === "**" && left.type === "UnaryExpression" && @@ -634,6 +633,7 @@ export default class ExpressionParser extends LValParser { tt.parenR, possibleAsync, base.type === "Import", + base.type !== "Super", ); if (!state.optionalChainMember) { this.finishCallExpression(node); @@ -744,6 +744,7 @@ export default class ExpressionParser extends LValParser { close: TokenType, possibleAsyncArrow: boolean, dynamicImport?: boolean, + allowPlaceholder?: boolean, ): $ReadOnlyArray { const elts = []; let innerParenStart; @@ -776,6 +777,7 @@ export default class ExpressionParser extends LValParser { false, possibleAsyncArrow ? { start: 0 } : undefined, possibleAsyncArrow ? { start: 0 } : undefined, + allowPlaceholder, ), ); } @@ -1945,6 +1947,7 @@ export default class ExpressionParser extends LValParser { allowEmpty: ?boolean, refShorthandDefaultPos: ?Pos, refNeedsArrowPos: ?Pos, + allowPlaceholder: ?boolean, ): ?N.Expression { let elt; if (allowEmpty && this.match(tt.comma)) { @@ -1957,6 +1960,14 @@ export default class ExpressionParser extends LValParser { spreadNodeStartPos, spreadNodeStartLoc, ); + } else if (this.match(tt.question)) { + this.expectPlugin("partialApplication"); + if (!allowPlaceholder) { + this.raise(this.state.start, "Unexpected argument placeholder"); + } + const node = this.startNode(); + this.next(); + elt = this.finishNode(node, "ArgumentPlaceholder"); } else { elt = this.parseMaybeAssign( false, diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 696589b3e650..35d79c9ce925 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -340,6 +340,8 @@ export type VariableDeclarator = NodeBase & { // Misc +export type ArgumentPlaceholder = NodeBase & { type: "ArgumentPlaceholder" }; + export type Decorator = NodeBase & { type: "Decorator", expression: Expression, diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/input.js new file mode 100644 index 000000000000..74512f8aace5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/input.js @@ -0,0 +1 @@ +foo(?) diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/options.json new file mode 100644 index 000000000000..87414aef43de --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["partialApplication"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/output.json b/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/output.json new file mode 100644 index 000000000000..1846d675488a --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/call-expr/output.json @@ -0,0 +1,99 @@ +{ + "type": "File", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "expression": { + "type": "CallExpression", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "callee": { + "type": "Identifier", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "arguments": [ + { + "type": "ArgumentPlaceholder", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/input.js new file mode 100644 index 000000000000..ed9915fb3ccb --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/input.js @@ -0,0 +1,5 @@ +class foo { + constructor() { + baz(this, () => super.bar(?)); + } +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/options.json new file mode 100644 index 000000000000..87414aef43de --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["partialApplication"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/output.json b/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/output.json new file mode 100644 index 000000000000..185313af1242 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/call-on-SuperProperty/output.json @@ -0,0 +1,305 @@ +{ + "type": "File", + "start": 0, + "end": 78, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 78, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 78, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 10, + "end": 78, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 5, + "column": 1 + } + }, + "body": [ + { + "type": "ClassMethod", + "start": 16, + "end": 76, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "static": false, + "key": { + "type": "Identifier", + "start": 16, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 15 + }, + "identifierName": "constructor" + }, + "name": "constructor" + }, + "computed": false, + "kind": "constructor", + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 30, + "end": 76, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 4, + "column": 5 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 40, + "end": 70, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 38 + } + }, + "expression": { + "type": "CallExpression", + "start": 40, + "end": 69, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 37 + } + }, + "callee": { + "type": "Identifier", + "start": 40, + "end": 43, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + }, + "identifierName": "baz" + }, + "name": "baz" + }, + "arguments": [ + { + "type": "ThisExpression", + "start": 44, + "end": 48, + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "ArrowFunctionExpression", + "start": 50, + "end": 68, + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 36 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "CallExpression", + "start": 56, + "end": 68, + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 36 + } + }, + "callee": { + "type": "MemberExpression", + "start": 56, + "end": 65, + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 33 + } + }, + "object": { + "type": "Super", + "start": 56, + "end": 61, + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "property": { + "type": "Identifier", + "start": 62, + "end": 65, + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 33 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArgumentPlaceholder", + "start": 66, + "end": 67, + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ] + } + } + ] + } + } + ], + "directives": [] + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/input.js new file mode 100644 index 000000000000..58db6e91a913 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/input.js @@ -0,0 +1,3 @@ +foo(?,x,?) + +bar.foo(?, x, ?) diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/options.json new file mode 100644 index 000000000000..87414aef43de --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["partialApplication"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/output.json b/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/output.json new file mode 100644 index 000000000000..29f5266444a5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/for-any-arg/output.json @@ -0,0 +1,260 @@ +{ + "type": "File", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 16 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "CallExpression", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "callee": { + "type": "Identifier", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "arguments": [ + { + "type": "ArgumentPlaceholder", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "x" + }, + "name": "x" + }, + { + "type": "ArgumentPlaceholder", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 12, + "end": 28, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 16 + } + }, + "expression": { + "type": "CallExpression", + "start": 12, + "end": 28, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 16 + } + }, + "callee": { + "type": "MemberExpression", + "start": 12, + "end": 19, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + }, + "object": { + "type": "Identifier", + "start": 12, + "end": 15, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "property": { + "type": "Identifier", + "start": 16, + "end": 19, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArgumentPlaceholder", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Identifier", + "start": 23, + "end": 24, + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + }, + "identifierName": "x" + }, + "name": "x" + }, + { + "type": "ArgumentPlaceholder", + "start": 26, + "end": 27, + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/input.js new file mode 100644 index 000000000000..c689537246d2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/input.js @@ -0,0 +1,3 @@ +foo(x,?) + +bar.foo(x,?) diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/options.json new file mode 100644 index 000000000000..87414aef43de --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["partialApplication"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/output.json b/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/output.json new file mode 100644 index 000000000000..d90ab651eebf --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/from-left/output.json @@ -0,0 +1,230 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "expression": { + "type": "CallExpression", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "callee": { + "type": "Identifier", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "arguments": [ + { + "type": "Identifier", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "x" + }, + "name": "x" + }, + { + "type": "ArgumentPlaceholder", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 10, + "end": 22, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "expression": { + "type": "CallExpression", + "start": 10, + "end": 22, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "callee": { + "type": "MemberExpression", + "start": 10, + "end": 17, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + }, + "object": { + "type": "Identifier", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "property": { + "type": "Identifier", + "start": 14, + "end": 17, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "computed": false + }, + "arguments": [ + { + "type": "Identifier", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + }, + "identifierName": "x" + }, + "name": "x" + }, + { + "type": "ArgumentPlaceholder", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/input.js new file mode 100644 index 000000000000..b566c1df5b1b --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/input.js @@ -0,0 +1,3 @@ +foo(?,x) + +bar.foo(?,x) diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/options.json new file mode 100644 index 000000000000..87414aef43de --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["partialApplication"] +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/output.json b/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/output.json new file mode 100644 index 000000000000..ec82545ec334 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/from-right/output.json @@ -0,0 +1,230 @@ +{ + "type": "File", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "expression": { + "type": "CallExpression", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "callee": { + "type": "Identifier", + "start": 0, + "end": 3, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "arguments": [ + { + "type": "ArgumentPlaceholder", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + } + }, + { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "x" + }, + "name": "x" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 10, + "end": 22, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "expression": { + "type": "CallExpression", + "start": 10, + "end": 22, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "callee": { + "type": "MemberExpression", + "start": 10, + "end": 17, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + }, + "object": { + "type": "Identifier", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 3 + }, + "identifierName": "bar" + }, + "name": "bar" + }, + "property": { + "type": "Identifier", + "start": 14, + "end": 17, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + }, + "identifierName": "foo" + }, + "name": "foo" + }, + "computed": false + }, + "arguments": [ + { + "type": "ArgumentPlaceholder", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Identifier", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + }, + "identifierName": "x" + }, + "name": "x" + } + ] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/in-SuperCall/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/in-SuperCall/input.js new file mode 100644 index 000000000000..eac2ab9cb775 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/in-SuperCall/input.js @@ -0,0 +1,6 @@ +class Foo extends Bar { + constructor(x){ + super(x, 1, ?, ?); + this.x = x; + } +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/in-SuperCall/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/in-SuperCall/options.json new file mode 100644 index 000000000000..58192a87fd99 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/in-SuperCall/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["partialApplication"], + "throws": "Unexpected argument placeholder (3:16)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/in-new/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/in-new/input.js new file mode 100644 index 000000000000..36314ea52964 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/in-new/input.js @@ -0,0 +1 @@ +new bar(x, ?, 2, ?) diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/in-new/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/in-new/options.json new file mode 100644 index 000000000000..3b09c84c03eb --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/in-new/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["partialApplication"], + "throws": "Unexpected argument placeholder (1:11)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-binary-expression/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-binary-expression/input.js new file mode 100644 index 000000000000..a511c8bf7d89 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-binary-expression/input.js @@ -0,0 +1 @@ +? + x diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-binary-expression/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-binary-expression/options.json new file mode 100644 index 000000000000..8abbd078986f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-binary-expression/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["partialApplication"], + "throws": "Unexpected token (1:0)" +} diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-method-call/input.js b/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-method-call/input.js new file mode 100644 index 000000000000..3308d8780855 --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-method-call/input.js @@ -0,0 +1 @@ +?.f() diff --git a/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-method-call/options.json b/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-method-call/options.json new file mode 100644 index 000000000000..8abbd078986f --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/partial-application/top-level-argument-method-call/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["partialApplication"], + "throws": "Unexpected token (1:0)" +} diff --git a/packages/babel-plugin-syntax-partial-application/.npmignore b/packages/babel-plugin-syntax-partial-application/.npmignore new file mode 100644 index 000000000000..f9806945836e --- /dev/null +++ b/packages/babel-plugin-syntax-partial-application/.npmignore @@ -0,0 +1,3 @@ +src +test +*.log diff --git a/packages/babel-plugin-syntax-partial-application/README.md b/packages/babel-plugin-syntax-partial-application/README.md new file mode 100644 index 000000000000..d50284617998 --- /dev/null +++ b/packages/babel-plugin-syntax-partial-application/README.md @@ -0,0 +1,19 @@ +# @babel/plugin-syntax-partial-application + +> Allow parsing of optional properties + +See our website [@babel/plugin-syntax-partial-application](https://babeljs.io/docs/en/next/babel-plugin-syntax-partial-application.html) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/plugin-syntax-partial-application +``` + +or using yarn: + +```sh +yarn add @babel/plugin-syntax-partial-application --dev +``` diff --git a/packages/babel-plugin-syntax-partial-application/package.json b/packages/babel-plugin-syntax-partial-application/package.json new file mode 100644 index 000000000000..603cc408c815 --- /dev/null +++ b/packages/babel-plugin-syntax-partial-application/package.json @@ -0,0 +1,23 @@ +{ + "name": "@babel/plugin-syntax-partial-application", + "version": "7.2.0", + "description": "Allow parsing of partial application syntax", + "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-partial-application", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "lib/index.js", + "keywords": [ + "babel-plugin" + ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + }, + "devDependencies": { + "@babel/core": "^7.2.0" + } +} diff --git a/packages/babel-plugin-syntax-partial-application/src/index.js b/packages/babel-plugin-syntax-partial-application/src/index.js new file mode 100644 index 000000000000..aafcfc315e2a --- /dev/null +++ b/packages/babel-plugin-syntax-partial-application/src/index.js @@ -0,0 +1,13 @@ +import { declare } from "@babel/helper-plugin-utils"; + +export default declare(api => { + api.assertVersion(7); + + return { + name: "syntax-partial-application", + + manipulateOptions(opts, parserOpts) { + parserOpts.plugins.push("partialApplication"); + }, + }; +}); diff --git a/packages/babel-types/src/asserts/generated/index.js b/packages/babel-types/src/asserts/generated/index.js index 890e3d6e8d3d..34a6a125a252 100644 --- a/packages/babel-types/src/asserts/generated/index.js +++ b/packages/babel-types/src/asserts/generated/index.js @@ -660,6 +660,12 @@ export function assertParenthesizedExpression( ): void { assert("ParenthesizedExpression", node, opts); } +export function assertArgumentPlaceholder( + node: Object, + opts?: Object = {}, +): void { + assert("ArgumentPlaceholder", node, opts); +} export function assertAwaitExpression(node: Object, opts?: Object = {}): void { assert("AwaitExpression", node, opts); } diff --git a/packages/babel-types/src/builders/generated/index.js b/packages/babel-types/src/builders/generated/index.js index a77b43cbb613..6b787e0bb3f8 100644 --- a/packages/babel-types/src/builders/generated/index.js +++ b/packages/babel-types/src/builders/generated/index.js @@ -596,6 +596,10 @@ export function ParenthesizedExpression(...args: Array): Object { return builder("ParenthesizedExpression", ...args); } export { ParenthesizedExpression as parenthesizedExpression }; +export function ArgumentPlaceholder(...args: Array): Object { + return builder("ArgumentPlaceholder", ...args); +} +export { ArgumentPlaceholder as argumentPlaceholder }; export function AwaitExpression(...args: Array): Object { return builder("AwaitExpression", ...args); } diff --git a/packages/babel-types/src/definitions/core.js b/packages/babel-types/src/definitions/core.js index a92e8d2725b8..214fa6ccd451 100644 --- a/packages/babel-types/src/definitions/core.js +++ b/packages/babel-types/src/definitions/core.js @@ -138,7 +138,12 @@ defineType("CallExpression", { validate: chain( assertValueType("array"), assertEach( - assertNodeType("Expression", "SpreadElement", "JSXNamespacedName"), + assertNodeType( + "Expression", + "SpreadElement", + "JSXNamespacedName", + "ArgumentPlaceholder", + ), ), ), }, diff --git a/packages/babel-types/src/definitions/experimental.js b/packages/babel-types/src/definitions/experimental.js index 6498e9c329e3..ed088af74bd6 100644 --- a/packages/babel-types/src/definitions/experimental.js +++ b/packages/babel-types/src/definitions/experimental.js @@ -10,6 +10,8 @@ import { classMethodOrDeclareMethodCommon, } from "./es2015"; +defineType("ArgumentPlaceholder", {}); + defineType("AwaitExpression", { builder: ["argument"], visitor: ["argument"], diff --git a/packages/babel-types/src/validators/generated/index.js b/packages/babel-types/src/validators/generated/index.js index ab746105189c..c23ddcf11d97 100644 --- a/packages/babel-types/src/validators/generated/index.js +++ b/packages/babel-types/src/validators/generated/index.js @@ -2093,6 +2093,20 @@ export function isParenthesizedExpression( return false; } +export function isArgumentPlaceholder(node: ?Object, opts?: Object): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "ArgumentPlaceholder") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} export function isAwaitExpression(node: ?Object, opts?: Object): boolean { if (!node) return false; From d832c0f434f1c272ad7af3a333b306e6227aa720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 5 Mar 2019 00:45:42 +0100 Subject: [PATCH 344/563] Add parser support for placeholders (#9364) --- .../babel-parser/src/parser/expression.js | 13 +- packages/babel-parser/src/parser/statement.js | 45 +-- packages/babel-parser/src/parser/util.js | 7 + packages/babel-parser/src/plugin-utils.js | 9 +- .../babel-parser/src/plugins/placeholders.js | 315 ++++++++++++++++++ packages/babel-parser/src/types.js | 17 + .../failure-spaces/options.json | 2 +- .../failure-spaces/options.json | 2 +- .../placeholders/_errors/no-plugin/input.js | 1 + .../_errors/no-plugin/options.json | 4 + .../placeholders/_errors/space-after/input.js | 1 + .../_errors/space-after/options.json | 4 + .../_errors/space-before/input.js | 1 + .../_errors/space-before/options.json | 4 + .../arrow/async-parenless/input.js | 1 + .../arrow/async-parenless/options.json | 4 + .../placeholders/arrow/async/input.js | 1 + .../placeholders/arrow/async/output.json | 136 ++++++++ .../arrow/sync-parenless/input.js | 1 + .../arrow/sync-parenless/options.json | 4 + .../fixtures/placeholders/arrow/sync/input.js | 1 + .../placeholders/arrow/sync/output.json | 136 ++++++++ .../class/body_expression/input.js | 1 + .../class/body_expression/output.json | 116 +++++++ .../class/body_statement/input.js | 1 + .../class/body_statement/output.json | 101 ++++++ .../placeholders/class/decorators/input.js | 2 + .../class/decorators/options.json | 6 + .../placeholders/class/decorators/output.json | 134 ++++++++ .../placeholders/class/id-body/input.js | 1 + .../placeholders/class/id-body/output.json | 117 +++++++ .../placeholders/class/id-super-body/input.js | 1 + .../class/id-super-body/output.json | 149 +++++++++ .../placeholders/class/id-super/input.js | 1 + .../placeholders/class/id-super/output.json | 132 ++++++++ .../placeholders/class/id_expression/input.js | 1 + .../class/id_expression/output.json | 132 ++++++++ .../placeholders/class/id_statement/input.js | 1 + .../class/id_statement/output.json | 100 ++++++ .../placeholders/class/super/input.js | 1 + .../placeholders/class/super/output.json | 116 +++++++ .../placeholders/export/declaration/input.js | 1 + .../export/declaration/output.json | 100 ++++++ .../export/default-default-from/input.js | 1 + .../export/default-default-from/options.json | 7 + .../export/default-named-from-2/input.js | 1 + .../export/default-named-from-2/options.json | 7 + .../export/default-named-from-3/input.js | 1 + .../export/default-named-from-3/options.json | 7 + .../export/default-named-from/input.js | 1 + .../export/default-named-from/options.json | 7 + .../export/named-alias-2/input.js | 1 + .../export/named-alias-2/output.json | 119 +++++++ .../export/named-alias-3/input.js | 1 + .../export/named-alias-3/output.json | 135 ++++++++ .../placeholders/export/named-alias/input.js | 1 + .../export/named-alias/output.json | 119 +++++++ .../placeholders/export/named-from-2/input.js | 1 + .../export/named-from-2/output.json | 135 ++++++++ .../placeholders/export/named-from-3/input.js | 1 + .../export/named-from-3/output.json | 167 ++++++++++ .../export/named-from-alias-2/input.js | 1 + .../export/named-from-alias-2/output.json | 138 ++++++++ .../export/named-from-alias-3/input.js | 1 + .../export/named-from-alias-3/output.json | 154 +++++++++ .../export/named-from-alias/input.js | 1 + .../export/named-from-alias/output.json | 138 ++++++++ .../placeholders/export/named-from/input.js | 1 + .../export/named-from/output.json | 154 +++++++++ .../placeholders/export/named/input.js | 1 + .../placeholders/export/named/output.json | 135 ++++++++ .../fixtures/placeholders/export/options.json | 4 + .../placeholders/export/star-from-2/input.js | 1 + .../export/star-from-2/options.json | 7 + .../placeholders/export/star-from-3/input.js | 1 + .../export/star-from-3/options.json | 7 + .../placeholders/export/star-from/input.js | 1 + .../placeholders/export/star-from/output.json | 83 +++++ .../placeholders/expression/01/input.js | 1 + .../placeholders/expression/01/output.json | 182 ++++++++++ .../placeholders/expression/options.json | 3 + .../placeholders/function/body/input.js | 1 + .../placeholders/function/body/output.json | 103 ++++++ .../function/id-params-body/input.js | 1 + .../function/id-params-body/output.json | 186 +++++++++++ .../function/id_declaration/input.js | 1 + .../function/id_declaration/output.json | 103 ++++++ .../function/id_expression/input.js | 1 + .../function/id_expression/output.json | 135 ++++++++ .../placeholders/function/param/input.js | 1 + .../placeholders/function/param/output.json | 121 +++++++ .../import/default-file/input.mjs | 1 + .../import/default-file/output.json | 133 ++++++++ .../import/default-named-2/input.mjs | 1 + .../import/default-named-2/output.json | 169 ++++++++++ .../import/default-named-3/input.mjs | 1 + .../import/default-named-3/output.json | 201 +++++++++++ .../import/default-named/input.mjs | 1 + .../import/default-named/output.json | 185 ++++++++++ .../import/default-star-2/input.mjs | 1 + .../import/default-star-2/output.json | 152 +++++++++ .../import/default-star-3/input.mjs | 1 + .../import/default-star-3/output.json | 168 ++++++++++ .../import/default-star/input.mjs | 1 + .../import/default-star/output.json | 152 +++++++++ .../placeholders/import/default/input.mjs | 1 + .../placeholders/import/default/output.json | 120 +++++++ .../placeholders/import/file-empty/input.mjs | 1 + .../import/file-empty/output.json | 84 +++++ .../placeholders/import/file/input.mjs | 1 + .../placeholders/import/file/output.json | 84 +++++ .../import/named-alias-2/input.mjs | 1 + .../import/named-alias-2/output.json | 137 ++++++++ .../import/named-alias-3/input.mjs | 1 + .../import/named-alias-3/output.json | 153 +++++++++ .../placeholders/import/named-alias/input.mjs | 1 + .../import/named-alias/output.json | 137 ++++++++ .../placeholders/import/named/input.mjs | 1 + .../placeholders/import/named/output.json | 153 +++++++++ .../fixtures/placeholders/import/options.json | 4 + .../placeholders/import/star/input.mjs | 1 + .../placeholders/import/star/output.json | 120 +++++++ .../fixtures/placeholders/labels/asi/input.js | 4 + .../placeholders/labels/asi/output.json | 169 ++++++++++ .../placeholders/labels/break/input.js | 3 + .../placeholders/labels/break/output.json | 133 ++++++++ .../placeholders/labels/continue/input.js | 3 + .../placeholders/labels/continue/output.json | 168 ++++++++++ .../labels/labeled-statement/input.js | 1 + .../labels/labeled-statement/output.json | 118 +++++++ .../test/fixtures/placeholders/options.json | 3 + .../placeholders/statement/asi/input.js | 2 + .../placeholders/statement/asi/output.json | 101 ++++++ .../placeholders/statement/nested/input.js | 1 + .../placeholders/statement/nested/output.json | 104 ++++++ .../placeholders/statement/top-level/input.js | 1 + .../statement/top-level/output.json | 68 ++++ .../try/try-catch-finally/input.js | 1 + .../try/try-catch-finally/output.json | 166 +++++++++ .../try/with-catch-param/input.js | 1 + .../try/with-catch-param/output.json | 150 +++++++++ 141 files changed, 7630 insertions(+), 36 deletions(-) create mode 100644 packages/babel-parser/src/plugins/placeholders.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/_errors/space-after/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/_errors/space-after/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/_errors/space-before/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/_errors/space-before/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/arrow/async-parenless/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/arrow/async-parenless/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/arrow/async/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/arrow/async/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/arrow/sync-parenless/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/arrow/sync-parenless/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/arrow/sync/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/arrow/sync/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/body_expression/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/body_expression/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/body_statement/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/body_statement/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/decorators/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/decorators/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/decorators/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id-body/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id-body/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id-super-body/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id-super-body/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id-super/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id-super/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id_expression/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id_expression/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id_statement/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/id_statement/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/super/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/class/super/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/declaration/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/declaration/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/default-default-from/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/default-default-from/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/default-named-from-2/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/default-named-from-2/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/default-named-from-3/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/default-named-from-3/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/default-named-from/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/default-named-from/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-alias-2/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-alias-2/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-alias-3/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-alias-3/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-alias/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-alias/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-2/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-2/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-3/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-3/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-2/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-2/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-3/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-3/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-alias/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from-alias/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named-from/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/named/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/star-from-2/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/star-from-2/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/star-from-3/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/star-from-3/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/star-from/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/export/star-from/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/expression/01/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/expression/01/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/expression/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/body/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/body/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/id-params-body/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/id-params-body/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/id_declaration/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/id_declaration/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/id_expression/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/id_expression/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/param/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/function/param/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-file/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-file/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-named-2/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-named-2/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-named-3/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-named-3/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-named/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-named/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-star-2/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-star-2/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-star-3/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-star-3/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-star/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default-star/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/default/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/file-empty/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/file-empty/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/file/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/file/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/named-alias-2/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/named-alias-2/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/named-alias-3/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/named-alias-3/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/named-alias/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/named-alias/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/named/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/named/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/star/input.mjs create mode 100644 packages/babel-parser/test/fixtures/placeholders/import/star/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/labels/asi/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/labels/asi/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/labels/break/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/labels/break/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/labels/continue/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/labels/continue/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/labels/labeled-statement/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/labels/labeled-statement/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/options.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/statement/asi/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/statement/asi/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/statement/nested/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/statement/nested/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/statement/top-level/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/statement/top-level/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/try/try-catch-finally/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/try/try-catch-finally/output.json create mode 100644 packages/babel-parser/test/fixtures/placeholders/try/with-catch-param/input.js create mode 100644 packages/babel-parser/test/fixtures/placeholders/try/with-catch-param/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 516aba3aa2db..b9195c3a9751 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -1048,19 +1048,8 @@ export default class ExpressionParser extends LValParser { if (isPrivate) { this.expectOnePlugin(["classPrivateProperties", "classPrivateMethods"]); const node = this.startNode(); - const columnHashEnd = this.state.end; this.next(); - const columnIdentifierStart = this.state.start; - - const spacesBetweenHashAndIdentifier = - columnIdentifierStart - columnHashEnd; - if (spacesBetweenHashAndIdentifier != 0) { - this.raise( - columnIdentifierStart, - "Unexpected space between # and identifier", - ); - } - + this.assertNoSpace("Unexpected space between # and identifier"); node.id = this.parseIdentifier(true); return this.finishNode(node, "PrivateName"); } else { diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 22cc9b24a001..47b3c9f2c7f0 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -416,15 +416,24 @@ export default class StatementParser extends ExpressionParser { if (this.isLineTerminator()) { node.label = null; - } else if (!this.match(tt.name)) { - this.unexpected(); } else { node.label = this.parseIdentifier(); this.semicolon(); } - // Verify that there is an actual destination to break or - // continue to. + this.verifyBreakContinue(node, keyword); + + return this.finishNode( + node, + isBreak ? "BreakStatement" : "ContinueStatement", + ); + } + + verifyBreakContinue( + node: N.BreakStatement | N.ContinueStatement, + keyword: string, + ) { + const isBreak = keyword === "break"; let i; for (i = 0; i < this.state.labels.length; ++i) { const lab = this.state.labels[i]; @@ -436,10 +445,6 @@ export default class StatementParser extends ExpressionParser { if (i === this.state.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } - return this.finishNode( - node, - isBreak ? "BreakStatement" : "ContinueStatement", - ); } parseDebuggerStatement(node: N.DebuggerStatement): N.DebuggerStatement { @@ -800,7 +805,7 @@ export default class StatementParser extends ExpressionParser { parseExpressionStatement( node: N.ExpressionStatement, expr: N.Expression, - ): N.ExpressionStatement { + ): N.Statement { node.expression = expr; this.semicolon(); return this.finishNode(node, "ExpressionStatement"); @@ -1024,6 +1029,7 @@ export default class StatementParser extends ExpressionParser { ): T { const isStatement = statement & FUNC_STATEMENT; const isHangingStatement = statement & FUNC_HANGING_STATEMENT; + const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID); this.initFunction(node, isAsync); @@ -1036,10 +1042,7 @@ export default class StatementParser extends ExpressionParser { node.generator = this.eat(tt.star); if (isStatement) { - node.id = - statement & FUNC_NULLABLE_ID && !this.match(tt.name) - ? null - : this.parseIdentifier(); + node.id = this.parseFunctionId(requireId); if (node.id && !isHangingStatement) { // If it is a regular function declaration in sloppy mode, then it is // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding @@ -1067,7 +1070,7 @@ export default class StatementParser extends ExpressionParser { this.scope.enter(functionFlags(node.async, node.generator)); if (!isStatement) { - node.id = this.match(tt.name) ? this.parseIdentifier() : null; + node.id = this.parseFunctionId(); } this.parseFunctionParams(node); @@ -1090,6 +1093,10 @@ export default class StatementParser extends ExpressionParser { return node; } + parseFunctionId(requireId?: boolean): ?N.Identifier { + return requireId || this.match(tt.name) ? this.parseIdentifier() : null; + } + parseFunctionParams(node: N.Function, allowModifiers?: boolean): void { const oldInParameters = this.state.inParameters; this.state.inParameters = true; @@ -1122,7 +1129,7 @@ export default class StatementParser extends ExpressionParser { this.parseClassId(node, isStatement, optionalId); this.parseClassSuper(node); - this.parseClassBody(node); + node.body = this.parseClassBody(!!node.superClass); this.state.strict = oldStrict; @@ -1149,7 +1156,7 @@ export default class StatementParser extends ExpressionParser { ); } - parseClassBody(node: N.Class): void { + parseClassBody(constructorAllowsSuper: boolean): N.ClassBody { this.state.classLevel++; const state = { hadConstructor: false }; @@ -1159,8 +1166,6 @@ export default class StatementParser extends ExpressionParser { this.expect(tt.braceL); - const constructorAllowsSuper = node.superClass !== null; - // For the smartPipelines plugin: Disable topic references from outer // contexts within the class body. They are permitted in test expressions, // outside of the class body. @@ -1212,9 +1217,9 @@ export default class StatementParser extends ExpressionParser { ); } - node.body = this.finishNode(classBody, "ClassBody"); - this.state.classLevel--; + + return this.finishNode(classBody, "ClassBody"); } parseClassMember( diff --git a/packages/babel-parser/src/parser/util.js b/packages/babel-parser/src/parser/util.js index 6d5234793b6d..1681078d40f9 100644 --- a/packages/babel-parser/src/parser/util.js +++ b/packages/babel-parser/src/parser/util.js @@ -113,6 +113,13 @@ export default class UtilParser extends Tokenizer { this.eat(type) || this.unexpected(pos, type); } + // Throws if the current token and the prev one are separated by a space. + assertNoSpace(message: string = "Unexpected space."): void { + if (this.state.start > this.state.lastTokEnd) { + this.raise(this.state.lastTokEnd, message); + } + } + // Raise an unexpected token error. Can take the expected token type // instead of a message string. diff --git a/packages/babel-parser/src/plugin-utils.js b/packages/babel-parser/src/plugin-utils.js index d92800f46427..d9e368e666b9 100644 --- a/packages/babel-parser/src/plugin-utils.js +++ b/packages/babel-parser/src/plugin-utils.js @@ -88,12 +88,17 @@ import estree from "./plugins/estree"; import flow from "./plugins/flow"; import jsx from "./plugins/jsx"; import typescript from "./plugins/typescript"; +import placeholders from "./plugins/placeholders"; -// NOTE: estree must load first; flow and typescript must load last. -export const mixinPluginNames = ["estree", "jsx", "flow", "typescript"]; +// NOTE: order is important. estree must come first; placeholders must come last. export const mixinPlugins: { [name: string]: MixinPlugin } = { estree, jsx, flow, typescript, + placeholders, }; + +export const mixinPluginNames: $ReadOnlyArray = Object.keys( + mixinPlugins, +); diff --git a/packages/babel-parser/src/plugins/placeholders.js b/packages/babel-parser/src/plugins/placeholders.js new file mode 100644 index 000000000000..50956c9bb83b --- /dev/null +++ b/packages/babel-parser/src/plugins/placeholders.js @@ -0,0 +1,315 @@ +// @flow + +import * as charCodes from "charcodes"; + +import { types as tt, TokenType } from "../tokenizer/types"; +import type Parser from "../parser"; +import * as N from "../types"; + +tt.placeholder = new TokenType("%%", { startsExpr: true }); + +export type PlaceholderTypes = + | "Identifier" + | "StringLiteral" + | "Expression" + | "Statement" + | "Declaration" + | "BlockStatement" + | "ClassBody" + | "Pattern"; + +// $PropertyType doesn't support enums. Use a fake "switch" (GetPlaceholderNode) +//type MaybePlaceholder = $PropertyType | N.Placeholder; + +type _Switch = $Call< + ( + $ElementType<$ElementType, 0>, + ) => $ElementType<$ElementType, 1>, + Value, +>; +type $Switch = _Switch; + +type NodeOf = $Switch< + T, + [ + ["Identifier", N.Identifier], + ["StringLiteral", N.StringLiteral], + ["Expression", N.Expression], + ["Statement", N.Statement], + ["Declaration", N.Declaration], + ["BlockStatement", N.BlockStatement], + ["ClassBody", N.ClassBody], + ["Pattern", N.Pattern], + ], +>; + +// Placeholder breaks everything, because its type is incompatible with +// the substituted nodes. +type MaybePlaceholder = NodeOf; // | Placeholder + +export default (superClass: Class): Class => + class extends superClass { + parsePlaceholder( + expectedNode: T, + ): /*?N.Placeholder*/ ?MaybePlaceholder { + if (this.match(tt.placeholder)) { + const node = this.startNode(); + this.next(); + this.assertNoSpace("Unexpected space in placeholder."); + + // We can't use this.parseIdentifier because + // we don't want nested placeholders. + node.name = super.parseIdentifier(/* liberal */ true); + + this.assertNoSpace("Unexpected space in placeholder."); + this.expect(tt.placeholder); + return this.finishPlaceholder(node, expectedNode); + } + } + + finishPlaceholder( + node: N.Node, + expectedNode: T, + ): /*N.Placeholder*/ MaybePlaceholder { + node.expectedNode = expectedNode; + return this.finishNode(node, "Placeholder"); + } + + /* ============================================================ * + * tokenizer/index.js * + * ============================================================ */ + + getTokenFromCode(code: number) { + if ( + code === charCodes.percentSign && + this.state.input.charCodeAt(this.state.pos + 1) === + charCodes.percentSign + ) { + return this.finishOp(tt.placeholder, 2); + } + + return super.getTokenFromCode(...arguments); + } + + /* ============================================================ * + * parser/expression.js * + * ============================================================ */ + + parseExprAtom(): MaybePlaceholder<"Expression"> { + return ( + this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments) + ); + } + + parseIdentifier(): MaybePlaceholder<"Identifier"> { + // NOTE: This function only handles identifiers outside of + // expressions and binding patterns, since they are already + // handled by the parseExprAtom and parseBindingAtom functions. + // This is needed, for example, to parse "class %%NAME%% {}". + return ( + this.parsePlaceholder("Identifier") || + super.parseIdentifier(...arguments) + ); + } + + checkReservedWord(word: string): void { + // Sometimes we call #checkReservedWord(node.name), expecting + // that node is an Identifier. If it is a Placeholder, name + // will be undefined. + if (word !== undefined) super.checkReservedWord(...arguments); + } + + /* ============================================================ * + * parser/lval.js * + * ============================================================ */ + + parseBindingAtom(): MaybePlaceholder<"Pattern"> { + return ( + this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments) + ); + } + + checkLVal(expr: N.Expression): void { + if (expr.type !== "Placeholder") super.checkLVal(...arguments); + } + + toAssignable(node: N.Node): N.Node { + if ( + node && + node.type === "Placeholder" && + node.expectedNode === "Expression" + ) { + node.expectedNode = "Pattern"; + return node; + } + return super.toAssignable(...arguments); + } + + /* ============================================================ * + * parser/statement.js * + * ============================================================ */ + + verifyBreakContinue(node: N.BreakStatement | N.ContinueStatement) { + if (node.label && node.label.type === "Placeholder") return; + super.verifyBreakContinue(...arguments); + } + + parseExpressionStatement( + node: MaybePlaceholder<"Statement">, + expr: N.Expression, + ): MaybePlaceholder<"Statement"> { + if ( + expr.type !== "Placeholder" || + (expr.extra && expr.extra.parenthesized) + ) { + return super.parseExpressionStatement(...arguments); + } + + if (this.match(tt.colon)) { + const stmt: N.LabeledStatement = node; + stmt.label = this.finishPlaceholder(expr, "Identifier"); + this.next(); + stmt.body = this.parseStatement("label"); + return this.finishNode(stmt, "LabeledStatement"); + } + + this.semicolon(); + + node.name = expr.name; + return this.finishPlaceholder(node, "Statement"); + } + + parseBlock(): MaybePlaceholder<"BlockStatement"> { + return ( + this.parsePlaceholder("BlockStatement") || + super.parseBlock(...arguments) + ); + } + + parseFunctionId(): ?MaybePlaceholder<"Identifier"> { + return ( + this.parsePlaceholder("Identifier") || + super.parseFunctionId(...arguments) + ); + } + + parseClass( + node: T, + isStatement: /* T === ClassDeclaration */ boolean, + optionalId?: boolean, + ): T { + const type = isStatement ? "ClassDeclaration" : "ClassExpression"; + + this.next(); + this.takeDecorators(node); + + const placeholder = this.parsePlaceholder("Identifier"); + if (placeholder) { + if ( + this.match(tt._extends) || + this.match(tt.placeholder) || + this.match(tt.braceL) + ) { + node.id = placeholder; + } else if (optionalId || !isStatement) { + node.id = null; + node.body = this.finishPlaceholder(placeholder, "ClassBody"); + return this.finishNode(node, type); + } else { + this.unexpected(null, "A class name is required"); + } + } else { + this.parseClassId(node, isStatement, optionalId); + } + + this.parseClassSuper(node); + node.body = + this.parsePlaceholder("ClassBody") || + this.parseClassBody(!!node.superClass); + return this.finishNode(node, type); + } + + parseExport(node: N.Node): N.Node { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseExport(...arguments); + + if (!this.isContextual("from") && !this.match(tt.comma)) { + // export %%DECL%%; + node.specifiers = []; + node.source = null; + node.declaration = this.finishPlaceholder(placeholder, "Declaration"); + return this.finishNode(node, "ExportNamedDeclaration"); + } + + // export %%NAME%% from "foo"; + this.expectPlugin("exportDefaultFrom"); + const specifier = this.startNode(); + specifier.exported = placeholder; + node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + + return super.parseExport(node); + } + + maybeParseExportDefaultSpecifier(node: N.Node): boolean { + if (node.specifiers && node.specifiers.length > 0) { + // "export %%NAME%%" has already been parsed by #parseExport. + return true; + } + return super.maybeParseExportDefaultSpecifier(...arguments); + } + + checkExport(node: N.ExportNamedDeclaration): void { + const { specifiers } = node; + if (specifiers && specifiers.length) { + node.specifiers = specifiers.filter( + node => node.exported.type === "Placeholder", + ); + } + super.checkExport(node); + node.specifiers = specifiers; + } + + parseImport( + node: N.Node, + ): N.ImportDeclaration | N.TsImportEqualsDeclaration { + const placeholder = this.parsePlaceholder("Identifier"); + if (!placeholder) return super.parseImport(...arguments); + + node.specifiers = []; + + if (!this.isContextual("from") && !this.match(tt.comma)) { + // import %%STRING%%; + node.source = this.finishPlaceholder(placeholder, "StringLiteral"); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + + // import %%DEFAULT%% ... + const specifier = this.startNodeAtNode(placeholder); + specifier.local = placeholder; + this.finishNode(specifier, "ImportDefaultSpecifier"); + node.specifiers.push(specifier); + + if (this.eat(tt.comma)) { + // import %%DEFAULT%%, * as ... + const hasStarImport = this.maybeParseStarImportSpecifier(node); + + // import %%DEFAULT%%, { ... + if (!hasStarImport) this.parseNamedImportSpecifiers(node); + } + + this.expectContextual("from"); + node.source = this.parseImportSource(); + this.semicolon(); + return this.finishNode(node, "ImportDeclaration"); + } + + parseImportSource(): MaybePlaceholder<"StringLiteral"> { + // import ... from %%STRING%%; + + return ( + this.parsePlaceholder("StringLiteral") || + super.parseImportSource(...arguments) + ); + } + }; diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index 35d79c9ce925..e3a584ddc32c 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -3,6 +3,7 @@ import type { SourceType } from "./options"; import type { Token } from "./tokenizer"; import type { SourceLocation } from "./util/location"; +import type { PlaceholderTypes } from "./plugins/placeholders"; /* * If making any changes to the AST, update: @@ -45,6 +46,7 @@ export type Pattern = | ArrayPattern | RestElement | AssignmentPattern; +//| Placeholder<"Pattern">; export type Declaration = | VariableDeclaration | ClassDeclaration @@ -53,6 +55,8 @@ export type Declaration = | TsTypeAliasDeclaration | TsEnumDeclaration | TsModuleDeclaration; +// | Placeholder<"Declaration">; + export type DeclarationBase = NodeBase & { // TypeScript allows declarations to be prefixed by `declare`. //TODO: a FunctionDeclaration is never "declare", because it's a TSDeclareFunction instead. @@ -78,6 +82,7 @@ export type Identifier = PatternBase & { // TypeScript only. Used in case of an optional parameter. optional?: ?true, }; +// | Placeholder<"Identifier">; export type PrivateName = NodeBase & { type: "PrivateName", @@ -188,6 +193,7 @@ export type BlockStatement = NodeBase & { body: Array, // TODO: $ReadOnlyArray directives: $ReadOnlyArray, }; +// | Placeholder<"BlockStatement">; export type EmptyStatement = NodeBase & { type: "EmptyStatement", @@ -682,6 +688,7 @@ export type ClassBody = NodeBase & { type: "ClassBody", body: Array, // TODO: $ReadOnlyArray }; +// | Placeholder<"ClassBody">; export type ClassMemberBase = NodeBase & HasDecorators & { @@ -1421,6 +1428,16 @@ export type TsNonNullExpression = NodeBase & { expression: Expression, }; +// ================ +// Babel placeholders %%foo%% +// ================ + +export type Placeholder = NodeBase & { + type: "Placeholder", + id: Identifier, + expectedNode: N, +}; + // ================ // Other // ================ diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/options.json index f8dba0c322fe..9914950b66fe 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-methods/failure-spaces/options.json @@ -1,4 +1,4 @@ { - "throws": "Unexpected space between # and identifier (2:5)", + "throws": "Unexpected space between # and identifier (2:3)", "plugins": ["classPrivateMethods"] } diff --git a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/options.json b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/options.json index f8dba0c322fe..9914950b66fe 100644 --- a/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/options.json +++ b/packages/babel-parser/test/fixtures/experimental/class-private-properties/failure-spaces/options.json @@ -1,4 +1,4 @@ { - "throws": "Unexpected space between # and identifier (2:5)", + "throws": "Unexpected space between # and identifier (2:3)", "plugins": ["classPrivateMethods"] } diff --git a/packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/input.js b/packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/input.js new file mode 100644 index 000000000000..06d3e367d700 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/input.js @@ -0,0 +1 @@ +%%FOO%% \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/options.json b/packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/options.json new file mode 100644 index 000000000000..550f9f8667f9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/_errors/no-plugin/options.json @@ -0,0 +1,4 @@ +{ + "plugins": [], + "throws": "Unexpected token (1:0)" +} diff --git a/packages/babel-parser/test/fixtures/placeholders/_errors/space-after/input.js b/packages/babel-parser/test/fixtures/placeholders/_errors/space-after/input.js new file mode 100644 index 000000000000..f0c987242e5f --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/_errors/space-after/input.js @@ -0,0 +1 @@ +%%FOO %% \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/_errors/space-after/options.json b/packages/babel-parser/test/fixtures/placeholders/_errors/space-after/options.json new file mode 100644 index 000000000000..a307a35df63e --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/_errors/space-after/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["placeholders"], + "throws": "Unexpected space in placeholder. (1:5)" +} diff --git a/packages/babel-parser/test/fixtures/placeholders/_errors/space-before/input.js b/packages/babel-parser/test/fixtures/placeholders/_errors/space-before/input.js new file mode 100644 index 000000000000..a19d1a7dbf9d --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/_errors/space-before/input.js @@ -0,0 +1 @@ +%% FOO%% \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/_errors/space-before/options.json b/packages/babel-parser/test/fixtures/placeholders/_errors/space-before/options.json new file mode 100644 index 000000000000..2d76cfab7e2f --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/_errors/space-before/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["placeholders"], + "throws": "Unexpected space in placeholder. (1:2)" +} diff --git a/packages/babel-parser/test/fixtures/placeholders/arrow/async-parenless/input.js b/packages/babel-parser/test/fixtures/placeholders/arrow/async-parenless/input.js new file mode 100644 index 000000000000..ccc04f6163ae --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/arrow/async-parenless/input.js @@ -0,0 +1 @@ +async %%PARAM%% => %%BODY%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/arrow/async-parenless/options.json b/packages/babel-parser/test/fixtures/placeholders/arrow/async-parenless/options.json new file mode 100644 index 000000000000..91e2a8bf915b --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/arrow/async-parenless/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["placeholders"], + "throws": "Unexpected token, expected \";\" (1:6)" +} diff --git a/packages/babel-parser/test/fixtures/placeholders/arrow/async/input.js b/packages/babel-parser/test/fixtures/placeholders/arrow/async/input.js new file mode 100644 index 000000000000..5620afc8e818 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/arrow/async/input.js @@ -0,0 +1 @@ +async (%%PARAM%%) => %%BODY%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/arrow/async/output.json b/packages/babel-parser/test/fixtures/placeholders/arrow/async/output.json new file mode 100644 index 000000000000..4896328afde6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/arrow/async/output.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "id": null, + "generator": false, + "async": true, + "params": [ + { + "type": "Placeholder", + "start": 7, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + }, + "identifierName": "PARAM" + }, + "name": "PARAM" + }, + "expectedNode": "Pattern" + } + ], + "body": { + "type": "Placeholder", + "start": 21, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "name": { + "type": "Identifier", + "start": 23, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 27 + }, + "identifierName": "BODY" + }, + "name": "BODY" + }, + "expectedNode": "Expression" + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/arrow/sync-parenless/input.js b/packages/babel-parser/test/fixtures/placeholders/arrow/sync-parenless/input.js new file mode 100644 index 000000000000..03f6196a9250 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/arrow/sync-parenless/input.js @@ -0,0 +1 @@ +%%PARAM%% => %%BODY%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/arrow/sync-parenless/options.json b/packages/babel-parser/test/fixtures/placeholders/arrow/sync-parenless/options.json new file mode 100644 index 000000000000..c2a8ef725fb6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/arrow/sync-parenless/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["placeholders"], + "throws": "Unexpected token, expected \";\" (1:10)" +} diff --git a/packages/babel-parser/test/fixtures/placeholders/arrow/sync/input.js b/packages/babel-parser/test/fixtures/placeholders/arrow/sync/input.js new file mode 100644 index 000000000000..d8e462edb43b --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/arrow/sync/input.js @@ -0,0 +1 @@ +(%%PARAM%%) => %%BODY%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/arrow/sync/output.json b/packages/babel-parser/test/fixtures/placeholders/arrow/sync/output.json new file mode 100644 index 000000000000..6b0b16b70fc7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/arrow/sync/output.json @@ -0,0 +1,136 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Placeholder", + "start": 1, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "name": { + "type": "Identifier", + "start": 3, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 8 + }, + "identifierName": "PARAM" + }, + "name": "PARAM" + }, + "expectedNode": "Pattern" + } + ], + "body": { + "type": "Placeholder", + "start": 15, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": { + "type": "Identifier", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "BODY" + }, + "name": "BODY" + }, + "expectedNode": "Expression" + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/body_expression/input.js b/packages/babel-parser/test/fixtures/placeholders/class/body_expression/input.js new file mode 100644 index 000000000000..9789bed118e8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/body_expression/input.js @@ -0,0 +1 @@ +void class %%BODY%% \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/body_expression/output.json b/packages/babel-parser/test/fixtures/placeholders/class/body_expression/output.json new file mode 100644 index 000000000000..61966406846e --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/body_expression/output.json @@ -0,0 +1,116 @@ +{ + "type": "File", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "expression": { + "type": "UnaryExpression", + "start": 0, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "operator": "void", + "prefix": true, + "argument": { + "type": "ClassExpression", + "start": 5, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "id": null, + "body": { + "type": "Placeholder", + "start": 11, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 19 + } + }, + "name": { + "type": "Identifier", + "start": 13, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "BODY" + }, + "name": "BODY" + }, + "expectedNode": "ClassBody" + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/body_statement/input.js b/packages/babel-parser/test/fixtures/placeholders/class/body_statement/input.js new file mode 100644 index 000000000000..4447c2e48a44 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/body_statement/input.js @@ -0,0 +1 @@ +class Cl %%BODY%% \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/body_statement/output.json b/packages/babel-parser/test/fixtures/placeholders/class/body_statement/output.json new file mode 100644 index 000000000000..70f4a636520e --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/body_statement/output.json @@ -0,0 +1,101 @@ +{ + "type": "File", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 8 + }, + "identifierName": "Cl" + }, + "name": "Cl" + }, + "superClass": null, + "body": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "BODY" + }, + "name": "BODY" + }, + "expectedNode": "ClassBody" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/decorators/input.js b/packages/babel-parser/test/fixtures/placeholders/class/decorators/input.js new file mode 100644 index 000000000000..33732420452f --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/decorators/input.js @@ -0,0 +1,2 @@ +@(%%FOO%%) +class A {} diff --git a/packages/babel-parser/test/fixtures/placeholders/class/decorators/options.json b/packages/babel-parser/test/fixtures/placeholders/class/decorators/options.json new file mode 100644 index 000000000000..f453a9b6abdc --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/decorators/options.json @@ -0,0 +1,6 @@ +{ + "plugins": [ + "placeholders", + ["decorators", { "decoratorsBeforeExport": true }] + ] +} diff --git a/packages/babel-parser/test/fixtures/placeholders/class/decorators/output.json b/packages/babel-parser/test/fixtures/placeholders/class/decorators/output.json new file mode 100644 index 000000000000..459dacb35f2c --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/decorators/output.json @@ -0,0 +1,134 @@ +{ + "type": "File", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "decorators": [ + { + "type": "Decorator", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "Placeholder", + "start": 2, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "name": { + "type": "Identifier", + "start": 4, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "FOO" + }, + "name": "FOO" + }, + "expectedNode": "Expression" + } + } + ], + "id": { + "type": "Identifier", + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "A" + }, + "name": "A" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 19, + "end": 21, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id-body/input.js b/packages/babel-parser/test/fixtures/placeholders/class/id-body/input.js new file mode 100644 index 000000000000..e6b57a64de88 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id-body/input.js @@ -0,0 +1 @@ +class %%ID%% %%BODY%% diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id-body/output.json b/packages/babel-parser/test/fixtures/placeholders/class/id-body/output.json new file mode 100644 index 000000000000..0fe8c71d4786 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id-body/output.json @@ -0,0 +1,117 @@ +{ + "type": "File", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "id": { + "type": "Placeholder", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": { + "type": "Identifier", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "ID" + }, + "name": "ID" + }, + "expectedNode": "Identifier" + }, + "superClass": null, + "body": { + "type": "Placeholder", + "start": 13, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "name": { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + }, + "identifierName": "BODY" + }, + "name": "BODY" + }, + "expectedNode": "ClassBody" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id-super-body/input.js b/packages/babel-parser/test/fixtures/placeholders/class/id-super-body/input.js new file mode 100644 index 000000000000..30edd2cb7f4a --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id-super-body/input.js @@ -0,0 +1 @@ +class %%ID%% extends %%SUPER%% %%BODY%% diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id-super-body/output.json b/packages/babel-parser/test/fixtures/placeholders/class/id-super-body/output.json new file mode 100644 index 000000000000..b891fe7c30d9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id-super-body/output.json @@ -0,0 +1,149 @@ +{ + "type": "File", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "id": { + "type": "Placeholder", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": { + "type": "Identifier", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "ID" + }, + "name": "ID" + }, + "expectedNode": "Identifier" + }, + "superClass": { + "type": "Placeholder", + "start": 21, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "name": { + "type": "Identifier", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "SUPER" + }, + "name": "SUPER" + }, + "expectedNode": "Expression" + }, + "body": { + "type": "Placeholder", + "start": 31, + "end": 39, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 39 + } + }, + "name": { + "type": "Identifier", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 37 + }, + "identifierName": "BODY" + }, + "name": "BODY" + }, + "expectedNode": "ClassBody" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id-super/input.js b/packages/babel-parser/test/fixtures/placeholders/class/id-super/input.js new file mode 100644 index 000000000000..2f652c767e90 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id-super/input.js @@ -0,0 +1 @@ +class %%ID%% extends %%SUPER%% {} diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id-super/output.json b/packages/babel-parser/test/fixtures/placeholders/class/id-super/output.json new file mode 100644 index 000000000000..cde4f271b7de --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id-super/output.json @@ -0,0 +1,132 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "id": { + "type": "Placeholder", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": { + "type": "Identifier", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "ID" + }, + "name": "ID" + }, + "expectedNode": "Identifier" + }, + "superClass": { + "type": "Placeholder", + "start": 21, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "name": { + "type": "Identifier", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "SUPER" + }, + "name": "SUPER" + }, + "expectedNode": "Expression" + }, + "body": { + "type": "ClassBody", + "start": 31, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id_expression/input.js b/packages/babel-parser/test/fixtures/placeholders/class/id_expression/input.js new file mode 100644 index 000000000000..d6f2785faa3a --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id_expression/input.js @@ -0,0 +1 @@ +void class %%ID%% {} diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id_expression/output.json b/packages/babel-parser/test/fixtures/placeholders/class/id_expression/output.json new file mode 100644 index 000000000000..8ec0bdeaeb64 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id_expression/output.json @@ -0,0 +1,132 @@ +{ + "type": "File", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "expression": { + "type": "UnaryExpression", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "operator": "void", + "prefix": true, + "argument": { + "type": "ClassExpression", + "start": 5, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "id": { + "type": "Placeholder", + "start": 11, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 13, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "ID" + }, + "name": "ID" + }, + "expectedNode": "Identifier" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 18, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "body": [] + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id_statement/input.js b/packages/babel-parser/test/fixtures/placeholders/class/id_statement/input.js new file mode 100644 index 000000000000..b56524d15767 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id_statement/input.js @@ -0,0 +1 @@ +class %%ID%% {} diff --git a/packages/babel-parser/test/fixtures/placeholders/class/id_statement/output.json b/packages/babel-parser/test/fixtures/placeholders/class/id_statement/output.json new file mode 100644 index 000000000000..61ecc899ae22 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/id_statement/output.json @@ -0,0 +1,100 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "id": { + "type": "Placeholder", + "start": 6, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 12 + } + }, + "name": { + "type": "Identifier", + "start": 8, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "ID" + }, + "name": "ID" + }, + "expectedNode": "Identifier" + }, + "superClass": null, + "body": { + "type": "ClassBody", + "start": 13, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/class/super/input.js b/packages/babel-parser/test/fixtures/placeholders/class/super/input.js new file mode 100644 index 000000000000..ce315dbaa68c --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/super/input.js @@ -0,0 +1 @@ +class Cl extends %%SUPER%% {} diff --git a/packages/babel-parser/test/fixtures/placeholders/class/super/output.json b/packages/babel-parser/test/fixtures/placeholders/class/super/output.json new file mode 100644 index 000000000000..966639d5d351 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/class/super/output.json @@ -0,0 +1,116 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ClassDeclaration", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 8 + }, + "identifierName": "Cl" + }, + "name": "Cl" + }, + "superClass": { + "type": "Placeholder", + "start": 17, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "name": { + "type": "Identifier", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + }, + "identifierName": "SUPER" + }, + "name": "SUPER" + }, + "expectedNode": "Expression" + }, + "body": { + "type": "ClassBody", + "start": 27, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "body": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/declaration/input.js b/packages/babel-parser/test/fixtures/placeholders/export/declaration/input.js new file mode 100644 index 000000000000..e06647491291 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/declaration/input.js @@ -0,0 +1 @@ +export %%DECL%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/declaration/output.json b/packages/babel-parser/test/fixtures/placeholders/export/declaration/output.json new file mode 100644 index 000000000000..a0cc4fb21147 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/declaration/output.json @@ -0,0 +1,100 @@ +{ + "type": "File", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "specifiers": [], + "source": null, + "declaration": { + "type": "Placeholder", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "DECL" + }, + "name": "DECL" + }, + "expectedNode": "Declaration" + } + }, + { + "type": "EmptyStatement", + "start": 15, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/default-default-from/input.js b/packages/babel-parser/test/fixtures/placeholders/export/default-default-from/input.js new file mode 100644 index 000000000000..e9e71b211a7a --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/default-default-from/input.js @@ -0,0 +1 @@ +export default from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/default-default-from/options.json b/packages/babel-parser/test/fixtures/placeholders/export/default-default-from/options.json new file mode 100644 index 000000000000..b3f883263b7b --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/default-default-from/options.json @@ -0,0 +1,7 @@ +{ + "plugins": [ + "placeholders" + ], + "sourceType": "module", + "throws": "This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:7)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-2/input.js b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-2/input.js new file mode 100644 index 000000000000..acd2d28ed6e0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-2/input.js @@ -0,0 +1 @@ +export %%NAME%% from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-2/options.json b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-2/options.json new file mode 100644 index 000000000000..404b94bc6cbe --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-2/options.json @@ -0,0 +1,7 @@ +{ + "plugins": [ + "placeholders" + ], + "sourceType": "module", + "throws": "This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:16)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-3/input.js b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-3/input.js new file mode 100644 index 000000000000..a2ac20ea9b87 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-3/input.js @@ -0,0 +1 @@ +export %%NAME%% from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-3/options.json b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-3/options.json new file mode 100644 index 000000000000..404b94bc6cbe --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from-3/options.json @@ -0,0 +1,7 @@ +{ + "plugins": [ + "placeholders" + ], + "sourceType": "module", + "throws": "This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:16)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/default-named-from/input.js b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from/input.js new file mode 100644 index 000000000000..2ec55e24cc45 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from/input.js @@ -0,0 +1 @@ +export name from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/default-named-from/options.json b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from/options.json new file mode 100644 index 000000000000..b3f883263b7b --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/default-named-from/options.json @@ -0,0 +1,7 @@ +{ + "plugins": [ + "placeholders" + ], + "sourceType": "module", + "throws": "This experimental syntax requires enabling the parser plugin: 'exportDefaultFrom' (1:7)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-alias-2/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-alias-2/input.js new file mode 100644 index 000000000000..ccc71c84d0ab --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-alias-2/input.js @@ -0,0 +1 @@ +export { name as %%ALIAS%% }; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-alias-2/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-alias-2/output.json new file mode 100644 index 000000000000..3da7a5b3b526 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-alias-2/output.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "name" + }, + "name": "name" + }, + "exported": { + "type": "Placeholder", + "start": 17, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "name": { + "type": "Identifier", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + }, + "identifierName": "ALIAS" + }, + "name": "ALIAS" + }, + "expectedNode": "Identifier" + } + } + ], + "source": null, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-alias-3/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-alias-3/input.js new file mode 100644 index 000000000000..ebe9a78080c2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-alias-3/input.js @@ -0,0 +1 @@ +export { %%NAME%% as %%ALIAS%% }; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-alias-3/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-alias-3/output.json new file mode 100644 index 000000000000..79bf65de1189 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-alias-3/output.json @@ -0,0 +1,135 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "local": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + }, + "exported": { + "type": "Placeholder", + "start": 21, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "name": { + "type": "Identifier", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "ALIAS" + }, + "name": "ALIAS" + }, + "expectedNode": "Identifier" + } + } + ], + "source": null, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-alias/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-alias/input.js new file mode 100644 index 000000000000..ff261bd263d7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-alias/input.js @@ -0,0 +1 @@ +export { %%NAME%% as alias }; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-alias/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-alias/output.json new file mode 100644 index 000000000000..ddabad2b64c7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-alias/output.json @@ -0,0 +1,119 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "local": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + }, + "exported": { + "type": "Identifier", + "start": 21, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + }, + "identifierName": "alias" + }, + "name": "alias" + } + } + ], + "source": null, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-2/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-from-2/input.js new file mode 100644 index 000000000000..3bf7f2ff4f01 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-2/input.js @@ -0,0 +1 @@ +export { name } from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-2/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-from-2/output.json new file mode 100644 index 000000000000..5d7db268eb97 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-2/output.json @@ -0,0 +1,135 @@ +{ + "type": "File", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "name" + }, + "name": "name" + }, + "exported": { + "type": "Identifier", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "name" + }, + "name": "name" + } + } + ], + "source": { + "type": "Placeholder", + "start": 21, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "name": { + "type": "Identifier", + "start": 23, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 27 + }, + "identifierName": "FILE" + }, + "name": "FILE" + }, + "expectedNode": "StringLiteral" + }, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-3/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-from-3/input.js new file mode 100644 index 000000000000..0a86eaa83ca1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-3/input.js @@ -0,0 +1 @@ +export { %%NAME%% } from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-3/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-from-3/output.json new file mode 100644 index 000000000000..f89643fc0a7b --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-3/output.json @@ -0,0 +1,167 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "local": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + }, + "exported": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "Placeholder", + "start": 25, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "name": { + "type": "Identifier", + "start": 27, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 31 + }, + "identifierName": "FILE" + }, + "name": "FILE" + }, + "expectedNode": "StringLiteral" + }, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-2/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-2/input.js new file mode 100644 index 000000000000..7a9d409e879f --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-2/input.js @@ -0,0 +1 @@ +export { name as %%ALIAS%% } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-2/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-2/output.json new file mode 100644 index 000000000000..637b5256b845 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-2/output.json @@ -0,0 +1,138 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "name" + }, + "name": "name" + }, + "exported": { + "type": "Placeholder", + "start": 17, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "name": { + "type": "Identifier", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 24 + }, + "identifierName": "ALIAS" + }, + "name": "ALIAS" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 34, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + }, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-3/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-3/input.js new file mode 100644 index 000000000000..0fc04b4a2f46 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-3/input.js @@ -0,0 +1 @@ +export { %%NAME%% as %%ALIAS%% } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-3/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-3/output.json new file mode 100644 index 000000000000..2fd4cc6f3a99 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias-3/output.json @@ -0,0 +1,154 @@ +{ + "type": "File", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "local": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + }, + "exported": { + "type": "Placeholder", + "start": 21, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "name": { + "type": "Identifier", + "start": 23, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "ALIAS" + }, + "name": "ALIAS" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 38, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 44 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + }, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias/input.js new file mode 100644 index 000000000000..395bf89474cb --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias/input.js @@ -0,0 +1 @@ +export { %%NAME%% as alias } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias/output.json new file mode 100644 index 000000000000..34e8dd6e3a04 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from-alias/output.json @@ -0,0 +1,138 @@ +{ + "type": "File", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "local": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + }, + "exported": { + "type": "Identifier", + "start": 21, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + }, + "identifierName": "alias" + }, + "name": "alias" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 34, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + }, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named-from/input.js new file mode 100644 index 000000000000..c74dfbf297a1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from/input.js @@ -0,0 +1 @@ +export { %%NAME%% } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named-from/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named-from/output.json new file mode 100644 index 000000000000..5c9ae8516dd4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named-from/output.json @@ -0,0 +1,154 @@ +{ + "type": "File", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "local": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + }, + "exported": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 25, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + }, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named/input.js b/packages/babel-parser/test/fixtures/placeholders/export/named/input.js new file mode 100644 index 000000000000..03cd701e264c --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named/input.js @@ -0,0 +1 @@ +export { %%NAME%% }; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/named/output.json b/packages/babel-parser/test/fixtures/placeholders/export/named/output.json new file mode 100644 index 000000000000..67b0f0429f79 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/named/output.json @@ -0,0 +1,135 @@ +{ + "type": "File", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "local": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + }, + "exported": { + "type": "Placeholder", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "NAME" + }, + "name": "NAME" + }, + "expectedNode": "Identifier" + } + } + ], + "source": null, + "declaration": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/options.json b/packages/babel-parser/test/fixtures/placeholders/export/options.json new file mode 100644 index 000000000000..e7ff26ae7014 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["placeholders", "exportDefaultFrom", "exportNamespaceFrom"], + "sourceType": "module" +} diff --git a/packages/babel-parser/test/fixtures/placeholders/export/star-from-2/input.js b/packages/babel-parser/test/fixtures/placeholders/export/star-from-2/input.js new file mode 100644 index 000000000000..8a6343daed94 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/star-from-2/input.js @@ -0,0 +1 @@ +export * as %%STAR%% from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/star-from-2/options.json b/packages/babel-parser/test/fixtures/placeholders/export/star-from-2/options.json new file mode 100644 index 000000000000..8c48e4fc0f20 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/star-from-2/options.json @@ -0,0 +1,7 @@ +{ + "plugins": [ + "placeholders" + ], + "sourceType": "module", + "throws": "This experimental syntax requires enabling the parser plugin: 'exportNamespaceFrom' (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/star-from-3/input.js b/packages/babel-parser/test/fixtures/placeholders/export/star-from-3/input.js new file mode 100644 index 000000000000..cdb724867079 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/star-from-3/input.js @@ -0,0 +1 @@ +export * as %%STAR%% from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/star-from-3/options.json b/packages/babel-parser/test/fixtures/placeholders/export/star-from-3/options.json new file mode 100644 index 000000000000..8c48e4fc0f20 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/star-from-3/options.json @@ -0,0 +1,7 @@ +{ + "plugins": [ + "placeholders" + ], + "sourceType": "module", + "throws": "This experimental syntax requires enabling the parser plugin: 'exportNamespaceFrom' (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/export/star-from/input.js b/packages/babel-parser/test/fixtures/placeholders/export/star-from/input.js new file mode 100644 index 000000000000..87fc3f0d362d --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/star-from/input.js @@ -0,0 +1 @@ +export * from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/export/star-from/output.json b/packages/babel-parser/test/fixtures/placeholders/export/star-from/output.json new file mode 100644 index 000000000000..87a301212145 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/export/star-from/output.json @@ -0,0 +1,83 @@ +{ + "type": "File", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExportAllDeclaration", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "source": { + "type": "Placeholder", + "start": 14, + "end": 22, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 22 + } + }, + "name": { + "type": "Identifier", + "start": 16, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + }, + "identifierName": "FILE" + }, + "name": "FILE" + }, + "expectedNode": "StringLiteral" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/expression/01/input.js b/packages/babel-parser/test/fixtures/placeholders/expression/01/input.js new file mode 100644 index 000000000000..1ca196c41413 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/expression/01/input.js @@ -0,0 +1 @@ +%%FOO%% + %%BAR%%(%%BAZ%%); \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/expression/01/output.json b/packages/babel-parser/test/fixtures/placeholders/expression/01/output.json new file mode 100644 index 000000000000..9de9b6f77eda --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/expression/01/output.json @@ -0,0 +1,182 @@ +{ + "type": "File", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "expression": { + "type": "BinaryExpression", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "left": { + "type": "Placeholder", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "name": { + "type": "Identifier", + "start": 2, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "FOO" + }, + "name": "FOO" + }, + "expectedNode": "Expression" + }, + "operator": "+", + "right": { + "type": "CallExpression", + "start": 10, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "callee": { + "type": "Placeholder", + "start": 10, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 12, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "BAR" + }, + "name": "BAR" + }, + "expectedNode": "Expression" + }, + "arguments": [ + { + "type": "Placeholder", + "start": 18, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "name": { + "type": "Identifier", + "start": 20, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "BAZ" + }, + "name": "BAZ" + }, + "expectedNode": "Expression" + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/expression/options.json b/packages/babel-parser/test/fixtures/placeholders/expression/options.json new file mode 100644 index 000000000000..92404e501295 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/expression/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["placeholders"] +} diff --git a/packages/babel-parser/test/fixtures/placeholders/function/body/input.js b/packages/babel-parser/test/fixtures/placeholders/function/body/input.js new file mode 100644 index 000000000000..09db19b409a7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/body/input.js @@ -0,0 +1 @@ +function f() %%BODY%% diff --git a/packages/babel-parser/test/fixtures/placeholders/function/body/output.json b/packages/babel-parser/test/fixtures/placeholders/function/body/output.json new file mode 100644 index 000000000000..3139e3132180 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/body/output.json @@ -0,0 +1,103 @@ +{ + "type": "File", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "f" + }, + "name": "f" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "Placeholder", + "start": 13, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "name": { + "type": "Identifier", + "start": 15, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + }, + "identifierName": "BODY" + }, + "name": "BODY" + }, + "expectedNode": "BlockStatement" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/function/id-params-body/input.js b/packages/babel-parser/test/fixtures/placeholders/function/id-params-body/input.js new file mode 100644 index 000000000000..9f0f6607b320 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/id-params-body/input.js @@ -0,0 +1 @@ +function %%ID%%(%%PARAM%%, %%PARAM%%) %%BODY%% diff --git a/packages/babel-parser/test/fixtures/placeholders/function/id-params-body/output.json b/packages/babel-parser/test/fixtures/placeholders/function/id-params-body/output.json new file mode 100644 index 000000000000..fd6205f7ab8e --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/id-params-body/output.json @@ -0,0 +1,186 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "id": { + "type": "Placeholder", + "start": 9, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "ID" + }, + "name": "ID" + }, + "expectedNode": "Identifier" + }, + "generator": false, + "async": false, + "params": [ + { + "type": "Placeholder", + "start": 16, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "name": { + "type": "Identifier", + "start": 18, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 23 + }, + "identifierName": "PARAM" + }, + "name": "PARAM" + }, + "expectedNode": "Pattern" + }, + { + "type": "Placeholder", + "start": 27, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "name": { + "type": "Identifier", + "start": 29, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 34 + }, + "identifierName": "PARAM" + }, + "name": "PARAM" + }, + "expectedNode": "Pattern" + } + ], + "body": { + "type": "Placeholder", + "start": 38, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "name": { + "type": "Identifier", + "start": 40, + "end": 44, + "loc": { + "start": { + "line": 1, + "column": 40 + }, + "end": { + "line": 1, + "column": 44 + }, + "identifierName": "BODY" + }, + "name": "BODY" + }, + "expectedNode": "BlockStatement" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/function/id_declaration/input.js b/packages/babel-parser/test/fixtures/placeholders/function/id_declaration/input.js new file mode 100644 index 000000000000..8afee84ad037 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/id_declaration/input.js @@ -0,0 +1 @@ +function %%ID%%() {} diff --git a/packages/babel-parser/test/fixtures/placeholders/function/id_declaration/output.json b/packages/babel-parser/test/fixtures/placeholders/function/id_declaration/output.json new file mode 100644 index 000000000000..a07531190e7d --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/id_declaration/output.json @@ -0,0 +1,103 @@ +{ + "type": "File", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "id": { + "type": "Placeholder", + "start": 9, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "ID" + }, + "name": "ID" + }, + "expectedNode": "Identifier" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 18, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/function/id_expression/input.js b/packages/babel-parser/test/fixtures/placeholders/function/id_expression/input.js new file mode 100644 index 000000000000..69db50cde003 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/id_expression/input.js @@ -0,0 +1 @@ +void function %%ID%%() {}; diff --git a/packages/babel-parser/test/fixtures/placeholders/function/id_expression/output.json b/packages/babel-parser/test/fixtures/placeholders/function/id_expression/output.json new file mode 100644 index 000000000000..1bc90cefa7fc --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/id_expression/output.json @@ -0,0 +1,135 @@ +{ + "type": "File", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 26 + } + }, + "expression": { + "type": "UnaryExpression", + "start": 0, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "operator": "void", + "prefix": true, + "argument": { + "type": "FunctionExpression", + "start": 5, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "id": { + "type": "Placeholder", + "start": 14, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "name": { + "type": "Identifier", + "start": 16, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 18 + }, + "identifierName": "ID" + }, + "name": "ID" + }, + "expectedNode": "Identifier" + }, + "generator": false, + "async": false, + "params": [], + "body": { + "type": "BlockStatement", + "start": 23, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 25 + } + }, + "body": [], + "directives": [] + } + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/function/param/input.js b/packages/babel-parser/test/fixtures/placeholders/function/param/input.js new file mode 100644 index 000000000000..f06bb0431462 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/param/input.js @@ -0,0 +1 @@ +function f(%%PARAM%%) {} diff --git a/packages/babel-parser/test/fixtures/placeholders/function/param/output.json b/packages/babel-parser/test/fixtures/placeholders/function/param/output.json new file mode 100644 index 000000000000..9026f46c40db --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/function/param/output.json @@ -0,0 +1,121 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "FunctionDeclaration", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "id": { + "type": "Identifier", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + }, + "identifierName": "f" + }, + "name": "f" + }, + "generator": false, + "async": false, + "params": [ + { + "type": "Placeholder", + "start": 11, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "name": { + "type": "Identifier", + "start": 13, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 18 + }, + "identifierName": "PARAM" + }, + "name": "PARAM" + }, + "expectedNode": "Pattern" + } + ], + "body": { + "type": "BlockStatement", + "start": 22, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "body": [], + "directives": [] + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-file/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/default-file/input.mjs new file mode 100644 index 000000000000..d4e434f4ccec --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-file/input.mjs @@ -0,0 +1 @@ +import %%DEFAULT%% from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-file/output.json b/packages/babel-parser/test/fixtures/placeholders/import/default-file/output.json new file mode 100644 index 000000000000..b4fdc7e984fa --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-file/output.json @@ -0,0 +1,133 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "local": { + "type": "Placeholder", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "DEFAULT" + }, + "name": "DEFAULT" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "Placeholder", + "start": 24, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "name": { + "type": "Identifier", + "start": 26, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 30 + }, + "identifierName": "FILE" + }, + "name": "FILE" + }, + "expectedNode": "StringLiteral" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-named-2/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/default-named-2/input.mjs new file mode 100644 index 000000000000..aca97b71e5c4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-named-2/input.mjs @@ -0,0 +1 @@ +import %%DEFAULT%%, { named } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-named-2/output.json b/packages/babel-parser/test/fixtures/placeholders/import/default-named-2/output.json new file mode 100644 index 000000000000..3ec417645be0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-named-2/output.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "local": { + "type": "Placeholder", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "DEFAULT" + }, + "name": "DEFAULT" + }, + "expectedNode": "Identifier" + } + }, + { + "type": "ImportSpecifier", + "start": 22, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "imported": { + "type": "Identifier", + "start": 22, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + }, + "identifierName": "named" + }, + "name": "named" + }, + "local": { + "type": "Identifier", + "start": 22, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + }, + "identifierName": "named" + }, + "name": "named" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 35, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-named-3/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/default-named-3/input.mjs new file mode 100644 index 000000000000..42d98a2cb7ba --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-named-3/input.mjs @@ -0,0 +1 @@ +import %%DEFAULT%%, { %%NAMED%% } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-named-3/output.json b/packages/babel-parser/test/fixtures/placeholders/import/default-named-3/output.json new file mode 100644 index 000000000000..e681ffb18417 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-named-3/output.json @@ -0,0 +1,201 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "local": { + "type": "Placeholder", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "DEFAULT" + }, + "name": "DEFAULT" + }, + "expectedNode": "Identifier" + } + }, + { + "type": "ImportSpecifier", + "start": 22, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "imported": { + "type": "Placeholder", + "start": 22, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "name": { + "type": "Identifier", + "start": 24, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + }, + "identifierName": "NAMED" + }, + "name": "NAMED" + }, + "expectedNode": "Identifier" + }, + "local": { + "type": "Placeholder", + "start": 22, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "name": { + "type": "Identifier", + "start": 24, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + }, + "identifierName": "NAMED" + }, + "name": "NAMED" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 39, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-named/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/default-named/input.mjs new file mode 100644 index 000000000000..5857bed1cd1d --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-named/input.mjs @@ -0,0 +1 @@ +import _default, { %%NAMED%% } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-named/output.json b/packages/babel-parser/test/fixtures/placeholders/import/default-named/output.json new file mode 100644 index 000000000000..62d764263d3d --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-named/output.json @@ -0,0 +1,185 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "_default" + }, + "name": "_default" + } + }, + { + "type": "ImportSpecifier", + "start": 19, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "imported": { + "type": "Placeholder", + "start": 19, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "name": { + "type": "Identifier", + "start": 21, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + }, + "identifierName": "NAMED" + }, + "name": "NAMED" + }, + "expectedNode": "Identifier" + }, + "local": { + "type": "Placeholder", + "start": 19, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "name": { + "type": "Identifier", + "start": 21, + "end": 26, + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + }, + "identifierName": "NAMED" + }, + "name": "NAMED" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 36, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-star-2/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/default-star-2/input.mjs new file mode 100644 index 000000000000..32a49347ad55 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-star-2/input.mjs @@ -0,0 +1 @@ +import _default, * as %%STAR%% from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-star-2/output.json b/packages/babel-parser/test/fixtures/placeholders/import/default-star-2/output.json new file mode 100644 index 000000000000..6fd8a2dbed1f --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-star-2/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 43 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "_default" + }, + "name": "_default" + } + }, + { + "type": "ImportNamespaceSpecifier", + "start": 17, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "local": { + "type": "Placeholder", + "start": 22, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "name": { + "type": "Identifier", + "start": 24, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "STAR" + }, + "name": "STAR" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 36, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-star-3/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/default-star-3/input.mjs new file mode 100644 index 000000000000..f2cafcebaea3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-star-3/input.mjs @@ -0,0 +1 @@ +import %%DEFAULT%%, * as %%STAR%% from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-star-3/output.json b/packages/babel-parser/test/fixtures/placeholders/import/default-star-3/output.json new file mode 100644 index 000000000000..a92281d0746a --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-star-3/output.json @@ -0,0 +1,168 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "local": { + "type": "Placeholder", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "DEFAULT" + }, + "name": "DEFAULT" + }, + "expectedNode": "Identifier" + } + }, + { + "type": "ImportNamespaceSpecifier", + "start": 20, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "local": { + "type": "Placeholder", + "start": 25, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "name": { + "type": "Identifier", + "start": 27, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 31 + }, + "identifierName": "STAR" + }, + "name": "STAR" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 39, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-star/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/default-star/input.mjs new file mode 100644 index 000000000000..97bb0fbb2083 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-star/input.mjs @@ -0,0 +1 @@ +import %%DEFAULT%%, * as star from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default-star/output.json b/packages/babel-parser/test/fixtures/placeholders/import/default-star/output.json new file mode 100644 index 000000000000..3976944a46bc --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default-star/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "local": { + "type": "Placeholder", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "DEFAULT" + }, + "name": "DEFAULT" + }, + "expectedNode": "Identifier" + } + }, + { + "type": "ImportNamespaceSpecifier", + "start": 20, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "local": { + "type": "Identifier", + "start": 25, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 29 + }, + "identifierName": "star" + }, + "name": "star" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 35, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/default/input.mjs new file mode 100644 index 000000000000..cbfc52e13d87 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default/input.mjs @@ -0,0 +1 @@ +import %%DEFAULT%% from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/default/output.json b/packages/babel-parser/test/fixtures/placeholders/import/default/output.json new file mode 100644 index 000000000000..4ff06895645b --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/default/output.json @@ -0,0 +1,120 @@ +{ + "type": "File", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "local": { + "type": "Placeholder", + "start": 7, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "DEFAULT" + }, + "name": "DEFAULT" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 24, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/file-empty/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/file-empty/input.mjs new file mode 100644 index 000000000000..1412ce08fe08 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/file-empty/input.mjs @@ -0,0 +1 @@ +import {} from %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/file-empty/output.json b/packages/babel-parser/test/fixtures/placeholders/import/file-empty/output.json new file mode 100644 index 000000000000..5690ee81f00f --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/file-empty/output.json @@ -0,0 +1,84 @@ +{ + "type": "File", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 24 + } + }, + "specifiers": [], + "source": { + "type": "Placeholder", + "start": 15, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": { + "type": "Identifier", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "FILE" + }, + "name": "FILE" + }, + "expectedNode": "StringLiteral" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/file/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/file/input.mjs new file mode 100644 index 000000000000..634197cbb739 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/file/input.mjs @@ -0,0 +1 @@ +import %%FILE%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/file/output.json b/packages/babel-parser/test/fixtures/placeholders/import/file/output.json new file mode 100644 index 000000000000..e33e48771a60 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/file/output.json @@ -0,0 +1,84 @@ +{ + "type": "File", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "specifiers": [], + "source": { + "type": "Placeholder", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + }, + "identifierName": "FILE" + }, + "name": "FILE" + }, + "expectedNode": "StringLiteral" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/named-alias-2/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/named-alias-2/input.mjs new file mode 100644 index 000000000000..114cf3db239c --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/named-alias-2/input.mjs @@ -0,0 +1 @@ +import { %%NAMED%% as alias } from "file"; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/named-alias-2/output.json b/packages/babel-parser/test/fixtures/placeholders/import/named-alias-2/output.json new file mode 100644 index 000000000000..c7d936e96c64 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/named-alias-2/output.json @@ -0,0 +1,137 @@ +{ + "type": "File", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "imported": { + "type": "Placeholder", + "start": 9, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "NAMED" + }, + "name": "NAMED" + }, + "expectedNode": "Identifier" + }, + "local": { + "type": "Identifier", + "start": 22, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + }, + "identifierName": "alias" + }, + "name": "alias" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 35, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/named-alias-3/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/named-alias-3/input.mjs new file mode 100644 index 000000000000..0531ff7d03a9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/named-alias-3/input.mjs @@ -0,0 +1 @@ +import { %%NAMED%% as %%ALIAS%% } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/named-alias-3/output.json b/packages/babel-parser/test/fixtures/placeholders/import/named-alias-3/output.json new file mode 100644 index 000000000000..bfae4a044410 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/named-alias-3/output.json @@ -0,0 +1,153 @@ +{ + "type": "File", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "imported": { + "type": "Placeholder", + "start": 9, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "NAMED" + }, + "name": "NAMED" + }, + "expectedNode": "Identifier" + }, + "local": { + "type": "Placeholder", + "start": 22, + "end": 31, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 31 + } + }, + "name": { + "type": "Identifier", + "start": 24, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + }, + "identifierName": "ALIAS" + }, + "name": "ALIAS" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 39, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 39 + }, + "end": { + "line": 1, + "column": 45 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/named-alias/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/named-alias/input.mjs new file mode 100644 index 000000000000..cc0bfd46c515 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/named-alias/input.mjs @@ -0,0 +1 @@ +import { named as %%ALIAS%% } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/named-alias/output.json b/packages/babel-parser/test/fixtures/placeholders/import/named-alias/output.json new file mode 100644 index 000000000000..5477bef4ca9e --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/named-alias/output.json @@ -0,0 +1,137 @@ +{ + "type": "File", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "imported": { + "type": "Identifier", + "start": 9, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 14 + }, + "identifierName": "named" + }, + "name": "named" + }, + "local": { + "type": "Placeholder", + "start": 18, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "name": { + "type": "Identifier", + "start": 20, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 25 + }, + "identifierName": "ALIAS" + }, + "name": "ALIAS" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 35, + "end": 41, + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 41 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/named/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/named/input.mjs new file mode 100644 index 000000000000..24d0c9bc5adf --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/named/input.mjs @@ -0,0 +1 @@ +import { %%NAMED%% } from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/named/output.json b/packages/babel-parser/test/fixtures/placeholders/import/named/output.json new file mode 100644 index 000000000000..9b3f08486a88 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/named/output.json @@ -0,0 +1,153 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "imported": { + "type": "Placeholder", + "start": 9, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "NAMED" + }, + "name": "NAMED" + }, + "expectedNode": "Identifier" + }, + "local": { + "type": "Placeholder", + "start": 9, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "name": { + "type": "Identifier", + "start": 11, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "NAMED" + }, + "name": "NAMED" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 26, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/import/options.json b/packages/babel-parser/test/fixtures/placeholders/import/options.json new file mode 100644 index 000000000000..986e9cefa93e --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["placeholders"], + "sourceType": "module" +} diff --git a/packages/babel-parser/test/fixtures/placeholders/import/star/input.mjs b/packages/babel-parser/test/fixtures/placeholders/import/star/input.mjs new file mode 100644 index 000000000000..df386a7c7ba7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/star/input.mjs @@ -0,0 +1 @@ +import * as %%STAR%% from "file"; diff --git a/packages/babel-parser/test/fixtures/placeholders/import/star/output.json b/packages/babel-parser/test/fixtures/placeholders/import/star/output.json new file mode 100644 index 000000000000..7ff6bfd05846 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/import/star/output.json @@ -0,0 +1,120 @@ +{ + "type": "File", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 33, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 33 + } + }, + "specifiers": [ + { + "type": "ImportNamespaceSpecifier", + "start": 7, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "local": { + "type": "Placeholder", + "start": 12, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "name": { + "type": "Identifier", + "start": 14, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 18 + }, + "identifierName": "STAR" + }, + "name": "STAR" + }, + "expectedNode": "Identifier" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 26, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "extra": { + "rawValue": "file", + "raw": "\"file\"" + }, + "value": "file" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/labels/asi/input.js b/packages/babel-parser/test/fixtures/placeholders/labels/asi/input.js new file mode 100644 index 000000000000..9c5f9fcc13d6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/labels/asi/input.js @@ -0,0 +1,4 @@ +loop: while (0) { + break + %%LABEL%%; +} diff --git a/packages/babel-parser/test/fixtures/placeholders/labels/asi/output.json b/packages/babel-parser/test/fixtures/placeholders/labels/asi/output.json new file mode 100644 index 000000000000..f1e2f1614781 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/labels/asi/output.json @@ -0,0 +1,169 @@ +{ + "type": "File", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "LabeledStatement", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "body": { + "type": "WhileStatement", + "start": 6, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "test": { + "type": "NumericLiteral", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + "body": { + "type": "BlockStatement", + "start": 16, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 4, + "column": 1 + } + }, + "body": [ + { + "type": "BreakStatement", + "start": 20, + "end": 25, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "label": null + }, + { + "type": "Placeholder", + "start": 28, + "end": 38, + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 12 + } + }, + "name": { + "type": "Identifier", + "start": 30, + "end": 35, + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 9 + }, + "identifierName": "LABEL" + }, + "name": "LABEL" + }, + "expectedNode": "Statement" + } + ], + "directives": [] + } + }, + "label": { + "type": "Identifier", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + }, + "identifierName": "loop" + }, + "name": "loop" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/labels/break/input.js b/packages/babel-parser/test/fixtures/placeholders/labels/break/input.js new file mode 100644 index 000000000000..bcc6f5bae986 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/labels/break/input.js @@ -0,0 +1,3 @@ +block: { + break %%LABEL%%; +} diff --git a/packages/babel-parser/test/fixtures/placeholders/labels/break/output.json b/packages/babel-parser/test/fixtures/placeholders/labels/break/output.json new file mode 100644 index 000000000000..ab4488d5a04c --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/labels/break/output.json @@ -0,0 +1,133 @@ +{ + "type": "File", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "LabeledStatement", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": { + "type": "BlockStatement", + "start": 7, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "BreakStatement", + "start": 11, + "end": 27, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 18 + } + }, + "label": { + "type": "Placeholder", + "start": 17, + "end": 26, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + }, + "name": { + "type": "Identifier", + "start": 19, + "end": 24, + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + }, + "identifierName": "LABEL" + }, + "name": "LABEL" + }, + "expectedNode": "Identifier" + } + } + ], + "directives": [] + }, + "label": { + "type": "Identifier", + "start": 0, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "block" + }, + "name": "block" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/labels/continue/input.js b/packages/babel-parser/test/fixtures/placeholders/labels/continue/input.js new file mode 100644 index 000000000000..52fd9da0d283 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/labels/continue/input.js @@ -0,0 +1,3 @@ +loop: while (0) { + continue %%LOOP%%; +} diff --git a/packages/babel-parser/test/fixtures/placeholders/labels/continue/output.json b/packages/babel-parser/test/fixtures/placeholders/labels/continue/output.json new file mode 100644 index 000000000000..b6876979197b --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/labels/continue/output.json @@ -0,0 +1,168 @@ +{ + "type": "File", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "LabeledStatement", + "start": 0, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": { + "type": "WhileStatement", + "start": 6, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "test": { + "type": "NumericLiteral", + "start": 13, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + "body": { + "type": "BlockStatement", + "start": 16, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "body": [ + { + "type": "ContinueStatement", + "start": 20, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "label": { + "type": "Placeholder", + "start": 29, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + }, + "name": { + "type": "Identifier", + "start": 31, + "end": 35, + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + }, + "identifierName": "LOOP" + }, + "name": "LOOP" + }, + "expectedNode": "Identifier" + } + } + ], + "directives": [] + } + }, + "label": { + "type": "Identifier", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + }, + "identifierName": "loop" + }, + "name": "loop" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/labels/labeled-statement/input.js b/packages/babel-parser/test/fixtures/placeholders/labels/labeled-statement/input.js new file mode 100644 index 000000000000..8bc65e46a765 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/labels/labeled-statement/input.js @@ -0,0 +1 @@ +%%FOO%%: 0; diff --git a/packages/babel-parser/test/fixtures/placeholders/labels/labeled-statement/output.json b/packages/babel-parser/test/fixtures/placeholders/labels/labeled-statement/output.json new file mode 100644 index 000000000000..597468988557 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/labels/labeled-statement/output.json @@ -0,0 +1,118 @@ +{ + "type": "File", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "LabeledStatement", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "label": { + "type": "Placeholder", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "name": { + "type": "Identifier", + "start": 2, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "FOO" + }, + "name": "FOO" + }, + "expectedNode": "Identifier" + }, + "body": { + "type": "ExpressionStatement", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 9, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/options.json b/packages/babel-parser/test/fixtures/placeholders/options.json new file mode 100644 index 000000000000..92404e501295 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["placeholders"] +} diff --git a/packages/babel-parser/test/fixtures/placeholders/statement/asi/input.js b/packages/babel-parser/test/fixtures/placeholders/statement/asi/input.js new file mode 100644 index 000000000000..deeb32f8f173 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/statement/asi/input.js @@ -0,0 +1,2 @@ +%%FOO%% +%%BAR%% diff --git a/packages/babel-parser/test/fixtures/placeholders/statement/asi/output.json b/packages/babel-parser/test/fixtures/placeholders/statement/asi/output.json new file mode 100644 index 000000000000..9980b76f599a --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/statement/asi/output.json @@ -0,0 +1,101 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "Placeholder", + "start": 0, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 7 + } + }, + "name": { + "type": "Identifier", + "start": 2, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "FOO" + }, + "name": "FOO" + }, + "expectedNode": "Statement" + }, + { + "type": "Placeholder", + "start": 8, + "end": 15, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 7 + } + }, + "name": { + "type": "Identifier", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 5 + }, + "identifierName": "BAR" + }, + "name": "BAR" + }, + "expectedNode": "Statement" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/statement/nested/input.js b/packages/babel-parser/test/fixtures/placeholders/statement/nested/input.js new file mode 100644 index 000000000000..6530842e22d9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/statement/nested/input.js @@ -0,0 +1 @@ +if (0) %%FOO%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/statement/nested/output.json b/packages/babel-parser/test/fixtures/placeholders/statement/nested/output.json new file mode 100644 index 000000000000..1f071964bf16 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/statement/nested/output.json @@ -0,0 +1,104 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "IfStatement", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "test": { + "type": "NumericLiteral", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + "consequent": { + "type": "Placeholder", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "name": { + "type": "Identifier", + "start": 9, + "end": 12, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 12 + }, + "identifierName": "FOO" + }, + "name": "FOO" + }, + "expectedNode": "Statement" + }, + "alternate": null + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/statement/top-level/input.js b/packages/babel-parser/test/fixtures/placeholders/statement/top-level/input.js new file mode 100644 index 000000000000..34e9906e93b8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/statement/top-level/input.js @@ -0,0 +1 @@ +%%FOO%%; diff --git a/packages/babel-parser/test/fixtures/placeholders/statement/top-level/output.json b/packages/babel-parser/test/fixtures/placeholders/statement/top-level/output.json new file mode 100644 index 000000000000..d5f19f4035d0 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/statement/top-level/output.json @@ -0,0 +1,68 @@ +{ + "type": "File", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "Placeholder", + "start": 0, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "name": { + "type": "Identifier", + "start": 2, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 2 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "FOO" + }, + "name": "FOO" + }, + "expectedNode": "Statement" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/try/try-catch-finally/input.js b/packages/babel-parser/test/fixtures/placeholders/try/try-catch-finally/input.js new file mode 100644 index 000000000000..97af833dd216 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/try/try-catch-finally/input.js @@ -0,0 +1 @@ +try %%TRY%% catch %%CATCH%% finally %%FINALLY%% diff --git a/packages/babel-parser/test/fixtures/placeholders/try/try-catch-finally/output.json b/packages/babel-parser/test/fixtures/placeholders/try/try-catch-finally/output.json new file mode 100644 index 000000000000..355f89df612f --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/try/try-catch-finally/output.json @@ -0,0 +1,166 @@ +{ + "type": "File", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "TryStatement", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "block": { + "type": "Placeholder", + "start": 4, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "name": { + "type": "Identifier", + "start": 6, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 9 + }, + "identifierName": "TRY" + }, + "name": "TRY" + }, + "expectedNode": "BlockStatement" + }, + "handler": { + "type": "CatchClause", + "start": 12, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "param": null, + "body": { + "type": "Placeholder", + "start": 18, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "name": { + "type": "Identifier", + "start": 20, + "end": 25, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 25 + }, + "identifierName": "CATCH" + }, + "name": "CATCH" + }, + "expectedNode": "BlockStatement" + } + }, + "guardedHandlers": [], + "finalizer": { + "type": "Placeholder", + "start": 36, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "name": { + "type": "Identifier", + "start": 38, + "end": 45, + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 45 + }, + "identifierName": "FINALLY" + }, + "name": "FINALLY" + }, + "expectedNode": "BlockStatement" + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/placeholders/try/with-catch-param/input.js b/packages/babel-parser/test/fixtures/placeholders/try/with-catch-param/input.js new file mode 100644 index 000000000000..e47082a3bd0d --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/try/with-catch-param/input.js @@ -0,0 +1 @@ +try {} catch (%%PARAM%%) %%CATCH%% diff --git a/packages/babel-parser/test/fixtures/placeholders/try/with-catch-param/output.json b/packages/babel-parser/test/fixtures/placeholders/try/with-catch-param/output.json new file mode 100644 index 000000000000..cb39ff141899 --- /dev/null +++ b/packages/babel-parser/test/fixtures/placeholders/try/with-catch-param/output.json @@ -0,0 +1,150 @@ +{ + "type": "File", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "TryStatement", + "start": 0, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "block": { + "type": "BlockStatement", + "start": 4, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "body": [], + "directives": [] + }, + "handler": { + "type": "CatchClause", + "start": 7, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "param": { + "type": "Placeholder", + "start": 14, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "name": { + "type": "Identifier", + "start": 16, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "PARAM" + }, + "name": "PARAM" + }, + "expectedNode": "Pattern" + }, + "body": { + "type": "Placeholder", + "start": 25, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 34 + } + }, + "name": { + "type": "Identifier", + "start": 27, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 32 + }, + "identifierName": "CATCH" + }, + "name": "CATCH" + }, + "expectedNode": "BlockStatement" + } + }, + "guardedHandlers": [], + "finalizer": null + } + ], + "directives": [] + } +} \ No newline at end of file From 54ba6d80c01d9a1a68d2ae6cc690e62ad4b1d379 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Tue, 5 Mar 2019 17:05:03 +0100 Subject: [PATCH 345/563] Update identifier parsing per Unicode v12 (#9637) https://github.com/tc39/ecma262/issues/1467 https://github.com/tc39/ecma262/pull/1468 --- packages/babel-parser/package.json | 2 +- .../babel-parser/scripts/generate-identifier-regex.js | 5 +++-- packages/babel-parser/src/util/identifier.js | 10 +++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/babel-parser/package.json b/packages/babel-parser/package.json index bdd0b80da331..c93d2cfbeac8 100644 --- a/packages/babel-parser/package.json +++ b/packages/babel-parser/package.json @@ -31,7 +31,7 @@ "@babel/code-frame": "^7.0.0", "@babel/helper-fixtures": "^7.2.0", "charcodes": "^0.2.0", - "unicode-11.0.0": "^0.7.8" + "unicode-12.0.0": "^0.7.9" }, "bin": { "parser": "./bin/babel-parser.js" diff --git a/packages/babel-parser/scripts/generate-identifier-regex.js b/packages/babel-parser/scripts/generate-identifier-regex.js index 083adcde0a2a..21e249ad4f28 100644 --- a/packages/babel-parser/scripts/generate-identifier-regex.js +++ b/packages/babel-parser/scripts/generate-identifier-regex.js @@ -1,7 +1,8 @@ "use strict"; -// Which Unicode version should be used? -const version = "11.0.0"; +// Always use the latest available version of Unicode! +// https://tc39.github.io/ecma262/#sec-conformance +const version = "12.0.0"; const start = require("unicode-" + version + diff --git a/packages/babel-parser/src/util/identifier.js b/packages/babel-parser/src/util/identifier.js index d8fa87603c1d..bfd2ca748f81 100644 --- a/packages/babel-parser/src/util/identifier.js +++ b/packages/babel-parser/src/util/identifier.js @@ -98,16 +98,16 @@ export const keywordRelationalOperator = /^in(stanceof)?$/; // ## Character categories -// Big ugly regular expressions that matches characters in the +// Big ugly regular expressions that match characters in the // whitespace, identifier, and identifier-start categories. These // are only applied when a character is found to actually have a // code point above 0x80. // Generated by `scripts/generate-identifier-regex.js`. /* prettier-ignore */ -let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7b9\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fef\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7bf\ua7c2-\ua7c6\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab67\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; /* prettier-ignore */ -let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; +let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d3-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1df9\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; const nonASCIIidentifierStart = new RegExp( "[" + nonASCIIidentifierStartChars + "]", @@ -124,9 +124,9 @@ nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; // offset to the next range, and then a size of the range. They were // generated by `scripts/generate-identifier-regex.js`. /* prettier-ignore */ -const astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,190,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,26,230,43,117,63,32,0,257,0,11,39,8,0,22,0,12,39,3,3,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,68,12,0,67,12,65,1,31,6129,15,754,9486,286,82,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; +const astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,15,7472,3104,541]; /* prettier-ignore */ -const astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,280,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239]; +const astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239]; // This has a complexity linear to the value of the code. The // assumption is that looking up astral identifier characters is From 349c0d4836808d1bec52dc2f6dfbd3afa039f9e9 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Tue, 5 Mar 2019 18:06:33 +0100 Subject: [PATCH 346/563] Update babel-plugin-proposal-unicode-property-regex for Unicode v12 (#9636) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/tc39/ecma262/issues/1467 https://github.com/tc39/ecma262/pull/1468 Co-authored-by: Nicolò Ribaudo --- .../package.json | 2 +- .../with-unicode-flag/unicode-12/input.js | 1 + .../with-unicode-flag/unicode-12/output.js | 1 + .../without-unicode-flag/unicode-12/input.js | 1 + .../without-unicode-flag/unicode-12/output.js | 1 + .../package.json | 2 +- .../package.json | 2 +- yarn.lock | 23 +++++++++++-------- 8 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/with-unicode-flag/unicode-12/input.js create mode 100644 packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/with-unicode-flag/unicode-12/output.js create mode 100644 packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/without-unicode-flag/unicode-12/input.js create mode 100644 packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/without-unicode-flag/unicode-12/output.js diff --git a/packages/babel-plugin-proposal-unicode-property-regex/package.json b/packages/babel-plugin-proposal-unicode-property-regex/package.json index e8ec8965fbe7..4e6f2207a8a4 100644 --- a/packages/babel-plugin-proposal-unicode-property-regex/package.json +++ b/packages/babel-plugin-proposal-unicode-property-regex/package.json @@ -24,7 +24,7 @@ "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.2.0" + "regexpu-core": "^4.5.2" }, "peerDependencies": { "@babel/core": "^7.0.0-0" diff --git a/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/with-unicode-flag/unicode-12/input.js b/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/with-unicode-flag/unicode-12/input.js new file mode 100644 index 000000000000..711dde943b3c --- /dev/null +++ b/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/with-unicode-flag/unicode-12/input.js @@ -0,0 +1 @@ +var regex = /[\u{1E2C0}-\u{1E2F9}\u{1E2FF}]/u; diff --git a/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/with-unicode-flag/unicode-12/output.js b/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/with-unicode-flag/unicode-12/output.js new file mode 100644 index 000000000000..711dde943b3c --- /dev/null +++ b/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/with-unicode-flag/unicode-12/output.js @@ -0,0 +1 @@ +var regex = /[\u{1E2C0}-\u{1E2F9}\u{1E2FF}]/u; diff --git a/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/without-unicode-flag/unicode-12/input.js b/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/without-unicode-flag/unicode-12/input.js new file mode 100644 index 000000000000..f563d323bd55 --- /dev/null +++ b/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/without-unicode-flag/unicode-12/input.js @@ -0,0 +1 @@ +var regex = /\p{Script_Extensions=Wancho}/u; diff --git a/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/without-unicode-flag/unicode-12/output.js b/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/without-unicode-flag/unicode-12/output.js new file mode 100644 index 000000000000..941a22ba2c3e --- /dev/null +++ b/packages/babel-plugin-proposal-unicode-property-regex/test/fixtures/without-unicode-flag/unicode-12/output.js @@ -0,0 +1 @@ +var regex = /(?:\uD838[\uDEC0-\uDEF9\uDEFF])/; diff --git a/packages/babel-plugin-transform-dotall-regex/package.json b/packages/babel-plugin-transform-dotall-regex/package.json index a10171064806..88316e83d19a 100644 --- a/packages/babel-plugin-transform-dotall-regex/package.json +++ b/packages/babel-plugin-transform-dotall-regex/package.json @@ -23,7 +23,7 @@ "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.1.3" + "regexpu-core": "^4.5.2" }, "peerDependencies": { "@babel/core": "^7.0.0-0" diff --git a/packages/babel-plugin-transform-unicode-regex/package.json b/packages/babel-plugin-transform-unicode-regex/package.json index d5167f6a11f2..ad6d64056c2b 100644 --- a/packages/babel-plugin-transform-unicode-regex/package.json +++ b/packages/babel-plugin-transform-unicode-regex/package.json @@ -14,7 +14,7 @@ "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/helper-regex": "^7.0.0", - "regexpu-core": "^4.1.3" + "regexpu-core": "^4.5.2" }, "peerDependencies": { "@babel/core": "^7.0.0-0" diff --git a/yarn.lock b/yarn.lock index 1a41a9418210..19d99ed3cb0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7602,9 +7602,10 @@ redent@^2.0.0: indent-string "^3.0.0" strip-indent "^2.0.0" -regenerate-unicode-properties@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" +regenerate-unicode-properties@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.0.tgz#01fc6d6c286fcc932c30f7025ca4a9928bbbb68c" + integrity sha512-tlYkVh6F/QXtosuyOZV2SkOtA248fjMAUWjGf8aYBvQK1ZMarbMvFBvkguSt93HhdXh20m15sc4b5EIBxXLHQQ== dependencies: regenerate "^1.4.0" @@ -7649,15 +7650,16 @@ regexpp@^2.0.1: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" regexpu-core@^4.1.3, regexpu-core@^4.2.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" + version "4.5.2" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.2.tgz#9fcee72782f4fea6f8f428f7f14c8f242ca3dc82" + integrity sha512-CgGxXmuX0Cf57z7KahSHe4kaNY8gBRCFFEretQ5AHsnlLx/5VdCrQOoOz1POxLdZjPbwE5ncTspPJwp2WHPcHA== dependencies: regenerate "^1.4.0" - regenerate-unicode-properties "^7.0.0" + regenerate-unicode-properties "^8.0.0" regjsgen "^0.5.0" regjsparser "^0.6.0" unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.0.2" + unicode-match-property-value-ecmascript "^1.1.0" regjsgen@^0.5.0: version "0.5.0" @@ -8804,9 +8806,10 @@ unicode-match-property-ecmascript@^1.0.4: unicode-canonical-property-names-ecmascript "^1.0.4" unicode-property-aliases-ecmascript "^1.0.4" -unicode-match-property-value-ecmascript@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== unicode-property-aliases-ecmascript@^1.0.4: version "1.0.4" From 29999007f65a24153b74b0bb918242933b63f4df Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 5 Mar 2019 17:20:36 -0800 Subject: [PATCH 347/563] Disallow escape sequences in contextual keywords (#9618) * Disallow escape sequences in async * Disallow escape sequences in get, set and async in class * invalid escape tests * Update whitelist * tests for async in parens * Add test for invalid newline between params and arrow * Move canInsertSemilcolon() into shouldPArseAsyncArrow --- .../input.js | 4 +- .../babel-parser/src/parser/expression.js | 33 ++-- packages/babel-parser/src/parser/statement.js | 9 +- packages/babel-parser/src/plugins/flow.js | 2 + .../babel-parser/src/plugins/typescript.js | 10 +- .../core/object/invalid-escape-get/input.js | 1 + .../object/invalid-escape-get/options.json | 3 + .../fixtures/core/valid-escape/async/input.js | 1 + .../core/valid-escape/async/output.json | 87 ++++++++++ .../es2015/class/invalid-escape-get/input.js | 1 + .../class/invalid-escape-get/options.json | 3 + .../es2015/class/invalid-escape-set/input.js | 1 + .../class/invalid-escape-set/options.json | 3 + .../class/invalid-escape-static/input.js | 1 + .../class/invalid-escape-static/options.json | 3 + .../es2015/for-of/invalid-escape-of/input.js | 1 + .../for-of/invalid-escape-of/options.json | 3 + .../generators/invalid-escape-yield/input.js | 1 + .../invalid-escape-yield/options.json | 3 + .../es2015/let/invalid-escape/input.js | 1 + .../es2015/let/invalid-escape/options.json | 3 + .../input.js | 1 + .../options.json | 3 + .../modules/invalid-escape-export-as/input.js | 1 + .../invalid-escape-export-as/options.json | 4 + .../invalid-escape-import-from/input.js | 1 + .../invalid-escape-import-from/options.json | 4 + .../input.js | 1 + .../options.json | 3 + .../invalid-escape-async-obj-method/input.js | 1 + .../options.json | 3 + .../input.js | 1 + .../options.json | 3 + .../invalid-escape-await/input.js | 1 + .../invalid-escape-await/options.json | 3 + .../input.js | 1 + .../options.json | 3 + .../input.js | 1 + .../options.json | 3 + .../input.js | 1 + .../options.json | 3 + .../invalid-escape-sequence-arrow/input.js | 1 + .../options.json | 3 + .../input.js | 1 + .../options.json | 3 + .../invalid-escape-sequence-function/input.js | 1 + .../options.json | 3 + .../invalid-newline-after-params/input.js | 2 + .../invalid-newline-after-params/options.json | 3 + .../invalid-parens-async-arrow/input.js | 1 + .../invalid-parens-async-arrow/options.json | 3 + .../invalid-parens-async-func/input.js | 1 + .../invalid-parens-async-func/options.json | 3 + .../arrow-function-with-newline/input.js | 2 + .../arrow-function-with-newline/output.json | 152 ++++++++++++++++++ .../arrow-function-with-newline/input.js | 2 + .../arrow-function-with-newline/output.json | 151 +++++++++++++++++ scripts/tests/test262/test262_whitelist.txt | 4 - 58 files changed, 530 insertions(+), 22 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/core/object/invalid-escape-get/input.js create mode 100644 packages/babel-parser/test/fixtures/core/object/invalid-escape-get/options.json create mode 100644 packages/babel-parser/test/fixtures/core/valid-escape/async/input.js create mode 100644 packages/babel-parser/test/fixtures/core/valid-escape/async/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/let/invalid-escape/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/let/invalid-escape/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/options.json create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/input.js create mode 100644 packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/options.json create mode 100644 packages/babel-parser/test/fixtures/flow/regression/arrow-function-with-newline/input.js create mode 100644 packages/babel-parser/test/fixtures/flow/regression/arrow-function-with-newline/output.json create mode 100644 packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/output.json diff --git a/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/input.js b/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/input.js index e409b79f575f..b5a205cc36d6 100644 --- a/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/input.js +++ b/packages/babel-generator/test/fixtures/edgecase/single-arg-async-arrow-with-retainlines/input.js @@ -2,8 +2,8 @@ var fn = async ( arg ) => {} -async (x) -=> {} +async (x) => +{} async x => {} diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index b9195c3a9751..1483f90612ec 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -524,12 +524,21 @@ export default class ExpressionParser extends LValParser { startLoc: Position, noCalls?: ?boolean, ): N.Expression { + const maybeAsyncArrow = this.atPossibleAsync(base); + const state = { optionalChainMember: false, stop: false, }; do { - base = this.parseSubscript(base, startPos, startLoc, noCalls, state); + base = this.parseSubscript( + base, + startPos, + startLoc, + noCalls, + state, + maybeAsyncArrow, + ); } while (!state.stop); return base; } @@ -544,6 +553,7 @@ export default class ExpressionParser extends LValParser { startLoc: Position, noCalls: ?boolean, state: N.ParseSubscriptState, + maybeAsyncArrow: boolean, ): N.Expression { if (!noCalls && this.eat(tt.doubleColon)) { const node = this.startNodeAt(startPos, startLoc); @@ -575,13 +585,8 @@ export default class ExpressionParser extends LValParser { this.expect(tt.bracketR); return this.finishNode(node, "OptionalMemberExpression"); } else if (this.eat(tt.parenL)) { - const possibleAsync = this.atPossibleAsync(base); - node.callee = base; - node.arguments = this.parseCallExpressionArguments( - tt.parenR, - possibleAsync, - ); + node.arguments = this.parseCallExpressionArguments(tt.parenR, false); node.optional = true; return this.finishNode(node, "OptionalCallExpression"); } else { @@ -620,7 +625,6 @@ export default class ExpressionParser extends LValParser { this.state.yieldPos = 0; this.state.awaitPos = 0; - const possibleAsync = this.atPossibleAsync(base); this.next(); let node = this.startNodeAt(startPos, startLoc); @@ -631,7 +635,7 @@ export default class ExpressionParser extends LValParser { node.arguments = this.parseCallExpressionArguments( tt.parenR, - possibleAsync, + maybeAsyncArrow, base.type === "Import", base.type !== "Super", ); @@ -641,7 +645,7 @@ export default class ExpressionParser extends LValParser { this.finishOptionalCallExpression(node); } - if (possibleAsync && this.shouldParseAsyncArrow()) { + if (maybeAsyncArrow && this.shouldParseAsyncArrow()) { state.stop = true; this.checkCommaAfterRestFromSpread(); @@ -704,11 +708,11 @@ export default class ExpressionParser extends LValParser { atPossibleAsync(base: N.Expression): boolean { return ( - !this.state.containsEsc && - this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && - !this.canInsertSemicolon() + this.state.lastTokEnd === base.end && + !this.canInsertSemicolon() && + this.state.input.slice(base.start, base.end) === "async" ); } @@ -791,7 +795,7 @@ export default class ExpressionParser extends LValParser { } shouldParseAsyncArrow(): boolean { - return this.match(tt.arrow); + return this.match(tt.arrow) && !this.canInsertSemicolon(); } parseAsyncArrowFromCallExpression( @@ -891,6 +895,7 @@ export default class ExpressionParser extends LValParser { return this.parseFunction(node, undefined, true); } else if ( canBeArrow && + !containsEsc && id.name === "async" && this.match(tt.name) && !this.canInsertSemicolon() diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index 47b3c9f2c7f0..d97d4986a0a0 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -1321,6 +1321,7 @@ export default class StatementParser extends ExpressionParser { return; } + const containsEsc = this.state.containsEsc; const key = this.parseClassPropertyName(member); const isPrivate = key.type === "PrivateName"; // Check the key is not a computed expression or string literal. @@ -1371,7 +1372,12 @@ export default class StatementParser extends ExpressionParser { } else { this.pushClassProperty(classBody, publicProp); } - } else if (isSimple && key.name === "async" && !this.isLineTerminator()) { + } else if ( + isSimple && + key.name === "async" && + !containsEsc && + !this.isLineTerminator() + ) { // an async method const isGenerator = this.eat(tt.star); @@ -1407,6 +1413,7 @@ export default class StatementParser extends ExpressionParser { } else if ( isSimple && (key.name === "get" || key.name === "set") && + !containsEsc && !(this.match(tt.star) && this.isLineTerminator()) ) { // `get\n*` is an uninitialized property named 'get' followed by a generator. diff --git a/packages/babel-parser/src/plugins/flow.js b/packages/babel-parser/src/plugins/flow.js index 80961e09380b..725eea49573b 100644 --- a/packages/babel-parser/src/plugins/flow.js +++ b/packages/babel-parser/src/plugins/flow.js @@ -2619,6 +2619,7 @@ export default (superClass: Class): Class => startLoc: Position, noCalls: ?boolean, subscriptState: N.ParseSubscriptState, + maybeAsyncArrow: boolean, ): N.Expression { if (this.match(tt.questionDot) && this.isLookaheadRelational("<")) { this.expectPlugin("optionalChaining"); @@ -2671,6 +2672,7 @@ export default (superClass: Class): Class => startLoc, noCalls, subscriptState, + maybeAsyncArrow, ); } diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 7d1f81d1b8a7..0724db557024 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -1498,6 +1498,7 @@ export default (superClass: Class): Class => startLoc: Position, noCalls: ?boolean, state: N.ParseSubscriptState, + maybeAsyncArrow: boolean, ): N.Expression { if (!this.hasPrecedingLineBreak() && this.match(tt.bang)) { this.state.exprAllowed = false; @@ -1560,7 +1561,14 @@ export default (superClass: Class): Class => if (result) return result; } - return super.parseSubscript(base, startPos, startLoc, noCalls, state); + return super.parseSubscript( + base, + startPos, + startLoc, + noCalls, + state, + maybeAsyncArrow, + ); } parseNewArguments(node: N.NewExpression): void { diff --git a/packages/babel-parser/test/fixtures/core/object/invalid-escape-get/input.js b/packages/babel-parser/test/fixtures/core/object/invalid-escape-get/input.js new file mode 100644 index 000000000000..208cd4d559e8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/object/invalid-escape-get/input.js @@ -0,0 +1 @@ +({ ge\u0074 x() {} }) diff --git a/packages/babel-parser/test/fixtures/core/object/invalid-escape-get/options.json b/packages/babel-parser/test/fixtures/core/object/invalid-escape-get/options.json new file mode 100644 index 000000000000..0cd822570731 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/object/invalid-escape-get/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \",\" (1:12)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/valid-escape/async/input.js b/packages/babel-parser/test/fixtures/core/valid-escape/async/input.js new file mode 100644 index 000000000000..2e12a7c8d0a9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/valid-escape/async/input.js @@ -0,0 +1 @@ +(\u0061sync ()) diff --git a/packages/babel-parser/test/fixtures/core/valid-escape/async/output.json b/packages/babel-parser/test/fixtures/core/valid-escape/async/output.json new file mode 100644 index 000000000000..e220d3207f6b --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/valid-escape/async/output.json @@ -0,0 +1,87 @@ +{ + "type": "File", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 1, + "end": 14, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 14 + } + }, + "callee": { + "type": "Identifier", + "start": 1, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 11 + }, + "identifierName": "async" + }, + "name": "async" + }, + "arguments": [], + "extra": { + "parenthesized": true, + "parenStart": 0 + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/input.js b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/input.js new file mode 100644 index 000000000000..dca801f8de29 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/input.js @@ -0,0 +1 @@ +class X { ge\u0074 x() {} } diff --git a/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/options.json b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/options.json new file mode 100644 index 000000000000..1e730e170733 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-get/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:19)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/input.js b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/input.js new file mode 100644 index 000000000000..fafbe9ab9f4d --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/input.js @@ -0,0 +1 @@ +class X { se\u0074 x(value) {} } diff --git a/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/options.json b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/options.json new file mode 100644 index 000000000000..1e730e170733 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-set/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:19)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/input.js b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/input.js new file mode 100644 index 000000000000..a561f8c32135 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/input.js @@ -0,0 +1 @@ +class X { st\u0061tic y() {} } diff --git a/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/options.json b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/options.json new file mode 100644 index 000000000000..b23f881870cf --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/class/invalid-escape-static/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:22)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/input.js b/packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/input.js new file mode 100644 index 000000000000..7d8403183214 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/input.js @@ -0,0 +1 @@ +for (x \u006ff y) {} diff --git a/packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/options.json b/packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/options.json new file mode 100644 index 000000000000..6b9933a77108 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/for-of/invalid-escape-of/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (1:7)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/input.js b/packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/input.js new file mode 100644 index 000000000000..521b91facbbc --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/input.js @@ -0,0 +1 @@ +(function* () { y\u0069eld 10 }) diff --git a/packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/options.json b/packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/options.json new file mode 100644 index 000000000000..dcd45c9b9715 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/generators/invalid-escape-yield/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Can not use 'yield' as identifier inside a generator (1:16)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/let/invalid-escape/input.js b/packages/babel-parser/test/fixtures/es2015/let/invalid-escape/input.js new file mode 100644 index 000000000000..b5cc585a2a7f --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/let/invalid-escape/input.js @@ -0,0 +1 @@ +le\u0074 x = 5 diff --git a/packages/babel-parser/test/fixtures/es2015/let/invalid-escape/options.json b/packages/babel-parser/test/fixtures/es2015/let/invalid-escape/options.json new file mode 100644 index 000000000000..410ecd16fddf --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/let/invalid-escape/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/input.js b/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/input.js new file mode 100644 index 000000000000..70a512c677a7 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/input.js @@ -0,0 +1 @@ +function f() { new.ta\u0072get; } diff --git a/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/options.json b/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/options.json new file mode 100644 index 000000000000..4f4b2be4c186 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/meta-properties/new-target-invalid-escaped-target/options.json @@ -0,0 +1,3 @@ +{ + "throws": "The only valid meta property for new is new.target (1:19)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/input.js b/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/input.js new file mode 100644 index 000000000000..bce203058944 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/input.js @@ -0,0 +1 @@ +export { X \u0061s Y } diff --git a/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/options.json b/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/options.json new file mode 100644 index 000000000000..16c061d4dfd4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-export-as/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Unexpected token, expected \",\" (1:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/input.js b/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/input.js new file mode 100644 index 000000000000..3f4408ab6e4c --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/input.js @@ -0,0 +1 @@ +import X fro\u006d 'x' diff --git a/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/options.json b/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/options.json new file mode 100644 index 000000000000..6dab969b1115 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/modules/invalid-escape-import-from/options.json @@ -0,0 +1,4 @@ +{ + "sourceType": "module", + "throws": "Unexpected token (1:9)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/input.js new file mode 100644 index 000000000000..4dd0cd76e362 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/input.js @@ -0,0 +1 @@ +class X { \u0061sync x() { await x } } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/options.json new file mode 100644 index 000000000000..b81bee7fa2e4 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-class-method/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:21)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/input.js new file mode 100644 index 000000000000..0807ff125175 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/input.js @@ -0,0 +1 @@ +({ \u0061sync x() { await x } }) diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/options.json new file mode 100644 index 000000000000..f0907a448458 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-obj-method/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \",\" (1:14)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/input.js new file mode 100644 index 000000000000..a5b20dfebcfe --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/input.js @@ -0,0 +1 @@ +class X { static \u0061sync x() { await x } } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/options.json new file mode 100644 index 000000000000..f55830c1c373 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-async-static-class-method/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (1:28)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/input.js new file mode 100644 index 000000000000..824b1c37725b --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/input.js @@ -0,0 +1 @@ +(async function() { aw\u0061it x }) diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/options.json new file mode 100644 index 000000000000..ac6c5914cec6 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-await/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Can not use 'await' as identifier inside an async function (1:20)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/input.js new file mode 100644 index 000000000000..0d2ad1b32309 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/input.js @@ -0,0 +1 @@ +export \u0061sync function y() { await x } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/options.json new file mode 100644 index 000000000000..9d60866b80c3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-async-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \"{\" (1:7)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/input.js new file mode 100644 index 000000000000..d14f4188a0b5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/input.js @@ -0,0 +1 @@ +export default \u0061sync function y() { await x } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/options.json new file mode 100644 index 000000000000..b0e5516212f3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-export-dflt-async-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (1:26)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/input.js new file mode 100644 index 000000000000..55506a887224 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/input.js @@ -0,0 +1 @@ +(\u0061sync x => { await x }) diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/options.json new file mode 100644 index 000000000000..0cd822570731 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow-list/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \",\" (1:12)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/input.js new file mode 100644 index 000000000000..1989072f30de --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/input.js @@ -0,0 +1 @@ +\u0061sync x => { await x } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/options.json new file mode 100644 index 000000000000..f6eb197b1dd8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-arrow/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (1:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/input.js new file mode 100644 index 000000000000..978637393061 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/input.js @@ -0,0 +1 @@ +(\u0061sync function() { await x }) diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/options.json new file mode 100644 index 000000000000..0cd822570731 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function-list/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \",\" (1:12)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/input.js new file mode 100644 index 000000000000..a44cfbb62d1a --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/input.js @@ -0,0 +1 @@ +\u0061sync function() { await x } diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/options.json new file mode 100644 index 000000000000..f6eb197b1dd8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-escape-sequence-function/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (1:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/input.js new file mode 100644 index 000000000000..52a0795cf08a --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/input.js @@ -0,0 +1,2 @@ +async (x) +=> {} diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/options.json new file mode 100644 index 000000000000..0361d7c7d2b2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-newline-after-params/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token (2:0)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/input.js new file mode 100644 index 000000000000..33dbaaa09e00 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/input.js @@ -0,0 +1 @@ +(async)(a) => {} diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/options.json new file mode 100644 index 000000000000..f6eb197b1dd8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-arrow/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (1:11)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/input.js b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/input.js new file mode 100644 index 000000000000..0af564cef72b --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/input.js @@ -0,0 +1 @@ +(async) function x (a) {} diff --git a/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/options.json b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/options.json new file mode 100644 index 000000000000..c2fcdb08cf9f --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2017/async-functions/invalid-parens-async-func/options.json @@ -0,0 +1,3 @@ +{ + "throws": "Unexpected token, expected \";\" (1:8)" +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/flow/regression/arrow-function-with-newline/input.js b/packages/babel-parser/test/fixtures/flow/regression/arrow-function-with-newline/input.js new file mode 100644 index 000000000000..5868c4e2feda --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/regression/arrow-function-with-newline/input.js @@ -0,0 +1,2 @@ +async (f) +: t => { } diff --git a/packages/babel-parser/test/fixtures/flow/regression/arrow-function-with-newline/output.json b/packages/babel-parser/test/fixtures/flow/regression/arrow-function-with-newline/output.json new file mode 100644 index 000000000000..acc286d064ad --- /dev/null +++ b/packages/babel-parser/test/fixtures/flow/regression/arrow-function-with-newline/output.json @@ -0,0 +1,152 @@ +{ + "type": "File", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "returnType": { + "type": "TypeAnnotation", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "typeAnnotation": { + "type": "GenericTypeAnnotation", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "typeParameters": null, + "id": { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + }, + "identifierName": "t" + }, + "name": "t" + } + } + }, + "id": null, + "generator": false, + "async": true, + "params": [ + { + "type": "Identifier", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + }, + "identifierName": "f" + }, + "name": "f" + } + ], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 20, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/input.js b/packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/input.js new file mode 100644 index 000000000000..5868c4e2feda --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/input.js @@ -0,0 +1,2 @@ +async (f) +: t => { } diff --git a/packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/output.json b/packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/output.json new file mode 100644 index 000000000000..01a056dd1898 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/arrow-function/arrow-function-with-newline/output.json @@ -0,0 +1,151 @@ +{ + "type": "File", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "returnType": { + "type": "TSTypeAnnotation", + "start": 10, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "typeAnnotation": { + "type": "TSTypeReference", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "typeName": { + "type": "Identifier", + "start": 12, + "end": 13, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + }, + "identifierName": "t" + }, + "name": "t" + } + } + }, + "id": null, + "generator": false, + "async": true, + "params": [ + { + "type": "Identifier", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + }, + "identifierName": "f" + }, + "name": "f" + } + ], + "body": { + "type": "BlockStatement", + "start": 17, + "end": 20, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/scripts/tests/test262/test262_whitelist.txt b/scripts/tests/test262/test262_whitelist.txt index 03e75b2222f7..b936b9a595e2 100644 --- a/scripts/tests/test262/test262_whitelist.txt +++ b/scripts/tests/test262/test262_whitelist.txt @@ -601,10 +601,6 @@ language/module-code/privatename-not-valid-earlyerr-module-3.js(default) language/module-code/privatename-not-valid-earlyerr-module-3.js(strict mode) language/module-code/privatename-not-valid-earlyerr-module-4.js(default) language/module-code/privatename-not-valid-earlyerr-module-4.js(strict mode) -language/statements/class/async-gen-meth-escaped-async.js(default) -language/statements/class/async-gen-meth-escaped-async.js(strict mode) -language/statements/class/async-meth-escaped-async.js(default) -language/statements/class/async-meth-escaped-async.js(strict mode) language/statements/class/elements/fields-duplicate-privatenames.js(default) language/statements/class/elements/fields-duplicate-privatenames.js(strict mode) language/statements/class/elements/fields-literal-name-static-propname-constructor.js(default) From 28c71e88e2d0ec7c82504762dd7c0d824da48652 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Wed, 6 Mar 2019 11:41:03 +0100 Subject: [PATCH 348/563] Fix label name --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 806b98265731..8e4c852552ed 100644 --- a/lerna.json +++ b/lerna.json @@ -4,7 +4,7 @@ "repo": "babel/babel", "cacheDir": ".changelog", "labels": { - "PR: Spec Compliancy :eyeglasses:": ":eyeglasses: Spec Compliancy", + "PR: Spec Compliance :eyeglasses:": ":eyeglasses: Spec Compliance", "PR: Breaking Change :boom:": ":boom: Breaking Change", "PR: New Feature :rocket:": ":rocket: New Feature", "PR: Bug Fix :bug:": ":bug: Bug Fix", From fba5655a4483c05f4d5b17552614dd432a03bbe5 Mon Sep 17 00:00:00 2001 From: Erik Arvidsson Date: Fri, 22 Feb 2019 23:45:25 -0800 Subject: [PATCH 349/563] Parenthesized expressions (#8025) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add parser createParenthesizedExpressions option … When set to `true` we create `ParenthesizedExpression` nodes instead of setting `extra.parenthesized`. * Also update babel-parser.d.ts --- .../create-parenthesized-expressions/input.js | 12 + .../options.json | 3 + .../output.js | 10 + packages/babel-generator/test/index.js | 1 + packages/babel-parser/ast/spec.md | 12 + packages/babel-parser/src/options.js | 4 + .../babel-parser/src/parser/expression.js | 42 +- packages/babel-parser/src/parser/lval.js | 17 + packages/babel-parser/src/parser/statement.js | 17 +- packages/babel-parser/src/types.js | 5 + .../create-parenthesized-expressions/input.js | 12 + .../options.json | 3 + .../output.json | 391 +++++++++++++++++ .../fixtures/core/uncategorised/556/input.js | 1 + .../core/uncategorised/556/options.json | 4 + .../fixtures/core/uncategorised/557/input.js | 1 + .../core/uncategorised/557/options.json | 3 + .../core/uncategorised/557/output.json | 85 ++++ .../fixtures/core/uncategorised/558/input.js | 1 + .../core/uncategorised/558/options.json | 4 + .../create-parenthesized-expressions/input.js | 1 + .../options.json | 3 + .../output.json | 104 +++++ .../es2015/uncategorised/394/input.js | 4 + .../es2015/uncategorised/394/options.json | 3 + .../es2015/uncategorised/394/output.json | 392 ++++++++++++++++++ .../es2015/uncategorised/395/input.js | 1 + .../es2015/uncategorised/395/options.json | 4 + .../exponentiation-operator/15/input.js | 1 + .../exponentiation-operator/15/options.json | 4 + .../exponentiation-operator/16/input.js | 1 + .../exponentiation-operator/16/options.json | 4 + .../exponentiation-operator/2/output.json | 2 +- .../exponentiation-operator/7/output.json | 2 +- .../exponentiation-operator/8/output.json | 2 +- .../exponentiation-operator/9/output.json | 2 +- .../babel-parser/typings/babel-parser.d.ts | 8 + .../src/path/inference/inferers.js | 4 + .../src/asserts/generated/index.js | 12 +- .../src/builders/generated/index.js | 8 +- packages/babel-types/src/definitions/core.js | 10 + packages/babel-types/src/definitions/misc.js | 12 +- .../src/validators/generated/index.js | 40 +- 43 files changed, 1187 insertions(+), 65 deletions(-) create mode 100644 packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/input.js create mode 100644 packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/options.json create mode 100644 packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/output.js create mode 100644 packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/input.js create mode 100644 packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/options.json create mode 100644 packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/output.json create mode 100644 packages/babel-parser/test/fixtures/core/uncategorised/556/input.js create mode 100644 packages/babel-parser/test/fixtures/core/uncategorised/556/options.json create mode 100644 packages/babel-parser/test/fixtures/core/uncategorised/557/input.js create mode 100644 packages/babel-parser/test/fixtures/core/uncategorised/557/options.json create mode 100644 packages/babel-parser/test/fixtures/core/uncategorised/557/output.json create mode 100644 packages/babel-parser/test/fixtures/core/uncategorised/558/input.js create mode 100644 packages/babel-parser/test/fixtures/core/uncategorised/558/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/394/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/394/options.json create mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/394/output.json create mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/395/input.js create mode 100644 packages/babel-parser/test/fixtures/es2015/uncategorised/395/options.json create mode 100644 packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/input.js create mode 100644 packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/options.json create mode 100644 packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/input.js create mode 100644 packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/options.json diff --git a/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/input.js b/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/input.js new file mode 100644 index 000000000000..753a9cfbb2b5 --- /dev/null +++ b/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/input.js @@ -0,0 +1,12 @@ +// One +(1); + +/* Two */ +(2); + +( + // Three + 3 +); + +(/* Four */ 4); diff --git a/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/options.json b/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/options.json new file mode 100644 index 000000000000..7c49b91ec9b2 --- /dev/null +++ b/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/options.json @@ -0,0 +1,3 @@ +{ + "parserOpts": {"createParenthesizedExpressions": true} +} diff --git a/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/output.js b/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/output.js new file mode 100644 index 000000000000..b78500e8017f --- /dev/null +++ b/packages/babel-generator/test/fixtures/comments/create-parenthesized-expressions/output.js @@ -0,0 +1,10 @@ +// One +(1); +/* Two */ + +(2); +( // Three +3); +( +/* Four */ +4); \ No newline at end of file diff --git a/packages/babel-generator/test/index.js b/packages/babel-generator/test/index.js index 057452885063..4781339b28ea 100644 --- a/packages/babel-generator/test/index.js +++ b/packages/babel-generator/test/index.js @@ -492,6 +492,7 @@ suites.forEach(function(testSuite) { strictMode: task.options.strictMode === false ? false : true, sourceType: "module", sourceMaps: !!task.sourceMap, + ...task.options.parserOpts, }); const options = { sourceFileName: path.relative(__dirname, actual.loc), diff --git a/packages/babel-parser/ast/spec.md b/packages/babel-parser/ast/spec.md index b4f5372cb440..34c04919cbd0 100644 --- a/packages/babel-parser/ast/spec.md +++ b/packages/babel-parser/ast/spec.md @@ -79,6 +79,7 @@ These are the core @babel/parser (babylon) AST node types. - [CallExpression](#callexpression) - [NewExpression](#newexpression) - [SequenceExpression](#sequenceexpression) + - [ParenthesizedExpression](#parenthesizedexpression) - [DoExpression](#doexpression) - [Template Literals](#template-literals) - [TemplateLiteral](#templateliteral) @@ -945,6 +946,17 @@ interface SequenceExpression <: Expression { A sequence expression, i.e., a comma-separated sequence of expressions. +## ParenthesizedExpression + +```js +interface ParenthesizedExpression <: Expression { + type "ParenthesizedExpression"; + expression: Expression; +} +``` + +An expression wrapped by parentheses. + ## DoExpression ```js diff --git a/packages/babel-parser/src/options.js b/packages/babel-parser/src/options.js index c11dd55cca99..5a615ccddfac 100755 --- a/packages/babel-parser/src/options.js +++ b/packages/babel-parser/src/options.js @@ -19,6 +19,7 @@ export type Options = { strictMode: ?boolean, ranges: boolean, tokens: boolean, + createParenthesizedExpressions: boolean, }; export const defaultOptions: Options = { @@ -55,6 +56,9 @@ export const defaultOptions: Options = { ranges: false, // Adds all parsed tokens to a `tokens` property on the `File` node tokens: false, + // Whether to create ParenthesizedExpression AST nodes (if false + // the parser sets extra.parenthesized on the expression nodes instead). + createParenthesizedExpressions: false, }; // Interpret and default an options object diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 1483f90612ec..71ce823720bd 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -40,6 +40,12 @@ import { SCOPE_PROGRAM, } from "../util/scopeflags"; +const unwrapParenthesizedExpression = node => { + return node.type === "ParenthesizedExpression" + ? unwrapParenthesizedExpression(node.expression) + : node; +}; + export default class ExpressionParser extends LValParser { // Forward-declaration: defined in statement.js +parseBlock: ( @@ -204,16 +210,22 @@ export default class ExpressionParser extends LValParser { this.checkLVal(left, undefined, undefined, "assignment expression"); + const maybePattern = unwrapParenthesizedExpression(left); + let patternErrorMsg; - if (left.type === "ObjectPattern") { + if (maybePattern.type === "ObjectPattern") { patternErrorMsg = "`({a}) = 0` use `({a} = 0)`"; - } else if (left.type === "ArrayPattern") { + } else if (maybePattern.type === "ArrayPattern") { patternErrorMsg = "`([a]) = 0` use `([a] = 0)`"; } - if (patternErrorMsg && left.extra && left.extra.parenthesized) { + if ( + patternErrorMsg && + ((left.extra && left.extra.parenthesized) || + left.type === "ParenthesizedExpression") + ) { this.raise( - left.start, + maybePattern.start, `You're trying to assign to a parenthesized expression, eg. instead of ${patternErrorMsg}`, ); } @@ -326,7 +338,8 @@ export default class ExpressionParser extends LValParser { if ( operator === "**" && left.type === "UnaryExpression" && - !(left.extra && left.extra.parenthesized) + (this.options.createParenthesizedExpressions || + !(left.extra && left.extra.parenthesized)) ) { this.raise( left.argument.start, @@ -1161,13 +1174,6 @@ export default class ExpressionParser extends LValParser { return this.finishNode(node, type); } - parseParenExpression(): N.Expression { - this.expect(tt.parenL); - const val = this.parseExpression(); - this.expect(tt.parenR); - return val; - } - parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression { const startPos = this.state.start; const startLoc = this.state.startLoc; @@ -1278,10 +1284,16 @@ export default class ExpressionParser extends LValParser { val = exprList[0]; } - this.addExtra(val, "parenthesized", true); - this.addExtra(val, "parenStart", startPos); + if (!this.options.createParenthesizedExpressions) { + this.addExtra(val, "parenthesized", true); + this.addExtra(val, "parenStart", startPos); + return val; + } - return val; + const parenExpression = this.startNodeAt(startPos, startLoc); + parenExpression.expression = val; + this.finishNode(parenExpression, "ParenthesizedExpression"); + return parenExpression; } shouldParseArrow(): boolean { diff --git a/packages/babel-parser/src/parser/lval.js b/packages/babel-parser/src/parser/lval.js index dd02c8c97441..6db5558a8ff9 100644 --- a/packages/babel-parser/src/parser/lval.js +++ b/packages/babel-parser/src/parser/lval.js @@ -93,6 +93,14 @@ export default class LValParser extends NodeUtils { } break; + case "ParenthesizedExpression": + node.expression = this.toAssignable( + node.expression, + isBinding, + contextDescription, + ); + break; + case "MemberExpression": if (!isBinding) break; @@ -413,6 +421,15 @@ export default class LValParser extends NodeUtils { ); break; + case "ParenthesizedExpression": + this.checkLVal( + expr.expression, + bindingType, + checkClashes, + "parenthesized expression", + ); + break; + default: { const message = (bindingType === BIND_NONE diff --git a/packages/babel-parser/src/parser/statement.js b/packages/babel-parser/src/parser/statement.js index d97d4986a0a0..dd46a44df331 100644 --- a/packages/babel-parser/src/parser/statement.js +++ b/packages/babel-parser/src/parser/statement.js @@ -453,6 +453,13 @@ export default class StatementParser extends ExpressionParser { return this.finishNode(node, "DebuggerStatement"); } + parseHeaderExpression(): N.Expression { + this.expect(tt.parenL); + const val = this.parseExpression(); + this.expect(tt.parenR); + return val; + } + parseDoStatement(node: N.DoWhileStatement): N.DoWhileStatement { this.next(); this.state.labels.push(loopLabel); @@ -469,7 +476,7 @@ export default class StatementParser extends ExpressionParser { this.state.labels.pop(); this.expect(tt._while); - node.test = this.parseParenExpression(); + node.test = this.parseHeaderExpression(); this.eat(tt.semi); return this.finishNode(node, "DoWhileStatement"); } @@ -567,7 +574,7 @@ export default class StatementParser extends ExpressionParser { parseIfStatement(node: N.IfStatement): N.IfStatement { this.next(); - node.test = this.parseParenExpression(); + node.test = this.parseHeaderExpression(); node.consequent = this.parseStatement("if"); node.alternate = this.eat(tt._else) ? this.parseStatement("if") : null; return this.finishNode(node, "IfStatement"); @@ -596,7 +603,7 @@ export default class StatementParser extends ExpressionParser { parseSwitchStatement(node: N.SwitchStatement): N.SwitchStatement { this.next(); - node.discriminant = this.parseParenExpression(); + node.discriminant = this.parseHeaderExpression(); const cases = (node.cases = []); this.expect(tt.braceL); this.state.labels.push(switchLabel); @@ -715,7 +722,7 @@ export default class StatementParser extends ExpressionParser { parseWhileStatement(node: N.WhileStatement): N.WhileStatement { this.next(); - node.test = this.parseParenExpression(); + node.test = this.parseHeaderExpression(); this.state.labels.push(loopLabel); node.body = @@ -737,7 +744,7 @@ export default class StatementParser extends ExpressionParser { this.raise(this.state.start, "'with' in strict mode"); } this.next(); - node.object = this.parseParenExpression(); + node.object = this.parseHeaderExpression(); node.body = // For the smartPipelines plugin: diff --git a/packages/babel-parser/src/types.js b/packages/babel-parser/src/types.js index e3a584ddc32c..cc1fd01f305c 100644 --- a/packages/babel-parser/src/types.js +++ b/packages/babel-parser/src/types.js @@ -574,6 +574,11 @@ export type SequenceExpression = NodeBase & { expressions: $ReadOnlyArray, }; +export type ParenthesizedExpression = NodeBase & { + type: "ParenthesizedExpression", + expression: Expression, +}; + // Pipelines export type PipelineBody = NodeBase & { diff --git a/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/input.js b/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/input.js new file mode 100644 index 000000000000..753a9cfbb2b5 --- /dev/null +++ b/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/input.js @@ -0,0 +1,12 @@ +// One +(1); + +/* Two */ +(2); + +( + // Three + 3 +); + +(/* Four */ 4); diff --git a/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/options.json b/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/options.json new file mode 100644 index 000000000000..0861962d889d --- /dev/null +++ b/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/options.json @@ -0,0 +1,3 @@ +{ + "createParenthesizedExpressions": true +} diff --git a/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/output.json b/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/output.json new file mode 100644 index 000000000000..761463790803 --- /dev/null +++ b/packages/babel-parser/test/fixtures/comments/basic/create-parenthesized-expressions/output.json @@ -0,0 +1,391 @@ +{ + "type": "File", + "start": 0, + "end": 65, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 15 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 65, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 15 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 7, + "end": 11, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 4 + } + }, + "expression": { + "type": "ParenthesizedExpression", + "start": 7, + "end": 10, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 2 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " One", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + "trailingComments": [ + { + "type": "CommentBlock", + "value": " Two ", + "start": 13, + "end": 22, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ] + }, + { + "type": "ExpressionStatement", + "start": 23, + "end": 27, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 4 + } + }, + "expression": { + "type": "ParenthesizedExpression", + "start": 23, + "end": 26, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 24, + "end": 25, + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + }, + "extra": { + "rawValue": 2, + "raw": "2" + }, + "value": 2 + } + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": " Two ", + "start": 13, + "end": 22, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ] + }, + { + "type": "ExpressionStatement", + "start": 29, + "end": 48, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 10, + "column": 2 + } + }, + "expression": { + "type": "ParenthesizedExpression", + "start": 29, + "end": 47, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 10, + "column": 1 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 44, + "end": 45, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + }, + "extra": { + "rawValue": 3, + "raw": "3" + }, + "value": 3, + "leadingComments": [ + { + "type": "CommentLine", + "value": " Three", + "start": 33, + "end": 41, + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + } + ] + } + } + }, + { + "type": "ExpressionStatement", + "start": 50, + "end": 65, + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 15 + } + }, + "expression": { + "type": "ParenthesizedExpression", + "start": 50, + "end": 64, + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 14 + } + }, + "expression": { + "type": "NumericLiteral", + "start": 62, + "end": 63, + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 13 + } + }, + "extra": { + "rawValue": 4, + "raw": "4" + }, + "value": 4, + "leadingComments": [ + { + "type": "CommentBlock", + "value": " Four ", + "start": 51, + "end": 61, + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + ] + } + } + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentLine", + "value": " One", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "CommentBlock", + "value": " Two ", + "start": 13, + "end": 22, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "CommentLine", + "value": " Three", + "start": 33, + "end": 41, + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "CommentBlock", + "value": " Four ", + "start": 51, + "end": 61, + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + ] +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/556/input.js b/packages/babel-parser/test/fixtures/core/uncategorised/556/input.js new file mode 100644 index 000000000000..13cfa4015d22 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/uncategorised/556/input.js @@ -0,0 +1 @@ +({x}) = {x: 1}; diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/556/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/556/options.json new file mode 100644 index 000000000000..eff49cbfba64 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/uncategorised/556/options.json @@ -0,0 +1,4 @@ +{ + "createParenthesizedExpressions": true, + "throws": "You're trying to assign to a parenthesized expression, eg. instead of `({a}) = 0` use `({a} = 0)` (1:1)" +} diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/557/input.js b/packages/babel-parser/test/fixtures/core/uncategorised/557/input.js new file mode 100644 index 000000000000..40d925520dfa --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/uncategorised/557/input.js @@ -0,0 +1 @@ +("hello"); diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/557/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/557/options.json new file mode 100644 index 000000000000..0861962d889d --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/uncategorised/557/options.json @@ -0,0 +1,3 @@ +{ + "createParenthesizedExpressions": true +} diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/557/output.json b/packages/babel-parser/test/fixtures/core/uncategorised/557/output.json new file mode 100644 index 000000000000..b1f49f00e99f --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/uncategorised/557/output.json @@ -0,0 +1,85 @@ +{ + "type": "File", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "ParenthesizedExpression", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "expression": { + "type": "StringLiteral", + "start": 1, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "extra": { + "rawValue": "hello", + "raw": "\"hello\"" + }, + "value": "hello" + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/558/input.js b/packages/babel-parser/test/fixtures/core/uncategorised/558/input.js new file mode 100644 index 000000000000..2cf717d47db3 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/uncategorised/558/input.js @@ -0,0 +1 @@ +([a]) = [] diff --git a/packages/babel-parser/test/fixtures/core/uncategorised/558/options.json b/packages/babel-parser/test/fixtures/core/uncategorised/558/options.json new file mode 100644 index 000000000000..f37c4bc95c57 --- /dev/null +++ b/packages/babel-parser/test/fixtures/core/uncategorised/558/options.json @@ -0,0 +1,4 @@ +{ + "createParenthesizedExpressions": true, + "throws": "You're trying to assign to a parenthesized expression, eg. instead of `([a]) = 0` use `([a] = 0)` (1:1)" +} diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/input.js b/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/input.js new file mode 100644 index 000000000000..6626a35389c8 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/input.js @@ -0,0 +1 @@ +(foo) => {} diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/options.json b/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/options.json new file mode 100644 index 000000000000..0861962d889d --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/options.json @@ -0,0 +1,3 @@ +{ + "createParenthesizedExpressions": true +} diff --git a/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/output.json b/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/output.json new file mode 100644 index 000000000000..09568c70bbb9 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/arrow-functions/create-parenthesized-expressions/output.json @@ -0,0 +1,104 @@ +{ + "type": "File", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 1, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 4 + }, + "identifierName": "foo" + }, + "name": "foo" + } + ], + "body": { + "type": "BlockStatement", + "start": 9, + "end": 11, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + }, + "body": [], + "directives": [] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/394/input.js b/packages/babel-parser/test/fixtures/es2015/uncategorised/394/input.js new file mode 100644 index 000000000000..d6a05dcf09c2 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/394/input.js @@ -0,0 +1,4 @@ +var a; +(a) = {}; +(a.b) = {}; +(a['c']) = {}; diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/394/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/394/options.json new file mode 100644 index 000000000000..0861962d889d --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/394/options.json @@ -0,0 +1,3 @@ +{ + "createParenthesizedExpressions": true +} diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/394/output.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/394/output.json new file mode 100644 index 000000000000..3eccd63cbd63 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/394/output.json @@ -0,0 +1,392 @@ +{ + "type": "File", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 43, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "sourceType": "script", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + } + }, + "id": { + "type": "Identifier", + "start": 4, + "end": 5, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 5 + }, + "identifierName": "a" + }, + "name": "a" + }, + "init": null + } + ], + "kind": "var" + }, + { + "type": "ExpressionStatement", + "start": 7, + "end": 16, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 9 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 7, + "end": 15, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 8 + } + }, + "operator": "=", + "left": { + "type": "ParenthesizedExpression", + "start": 7, + "end": 10, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 3 + } + }, + "expression": { + "type": "Identifier", + "start": 8, + "end": 9, + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 2 + }, + "identifierName": "a" + }, + "name": "a" + } + }, + "right": { + "type": "ObjectExpression", + "start": 13, + "end": 15, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 8 + } + }, + "properties": [] + } + } + }, + { + "type": "ExpressionStatement", + "start": 17, + "end": 28, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 11 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 17, + "end": 27, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "operator": "=", + "left": { + "type": "ParenthesizedExpression", + "start": 17, + "end": 22, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 5 + } + }, + "expression": { + "type": "MemberExpression", + "start": 18, + "end": 21, + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 4 + } + }, + "object": { + "type": "Identifier", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 20, + "end": 21, + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 4 + }, + "identifierName": "b" + }, + "name": "b" + }, + "computed": false + } + }, + "right": { + "type": "ObjectExpression", + "start": 25, + "end": 27, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + } + }, + "properties": [] + } + } + }, + { + "type": "ExpressionStatement", + "start": 29, + "end": 43, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 14 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 29, + "end": 42, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 13 + } + }, + "operator": "=", + "left": { + "type": "ParenthesizedExpression", + "start": 29, + "end": 37, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 8 + } + }, + "expression": { + "type": "MemberExpression", + "start": 30, + "end": 36, + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 7 + } + }, + "object": { + "type": "Identifier", + "start": 30, + "end": 31, + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "StringLiteral", + "start": 32, + "end": 35, + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 6 + } + }, + "extra": { + "rawValue": "c", + "raw": "'c'" + }, + "value": "c" + }, + "computed": true + } + }, + "right": { + "type": "ObjectExpression", + "start": 40, + "end": 42, + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 13 + } + }, + "properties": [] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/395/input.js b/packages/babel-parser/test/fixtures/es2015/uncategorised/395/input.js new file mode 100644 index 000000000000..874dec75a9cc --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/395/input.js @@ -0,0 +1 @@ +([a.a]) => 42 \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/es2015/uncategorised/395/options.json b/packages/babel-parser/test/fixtures/es2015/uncategorised/395/options.json new file mode 100644 index 000000000000..db72a6af957d --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2015/uncategorised/395/options.json @@ -0,0 +1,4 @@ +{ + "createParenthesizedExpressions": true, + "throws": "Invalid left-hand side in arrow function parameters (1:2)" +} diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/input.js b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/input.js new file mode 100644 index 000000000000..63fce35a8a19 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/input.js @@ -0,0 +1 @@ +-(5) ** 6; diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/options.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/options.json new file mode 100644 index 000000000000..c694133bf2b1 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/15/options.json @@ -0,0 +1,4 @@ +{ + "createParenthesizedExpressions": true, + "throws": "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:1)" +} diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/input.js b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/input.js new file mode 100644 index 000000000000..47b91d35a849 --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/input.js @@ -0,0 +1 @@ +(-5 ** 6); diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/options.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/options.json new file mode 100644 index 000000000000..19687fbe197a --- /dev/null +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/16/options.json @@ -0,0 +1,4 @@ +{ + "createParenthesizedExpressions": true, + "throws": "Illegal expression. Wrap left hand side or entire exponentiation in parentheses. (1:2)" +} diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/2/output.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/2/output.json index e4e9ecd32a5d..e840aecbd18a 100644 --- a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/2/output.json +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/2/output.json @@ -124,4 +124,4 @@ ], "directives": [] } -} \ No newline at end of file +} diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/7/output.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/7/output.json index c4f295eacffd..2fb85f363b06 100644 --- a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/7/output.json +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/7/output.json @@ -160,4 +160,4 @@ ], "directives": [] } -} \ No newline at end of file +} diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/8/output.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/8/output.json index fd863ac0f6f6..56c71d7d2533 100644 --- a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/8/output.json +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/8/output.json @@ -156,4 +156,4 @@ ], "directives": [] } -} \ No newline at end of file +} diff --git a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/9/output.json b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/9/output.json index c3f4e42e1c0c..2691c6433738 100644 --- a/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/9/output.json +++ b/packages/babel-parser/test/fixtures/es2016/exponentiation-operator/9/output.json @@ -124,4 +124,4 @@ ], "directives": [] } -} \ No newline at end of file +} diff --git a/packages/babel-parser/typings/babel-parser.d.ts b/packages/babel-parser/typings/babel-parser.d.ts index b3f745f61a93..deba6be0e6a7 100644 --- a/packages/babel-parser/typings/babel-parser.d.ts +++ b/packages/babel-parser/typings/babel-parser.d.ts @@ -78,6 +78,14 @@ export interface ParserOptions { * Adds all parsed tokens to a tokens property on the File node. */ tokens?: boolean; + + /** + * By default, the parser adds information about parentheses by setting + * `extra.parenthesized` to `true` as needed. + * When this option is `true` the parser creates `ParenthesizedExpression` + * AST nodes instead of using the `extra` property. + */ + createParenthesizedExpressions?: boolean; } export type ParserPlugin = diff --git a/packages/babel-traverse/src/path/inference/inferers.js b/packages/babel-traverse/src/path/inference/inferers.js index 2f8ab658389b..fb9a467b1f64 100644 --- a/packages/babel-traverse/src/path/inference/inferers.js +++ b/packages/babel-traverse/src/path/inference/inferers.js @@ -102,6 +102,10 @@ export function SequenceExpression() { .getTypeAnnotation(); } +export function ParenthesizedExpression() { + return this.get("expression").getTypeAnnotation(); +} + export function AssignmentExpression() { return this.get("right").getTypeAnnotation(); } diff --git a/packages/babel-types/src/asserts/generated/index.js b/packages/babel-types/src/asserts/generated/index.js index 34a6a125a252..75fcbd6a8d22 100644 --- a/packages/babel-types/src/asserts/generated/index.js +++ b/packages/babel-types/src/asserts/generated/index.js @@ -162,6 +162,12 @@ export function assertSequenceExpression( ): void { assert("SequenceExpression", node, opts); } +export function assertParenthesizedExpression( + node: Object, + opts?: Object = {}, +): void { + assert("ParenthesizedExpression", node, opts); +} export function assertSwitchCase(node: Object, opts?: Object = {}): void { assert("SwitchCase", node, opts); } @@ -654,12 +660,6 @@ export function assertJSXClosingFragment( export function assertNoop(node: Object, opts?: Object = {}): void { assert("Noop", node, opts); } -export function assertParenthesizedExpression( - node: Object, - opts?: Object = {}, -): void { - assert("ParenthesizedExpression", node, opts); -} export function assertArgumentPlaceholder( node: Object, opts?: Object = {}, diff --git a/packages/babel-types/src/builders/generated/index.js b/packages/babel-types/src/builders/generated/index.js index 6b787e0bb3f8..e7af718d9c95 100644 --- a/packages/babel-types/src/builders/generated/index.js +++ b/packages/babel-types/src/builders/generated/index.js @@ -161,6 +161,10 @@ export function SequenceExpression(...args: Array): Object { return builder("SequenceExpression", ...args); } export { SequenceExpression as sequenceExpression }; +export function ParenthesizedExpression(...args: Array): Object { + return builder("ParenthesizedExpression", ...args); +} +export { ParenthesizedExpression as parenthesizedExpression }; export function SwitchCase(...args: Array): Object { return builder("SwitchCase", ...args); } @@ -592,10 +596,6 @@ export function Noop(...args: Array): Object { return builder("Noop", ...args); } export { Noop as noop }; -export function ParenthesizedExpression(...args: Array): Object { - return builder("ParenthesizedExpression", ...args); -} -export { ParenthesizedExpression as parenthesizedExpression }; export function ArgumentPlaceholder(...args: Array): Object { return builder("ArgumentPlaceholder", ...args); } diff --git a/packages/babel-types/src/definitions/core.js b/packages/babel-types/src/definitions/core.js index 214fa6ccd451..1e4de3ebbfa0 100644 --- a/packages/babel-types/src/definitions/core.js +++ b/packages/babel-types/src/definitions/core.js @@ -736,6 +736,16 @@ defineType("SequenceExpression", { aliases: ["Expression"], }); +defineType("ParenthesizedExpression", { + visitor: ["expression"], + aliases: ["Expression", "ExpressionWrapper"], + fields: { + expression: { + validate: assertNodeType("Expression"), + }, + }, +}); + defineType("SwitchCase", { visitor: ["test", "consequent"], fields: { diff --git a/packages/babel-types/src/definitions/misc.js b/packages/babel-types/src/definitions/misc.js index 2fc1334aac61..6bc22babc05f 100644 --- a/packages/babel-types/src/definitions/misc.js +++ b/packages/babel-types/src/definitions/misc.js @@ -1,16 +1,6 @@ // @flow -import defineType, { assertNodeType } from "./utils"; +import defineType from "./utils"; defineType("Noop", { visitor: [], }); - -defineType("ParenthesizedExpression", { - visitor: ["expression"], - aliases: ["Expression", "ExpressionWrapper"], - fields: { - expression: { - validate: assertNodeType("Expression"), - }, - }, -}); diff --git a/packages/babel-types/src/validators/generated/index.js b/packages/babel-types/src/validators/generated/index.js index c23ddcf11d97..969c6cdc2d5a 100644 --- a/packages/babel-types/src/validators/generated/index.js +++ b/packages/babel-types/src/validators/generated/index.js @@ -551,6 +551,23 @@ export function isSequenceExpression(node: ?Object, opts?: Object): boolean { return false; } +export function isParenthesizedExpression( + node: ?Object, + opts?: Object, +): boolean { + if (!node) return false; + + const nodeType = node.type; + if (nodeType === "ParenthesizedExpression") { + if (typeof opts === "undefined") { + return true; + } else { + return shallowEqual(node, opts); + } + } + + return false; +} export function isSwitchCase(node: ?Object, opts?: Object): boolean { if (!node) return false; @@ -2076,23 +2093,6 @@ export function isNoop(node: ?Object, opts?: Object): boolean { return false; } -export function isParenthesizedExpression( - node: ?Object, - opts?: Object, -): boolean { - if (!node) return false; - - const nodeType = node.type; - if (nodeType === "ParenthesizedExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return shallowEqual(node, opts); - } - } - - return false; -} export function isArgumentPlaceholder(node: ?Object, opts?: Object): boolean { if (!node) return false; @@ -3256,6 +3256,7 @@ export function isExpression(node: ?Object, opts?: Object): boolean { "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || + "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || @@ -3269,7 +3270,6 @@ export function isExpression(node: ?Object, opts?: Object): boolean { "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || - "ParenthesizedExpression" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || @@ -3559,8 +3559,8 @@ export function isExpressionWrapper(node: ?Object, opts?: Object): boolean { if ( nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || - "TypeCastExpression" === nodeType || - "ParenthesizedExpression" === nodeType + "ParenthesizedExpression" === nodeType || + "TypeCastExpression" === nodeType ) { if (typeof opts === "undefined") { return true; From e53be4b387db4f5b9dffbf4710a31e3a29fdda70 Mon Sep 17 00:00:00 2001 From: Matt Tingen Date: Wed, 6 Mar 2019 16:54:42 -0500 Subject: [PATCH 350/563] [TS] Allow context type annotation on getters/setters (#9641) * Allow context type annotation on getters/setters * Extract getAccessorsExpectedParamCount --- .../babel-parser/src/parser/expression.js | 13 +- .../babel-parser/src/plugins/typescript.js | 13 + .../function/getter-setter/input.js | 6 + .../function/getter-setter/output.json | 396 ++++++++++++++++++ .../fixtures/function/this-parameter/input.js | 6 + .../function/this-parameter/output.js | 9 + 6 files changed, 441 insertions(+), 2 deletions(-) create mode 100644 packages/babel-parser/test/fixtures/typescript/function/getter-setter/input.js create mode 100644 packages/babel-parser/test/fixtures/typescript/function/getter-setter/output.json diff --git a/packages/babel-parser/src/parser/expression.js b/packages/babel-parser/src/parser/expression.js index 71ce823720bd..35da903e7aa2 100644 --- a/packages/babel-parser/src/parser/expression.js +++ b/packages/babel-parser/src/parser/expression.js @@ -1564,10 +1564,16 @@ export default class ExpressionParser extends LValParser { ); } + getGetterSetterExpectedParamCount( + method: N.ObjectMethod | N.ClassMethod, + ): number { + return method.kind === "get" ? 0 : 1; + } + // get methods aren't allowed to have any parameters // set methods must have exactly 1 parameter which is not a rest parameter checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void { - const paramCount = method.kind === "get" ? 0 : 1; + const paramCount = this.getGetterSetterExpectedParamCount(method); const start = method.start; if (method.params.length !== paramCount) { if (method.kind === "get") { @@ -1577,7 +1583,10 @@ export default class ExpressionParser extends LValParser { } } - if (method.kind === "set" && method.params[0].type === "RestElement") { + if ( + method.kind === "set" && + method.params[method.params.length - 1].type === "RestElement" + ) { this.raise( start, "setter function argument must not be a rest parameter", diff --git a/packages/babel-parser/src/plugins/typescript.js b/packages/babel-parser/src/plugins/typescript.js index 0724db557024..513d0f3a94c0 100644 --- a/packages/babel-parser/src/plugins/typescript.js +++ b/packages/babel-parser/src/plugins/typescript.js @@ -2344,4 +2344,17 @@ export default (superClass: Class): Class => if (typeArguments) node.typeParameters = typeArguments; return super.jsxParseOpeningElementAfterName(node); } + + getGetterSetterExpectedParamCount( + method: N.ObjectMethod | N.ClassMethod, + ): number { + const baseCount = super.getGetterSetterExpectedParamCount(method); + const firstParam = method.params[0]; + const hasContextParam = + firstParam && + firstParam.type === "Identifier" && + firstParam.name === "this"; + + return hasContextParam ? baseCount + 1 : baseCount; + } }; diff --git a/packages/babel-parser/test/fixtures/typescript/function/getter-setter/input.js b/packages/babel-parser/test/fixtures/typescript/function/getter-setter/input.js new file mode 100644 index 000000000000..2a14042c1f49 --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/function/getter-setter/input.js @@ -0,0 +1,6 @@ +const g = { + get m(this: {}) {} +}; +const s = { + set m(this: {}, value) {} +}; \ No newline at end of file diff --git a/packages/babel-parser/test/fixtures/typescript/function/getter-setter/output.json b/packages/babel-parser/test/fixtures/typescript/function/getter-setter/output.json new file mode 100644 index 000000000000..ba424efc68ae --- /dev/null +++ b/packages/babel-parser/test/fixtures/typescript/function/getter-setter/output.json @@ -0,0 +1,396 @@ +{ + "type": "File", + "start": 0, + "end": 78, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 2 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 78, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 2 + } + }, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "VariableDeclaration", + "start": 0, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 6, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 6, + "end": 7, + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + }, + "identifierName": "g" + }, + "name": "g" + }, + "init": { + "type": "ObjectExpression", + "start": 10, + "end": 34, + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 3, + "column": 1 + } + }, + "properties": [ + { + "type": "ObjectMethod", + "start": 14, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + }, + "identifierName": "m" + }, + "name": "m" + }, + "computed": false, + "kind": "get", + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 20, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 16 + }, + "identifierName": "this" + }, + "name": "this", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 24, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "typeAnnotation": { + "type": "TSTypeLiteral", + "start": 26, + "end": 28, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "members": [] + } + } + } + ], + "body": { + "type": "BlockStatement", + "start": 30, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 20 + } + }, + "body": [], + "directives": [] + } + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 36, + "end": 78, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 6, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 42, + "end": 77, + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 42, + "end": 43, + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + }, + "identifierName": "s" + }, + "name": "s" + }, + "init": { + "type": "ObjectExpression", + "start": 46, + "end": 77, + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 6, + "column": 1 + } + }, + "properties": [ + { + "type": "ObjectMethod", + "start": 50, + "end": 75, + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 27 + } + }, + "method": false, + "key": { + "type": "Identifier", + "start": 54, + "end": 55, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + }, + "identifierName": "m" + }, + "name": "m" + }, + "computed": false, + "kind": "set", + "id": null, + "generator": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 56, + "end": 64, + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + }, + "identifierName": "this" + }, + "name": "this", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "start": 60, + "end": 64, + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + }, + "typeAnnotation": { + "type": "TSTypeLiteral", + "start": 62, + "end": 64, + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 16 + } + }, + "members": [] + } + } + }, + { + "type": "Identifier", + "start": 66, + "end": 71, + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 23 + }, + "identifierName": "value" + }, + "name": "value" + } + ], + "body": { + "type": "BlockStatement", + "start": 73, + "end": 75, + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 27 + } + }, + "body": [], + "directives": [] + } + } + ] + } + } + ], + "kind": "const" + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/function/this-parameter/input.js b/packages/babel-plugin-transform-typescript/test/fixtures/function/this-parameter/input.js index 420e20481467..bcc3eb3624b3 100644 --- a/packages/babel-plugin-transform-typescript/test/fixtures/function/this-parameter/input.js +++ b/packages/babel-plugin-transform-typescript/test/fixtures/function/this-parameter/input.js @@ -5,3 +5,9 @@ const o = { class C { m(this: {}) {} } +const g = { + get m(this: {}) {} +}; +const s = { + set m(this: {}, value: {}) {} +}; \ No newline at end of file diff --git a/packages/babel-plugin-transform-typescript/test/fixtures/function/this-parameter/output.js b/packages/babel-plugin-transform-typescript/test/fixtures/function/this-parameter/output.js index ded864e231dd..24b0164ac9cd 100644 --- a/packages/babel-plugin-transform-typescript/test/fixtures/function/this-parameter/output.js +++ b/packages/babel-plugin-transform-typescript/test/fixtures/function/this-parameter/output.js @@ -9,3 +9,12 @@ class C { m() {} } + +const g = { + get m() {} + +}; +const s = { + set m(value) {} + +}; \ No newline at end of file From d8a53298345b0f2814f2964280890cd6b4a0752f Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Wed, 6 Mar 2019 14:30:04 -0800 Subject: [PATCH 351/563] Reorganize token types and use a map for them (#9645) --- .../babel-parser/src/plugins/jsx/index.js | 2 + packages/babel-parser/src/tokenizer/index.js | 2 +- packages/babel-parser/src/tokenizer/types.js | 128 ++++++++---------- packages/babel-parser/src/util/identifier.js | 39 +----- 4 files changed, 63 insertions(+), 108 deletions(-) diff --git a/packages/babel-parser/src/plugins/jsx/index.js b/packages/babel-parser/src/plugins/jsx/index.js index a129c6d27a27..378bba9286cc 100644 --- a/packages/babel-parser/src/plugins/jsx/index.js +++ b/packages/babel-parser/src/plugins/jsx/index.js @@ -14,6 +14,8 @@ import { isNewLine } from "../../util/whitespace"; const HEX_NUMBER = /^[\da-fA-F]+$/; const DECIMAL_NUMBER = /^\d+$/; +// Be aware that this file is always executed and not only when the plugin is enabled. +// Therefore this contexts and tokens do always exist. tc.j_oTag = new TokContext("...", true, true); diff --git a/packages/babel-parser/src/tokenizer/index.js b/packages/babel-parser/src/tokenizer/index.js index f576698130f5..5d86682bcd35 100644 --- a/packages/babel-parser/src/tokenizer/index.js +++ b/packages/babel-parser/src/tokenizer/index.js @@ -1329,7 +1329,7 @@ export default class Tokenizer extends LocationParser { readWord(): void { const word = this.readWord1(); - const type = keywordTypes[word] || tt.name; + const type = keywordTypes.get(word) || tt.name; if (type.keyword && this.state.containsEsc) { this.raise(this.state.pos, `Escape sequence in keyword ${word}`); diff --git a/packages/babel-parser/src/tokenizer/types.js b/packages/babel-parser/src/tokenizer/types.js index ea9f15c7082a..2301759f3892 100644 --- a/packages/babel-parser/src/tokenizer/types.js +++ b/packages/babel-parser/src/tokenizer/types.js @@ -32,7 +32,6 @@ const postfix = true; type TokenOptions = { keyword?: string, - beforeExpr?: boolean, startsExpr?: boolean, rightAssociative?: boolean, @@ -66,16 +65,21 @@ export class TokenType { this.isAssign = !!conf.isAssign; this.prefix = !!conf.prefix; this.postfix = !!conf.postfix; - this.binop = conf.binop === 0 ? 0 : conf.binop || null; + this.binop = conf.binop != null ? conf.binop : null; this.updateContext = null; } } -function KeywordTokenType(keyword: string, options: TokenOptions = {}) { - return new TokenType(keyword, { ...options, keyword }); +export const keywords = new Map(); + +function createKeyword(name: string, options: TokenOptions = {}): TokenType { + options.keyword = name; + const token = new TokenType(name, options); + keywords.set(name, token); + return token; } -function BinopTokenType(name: string, binop: number) { +function createBinop(name: string, binop: number) { return new TokenType(name, { beforeExpr, binop }); } @@ -133,74 +137,60 @@ export const types: { [name: string]: TokenType } = { incDec: new TokenType("++/--", { prefix, postfix, startsExpr }), bang: new TokenType("!", { beforeExpr, prefix, startsExpr }), tilde: new TokenType("~", { beforeExpr, prefix, startsExpr }), - pipeline: BinopTokenType("|>", 0), - nullishCoalescing: BinopTokenType("??", 1), - logicalOR: BinopTokenType("||", 1), - logicalAND: BinopTokenType("&&", 2), - bitwiseOR: BinopTokenType("|", 3), - bitwiseXOR: BinopTokenType("^", 4), - bitwiseAND: BinopTokenType("&", 5), - equality: BinopTokenType("==/!=", 6), - relational: BinopTokenType("", 7), - bitShift: BinopTokenType("<>", 8), + pipeline: createBinop("|>", 0), + nullishCoalescing: createBinop("??", 1), + logicalOR: createBinop("||", 1), + logicalAND: createBinop("&&", 2), + bitwiseOR: createBinop("|", 3), + bitwiseXOR: createBinop("^", 4), + bitwiseAND: createBinop("&", 5), + equality: createBinop("==/!=", 6), + relational: createBinop("", 7), + bitShift: createBinop("<>", 8), plusMin: new TokenType("+/-", { beforeExpr, binop: 9, prefix, startsExpr }), - modulo: BinopTokenType("%", 10), - star: BinopTokenType("*", 10), - slash: BinopTokenType("/", 10), + modulo: createBinop("%", 10), + star: createBinop("*", 10), + slash: createBinop("/", 10), exponent: new TokenType("**", { beforeExpr, binop: 11, rightAssociative: true, }), -}; -function makeKeywordProps( - name: string, - conf: any, -): PropertyDescriptor { - return { value: KeywordTokenType(name, conf), enumerable: true }; -} - -// $FlowIssue -export const keywords = Object.create(null, { - break: makeKeywordProps("break"), - case: makeKeywordProps("case", { beforeExpr }), - catch: makeKeywordProps("catch"), - continue: makeKeywordProps("continue"), - debugger: makeKeywordProps("debugger"), - default: makeKeywordProps("default", { beforeExpr }), - do: makeKeywordProps("do", { isLoop, beforeExpr }), - else: makeKeywordProps("else", { beforeExpr }), - finally: makeKeywordProps("finally"), - for: makeKeywordProps("for", { isLoop }), - function: makeKeywordProps("function", { startsExpr }), - if: makeKeywordProps("if"), - return: makeKeywordProps("return", { beforeExpr }), - switch: makeKeywordProps("switch"), - throw: makeKeywordProps("throw", { beforeExpr, prefix, startsExpr }), - try: makeKeywordProps("try"), - var: makeKeywordProps("var"), - const: makeKeywordProps("const"), - while: makeKeywordProps("while", { isLoop }), - with: makeKeywordProps("with"), - new: makeKeywordProps("new", { beforeExpr, startsExpr }), - this: makeKeywordProps("this", { startsExpr }), - super: makeKeywordProps("super", { startsExpr }), - class: makeKeywordProps("class", { startsExpr }), - extends: makeKeywordProps("extends", { beforeExpr }), - export: makeKeywordProps("export"), - import: makeKeywordProps("import", { startsExpr }), - null: makeKeywordProps("null", { startsExpr }), - true: makeKeywordProps("true", { startsExpr }), - false: makeKeywordProps("false", { startsExpr }), - in: makeKeywordProps("in", { beforeExpr, binop: 7 }), - instanceof: makeKeywordProps("instanceof", { beforeExpr, binop: 7 }), - typeof: makeKeywordProps("typeof", { beforeExpr, prefix, startsExpr }), - void: makeKeywordProps("void", { beforeExpr, prefix, startsExpr }), - delete: makeKeywordProps("delete", { beforeExpr, prefix, startsExpr }), -}); - -// Map keyword names to token types. -Object.keys(keywords).forEach(name => { - types["_" + name] = keywords[name]; -}); + // Keywords + _break: createKeyword("break"), + _case: createKeyword("case", { beforeExpr }), + _catch: createKeyword("catch"), + _continue: createKeyword("continue"), + _debugger: createKeyword("debugger"), + _default: createKeyword("default", { beforeExpr }), + _do: createKeyword("do", { isLoop, beforeExpr }), + _else: createKeyword("else", { beforeExpr }), + _finally: createKeyword("finally"), + _for: createKeyword("for", { isLoop }), + _function: createKeyword("function", { startsExpr }), + _if: createKeyword("if"), + _return: createKeyword("return", { beforeExpr }), + _switch: createKeyword("switch"), + _throw: createKeyword("throw", { beforeExpr, prefix, startsExpr }), + _try: createKeyword("try"), + _var: createKeyword("var"), + _const: createKeyword("const"), + _while: createKeyword("while", { isLoop }), + _with: createKeyword("with"), + _new: createKeyword("new", { beforeExpr, startsExpr }), + _this: createKeyword("this", { startsExpr }), + _super: createKeyword("super", { startsExpr }), + _class: createKeyword("class", { startsExpr }), + _extends: createKeyword("extends", { beforeExpr }), + _export: createKeyword("export"), + _import: createKeyword("import", { startsExpr }), + _null: createKeyword("null", { startsExpr }), + _true: createKeyword("true", { startsExpr }), + _false: createKeyword("false", { startsExpr }), + _in: createKeyword("in", { beforeExpr, binop: 7 }), + _instanceof: createKeyword("instanceof", { beforeExpr, binop: 7 }), + _typeof: createKeyword("typeof", { beforeExpr, prefix, startsExpr }), + _void: createKeyword("void", { beforeExpr, prefix, startsExpr }), + _delete: createKeyword("delete", { beforeExpr, prefix, startsExpr }), +}; diff --git a/packages/babel-parser/src/util/identifier.js b/packages/babel-parser/src/util/identifier.js index bfd2ca748f81..7fda0e27de71 100644 --- a/packages/babel-parser/src/util/identifier.js +++ b/packages/babel-parser/src/util/identifier.js @@ -3,6 +3,7 @@ // @flow import * as charCodes from "charcodes"; +import { keywords } from "../tokenizer/types"; const reservedWords = { strict: [ @@ -52,44 +53,6 @@ export function isStrictBindReservedWord( return isReservedWord(word, inModule) || reservedWordsStrictBindSet.has(word); } -const keywords = new Set([ - "break", - "case", - "catch", - "continue", - "debugger", - "default", - "do", - "else", - "finally", - "for", - "function", - "if", - "return", - "switch", - "throw", - "try", - "var", - "while", - "with", - "null", - "true", - "false", - "instanceof", - "typeof", - "void", - "delete", - "new", - "in", - "this", - "const", - "class", - "extends", - "export", - "import", - "super", -]); - export function isKeyword(word: string): boolean { return keywords.has(word); } From fb81e8f8b45b6264796841e57a9b0301cadb9ad9 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Wed, 6 Mar 2019 14:30:43 -0800 Subject: [PATCH 352/563] Make babel-standalone an ESModule and enable flow (#9025) * Make babel-standalone an ESModule and enable flow * autogenerate plugin list * Make config an array --- Makefile | 1 + packages/babel-standalone/scripts/generate.js | 37 +++ .../scripts/pluginConfig.json | 85 ++++++ .../babel-standalone/src/generated/plugins.js | 256 ++++++++++++++++++ packages/babel-standalone/src/index.js | 140 +++------- .../babel-standalone/src/preset-es2015.js | 82 +++--- .../babel-standalone/src/preset-stage-0.js | 8 +- .../babel-standalone/src/preset-stage-1.js | 23 +- .../babel-standalone/src/preset-stage-2.js | 20 +- .../babel-standalone/src/preset-stage-3.js | 19 +- .../scripts/generateTypeHelpers.js | 30 +- .../scripts => scripts}/utils/formatCode.js | 2 +- scripts/utils/writeFileAndMkDir.js | 14 + 13 files changed, 507 insertions(+), 210 deletions(-) create mode 100644 packages/babel-standalone/scripts/generate.js create mode 100644 packages/babel-standalone/scripts/pluginConfig.json create mode 100644 packages/babel-standalone/src/generated/plugins.js rename {packages/babel-types/scripts => scripts}/utils/formatCode.js (88%) create mode 100644 scripts/utils/writeFileAndMkDir.js diff --git a/Makefile b/Makefile index 0664763b8dd0..1a52c4cef887 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ SOURCES = packages codemods build: clean clean-lib ./node_modules/.bin/gulp build + node ./packages/babel-standalone/scripts/generate.js node ./packages/babel-types/scripts/generateTypeHelpers.js # call build again as the generated files might need to be compiled again. ./node_modules/.bin/gulp build diff --git a/packages/babel-standalone/scripts/generate.js b/packages/babel-standalone/scripts/generate.js new file mode 100644 index 000000000000..a1c1cafb215d --- /dev/null +++ b/packages/babel-standalone/scripts/generate.js @@ -0,0 +1,37 @@ +// @flow +const pluginConfig = require("./pluginConfig.json"); +const path = require("path"); +const chalk = require("chalk"); +const camelCase = require("lodash/camelCase"); +const format = require("../../../scripts/utils/formatCode"); +const writeFile = require("../../../scripts/utils/writeFileAndMkDir"); + +const outputFile = path.join(__dirname, "../src/generated/plugins.js"); + +console.log("Generating @babel/standalone files"); + +let imports = ""; +let list = ""; +let allList = ""; + +for (const plugin of pluginConfig) { + const camelPlugin = camelCase(plugin); + imports += `import ${camelPlugin} from "@babel/plugin-${plugin}";`; + list += `${camelPlugin},`; + allList += `"${plugin}": ${camelPlugin},`; +} + +const fileContent = `// @flow +/* + * This file is auto-generated! Do not modify it directly. + * To re-generate run 'make build' + */ +${imports} + +export {${list}}; + +export const all = {${allList}}; +`; + +writeFile(outputFile, format(fileContent, outputFile)); +console.log(` ${chalk.green("✔")} Generated plugin list`); diff --git a/packages/babel-standalone/scripts/pluginConfig.json b/packages/babel-standalone/scripts/pluginConfig.json new file mode 100644 index 000000000000..812947393cdc --- /dev/null +++ b/packages/babel-standalone/scripts/pluginConfig.json @@ -0,0 +1,85 @@ +[ + "external-helpers", + "syntax-async-generators", + "syntax-class-properties", + "syntax-decorators", + "syntax-do-expressions", + "syntax-dynamic-import", + "syntax-export-default-from", + "syntax-export-namespace-from", + "syntax-flow", + "syntax-function-bind", + "syntax-function-sent", + "syntax-import-meta", + "syntax-jsx", + "syntax-object-rest-spread", + "syntax-optional-catch-binding", + "syntax-pipeline-operator", + "syntax-typescript", + "proposal-async-generator-functions", + "proposal-class-properties", + "proposal-decorators", + "proposal-do-expressions", + "proposal-export-default-from", + "proposal-export-namespace-from", + "proposal-function-bind", + "proposal-function-sent", + "proposal-json-strings", + "proposal-logical-assignment-operators", + "proposal-nullish-coalescing-operator", + "proposal-numeric-separator", + "proposal-object-rest-spread", + "proposal-optional-catch-binding", + "proposal-optional-chaining", + "proposal-pipeline-operator", + "proposal-private-methods", + "proposal-throw-expressions", + "proposal-unicode-property-regex", + "transform-async-to-generator", + "transform-arrow-functions", + "transform-block-scoped-functions", + "transform-block-scoping", + "transform-classes", + "transform-computed-properties", + "transform-destructuring", + "transform-dotall-regex", + "transform-duplicate-keys", + "transform-exponentiation-operator", + "transform-flow-comments", + "transform-flow-strip-types", + "transform-for-of", + "transform-function-name", + "transform-instanceof", + "transform-jscript", + "transform-literals", + "transform-member-expression-literals", + "transform-modules-amd", + "transform-modules-commonjs", + "transform-modules-systemjs", + "transform-modules-umd", + "transform-new-target", + "transform-object-assign", + "transform-object-super", + "transform-object-set-prototype-of-to-assign", + "transform-parameters", + "transform-property-literals", + "transform-property-mutators", + "transform-proto-to-assign", + "transform-react-constant-elements", + "transform-react-display-name", + "transform-react-inline-elements", + "transform-react-jsx", + "transform-react-jsx-compat", + "transform-react-jsx-self", + "transform-react-jsx-source", + "transform-regenerator", + "transform-runtime", + "transform-shorthand-properties", + "transform-spread", + "transform-sticky-regex", + "transform-strict-mode", + "transform-template-literals", + "transform-typeof-symbol", + "transform-typescript", + "transform-unicode-regex" +] diff --git a/packages/babel-standalone/src/generated/plugins.js b/packages/babel-standalone/src/generated/plugins.js new file mode 100644 index 000000000000..2e2e57576898 --- /dev/null +++ b/packages/babel-standalone/src/generated/plugins.js @@ -0,0 +1,256 @@ +// @flow +import externalHelpers from "@babel/plugin-external-helpers"; +import syntaxAsyncGenerators from "@babel/plugin-syntax-async-generators"; +import syntaxClassProperties from "@babel/plugin-syntax-class-properties"; +import syntaxDecorators from "@babel/plugin-syntax-decorators"; +import syntaxDoExpressions from "@babel/plugin-syntax-do-expressions"; +import syntaxDynamicImport from "@babel/plugin-syntax-dynamic-import"; +import syntaxExportDefaultFrom from "@babel/plugin-syntax-export-default-from"; +import syntaxExportNamespaceFrom from "@babel/plugin-syntax-export-namespace-from"; +import syntaxFlow from "@babel/plugin-syntax-flow"; +import syntaxFunctionBind from "@babel/plugin-syntax-function-bind"; +import syntaxFunctionSent from "@babel/plugin-syntax-function-sent"; +import syntaxImportMeta from "@babel/plugin-syntax-import-meta"; +import syntaxJsx from "@babel/plugin-syntax-jsx"; +import syntaxObjectRestSpread from "@babel/plugin-syntax-object-rest-spread"; +import syntaxOptionalCatchBinding from "@babel/plugin-syntax-optional-catch-binding"; +import syntaxPipelineOperator from "@babel/plugin-syntax-pipeline-operator"; +import syntaxTypescript from "@babel/plugin-syntax-typescript"; +import proposalAsyncGeneratorFunctions from "@babel/plugin-proposal-async-generator-functions"; +import proposalClassProperties from "@babel/plugin-proposal-class-properties"; +import proposalDecorators from "@babel/plugin-proposal-decorators"; +import proposalDoExpressions from "@babel/plugin-proposal-do-expressions"; +import proposalExportDefaultFrom from "@babel/plugin-proposal-export-default-from"; +import proposalExportNamespaceFrom from "@babel/plugin-proposal-export-namespace-from"; +import proposalFunctionBind from "@babel/plugin-proposal-function-bind"; +import proposalFunctionSent from "@babel/plugin-proposal-function-sent"; +import proposalJsonStrings from "@babel/plugin-proposal-json-strings"; +import proposalLogicalAssignmentOperators from "@babel/plugin-proposal-logical-assignment-operators"; +import proposalNullishCoalescingOperator from "@babel/plugin-proposal-nullish-coalescing-operator"; +import proposalNumericSeparator from "@babel/plugin-proposal-numeric-separator"; +import proposalObjectRestSpread from "@babel/plugin-proposal-object-rest-spread"; +import proposalOptionalCatchBinding from "@babel/plugin-proposal-optional-catch-binding"; +import proposalOptionalChaining from "@babel/plugin-proposal-optional-chaining"; +import proposalPipelineOperator from "@babel/plugin-proposal-pipeline-operator"; +import proposalPrivateMethods from "@babel/plugin-proposal-private-methods"; +import proposalThrowExpressions from "@babel/plugin-proposal-throw-expressions"; +import proposalUnicodePropertyRegex from "@babel/plugin-proposal-unicode-property-regex"; +import transformAsyncToGenerator from "@babel/plugin-transform-async-to-generator"; +import transformArrowFunctions from "@babel/plugin-transform-arrow-functions"; +import transformBlockScopedFunctions from "@babel/plugin-transform-block-scoped-functions"; +import transformBlockScoping from "@babel/plugin-transform-block-scoping"; +import transformClasses from "@babel/plugin-transform-classes"; +import transformComputedProperties from "@babel/plugin-transform-computed-properties"; +import transformDestructuring from "@babel/plugin-transform-destructuring"; +import transformDotallRegex from "@babel/plugin-transform-dotall-regex"; +import transformDuplicateKeys from "@babel/plugin-transform-duplicate-keys"; +import transformExponentiationOperator from "@babel/plugin-transform-exponentiation-operator"; +import transformFlowComments from "@babel/plugin-transform-flow-comments"; +import transformFlowStripTypes from "@babel/plugin-transform-flow-strip-types"; +import transformForOf from "@babel/plugin-transform-for-of"; +import transformFunctionName from "@babel/plugin-transform-function-name"; +import transformInstanceof from "@babel/plugin-transform-instanceof"; +import transformJscript from "@babel/plugin-transform-jscript"; +import transformLiterals from "@babel/plugin-transform-literals"; +import transformMemberExpressionLiterals from "@babel/plugin-transform-member-expression-literals"; +import transformModulesAmd from "@babel/plugin-transform-modules-amd"; +import transformModulesCommonjs from "@babel/plugin-transform-modules-commonjs"; +import transformModulesSystemjs from "@babel/plugin-transform-modules-systemjs"; +import transformModulesUmd from "@babel/plugin-transform-modules-umd"; +import transformNewTarget from "@babel/plugin-transform-new-target"; +import transformObjectAssign from "@babel/plugin-transform-object-assign"; +import transformObjectSuper from "@babel/plugin-transform-object-super"; +import transformObjectSetPrototypeOfToAssign from "@babel/plugin-transform-object-set-prototype-of-to-assign"; +import transformParameters from "@babel/plugin-transform-parameters"; +import transformPropertyLiterals from "@babel/plugin-transform-property-literals"; +import transformPropertyMutators from "@babel/plugin-transform-property-mutators"; +import transformProtoToAssign from "@babel/plugin-transform-proto-to-assign"; +import transformReactConstantElements from "@babel/plugin-transform-react-constant-elements"; +import transformReactDisplayName from "@babel/plugin-transform-react-display-name"; +import transformReactInlineElements from "@babel/plugin-transform-react-inline-elements"; +import transformReactJsx from "@babel/plugin-transform-react-jsx"; +import transformReactJsxCompat from "@babel/plugin-transform-react-jsx-compat"; +import transformReactJsxSelf from "@babel/plugin-transform-react-jsx-self"; +import transformReactJsxSource from "@babel/plugin-transform-react-jsx-source"; +import transformRegenerator from "@babel/plugin-transform-regenerator"; +import transformRuntime from "@babel/plugin-transform-runtime"; +import transformShorthandProperties from "@babel/plugin-transform-shorthand-properties"; +import transformSpread from "@babel/plugin-transform-spread"; +import transformStickyRegex from "@babel/plugin-transform-sticky-regex"; +import transformStrictMode from "@babel/plugin-transform-strict-mode"; +import transformTemplateLiterals from "@babel/plugin-transform-template-literals"; +import transformTypeofSymbol from "@babel/plugin-transform-typeof-symbol"; +import transformTypescript from "@babel/plugin-transform-typescript"; +import transformUnicodeRegex from "@babel/plugin-transform-unicode-regex"; + +export { + externalHelpers, + syntaxAsyncGenerators, + syntaxClassProperties, + syntaxDecorators, + syntaxDoExpressions, + syntaxDynamicImport, + syntaxExportDefaultFrom, + syntaxExportNamespaceFrom, + syntaxFlow, + syntaxFunctionBind, + syntaxFunctionSent, + syntaxImportMeta, + syntaxJsx, + syntaxObjectRestSpread, + syntaxOptionalCatchBinding, + syntaxPipelineOperator, + syntaxTypescript, + proposalAsyncGeneratorFunctions, + proposalClassProperties, + proposalDecorators, + proposalDoExpressions, + proposalExportDefaultFrom, + proposalExportNamespaceFrom, + proposalFunctionBind, + proposalFunctionSent, + proposalJsonStrings, + proposalLogicalAssignmentOperators, + proposalNullishCoalescingOperator, + proposalNumericSeparator, + proposalObjectRestSpread, + proposalOptionalCatchBinding, + proposalOptionalChaining, + proposalPipelineOperator, + proposalPrivateMethods, + proposalThrowExpressions, + proposalUnicodePropertyRegex, + transformAsyncToGenerator, + transformArrowFunctions, + transformBlockScopedFunctions, + transformBlockScoping, + transformClasses, + transformComputedProperties, + transformDestructuring, + transformDotallRegex, + transformDuplicateKeys, + transformExponentiationOperator, + transformFlowComments, + transformFlowStripTypes, + transformForOf, + transformFunctionName, + transformInstanceof, + transformJscript, + transformLiterals, + transformMemberExpressionLiterals, + transformModulesAmd, + transformModulesCommonjs, + transformModulesSystemjs, + transformModulesUmd, + transformNewTarget, + transformObjectAssign, + transformObjectSuper, + transformObjectSetPrototypeOfToAssign, + transformParameters, + transformPropertyLiterals, + transformPropertyMutators, + transformProtoToAssign, + transformReactConstantElements, + transformReactDisplayName, + transformReactInlineElements, + transformReactJsx, + transformReactJsxCompat, + transformReactJsxSelf, + transformReactJsxSource, + transformRegenerator, + transformRuntime, + transformShorthandProperties, + transformSpread, + transformStickyRegex, + transformStrictMode, + transformTemplateLiterals, + transformTypeofSymbol, + transformTypescript, + transformUnicodeRegex, +}; + +export const all = { + "external-helpers": externalHelpers, + "syntax-async-generators": syntaxAsyncGenerators, + "syntax-class-properties": syntaxClassProperties, + "syntax-decorators": syntaxDecorators, + "syntax-do-expressions": syntaxDoExpressions, + "syntax-dynamic-import": syntaxDynamicImport, + "syntax-export-default-from": syntaxExportDefaultFrom, + "syntax-export-namespace-from": syntaxExportNamespaceFrom, + "syntax-flow": syntaxFlow, + "syntax-function-bind": syntaxFunctionBind, + "syntax-function-sent": syntaxFunctionSent, + "syntax-import-meta": syntaxImportMeta, + "syntax-jsx": syntaxJsx, + "syntax-object-rest-spread": syntaxObjectRestSpread, + "syntax-optional-catch-binding": syntaxOptionalCatchBinding, + "syntax-pipeline-operator": syntaxPipelineOperator, + "syntax-typescript": syntaxTypescript, + "proposal-async-generator-functions": proposalAsyncGeneratorFunctions, + "proposal-class-properties": proposalClassProperties, + "proposal-decorators": proposalDecorators, + "proposal-do-expressions": proposalDoExpressions, + "proposal-export-default-from": proposalExportDefaultFrom, + "proposal-export-namespace-from": proposalExportNamespaceFrom, + "proposal-function-bind": proposalFunctionBind, + "proposal-function-sent": proposalFunctionSent, + "proposal-json-strings": proposalJsonStrings, + "proposal-logical-assignment-operators": proposalLogicalAssignmentOperators, + "proposal-nullish-coalescing-operator": proposalNullishCoalescingOperator, + "proposal-numeric-separator": proposalNumericSeparator, + "proposal-object-rest-spread": proposalObjectRestSpread, + "proposal-optional-catch-binding": proposalOptionalCatchBinding, + "proposal-optional-chaining": proposalOptionalChaining, + "proposal-pipeline-operator": proposalPipelineOperator, + "proposal-private-methods": proposalPrivateMethods, + "proposal-throw-expressions": proposalThrowExpressions, + "proposal-unicode-property-regex": proposalUnicodePropertyRegex, + "transform-async-to-generator": transformAsyncToGenerator, + "transform-arrow-functions": transformArrowFunctions, + "transform-block-scoped-functions": transformBlockScopedFunctions, + "transform-block-scoping": transformBlockScoping, + "transform-classes": transformClasses, + "transform-computed-properties": transformComputedProperties, + "transform-destructuring": transformDestructuring, + "transform-dotall-regex": transformDotallRegex, + "transform-duplicate-keys": transformDuplicateKeys, + "transform-exponentiation-operator": transformExponentiationOperator, + "transform-flow-comments": transformFlowComments, + "transform-flow-strip-types": transformFlowStripTypes, + "transform-for-of": transformForOf, + "transform-function-name": transformFunctionName, + "transform-instanceof": transformInstanceof, + "transform-jscript": transformJscript, + "transform-literals": transformLiterals, + "transform-member-expression-literals": transformMemberExpressionLiterals, + "transform-modules-amd": transformModulesAmd, + "transform-modules-commonjs": transformModulesCommonjs, + "transform-modules-systemjs": transformModulesSystemjs, + "transform-modules-umd": transformModulesUmd, + "transform-new-target": transformNewTarget, + "transform-object-assign": transformObjectAssign, + "transform-object-super": transformObjectSuper, + "transform-object-set-prototype-of-to-assign": transformObjectSetPrototypeOfToAssign, + "transform-parameters": transformParameters, + "transform-property-literals": transformPropertyLiterals, + "transform-property-mutators": transformPropertyMutators, + "transform-proto-to-assign": transformProtoToAssign, + "transform-react-constant-elements": transformReactConstantElements, + "transform-react-display-name": transformReactDisplayName, + "transform-react-inline-elements": transformReactInlineElements, + "transform-react-jsx": transformReactJsx, + "transform-react-jsx-compat": transformReactJsxCompat, + "transform-react-jsx-self": transformReactJsxSelf, + "transform-react-jsx-source": transformReactJsxSource, + "transform-regenerator": transformRegenerator, + "transform-runtime": transformRuntime, + "transform-shorthand-properties": transformShorthandProperties, + "transform-spread": transformSpread, + "transform-sticky-regex": transformStickyRegex, + "transform-strict-mode": transformStrictMode, + "transform-template-literals": transformTemplateLiterals, + "transform-typeof-symbol": transformTypeofSymbol, + "transform-typescript": transformTypescript, + "transform-unicode-regex": transformUnicodeRegex, +}; diff --git a/packages/babel-standalone/src/index.js b/packages/babel-standalone/src/index.js index 5804409ad095..d7ed72afd261 100644 --- a/packages/babel-standalone/src/index.js +++ b/packages/babel-standalone/src/index.js @@ -4,12 +4,26 @@ * plugins, instead explicitly registering all the available plugins and * presets, and requiring custom ones to be registered through `registerPlugin` * and `registerPreset` respectively. + * @flow */ /* global VERSION */ /* eslint-disable max-len */ -import * as Babel from "@babel/core"; +import { + transformFromAst as babelTransformFromAst, + transform as babelTransform, + buildExternalHelpers as babelBuildExternalHelpers, +} from "@babel/core"; +import { all } from "./generated/plugins"; +import preset2015 from "./preset-es2015"; +import presetStage0 from "./preset-stage-0"; +import presetStage1 from "./preset-stage-1"; +import presetStage2 from "./preset-stage-2"; +import presetStage3 from "./preset-stage-3"; +import presetReact from "@babel/preset-react"; +import presetFlow from "@babel/preset-flow"; +import presetTypescript from "@babel/preset-typescript"; import { runScripts } from "./transformScriptTags"; @@ -84,20 +98,20 @@ function processOptions(options) { }; } -export function transform(code, options) { - return Babel.transform(code, processOptions(options)); +export function transform(code: string, options: Object) { + return babelTransform(code, processOptions(options)); } -export function transformFromAst(ast, code, options) { - return Babel.transformFromAst(ast, code, processOptions(options)); +export function transformFromAst(ast: Object, code: string, options: Object) { + return babelTransformFromAst(ast, code, processOptions(options)); } export const availablePlugins = {}; export const availablePresets = {}; -export const buildExternalHelpers = Babel.buildExternalHelpers; +export const buildExternalHelpers = babelBuildExternalHelpers; /** * Registers a named plugin for use with Babel. */ -export function registerPlugin(name, plugin) { +export function registerPlugin(name: string, plugin: Object | Function): void { if (availablePlugins.hasOwnProperty(name)) { console.warn( `A plugin named "${name}" is already registered, it will be overridden`, @@ -109,7 +123,9 @@ export function registerPlugin(name, plugin) { * Registers multiple plugins for use with Babel. `newPlugins` should be an object where the key * is the name of the plugin, and the value is the plugin itself. */ -export function registerPlugins(newPlugins) { +export function registerPlugins(newPlugins: { + [string]: Object | Function, +}): void { Object.keys(newPlugins).forEach(name => registerPlugin(name, newPlugins[name]), ); @@ -118,7 +134,7 @@ export function registerPlugins(newPlugins) { /** * Registers a named preset for use with Babel. */ -export function registerPreset(name, preset) { +export function registerPreset(name: string, preset: Object | Function): void { if (availablePresets.hasOwnProperty(name)) { console.warn( `A preset named "${name}" is already registered, it will be overridden`, @@ -130,7 +146,9 @@ export function registerPreset(name, preset) { * Registers multiple presets for use with Babel. `newPresets` should be an object where the key * is the name of the preset, and the value is the preset itself. */ -export function registerPresets(newPresets) { +export function registerPresets(newPresets: { + [string]: Object | Function, +}): void { Object.keys(newPresets).forEach(name => registerPreset(name, newPresets[name]), ); @@ -139,90 +157,13 @@ export function registerPresets(newPresets) { // All the plugins we should bundle // Want to get rid of this long whitelist of plugins? // Wait! Please read https://github.com/babel/babel/pull/6177 first. -registerPlugins({ - "external-helpers": require("@babel/plugin-external-helpers"), - "syntax-async-generators": require("@babel/plugin-syntax-async-generators"), - "syntax-class-properties": require("@babel/plugin-syntax-class-properties"), - "syntax-decorators": require("@babel/plugin-syntax-decorators"), - "syntax-do-expressions": require("@babel/plugin-syntax-do-expressions"), - "syntax-dynamic-import": require("@babel/plugin-syntax-dynamic-import"), - "syntax-export-default-from": require("@babel/plugin-syntax-export-default-from"), - "syntax-export-namespace-from": require("@babel/plugin-syntax-export-namespace-from"), - "syntax-flow": require("@babel/plugin-syntax-flow"), - "syntax-function-bind": require("@babel/plugin-syntax-function-bind"), - "syntax-function-sent": require("@babel/plugin-syntax-function-sent"), - "syntax-import-meta": require("@babel/plugin-syntax-import-meta"), - "syntax-jsx": require("@babel/plugin-syntax-jsx"), - "syntax-object-rest-spread": require("@babel/plugin-syntax-object-rest-spread"), - "syntax-optional-catch-binding": require("@babel/plugin-syntax-optional-catch-binding"), - "syntax-pipeline-operator": require("@babel/plugin-syntax-pipeline-operator"), - "syntax-typescript": require("@babel/plugin-syntax-typescript"), - "transform-async-to-generator": require("@babel/plugin-transform-async-to-generator"), - "proposal-async-generator-functions": require("@babel/plugin-proposal-async-generator-functions"), - "proposal-class-properties": require("@babel/plugin-proposal-class-properties"), - "proposal-decorators": require("@babel/plugin-proposal-decorators"), - "proposal-do-expressions": require("@babel/plugin-proposal-do-expressions"), - "proposal-export-default-from": require("@babel/plugin-proposal-export-default-from"), - "proposal-export-namespace-from": require("@babel/plugin-proposal-export-namespace-from"), - "proposal-pipeline-operator": require("@babel/plugin-proposal-pipeline-operator"), - "proposal-private-methods": require("@babel/plugin-proposal-private-methods"), - "transform-arrow-functions": require("@babel/plugin-transform-arrow-functions"), - "transform-block-scoped-functions": require("@babel/plugin-transform-block-scoped-functions"), - "transform-block-scoping": require("@babel/plugin-transform-block-scoping"), - "transform-classes": require("@babel/plugin-transform-classes"), - "transform-computed-properties": require("@babel/plugin-transform-computed-properties"), - "transform-destructuring": require("@babel/plugin-transform-destructuring"), - "transform-dotall-regex": require("@babel/plugin-transform-dotall-regex"), - "transform-duplicate-keys": require("@babel/plugin-transform-duplicate-keys"), - "transform-for-of": require("@babel/plugin-transform-for-of"), - "transform-function-name": require("@babel/plugin-transform-function-name"), - "transform-instanceof": require("@babel/plugin-transform-instanceof"), - "transform-literals": require("@babel/plugin-transform-literals"), - "transform-modules-amd": require("@babel/plugin-transform-modules-amd"), - "transform-modules-commonjs": require("@babel/plugin-transform-modules-commonjs"), - "transform-modules-systemjs": require("@babel/plugin-transform-modules-systemjs"), - "transform-modules-umd": require("@babel/plugin-transform-modules-umd"), - "transform-object-super": require("@babel/plugin-transform-object-super"), - "transform-parameters": require("@babel/plugin-transform-parameters"), - "transform-shorthand-properties": require("@babel/plugin-transform-shorthand-properties"), - "transform-spread": require("@babel/plugin-transform-spread"), - "transform-sticky-regex": require("@babel/plugin-transform-sticky-regex"), - "transform-template-literals": require("@babel/plugin-transform-template-literals"), - "transform-typeof-symbol": require("@babel/plugin-transform-typeof-symbol"), - "transform-typescript": require("@babel/plugin-transform-typescript"), - "transform-unicode-regex": require("@babel/plugin-transform-unicode-regex"), - "transform-member-expression-literals": require("@babel/plugin-transform-member-expression-literals"), - "transform-property-literals": require("@babel/plugin-transform-property-literals"), - "transform-property-mutators": require("@babel/plugin-transform-property-mutators"), - "transform-exponentiation-operator": require("@babel/plugin-transform-exponentiation-operator"), - "transform-flow-comments": require("@babel/plugin-transform-flow-comments"), - "transform-flow-strip-types": require("@babel/plugin-transform-flow-strip-types"), - "proposal-function-bind": require("@babel/plugin-proposal-function-bind"), - "transform-jscript": require("@babel/plugin-transform-jscript"), - "transform-new-target": require("@babel/plugin-transform-new-target"), - "transform-object-assign": require("@babel/plugin-transform-object-assign"), - "proposal-object-rest-spread": require("@babel/plugin-proposal-object-rest-spread"), - "transform-object-set-prototype-of-to-assign": require("@babel/plugin-transform-object-set-prototype-of-to-assign"), - "proposal-optional-catch-binding": require("@babel/plugin-proposal-optional-catch-binding"), - "transform-proto-to-assign": require("@babel/plugin-transform-proto-to-assign"), - "transform-react-constant-elements": require("@babel/plugin-transform-react-constant-elements"), - "transform-react-display-name": require("@babel/plugin-transform-react-display-name"), - "transform-react-inline-elements": require("@babel/plugin-transform-react-inline-elements"), - "transform-react-jsx": require("@babel/plugin-transform-react-jsx"), - "transform-react-jsx-compat": require("@babel/plugin-transform-react-jsx-compat"), - "transform-react-jsx-self": require("@babel/plugin-transform-react-jsx-self"), - "transform-react-jsx-source": require("@babel/plugin-transform-react-jsx-source"), - "transform-regenerator": require("@babel/plugin-transform-regenerator"), - "transform-runtime": require("@babel/plugin-transform-runtime"), - "transform-strict-mode": require("@babel/plugin-transform-strict-mode"), - "proposal-unicode-property-regex": require("@babel/plugin-proposal-unicode-property-regex"), -}); +registerPlugins(all); // All the presets we should bundle // Want to get rid of this whitelist of presets? // Wait! Please read https://github.com/babel/babel/pull/6177 first. registerPresets({ - es2015: require("./preset-es2015"), + es2015: preset2015, es2016: () => { return { plugins: [availablePlugins["transform-exponentiation-operator"]], @@ -233,22 +174,23 @@ registerPresets({ plugins: [availablePlugins["transform-async-to-generator"]], }; }, - react: require("@babel/preset-react"), - "stage-0": require("./preset-stage-0"), - "stage-1": require("./preset-stage-1"), - "stage-2": require("./preset-stage-2"), - "stage-3": require("./preset-stage-3"), + react: presetReact, + "stage-0": presetStage0, + "stage-1": presetStage1, + "stage-2": presetStage2, + "stage-3": presetStage3, "es2015-loose": { - presets: [[require("./preset-es2015"), { loose: true }]], + presets: [[preset2015, { loose: true }]], }, // ES2015 preset with es2015-modules-commonjs removed "es2015-no-commonjs": { - presets: [[require("./preset-es2015"), { modules: false }]], + presets: [[preset2015, { modules: false }]], }, - typescript: require("@babel/preset-typescript"), - flow: require("@babel/preset-flow"), + typescript: presetTypescript, + flow: presetFlow, }); +// $FlowIgnore export const version = VERSION; function onDOMContentLoaded() { @@ -265,7 +207,7 @@ if (typeof window !== "undefined" && window && window.addEventListener) { * Transform