Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@teambit/flows
Advanced tools
teambit.bit/flows
Run tasks on components and their dependents.
bit run
command to execute tasks on components in worksapce.compile
, test
and watch
.Inside a Bit project all components are linked to each other in a network according to their dependency graph. When you make a change, you can see the downstream effets when running component tasks. This means that all tasks run in the right order and if several components don't directly depend on each other, Flows parallelizes their tasks (and shows live console output in a readable order).
bit run <flow-name> [components...] [-v | --verbose] [--concurrency]
# runs 'build' flow on all components that have 'build' task defined.
bit run build
# runs 'build' flow for a specific component.
bit run build logo
# same as before with verbose output
bit run build logo --verbose
# setting concurrency
bit run build logo --concurrency 4 --verbose
Use bit.jsonc
configuration docs to understand how to configure bit.
// workspace configuration with default values for 'concurrency' and 'verbose'
{
"teambit.bit/flows": {
"concurrency": 4,
"verbose": false,
"tasks": {
// the structure of a module task id: = `\`#${PackageName}:${PathToModule}\``
"build": ["@bit/bit.evangalist.extensions.react-ts:transpile"],
}
}
}
You may also use the variants
configuring option to override tasks
of a specific component(s).
The structure allows only for the task entry in that use case.
{
"variants": {
"ui/*":{
"teambit.bit/flows": {
"tasks": {
"build": ["some_build_task"]
}
}
}
}
}
Consult with the docs to learn more about variants.
Flows API is document in flows.ts
module. Here are two examples:
import {Flows, flattenReplaySubject} from 'teambit.bit/flows'
const flows = new Flows(workspace)
const execution = flows.run(seeders)
// rxjs example
flattenReplaySubject(execution)
.subscribe((result) => console.log('result is:', result))
// promise example
const result = await flows.runToPromise(seeders)
console.log('result is', result)
Flows
Flows prefers convention over configuration for managing team's workflow to scale their development. It's philosophy is that when teams agree on the kind of actions they support it's easier to onboard developers to various projects in the organization. This is mainly becasue it helps developers avoid the details of each component build and treat it as the "same" action.
For example:
build
- run all compilation/testing/lintci
- flow to run bit CI systemdev
- compiling with source map and what not.personal
- personal workflow team doesn't know of, to test things.A task
is a module which exports a default function (or module.exports
) with the following signature:
export type Task = () => any | () => Promise<any>
devDependencies
for components consuming them.stdout
, stderr
is reported.The Flows API solves the problem of reporting the execution of dynamic activities across a graph of isolated components. The problem becomes complex in use cases like TypeScript API where dependent/dependency components build order needs to be respected.
Flows solves this problem by providing:
For each main term there is a module in the flows implementation.
~/Library/Caches/Bit/capsules
bit deps unset
, bit deps reset
, bit deps eject
, bit deps blame
(#7043 #6898 #6884 #6945)bit scope rename-owner
(#7023)bit fork ... --rename
(#6955)bit envs update
to update environment versions (#6909 #6862)workspace.jsonc
(#6976).cjs
, .mjs
, .mts
, .cts
extensions (#7009 #7038)@bit-ignore
comment (#6855 #6980)file-log
to see file changes per snap (#6888)--editor
flag for bit snap
(#6956)--no-optional
for bit install
(#7030)-x
to --skip-dependency-installation
flag (#7091)node_modules
upon bit rename
(#7059).bitmap
edge cases (#6944 #7080 #6866)bit env set
(#7052)bit update
(#6948 #6983)snap
, tag
and merge components from remote scopes (#7084 #7053 #7051 #7031 #6952 #6836 #7049 #6850 #6886 #7036)rootComponents:true
(#6642)bit envs get <component>
(#6939)bit config
- cloud_domain
and symphony_url
(#6930)addPostCssPlugins
method to webpack config mutator (#6972)pino-pretty
(#6789 #6870)packageImportMethod
for Yarn (#6860 #6871)index.json
if need (#6838)--skip-config
to help in cases aspects fail to load during bit fork
(#6910)--one-line
for bit log
(#6885 #7012)bit tag
is successful (#6852)FAQs
Unknown package
The npm package @teambit/flows receives a total of 0 weekly downloads. As such, @teambit/flows popularity was classified as not popular.
We found that @teambit/flows demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 17 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.