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

Remove dependency on isomorphic-fetch #1616

Merged
merged 5 commits into from
Aug 2, 2023

Conversation

Yushmanth-reddy
Copy link
Contributor

@Yushmanth-reddy Yushmanth-reddy commented Jul 31, 2023

Which problem is this PR solving?

Short description of the changes

  • remove dependency on isomorphic-fetch

Signed-off-by: Yushmanth <pali@pali-reddy.com>
Signed-off-by: Yushmanth <pali@pali-reddy.com>
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (f559122) 96.01% compared to head (3d79af3) 96.01%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1616   +/-   ##
=======================================
  Coverage   96.01%   96.01%           
=======================================
  Files         242      242           
  Lines        7559     7559           
  Branches     1984     1984           
=======================================
  Hits         7258     7258           
  Misses        301      301           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

package.json Outdated
Comment on lines 28 to 30
"dependencies": {
"isomorphic-fetch": "3.0.0"
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was that needed to be moved from devDependencies to dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after changing scripts/get-changelog.js there was an error ('isomorphic-fetch' should be listed in the project's dependencies, not devDependencies). So I modified it and it worked fine.

@@ -17,11 +17,11 @@
// This code will generate changelog entries

const { readFile } = require('fs');
const { promisify } = require('util');
// eslint-disable-next-line import/no-extraneous-dependencies
const fetch = require('isomorphic-fetch');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this dep altogether? It's a polyfill for browsers, but we're using this script only with node.js

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yurishkuro Yes, it can be removed. @Yushmanth-reddy Here's some instructions to go ahead

// ... (rest of the code)

const { readFile } = require('fs').promises; // Use native fs.promises.readFile

// ... (rest of the code)

// Remove the following line since 'promisify' is not required anymore
// const { promisify } = require('util');

// ... (rest of the code)

// Modify this function to use native fs.promises.readFile
// const readFilePromise = promisify(readFile);
// Instead, use the following line to define readFilePromise
// const readFilePromise = readFile;

// ... (rest of the code)

// No other changes are required in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thanks @anshgoyalevil

Signed-off-by: Yushmanth <pali@pali-reddy.com>
@yurishkuro
Copy link
Member

It's still not removed

Signed-off-by: Yushmanth <pali@pali-reddy.com>
@Yushmanth-reddy
Copy link
Contributor Author

Don't know why the unit test is failed but the command "yarn install --frozen-lockfile" is running successfully in my local setup.

@yurishkuro yurishkuro changed the title rectified errors and updated package.json Remove dependency on isomorphic-fetch Aug 1, 2023
@Yushmanth-reddy
Copy link
Contributor Author

@yurishkuro Should I make any changes?

@yurishkuro yurishkuro merged commit ffe3f7f into jaegertracing:main Aug 2, 2023
8 checks passed
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.

None yet

3 participants