Conversation
ca7f183 to
608c664
Compare
Really just a way to debug and see the final product as it's WIP.
also working on the docs -> luals type conversion
Also works on hitting more acceptance criteria
Also removed unused packages
| "./functions": "./dist/functions/index.js", | ||
| "./types": "./dist/types/index.js", | ||
| "./matchers": "./dist/matchers/index.js" | ||
| }, |
There was a problem hiding this comment.
The annotations requires this because it categorizes the docs by importing the individual folders instead of getting them through the main entrypoint. Also, it seems to require file extensions and only works with the NodeNext module resolution.
|
There's a couple things left that need resolving, after which I'll do a second pass: There are a couple bits of logic I saw while resolving threads that are a little hard to parse, so you might want to do a quick self-review of your changes in case there's anything that you think could be improved still |
Also, found out that the so-called 'redundant lambdas' weren't so redundant. They were translating syntax sugar for the class method dispatch.
|
FYI: In the second pass I assume you will look at the tests. Because the generated annotations aren't strict about whitespace/formatting, the tests look for "expected elements" and "unexpected elements." These effectively make sure that each annotation is a certain shape without considering whitespace or formatting. |
Derpius
left a comment
There was a problem hiding this comment.
Still haven't reviewed the tests yet, as there were still quite a few issues
There was a problem hiding this comment.
Not a review comment, but you can actually make jest configs with typescript if you have ts-node as a dependency
| testEnvironment: "node", | ||
| testMatch: ["**/*.test.ts"], | ||
| collectCoverage: true, | ||
| collectCoverageFrom: ["src/**/{!(index),}.ts"], |
There was a problem hiding this comment.
Is there a reason we're excluding coverage for index files? Surely the tests should import from the indexes at least once?
There was a problem hiding this comment.
Again, another issue caused by a change when I had multiple index.ts files. index.ts can be considered a unit, but all it does is just combine all of the other tested units together to create the annotation file, it doesn't export any functions. It's pretty much the application.
| "scripts": { | ||
| "start:ts-node": "ts-node src/index.ts", | ||
| "start": "node dist/src/index.js", | ||
| "dev": "npm run --debug start:ts-node && onchange \"src/**/*.ts\" -- npm run --debug start:ts-node", |
There was a problem hiding this comment.
nodemon works out the box with ts-node, but I've actually been using tsc-watch recently as ts-node has numerous compatibility issues (especially in a monorepo config)
Can leave this as is, but I recommend nodemon or tsc-watch
There was a problem hiding this comment.
Yup, ts-node is awful with monorepos, will look into a switch (nodemon/tsc-watch)
|
Still planning to fix these markups... |
|
@yogwoggf when are you finishing this? |
I'm not sure but it's 100% on the farthest backburner since Lest has had no activity since July 16th. |
Summary:
luals-annotations, which is a TypeScript project.@lest/docs.