Skip to content

Conversation

@aron
Copy link
Contributor

@aron aron commented Jan 11, 2024

I'm currently in the process of spending some spare time improving the structure of this repository. Ideally I want us to get to the point where we have three things:

  1. a native esm friendly version of the repository (not just relying on the nodejs dual module system)

  2. the index.d.ts generated automatically using tsc --emitDeclarationOnly.

  3. a singleton instance of Replicate as the default export for the package so our examples can be as simple as:

    const replicate = require("replicate");
    replicate.run(...);

    I'll follow up on this one in a second PR with more details and we'll still retain the constructor as a way of customizing the library.

This commit adds some basic integration tests and a new ci workflow for our three common runtimes, nodejs with commonjs and esm as well as TypeScript. The aim here is to ensure that the interface is consistent even if we refactor/restructure the package.

The change does require a REPLICATE_API_TOKEN to be available in the CI environment which I've added.

@aron aron force-pushed the integration-test-suite branch 2 times, most recently from 4c186d5 to 06a4f58 Compare January 11, 2024 22:18
This commit adds some basic integration tests and a new ci workflow
for our three common runtimes, nodejs with commonjs and esm as well
as TypeScript. The aim here is to ensure that the interface is
consistent even if we refactor/restructure the package.

The change does require a REPLICATE_API_TOKEN to be available in
the CI environment.
@aron aron force-pushed the integration-test-suite branch from 06a4f58 to a4d019a Compare January 11, 2024 22:23
@zeke
Copy link
Member

zeke commented Jan 12, 2024

singleton instance

😍

Copy link
Member

@zeke zeke left a comment

Choose a reason for hiding this comment

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

Love this!

I added a few suggestions for renamed test inputs, partly for fun, but also to make them more distinguishable from each other in case of possible test failures.

@aron aron merged commit c26c3f0 into main Jan 13, 2024
@aron aron deleted the integration-test-suite branch January 13, 2024 21:49
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.

3 participants