@sprig-and-prose/sprig 0.3.4 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,8 +5,8 @@ Sprig is a calm way to explore and navigate **prose-defined universes**.
5
5
  It has no execution semantics, no runtime behavior, and no required framework.
6
6
  Sprig exists to help humans understand complex systems by naming and relating ideas.
7
7
 
8
- This repository contains the **Sprig command-line interface**, which renders and
9
- navigates Sprig & Prose universes in the browser.
8
+ This repository contains the **sprig command-line interface**, which renders and
9
+ navigates sprig & prose universes in the browser.
10
10
 
11
11
  ---
12
12
 
@@ -52,25 +52,7 @@ Start here if you want to learn:
52
52
  * what a universe is
53
53
  * how prose is structured
54
54
  * how concepts, relationships, and references work
55
- * why Sprig deliberately avoids execution semantics
56
-
57
- ---
58
-
59
- ## Development
60
-
61
- When developing locally, you can switch between using local packages and published packages:
62
-
63
- **Use local packages (for development/testing):**
64
- ```bash
65
- npm run deps:local
66
- ```
67
-
68
- **Switch back to published packages (for deployment):**
69
- ```bash
70
- npm run deps:published
71
- ```
72
-
73
- This automatically updates `package.json` and runs `npm install` to link/unlink the local packages.
55
+ * why sprig deliberately avoids execution semantics
74
56
 
75
57
  ---
76
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprig-and-prose/sprig",
3
- "version": "0.3.4",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "Sprig CLI tool for compiling and serving universes",
6
6
  "main": "dist/cli.js",
@@ -21,8 +21,8 @@
21
21
  "author": "",
22
22
  "license": "ISC",
23
23
  "dependencies": {
24
- "@sprig-and-prose/sprig-universe": "^0.3.3",
25
- "@sprig-and-prose/sprig-ui-csr": "^0.2.4",
24
+ "@sprig-and-prose/sprig-universe": "^0.4.0",
25
+ "@sprig-and-prose/sprig-ui-csr": "^0.3.0",
26
26
  "chokidar": "^3.6.0",
27
27
  "fast-glob": "^3.3.2"
28
28
  },
@@ -3,6 +3,7 @@
3
3
  import { readFileSync, writeFileSync } from 'fs';
4
4
  import { fileURLToPath } from 'url';
5
5
  import { dirname, join } from 'path';
6
+ import { execSync } from 'child_process';
6
7
 
7
8
  const __filename = fileURLToPath(import.meta.url);
8
9
  const __dirname = dirname(__filename);
@@ -23,10 +24,19 @@ if (mode === 'local') {
23
24
  packageJson.dependencies['@sprig-and-prose/sprig-ui-csr'] = 'file:../sprig-ui-csr';
24
25
  console.log('✓ Switched to local dependencies');
25
26
  } else {
26
- // Switch to published versions
27
- packageJson.dependencies['@sprig-and-prose/sprig-universe'] = '^0.3.2';
28
- packageJson.dependencies['@sprig-and-prose/sprig-ui-csr'] = '^0.2.3';
29
- console.log(' Switched to published dependencies');
27
+ // Fetch latest published versions from npm
28
+ console.log('Fetching latest published versions...');
29
+ try {
30
+ const universeVersion = execSync('npm view @sprig-and-prose/sprig-universe version', { encoding: 'utf-8' }).trim();
31
+ const uiVersion = execSync('npm view @sprig-and-prose/sprig-ui-csr version', { encoding: 'utf-8' }).trim();
32
+
33
+ packageJson.dependencies['@sprig-and-prose/sprig-universe'] = `^${universeVersion}`;
34
+ packageJson.dependencies['@sprig-and-prose/sprig-ui-csr'] = `^${uiVersion}`;
35
+ console.log(`✓ Switched to published dependencies (universe: ^${universeVersion}, ui-csr: ^${uiVersion})`);
36
+ } catch (error) {
37
+ console.error('Error fetching latest versions from npm:', error.message);
38
+ process.exit(1);
39
+ }
30
40
  }
31
41
 
32
42
  writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');