Skip to content

Conversation

@AaronDDM
Copy link
Collaborator

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

AaronDDM added 4 commits July 11, 2025 13:56
- Add src/types.ts with comprehensive type exports
- Add nylas/types subpath export in package.json
- Export configuration types, resource parameter interfaces, and base classes
- Add types-usage examples showing how to use the new export
- Maintain 100% backwards compatibility with existing imports
- Fix AsyncListResponse async iteration pattern in analyzeMessagePatterns
- Use iterator directly instead of awaiting first, then iterating
- Add safety check for division by zero in average calculation
- Add async-iteration-test.ts demonstrating correct pattern
- Update README with new test file documentation
…ation

- Add automated src/types.ts generation via scripts/generateTypesIndex.js
- Integrate types generation into build process (prebuild hook)
- Add comprehensive release validation via scripts/validateRelease.js
- Add CI-friendly types validation via scripts/checkTypesUpToDate.js
- Implement npm version hooks (preversion, postversion) for quality gates
- Add GitHub Actions workflow for CI/CD validation
- Ensure types are always current and all tests pass before releases

Quality gates now validate:
- Types are up-to-date with codebase
- All tests pass
- Linting standards met
- Build integrity maintained
- Examples compile correctly
- Test coverage standards met

This prevents broken releases and ensures types stay synchronized
with the codebase automatically without manual maintenance.
- Remove src/types.ts and manual type generation infrastructure
- Delete examples/types-usage/ directory and all related examples
- Remove scripts/generateTypesIndex.js and scripts/checkTypesUpToDate.js
- Update package.json to remove './types' export and related scripts
- Update scripts/validateRelease.js to remove types validation
- Update .github/workflows/validate-types.yml to remove types validation step
- Add scripts/generateTypesViaApiExtractor.js as alternative implementation
- Maintain core quality gates: linting, testing, build validation, examples validation

The SDK returns to core functionality without additional types export.
Quality assurance mechanisms remain functional for essential validations.
@playerzero-ai
Copy link

playerzero-ai bot commented Jul 11, 2025

Pull Request Summary

  • New Script for TypeScript Interfaces:

    • Introduced generateTypesViaApiExtractor.js to automate TypeScript declaration file generation using Microsoft API Extractor.
    • Replaces manual regex parsing, enhancing accuracy and efficiency.
    • Configures API Extractor for generating both trimmed and untrimmed type files.
    • Creates a comprehensive types entry point file for various API components.
    • Implements a logging system for clear feedback during the generation process.
    • Ensures a clean build and checks API Extractor installation before running.
    • Outputs file sizes and highlights benefits of using API Extractor, improving developer experience.
  • New Script for Release Validation:

    • Introduced validateRelease.js to automate and ensure quality checks before version releases.
    • Logs messages with color coding for clarity and runs commands with feedback.
    • Validates build output by checking essential directories and files.
    • Optionally validates example compilations.
    • Automates linting, testing, building, and coverage checks.
    • Provides clear feedback on validation steps, improving release reliability.
  • Examples Configuration Update:

    • Updated tsconfig.json to target Node16 and changed module resolution to node16.
    • Enhances compatibility and performance with Node.js version 16.

Files Changed

File Name Summary
scripts/generateTypesViaApiExtractor.js Added a script to generate TypeScript declaration files using Microsoft API Extractor, replacing manual regex parsing. It configures API Extractor, creates a comprehensive types entry file, includes colored logging, checks for clean builds and API Extractor installation, and reports generated file sizes.
scripts/validateRelease.js Added a release validation script that runs linting, tests, build, and coverage checks, validates build outputs and examples, logs colored messages, and ensures all quality gates pass before version bumps to improve release reliability.
examples/tsconfig.json Updated module target to Node16 and module resolution to node16 for better compatibility with Node.js 16 module system.

View more in PlayerZero
updated: Jul 11 @ 08:54 PM UTC

@AaronDDM AaronDDM closed this Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants