Skip to content

Conversation

AugustinMauroy
Copy link

@AugustinMauroy AugustinMauroy commented Jun 2, 2025

Description

  • use actions/setup-node@v4
    • use lts/*
    • use --run since LTS is v22.x
  • Include lock file to reduce ci time and improve dx

@@ -8,8 +8,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
- uses: actions/setup-node@v4
Copy link
Member

Choose a reason for hiding this comment

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

this is not a preferred change, it's actually less simple, and it's not maintained by me so tc39 has less control over it.

Copy link
Author

Choose a reason for hiding this comment

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

It's the simplest because everyone uses it, because it manages versions for us, and it hides the npm dep.

Copy link
Member

Choose a reason for hiding this comment

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

why would we want npm hidden?

Copy link
Author

Choose a reason for hiding this comment

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

my bad I mean cache.
But FIY "cache" in French mean hide. So just ADHD

Copy link
Member

Choose a reason for hiding this comment

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

my actions can do caching as well, but caching adds complexity that can hide bugs, so it's usually best avoided when speed isn't a priority, as it isn't here.

Copy link
Author

Choose a reason for hiding this comment

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

just realize that caching can be accomplish without lock file

Copy link
Author

Choose a reason for hiding this comment

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

Let's get back to the main topic, which is that action/setup-node is used by everyone and is very well maintained.
And I remain convinced that using a standard GHA is the right approach.

Copy link
Member

Choose a reason for hiding this comment

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

It is not always well maintained - there's been problems with it before - and it doesn't really matter who else uses it. We're going to keep using the same things we've been using across the tc39 org, they work well and we can directly fix issues in them, unlike in setup-node.

- run: npm run build
cache: 'npm'
- run: npm ci
- run: node --run build
Copy link
Member

Choose a reason for hiding this comment

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

we can't use node --run, because it won't run pre and post scripts.

Copy link
Author

@AugustinMauroy AugustinMauroy Jun 2, 2025

Choose a reason for hiding this comment

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

You should never use these side effects to perform a task.
if you want a second step explicitly add it

Copy link
Member

Choose a reason for hiding this comment

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

That's an opinion, and one i profoundly disagree with.

Copy link
Author

Choose a reason for hiding this comment

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

In most cases, it seems obvious to me that having each step clearly written down instead of relying on magic is the best idea.

Copy link
Member

Choose a reason for hiding this comment

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

it is clearly written down, in package.json's scripts section. This is similar to how makefiles have operated for decades, it's not magic, it's what's expected.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it's just that it's something voluntary. But I don't think we should base our decision on that. Because a task, a script, a step in the CI, a call to a script...

@ljharb
Copy link
Member

ljharb commented Jun 2, 2025

CI time is very fast as it is, and doesn't need improvement really.

This reverts commit 83a66b7.
@AugustinMauroy
Copy link
Author

jordan had right, again ... 😁

@AugustinMauroy AugustinMauroy deleted the improve-ci branch August 27, 2025 16:06
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