totaldebug / atomic-calendar-revive

An advanced calendar card for Home Assistant Lovelace.
https://docs.totaldebug.uk/atomic-calendar-revive
MIT License
393 stars 63 forks source link

fix: re-adds support for iOS 12 by transpiling lit #1502

Closed steveworkman closed 1 week ago

steveworkman commented 1 week ago

Proposed Change

Changes the babel settings of the rollup config to transpile lit-related modules that were using nullish coallescing since lit 3.0. Also adds in the nullish coalescing plugin to the babel plugins.

Whilst I was at it, I added in the rollup-dev.config.mjs file that is referenced in the npm run watch command but was missing, and added the --bundleConfigAsCjs option to npm start so that works again.

Related issues

Fixes #1343

Type of change

Checklist

sourcery-ai[bot] commented 1 week ago

🧙 Sourcery has finished reviewing your pull request!


Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - You can change your review settings at any time by accessing your [dashboard](https://sourcery.ai/dashboard): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
marksie1988 commented 1 week ago

what is the reason for rolling back this to an old version?

"rollup-plugin-serve": "^3.0.0", "rollup-plugin-serve": "^1.1.1",

steveworkman commented 1 week ago

what is the reason for rolling back this to an old version?

"rollup-plugin-serve": "^3.0.0", "rollup-plugin-serve": "^1.1.1",

rollup-plugin-serve@3 fails to run with an error of:

[!] Error: require() of ES Module /Users/me/code/atomic-calendar-revive/node_modules/mime/dist/src/index_lite.js from /Users/me/code/atomic-calendar-revive/node_modules/rollup-plugin-serve/dist/index.cjs not supported.
Instead change the require of index_lite.js in /Users/me/code/atomic-calendar-revive/node_modules/rollup-plugin-serve/dist/index.cjs to a dynamic import() which is available in all CommonJS modules.

It doesn't like the ES Module and is related to https://github.com/thgh/rollup-plugin-serve/issues/102. I've updated to v2 and pushed the change

github-actions[bot] commented 1 week ago

:tada: This PR is included in version 9.8.0-beta.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] commented 1 week ago

:tada: This PR is included in version 10.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: