Skip to content

Commit

Permalink
feat: update v23 with React 18 + Gatsby 5 support from v22 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Jan 23, 2025
2 parents 2117eb6 + c5c48aa commit 3ea9349
Show file tree
Hide file tree
Showing 108 changed files with 28,088 additions and 21,383 deletions.
7 changes: 7 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
}],
"alpha-value-notation": "number",
"color-function-notation": "legacy",
"import-notation": "string",
"at-rule-empty-line-before": ["always", {
"except": ["blockless-after-same-name-blockless", "first-nested"],
"ignore": ["after-comment"],
"ignoreAtRules": ["import"]
}],
"declaration-block-no-redundant-longhand-properties": null,
"value-keyword-case": ["lower", {
"ignoreProperties": ["/font-family/"]
}],
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,8 @@ The following subcomponents have been added / reworked:

* fix: update image sizing according to figma design

Co-authored-by: vlasovmichael <[email protected]>
Co-authored-by: vzadorozhnii <[email protected]>
Co-authored-by: vlasovmichael \<[email protected]\>
Co-authored-by: vzadorozhnii \<[email protected]\>



Expand Down
6 changes: 6 additions & 0 deletions example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: [
'@edx/eslint-config',
],
root: true, // Don't also import the paragon eslint config in the parent directory.
};
10 changes: 3 additions & 7 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
"license": "ISC",
"dependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-platform": "^4.2.0",
"@edx/frontend-build": "^13.0.14",
"@edx/frontend-platform": "^8",
"@faker-js/faker": "^7.6.0",
"core-js": "^3.22.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"regenerator-runtime": "^0.13.9"
},
"devDependencies": {
"@edx/frontend-build": "^12.8.10"
"react-dom": "^17.0.2"
}
}
4 changes: 2 additions & 2 deletions example/src/MyComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { Button, Form, Icon, Bubble, Stack, Container } from '@openedx/paragon'; // eslint-disable-line
import { FavoriteBorder } from '@openedx/paragon/icons'; // eslint-disable-line

const MyComponent = () => {
function MyComponent() {
const [value, setValue] = useState('');
const handleChange = (e) => setValue(e.target.value);
const handleClick = () => alert('Form is submitted!'); // eslint-disable-line no-alert
Expand All @@ -26,6 +26,6 @@ const MyComponent = () => {
</Form>
</Container>
);
};
}

export default MyComponent;
3 changes: 0 additions & 3 deletions example/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import 'core-js/stable';
import 'regenerator-runtime/runtime';

import React from 'react';
import ReactDOM from 'react-dom';
import {
Expand Down
2 changes: 1 addition & 1 deletion icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"bootstrap-icons": "^1.11.3"
},
"peerDependencies": {
"react": "^16.8.6 || ^17.0.2"
"react": "^16.8.6 || ^17 || ^18"
},
"exports": {
".": {
Expand Down
2 changes: 2 additions & 0 deletions lib/build-scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ const compileAndWriteStyleSheets = ({
return new URL(url.substring(1), `${pathToFileURL('node_modules')}/node_modules`);
},
}],
// For now we can't resolve these warnings as we need to upgrade our 'bootstrap' dependency to do so:
silenceDeprecations: ['abs-percent', 'color-functions', 'import', 'mixed-decls', 'global-builtin'],
});

const commonPostCssPlugins = [
Expand Down
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
environment = { SEGMENT_KEY = "", NODE_VERSION = "18.16.0" }
[functions]
directory = "www/netlify/functions"
[[headers]]
for = "/*"
[headers.values]
Content-Security-Policy = "frame-ancestors *;"
Loading

0 comments on commit 3ea9349

Please sign in to comment.