- Notifications
You must be signed in to change notification settings - Fork89
feat: support custom user conditions#384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
ernestostifano commentedJun 13, 2025
@pi0 happy to make any changes if needed. |
ernestostifano commentedJun 23, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@pi0 friendly ping. I'd love to receive some feedback. Maybe I could help maintaining this package in the future. If you think this cannot be merged right now I could publish a forked version. (If you prefer we review it together, I can schedule a meeting) |
AnielloFalcone commentedJul 1, 2025
This seems a good idea! |
pigulla commentedAug 9, 2025
Shamelessly pinging@pi0 - I'd love to see this merged! |
pi0 commentedAug 10, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It is a risky changest with possible regressions and lots of changes. Ideally if someone can help making another PR with minimum enough (few lines of diff) to add custom resolve conditions it can speedup adding this feature. |
ernestostifano commentedNov 19, 2025
@pi0 I understand your concerns, but all these features are tightly related and I think they all add value considering how Node.Js is evolving. I tried to separate changes logically into multiple commits, all automatic tests are passing and I added new ones covering the new changes. I also performed many manual tests installing the library locally. I have a good level of confidence that no regressions were introduced. If you want, I would be available to review together. |
Uh oh!
There was an error while loading.Please reload this page.
Resolves:#383,#369
Main Changes:
JitiOptionsandJitiResolveOptions, so, consistently across all programmatic APIs.JITI_CONDITIONSenvironment variable.conditionsfield.Added Capabilities Examples:
conditionsis set totrue, configuration will be read from the nearestpackage.json, relative tocwd.conditionsis set tofalse, or no configuration is found, then everything should behave like this PR never existed.Details:
utils.mjsto group common code for both synchronous and asynchronous hooks.existswithaccessaccording to most recentrecommended approach.pnpmworkspaces for testing with packages.Notes:
conditions->trueby default according to thisNode.JS Proposal (see point5at "The Problem - TL;DR").jitiandnativemethods:import()!==jiti.import().createRequire()->require()!==jiti.import().import(when using--import jiti/register) !==jiti.import().