@dev-blinq/cucumber_client 1.0.1725-dev → 1.0.1727-dev

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.
@@ -1,8 +1,14 @@
1
1
  import { promises as fs } from "node:fs";
2
2
  import path from "node:path";
3
3
  import { parse } from "@babel/parser";
4
- import traverse from "@babel/traverse";
4
+ import traverseImport from "@babel/traverse";
5
5
  import * as t from "@babel/types";
6
+ // @babel/traverse may export the visitor function either as the module itself (CJS)
7
+ // or under a `default` property (ESM). Normalize to a callable function to avoid
8
+ // runtime "traverse is not a function" errors in bundled environments.
9
+ const traverse = typeof traverseImport === "function"
10
+ ? traverseImport
11
+ : (traverseImport.default ?? traverseImport);
6
12
  const IGNORE_DIRS = new Set(["node_modules", ".git", ".idea"]);
7
13
  function propName(prop) {
8
14
  if (!t.isObjectProperty(prop))
@@ -1,8 +1,12 @@
1
1
  import { promises as fs } from "node:fs";
2
2
  import path from "node:path";
3
3
  import { parse } from "@babel/parser";
4
- import traverse from "@babel/traverse";
4
+ import traverseImport from "@babel/traverse";
5
5
  import * as t from "@babel/types";
6
+ // Normalize babel traverse to handle both CJS (callable export) and ESM (default export)
7
+ const traverse = typeof traverseImport === "function"
8
+ ? traverseImport
9
+ : (traverseImport.default ?? traverseImport);
6
10
  function isNumericKey(key) {
7
11
  return typeof key === "string" && /^\d+$/.test(key);
8
12
  }
@@ -1,5 +1,5 @@
1
- import { findIssues } from "./find_misstructured_elements";
2
- import { fixIssues } from "./fix_misstructured_elements";
1
+ import { findIssues } from "./find_misstructured_elements.js";
2
+ import { fixIssues } from "./fix_misstructured_elements.js";
3
3
  /**
4
4
  * Converts legacy locator objects that use numeric keys (e.g., `{ 0: {...}, 1: {...} }`)
5
5
  * into a `locators` array, across all JS/MJS/JSON files under a codebase root.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1725-dev",
3
+ "version": "1.0.1727-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",