Skip to content

Commit a7fdbf8

Browse files
committed
bug #1268 Remove "type": "module" from all package.json files (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Remove "type": "module" from all package.json files Since #1264, another person could not build its assets with Encore and a babel plugin. So for now we decided to revert the "type: module" declaration. ### Revert the "type: module" Remove this "type" line from all package.json files and revert replacing "main:" with "module:" Before ```json "type": "module", "module": "dist/foo.js", ``` After ```json "main": "dist/foo.js", ``` ### Fix Svelte ESM bug with vite/vitest ``` We recommend converting your config to ESM by either: adding "type": "module" to the nearest package.json renaming vite.config.js/vite.config.ts to vite.config.mjs/vite.config.mts ``` (https://vitejs.dev/guide/troubleshooting.html#config) So i used the second one.... and it seems to work Commits ------- 919ade7 Remove "type": "module" from all package.json files
2 parents d4e3f0a + 919ade7 commit a7fdbf8

File tree

33 files changed

+80
-31
lines changed

33 files changed

+80
-31
lines changed

Diff for: src/Autocomplete/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add new BaseEntityAutocompleteType

Diff for: src/Autocomplete/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "@symfony/ux-autocomplete",
33
"description": "JavaScript-powered autocompletion functionality for forms.",
4-
"module": "dist/controller.js",
5-
"type": "module",
4+
"main": "dist/controller.js",
65
"types": "dist/controller.d.ts",
76
"version": "1.0.0",
87
"license": "MIT",

Diff for: src/Chartjs/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/Chartjs/assets/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Chart.js integration for Symfony",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
6+
"main": "dist/controller.js",
77
"types": "dist/controller.d.ts",
88
"symfony": {
99
"controllers": {

Diff for: src/Cropperjs/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/Cropperjs/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Cropper.js integration for Symfony",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"config": {
109
"css_source": "src/style.css"

Diff for: src/Dropzone/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/Dropzone/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "File input dropzones for Symfony Forms",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"config": {
109
"css_source": "src/style.css"

Diff for: src/LazyImage/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/LazyImage/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Lazy image loader and utilities for Symfony",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"symfony": {
109
"controllers": {

Diff for: src/LiveComponent/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add deferred/lazy rendering of Live Components.

Diff for: src/LiveComponent/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "@symfony/ux-live-component",
33
"description": "Live Component: bring server-side re-rendering & model binding to any element.",
4-
"module": "dist/live_controller.js",
5-
"type": "module",
4+
"main": "dist/live_controller.js",
65
"types": "dist/live_controller.d.ts",
76
"version": "1.0.0",
87
"config": {

Diff for: src/Notify/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/Notify/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Native notification integration for Symfony using Mercure",
44
"license": "MIT",
55
"version": "1.0.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"symfony": {
109
"controllers": {

Diff for: src/React/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/React/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Integration of React in Symfony",
44
"license": "MIT",
55
"version": "1.0.0",
6-
"module": "dist/register_controller.js",
7-
"type": "module",
6+
"main": "dist/register_controller.js",
87
"types": "dist/register_controller.d.ts",
98
"symfony": {
109
"controllers": {

Diff for: src/StimulusBundle/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Normalize parameters names given to twig helper 'stimulus_action()'.

Diff for: src/StimulusBundle/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Integration of @hotwired/stimulus into Symfony",
44
"version": "1.0.0",
55
"license": "MIT",
6-
"module": "dist/loader.js",
7-
"type": "module",
6+
"main": "dist/loader.js",
87
"symfony": {
98
"needsPackageAsADependency": false,
109
"importmap": {

Diff for: src/Svelte/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add support for Svelte 4.

Diff for: src/Svelte/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "@symfony/ux-svelte",
33
"description": "Integration of Svelte in Symfony",
4-
"module": "dist/register_controller.js",
5-
"type": "module",
4+
"main": "dist/register_controller.js",
65
"version": "1.0.0",
76
"license": "MIT",
87
"symfony": {
File renamed without changes.

Diff for: src/Swup/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Change JavaScript package to `type: module`

Diff for: src/Swup/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Swup integration for Symfony",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"symfony": {
109
"controllers": {

Diff for: src/TogglePassword/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/TogglePassword/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Toggle visibility of password inputs for Symfony Forms",
44
"license": "MIT",
55
"version": "1.0.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"config": {
109
"css_source": "src/style.css"

Diff for: src/Translator/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/Translator/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Symfony Translator for JavaScript",
44
"license": "MIT",
55
"version": "1.0.0",
6-
"module": "dist/translator_controller.js",
7-
"type": "module",
6+
"main": "dist/translator_controller.js",
87
"types": "dist/translator_controller.d.ts",
98
"symfony": {
109
"importmap": {

Diff for: src/Turbo/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/Turbo/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"license": "MIT",
55
"private": true,
66
"version": "0.1.0",
7-
"module": "dist/turbo_controller.js",
8-
"type": "module",
7+
"main": "dist/turbo_controller.js",
98
"types": "dist/turbo_controller.d.ts",
109
"symfony": {
1110
"controllers": {

Diff for: src/Typed/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Change JavaScript package to `type: module`

Diff for: src/Typed/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Typed integration for Symfony",
44
"license": "MIT",
55
"version": "1.0.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"symfony": {
109
"controllers": {

Diff for: src/Vue/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

Diff for: src/Vue/assets/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Integration of Vue.js in Symfony",
44
"license": "MIT",
55
"version": "1.0.0",
6-
"module": "dist/register_controller.js",
7-
"type": "module",
6+
"main": "dist/register_controller.js",
87
"types": "dist/register_controller.d.ts",
98
"symfony": {
109
"controllers": {

0 commit comments

Comments
 (0)