• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nearform / graphql-hooks / 39793451701
76%

Build:
DEFAULT BRANCH: master
Ran 22 Oct 2026 02:14PM UTC
Jobs 1
Files 31
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Oct 2026 02:10PM UTC coverage: 76.09% (-0.05%) from 76.142%
39793451701

push

github

web-flow
fix(babel-plugin-extract-gql): load without pkg-dir, which is ESM-only (#1296)

* fix(babel-plugin-extract-gql): load without pkg-dir, which is ESM-only

lib/index.js did require('pkg-dir').sync(), but pkg-dir has been ESM-only since
6 and only 5 and earlier export .sync, so the published 4.0.1 cannot be loaded
(ERR_REQUIRE_ESM on Node 20.18, 'pkgDir.sync is not a function' elsewhere).
Find the nearest package.json from the working directory with fs and path
instead, and drop pkg-dir.

Also drop fastify and @fastify/cors from dependencies: nothing in src/ or test/
imports them, and they pulled about 385 packages into every install. Publish
only lib/ (the tarball was shipping src, tests and examples).

The unit suite had not run for a while and was failing for two more reasons,
fixed so it can: the test did glob.sync through a default import that glob 11
no longer has, and it compared Babel's raw output with fixtures kept in the
repo's Prettier style. New tests load the built lib in a plain node process and
check that gql-queries.json lands beside the nearest package.json.

Refs #1294, #1285

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* ci: run babel-plugin-extract-gql's tests

Its suite is mocha, which test:coverage (jest) never runs, so the plugin could
not load for months without CI noticing. Run it after the build, which the
tests that load the built lib need.

Refs #1285

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(babel-plugin-extract-gql): cover findPackageRoot, and only accept a file

Move the helper into its own module so it can be tested directly, and check
that package.json is a file rather than merely existing, as find-up did: a
directory called package.json no longer counts as a project root.

Tests: the directory itself, a nested directory, the nearest of two
package.json files, a directory named package.json, the working-directory
default, and the error when nothing above has one.

Refs #1294

Co-Aut... (continued)

517 of 711 branches covered (72.71%)

Branch coverage included in aggregate %.

600 of 757 relevant lines covered (79.26%)

64.37 hits per line

Jobs
ID Job ID Ran Files Coverage
1 39793451701.1 22 Oct 2026 02:14PM UTC 59
76.91
GitHub Action Run
Source Files on build 39793451701
  • Tree
  • List 31
  • Changed 22
  • Source Changed 1
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #39793451701
  • 1edce126 on github
  • Prev Build on master (#33522286247)
  • Next Build on master (#39796040411)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc