Skip to content

typescript-node: Fix yarn lockfile, test value, and script/test for CI - #160

Open
adamnfish-gu wants to merge 1 commit into
platform/tool-versions-cifrom
fix/typescript-node
Open

typescript-node: Fix yarn lockfile, test value, and script/test for CI#160
adamnfish-gu wants to merge 1 commit into
platform/tool-versions-cifrom
fix/typescript-node

Conversation

@adamnfish-gu

@adamnfish-gu adamnfish-gu commented Aug 7, 2026

Copy link
Copy Markdown

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.

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 bryophyta left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 👍

@adamnfish-gu

Copy link
Copy Markdown
Author

I suspect that the test was failing intentionally

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants