chore: modernize package.json and TypeScript configuration#150
Conversation
There was a problem hiding this comment.
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.
It's a parser, not a code generator, isn't it?
There was a problem hiding this comment.
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.
Yes, but since it's not a code generator, these keywords shouldn't be present IMO.
There was a problem hiding this comment.
No problem, I'll remove them
2733420 to
936896e
Compare
soyuka
left a comment
There was a problem hiding this comment.
nice this brings things forward thanks!
…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
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.tsbuildinfoon buildfileslist (removesrc, add LICENSE, include only README.md)exportsand add type definitions🚨 test
@jest/globalsdev dependency🧹 chore
sort-package-jsonBlocked by #149