We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Specifically when importing a sub-path of a package, it seems that yarn 2's TSC patch is not respecting typesVersions.
For example, importing @jest/types/build/Config should be remapped to @jest/types/build/ts3.4/Config https://unpkg.com/@jest/[email protected]/package.json (for v25)
@jest/types/build/Config
@jest/types/build/ts3.4/Config
Fixed by: arcanis/TypeScript#5 #2215
To Reproduce
const {promises: {writeFile}} = require(`fs`); await packageJsonAndInstall({ devDependencies: { [`@types/node`]: `latest`, [`@jest/types`]: `25`, [`typescript`]: `3.7.5` } }); await writeFile(`index.ts`, ` export {}; `); await expect(yarn(`tsc`, `index.ts`)).resolves.toBe(''); await writeFile(`index.ts`, ` import * as Config from "@jest/types/build/Config"; `); await expect(yarn(`tsc`, `index.ts`)).resolves.toBe('');
Screenshots
If applicable, add screenshots to help explain your problem.
Environment if relevant (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
This issue reproduces on master:
Error: expect(received).resolves.toBe() Received promise rejected instead of resolved Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js tsc index.ts .yarn/cache/@jest-types-npm-25.5.0-45f0640591-33ad68320e.zip/node_modules/@jest/types/build/Config.d.ts(8,13): error TS1005: '=' expected. .yarn/cache/@jest-types-npm-25.5.0-45f0640591-33ad68320e.zip/node_modules/@jest/types/build/Config.d.ts(8,32): error TS1005: ';' expected. .yarn/cache/@jest-types-npm-25.5.0-45f0640591-33ad68320e.zip/node_modules/@jest/types/build/Config.d.ts(9,13): error TS1005: '=' expected. .yarn/cache/@jest-types-npm-25.5.0-45f0640591-33ad68320e.zip/node_modules/@jest/types/build/Config.d.ts(9,36): error TS1005: ';' expected. ] at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0ac41999f0.zip/node_modules/expect/build/index.js:138:15) at module.exports (evalmachine.<anonymous>:20:7) at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13 at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16) at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12) at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-63f998598d.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38) at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-a57989414f.zip/node_modules/clipanion/lib/advanced/Command.js:161:26) at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-a57989414f.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24) at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-a57989414f.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
Specifically when importing a sub-path of a package, it seems that yarn 2's TSC patch is not respecting typesVersions.
For example, importing
@jest/types/build/Config
should be remapped to@jest/types/build/ts3.4/Config
https://unpkg.com/@jest/[email protected]/package.json (for v25)Fixed by:
arcanis/TypeScript#5
#2215
To Reproduce
Reproduction
Screenshots
If applicable, add screenshots to help explain your problem.
Environment if relevant (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: