@observablehq/notebook-kit 2.1.1 → 2.1.3

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/observablehq/notebook-kit.git"
7
7
  },
8
- "version": "2.1.1",
8
+ "version": "2.1.3",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "test": "vitest",
@@ -16,12 +16,9 @@ export function findFeatures(name, body, input) {
16
16
  const { callee } = node;
17
17
  if (callee.type !== "Identifier" || !references.has(callee))
18
18
  return;
19
- const args = node.arguments;
20
- if (args.length !== 1)
21
- throw syntaxError(`${name} requires a single literal string argument`, node, input); // prettier-ignore
22
- const [arg] = args;
23
- if (!isStringLiteral(arg))
24
- throw syntaxError(`${name} requires a single literal string argument`, node, input); // prettier-ignore
19
+ const [arg] = node.arguments;
20
+ if (!arg || !isStringLiteral(arg))
21
+ throw syntaxError(`${name} requires a literal string argument`, node, input); // prettier-ignore
25
22
  calls.push(Object.assign(node, { argument: getStringLiteralValue(arg) }));
26
23
  }
27
24
  });
@@ -114,7 +114,9 @@ function getPrefix(cell) {
114
114
  ? getSqlPrefix(cell)
115
115
  : isInterpreter(cell.mode)
116
116
  ? getInterpreterPrefix(cell)
117
- : cell.mode;
117
+ : cell.mode === "html"
118
+ ? "htl.html"
119
+ : cell.mode;
118
120
  }
119
121
  function getSqlPrefix(cell) {
120
122
  const { id, database = "var:db", since } = cell;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/observablehq/notebook-kit.git"
7
7
  },
8
- "version": "2.1.1",
8
+ "version": "2.1.3",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "test": "vitest",