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 missing ts-jest in res-to-ts when running unit tests #1716

Closed
Tracked by #1698
eventualbuddha opened this issue Apr 20, 2022 · 1 comment · Fixed by #1717
Closed
Tracked by #1698

Fix missing ts-jest in res-to-ts when running unit tests #1716

eventualbuddha opened this issue Apr 20, 2022 · 1 comment · Fixed by #1717
Assignees

Comments

@eventualbuddha
Copy link
Collaborator

No description provided.

@eventualbuddha eventualbuddha changed the title Fix missing in , , when running unit tests Fix missing ts-jest in res-to-ts when running unit tests Apr 20, 2022
@eventualbuddha eventualbuddha self-assigned this Apr 20, 2022
@eventualbuddha
Copy link
Collaborator Author

eventualbuddha commented Apr 20, 2022

This appears to be due to jest-resolve's use of graceful-fs, which had a bug (fixed in isaacs/node-graceful-fs#220) when stat returned null. jest-resolve was updated to use the fixed version of graceful-fs in jestjs/jest#11749, but for some reason pnpm is still using graceful-fs@4.2.4 for jest-resolve. Will report back once I've looked into why.

I was able to confirm that this fixes it by modifying statFixSync in polyfills.js in graceful-fs@4.2.4 to use the patch:

      if (stats) {
        if (stats.uid < 0) stats.uid += 0x100000000
        if (stats.gid < 0) stats.gid += 0x100000000
      }

eventualbuddha added a commit that referenced this issue Apr 20, 2022
Ensures that the version of `graceful-fs` in use includes this fix: isaacs/node-graceful-fs#220. This was breaking `jest-resolve` for reasons I don't fully understand, making it unable to load tests for `res-to-ts`.

I wasn't able to figure out how to make `pnpm` update `graceful-fs` to the version I wanted as a transitive dependency. I tried `pnpm update graceful-fs@4.2.10` and similar, but none worked. Instead, I manually updated the lockfile to point to `graceful-fs: 4.2.10` and removed the `graceful-fs` entries, then ran `pnpm install` to make `pnpm` fix the broken lockfile.

Fixes #1716
eventualbuddha added a commit that referenced this issue Apr 20, 2022
Ensures that the version of `graceful-fs` in use includes this fix: isaacs/node-graceful-fs#220. This was breaking `jest-resolve` for reasons I don't fully understand, making it unable to load tests for `res-to-ts`.

I wasn't able to figure out how to make `pnpm` update `graceful-fs` to the version I wanted as a transitive dependency. I tried `pnpm update graceful-fs@4.2.10` and similar, but none worked. Instead, I manually updated the lockfile to point to `graceful-fs: 4.2.10` and removed the `graceful-fs` entries, then ran `pnpm install` to make `pnpm` fix the broken lockfile.

Fixes #1716
eventualbuddha added a commit that referenced this issue Apr 20, 2022
Ensures that the version of `graceful-fs` in use includes this fix: isaacs/node-graceful-fs#220. This was breaking `jest-resolve` for reasons I don't fully understand, making it unable to load tests for `res-to-ts`.

I wasn't able to figure out how to make `pnpm` update `graceful-fs` to the version I wanted as a transitive dependency. I tried `pnpm update graceful-fs@4.2.10` and similar, but none worked. Instead, I manually updated the lockfile to point to `graceful-fs: 4.2.10` and removed the `graceful-fs` entries, then ran `pnpm install` to make `pnpm` fix the broken lockfile.

Fixes #1716
eventualbuddha added a commit that referenced this issue Apr 21, 2022
Ensures that the version of `graceful-fs` in use includes this fix: isaacs/node-graceful-fs#220. This was breaking `jest-resolve` for reasons I don't fully understand, making it unable to load tests for `res-to-ts`.

I wasn't able to figure out how to make `pnpm` update `graceful-fs` to the version I wanted as a transitive dependency. I tried `pnpm update graceful-fs@4.2.10` and similar, but none worked. Instead, I manually updated the lockfile to point to `graceful-fs: 4.2.10` and removed the `graceful-fs` entries, then ran `pnpm install` to make `pnpm` fix the broken lockfile.

Fixes #1716
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 a pull request may close this issue.

1 participant