Skip to content

Option to disable dntGlobalThis and picocolors #454

@hyprxdev

Description

@hyprxdev

Even when I set shims: { deno: false} or shims: {} a proxy object is created and anywhere that globalThis is used its being replaced with dntGlobalThis and a proxy object with no shims, which results in an extra file and code in multiple libraries.

And even though I'm using a custom library to shim the different different frameworks for Deno, bun, and nodejs, test_runner.js and picocolors is added to the package.json. So I'm able to run tests with the generated npm package using node --test and bun test.

It would be nice to disable that in certain scenarios to reduce the extra dependency on picocolors without having to read and re-write the package.json and remove the test_runner.js. And unless you write your own wrapper for global in a central location, it makes it harder to remove the dnsGlobalThis and proxy object.

Is there currently a way to turn this off? If not, would you consider an option to turn this off? I can imagine that when something like vitest and other things work in deno, that shimming the tests over time will become needed less.

Also thanks for developing dnt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions