codemodsquad / jscodeshift-find-imports

find imported/required identifiers with jscodeshift
MIT License
12 stars 3 forks source link

Test and add jscodeshift 0.12.0 and 0.13.0 in `peerDependencies`? #32

Closed trivikr closed 2 months ago

trivikr commented 2 years ago

Is your feature request related to a problem? Please describe.

The following warning is shown when trying to use jscodeshift-find-imports in a project which uses jscodeshift >= 0.12.0

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: jscodeshift-find-imports@2.0.4
npm WARN Found: jscodeshift@0.13.1
npm WARN node_modules/aws-sdk-js-codemod/node_modules/jscodeshift
npm WARN   jscodeshift@"0.13.1" from aws-sdk-js-codemod@0.2.2
npm WARN   node_modules/aws-sdk-js-codemod
npm WARN     aws-sdk-js-codemod@"*" from the root project
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer jscodeshift@"^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0" from jscodeshift-find-imports@2.0.4
npm WARN node_modules/aws-sdk-js-codemod/node_modules/jscodeshift-find-imports
npm WARN   jscodeshift-find-imports@"2.0.4" from aws-sdk-js-codemod@0.2.2
npm WARN   node_modules/aws-sdk-js-codemod
npm WARN 
npm WARN Conflicting peer dependency: jscodeshift@0.11.0
npm WARN node_modules/jscodeshift
npm WARN   peer jscodeshift@"^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0" from jscodeshift-find-imports@2.0.4
npm WARN   node_modules/aws-sdk-js-codemod/node_modules/jscodeshift-find-imports
npm WARN     jscodeshift-find-imports@"2.0.4" from aws-sdk-js-codemod@0.2.2
npm WARN     node_modules/aws-sdk-js-codemod

Describe the solution you'd like

Add jscodeshift 0.12.0 and 0.13.0 in peerDependencies if jscodeshift-find-imports is compatible. I've tested it with jscodeshift@0.13.1 in https://github.com/trivikr/aws-sdk-js-codemod, and didn't find any issues for its specific use cases.

Changelog for jscodeshift https://github.com/facebook/jscodeshift/blob/main/CHANGELOG.md

Describe alternatives you've considered

Additional context

The warning is currently shown when user installs aws-sdk-js-codemod

trivikr commented 2 years ago

I posted an example PR at https://github.com/codemodsquad/jscodeshift-find-imports/pull/33 which can be merged if no additional testing is needed.

jedwards1211 commented 3 months ago

Sorry I completely missed this, I must have been distracted. I think we should just change the peer dep version to >=0.12.0 <1 for now (it's really inconvenient to try to keep up with 0.x versioning, I wish people wouldn't use it)

jedwards1211 commented 2 months ago

Okay this is released in v2.0.5!