@jxsuite/compiler 5.1.0 → 5.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/compiler",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "description": "Jx static HTML compiler, island detector, and site builder",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -46,19 +46,19 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@apidevtools/json-schema-ref-parser": "^16.0.3",
49
- "@jxsuite/create": "^1.3.13",
50
- "@jxsuite/runtime": "^4.0.3",
49
+ "@jxsuite/create": "^1.3.14",
50
+ "@jxsuite/runtime": "^4.1.0",
51
51
  "@jxsuite/schema": "^3.0.0",
52
- "@jxsuite/site": "^2.0.3",
52
+ "@jxsuite/site": "^2.0.4",
53
53
  "@vue/reactivity": "3.5.43",
54
54
  "esbuild": "^0.28.2",
55
55
  "lit-html": "^3.3.3",
56
56
  "sharp": "^0.35.5"
57
57
  },
58
58
  "devDependencies": {
59
- "@happy-dom/global-registrator": "^20.14.5",
59
+ "@happy-dom/global-registrator": "^20.14.6",
60
60
  "@jxsuite/connector": "^0.6.2",
61
- "@jxsuite/parser": "^2.0.0",
61
+ "@jxsuite/parser": "^2.0.1",
62
62
  "@types/mdast": "^4.0.4"
63
63
  }
64
64
  }
@@ -784,11 +784,12 @@ export async function buildSite(
784
784
  /*
785
785
  * Serialize the export sidecars (formats with exportTarget: true, e.g. Markdown) BEFORE the page
786
786
  * is written, so its `<head>` advertises exactly the twins that exist: a link to a file the
787
- * build did not write is worse than no link.
787
+ * build did not write is worse than no link. The not-found page has none: it is served for
788
+ * whatever URL was mistyped, so there is nothing for a twin to be a twin of.
788
789
  */
789
790
  const sidecars: { content: string; path: string; type: string | null }[] = [];
790
791
  for (const fmt of formatRegistry.withCapability("serialize")) {
791
- if (!fmt.exportTarget) {
792
+ if (!fmt.exportTarget || isNotFoundRoute(route.urlPattern)) {
792
793
  continue;
793
794
  }
794
795
  try {
@@ -813,16 +814,12 @@ export async function buildSite(
813
814
  errors.push(`Error exporting ${fmt.name} for ${route.urlPattern}: ${err.message}`);
814
815
  }
815
816
  }
816
- /* The not-found page is served for whatever URL was mistyped, so what it would advertise is
817
- not a twin of anything. */
818
- if (!isNotFoundRoute(route.urlPattern)) {
819
- for (const sidecar of sidecars) {
820
- if (sidecar.type !== null) {
821
- result.html = withAlternateLink(result.html, {
822
- href: outputUrlPath(outDir, sidecar.path),
823
- type: sidecar.type,
824
- });
825
- }
817
+ for (const sidecar of sidecars) {
818
+ if (sidecar.type !== null) {
819
+ result.html = withAlternateLink(result.html, {
820
+ href: outputUrlPath(outDir, sidecar.path),
821
+ type: sidecar.type,
822
+ });
826
823
  }
827
824
  }
828
825