Skip to content

Commit 5b8d3f4

Browse files
committed
minor #2075 [root] Upgrade JS build dependencies (Kocal)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [root] Upgrade JS build dependencies | Q | A | ------------- | --- | Bug fix? | no | New feature? | 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). --> Some maintenance on our root JS dependencies, upgrading Rollup, TypeScript, Babel, ... Commits ------- 5f54579 [root] Upgrade JS build dependencies
2 parents cff1b26 + 5f54579 commit 5b8d3f4

File tree

8 files changed

+1176
-1775
lines changed

8 files changed

+1176
-1775
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
"check-format": "biome format"
1111
},
1212
"devDependencies": {
13-
"@babel/core": "^7.15.8",
14-
"@babel/preset-env": "^7.15.8",
15-
"@babel/preset-react": "^7.15.8",
16-
"@babel/preset-typescript": "^7.15.8",
13+
"@babel/core": "^7.25.2",
14+
"@babel/preset-env": "^7.25.3",
15+
"@babel/preset-react": "^7.24.7",
16+
"@babel/preset-typescript": "^7.24.7",
1717
"@biomejs/biome": "^1.8.3",
18-
"@rollup/plugin-commonjs": "^23.0.0",
19-
"@rollup/plugin-node-resolve": "^15.0.0",
20-
"@rollup/plugin-typescript": "^10.0.0",
18+
"@rollup/plugin-commonjs": "^26.0.1",
19+
"@rollup/plugin-node-resolve": "^15.2.3",
20+
"@rollup/plugin-typescript": "^11.1.6",
2121
"@symfony/stimulus-testing": "^2.0.1",
2222
"clean-css-cli": "^5.6.2",
23-
"rollup": "^3.7.0",
24-
"tslib": "^2.3.1",
25-
"typescript": "^4.4.4",
23+
"rollup": "^4.21.0",
24+
"tslib": "^2.6.3",
25+
"typescript": "^5.5.4",
2626
"vitest": "^0.34.6"
2727
}
2828
}

rollup.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,16 @@ module.exports = {
9494
resolve(),
9595
typescript({
9696
filterRoot: packageRoot,
97-
include: ['src/**/*.ts'],
97+
include: [
98+
'src/**/*.ts',
99+
// TODO: Remove for the next major release
100+
// "@rollup/plugin-typescript" v11.0.0 fixed an issue (https://github.com/rollup/plugins/pull/1310) that
101+
// cause a breaking change for UX React users, the dist file requires "react-dom/client" instead of "react-dom"
102+
// and it will break for users using the Symfony AssetMapper without Symfony Flex (for automatic "importmap.php" upgrade).
103+
'**/node_modules/react-dom/client.js'
104+
],
98105
compilerOptions: {
99-
outDir: 'dist',
106+
outDir: '.',
100107
declaration: true,
101108
emitDeclarationOnly: true,
102109
}

src/Autocomplete/assets/dist/controller.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,19 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1515
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1616
PERFORMANCE OF THIS SOFTWARE.
1717
***************************************************************************** */
18+
/* global Reflect, Promise, SuppressedError, Symbol */
19+
1820

1921
function __classPrivateFieldGet(receiver, state, kind, f) {
2022
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
2123
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2224
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
23-
}
25+
}
26+
27+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
28+
var e = new Error(message);
29+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
30+
};
2431

2532
var _default_1_instances, _default_1_getCommonConfig, _default_1_createAutocomplete, _default_1_createAutocompleteWithHtmlContents, _default_1_createAutocompleteWithRemoteData, _default_1_stripTags, _default_1_mergeObjects, _default_1_createTomSelect;
2633
class default_1 extends Controller {

src/Map/src/Bridge/Google/assets/dist/map_controller.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference types="google.maps" />
21
import AbstractMapController from '@symfony/ux-map/abstract-map-controller';
32
import type { Point, MarkerDefinition } from '@symfony/ux-map/abstract-map-controller';
43
import type { LoaderOptions } from '@googlemaps/js-api-loader';

src/React/assets/dist/register_controller.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference types="webpack-env" />
21
import type { ComponentClass, FunctionComponent } from 'react';
32
type Component = string | FunctionComponent<object> | ComponentClass<object, any>;
43
declare global {

src/Svelte/assets/dist/register_controller.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference types="webpack-env" />
21
import type { SvelteComponent } from 'svelte';
32
declare global {
43
function resolveSvelteComponent(name: string): typeof SvelteComponent<any>;

src/Vue/assets/dist/register_controller.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// <reference types="webpack-env" />
21
import type { Component } from 'vue';
32
declare global {
43
function resolveVueComponent(name: string): Component;

yarn.lock

Lines changed: 1149 additions & 1758 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)