@cosyte/synth 0.1.8 → 0.1.9

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 37e934b: A generator now loads its parser where `import.meta.resolve` throws or answers with a URL that is not a `file:` URL, as inside Deno's test runner.
8
+
9
+ Before, the first generator call that needed a parser threw there (`TypeError: Invalid arguments` under Deno's test runner). Now the ES module build loads the parser by name through `require` instead, the same fallback it already takes where Node.js cannot `require` an ES module, so a returned value is an instance of the CommonJS copy of the parser's classes. Nothing changes on Node.js 22.12 or later, and no output changes. A caller changes nothing.
10
+
3
11
  ## 0.1.8
4
12
 
5
13
  ### Patch Changes
@@ -605,7 +605,12 @@ function isRequireEsmRefusal(error) {
605
605
  }
606
606
  function loadPeer(specifier, host) {
607
607
  if (host.resolve === void 0) return host.require(specifier);
608
- const entry = url.fileURLToPath(host.resolve(specifier));
608
+ let entry;
609
+ try {
610
+ entry = url.fileURLToPath(host.resolve(specifier));
611
+ } catch {
612
+ return host.require(specifier);
613
+ }
609
614
  try {
610
615
  return host.require(entry);
611
616
  } catch (error) {