typescript-node: Fix yarn lockfile, test value, and script/test for CI - #160
typescript-node: Fix yarn lockfile, test value, and script/test for CI#160adamnfish-gu wants to merge 1 commit into
Conversation
The project had a Yarn Classic v1 yarn.lock alongside a .yarnrc.yml configured for Yarn Berry and a .yarn/install-state.gz. The sibling javascript and javascript-esm projects both use Yarn Berry 3. Deletes the v1 yarn.lock and regenerates it with Yarn 3.8.7. Adds a packageManager field to package.json to pin the choice. myConst was false while the test expected true; it now returns true. script/test ran `yarn test --watch`, which never exits. It now runs once, with the watch loop behind --watch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bryophyta
left a comment
There was a problem hiding this comment.
As mentioned in the corresponding JS PR I suspect that the test was failing intentionally, but as long as the change to a passing test is intentional then this looks good to me 👍
For sure! The original pattern was to have a failing test in every project skeleton, I guess to follow the TDD pattern of going red -> green in a loop. We've different priorities with this new layout. Because we want to catch problems with these ill-maintained examples, we need a way to automatically verify that the setup works. The fact that we had a test suite already in each skeleton means that's a great way to do it. We don't lose much (if anything) on the getting started side by having the test start green, but we gain a lot on the maintenance side by having these tests be automatically checked. This is why each language is split into two PRs - one to set up the project (including making sure the test suite passes), and a second one that migrates to the new .tool-versions file structure. I'm happy to combine them all into one PR each if we think that would be clearer, but I do find it much easier to review a single tightly focused PR and this is especially important when there are quite a few of them. Thanks for taking a look! |
The project had a Yarn Classic v1 yarn.lock alongside a .yarnrc.yml configured for Yarn Berry and a .yarn/install-state.gz. The sibling javascript and javascript-esm projects both use Yarn Berry 3.
Deletes the v1 yarn.lock and regenerates it with Yarn 3.8.7. Adds a packageManager field to package.json to pin the choice.
myConst was false while the test expected true; it now returns true. script/test ran
yarn test --watch, which never exits. It now runs once, with the watch loop behind --watch.Base
platform/tool-versions-ci(#144), so the diff shows only this branch's changes. Merge #144 first.Part of #143.