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

Kikobeats / isolated-function / 42500958803
89%

Build:
DEFAULT BRANCH: master
Ran 08 Nov 2026 04:40PM UTC
Jobs 1
Files 17
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

08 Nov 2026 04:38PM UTC coverage: 88.57% (+0.6%) from 88.0%
42500958803

push

github

web-flow
fix: subpath requires, and bundle only modules required with a string literal (#105)

* fix: require a file inside a package, ignore non-string requires

Two compile crashes from production (microlink-api EFATAL 500s):

- `require(1)` reached isBuiltinModule as a number and threw
  "moduleName.startsWith is not a function" before the code ran. Only a
  string literal is a dependency now; `require(1)` fails at run time like
  any other error the function throws.
- A subpath after the version became part of the version:
  `fairy-stockfish-nnue.wasm@1.1.11/stockfish.js` was handed to upm as a
  GitHub shorthand (codeload 404), `lodash/fp` was a malformed name and
  `@scope/pkg@1.0.5/file.js` a malformed tag. One parser now splits
  name, version and subpath for detection, install and the require
  rewrite, so the package is installed and the file is loaded.

The subpath splits only after a version, a ^ or ~ range, an x-range or
`latest`, so `isarray@juliangruber/isarray` stays a GitHub dependency and
a protocol version (`github:user/repo`) keeps its slashes.

A subpath with a `.`, `..` or empty segment, and a relative or absolute
specifier, is a DependencyNameError. Without it `lodash/../../<host
path>` passed `allow.dependencies` as `lodash` and esbuild bundled the
host file into the function. Before this change such specifiers were
rejected only because their name came out malformed.

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

* fix: validate every specifier esbuild resolves, not only require and import

detect-dependencies and transform-dependencies walked `require('x')` and
`import x from 'x'` only. esbuild also resolves at build time, on the
host, the static source of `import('x')`, `export * from 'x'`,
`export { y } from 'x'` and template literals without expressions. None
of them was validated, so `await import('/abs/host/file.json')` or
`import('../file.json')` bundled a host file outside the sandbox into
the function. This predates... (continued)

454 of 480 branches covered (94.58%)

Branch coverage included in aggregate %.

193 of 193 new or added lines in 7 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

1553 of 1786 relevant lines covered (86.95%)

4544.88 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
91.67
-2.06% src/compile/install-dependencies.js
Jobs
ID Job ID Ran Files Coverage
1 42500958803.1 08 Nov 2026 04:40PM UTC 17
88.57
GitHub Action Run
Source Files on build 42500958803
  • Tree
  • List 17
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42500958803
  • 71c90cd4 on github
  • Prev Build on master (#41483356733)
  • Delete
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