-
Notifications
You must be signed in to change notification settings - Fork 1
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
SyntaxError: Missing initializer in const declaration #16
Comments
Re throwing there isn't a hard requirement, i don't think. I expect library authors to be able to read their terminal output during a build. |
Yeah, I patch-package'd it to do that and also output the original |
that would be lovely! thank you! I just noticed I never declared node support on this tool. |
TIL about styleText! Seems it was added in 20.12 tho: https://nodejs.org/api/util.html#utilstyletextformat-text-options |
node 20 it is! |
For .js files (with
allowJs: true
) glint is emitting exports likeexport const foo: Foo
, instead ofexport declare const foo: Foo
(which you have test coverage for), that causes jscodeshift to throw that error. See facebook/jscodeshift#539, which you apparently have seen already.I don't see a way to fix this properly, other than making jscodeshift be able to parse d.ts files, or reverting to Regex replacements instead of AST transforms?
What kinda helps is no not re-throw here, but just log the error and move on. At least when those js files the d.ts output has been generated for don't import gts...
The text was updated successfully, but these errors were encountered: