Pooya Parsa

Results 476 issues of Pooya Parsa

Related to #73 The current approach for universal compatibility is to take node `req` and `res` as references and emulate them with unenv. With the new Event interface, we can...

enhancement

Allow inspecting hook calls for (debug) inspection and nonblocking purposes. We can also measure execution time with a flag and provide to event. API could be like this: ```js hookable.on(hookNamem,...

In framework usages, when a hook is registered (`.hook()`) after being called `.callHook` with no handlers, callers will lose the opportunity to catch it: ```js // A: It will be...

In contexts where file extension is explicit `.mjs` or closest `package.json` has `type: module` we may use native ESM and for typescript, disable CommonJS transforms. Blocker is, jiti is supposed...

Changing `require` signature in ESM files should be avoided. We can pass [isNativeModule](https://github.com/unjs/jiti/blob/main/src/jiti.ts#L226) to the transformer top avoid CommonJS transform. (Related: #65)

Basic alias support for integrations need custom alias. We can also introduce `resolveId` for more advanced usecases.

- https://github.com/unjs/jiti/issues/26#issuecomment-803286043 - https://github.com/nuxt/vite/pull/201#issuecomment-918877146 https://github.com/alangpierce/sucrase

Context https://github.com/nuxt/nuxt.js/issues/9350 Another option is `.jitirc` since loading can be faster without depending on CJS require and ensures serialization for cacheKey is still possible. We can additionally support `JITI_OPTIONS` environment...

mkdist uses a post-build transform to add explicit extensions ([src](https://github.com/unjs/mkdist/blob/bcff1496a3b41f59a4db868587c0b46ed0a0b8c8/src/make.ts#L90)) but this is not always working (eg with multi line imports) https://github.com/unjs/unbuild/issues/83. We shall migrate to [mlly.parseStaticImports](https://github.com/unjs/mlly#parsestaticimport).

Ref: #17 #19 We shall use [mlly](https://github.com/unjs/mlly#findexports) `findImport`, `findExports` for more stable syntax detection.