prolog-notebook 0.4.1 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.2] — 2026-08-30
4
+
5
+ ### Fixed
6
+
7
+ - **The update check asked the registry for a media type it is entitled to refuse**, so on some
8
+ of npm's edges every check answered `Could not reach the npm registry to check for updates.`
9
+ `application/vnd.npm.install-v1+json` is defined for the packument; `/{name}/latest` may
10
+ answer 406 to it, and does. Measured both ways from one machine minutes apart, which is what
11
+ made it look transient. It now asks for plain JSON, which that endpoint has always served.
12
+
3
13
  ## [0.4.1] — 2026-08-30
4
14
 
5
15
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prolog-notebook",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Jupyter-style notebooks for Prolog. Runs in the browser, installs nothing.",
5
5
  "type": "module",
6
6
  "main": "./src/node.js",
@@ -1,4 +1,4 @@
1
1
  {
2
- "commit": "9de0531",
3
- "built": "2026-08-30 15:28:09 UTC"
2
+ "commit": "a4ae8f0",
3
+ "built": "2026-08-30 15:34:45 UTC"
4
4
  }
package/src/update.js CHANGED
@@ -69,9 +69,16 @@ export function fileStore(path = cachePath()) {
69
69
  /**
70
70
  * Ask the registry which version is `latest`.
71
71
  *
72
- * The abbreviated document rather than the full packument: the full one carries
73
- * every version ever published and can be megabytes, for a question with a
74
- * one-line answer.
72
+ * `/{name}/latest` rather than the packument: the packument carries every version
73
+ * ever published and can be megabytes, for a question with a one-line answer.
74
+ * This endpoint answers in about 2 kB.
75
+ *
76
+ * PLAIN JSON, AND NOT THE ABBREVIATED TYPE. `application/vnd.npm.install-v1+json`
77
+ * is defined for the packument, and this endpoint is entitled to refuse it — some
78
+ * of npm's edges serve it anyway and others answer 406, which is why the first
79
+ * version of this shipped a notifier that reported "could not reach the registry"
80
+ * to some people and worked for others. Measured both ways, from one machine,
81
+ * minutes apart.
75
82
  *
76
83
  * @returns {Promise<string|null>} null for anything that goes wrong
77
84
  */
@@ -87,7 +94,7 @@ export async function latestFromRegistry({
87
94
  try {
88
95
  const base = String(registry).replace(/\/+$/, '');
89
96
  const response = await fetchImpl(`${base}/${name}/latest`, {
90
- headers: { accept: 'application/vnd.npm.install-v1+json' },
97
+ headers: { accept: 'application/json' },
91
98
  signal: AbortSignal.timeout(timeout),
92
99
  });
93
100
  if (!response.ok) return null;
package/src/version.js CHANGED
@@ -10,7 +10,7 @@
10
10
  export const NAME = 'Prolog Notebook';
11
11
 
12
12
  /** Must equal package.json's `version` — test/run.test.mjs enforces it. */
13
- export const VERSION = '0.4.1';
13
+ export const VERSION = '0.4.2';
14
14
 
15
15
  /** The two facts a licence notice is actually made of. */
16
16
  export const YEAR = '2026';