-
Notifications
You must be signed in to change notification settings - Fork 0
feat: redesign changelog validation and modernize the Node 24 toolchain #4
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
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| import js from "@eslint/js"; | ||
| import globals from "globals"; | ||
| import tsParser from "@typescript-eslint/parser"; | ||
| import tsPlugin from "@typescript-eslint/eslint-plugin"; | ||
| import eslintConfigPrettier from "eslint-config-prettier"; | ||
|
|
||
| export default [ | ||
| { | ||
| ignores: [ | ||
| "build/**", | ||
| "coverage/**", | ||
| "node_modules/**", | ||
| "test-results/**", | ||
| ], | ||
| }, | ||
| js.configs.recommended, | ||
| ...tsPlugin.configs["flat/recommended"].map((config) => ({ | ||
| ...config, | ||
| files: ["src/**/*.ts", "test/**/*.ts"], | ||
| })), | ||
| ...tsPlugin.configs["flat/recommended-type-checked"].map((config) => ({ | ||
| ...config, | ||
| files: ["src/**/*.ts", "test/**/*.ts"], | ||
| languageOptions: { | ||
| ...config.languageOptions, | ||
| parser: tsParser, | ||
| parserOptions: { | ||
| ...config.languageOptions?.parserOptions, | ||
| project: "./tsconfig.eslint.json", | ||
| tsconfigRootDir: import.meta.dirname, | ||
| }, | ||
| globals: { | ||
| ...globals.node, | ||
| ...globals.jest, | ||
| }, | ||
| }, | ||
| })), | ||
| { | ||
| files: ["src/**/*.ts", "test/**/*.ts"], | ||
| rules: { | ||
| "no-console": "error", | ||
| "@typescript-eslint/no-empty-object-type": [ | ||
| "error", | ||
| { | ||
| allowInterfaces: "with-single-extends", | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
| eslintConfigPrettier, | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
In fp-ts 2.16.11 and io-ts 2.2.22, what are the TypeScript signatures of Either.chain, Either.chainW, and Either.flatMap? When combining Either<EvolutionError, A> with codec.decode from io-ts (Either<t.Errors, B>), which combinator preserves both left error types?💡 Result:
fp-ts
Either(v2.16.11) signatures[1]
[2]
[3]
io-ts
decode(v2.2.22) result type[4]
Which combinator preserves both left error types?
If you have:
Either<EvolutionError, A>andcodec.decode(...) : Either<t.Errors, B>…the combinator that preserves both Left error types is
Either.chainW(equivalently,Either.flatMap), yielding:Either<EvolutionError | t.Errors, B>.Using plain
Either.chainforces the sameEon both sides, so it won’t keepEvolutionErrorandt.Errorsas a union. [1][2][3]Sources:
[1] (gcanti.github.io)
[2] (gcanti.github.io)
[3] (gcanti.github.io)
[4] (jsdocs.io)
Citations:
🏁 Script executed:
Repository: toolsplus/json-evolutions
Length of output: 866
Replace
E.chain(codec.decode)withE.chainW(codec.decode)orE.flatMap(codec.decode)in code examples.The examples use
E.chain(codec.decode)whereevolve()returnsEither<EvolutionError, A>andcodec.decodereturnsEither<t.Errors, B>. In fp-ts 2.16.11,Either.chainrequires the left type parameterEto be identical on both sides, so this won't type-check. UseEither.chainWorEither.flatMapinstead, which merge the left types into a union:Either<EvolutionError | t.Errors, B>.Also applies to: lines 88, 151-155
🤖 Prompt for AI Agents