
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@tumaet/prompt-shared-state
Advanced tools
A shared library for the AET Prompt2 system that provides common interfaces and state management (via Zustand) across multiple microfrontends.
The prompt-shared-state package is designed to help multiple microfrontends share:
By using this library, you ensure that all microfrontends reference the same store instance and interfaces, avoiding inconsistencies and duplication.
Install the package with your preferred package manager:
# Using Yarn
yarn add @tumaet/prompt-shared-state
# Or using npm
npm install @tumaet/prompt-shared-state
All TypeScript interfaces needed by multiple microfrontends reside here. For example:
import { SomeSharedInterface } from '@tumaet/prompt-shared-state';
// Use this interface in your code const data: SomeSharedInterface = { // ... };
Note: If an interface is only relevant to one microfrontend, keep it local to that microfrontend rather than placing it here.
The package provides a shared Zustand store that can be imported and used by any microfrontend. For example:
import { useSharedStore } from '@tumaet/prompt-shared-state';
function MyComponent() {
const [sharedValue, setSharedValue] = useSharedStore((state) => [
state.sharedValue, state.setSharedValue,
]);
return (
<div>
<p>Shared Value: {sharedValue}</p>
<button onClick={() => setSharedValue('New Value')}>
Update Shared Value
</button>
</div>
);
}
Any changes to the store will be reflected across all microfrontends using this library.
For the state to be truly shared among all microfrontends, configure Module Federation to treat @tumaet/prompt-shared-state
as a singleton:
new ModuleFederationPlugin({
name: 'your-module',
shared: {
'@tumaet/prompt-shared-state': {
singleton: true,
requiredVersion: deps['@tumaet/prompt-shared-state'],
},
// ...other shared dependencies
},
});
This ensures there is only one instance of the shared state library at runtime.
As a member of the AET team, please contribute your changes by creating a pull request.
Once your changes are reviewed and merged into the main
branch, a GitHub workflow will automatically:
Include one of the following keywords in your commit message to indicate how the version should be bumped:
1.2.3
→ 2.0.0
).1.2.3
→ 1.3.0
).1.2.3
→ 1.2.4
).If you do not include major
or minor
in your commit message, the workflow will assume a patch update.
When the publishing worked, then a PR with a new version number has been opened. This shall be merged immediately.
FAQs
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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.