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

feature/issue 1424 built in TypeScript support #1433

Merged
merged 13 commits into from
Mar 8, 2025

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Mar 5, 2025

Related Issue

resolves #1424

See this repo for a working / reference implementation

Documentation

  1. Document Greenwood types and first party TypeScript support www.greenwoodjs.dev#188

Summary of Changes

  1. Add support for Type stripping with amaro sucrase with tsc fallback in Greenwood
  2. Add support for TS Greenwood config / plugins / etc
  3. Add top level types field to all package.json files (primarily to get the TS badge on NPM)
  4. Added test cases and GitHub Actions for TypeScript
  5. Refactor CSS Modules plugin to re-use Greenwood plugins before invoking acorn
  6. "Soft" deprecates the TypeScript plugin

TODO

  1. Type Enhancements
  2. Double check useTsc is being used correctly / excluded in plugin and custom loaders handling
  3. Sort out GitHub Actions dependency / NodeJS version issues
    • amaro requires Node >=22.x
    • Puppeteer failing to install?
  4. Track in single NodeJS engines issue - stabilize to a single minimum NodeJS LTS version for engines #1379
  5. Do we need a top level types field in package.json to get the TS badge on npm? - yes, https://github.blog/changelog/2020-12-16-npm-displays-packages-with-bundled-typescript-declarations/
  6. (nice to have / new issue) auto generate types / JSDoc?
  7. (nice to have / new issue) config error message test cases not actually running / failing?

@thescientist13 thescientist13 added documentation Greenwood specific docs CLI Types Requires type definition related work / documentation labels Mar 5, 2025
@thescientist13 thescientist13 self-assigned this Mar 5, 2025
@thescientist13 thescientist13 added Plugins Greenwood Plugins SSR breaking feature New feature or request labels Mar 5, 2025
@thescientist13 thescientist13 merged commit 87a6230 into master Mar 8, 2025
12 checks passed
@thescientist13 thescientist13 deleted the feature/issue-1424-built-in-typescript-support branch March 8, 2025 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking CLI documentation Greenwood specific docs feature New feature or request Plugins Greenwood Plugins SSR Types Requires type definition related work / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Built-In TypeScript support
1 participant