From f310c02abad3812adf5e1506c3b2dc5caaa793db Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 4 Mar 2025 16:55:50 -0500 Subject: [PATCH] build: Drop the `whatwg-fetch` polyfill. This package polyfills the Fetch api but that API is now widely available so I don't think we need this package anymore. --- .../static/common/js/components/BlockBrowser/data/api/client.js | 1 - .../static/instructor/ProblemBrowser/data/api/client.js | 1 - .../support/static/support/jsx/entitlements/data/api/client.js | 1 - lms/static/js/student_account/AccountsClient.js | 1 - .../js/student_account/components/PasswordResetConfirmation.jsx | 1 - package-lock.json | 1 - package.json | 1 - 7 files changed, 7 deletions(-) diff --git a/common/static/common/js/components/BlockBrowser/data/api/client.js b/common/static/common/js/components/BlockBrowser/data/api/client.js index 2f00eaa08c..d8af3e20b0 100644 --- a/common/static/common/js/components/BlockBrowser/data/api/client.js +++ b/common/static/common/js/components/BlockBrowser/data/api/client.js @@ -1,5 +1,4 @@ import Cookies from 'js-cookie'; -import 'whatwg-fetch'; const COURSE_BLOCKS_API = '/api/courses/v1/blocks/'; diff --git a/lms/djangoapps/instructor/static/instructor/ProblemBrowser/data/api/client.js b/lms/djangoapps/instructor/static/instructor/ProblemBrowser/data/api/client.js index 1a15d44cc2..53f910c7bf 100644 --- a/lms/djangoapps/instructor/static/instructor/ProblemBrowser/data/api/client.js +++ b/lms/djangoapps/instructor/static/instructor/ProblemBrowser/data/api/client.js @@ -1,4 +1,3 @@ -import 'whatwg-fetch'; import Cookies from 'js-cookie'; const HEADERS = { diff --git a/lms/djangoapps/support/static/support/jsx/entitlements/data/api/client.js b/lms/djangoapps/support/static/support/jsx/entitlements/data/api/client.js index 0431298041..2e71653a82 100644 --- a/lms/djangoapps/support/static/support/jsx/entitlements/data/api/client.js +++ b/lms/djangoapps/support/static/support/jsx/entitlements/data/api/client.js @@ -1,4 +1,3 @@ -import 'whatwg-fetch'; import Cookies from 'js-cookie'; import { entitlementApi } from './endpoints'; diff --git a/lms/static/js/student_account/AccountsClient.js b/lms/static/js/student_account/AccountsClient.js index 6a8f8950fb..7c691bf88e 100644 --- a/lms/static/js/student_account/AccountsClient.js +++ b/lms/static/js/student_account/AccountsClient.js @@ -1,4 +1,3 @@ -import 'whatwg-fetch'; import Cookies from 'js-cookie'; const deactivate = (password) => fetch('/api/user/v1/accounts/deactivate_logout/', { diff --git a/lms/static/js/student_account/components/PasswordResetConfirmation.jsx b/lms/static/js/student_account/components/PasswordResetConfirmation.jsx index 4244d45b61..eca90ee84f 100644 --- a/lms/static/js/student_account/components/PasswordResetConfirmation.jsx +++ b/lms/static/js/student_account/components/PasswordResetConfirmation.jsx @@ -1,6 +1,5 @@ /* globals gettext */ -import 'whatwg-fetch'; import PropTypes from 'prop-types'; import React from 'react'; diff --git a/package-lock.json b/package-lock.json index 7ba85b2879..eff1ac2c6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,7 +72,6 @@ "webpack": "^5.90.3", "webpack-bundle-tracker": "0.4.3", "webpack-merge": "4.2.2", - "whatwg-fetch": "2.0.4", "which-country": "1.0.0" }, "devDependencies": { diff --git a/package.json b/package.json index c96a94f6f0..ea80c63b4d 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,6 @@ "webpack": "^5.90.3", "webpack-bundle-tracker": "0.4.3", "webpack-merge": "4.2.2", - "whatwg-fetch": "2.0.4", "which-country": "1.0.0" }, "devDependencies": {