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

Test against newest TS versions #28

Merged
merged 8 commits into from May 17, 2021
Merged

Test against newest TS versions #28

merged 8 commits into from May 17, 2021

Conversation

andyrooger
Copy link
Owner

TS 3.9 as well as 4.0 and 4.2.

Due to microsoft/TypeScript#42712 this means a bunch of changes to tests to avoid loading the plugins as local names.

This also changes the order warnings slightly so that we only find the plugin by exact package name now. So warnings will no longer be shown if the plugin is used in the wrong order via a local path or an alias.

Loading plugins by path is blocked in newer TS versions for security reasons. Convert the test
plugins to packages and install them locally so we can include them in the tsconfig by name.
Moved fake plugin packages and various typescript versions to a package.json in the workspace. This
is installed before running tests and means we can also include the main plugin by name
Newer versions of TS only allow plugins to be specified by package name. Dropped the tests and the
code for guessing when the plugin is included via a local path. This will make no difference to
anyone using the plugin normally via npm, and won't make any difference to properly set up
projects.
Since we cannot load the plugin by filepath in newer TS versions, and we can't alias a package from
a local path, it's hard to install the plugin with a different name and generate warnings in the
tests. Added it awkwardly as a new name todo this.
Moved the default TS dependency to the project root to work around issues with packages that have
peer deps being installed as local folders. Adjusted stored paths to compensate. Included TS as a
peer dep for the dummy plugins that need it.
@andyrooger andyrooger merged commit 972ccf7 into master May 17, 2021
@andyrooger andyrooger deleted the update-ts branch May 17, 2021 00:35
@github-actions
Copy link

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant