Surfaced by the #805 npm sweep harness (tier1 list, two distinct packages hit the same shape).
Repro 1 — dayjs
```ts
import dayjs from "dayjs";
const d = dayjs("2024-01-02");
console.log("d:", typeof d); // object ✓
console.log("d.format:", typeof (d as any).format); // undefined ✗ (Node: function)
```
Repro 2 — chalk
```ts
import chalk from "chalk";
console.log("chalk:", typeof chalk); // function (Node: object/proxy)
console.log("chalk.green:", typeof (chalk as any).green); // throws "value is not a function"
```
Both packages succeed at compile + link under `perry.compilePackages` but the instance / static surface that's assigned via JS-classic patterns (`Dayjs.prototype.format = ...`, chalk's Proxy-wrapped function instance) is empty at runtime.
Why this matters
This blocks a whole class of npm packages — anything that:
- assigns methods to a class prototype outside the `class { ... }` syntax (the JS-classic pattern), or
- exports a callable that also has properties (chalk, express, ms-as-function-with-props, …)
The `Dayjs.prototype.format = function(){...}` pattern is the obvious test case. Once that lands, chalk's shape (`Function & { green, red, ... }`) is the harder follow-up — it likely needs Proxy/callable-object support in the compiled-package codegen.
Status against existing trackers
Probably the same family as #618 (IIFE-namespace function-static properties) but the call site is now "npm-installed package, not user code," so the surface is much larger. Not a duplicate — keeping this open so the sweep CSV has a single ticket to point at when dayjs/chalk move from `run-fail` to `pass`.
Part of #793 + #805 + #115. Surfaced by the #805 sweep.
Surfaced by the #805 npm sweep harness (tier1 list, two distinct packages hit the same shape).
Repro 1 — dayjs
```ts
import dayjs from "dayjs";
const d = dayjs("2024-01-02");
console.log("d:", typeof d); // object ✓
console.log("d.format:", typeof (d as any).format); // undefined ✗ (Node: function)
```
Repro 2 — chalk
```ts
import chalk from "chalk";
console.log("chalk:", typeof chalk); // function (Node: object/proxy)
console.log("chalk.green:", typeof (chalk as any).green); // throws "value is not a function"
```
Both packages succeed at compile + link under `perry.compilePackages` but the instance / static surface that's assigned via JS-classic patterns (`Dayjs.prototype.format = ...`, chalk's Proxy-wrapped function instance) is empty at runtime.
Why this matters
This blocks a whole class of npm packages — anything that:
The `Dayjs.prototype.format = function(){...}` pattern is the obvious test case. Once that lands, chalk's shape (`Function & { green, red, ... }`) is the harder follow-up — it likely needs Proxy/callable-object support in the compiled-package codegen.
Status against existing trackers
Probably the same family as #618 (IIFE-namespace function-static properties) but the call site is now "npm-installed package, not user code," so the surface is much larger. Not a duplicate — keeping this open so the sweep CSV has a single ticket to point at when dayjs/chalk move from `run-fail` to `pass`.
Part of #793 + #805 + #115. Surfaced by the #805 sweep.