Skip to content

Comments

Rewrite to Typescript#6

Merged
fdebijl merged 3 commits intomasterfrom
feature/typescript
Jun 30, 2025
Merged

Rewrite to Typescript#6
fdebijl merged 3 commits intomasterfrom
feature/typescript

Conversation

@fdebijl
Copy link
Member

@fdebijl fdebijl commented Jun 20, 2025

Typescriptify the repo and upgrade coverage to a 100%

Changes:

  • Remove makefiles
  • Move source files from lib to src
  • Rewrite source files to Typescript
  • Expand test coverage to 100%
  • Enable dependabot

[sc-62619]

@codecov
Copy link

codecov bot commented Jun 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (0809ea7) to head (19c6604).
Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##           master        #6       +/-   ##
============================================
+ Coverage   71.18%   100.00%   +28.81%     
============================================
  Files           3         2        -1     
  Lines          59        60        +1     
  Branches        0        13       +13     
============================================
+ Hits           42        60       +18     
+ Misses         17         0       -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fdebijl fdebijl requested a review from steffansluis June 20, 2025 15:25
@fdebijl fdebijl requested a review from Copilot June 30, 2025 13:22
Copy link

Copilot AI left a 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 converts the repo to TypeScript, restructures source and test files, and upgrades test coverage to 100% while removing legacy JavaScript and makefile configurations. Key changes include:

  • Conversion of all core code and tests from JavaScript to TypeScript.
  • Removal of legacy build scripts and makefiles.
  • Updated package configuration and dependency management (including Dependabot).

Reviewed Changes

Copilot reviewed 28 out of 30 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/strategy.test.ts New TypeScript tests for strategy functionality
test/strategy.test.js Removed legacy JS tests
test/strategy.profile.test.ts New TS tests for profile parsing and error handling
test/strategy.profile.test.js Removed legacy JS profile tests
test/strategy.oauth.test.ts New TS tests for OAuth configuration and token retrieval
test/strategy.integration.test.ts New integration tests for Passport strategy usage
test/profile.test.js Removed legacy JS profile tests
test/package.test.js Removed legacy package tests
test/data/* New test data files for profile examples
support/mk/* Removed legacy makefiles and build scripts
src/strategy.ts Rewritten Brightspace strategy in TypeScript
src/index.ts Updated entry point to export the new TypeScript strategy
package.json Updated version, script commands, and dependency management
lib/* Removed legacy JavaScript implementation files
eslint.config.mjs Added new ESLint configuration tailored for TypeScript projects
README.md Updated instructions and installation steps
Makefile Removed legacy makefile
.nycrc.json Updated NYC configuration for TypeScript code coverage
.github/workflows/node.yml Added build step in GitHub Actions workflow
.github/.dependabot.yml Added Dependabot configuration
Comments suppressed due to low confidence (1)

test/strategy.test.ts:1

  • [nitpick] Review the necessity of the @ts-nocheck comment; removing it could help catch type errors in tests and improve overall type safety.
// @ts-nocheck


this.options = options;

console.log(`Configuring strategy with options:`, this.options);
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider removing or replacing the console.log statement with a proper logging framework for production use to avoid exposing sensitive configuration data.

Copilot uses AI. Check for mistakes.
@fdebijl fdebijl merged commit 4db4d22 into master Jun 30, 2025
3 checks passed
@fdebijl fdebijl deleted the feature/typescript branch June 30, 2025 13:30
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