4 Commits

Author SHA1 Message Date
b3fd092acf Set up CI
All checks were successful
Test / test (push) Successful in 1m42s
Test / test (pull_request) Successful in 32s
2026-03-14 14:12:52 +04:00
cd349944cf Update AGENTS.md with testing details 2026-03-14 14:04:23 +04:00
6b434adde4 1.2.1 2026-03-13 16:59:06 +04:00
a966df95f0 Add doc for List type definition 2026-03-13 16:58:36 +04:00
7 changed files with 62 additions and 5 deletions

View File

@@ -0,0 +1,17 @@
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install
- run: pnpm test

View File

@@ -26,8 +26,10 @@ It is written in TypeScript and compiled to a JavaScript module suitable for use
- `dist/`: specific build artifacts. Do not edit files here directly.
## Testing
- Currently, no automated test suite is configured.
- `pnpm test` will exit with an error.
- **Framework:** `vitest`
- **Run tests:** `pnpm test`
- **Watch mode:** `pnpm run test:watch`
- **Location:** Tests are located in the `test/` directory.
## Contribution Guidelines
- When adding new functionality, ensure proper types are exported in `src/types.d.ts` or within the module files.

13
dist/places.d.ts vendored
View File

@@ -96,6 +96,19 @@ declare const listSchema: {
};
readonly required: readonly ["id", "title", "placeRefs", "createdAt"];
};
/**
* Represents a List object.
*
* Core properties enforced by schema:
* - `id`: Unique identifier (slug)
* - `title`: Human readable title
* - `placeRefs`: Array of place references containing `id` and `geohash`
* - `createdAt`: ISO date string
*
* Optional properties:
* - `color`: Hex color code
* - `updatedAt`: ISO date string
*/
export type List = FromSchema<typeof listSchema> & {
[key: string]: any;
};

View File

@@ -7,3 +7,15 @@
# Type Alias: List
> **List** = `FromSchema`\<*typeof* `listSchema`\> & `object`
Represents a List object.
Core properties enforced by schema:
- `id`: Unique identifier (slug)
- `title`: Human readable title
- `placeRefs`: Array of place references containing `id` and `geohash`
- `createdAt`: ISO date string
Optional properties:
- `color`: Hex color code
- `updatedAt`: ISO date string

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@remotestorage/module-places",
"version": "1.2.0",
"version": "1.2.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@remotestorage/module-places",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",
"dependencies": {
"latlon-geohash": "^2.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@remotestorage/module-places",
"version": "1.2.0",
"version": "1.2.1",
"description": "Manage favorite/saved places",
"homepage": "https://gitea.kosmos.org/raucao/remotestorage-module-places#remotestoragemodule-places",
"repository": {

View File

@@ -55,6 +55,19 @@ const listSchema = {
required: ['id', 'title', 'placeRefs', 'createdAt'],
} as const;
/**
* Represents a List object.
*
* Core properties enforced by schema:
* - `id`: Unique identifier (slug)
* - `title`: Human readable title
* - `placeRefs`: Array of place references containing `id` and `geohash`
* - `createdAt`: ISO date string
*
* Optional properties:
* - `color`: Hex color code
* - `updatedAt`: ISO date string
*/
export type List = FromSchema<typeof listSchema> & { [key: string]: any };
/**