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

Upgrade to Node 20 #74

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Upgrade to Node 20 #74

merged 1 commit into from
Feb 13, 2025

Conversation

figuernd
Copy link
Contributor

No description provided.

…cable. Upgrades react-scripts to support newer TLS used by Node. Removes unnecessary polyfills no longer included by the new version of react-scripts > webpack.
@figuernd figuernd requested a review from rgov February 13, 2025 19:50
@@ -26,7 +25,7 @@ export default class ImagePreviewModal extends React.Component {
<Modal size="lg" show={this.state.show} onHide={this.handleClose}>
<Modal.Header closeButton>
<Modal.Title as="h5">
Image Preview - {Path.basename(this.props.url)}
Image Preview - {this.props.url.split('/').pop()}
Copy link
Member

@rgov rgov Feb 13, 2025

Choose a reason for hiding this comment

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

I think Path.basename() conveys the concept more clearly but I am assuming it's not available for some reason?

I'm not against this just simple solution, but just noting that there might be /s in a URL that are not part of the path. E.g., http://example.com/blah?query=slashy/slashy#slash/slash

Copy link
Contributor Author

@figuernd figuernd Feb 13, 2025

Choose a reason for hiding this comment

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

Correct - older versions of webpack included polyfills for backend modules like Path, so it likely compiled to something like this. Upgrading to Node 20 excludes that polyfill unelss I explicitly configure it, but I am also trying to lighten the dependency tree and this seemed like a trivial need.

@figuernd figuernd merged commit df70551 into main Feb 13, 2025
0 of 2 checks passed
@figuernd figuernd deleted the nathan.figueroa/node-upgrade branch February 13, 2025 22:01
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.

2 participants