@observablehq/notebook-kit 2.1.2 → 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.2",
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
  });
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.2",
8
+ "version": "2.1.3",
9
9
  "type": "module",
10
10
  "scripts": {
11
11
  "test": "vitest",