@fusion.dev/helix-templates 0.25.1 → 0.26.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
@@ -28,12 +28,14 @@ the graph, which wants the packages public first.
28
28
  ## Reading it yourself
29
29
 
30
30
  ```js
31
- import { findTemplate, PROJECT_NAME, templates } from '@fusion.dev/helix-templates'
31
+ import { findTemplate, HELIX_VERSION, PROJECT_NAME, templates } from '@fusion.dev/helix-templates'
32
32
  ```
33
33
 
34
34
  `templates` is the register, in the order a chooser should offer them. Each entry
35
- names the files whose contents carry `PROJECT_NAME`, which a scaffolder replaces
36
- with the project's own. The payloads sit under `templates/<id>/` in this package.
35
+ names the files a scaffolder substitutes in: `PROJECT_NAME` becomes the project's
36
+ own name, and `HELIX_VERSION` becomes this package's version, which is the Helix
37
+ the templates were published with. The payloads sit under `templates/<id>/` in
38
+ this package.
37
39
 
38
40
  **The named files are named rather than discovered.** Scanning every file for the
39
41
  placeholder would rewrite a template that merely mentions it in prose, and a
package/dist/index.d.ts CHANGED
@@ -50,5 +50,15 @@ export interface Template {
50
50
  export declare const templates: readonly Template[];
51
51
  /** The placeholder a scaffolder replaces with the project's name. */
52
52
  export declare const PROJECT_NAME = "__PROJECT_NAME__";
53
+ /**
54
+ * The placeholder a scaffolder replaces with this package's own version.
55
+ *
56
+ * **Which is the Helix a template was published with**, every Helix package
57
+ * sharing one version, so a template asks for the components it shipped beside
58
+ * and no release has to remember to update it. Written by hand, both templates
59
+ * asked for `^0.0.9`, which under a zero major admits `0.0.9` alone, and a new
60
+ * project installed that release while 0.25.0 was current.
61
+ */
62
+ export declare const HELIX_VERSION = "__HELIX_VERSION__";
53
63
  /** The one template with this id, or `undefined` where there is none. */
54
64
  export declare const findTemplate: (id: string) => Template | undefined;
package/dist/index.js CHANGED
@@ -13,4 +13,5 @@ export const templates = [
13
13
  },
14
14
  ];
15
15
  export const PROJECT_NAME = '__PROJECT_NAME__';
16
+ export const HELIX_VERSION = '__HELIX_VERSION__';
16
17
  export const findTemplate = (id) => templates.find((one) => one.id === id);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-templates",
3
3
  "description": "Starter templates for Helix, as data. Read by `helix new` and by `npm create @fusion.dev/helix-app`.",
4
- "version": "0.25.1",
4
+ "version": "0.26.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -28,6 +28,8 @@
28
28
  "scripts": {
29
29
  "build": "bun run register && tsc -p tsconfig.build.json && tsc -p tsconfig.types.json",
30
30
  "register": "bun scripts/build-register.mjs",
31
+ "test": "bun run test:pure",
32
+ "test:pure": "bun test pure.spec",
31
33
  "typecheck": "bun run register && tsc -p tsconfig.json --noEmit"
32
34
  },
33
35
  "bugs": "https://github.com/project-fusion/fusion/issues",
@@ -9,8 +9,8 @@
9
9
  "start": "next start"
10
10
  },
11
11
  "dependencies": {
12
- "@fusion.dev/helix": "^0.0.9",
13
- "@fusion.dev/helix-styles": "^0.4.1",
12
+ "@fusion.dev/helix": "^__HELIX_VERSION__",
13
+ "@fusion.dev/helix-styles": "^__HELIX_VERSION__",
14
14
  "next": "^16.0.0",
15
15
  "react": "^19.2.0",
16
16
  "react-dom": "^19.2.0"
@@ -9,8 +9,8 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@fusion.dev/helix": "^0.0.9",
13
- "@fusion.dev/helix-styles": "^0.4.1",
12
+ "@fusion.dev/helix": "^__HELIX_VERSION__",
13
+ "@fusion.dev/helix-styles": "^__HELIX_VERSION__",
14
14
  "react": "^19.2.0",
15
15
  "react-dom": "^19.2.0"
16
16
  },
package/templates.json CHANGED
@@ -21,5 +21,6 @@
21
21
  ],
22
22
  "title": "React (Next.js)"
23
23
  }
24
- ]
24
+ ],
25
+ "version": "__HELIX_VERSION__"
25
26
  }