Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fully resolved paths are getting embedded in docs/defaults #8

Open
danielroe opened this issue Jul 2, 2021 · 3 comments
Open

fully resolved paths are getting embedded in docs/defaults #8

danielroe opened this issue Jul 2, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@danielroe danielroe added the bug Something isn't working label Jul 2, 2021
@pi0 pi0 added enhancement New feature or request and removed bug Something isn't working labels Jul 21, 2021
@pi0
Copy link
Member

pi0 commented Jul 21, 2021

Hmm, it is expected for untyped to pick defaults unless you have a better idea, we shall detect generate script (with something like an environment variable) and use something like <rootDir> for rootDir or mock resolvers.

Copy link
Member Author

danielroe commented Jul 22, 2021

Is it too opinionated simply to detect current absolute path (from process.cwd()) in defaults and replace it with <root>? I can't think of a scenario where we would want that in a schema.

# if run from /Users/me/mylibrary
/Users/me/mylibrary/dist/index.js -> <root>/dist/index.js
/Users/me/otherlibrary/dist/index.js -> /Users/me/otherlibrary/dist/index.js

@pi0
Copy link
Member

pi0 commented Jul 22, 2021

Is it too opinionated simply to detect current absolute path (from process.cwd()) in defaults and replace it with ?

At least it is not necessarily always cwd() (and <root> being desired replacement) at untyped level.

How about supporting defaults as a function for resolveSchema ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants