Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: Improve placement of$FlowExpectedErrors in@babel/* packages#4559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@hyperupcall
Copy link
Contributor

  • Links to documentation:N/A
  • Link to GitHub or NPM: N/A
  • Type of contribution: refactor

This improves the placement of various$FlowExpectedErrors so they actually apply. Error id's were also added

BEFORE
$node cli/dist/cli.js run-tests @babel/'*' --numberOfFlowVersions 1Running definition tests against latest 1 flow versions in /home/edwin/Documents/Repositories/fox-forks/flow-typed/definitions...Fetching all Flow binaries...Finished fetching Flow binaries.Testing @babel/code-frame_v7.x.x/flow_v0.104.x- (flow-v0.224.0)...Testing @babel/polyfill_v7.x.x/flow_v0.104.x- (flow-v0.224.0)...Testing @babel/register_v7.x.x/flow_v0.104.x- (flow-v0.224.0)...ERROR: @babel/polyfill_v7.x.x/flow_v0.104.x-* @babel/polyfill_v7.x.x/flow_v0.104.x- (flow-v0.224.0): Unexpected Flow errors (0):    Warning ------------------------------------------------------------------------------------ test_polyfill_v7.x.x.js:7:1    Suppression is missing a code. Please update this suppression to use an error code: `$FlowFixMe[missing-export]`       7| // $FlowExpectedError does not export anything          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    Found 1 warningERROR: @babel/register_v7.x.x/flow_v0.104.x-* @babel/register_v7.x.x/flow_v0.104.x- (flow-v0.224.0): Unexpected Flow errors (2):    Error ------------------------------------------------------------------------------------- test_register_v7.x.x.js:26:9    Cannot call `require(...)` with object literal bound to `options` because in array element of property `plugins`:    [incompatible-call]     - Either number [1] is incompatible with string [2].     - Or number [1] is incompatible with tuple type [3].       test_register_v7.x.x.js:26:9       26|         123                   ^^^ [1]    References:       register_v7.x.x.js:28:40       28|     plugins?: Array<[string, Object] | string>,                                                  ^^^^^^ [2]       register_v7.x.x.js:28:21       28|     plugins?: Array<[string, Object] | string>,                               ^^^^^^^^^^^^^^^^ [3]    Error ------------------------------------------------------------------------------------ test_register_v7.x.x.js:31:16    Cannot call `require(...)` with object literal bound to `options` because string [1] is incompatible with array type [2]    in property `plugins`. [incompatible-call]       test_register_v7.x.x.js:31:16       31|       plugins: 'my-plugin'                          ^^^^^^^^^^^ [1]    References:       register_v7.x.x.js:28:15       28|     plugins?: Array<[string, Object] | string>,                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2]    Warning ------------------------------------------------------------------------------------ test_register_v7.x.x.js:6:5    Suppression is missing a code. Please update this suppression to use an error code: `$FlowFixMe[prop-missing]`       6|     // $FlowExpectedError does not accept unknown props              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    Warning ----------------------------------------------------------------------------------- test_register_v7.x.x.js:23:5    Unused suppression comment.       23|     // $FlowExpectedError no numbers               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    Warning ----------------------------------------------------------------------------------- test_register_v7.x.x.js:29:5    Unused suppression comment.       29|     // $FlowExpectedError should be array               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    Found 2 errors and 3 warnings    Only showing the most relevant union/intersection branches.    To see all branches, re-run Flow with --show-all-branches
AFTER
$run-tests @babel/'*' --numberOfFlowVersions 1Running definition tests against latest 1 flow versions in /home/edwin/Documents/Repositories/fox-forks/flow-typed/definitions...Fetching all Flow binaries...Finished fetching Flow binaries.Testing @babel/code-frame_v7.x.x/flow_v0.104.x- (flow-v0.224.0)...Testing @babel/polyfill_v7.x.x/flow_v0.104.x- (flow-v0.224.0)...Testing @babel/register_v7.x.x/flow_v0.104.x- (flow-v0.224.0)...All tests passed!

@hyperupcallhyperupcall changed the titlerefactor: Improve placement of$FlowExpectedErrorsrefactor: Improve placement of$FlowExpectedErrors in@babel/* packagesDec 18, 2023
@BrianzchenBrianzchen merged commit87f1dca intoflow-typed:masterDec 19, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@BrianzchenBrianzchenBrianzchen approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@hyperupcall@Brianzchen

[8]ページ先頭

©2009-2025 Movatter.jp