Skip to content

Latest commit

 

History

History

libs

Folders and files

README.md

github_banner

github_star

Libraries

Contains the source code for software development libraries which HASH has published for general use. Full write-ups of most can be found on the HASH website for developers, and a summary table is included below for convenience.

General Libraries

Directory Language(s) Publication URL Docs URL Description

| error-stack | Rust | Crates.io | Docs.rs | Context-aware error-handling library that supports arbitrary attached user data | | @hashintel/type-editor | TypeScript | npm | To be written | UI for editing entity types defined according to the Block Protocol's Type System | | @hashintel/query-editor | TypeScript | npm | To be written | UI for editing queries (a specific entity type used heavily inside of HASH) |

Internal Libraries

Although published to package managers, the following libraries were developed for internal use and may be subject to breaking changes. External consumers should be especially careful when using or upgrading these.

Directory Language(s) Publication URL Docs URL Description
@hashintel/design-system TypeScript npm To be written A collection of styleguide-aligned reusable UI primitives for HASH and our hash.ai website
@hashintel/block-design-system TypeScript npm To be written A relatively unopinionated set of reusable UI primitives for use in building Block Protocol blocks

Those packages inside of @local are libraries used inside this repository which are not published to package managers. All of these libraries may be subject to breaking changes. External consumers should be especially careful when using or upgrading these.

The following list is a non-exhaustive list of packages in @local:

Package Language(s) Docs URL Description
hash-codec Rust Not hosted Implementation of different serde or byte codes used in HASH
hash-graph-authorization Rust Not hosted Provides the authorization interface and logic used in the Graph
@local/hash-graph-client TypeScript To be written A generator to create a TypeScript/JavaScript client for the Graph API
hash-graph-types Rust Not hosted Types used inside of the Graph API
hash-temporal-client Rust Not hosted Client implementation to connect to our Temporal.io service
hash-graph-temporal-versioning Rust Not hosted Implementation of temporal versioning

Contributing

See CONTRIBUTING.md.

Publishing

Rust

Publishable Rust crates are automatically published on merge to main if their version has been modified.

A crate can be marked as publishable by adding it to the list of PUBLISH_PATTERNS in .github/scripts/rust/setup.py

The publishing process is tested automatically, and therefore can be verified through, a dry-run within CI on pull requests.

TypeScript

Publishing of TypeScript libraries is handled via Changesets. The Changesets configuration, including the packages it ignores, is in .changeset/config.json.

A PR that changes an npm-publishable package adds a changeset file under .changeset/. To record a change for publication:

  1. From the root of the repository, run yarn changeset
  2. Select the package(s) affected by this change (space to select, enter to move to the next step)
  • Do not worry about selecting packages which depend on changed packages – Changesets will handle bumping them
  1. Select the semver increment
  2. Describe the change
  3. Commit the created changeset file

The changeset text becomes the package's published changelog entry, so write it for the package's consumers:

  • Describe the change as a consumer of the package experiences it: behaviour changes, bug fixes, and interface changes. Leave out implementation details that do not affect consumers, and do not mention this repository or its internal systems.
  • Every sentence must apply to each package the changeset lists. When a PR changes several packages in different ways, write a separate changeset for each package.
  • Use at most one paragraph per changeset.

When a PR with a changeset file is merged, the change is added to a PR entitled 'Version Packages', which has a diff showing the version increments which will be applied to affected packages, including dependents.

Once the 'Version Packages' PR is merged, the changes are published to npm.