Skip to content

Commit

Permalink
minor #2219 Update some dependencies to fix some issues from Dependab…
Browse files Browse the repository at this point in the history
…ot (Kocal)

This PR was squashed before being merged into the 2.x branch.

Discussion
----------

Update some dependencies to fix some issues from Dependabot

| Q             | A
| ------------- | ---
| Bug fix?      | yes/no
| New feature?  | yes/no <!-- please update src/**/CHANGELOG.md files -->
| Issues        | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - For new features, provide some code snippets to help understand usage.
 - Features and deprecations must be submitted against branch main.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Fixing some issues from https://github.com/symfony/ux/security/dependabot by upgrading dependencies...

The React controller has changed, but it's still working:
<img width="1558" alt="image" src="https://github.com/user-attachments/assets/67245833-f5c4-40e2-ae8a-8044c54aab3c">

Commits
-------

bb6471b Update some dependencies to fix some issues from Dependabot
  • Loading branch information
Kocal committed Sep 28, 2024
2 parents b875ee6 + bb6471b commit 21a071a
Show file tree
Hide file tree
Showing 5 changed files with 555 additions and 723 deletions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@biomejs/biome": "^1.8.3",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-typescript": "^11.1.6",
"@symfony/stimulus-testing": "^2.0.1",
"@vitest/browser": "^2.0.5",
"@vitest/browser": "^2.1.1",
"clean-css-cli": "^5.6.2",
"playwright": "^1.47.0",
"rollup": "^4.21.0",
"rollup": "^4.22.5",
"tslib": "^2.6.3",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
}
"vitest": "^2.1.1"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
50 changes: 34 additions & 16 deletions src/React/assets/dist/render_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,42 @@ import React from 'react';
import require$$0 from 'react-dom';
import { Controller } from '@hotwired/stimulus';

var createRoot;
var client = {};

var m = require$$0;
if (process.env.NODE_ENV === 'production') {
createRoot = m.createRoot;
m.hydrateRoot;
} else {
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
createRoot = function(c, o) {
i.usingClientEntryPoint = true;
try {
return m.createRoot(c, o);
} finally {
i.usingClientEntryPoint = false;
}
};
var hasRequiredClient;

function requireClient () {
if (hasRequiredClient) return client;
hasRequiredClient = 1;

var m = require$$0;
if (process.env.NODE_ENV === 'production') {
client.createRoot = m.createRoot;
client.hydrateRoot = m.hydrateRoot;
} else {
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
client.createRoot = function(c, o) {
i.usingClientEntryPoint = true;
try {
return m.createRoot(c, o);
} finally {
i.usingClientEntryPoint = false;
}
};
client.hydrateRoot = function(c, h, o) {
i.usingClientEntryPoint = true;
try {
return m.hydrateRoot(c, h, o);
} finally {
i.usingClientEntryPoint = false;
}
};
}
return client;
}

var clientExports = requireClient();

class default_1 extends Controller {
connect() {
const props = this.propsValue ? this.propsValue : null;
Expand All @@ -45,7 +63,7 @@ class default_1 extends Controller {
_renderReactElement(reactElement) {
const element = this.element;
if (!element.root) {
element.root = createRoot(this.element);
element.root = clientExports.createRoot(this.element);
}
element.root.render(reactElement);
}
Expand Down
6 changes: 3 additions & 3 deletions ux.symfony.com/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"devDependencies": {
"@babel/cli": "^7.21.5",
"@babel/core": "^7.21.8",
"@babel/preset-react": "^7.18.6",
"@babel/cli": "^7.25.6",
"@babel/core": "^7.25.2",
"@babel/preset-react": "^7.24.7",
"svelte": "^3.59.1"
},
"license": "MIT",
Expand Down
Loading

0 comments on commit 21a071a

Please # to comment.