balena-io / pinejs

Generate rest APIs from natural language models
Apache License 2.0
62 stars 10 forks source link

Use assertExists in place of expectNotUndefined #780

Closed otaviojacobi closed 2 months ago

otaviojacobi commented 2 months ago

It is a slightly improvement on the function definition (also more similar to what we use on other places) and also moving it to a common test lib instead of inside a single test module.

Change-type: patch

joshbwlng commented 2 months ago

@otaviojacobi Hmm, the type generation comment is causing CI to fail with this in a few places:

-// These types were generated by @balena/abstract-sql-to-typescript v3.2.3
+// These types were generated by @balena/abstract-sql-to-typescript v3.3.0

It's definitely a bit annoying and makes me wonder if we should leave at least the minor and patch out of comment. Or just leave the version out entirely and only fail if the actual types (the actual important bit!) have changed.

otaviojacobi commented 2 months ago

@otaviojacobi Hmm, the type generation comment is causing CI to fail with this in a few places:

-// These types were generated by @balena/abstract-sql-to-typescript v3.2.3
+// These types were generated by @balena/abstract-sql-to-typescript v3.3.0

It's definitely a bit annoying and makes me wonder if we should leave at least the minor and patch out of comment. Or just leave the version out entirely and only fail if the actual types (the actual important bit!) have changed.

Yes, I have raised the same concern but the idea is that @balena/abstract-sql-to-typescript is very rarely updated and we just have to endure a bit of updating while it becomes stable with the new typings