@shop-on/create-theme 0.14.0-next.1 → 0.14.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/dist/cli.mjs CHANGED
@@ -34,6 +34,6 @@ Theme scaffolded in ${theme.dir}
34
34
  Next:
35
35
  ${steps.map((step, i) => ` ${i + 1}. ${step}`).join("\n")}
36
36
 
37
- Once the Shop-On CLI is published, \`shop-on theme init\` does all this and fills in .env for you.
37
+ To start another, \`npx @shop-on/theme-cli theme init <dir>\` does all this and fills in .env for you.
38
38
  `);
39
39
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shop-on/create-theme",
3
- "version": "0.14.0-next.1",
3
+ "version": "0.14.0",
4
4
  "description": "Scaffolds a Shop-On storefront theme: `npm create @shop-on/theme <dir>`.",
5
5
  "license": "SEE LICENSE IN dist/LICENSE.md",
6
6
  "bin": {
@@ -262,7 +262,7 @@ If you added a section/block, it's available in the editor immediately after a h
262
262
 
263
263
  ## Bundle hygiene — the server artifact is downloaded per cold start
264
264
 
265
- `pnpm build` emits a Nitro `cloudflare-module` artifact. Every file under `.output/server/` is packed into the module map a storefront Worker loads on a cold start, whether or not a request ever imports it — so a leaked module costs every shop on every cold start. A full-featured theme sits around ~2.3.5 MB (minified, names kept); a jump on a small change is a leak. Postbuild fails the build past 3.5 MB, or when `.output/server` holds a `*.test*` file.
265
+ `pnpm build` emits a Nitro `cloudflare-module` artifact. Every file under `.output/server/` is packed into the module map a storefront Worker loads on a cold start, whether or not a request ever imports it — so a leaked module costs every shop on every cold start. A full-featured theme sits around ~2.6 MB (minified, names kept); a jump on a small change is a leak. Postbuild fails the build past 3.5 MB, or when `.output/server` holds a `*.test*` file.
266
266
 
267
267
  - **Tests may sit beside the component they cover.** The registries in `src/components/template-renderer.tsx` glob `*.tsx` with `!*.test.tsx` excluded; a `.test.tsx` that slipped in would register as a phantom type and pull the vitest runtime (~800 KB) into the artifact. Don't widen those globs. `src/components/template-renderer.test.ts` guards this.
268
268
  - **Browser-only libraries: dynamic `import()` in an effect or handler, AND an entry in `BROWSER_ONLY_IMPORTS`.** A static import puts the library in the server graph; a dynamic one alone still gets inlined, because Nitro's cloudflare preset has no externals. The list makes Nitro leave `import("hls.js/light")` as a bare specifier the server never executes. It lives inside the published `@shop-on/theme-config` (`createThemeViteConfig` takes only `port`), so a theme can't extend it from `vite.config.ts`; it covers `hls.js/light`, `photoswipe`, `photoswipe/lightbox` and `simple-parallax-js/vanilla`. Any other client-only dependency (player, lightbox, parallax, chart) lands in the server artifact — check `_libs/` after adding one.
@@ -282,7 +282,8 @@ A theme change is not finished when it type-checks — the artifact carries a ve
282
282
  1. Bump `package.json#version` (semver). Fix → patch; new section, block or setting → minor.
283
283
  2. Prepend a `## X.Y.Z` section to `release-notes.md`. The platform stores only the section matching the uploaded version, so each one carries its own notes.
284
284
  3. `pnpm build` — postbuild emits `.output/theme.json` at the new version, and fails fast if `theme.config.json#locales` omits `"en"`. Check `theme.config.json#locales` matches the catalogs you ship first: a declared locale with no catalog renders default-language copy.
285
- 4. Package. **Don't hand-roll the tarball**: `npx @shop-on/theme-cli theme pack` writes `<name>-X.Y.Z.tar.gz` in the theme directory (`--out <path>` to put it elsewhere, `--build` to build first). Entries sit flat at the root with no macOS metadata, the same on every OS, and it refuses a build missing a file the theme store requires or older than `package.json`. Uploading a version to the theme store isn't open to third-party developers yet; the tarball is as far as this goes for now.
285
+ 4. `pnpm theme:check --release`, and `npx @shop-on/theme-cli theme audit` against your store.
286
+ 5. Submit the source. **Don't hand-roll the tarball**: `npx @shop-on/theme-cli theme source` writes `<name>-X.Y.Z-source.tar.gz`, which you upload on your theme's page in the developer portal. Shopon builds it and reviews the result. It needs `pnpm-lock.yaml` (run `pnpm install`). It never packs installs, build output, `.git`, `.claude/` or credentials; list anything else to keep out in `.themeignore`, in gitignore syntax. Keep what the build needs, and don't rely on a class name that only a left-out file mentions: Tailwind scans the whole project, and Shopon builds without that file. Read the file counts it prints before uploading.
286
287
 
287
288
  Write the notes **for the merchant, not the diff**: what changes in their store, in their words. Match the file — plain bullets under the heading, no `### Fixed` subsections, no file names, no component names. "Prices now say when tax is included", not "added `taxIncludedCaption` to the price block".
288
289
 
@@ -27,7 +27,7 @@ recipe for each rule that fired. A `(warning)` after the rule id prints but
27
27
  doesn't fail the run.
28
28
 
29
29
  The **audit** lines come from `shop-on theme audit`, in the `@shop-on/theme-cli`
30
- package:
30
+ package (`npx @shop-on/theme-cli theme audit`, without installing it):
31
31
 
32
32
  ```bash
33
33
  shop-on theme audit # build, serve the build, check routes, run Lighthouse; exit 1 below the bar
@@ -42,9 +42,6 @@ missing instead of measuring an empty page. The password template is left
42
42
  out, since it only renders while protection is on, and the audit refuses a
43
43
  protected store.
44
44
 
45
- `@shop-on/theme-cli` isn't published yet. Until it is, measure the **audit** lines
46
- by hand, as each one says.
47
-
48
45
  ## Performance
49
46
 
50
47
  | Line | How | Learn it in |
@@ -51,7 +51,8 @@ with a "missing" message naming the variable.
51
51
 
52
52
  To sell the theme on the Shopon theme store, register at the developer portal
53
53
  and submit its source: `npx @shop-on/theme-cli theme source` writes the
54
- tarball to upload. Shopon builds it and reviews the result; see the developer
54
+ tarball to upload, leaving out what `.themeignore` names. It needs
55
+ `pnpm-lock.yaml`. Shopon builds it and reviews the result; see the developer
55
56
  portal guide.
56
57
 
57
58
  `npx @shop-on/theme-cli theme dev` runs the theme behind the gateway and a
@@ -12,19 +12,19 @@
12
12
  "build": "NITRO_PRESET=cloudflare_module vite build",
13
13
  "postbuild": "node --import tsx scripts/postbuild.mjs",
14
14
  "test": "vitest run --passWithNoTests",
15
- "theme:check": "node scripts/theme-check.mjs",
15
+ "theme:check": "node --import tsx scripts/theme-check.mjs",
16
16
  "theme:editor": "theme-dev-host"
17
17
  },
18
18
  "dependencies": {
19
19
  "@bprogress/core": "1.3.4",
20
- "@shop-on/i18n": "^0.14.0-next.1",
21
- "@shop-on/theme-contract": "^0.14.0-next.1",
22
- "@shop-on/theme-loader": "^0.14.0-next.1",
23
- "@shop-on/theme-react": "^0.14.0-next.1",
24
- "@shop-on/theme-routes": "^0.14.0-next.1",
25
- "@shop-on/theme-runtime": "^0.14.0-next.1",
26
- "@shop-on/theme-server": "^0.14.0-next.1",
27
- "@shop-on/theme-system": "^0.14.0-next.1",
20
+ "@shop-on/i18n": "^0.14.0",
21
+ "@shop-on/theme-contract": "^0.14.0",
22
+ "@shop-on/theme-loader": "^0.14.0",
23
+ "@shop-on/theme-react": "^0.14.0",
24
+ "@shop-on/theme-routes": "^0.14.0",
25
+ "@shop-on/theme-runtime": "^0.14.0",
26
+ "@shop-on/theme-server": "^0.14.0",
27
+ "@shop-on/theme-system": "^0.14.0",
28
28
  "@tailwindcss/vite": "4.3.5",
29
29
  "@tanstack/react-router": "1.170.46",
30
30
  "@tanstack/react-start": "1.169.5",
@@ -35,8 +35,8 @@
35
35
  "tailwindcss": "4.3.5"
36
36
  },
37
37
  "devDependencies": {
38
- "@shop-on/theme-config": "^0.14.0-next.1",
39
- "@shop-on/theme-dev-host": "^0.14.0-next.1",
38
+ "@shop-on/theme-config": "^0.14.0",
39
+ "@shop-on/theme-dev-host": "^0.14.0",
40
40
  "@spiriit/vite-plugin-svg-spritemap": "7.2.0",
41
41
  "@types/node": "26.6.6",
42
42
  "@types/react": "19.3.0",
@@ -0,0 +1,4 @@
1
+ # pnpm waits a day before it installs a new version of a package. Shopon's own
2
+ # packages skip it, here and when Shopon builds your theme.
3
+ minimumReleaseAgeExclude:
4
+ - "@shop-on/*"