-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add fixture for declaration transpiler test #708
base: main
Are you sure you want to change the base?
Add fixture for declaration transpiler test #708
Conversation
7006a7c
to
1e88035
Compare
1e88035
to
19b3a9a
Compare
) | ||
|
||
ctx.actions.write( | ||
output = map_file, | ||
content = _DUMMY_SOURCEMAP % src.short_path, | ||
) | ||
|
||
return DefaultInfo(files = depset(out_files)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this have to switch? The transpiler should just have to output the transpiled js or dts (+maps) as default info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having JsInfo
seems typical of actual usage. Some examples:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That just means the rule can be used directly for things like js_library(deps)
I guess, instead of how ts_project
(the macro) or js_library(srcs)
uses the DefaultInfo
.
I guess it does not harm, but also isn't used in these tests 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's probably worth doing in case folks crib this as an example (though we could also provide a production-ready transpiler using oxc as an example ;)
I haven't quite figured out how or what to test, but I figure adding a dummy transpiler based on what we have at Airtable could be helpful.
Changes are visible to end-users: no
Test plan