Socket
Socket
Sign inDemoInstall

@teambit/lanes.hooks.use-lane-readme

Package Overview
Dependencies
2
Maintainers
16
Versions
238
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @teambit/lanes.hooks.use-lane-readme


Version published
Maintainers
16
Created

Changelog

Source

[0.0.888] - 2022-10-27

New Features

  • Show generated artifacts of a build in code tab (#6550)
  • Introduce a new command bit write-tsconfig to write tsconfig files in the components directories (#6506 #6531)
  • Compile custom envs during installation (#6480)
  • Ability to expand/Collapse nested objects and Copy JSON and component configuration tab (#6563)
  • bit scope-rename - --refactor flag now rename aspect-ids in workspace.jsonc (#6564)
  • bit status identify duplicate component and package (#6546)
  • Show component-issue during status and tag when tracked component exists as a package in workspace.jsonc. (#6546)
  • Slot for aspects to register component-issues in status. (#6546)
  • bit import --dependents - builds a graph of all components in the workspace, searches for all paths from them to the target component-id(s) given in the command and imports them.(#6552)
  • status always show the full-id (#6201)
  • bit graph supports JSON output with --json (#6497)
  • Lanes: Lane Switcher: Switch between all available lanes in Workspace and Scope (#6330)
  • bit status supports showing updates from forked lanes (#6575)
  • bit lane show the full lane-id (#6561)
  • bit lane merge shows a summary report of component state (merged/unchanged/failed/snapped) (#6500)
  • feat: add a new "FetchMissingHistory" action (#6595)
  • add parents to graphql component log (#6585)

Changes

  • breaking: change modifiedComponent to modifiedComponents in the status json output. (#6201)
  • bit build - replace --all flag with --unmodified (#6553)
  • Improve status API to return ComponentIDs and not legacy IDs. (#6201)
  • bit status --json returns component-ids, not the whole component objects. (#6201)
  • Switch command alias with command name. (#6508)
  • Do not store env version in the envs data in model (#6511)

Bug Fixes

  • Dependency drawer scrollable (#6550)
  • bit remove - fix "Maximum call stack size exceeded" error when the graph deps is huge (#6565)
  • Allow recovering when objects are corrupted (#6559)
  • Avoid clearing the screen during bit-watch (#6503)
  • Add missing packages if specify by end and install shared peers in root if has supported range (#6512)
  • Fix scope ui drawer (#6574)
  • Avoid saving duplicate aspects to the model or tag or snap (#6567)
  • bit aspect update - indicate in the output when components are up to date (#6566)
  • Validate env policy configs before proceeding with installation (#6525)
  • Fix missing head history when on a lane (#6549)
  • bit show - avoid throwing EnvNotFound when running on a remote component (#6556)
  • Fix node env template (#6555)
  • Fix react env minor (#6526)
  • Fix createEsmCompilerTask signature
  • Finding local-tags more consistent by always checking diverge-data (#6517)
  • Avoid throwing from remotes when fetch-object fails (#6539)
  • Fix scope pane layout (#6540)
  • Download artifacts from unmerged-lane-id when applicable (#6537)
  • Fix snap order + lane component - useComponentFilters (#6527)
  • Fix export on lane when a non-lane-scope has some history on the main-ref (#6530)
  • bit export - fix parent-not-found error when sending multiple snaps to a remote (#6528)
  • bit lane merge merge components that exist on a local-lane and in .bitmap with isAvailableOnCurrentLane=false (#6521)
  • Avoid throwing ComponentNotFound when .bitmap has a non-exist version on the scope (#6496)
  • bit install show a clear error when running outside a workspace (#6522)
  • Fix finding local-versions when on a lane (#6519)
  • Don't fail when error from pnpm doesn't have an error code (#6520)
  • bit reset - make local-versions on lane be aware of main to not reset it (#6516)
  • bit export - send only objects needed when exporting on lane and do not rely on the cache (#6504)
  • bit import - exclude lane-only components when importing entire scope (#6499)
  • change config overflow-x to auto from scroll (#6591)
  • refresh envs filter between lanes (#6590)
  • fix: retry to delete pending-objects dir in case of ENOTEMPTY error (#6588)
  • fix ParentNotFound error to be shown when is coming from the remote (#6586)
  • load dependencies from unmerged head of components (#6584)
  • fix: peer dependencies should be hoisted when root components are used (#6562)

Performance

  • Avoid refetching unbuilt versions when building a graph (#6579)
  • Improve loading performance when some dependencies in the graph are build pending (#6568)
  • Fetch unbuilt version objects only during bit import (#6572)
  • Keep memory consumption sane when traversing history during fetch (#6541)
  • Fix high memory consumption of fetchWithDeps (#6534)
  • bit export - improve lane export performance (#6507)
  • perf: avoid loading aspects that are not declared as dependencies in the manifests (#6587)

Internal

  • Update pnpm dependencies (#6547)
  • Avoid building the graphs for multiple envs in parallel (#6577)
  • Remove importManyWithAllVersions, refactor some import methods (#6542)
  • Move some import methods from legacy to Importer aspect. (#6542)
  • Change applyVersion of the merge command to not run in parallel, so then it won't run importMany in parallel. (#6542)
  • Avoid reading the same files from the filesystem if they already sent to the client in the previous versions (#6542)
  • Move some functions from sources to Snapping aspect (#6523)
  • Logging network configuration settings (#6513)
  • Avoid caching the component-graph (#6501)
  • upgrade post css modules (#6598)
  • chore: update minimatch to 3.0.5 (#6596)
  • recursively parse export specifiers (#6594)
  • eject design pill label component (#6589)
  • extract compositions-overview ui into a dedicated component (#6583)

Readme

Source

import { useDataQuery } from '@teambit/ui-foundation.ui.hooks.use-data-query'; import { gql, QueryResult } from '@apollo/client'; import { LaneModel, LanesQuery } from '@teambit/lanes.ui.models'; import { componentFields, ComponentModel } from '@teambit/component';

const GET_LANE_README_COMPONENT = gql query LaneReadmeComponent( $ids: [String!] $extensionId: String $logType: String $logOffset: Int $logLimit: Int $logHead: String $logSort: String ) { lanes { id list(ids: $ids) { id remote isMerged readmeComponent { ...componentFields } } } getHost(id: $extensionId) { id } } ${componentFields};

export function useLaneReadme(lane: LaneModel): { component: ComponentModel; } & Omit<QueryResult, 'data'> { const { data, ...rest } = useDataQuery(GET_LANE_README_COMPONENT, { variables: { ids: [lane.name] }, skip: !lane.readmeComponent, });

const readmeComponentFromQuery = data?.lanes.list[0]?.readmeComponent;

const component = readmeComponentFromQuery && ComponentModel.from({ ...readmeComponentFromQuery, host: data.getHost.id });

return { ...rest, component, }; }

Keywords

FAQs

Last updated on 26 Aug 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc