Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@starbeam/shared
Advanced tools
A package that facilitates having multiple copies of Starbeam in a single process that interoperate with each other
@starbeam/shared
Unless you are very interested in the stability strategy of Starbeam, you don't need to understand how this package works.
This package is designed to make it possible for multiple copies of Starbeam to interact with each other in a single process.
For example, this means that:
- if one copy of Starbeam creates a formula
- and the formula read the value of a cell from another copy of Starbeam
- then updating the cell will invalidate the formula
It accomplishes this by storing a handful of very stable Starbeam fundamentals
in a single global symbol (Symbol.for("starbeam.COORDINATION")
).
The first access to any of @starbeam/shared
's exports (from any copy of
Starbeam) instantiates the values in that symbol. Future accesses of the exports
use that already instantiated value.
This package uses
Symbol.for
to ensure that only a single copy of the fundamental symbols and constants exists in a single process. As a result, it is not necessary to install this package as a peer dependency.
now()
bump()
start()
consume(tag)
getId()
TAG
UNINITIALIZED
undefined
as an actual user value and an internal uninitialized state.The goal of this package is to provide a place for the most primitive representation of Starbeam fundamentals. It is designed to be as stable as possible, so that the implementations of tags and reactive values from multiple different major versions of Starbeam can interoperate.
We expect this package to remain at 1.x
for the foreseeable future.
If we need to make breaking changes to this package, that will also make
versions of Starbeam that depend on 1.x
incompatible with versions of Starbeam
that depend on 2.x
. As a result, we intend to try as hard as possible to avoid
strictly breaking changes.
One consequence of this design goal is that the functions in this package take
and return simple TypeScript types. For example, timestamps are represented as
numbers and cell tags are just unknown
.
In practice, interoperability between Starbeam versions will also require stability in the fundamental protocol of cell tags. This basically means that the fundamental interface for tags is:
interface CellTag {
readonly lastUpdated: number;
readonly dependencies: () => CellTag[];
}
interface FormulaTag {
readonly dependencies: undefined | (() => CellTag[]);
}
type Tag = CellTag | FormulaTag;
Because TypeScript frequently makes breaking changes, adding these fundamental types to this package as part of its API is still a work in progress.
However, the description of the fundamental tag types is intended to document
the intended stability of the Tag
types in Starbeam, which means that the
implementation of tags in other parts of Starbeam will only change if
@starbeam/shared
has a major version bump.
FAQs
A package that facilitates having multiple copies of Starbeam in a single process that interoperate with each other
The npm package @starbeam/shared receives a total of 3 weekly downloads. As such, @starbeam/shared popularity was classified as not popular.
We found that @starbeam/shared demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.