FBT Babel transform
This is the main FBT Babel transform. For E2E use it should be paired with the fbt-babel-plugin-runtime
The FBT Babel localization transform
This is the main FBT Babel transform. For E2E use it should be paired with the fbt-babel-plugin-runtime
List of changes for each released npm package version.
keyMirror.js
module to remove fbjs
package dependencyhash_key
in categorizeNewStrings.js
@babel/preset-react
<fbt common={true}>...</fbt>
.babelTypeShims.js
to GitHub. It was previously missing due to internal config issues.moduleMap
from babelPresetsyarn clean-test
script to clean, rebuild and test this whole projectpackage.json
for every package update.yarn flow:check
to check them.yarn flow:watch
to recheck types upon changing JS files.1.0.2
onMissingParameterError
error listener for reporting when substituteTokens
encounters a missing parameter, instead of throwing if __DEV__
was truthyundefined
, render empty string instead of the string "undefiend"
(i.e. match behavior for when parameter value is null
)1.0.1:
>=0.12.0
).1.0.0:
fbs
API to output plain-text translatable strings.extraOptions
to FbtHooks.getFbtResult
fbt._()
API (See 9bb6890 / D33476399)0.17.1:
.npmignore
config (avoid exporting some build, debug & test files)0.17.0:
IntlViewerContext
^0.10.x
^0.21.x
fbs()
really returns FbtPureStringResult
objects0.16.6:
FbtTranslations.getRegisteredTranslations
functionFbtTranslations.mergeTranslations
function0.16.5:
^0.20.x
0.16.4:
^0.19.x
0.16.3:
^0.18.x
0.16.2:
^0.17.x
0.16.1:
intlList
0.16.0:
GenderConst
entries that had the same value to avoid confusion. MIXED_SINGULAR
and MIXED_PLURAL
will both be referred as MIXED_UNKNOWN
and it'll keep the same value (MIXED_UNKNOWN=5
).presets
as a CLI option for collectFBT.js
0.15.0:
fbt.isFbtInstance()
to a predicate function for FlowObject.defineProperty()
for IE110.14.0:
invariant
module in fbt runtime and list it as dependencyFbtTable
and related types around payload access0.13.0:
0.12.1:
0.12.0:
0.11.0:
getFbtResult
in FbtHooks
0.10.6:
0.10.5:
0.10.4:
0.10.3:
0.10.2:
0.10.0:
- Add unit tests for fbs.enum() and <fbs:enum>
1.0.0:
[feat]! Refactored the string extraction algorithm to properly generate meaningful text/description pairs for fbt callsites
that contain JSX presentational elements.
We've also added support for a new way to call fbt()
using an array of inputs instead of string concatenation.
See #35
BREAKING CHANGE: the fbt-collect
script may extract new strings (that probably resemble strings from the 0.20.x
version of the extractor) that will need to be translated.
Please see this post for more information on how to upgrade.
[feat] Export non-native options that are specified through extraOptions
to the 'options' argument (3rd argument) in fbt._() calls
ValidFbtOptions
immutableLICENSE
file0.21.0-rc*-beta
for more release details.0.21.0-rc10-beta:
common
attribute without value0.21.0-rc9-beta:
) in <fbt>
callsites were being replaced by space characters.npmignore
config (avoid exporting some build, debug & test files)0.21.0-rc8-beta:
fbt.sameParam
from referring to a non-existent token name or a plural construct token0.21.0-rc1-beta - 0.21.0-rc7-beta:
fbjs
npm dependencydesc
from leaves and include tokenAliases
when calculating hash_key
in fbtJenkinsHash.js<12.16.x
0.21.0:
0.20.3: Accidental npm release. It's the same as babel-plugin-fbt@0.20.2.
0.20.2:
0.20.1:
0.20.0:
fbtBabelPluginPath
with actual referenct to fbtModule
in external transform0.19.2:
gulp-strip-docblock-pragmas
0.19.1:
0.19.0:
0.18.0:
FbtCollector
module for collection script0.17.2:
transform
option for collection scriptyargs
npm module0.17.1:
0.17.0:
collectFBT
renamed to collectFbt
(BREAKING CHANGE: updates paths to binary)src
folder and their ES5-transpiled versions
will be published inside the dist
folder. (BREAKING CHANGE: updates paths to source files)human
option of fbt:pronoun
was processed incorrectly. Before, human=true
used to behave as if human=false
, and vice versa.
Also, when fbt:pronoun
is used without an explicit human=false
option, we'll now generate the NOT_A_PERSON
gender-case.objMap()
in FbtUtil.js
0.16.0:
GenderConst
entries that had the same value to avoid confusion. MIXED_SINGULAR
and MIXED_PLURAL
will both be referred as MIXED_UNKNOWN
and it'll keep the same value (MIXED_UNKNOWN=5
).fbjs
and fbjs-scripts
modules. Update to jest-docblock@^26.0.0
.IntlVariations
gender and number constants are in sync with the client-side code equivalent0.15.1:
fbt:plural
branch pruning when value
option present. (Introduced in v0.13.0)0.15.0:
bin/manifest.js
0.14.2:
BOTH
packagers with --terse
0.14.1:
0.14.0:
nullthrows
npm package (only visible when using babel-plugin-fbt as a standalone module)0.13.0:
fbtFunctional-test.js
0.12.1:
0.12.0:
0.11.1:
node_modules/.bin
shortcut paths0.11.0:
node_modules/.bin
shortcuts for our scripts.
You can now execute them like this:yarn fbt-collect
yarn fbt-manifest
yarn fbt-translate
0.10.4:
0.10.3:
0.10.2:
.js
0.10.1:
0.10.0:
0.9.16:
output-dir
arg added to the translate script - output files split by locale.0.9.14:
1.0.0:
fbt._() 'options' argument rather than
overriding the 'options' argument. This exposes extra options, which are
dumped by
babel-plugin-fbt` to the 'options' argument, in fbt runtime
calls.0.10.0-rc1-beta - 0.10.0-rc5-beta:
.npmignore
config (avoid exporting some build, debug & test files)hash_key
in
fbtJenkinsHash.js was modifiedtext
key.invariant()
from the invariant
npm package instead of fbjs/lib/invariant
0.9.18:
0.9.17:
0.9.16:
0.9.15:
0.9.14:
0.9.13:
0.9.12:
0.9.11:
babel-plugin-fbt
and devDependency on fb-babel-plugin-utils
0.9.10:
babel-plugin-fbt
0.9.9:
0.9.8:
0.9.7:
0.9.6:
0.9.5:
0.9.4:
1.0.0:
.npmignore
config (avoid exporting some build, debug & test files)0.2.0-rc1-beta:
hashPhrases()
function by getFbtHash()
0.1.6:
0.1.5:
0.1.4:
0.1.3:
0.1.0:
1.0.0:
0.0.4-beta
for more info0.0.4-beta:
.npmignore
config (avoid exporting some build, debug & test files)babel-plugin-fbt@^0.21.x
0.0.3:
{enum: true}
to '@babel/plugin-syntax-flow'0.0.2:
0.0.1:
babel-plugin-fbt
.0.13.0:
.npmignore
config (avoid exporting some build, debug & test files)0.13.0-beta for
more info0.13.0-beta:
filter
status which decides whether a test will be runassertSourceAstEqual()
0.12.0:
0.11.1:
0.11.0:
json-diff
npm dependency0.10.1:
0.10.0:
generateFormattedCodeFromAST()
to convert a BabelNode
to a source code string0.9.1:
0.9.0:
0.0.10:
.npmignore
config (avoid exporting some build, debug & test files)0.0.9:
0.0.4:
.npmignore
config (avoid exporting some build, debug & test files)0.0.3:
- [chore] Improve `.npmignore` config (avoid exporting some build, debug & test files)
0.0.2:
0.0.1: