es-tooling / ecosystem-cleanup

A place to keep track of ongoing efforts to clean up the JS ecosystem
405 stars 2 forks source link

Remove is-builtin-module from tailwind intellisense #51

Closed 43081j closed 5 months ago

43081j commented 6 months ago

tailwind uses is-builtin-module here: https://github.com/tailwindlabs/tailwindcss-intellisense/blob/b715097ca91d1c69ec0ab6d81de8c9435c0919e4/packages/tailwindcss-language-server/src/lib/env.ts#L4

it doesn't have an engines constraint, though it does depend on packages which themselves require node >=12.

that means we can at least rely on builtinModules:

import {builtinModules} from 'node:module';

const name = '...';
builtinModules.includes(name.replace('node:', ''));
43081j commented 6 months ago

opened tailwindlabs/tailwindcss-intellisense#970

43081j commented 5 months ago

Merged 🥳