You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a small change for the JS backend, as the tree-sitter parser
already supports JSX.
This is a fairly big decision w.r.t how the js backend will evolve with
typescript and other javascript transpile formats. Since many tools that
support js also supports other kinds of files, the `JSRuntime...` will
be used to refer to the files that can be treated as a source code file
for some node-ish runtime who either processes the AST or executes
actual programmes.
Clarifiying examples:
1. A linter that can process any js-esque file should accept
JSRuntimeSourceField
2. All test sources should use JSRuntimeDependencies
3. Files that can cross import (post bundling) different transpile
formats should use JSRuntimeDependencies and JSRuntimeSourceField. Think
typescript, JSX.
4. A checker that can only process typed vue-templates should not accept
JSRuntimeSourceField.
This PR together with #21176
essentially gives pants "react" support.
---------
Co-authored-by: riisi <[email protected]>
Copy file name to clipboardexpand all lines: docs/notes/2.23.x.md
+3
Original file line number
Diff line number
Diff line change
@@ -195,6 +195,9 @@ Pants now applies dependency inference according to the most permissive "bundler
195
195
[jsconfig.json](https://code.visualstudio.com/docs/languages/jsconfig), when a jsconfig.json is
196
196
part of your javascript workspace.
197
197
198
+
Pants now ships with experimental JSX support, including Prettier formatting and JS testing as part of the
199
+
JS backend.
200
+
198
201
#### Shell
199
202
200
203
The `tailor` goal now has independent options for tailoring `shell_sources` and `shunit2_tests` targets. The option was split from `tailor` into [`tailor_sources`](https://www.pantsbuild.org/2.23/reference/subsystems/shell-setup#tailor_sources) and [`tailor_shunit2_tests`](https://www.pantsbuild.org/2.23/reference/subsystems/shell-setup#tailor_shunit2_tests).
0 commit comments