prettierx: Update flow-parser -> 0.306.1 - devDependency#681
Open
renovate[bot] wants to merge 1 commit intodevfrom
Open
prettierx: Update flow-parser -> 0.306.1 - devDependency#681renovate[bot] wants to merge 1 commit intodevfrom
renovate[bot] wants to merge 1 commit intodevfrom
Conversation
2dcd2be to
956ba54
Compare
956ba54 to
4385e36
Compare
4385e36 to
3b59ad5
Compare
3b59ad5 to
cf051a5
Compare
cf051a5 to
f349479
Compare
f349479 to
453c4b6
Compare
453c4b6 to
7dc5313
Compare
7dc5313 to
cdaea3e
Compare
cdaea3e to
9a8c4ae
Compare
9a8c4ae to
fdcacf7
Compare
fdcacf7 to
267206a
Compare
267206a to
69eb689
Compare
69eb689 to
948e902
Compare
948e902 to
fadea97
Compare
fadea97 to
7e9cd67
Compare
872f6ca to
7d21222
Compare
7d21222 to
3596a7b
Compare
3596a7b to
854664b
Compare
854664b to
1d71139
Compare
1d71139 to
22920b7
Compare
22920b7 to
ce9ebf8
Compare
ce9ebf8 to
7334005
Compare
7334005 to
28ab98d
Compare
28ab98d to
4b11fcf
Compare
4b11fcf to
eabdc8c
Compare
eabdc8c to
2b2e095
Compare
2b2e095 to
ca1def0
Compare
ca1def0 to
148c9e5
Compare
148c9e5 to
9c8979f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.155.0→0.306.1Release Notes
facebook/flow (flow-parser)
v0.306.1Compare Source
v0.306.0Compare Source
New Features:
Symbol.iterator.Notable bug fixes:
Library Definitions:
v0.305.1Compare Source
v0.305.0Compare Source
Misc:
v0.304.0Compare Source
Notable bug fixes:
v0.303.0Compare Source
New Features:
stylex_shorthand_propflowconfig option that enables syntactic sugar for StyleX on lowercase (intrinsic) JSX elements. When set to a prop name (e.g.stylex_shorthand_prop=sx),<div sx={[styles.foo, styles.bar]} />desugars to<div {...stylex.props(styles.foo, styles.bar)} />.v0.302.0Compare Source
Notable bug fixes:
Misc:
IDE:
v0.301.0Compare Source
IDE:
Reactautoimport, it will now always be in the form ofimport * as React from 'react'v0.300.0Compare Source
Misc:
v0.299.0Compare Source
Parser:
export declare, likedeclare exportcomponentin implicit declare context, the ast we produce will includeimplicitDeclare: truev0.298.0Compare Source
Likely to cause new Flow errors:
Parser:
filenamein the option objectv0.297.0Compare Source
New Features:
declarekeyword can be omitted fordeclare functionunder declaration context (.flow file, declare module, declare namespace)v0.296.1Compare Source
Parser:
v0.296.0Compare Source
Declarations:
declarekeyword can be omitted fordeclare const/let/var variable: typeanddeclare componentunder a declaration context (libdef file, .js.flow file, declare module, declare namespace)declare componentnow requires the rest props to be named - matching normalcomponentdeclarationsMisc:
Omit<O, K>utility type will no longer enforce that the provided keysKneed to be part ofOv0.295.0Compare Source
New Features:
Symbol.iterator,Symbol.asyncIterator,Symbol.dispose,Symbol.asyncDispose) in class methods. For now, the computed method name needs to be exactly in the form ofSymbol.iterator(or other 3 names) to be recognized.Notable bug fixes:
Misc:
yarn run flow-codemod convertLegacyUtilityTypes)Parser:
v0.294.0Compare Source
Parser:
Bug Fixes:
v0.293.0Compare Source
Config:
use_mixed_in_catch_variablesoption was renameduse_unknown_in_catch_variablesbecausemixedis being renamed tounknownv0.292.0Compare Source
Likely to cause new Flow errors:
Parser:
v0.291.0Compare Source
IDE:
invalid-type-cast-syntaxerrors in the file.v0.290.0Compare Source
Likely to cause new Flow errors:
type O_loop = { p: 0, __proto__: O_loop }will cause an error.Notable bug fixes:
import { | } from 'a';will only suggest values, not types.IDE:
Library Definitions:
v0.289.0Compare Source
Likely to cause new Flow errors:
$NonMaybeType,NonNullable,$ReadOnly,Readonly,$Keys,$Values,Values,$ReadOnlyMap,ReadonlyMap,$ReadOnlySet,ReadonlySet.Notable bug fixes:
StringPrefix/StringSuffixto be included in object initializers with other non-overlapping keys (example try-Flow)Library Definitions:
Added
act: 19.0: https://react.dev/reference/react/actcaptureOwnerStack: 19.1: See https://react.dev/reference/react/captureOwnerStackuseEffectEvent: 19.2: https://react.dev/reference/react/useEffectEvent<Activity />: 19.2: See https://react.dev/reference/react/ActivityUpdated
useDeferredValue: 19.0: Accepts a second argument for initial valueuseTransition: 19.0: Accepts an async action functionstartTransition: 19.0: Accepts an async action functionv0.288.0Compare Source
Likely to cause new Flow errors:
React.ElementPropsis removed. You should useReact.ElementConfiginstead.react-rule-hook-non-hook-syntaxerrors. To fix, annotate them with hook annotation. exampleReact$RefSetter<...>and andReact$Contextare removed. It continues to be available in the form ofReact.RefSetter<...>andReact.Context<...>, regardless of whether you have importedReact.React$ElementRef<...>was removed. It continues to be available in the form ofReact.ElementRef<...>, regardless of whether you have importedReact.Breaking Changes:
max_literal_lengthwas removed. Flow will always decide whether to infer a specific or general type of string literal based on the natural inference algorithm.Notable bug fixes:
@@​disposeand@@​asyncDisposein your library typings. You can access the respective properties withobj[Symbol.dispose]andobj[Symbol.asyncDispose].Library Definitions:
ExactReactElementwill be populated byReact.ElementConfig<C>instead ofReact.ElementProps<C>. Most of the code that doesn't depend on exact react element types won't be affected.v0.287.0Compare Source
Breaking Changes:
hermes-parserpackage, which is running on wasm.Likely to cause new Flow errors:
React$Elementtype is now removed. You should useReact.NodeorReact.MixedElementin most cases. If you really want exact react elements, you can useExactReactElement_DEPRECATEDNew Features:
IDE:
v0.286.0Compare Source
Breaking Changes:
flow-binwill only contain ARM64 binaries for macOS.Likely to cause new Flow errors:
D830142samzhou19815)React.ElementConfig<...>andReact.PropsOf<...>will now always include the ref prop in the props object type.react.ref_as_prop=partial_supportis removed, and Flow now has better support for React 19's ref-as-prop behavior:now it must be written as
v0.285.0Compare Source
Library Definitions:
useActionStatehook in React. Type should beAwaitedinstead ofPromise(the opposite operation).Object.groupByandMap.groupByBug fixes:
experimental.ts_utility_syntax=true, importedReadonly,ReadonlyArray,NonNullable,ReadonlyMap,ReadonlySettypes are considered any.v0.284.0Compare Source
Likely to cause new Flow errors:
v0.283.0Compare Source
Likely to cause new Flow errors:
// $FlowFixMe[incompatiblewill now cause an error on the suppressionv0.282.0Compare Source
Likely to cause new Flow errors:
Notable bug fixes:
<X>(x: X, y: typeof x): TIDE:
Library Definitions:
Array.findcan now return a more precise value if the predicate is inferred to be a type guard. examplev0.281.0Compare Source
Breaking Changes:
casting_syntax=colonis removed. This means that the as casting syntax is always enabled.experimental.error_code_migrationconfig option is removed. In the previously version, the only allowed value wasnew.Likely to cause new Flow errors:
$FlowFixMeand$FlowExpectedErrorare supported suppression comments. Existing$FlowIgnoreand$FlowIssuewill no longer suppress anything.New Features:
require-explicit-enum-checkswhich works likerequire-explicit-enum-switch-casesbut formatch.Notable bug fixes:
class Foo extends myExpr() as Bardeclare) method in the same vs different files.IDE:
v0.280.0Compare Source
Likely to cause new Flow errors:
missing-exporterror instead ofprop-missingerror. (example)suppress_type$FlowFixMeis now just a type alias ofany. For most of the code, there will be no functional differences. However, you might see new errors if you have any local definitions of$FlowFixMe, or you used the undocumented$FlowFixMe<arbitrary type arguments>.suppress_typeconfig has been removed. The only supportedsupress_typenow is$FlowFixMe. If you want other variants, you can addin your global library definitions.
incompatible-type, so some previously suppressed errors will reappear until you change the suppression error code intoincompatible-type. The change was announced in the previous version, with option to enable it viaexperimental.error_code_migration=new. Now the only valid option toexperimental.error_code_migrationisnew. You can runflow codemod error-code-migration --write .with the previous version of Flow to help migrate, since the codemod is removed in this version.v0.279.0Compare Source
New Features:
incompatible-type. You can addexperimental.error_code_migration=newin your flowconfig to enable the new behavior now. We also provide a codemodflow codemod error-code-migration --write .that you can run over your codebase to automatically change the error code. Both the flowconfig option and the codemod will be removed in the next version.Notable bug fixes:
Misc:
v0.278.0Compare Source
Likely to cause new Flow errors:
react-rule-hook-conditionalerror instead ofreact-rule-hookerror.v0.277.1Compare Source
Notable bug fixes:
v0.277.0Compare Source
Likely to cause new Flow errors:
v0.276.0Compare Source
Likely to cause new Flow errors:
react-rule-hook-definitely-not-in-component-or-hookerror, if the variable name doesn't conform to hook naming convention. exampleIDE:
Misc:
ascasts withfunctiongenerics andcomponentgenerics!v0.275.0Compare Source
Likely to cause new Flow errors:
To fix the error, you can either annotate the object
or make the call site accepts readonly objects:
We provide a codemod to automate the annotation process.
flow codemod annotate-literal-declaration --write --max-type-size 5. (You can adjust the max type size based on your needs).IDE:
Library Definitions:
React$MixedElementis removed from builtin libdef. It will causeinternal-typeerror sincev0.258.0. You should useReact.MixedElementinstead.v0.274.2Compare Source
matchv0.274.1Compare Source
New Features:
matchfeature using optionexperimental.pattern_matching=truev0.274.0Compare Source
Likely to cause new Flow errors:
Library Definitions:
PropertyDescriptortype are marked as readonly. If you need a mutable version, you can introduce something liketype MutablePropertyDescriptor<T> = {...$Exact<PropertyDescriptor<T>>, ...}v0.273.1Compare Source
Notable bug fixes:
v0.273.0Compare Source
Likely to cause new Flow errors:
nested-hookandnested-componentlint errors which detect nested hook or component syntax within component or hook syntax. This is on by default.Notable bug fixes:
fooinimport foo from './bar', but now we will count foo. If the pattern ofimport foo from './bar'happens a lot, then the autoimport algorithm will be more likely to suggestimport foo from './bar'rather thanimport bar from './bar').react-rule-hook-conditionalerror for hooks called in a conditionally defined nested component.v0.272.2Compare Source
Notable bug fixes:
v0.272.1Compare Source
Notable bug fixes:
v0.272.0Compare Source
Likely to cause new Flow errors:
propsparam that's a subtype ofinterface {}will getreact-rule-hook-definitely-not-in-component-or-hookerror.react-rule-hook-mixed-with-non-hookerror instead ofreact-rule-hookerror. Calling functions named like hook but not in hook syntax will now getreact-rule-hook-non-hook-syntaxinstead ofreact-rule-hookerror.Notable bug fixes:
module.exportswill correctly jump to the exporting fileParser:
''#!/usr/bin/env node\n''when generating token listLibrary Definitions:
React.forwardRefis marked as deprecated. We might remove it from our builtin libdef in the future.v0.271.0Compare Source
Notable bug fixes:
export *will now be correctly indexed so that they won't be missing in autoimport results.Library Definitions
Float16Arraytypev0.270.0Compare Source
Likely to cause new Flow errors:
React.Nodewill no longer be treated like components. Thus, all the hooks call in such functions will havereact-rule-hook-definitely-not-in-component-or-hookerrors.Object.assignwill now triggerunsafe-object-assignlint error that's on by default. The type checking behavior forObject.assignwill otherwise stay the same for now.react-rule-hook-definitely-not-in-component-or-hook.Parser:
v0.269.1Compare Source
It should have the same behavior as 0.269.0.
v0.268.0Compare Source
Breaking:
ubuntu-22.04. It might make Flow not runnable on older linux distributions.Likely to cause new Flow errors:
[react-rule-hook-conditional]instead of[react-rule-hook-naming-convention]errors.$Diffsupport is removed. If you have trouble migrating, you can try to polyfill it by this. However,$Diffhas surprising behavior with regard to optional props in the second type parameter, which cannot be easily polyfilled (example).New Features:
react-rule-hook-naming-conventionandreact-rule-hook-conditionalerrors unsuppressable, you can add the following to the[options]section in flowconfig:v0.267.0Compare Source
Likely to cause new Flow errors:
We have updated the way type parameters are instantiated in generic calls, specifically when using upper bounds:
Support for
$Restis removed.Omitshould be used instead. If you still have many instances of$Rest, you can replace them with$Diffas a temporary measure, but note that we intend to eventually remove$Diffas well.React-rule hook errors related to conditional hook calls will now have
react-rule-hook-conditionalerror code.React-rule hook errors related to naming convention issues will now have
react-rule-hook-naming-conventionerror code.Notable bug fixes:
const x = 'a'; 'b' as typeof x as 'a';(try-Flow) to type check without errors. With this fix, Flow will infer singleton literal types for primitive literals in contexts where such precision is required. Examples of this are: const-declarations (e.g. inconst x = 42will infer the type42forx), annotation positions (e.g.typeof xis equivalent to the type42), conditionals (e.g. inif (x.tag === 42) {}Flow will infer the type42for the value42, instead ofnumber). In this part of the rollout, whenever this precision is not required Flow will infer the unsound type it used to infer before (a hybrid between the singleton and general type). Eliminating this unsound type completely will be done soon.flow-remove-typesnow handles the removal of empty imports after removing type/typeof imports (thanks @jbroma)v0.266.1Compare Source
libdef-overrideerror to stick around after an incremental recheck.v0.266.0Compare Source
Likely to cause new Flow errors:
$PropertyTypeand$ElementTypehas been removed. Now referencing these types will just resolve to a global type if you have your own definition for them, and result in acannot-resolve-nameerror otherwise. These types have been replaced by index access types for a long time. You can migrate to index access types by enabling use-indexed-access-type from https://www.npmjs.com/package/eslint-plugin-fb-flow and running the quickfixes. If you are unable to migrate, you can add the following to your global libdefs:component()<: component(ref?: ref_prop), Flow will ensure thatref_propis a subtype ofvoidinstead of a subtype ofReact.RefSetter<void>.React$ComponentType, which was previously given[internal-type]error on every usage, is now removed.React.ComponentType<Props>is now only an alias ofcomponent(...Props), instead of some special cased types. This comes with stricter checks and conversions, such as making Props readonly, erroring on the presence the ref prop instead of silently ignoring them, and ensures thatPropsis a subtype of{...}. In addition, theReact$AbstractComponenttype is removed.Notable bug fixes:
Library Definitions:
React.lazyandReact.memois now generic over the presence or absence of ref prop.v0.265.3Compare Source
@flowtypedresolution support work on Windows.v0.265.2Compare Source
Notable bug fixes:
libdef-overrideerrors.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.