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

feat: support React 18 in @edx/frontend-enterprise-hotjar #435

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 44 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions packages/hotjar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
"patterns": [
"src"
],
"extensions": "js,jsx"
"extensions": "js,jsx,ts,tsx"
}
},
"scripts": {
"dev": "npx npm-watch build",
"clean": "make clean",
"build": "make build",
"i18n_extract": "BABEL_ENV=i18n fedx-scripts babel src --quiet > /dev/null",
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
"lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx .",
"snapshot": "fedx-scripts jest --updateSnapshot",
"lint": "fedx-scripts eslint --ext .js --ext .jsx --ext .ts --ext .tsx .",
"lint:fix": "npm run lint -- --fix",
"test": "fedx-scripts jest --coverage --passWithNoTests",
"snapshot": "npm run test -- --updateSnapshot",
"test:watch": "npm run test -- --watch"
},
"author": "edX",
Expand All @@ -37,15 +37,15 @@
},
"sideEffects": false,
"devDependencies": {
"@edx/browserslist-config": "1.5.0",
"@openedx/frontend-build": "14.3.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-router-dom": "6.29.0"
"@edx/browserslist-config": "^1.5.0",
"@openedx/frontend-build": "^14.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.29.0"
Comment on lines +40 to +44
Copy link
Member

Choose a reason for hiding this comment

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

Should these packages be pinned?

Copy link
Member Author

Choose a reason for hiding this comment

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

based on some recent conversations here, it's likely the convention of pinning NPM dependencies will change where we'll want to typically rely on ^. Opting to proactively change it for this repo while we're here.

Copy link
Member

@brobro10000 brobro10000 Feb 24, 2025

Choose a reason for hiding this comment

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

This is good context on the newly minted convention that should work well with keeping our MFE packages up to date as well.

I share the same sentiment that package updates can be prefixed WITH ^.., but would probably be worth sharing the information with other engineers since the pinned package version convention has been engrained in the orgs workflow.

Copy link
Member Author

@adamstankiewicz adamstankiewicz Feb 24, 2025

Choose a reason for hiding this comment

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

Definitely. Largely holding off on a broader inform until it gets into an org-wide ADR more formally; not sure if that's something Brian was planning to take on yet; if not, we could drive that forward, too.

Regardless, it'll actually make dev easier when installing/updating deps since NPM by default uses ^; usually takes effort to remember to undo the ^ and re-run npm i to pin it when doing something like npm i @openedx/paragon@22.

},
"peerDependencies": {
"react": "^16.12.0 || ^17.0.0",
"react-dom": "^16.12.0 || ^17.0.0",
"react": "^16.12.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.12.0 || ^17.0.0 || ^18.0.0",
"react-router-dom": "^6.0.0"
}
}