Skip to content

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Oct 22, 2022

Summary
We use a recent TypeScript version to build maxGraph but applications that integrates it may be forced to use old TypeScript versions.
We never explain what is the minimum TypeScript version requires to use maxGraph. The changes proposed here are a first step to make this information available.
It is only informative for now (mentioned in the README) and the minimum TypeScript version is tested in the ts-support package (part of the 'build' GitHub workflow).

Notice that I only tested with TypeScript 3.8 (and greater) but the maxGraph types provided in the npm package may work with older TypeScript versions.

Description for the changelog
Set the minimum TypeScript requirement to version 3.8

Other info
I said that this Pull Request is a first step because it is possible to make the build chain of the application integrating maxGraph aware of the TypeScript version requirements.
It starts by declaring the minimum version in the package.json file.

microsoft/TypeScript#32166 provides detailed information about how to enforce this with all TypeScript versions and workarounds to get more explicit error messages when the version is too old.

I can work on implementing this improvements later once this Pull Request has been merged.

The TypeScript version is tested in the `ts-support` package.
@tbouffard tbouffard added the documentation Improvements or additions to documentation label Oct 22, 2022
@tbouffard tbouffard requested review from junsikshim and mcyph October 22, 2022 10:11
@tbouffard tbouffard marked this pull request as ready for review October 22, 2022 10:12
@tbouffard
Copy link
Member Author

#129 introduces a shared TypeScript configuration. I suggest we don't use it in the new package that tests the minimum TypeScript supported version to avoid any side effects of the shared configuration.

With this test package, we want to ensure that external applications can work with this TS version, so it is better to mimic such applications as much as possible. And so, to not depend on resources of maxGraph project.

@tbouffard tbouffard merged commit 27f75a5 into development Nov 7, 2022
@tbouffard tbouffard deleted the chore/minimal_TS_version_supported branch November 7, 2022 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant