mirror of
https://github.com/layer-systems/website.git
synced 2026-09-14 07:02:09 +02:00
Rename package and establish version 1.0.0 (#71)
* Initial plan * Wire package metadata into About app Co-authored-by: mroxso <24775431+mroxso@users.noreply.github.com> * Complete About version test wiring Co-authored-by: mroxso <24775431+mroxso@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mroxso <24775431+mroxso@users.noreply.github.com>
This commit is contained in:
2
PLAN.md
2
PLAN.md
@@ -22,7 +22,7 @@ keine Emulator-Spielerei. Das OS ist eine Metapher für Multitasking, nicht Selb
|
||||
|
||||
## 2. Ausgangslage (Stand heute)
|
||||
|
||||
Das Repo ist der unveränderte mkstack-Startpunkt:
|
||||
Das Repo ist der Startpunkt für LAYER.systems:
|
||||
|
||||
- `src/AppRouter.tsx` — drei Routen: `/`, `/:nip19`, `*`
|
||||
- `src/pages/` — `Index.tsx` (Platzhalter), `NIP19Page.tsx`, `NotFound.tsx`
|
||||
|
||||
@@ -102,6 +102,7 @@ require changing the router. Read [the app guide](./docs/apps.md) before adding
|
||||
- [Nostr data access and safety](./docs/nostr.md)
|
||||
- [Style guide](./docs/styleguide.md)
|
||||
- [Project architecture and design decisions](./PLAN.md)
|
||||
- [Versioning and release workflow](./docs/versioning.md)
|
||||
|
||||
For protocol reference, see the [Nostr protocol documentation](https://nostr.com/).
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ decisions were taken; these documents describe how it actually works.
|
||||
| [`apps.md`](./apps.md) | The app registry, the contract every app implements, and how to add one |
|
||||
| [`nostr.md`](./nostr.md) | Data access, relay hints, and the rules for rendering untrusted content |
|
||||
| [`styleguide.md`](./styleguide.md) | Design tokens, materials, typography, motion, and the layout rules for app content |
|
||||
| [`versioning.md`](./versioning.md) | The package version source and release workflow |
|
||||
|
||||
## Layout of the custom code
|
||||
|
||||
|
||||
17
docs/versioning.md
Normal file
17
docs/versioning.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Versioning and releases
|
||||
|
||||
`package.json` is the authoritative source for the LAYER.systems package name and
|
||||
semantic version. The About app imports that metadata directly, so local and
|
||||
production builds display the same version.
|
||||
|
||||
## Preparing a release
|
||||
|
||||
1. Run `npm version patch`, `npm version minor`, or `npm version major` from the
|
||||
repository root. This updates `package.json` and `package-lock.json`, creates
|
||||
the matching git commit, and creates a version tag.
|
||||
2. Run `npm run test` and verify the version in the About app.
|
||||
3. Push the commit and tag to publish the release.
|
||||
|
||||
The first tracked release is `1.0.0`. Use semantic versioning for all subsequent
|
||||
releases: patch for backwards-compatible fixes, minor for backwards-compatible
|
||||
features, and major for breaking changes.
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mkstack",
|
||||
"version": "0.0.0",
|
||||
"name": "LAYER.systems",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mkstack",
|
||||
"version": "0.0.0",
|
||||
"name": "LAYER.systems",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@fontsource-variable/inter": "^5.3.0",
|
||||
"@nostrify/nostrify": "^0.55.1",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "mkstack",
|
||||
"name": "LAYER.systems",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "npm i --silent && vite",
|
||||
|
||||
22
src/apps/about/index.test.tsx
Normal file
22
src/apps/about/index.test.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { describe, expect, test, vi } from 'vitest';
|
||||
import AboutApp from './index';
|
||||
|
||||
vi.mock('@/os/useWindowManager', () => ({
|
||||
useWindowManager: () => ({ openApp: vi.fn() }),
|
||||
}));
|
||||
|
||||
describe('About app', () => {
|
||||
test('displays the package version', () => {
|
||||
render(
|
||||
<AboutApp
|
||||
windowId="about"
|
||||
params={{}}
|
||||
setTitle={vi.fn()}
|
||||
setParams={vi.fn()}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText('Version 1.0.0')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
@@ -5,6 +5,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { useWindowManager } from '@/os/useWindowManager';
|
||||
import { APPS } from '@/os/registry';
|
||||
import type { AppProps } from '@/os/types';
|
||||
import { APP_NAME, APP_VERSION } from '@/lib/appMetadata';
|
||||
|
||||
const SHORTCUTS: [keys: string, action: string][] = [
|
||||
['⌘K', 'Search apps and windows'],
|
||||
@@ -27,7 +28,8 @@ export default function AboutApp({ setTitle }: AppProps) {
|
||||
<span className="inline-flex size-11 items-center justify-center rounded-xl border border-border bg-background shadow-sm">
|
||||
<Zap className="size-5 text-primary" aria-hidden />
|
||||
</span>
|
||||
<h1 className="text-xl font-semibold tracking-tight">LAYER.systems</h1>
|
||||
<h1 className="text-xl font-semibold tracking-tight">{APP_NAME}</h1>
|
||||
<p className="text-xs text-muted-foreground">Version {APP_VERSION}</p>
|
||||
<p className="text-sm leading-relaxed text-muted-foreground">
|
||||
A Nostr client shaped like a desktop. Every part of it is an app in a window you
|
||||
can move, resize, stack and keep open side by side — reading a thread does not
|
||||
|
||||
12
src/lib/appMetadata.test.ts
Normal file
12
src/lib/appMetadata.test.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import packageJson from '../../package.json';
|
||||
import { describe, expect, test } from 'vitest';
|
||||
import { APP_NAME, APP_VERSION } from './appMetadata';
|
||||
|
||||
describe('app metadata', () => {
|
||||
test('uses package metadata as the authoritative source', () => {
|
||||
expect(APP_NAME).toBe(packageJson.name);
|
||||
expect(APP_VERSION).toBe(packageJson.version);
|
||||
expect(APP_NAME).toBe('LAYER.systems');
|
||||
expect(APP_VERSION).toBe('1.0.0');
|
||||
});
|
||||
});
|
||||
4
src/lib/appMetadata.ts
Normal file
4
src/lib/appMetadata.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import packageJson from '../../package.json';
|
||||
|
||||
export const APP_NAME = packageJson.name;
|
||||
export const APP_VERSION = packageJson.version;
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
|
||||
Reference in New Issue
Block a user