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

Fix the examples #205

Merged
merged 1 commit into from
Dec 9, 2024
Merged

Fix the examples #205

merged 1 commit into from
Dec 9, 2024

Conversation

remcohaszing
Copy link
Member

Since the migration to TypeScript, examples had to be adjusted. The SDK now uses named exports. Also the SDK needs to be built before examples can be run. This is now displayed on top of the example instructions.

Since the SDK now used package exports, the examples can now import the package using its name instead of relative imports.

Some ESLint warnings have been disabled for the examples.

Incorrect paths to example fixtures have been fixed.

The examples are now type-checked using JSDoc based type annotations.

Closes #204

Since the migration to TypeScript, examples had to be adjusted. The SDK
now uses named exports. Also the SDK needs to be built before examples
can be run. This is now displayed on top of the example instructions.

Since the SDK now used package exports, the examples can now import the
package using its name instead of relative imports.

Some ESLint warnings have been disabled for the examples.

Incorrect paths to example fixtures have been fixed.

The examples are now type-checked using JSDoc based type annotations.

Closes #204
@remcohaszing remcohaszing requested review from kvz and Acconut December 6, 2024 14:22
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.75%. Comparing base (4daf1c5) to head (2875a6d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #205   +/-   ##
=======================================
  Coverage   68.75%   68.75%           
=======================================
  Files           6        6           
  Lines         624      624           
  Branches      123      123           
=======================================
  Hits          429      429           
  Misses        195      195           
Flag Coverage Δ
unittests 68.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@Acconut Acconut left a comment

Choose a reason for hiding this comment

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

Thank you for this quick PR! It looks good to me and I just have a minor question.

authSecret: /** @type {string} */ (process.env.TRANSLOADIT_SECRET),
// authKey: /** @type {string} */ (process.env.API2_SYSTEMTEST_AUTH_KEY),
// authSecret: /** @type {string} */ (process.env.API2_SYSTEMTEST_SECRET_KEY),
// endpoint: /** @type {string} */ ('https://api2-vbox.transloadit.com'),
Copy link
Member

Choose a reason for hiding this comment

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

The three values that are commented out are the result from internal from other repositories and don't serve a purpose for our users. Should we just remove them here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I kept it as-is, but I agree this should probably be removed.

@remcohaszing remcohaszing merged commit 9bf67d4 into main Dec 9, 2024
9 checks passed
@remcohaszing remcohaszing deleted the fix-examples branch December 9, 2024 14:48
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.

Instructions for running examples don't work
4 participants