Compare commits

..

1 Commits

Author SHA1 Message Date
mashal-m
9bb3df141e fix: removed derpeciated package codecov 2022-11-29 09:25:57 +05:00
17 changed files with 26953 additions and 4447 deletions

View File

@@ -1,6 +1,4 @@
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
ACCOUNT_PROFILE_URL=http://localhost:1995
ACCOUNT_SETTINGS_URL=http://localhost:1997
BASE_URL=localhost:8080 BASE_URL=localhost:8080
CREDENTIALS_BASE_URL=http://localhost:18150 CREDENTIALS_BASE_URL=http://localhost:18150
CSRF_TOKEN_API_PATH=/csrf/api/v1/token CSRF_TOKEN_API_PATH=/csrf/api/v1/token

View File

@@ -1,20 +0,0 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "label: " it tries to apply
# the label indicated in rest of comment.
# If the comment starts with "remove label: ", it tries
# to remove the indicated label.
# Note: Labels are allowed to have spaces and this script does
# not parse spaces (as often a space is legitimate), so the command
# "label: really long lots of words label" will apply the
# label "really long lots of words label"
name: Allows for the adding and removing of labels via comment
on:
issue_comment:
types: [created]
jobs:
add_remove_labels:
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master

View File

@@ -9,17 +9,18 @@ on:
jobs: jobs:
tests: tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Nodejs - name: Setup Nodejs
uses: actions/setup-node@v3 uses: actions/setup-node@v2
with: with:
node-version: ${{ env.NODE_VER }} node-version: ${{ matrix.node }}
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Validate package-lock.json changes - name: Validate package-lock.json changes

View File

@@ -10,4 +10,5 @@ on:
jobs: jobs:
version-check: version-check:
uses: openedx/.github/.github/workflows/lockfileversion-check-v3.yml@master uses: openedx/.github/.github/workflows/lockfileversion-check.yml@master

View File

@@ -12,12 +12,10 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v3 uses: actions/setup-node@v2
with: with:
node-version: ${{ env.NODE_VER }} node-version: 16
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Validate package-lock.json changes - name: Validate package-lock.json changes
@@ -33,7 +31,7 @@ jobs:
- name: Build - name: Build
run: npm run build run: npm run build
- name: Release - name: Release
uses: cycjimmy/semantic-release-action@v3 uses: cycjimmy/semantic-release-action@v2
with: with:
semantic_version: 16 semantic_version: 16
env: env:

View File

@@ -1,12 +0,0 @@
# This workflow runs when a comment is made on the ticket
# If the comment starts with "assign me" it assigns the author to the
# ticket (case insensitive)
name: Assign comment author to ticket if they say "assign me"
on:
issue_comment:
types: [created]
jobs:
self_assign_by_comment:
uses: openedx/.github/.github/workflows/self-assign-issue.yml@master

1
.nvmrc
View File

@@ -1 +0,0 @@
18

View File

@@ -1,9 +1,11 @@
export TRANSIFEX_RESOURCE = frontend-component-header transifex_resource = frontend-component-header
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA" transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA"
transifex_utils = ./node_modules/.bin/transifex-utils.js transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n i18n = ./src/i18n
transifex_input = $(i18n)/transifex_input.json transifex_input = $(i18n)/transifex_input.json
tx_url1 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/translation/en/strings/
tx_url2 = https://www.transifex.com/api/2/project/edx-platform/resource/$(transifex_resource)/source/
# This directory must match .babelrc . # This directory must match .babelrc .
transifex_temp = ./temp/babel-plugin-react-intl transifex_temp = ./temp/babel-plugin-react-intl
@@ -40,11 +42,11 @@ push_translations:
# Pushing strings to Transifex... # Pushing strings to Transifex...
tx push -s tx push -s
# Fetching hashes from Transifex... # Fetching hashes from Transifex...
./node_modules/@edx/reactifex/bash_scripts/get_hashed_strings_v3.sh ./node_modules/reactifex/bash_scripts/get_hashed_strings.sh $(tx_url1)
# Writing out comments to file... # Writing out comments to file...
$(transifex_utils) $(transifex_temp) --comments --v3-scripts-path $(transifex_utils) $(transifex_temp) --comments
# Pushing comments to Transifex... # Pushing comments to Transifex...
./node_modules/@edx/reactifex/bash_scripts/put_comments_v3.sh ./node_modules/reactifex/bash_scripts/put_comments.sh $(tx_url2)
# Pulls translations from Transifex. # Pulls translations from Transifex.
pull_translations: pull_translations:

View File

@@ -26,8 +26,6 @@ Environment Variables
Defaults to "localhost" in development. Defaults to "localhost" in development.
* ``LOGO_URL`` - The URL of the site's logo. This logo is displayed in the header. * ``LOGO_URL`` - The URL of the site's logo. This logo is displayed in the header.
* ``ORDER_HISTORY_URL`` - The URL of the order history page. * ``ORDER_HISTORY_URL`` - The URL of the order history page.
* ``ACCOUNT_PROFILE_URL`` - The URL of the account profile page.
* ``ACCOUNT_SETTINGS_URL`` - The URL of the account settings page.
* ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out * ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out
menu items when truthy. This is intended to be used in micro-frontends like menu items when truthy. This is intended to be used in micro-frontends like
frontend-app-authentication in which these menus are considered distractions from the user's task. frontend-app-authentication in which these menus are considered distractions from the user's task.
@@ -65,7 +63,7 @@ Development
Install dependencies:: Install dependencies::
npm ci npm i
Start the development server:: Start the development server::

31276
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -33,18 +33,17 @@
}, },
"homepage": "https://github.com/openedx/frontend-component-header#readme", "homepage": "https://github.com/openedx/frontend-component-header#readme",
"devDependencies": { "devDependencies": {
"@edx/brand": "npm:@edx/brand-openedx@1.2.0", "@edx/brand": "npm:@edx/brand-openedx@1.1.0",
"@edx/browserslist-config": "^1.1.1", "@edx/frontend-build": "12.3.0",
"@edx/frontend-build": "12.8.10", "@edx/frontend-platform": "^3.0.1",
"@edx/frontend-platform": "4.2.0", "@edx/paragon": "19.25.3",
"@edx/reactifex": "^2.1.1", "@testing-library/dom": "8.19.0",
"@testing-library/dom": "9.2.0",
"@testing-library/jest-dom": "5.16.5", "@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "10.4.9", "@testing-library/react": "10.4.9",
"enzyme": "3.11.0", "enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.7", "enzyme-adapter-react-16": "1.15.7",
"husky": "8.0.3", "husky": "7.0.4",
"jest": "29.5.0", "jest": "29.3.1",
"jest-chain": "1.1.6", "jest-chain": "1.1.6",
"prop-types": "15.8.1", "prop-types": "15.8.1",
"react": "16.14.0", "react": "16.14.0",
@@ -52,24 +51,25 @@
"react-redux": "7.2.9", "react-redux": "7.2.9",
"react-router-dom": "5.3.4", "react-router-dom": "5.3.4",
"react-test-renderer": "16.14.0", "react-test-renderer": "16.14.0",
"redux": "4.2.1", "reactifex": "1.1.1",
"redux-saga": "1.2.3" "redux": "4.2.0",
"redux-saga": "1.2.1"
}, },
"dependencies": { "dependencies": {
"@edx/paragon": "20.30.1", "@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/fontawesome-svg-core": "6.3.0", "@fortawesome/free-brands-svg-icons": "5.15.4",
"@fortawesome/free-brands-svg-icons": "6.3.0", "@fortawesome/free-regular-svg-icons": "5.15.4",
"@fortawesome/free-regular-svg-icons": "6.3.0", "@fortawesome/free-solid-svg-icons": "5.15.4",
"@fortawesome/free-solid-svg-icons": "6.3.0",
"@fortawesome/react-fontawesome": "^0.2.0", "@fortawesome/react-fontawesome": "^0.2.0",
"babel-polyfill": "6.26.0", "babel-polyfill": "6.26.0",
"react-responsive": "8.2.0", "react-responsive": "8.2.0",
"react-transition-group": "4.4.5" "react-transition-group": "4.4.5"
}, },
"peerDependencies": { "peerDependencies": {
"@edx/frontend-platform": "^4.0.0", "@edx/frontend-platform": "^2.0.0 || ^3.0.0",
"@edx/paragon": ">= 7.0.0 < 21.0.0",
"prop-types": "^15.5.10", "prop-types": "^15.5.10",
"react": "^16.9.0 || ^17.0.0", "react": "^16.9.0",
"react-dom": "^16.9.0 || ^17.0.0" "react-dom": "^16.9.0"
} }
} }

View File

@@ -22,11 +22,6 @@
"pin" "pin"
], ],
"automerge": true "automerge": true
},
{
"matchPackagePatterns": ["@edx"],
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
} }
], ],
"timezone": "America/New_York" "timezone": "America/New_York"

View File

@@ -55,12 +55,12 @@ const Header = ({ intl }) => {
}, },
{ {
type: 'item', type: 'item',
href: `${config.ACCOUNT_PROFILE_URL}/u/${authenticatedUser.username}`, href: `${config.LMS_BASE_URL}/u/${authenticatedUser.username}`,
content: intl.formatMessage(messages['header.user.menu.profile']), content: intl.formatMessage(messages['header.user.menu.profile']),
}, },
{ {
type: 'item', type: 'item',
href: config.ACCOUNT_SETTINGS_URL, href: `${config.LMS_BASE_URL}/account/settings`,
content: intl.formatMessage(messages['header.user.menu.account.settings']), content: intl.formatMessage(messages['header.user.menu.account.settings']),
}, },
{ {

View File

@@ -122,7 +122,7 @@ exports[`<StudioHeader /> renders correctly with optional action row content 1`]
className="pgn__action-row" className="pgn__action-row"
> >
<div <div
className="pgn__dropdown pgn__dropdown-light dropdown" className="dropdown"
data-testid="dropdown" data-testid="dropdown"
> >
<button <button

View File

@@ -29,10 +29,10 @@ const AuthenticatedUserDropdown = ({ intl, username }) => {
</Dropdown.Toggle> </Dropdown.Toggle>
<Dropdown.Menu className="dropdown-menu-right"> <Dropdown.Menu className="dropdown-menu-right">
{dashboardMenuItem} {dashboardMenuItem}
<Dropdown.Item href={`${getConfig().ACCOUNT_PROFILE_URL}/u/${username}`}> <Dropdown.Item href={`${getConfig().LMS_BASE_URL}/u/${username}`}>
{intl.formatMessage(messages.profile)} {intl.formatMessage(messages.profile)}
</Dropdown.Item> </Dropdown.Item>
<Dropdown.Item href={getConfig().ACCOUNT_SETTINGS_URL}> <Dropdown.Item href={`${getConfig().LMS_BASE_URL}/account/settings`}>
{intl.formatMessage(messages.account)} {intl.formatMessage(messages.account)}
</Dropdown.Item> </Dropdown.Item>
{ getConfig().ORDER_HISTORY_URL && ( { getConfig().ORDER_HISTORY_URL && (

View File

@@ -22,8 +22,6 @@ Enzyme.configure({ adapter: new Adapter() });
// These configuration values are usually set in webpack's EnvironmentPlugin however // These configuration values are usually set in webpack's EnvironmentPlugin however
// Jest does not use webpack so we need to set these so for testing // Jest does not use webpack so we need to set these so for testing
process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload'; process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload';
process.env.ACCOUNT_PROFILE_URL = 'http://localhost:1995';
process.env.ACCOUNT_SETTINGS_URL = 'http://localhost:1997';
process.env.BASE_URL = 'localhost:1995'; process.env.BASE_URL = 'localhost:1995';
process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150'; process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150';
process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token'; process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token';