pwa-kit icon indicating copy to clipboard operation
pwa-kit copied to clipboard

[QUESTION]: Peer dependency for typescript in @salesforce/pwa-kit-dev

Open ecRobertEngel opened this issue 2 years ago • 3 comments

Summary

Why is there a peer dependency for "typescript": "4.9.5" in @salesforce/pwa-kit-dev we are using the package with typescript 5 for months and it is working without issues. It is however very annoying to pass --legacy-peer-deps with every npm i . Can you take a look if this is still needed? It is nothing major but slightly annoying every time I run into it.

ecRobertEngel avatar Dec 09 '23 16:12 ecRobertEngel

Would still be great to remove this peer dependency and/or update the TS version in the base package.

Benefits of upgrading:

Performance and Simplicity:

Smaller, Faster, Simpler: TypeScript 5 has been rebuilt to be more efficient, resulting in faster build times and a smaller footprint. This translates to a smoother development experience and potentially improved runtime performance.

Improved Type-Checking: TypeScript 5 introduces various enhancements to its type-checking engine, enabling it to catch errors more accurately and efficiently.

New Features and Enhancements:

Decorators: TypeScript 5 fully implements the new ECMAScript decorators standard, offering a standardized and powerful way to modify classes, methods, and properties.

ESM Support: TypeScript 5 improves its support for ECMAScript modules (ESM) in Node.js and bundlers, simplifying the development of modern JavaScript projects.

Const Type Parameters: This feature allows you to declare type parameters as const, enabling more precise type inference and preventing unintended mutations.

Enum Improvements: TypeScript 5 enhances the behavior of enums, making them more type-safe and predictable.

JSDoc Enhancements: TypeScript 5 introduces new JSDoc tags and functionalities, allowing for better documentation and improved type inference from existing JavaScript code.

Ecosystem and Tooling: Stay Up-to-Date: Upgrading to TypeScript 5 ensures that your project is aligned with the latest JavaScript ecosystem developments and takes advantage of the latest tooling advancements.

Community Support: As the latest major version, TypeScript 5 enjoys active community support and will likely receive continued updates and improvements in the future.

timhettler avatar Jan 28 '25 17:01 timhettler

This issue has been linked to a new work item: W-17711068

git2gus[bot] avatar Jan 30 '25 16:01 git2gus[bot]

Thanks @timhettler @ecRobertEngel for providing information, I've created a ticket on our backlog to track this work

joeluong-sfcc avatar Jan 30 '25 16:01 joeluong-sfcc