fix: add @types dependencies for tapable + webpack#281
Conversation
Fix this error when using strict package managers like pnpm/yarn pnp:
ERROR in /path/to/project/node_modules/.registry.npmjs.org/fork-ts-checker-webpack-plugin/1.2.0/node_modules/fork-ts-checker-webpack-plugin/lib/index.d.ts(1,26):
TS7016: Could not find a declaration file for module 'webpack'. '/path/to/project/node_modules/.registry.npmjs.org/webpack/4.30.0/node_modules/webpack/lib/webpack.js' implicitly has an 'any' type.
Try `npm install @types/webpack` if it exists or add a new declaration (.d.ts) file containing `declare module 'webpack';`
ERROR in /path/to/project/node_modules/.registry.npmjs.org/fork-ts-checker-webpack-plugin/1.2.0/node_modules/fork-ts-checker-webpack-plugin/lib/index.d.ts(48,209):
TS7016: Could not find a declaration file for module 'tapable'. '/path/to/project/node_modules/.registry.npmjs.org/tapable/1.1.3/node_modules/tapable/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/tapable` if it exists or add a new declaration (.d.ts) file containing `declare module 'tapable';`
ERROR in /path/to/project/node_modules/.registry.npmjs.org/fork-ts-checker-webpack-plugin/1.2.0/node_modules/fork-ts-checker-webpack-plugin/lib/index.d.ts(48,253):
TS7016: Could not find a declaration file for module 'tapable'. '/path/to/project/node_modules/.registry.npmjs.org/tapable/1.1.3/node_modules/tapable/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/tapable` if it exists or add a new declaration (.d.ts) file containing `declare module 'tapable';`
|
Any idea why this says "This branch is out of sync with the base branch. It looks like there's still something not quite right with our setup .... Any ideas @piotr-oles / @phryneas? Are we safe to hit the "update" button or will that cause other problems? |
|
The only problem with "Update branch" will be that it will change the commit hash. There is one merge commit more on the master branch: e9ee9a from #275. I had to use a merge commit but that the last time it was used. Now merge commits are blocked and I believe that if we update this branch and merge with rebase it will work well 😀 |
It's hard to test travis deployment on protected branches - that's why we have to revert changes and use "all_branches: true" - specyfing more than one branch won't work.
We'll get there! So by the sounds of it, after this we'll be at the point where semantic release works without extra attention? 🤞 |
|
🎉 This PR is included in version 1.3.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
This PR is causing problems with non-node projects.
It is OK for node project, but for non-node project you have all the node typings which might cause build time TS error because of conflicting types. Would you consider moving the |
|
I'm not sure it would since you depend on webpack in the |
|
You're right.... Hmmmm... Not sure what to suggest here. No I suppose this could be worked around in But that is not a great default experience... I'm not too sure what to suggest here. Any ideas gratefully received ... |
|
Just to be sure - regular (non-PnP) installs would work without |
|
It just doesn't check these, as these only describe the .js files we're shipping and most users don't write their own code against these, so the .d.ts are never evaluated. I guess if we would Otherwise, we could just copy over the definition of Or we just don't ship our own type definitions at all. (Or only a select subset, like types for the options.. although those weren't part of the types until recently). That way, there would be not dependency as well. |
|
Or we could just mark the That way, only these two properties (which depend on Edit: not a good idea. |
the built .d.ts will no longer depend on @types/webpack and @types/tapable ✅ Closes: should resolve TypeStrong#281
|
I tried some different things and I think for now the hotfix with minimal changes is over in #287. Please take a look if this works for everyone! |
the built .d.ts will no longer depend on @types/webpack and @types/tapable ✅ Closes: should resolve #281
|
🎉 This issue has been resolved in version 1.3.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fix this error when using strict package managers like pnpm/yarn pnp: