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 require path as it's been failing to import as a dependency #183

Closed
wants to merge 2 commits into from

Conversation

crs1138
Copy link

@crs1138 crs1138 commented Aug 23, 2023

The @testing-library/jest-dom requires the cssTools() from @adobe/css-tools:

var cssTools = require('@adobe/css-tools');

And it's been failing due to recent changes. This fixes the issue.

Description

Related Issue

#182

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

The `@testing-library/jest-dom` requires the `cssTools()` from @adobe/css-tools:

```js
var cssTools = require('@adobe/css-tools');
```

And it's been failing due to recent changes. This fixes the require.
@crs1138 crs1138 requested a review from hsavit1 August 24, 2023 06:27
@holblin
Copy link

holblin commented Aug 24, 2023

Hi @crs1138 and @hsavit1 ,

Thanks a lot for sharing your current findings and help contribute.
I looked at your changes and didn't understand how it fixes the problem you describe.

From the current version on the branch main, this file "require": "./dist/cjs/cssTools.js" will not be generated. As you can see below:
Screen Shot 2023-08-24 at 1 59 14 PM
And on npmjs too: https://www.npmjs.com/package/@adobe/css-tools?activeTab=code

I did some tests and my understanding is that everything is correct:
Screen Shot 2023-08-24 at 1 56 27 PM

Could that be linked to an earlier version? Can you check your package-lock.json or your yarn.lock to check the version used? (In that case yarn upgrade --deep would fix the issue. I don't know an equivalent command for npm)
From my current understanding, I think you might not use the last version which fixes #107 and #116. While I'm not an expert in these domains, I believe version 4.3.1 should work and fix the issues you could see.

If it is the case, I think we should close this PR and maybe bump the semver to the last version on https://github.com/testing-library/jest-dom/blob/b959a681386164bf5d64f5b2b9c8bf891301bc12/package.json#L83. I will let you do it except if you would prefer me to make that PR :-)

@crs1138
Copy link
Author

crs1138 commented Aug 26, 2023

My issue got resolved another way.

@crs1138 crs1138 closed this Aug 26, 2023
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