From 592be5e6834f6f24476b17eb0e69b022a9de8848 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sun, 22 Oct 2023 14:22:29 -0400 Subject: [PATCH] Specifically adding type: module for all packages and changing main -> module --- src/Autocomplete/assets/package.json | 3 ++- src/Chartjs/assets/package.json | 3 ++- src/Cropperjs/assets/package.json | 3 ++- src/Dropzone/assets/package.json | 3 ++- src/LazyImage/assets/package.json | 3 ++- src/LiveComponent/assets/package.json | 3 ++- src/Notify/assets/package.json | 3 ++- src/React/assets/package.json | 3 ++- src/StimulusBundle/assets/package.json | 2 ++ src/Svelte/assets/package.json | 3 +-- src/Swup/assets/package.json | 3 ++- src/TogglePassword/assets/package.json | 3 ++- src/Translator/assets/package.json | 3 ++- src/Turbo/assets/package.json | 3 ++- src/Typed/assets/package.json | 3 ++- src/Vue/assets/package.json | 3 ++- 16 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/Autocomplete/assets/package.json b/src/Autocomplete/assets/package.json index 83c7553755f..7acaaed1911 100644 --- a/src/Autocomplete/assets/package.json +++ b/src/Autocomplete/assets/package.json @@ -1,7 +1,8 @@ { "name": "@symfony/ux-autocomplete", "description": "JavaScript-powered autocompletion functionality for forms.", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "version": "1.0.0", "license": "MIT", diff --git a/src/Chartjs/assets/package.json b/src/Chartjs/assets/package.json index 2b473e586d3..74487a3bbd5 100644 --- a/src/Chartjs/assets/package.json +++ b/src/Chartjs/assets/package.json @@ -3,7 +3,8 @@ "description": "Chart.js integration for Symfony", "license": "MIT", "version": "1.1.0", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "symfony": { "controllers": { diff --git a/src/Cropperjs/assets/package.json b/src/Cropperjs/assets/package.json index c4949311240..4ebd28c0e35 100644 --- a/src/Cropperjs/assets/package.json +++ b/src/Cropperjs/assets/package.json @@ -3,7 +3,8 @@ "description": "Cropper.js integration for Symfony", "license": "MIT", "version": "1.1.0", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "config": { "css_source": "src/style.css" diff --git a/src/Dropzone/assets/package.json b/src/Dropzone/assets/package.json index 1fc19df7ed1..86ca91309c4 100644 --- a/src/Dropzone/assets/package.json +++ b/src/Dropzone/assets/package.json @@ -3,7 +3,8 @@ "description": "File input dropzones for Symfony Forms", "license": "MIT", "version": "1.1.0", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "config": { "css_source": "src/style.css" diff --git a/src/LazyImage/assets/package.json b/src/LazyImage/assets/package.json index cc320117158..c9ff74005bd 100644 --- a/src/LazyImage/assets/package.json +++ b/src/LazyImage/assets/package.json @@ -3,7 +3,8 @@ "description": "Lazy image loader and utilities for Symfony", "license": "MIT", "version": "1.1.0", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "symfony": { "controllers": { diff --git a/src/LiveComponent/assets/package.json b/src/LiveComponent/assets/package.json index 939c281a42a..6c3073c0b8c 100644 --- a/src/LiveComponent/assets/package.json +++ b/src/LiveComponent/assets/package.json @@ -1,7 +1,8 @@ { "name": "@symfony/ux-live-component", "description": "Live Component: bring server-side re-rendering & model binding to any element.", - "main": "dist/live_controller.js", + "module": "dist/live_controller.js", + "type": "module", "types": "dist/live_controller.d.ts", "version": "1.0.0", "config": { diff --git a/src/Notify/assets/package.json b/src/Notify/assets/package.json index 5f47e196287..ecbf2e48ed6 100644 --- a/src/Notify/assets/package.json +++ b/src/Notify/assets/package.json @@ -3,7 +3,8 @@ "description": "Native notification integration for Symfony using Mercure", "license": "MIT", "version": "1.0.0", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "symfony": { "controllers": { diff --git a/src/React/assets/package.json b/src/React/assets/package.json index a4f7f6753d6..7beca06c3ff 100644 --- a/src/React/assets/package.json +++ b/src/React/assets/package.json @@ -3,7 +3,8 @@ "description": "Integration of React in Symfony", "license": "MIT", "version": "1.0.0", - "main": "dist/register_controller.js", + "module": "dist/register_controller.js", + "type": "module", "types": "dist/register_controller.d.ts", "symfony": { "controllers": { diff --git a/src/StimulusBundle/assets/package.json b/src/StimulusBundle/assets/package.json index 398643a8c65..51f7c4339cb 100644 --- a/src/StimulusBundle/assets/package.json +++ b/src/StimulusBundle/assets/package.json @@ -3,6 +3,8 @@ "description": "Integration of @hotwired/stimulus into Symfony", "version": "1.0.0", "license": "MIT", + "module": "dist/loader.js", + "type": "module", "symfony": { "needsPackageAsADependency": false, "importmap": { diff --git a/src/Svelte/assets/package.json b/src/Svelte/assets/package.json index 6e5caaec797..2e9fb5f0bb7 100644 --- a/src/Svelte/assets/package.json +++ b/src/Svelte/assets/package.json @@ -1,11 +1,10 @@ { "name": "@symfony/ux-svelte", "description": "Integration of Svelte in Symfony", - "main": "dist/register_controller.js", "module": "dist/register_controller.js", + "type": "module", "version": "1.0.0", "license": "MIT", - "type": "module", "symfony": { "controllers": { "svelte": { diff --git a/src/Swup/assets/package.json b/src/Swup/assets/package.json index 75b3f00063c..6ed8a772de2 100644 --- a/src/Swup/assets/package.json +++ b/src/Swup/assets/package.json @@ -3,7 +3,8 @@ "description": "Swup integration for Symfony", "license": "MIT", "version": "1.1.0", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "symfony": { "controllers": { diff --git a/src/TogglePassword/assets/package.json b/src/TogglePassword/assets/package.json index 928dd1adf78..98d944c0e56 100644 --- a/src/TogglePassword/assets/package.json +++ b/src/TogglePassword/assets/package.json @@ -3,7 +3,8 @@ "description": "Toggle visibility of password inputs for Symfony Forms", "license": "MIT", "version": "1.0.0", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "config": { "css_source": "src/style.css" diff --git a/src/Translator/assets/package.json b/src/Translator/assets/package.json index 9e8d1f2df45..36a98069519 100644 --- a/src/Translator/assets/package.json +++ b/src/Translator/assets/package.json @@ -3,7 +3,8 @@ "description": "Symfony Translator for JavaScript", "license": "MIT", "version": "1.0.0", - "main": "dist/translator_controller.js", + "module": "dist/translator_controller.js", + "type": "module", "types": "dist/translator_controller.d.ts", "symfony": { "importmap": { diff --git a/src/Turbo/assets/package.json b/src/Turbo/assets/package.json index 84570a7be46..0d280301e90 100644 --- a/src/Turbo/assets/package.json +++ b/src/Turbo/assets/package.json @@ -4,7 +4,8 @@ "license": "MIT", "private": true, "version": "0.1.0", - "main": "dist/turbo_controller.js", + "module": "dist/turbo_controller.js", + "type": "module", "types": "dist/turbo_controller.d.ts", "symfony": { "controllers": { diff --git a/src/Typed/assets/package.json b/src/Typed/assets/package.json index 238fda8f1db..218221c1c94 100644 --- a/src/Typed/assets/package.json +++ b/src/Typed/assets/package.json @@ -3,7 +3,8 @@ "description": "Typed integration for Symfony", "license": "MIT", "version": "1.0.0", - "main": "dist/controller.js", + "module": "dist/controller.js", + "type": "module", "types": "dist/controller.d.ts", "symfony": { "controllers": { diff --git a/src/Vue/assets/package.json b/src/Vue/assets/package.json index 05ec27f6094..eeed6d40111 100644 --- a/src/Vue/assets/package.json +++ b/src/Vue/assets/package.json @@ -3,7 +3,8 @@ "description": "Integration of Vue.js in Symfony", "license": "MIT", "version": "1.0.0", - "main": "dist/register_controller.js", + "module": "dist/register_controller.js", + "type": "module", "types": "dist/register_controller.d.ts", "symfony": { "controllers": {