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

Add optional peer dependency for typescript #985

Merged
merged 1 commit into from Mar 15, 2022

Conversation

willbuckingham
Copy link
Contributor

Based on conversation in #975

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 16, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cb3ef87:

Sandbox Source
MSW React Configuration

Copy link
Member

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

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

Hey, @willbuckingham. Thank you for making this improvement happen! I've left a few thoughts and would love to hear your opinion on them.

package.json Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Copy link
Member

@kettanaito kettanaito 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 the great work on this, @willbuckingham. I've left one comment regarding the TypeScript version range given my latest findings of how TS is versioned. Would love to hear your opinion on the suggestions.

kettanaito
kettanaito previously approved these changes Nov 23, 2021
Copy link
Member

@kettanaito kettanaito 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, @willbuckingham!
Let's see if the smoke tests pass, there have been some issues with them on this branch.

@kettanaito
Copy link
Member

Some tests fail reliably with this change. I'd have to take a look at what's causing this. There are no installation warnings due to missing typescript dependency, all examples (which are used for smoke tests) are written in JavaScript.

@amaury-hanser
Copy link

Hello, a quick comment to tell you that I'm interested in this PR.
I don't have the knowledge to fix it, but it's a PR that could be nice for the community. :)

@kettanaito
Copy link
Member

Hey, @amaury-hanser! Thank you for showing interest in this change.

The task itself is complete here but we've got some issues with the smoke tests failing. I don't see a direct relation between adding an optional dependency and any failing tests, but there must be something we're missing.

I've rebased this branch to use our recent GitHub Actions CI. Let's see how the build goes.

@kettanaito
Copy link
Member

This CI will pass now as I've removed smoke tests from the pull request jobs. It still fails the smoke tests, which would be nice to investigate.

@kettanaito kettanaito mentioned this pull request Mar 15, 2022
1 task
@kettanaito kettanaito force-pushed the patch-1 branch 2 times, most recently from b0c5bf2 to 50670ca Compare March 15, 2022 11:57
@kettanaito
Copy link
Member

This is likely to fail smoke tests. My initial guess is that the examples are rather outdated and it may force exceptions during the installation of MSW (although TS is marked as an optional dependency).

@@ -141,6 +141,14 @@
"webpack": "^5.68.0",
"webpack-dev-server": "^3.11.2"
},
"peerDependencies": {
"typescript": "4.2.x"
Copy link
Member

Choose a reason for hiding this comment

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

Since we are about to merge #1073 (path parameter inference), I fail to remember which version of TypeScript added that feature.

Copy link
Member

Choose a reason for hiding this comment

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

The pull request description mentions 4.1. Great!

@kettanaito kettanaito merged commit fbbcf6c into mswjs:main Mar 15, 2022
kettanaito pushed a commit that referenced this pull request May 17, 2022
@kettanaito
Copy link
Member

Released: v0.40.0 🎉

This has been released in v0.40.0!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

@piotr-cz
Copy link
Contributor

I'm not able to update to v0.40.0 because of dependency conflict (I have already installed typescript@^4.6.4):

npm output:

Could not resolve dependency:
peerOptional typescript@"4.2.x" from msw@0.40.0
node_modules/msw
  msw@"*" from the root project
Conflicting peer dependency: typescript@4.2.4
node_modules/typescript
  peerOptional typescript@"4.2.x" from msw@0.40.0
  node_modules/msw
    msw@"*" from the root project

@kettanaito
Copy link
Member

Please see the discussion in #1241.

@kettanaito kettanaito mentioned this pull request Aug 27, 2022
4 tasks
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.

None yet

4 participants