Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set up initial actions & docs #1

Merged
merged 31 commits into from
Nov 29, 2024
Merged

Conversation

JakobJingleheimer
Copy link
Member

No description provided.

@bmuenzenmeyer
Copy link

just throwing this previous conversation here nodejs/release-cloudflare-worker#132 - it's not a blocker, but i honestly dont know how to manage this sort of fragmentation across the project - perhaps it doesnt matter

package.json Outdated Show resolved Hide resolved
@JakobJingleheimer
Copy link
Member Author

I think some fragmentation is fine. I think it's more important to keep standards similar. How they are enforced is an implementation detail, and the existing modus operandi of the project is, without a compelling reason to the contrary, that's author's choice.

ESLint being "in the family" is maybe a compelling reason, but i think not a clear-cut one.

I don't have much preference though. ESLint has been fine when I've used it before. I only tossed in biome here because of the reasons Augustin mentioned.

@AugustinMauroy

This comment was marked as resolved.

Co-authored-by: Augustin Mauroy <augustin.mauroy@outlook.fr>
biome.jsonc Outdated Show resolved Hide resolved
@AugustinMauroy
Copy link
Member

Should we have commit hooks ?

node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint
Copy link
Member

Choose a reason for hiding this comment

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

this should be done in sub steps ? I'm no sure.
@bmuenzenmeyer is more of an expert on this than I am

Choose a reason for hiding this comment

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

its fine as long as you think linting and types go hand in hand here 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

Not especially, but the have the same setup and separating them into their own jobs seemed wasteful—no need to create a fresh environment for each; they don't affect each other.

Copy link
Member

Choose a reason for hiding this comment

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

wasteful for who? actions are free.

Tests run in a matrix; linting only ever needs to run once; it’s generally best to split it for CI hygiene.

Copy link
Member Author

Choose a reason for hiding this comment

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

Electricity? Spinning up a new environment may not cost us money, but it costs IRL resources—unless I'm misunderstanding what will happen?

Comment on lines +4 to +5
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always"
Copy link
Member Author

Choose a reason for hiding this comment

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

I think we need to set an additional property so that VS Code doesn't change d.ts.js when it updates imports. I don't recall what the config prop is though.

Copy link
Member

Choose a reason for hiding this comment

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

I've no idea, but I think this behaviour is gone now, but not for sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely not gone. It happened to me like yesterday.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@AugustinMauroy

This comment was marked as resolved.

Co-authored-by: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com>
@JakobJingleheimer
Copy link
Member Author

Should we have commit hooks ?

I think no: those can get hella annoying. If a user wants to commit code that will fail, that doesn't hurt anything, so let's not get in the way—maybe they have a good reason (like sharing something incomplete).

@JakobJingleheimer
Copy link
Member Author

should we include or exclude this file ?

I think include

@JakobJingleheimer
Copy link
Member Author

Looks like it was indeed the overly fancy glob—for whatever reason, CI does not like m(j|t)s (but doesn't mind {mjs,mts}).

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGMT ! I'm fine as it. maybe open an issue to track v20 support. Should we found a solution (own workflow) or just no support it until we have a codemod need v20.

@JakobJingleheimer
Copy link
Member Author

I would like to support all LTS lines, but 20.x is maintenance mode with 24 around the corner. I think it's not awful to have not all recent lines because of the nature of these: a codemod run on a newer version can still process code intended for an older version.

So let's remove 20.x from ci.yml

@AugustinMauroy
Copy link
Member

BTW if we not support node 20 we can only use --run (introduce in 22)

Copy link

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

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

some comments!

.github/workflows/ci.yml Outdated Show resolved Hide resolved
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run lint

Choose a reason for hiding this comment

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

its fine as long as you think linting and types go hand in hand here 👍

@@ -0,0 +1 @@
23

Choose a reason for hiding this comment

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

do we recommend odd versions?
at least in my day job, we try to stay on the prod versions. I suppose this IS a tooling author environment 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

this IS a tooling author environment 😄

That's what I was thinking.

Copy link
Member

Choose a reason for hiding this comment

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

may be use LTS for dev and recommend it for prod (cli usage of the tool)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think these would not be used in prod? @alexweej perhaps your use-case is different than what I'm imagining.

LICENSE.txt Outdated Show resolved Hide resolved
LICENSE.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@JakobJingleheimer
Copy link
Member Author

Noooo, why is CI failing on those globs again 😭

- / # Location of package manifests
- /recipies/*
commit-message:
prefix: deps
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
prefix: deps
prefix: "deps(recipies): "

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we should have 2 separate ones then so we can differentiate between the root repo and recipes (cuz if we apply your suggestion, it will mark changes to the root repo's deps as belonging to a recipe).

@JakobJingleheimer JakobJingleheimer merged commit 2fc7b4b into main Nov 29, 2024
7 checks passed
@JakobJingleheimer JakobJingleheimer deleted the chore/initial-setup branch November 29, 2024 18:11
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.

6 participants