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

Update bundling mechanism for globals injection caching #218

Merged
merged 3 commits into from
Jan 2, 2023

Conversation

florian-h05
Copy link
Contributor

This contains the required changes for the openhab-js injection caching inside the JS Scripting addon in openhab/openhab-addons#14135.

Description

  • Add injection script
  • Modify webpack to bundle the library with the injection script as entrypoint
  • Set webpack mode to production (now the bundle size is only about 450 KB, before it was about 900 KB)

This contains the required changes for the openhab-js injection caching inside the JS Scripting addon.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Copy link
Contributor

@digitaldan digitaldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. FYI, we will probably need to also update DEPLOY.md as well if we change the output name.

@florian-h05
Copy link
Contributor Author

florian-h05 commented Jan 2, 2023

Oh, thanks for that reminder.

We also need a new release for this - I feel it is a bit to early to publish a 4.0 (due to some breaking changes it will be a new major). WDYT about a 3.2.1 release?

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 merged commit cfa5586 into openhab:main Jan 2, 2023
@florian-h05 florian-h05 deleted the webpack branch January 2, 2023 17:54
florian-h05 added a commit that referenced this pull request Jan 2, 2023
* Update bundling mechanism for globals injection caching
This contains the required changes for the openhab-js injection caching inside the JS Scripting addon.
* Update DEPLOY.md
* Do not exclude @openhab-globals.js from npm

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05
Copy link
Contributor Author

I decided to create a 3.2.x branch out of the 3.2.0 tag and cherrypick this on top of it.

@digitaldan
Copy link
Contributor

WDYT about a 3.2.1 release?

Sounds good to me.

florian-h05 added a commit that referenced this pull request Jan 2, 2023
Fixes a regression from #218.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit that referenced this pull request Jan 2, 2023
Fixes a regression from #218.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit to florian-h05/openhab-js that referenced this pull request Jan 2, 2023
Fixes regression from openhab#218.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit that referenced this pull request Jan 2, 2023
Fixes regression from #218.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 modified the milestone: 4.0.0 Mar 23, 2023
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.

2 participants