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

meta: disable ESM to CJS transform in dist files #3773

Merged
merged 2 commits into from May 30, 2022
Merged

meta: disable ESM to CJS transform in dist files #3773

merged 2 commits into from May 30, 2022

Conversation

aduh95
Copy link
Member

@aduh95 aduh95 commented May 23, 2022

This commit removes all the hacks that needed to happen in order to ship working CJS code. Onwards, we plan to distribute Uppy packages as ESM.

@aduh95 aduh95 changed the title meta: disable ESM to CJS transorm in dist files meta: disable ESM to CJS transform in dist files May 23, 2022
@Murderlon
Copy link
Member

This commit removes all the hacks that needed to happen in order to ship working CJS code. Onwards, we plan to distribute Uppy packages as ESM.

If we are doing all hacks in this PR, we shouldn't forget these:

  • packages/@uppy/transloadit/src/Assembly.js:12:22 (socket.io)
  • packages/@uppy/image-editor/src/Editor.jsx:4:18 (cropperjs)
  • private/dev/vite.config.js:93:28

@aduh95 aduh95 changed the base branch from main to 3.x May 23, 2022 14:30
@aduh95
Copy link
Member Author

aduh95 commented May 23, 2022

  • packages/@uppy/image-editor/src/Editor.jsx:4:18 (cropperjs)
  • packages/@uppy/transloadit/src/Assembly.js:12:22 (socket.io)
  • private/dev/vite.config.js:93:28

@Murderlon
Copy link
Member

Seems this breaks the React e2e tests somehow?

@aduh95 aduh95 force-pushed the 3.x branch 3 times, most recently from 6f42104 to b37fc15 Compare May 24, 2022 15:38
@aduh95
Copy link
Member Author

aduh95 commented May 24, 2022

Seems this breaks the React e2e tests somehow?

I forgot the React package wasn't ESM yet (it has to be a breaking change):

This commit removes all the hacks that needed to happen in order to ship
working CJS code. Onwards, we plan to distribute Uppy packages as ESM.
@arturi arturi merged commit 9309b1d into 3.x May 30, 2022
@arturi arturi deleted the dist-esm branch May 30, 2022 15:12
aduh95 added a commit that referenced this pull request May 30, 2022
* meta: disable ESM to CJS transorm in dist files

This commit removes all the hacks that needed to happen in order to ship
working CJS code. Onwards, we plan to distribute Uppy packages as ESM.

* No mocking with Jest and ESM
aduh95 added a commit that referenced this pull request May 30, 2022
* meta: disable ESM to CJS transorm in dist files

This commit removes all the hacks that needed to happen in order to ship
working CJS code. Onwards, we plan to distribute Uppy packages as ESM.

* No mocking with Jest and ESM
github-actions bot added a commit that referenced this pull request May 30, 2022
| Package                   |    Version | Package                   |    Version |
| ------------------------- | ---------- | ------------------------- | ---------- |
| @uppy/audio               | 3.0.0-beta | @uppy/progress-bar        | 3.0.0-beta |
| @uppy/aws-s3              | 3.0.0-beta | @uppy/provider-views      | 3.0.0-beta |
| @uppy/aws-s3-multipart    | 3.0.0-beta | @uppy/react               | 3.0.0-beta |
| @uppy/box                 | 3.0.0-beta | @uppy/redux-dev-tools     | 3.0.0-beta |
| @uppy/companion           | 4.0.0-beta | @uppy/robodog             | 3.0.0-beta |
| @uppy/companion-client    | 3.0.0-beta | @uppy/screen-capture      | 3.0.0-beta |
| @uppy/compressor          | 3.0.0-beta | @uppy/status-bar          | 3.0.0-beta |
| @uppy/core                | 3.0.0-beta | @uppy/store-default       | 3.0.0-beta |
| @uppy/dashboard           | 3.0.0-beta | @uppy/store-redux         | 3.0.0-beta |
| @uppy/drag-drop           | 3.0.0-beta | @uppy/svelte              | 3.0.0-beta |
| @uppy/drop-target         | 3.0.0-beta | @uppy/thumbnail-generator | 3.0.0-beta |
| @uppy/dropbox             | 3.0.0-beta | @uppy/transloadit         | 3.0.0-beta |
| @uppy/facebook            | 3.0.0-beta | @uppy/tus                 | 3.0.0-beta |
| @uppy/file-input          | 3.0.0-beta | @uppy/unsplash            | 3.0.0-beta |
| @uppy/form                | 3.0.0-beta | @uppy/url                 | 3.0.0-beta |
| @uppy/golden-retriever    | 3.0.0-beta | @uppy/utils               | 5.0.0-beta |
| @uppy/google-drive        | 3.0.0-beta | @uppy/vue                 | 3.0.0-beta |
| @uppy/image-editor        | 3.0.0-beta | @uppy/webcam              | 3.0.0-beta |
| @uppy/informer            | 3.0.0-beta | @uppy/xhr-upload          | 3.0.0-beta |
| @uppy/instagram           | 3.0.0-beta | @uppy/zoom                | 3.0.0-beta |
| @uppy/locales             | 3.0.0-beta | uppy                      | 3.0.0-beta |
| @uppy/onedrive            | 3.0.0-beta |                           |            |

- meta: temporary adjust release script for the beta (Antoine du Hamel)
- meta: disable ESM to CJS transform in dist files (Antoine du Hamel / #3773)
- @uppy/companion: remove `searchProviders` wrapper & move `s3` options (Merlijn Vos / #3781)
- meta: do not test on EOL versions of Node.js (Antoine du Hamel / #3786)
- @uppy/companion: remove support for EOL versions of Node.js (Antoine du Hamel / #3784)
- @uppy/react: refactor to ESM (Antoine du Hamel / #3780)
- @uppy/transloadit: remove IE 10 hack (Antoine du Hamel / #3777)
HeavenFox pushed a commit to docsend/uppy that referenced this pull request Jun 27, 2023
| Package                   |    Version | Package                   |    Version |
| ------------------------- | ---------- | ------------------------- | ---------- |
| @uppy/audio               | 3.0.0-beta | @uppy/progress-bar        | 3.0.0-beta |
| @uppy/aws-s3              | 3.0.0-beta | @uppy/provider-views      | 3.0.0-beta |
| @uppy/aws-s3-multipart    | 3.0.0-beta | @uppy/react               | 3.0.0-beta |
| @uppy/box                 | 3.0.0-beta | @uppy/redux-dev-tools     | 3.0.0-beta |
| @uppy/companion           | 4.0.0-beta | @uppy/robodog             | 3.0.0-beta |
| @uppy/companion-client    | 3.0.0-beta | @uppy/screen-capture      | 3.0.0-beta |
| @uppy/compressor          | 3.0.0-beta | @uppy/status-bar          | 3.0.0-beta |
| @uppy/core                | 3.0.0-beta | @uppy/store-default       | 3.0.0-beta |
| @uppy/dashboard           | 3.0.0-beta | @uppy/store-redux         | 3.0.0-beta |
| @uppy/drag-drop           | 3.0.0-beta | @uppy/svelte              | 3.0.0-beta |
| @uppy/drop-target         | 3.0.0-beta | @uppy/thumbnail-generator | 3.0.0-beta |
| @uppy/dropbox             | 3.0.0-beta | @uppy/transloadit         | 3.0.0-beta |
| @uppy/facebook            | 3.0.0-beta | @uppy/tus                 | 3.0.0-beta |
| @uppy/file-input          | 3.0.0-beta | @uppy/unsplash            | 3.0.0-beta |
| @uppy/form                | 3.0.0-beta | @uppy/url                 | 3.0.0-beta |
| @uppy/golden-retriever    | 3.0.0-beta | @uppy/utils               | 5.0.0-beta |
| @uppy/google-drive        | 3.0.0-beta | @uppy/vue                 | 3.0.0-beta |
| @uppy/image-editor        | 3.0.0-beta | @uppy/webcam              | 3.0.0-beta |
| @uppy/informer            | 3.0.0-beta | @uppy/xhr-upload          | 3.0.0-beta |
| @uppy/instagram           | 3.0.0-beta | @uppy/zoom                | 3.0.0-beta |
| @uppy/locales             | 3.0.0-beta | uppy                      | 3.0.0-beta |
| @uppy/onedrive            | 3.0.0-beta |                           |            |

- meta: temporary adjust release script for the beta (Antoine du Hamel)
- meta: disable ESM to CJS transform in dist files (Antoine du Hamel / transloadit#3773)
- @uppy/companion: remove `searchProviders` wrapper & move `s3` options (Merlijn Vos / transloadit#3781)
- meta: do not test on EOL versions of Node.js (Antoine du Hamel / transloadit#3786)
- @uppy/companion: remove support for EOL versions of Node.js (Antoine du Hamel / transloadit#3784)
- @uppy/react: refactor to ESM (Antoine du Hamel / transloadit#3780)
- @uppy/transloadit: remove IE 10 hack (Antoine du Hamel / transloadit#3777)
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.

None yet

3 participants