-
-
Notifications
You must be signed in to change notification settings - Fork 74
chore: modernize package.json and TypeScript configuration #150
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
base: pnpm
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR modernizes the project configuration by updating import paths, enhancing TypeScript and Jest configurations, and refining package metadata. Key changes include:
- Updating import statements to include file extensions for consistency with ESM.
- Refactoring package.json to improve structure, add type definitions, and update dependency management.
- Modernizing the Jest configuration to use the new ESM preset and TypeScript type assertions.
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/openapi3/parseOpenApi3Documentation.ts | Updated import path to include file extension. |
src/hydra/fetchJsonLd.ts | Updated import path to include file extension. |
package.json | Refactored JSON structure, updated scripts, and enhanced dependency configuration. |
jest.config.ts | Replaced legacy configuration with the new ESM preset and TS type checking using satisfies. |
.github/workflows/ci.yml | Refined CI workflow triggers for better branch filtering. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
package.json
Outdated
"codegen", | ||
"scaffolding" |
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.
It's a parser, not a code generator, isn't it?
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.
Not its not, but it can be used to build one, like said in the readme:
This data structure can then be used for various tasks such as creating smart API clients, scaffolding code or building administration interfaces.
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.
Yes, but since it's not a code generator, these keywords shouldn't be present IMO.
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.
No problem, I'll remove them
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.
done
b99b711
to
2733420
Compare
…now inlined in source maps add LICENSE and include only README.md
…x to lint:fix, rename watch to build:watch also remove tsconfig.tsbuildinfo on build
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.
nice this brings things forward thanks!
What’s in this PR?
tsconfig.build.json
.module: "NodeNext"
and modern ES2022 targets, giving consumers first-class ESM support and smaller, helper-free output.Sources consulted
https://www.totaltypescript.com/tsconfig-cheat-sheet
https://www.typescriptlang.org/tsconfig
https://2ality.com/2025/01/tsconfig-json.html
https://github.com/sindresorhus/tsconfig/blob/main/tsconfig.json
tsc --init update 2024 microsoft/TypeScript#58420
tsc --init update microsoft/TypeScript#61813
Changelog
🐛 fix
📦 build
tsconfig.tsbuildinfo
on buildfiles
list (removesrc
, add LICENSE, include only README.md)exports
and add type definitions🚨 test
@jest/globals
dev dependency🧹 chore
sort-package-json
Blocked by #149