-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[jsscripting] Add an alternative MIME type/alias #13851
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The alternative MIME type text/javascript is also used by Nashorn, therefore we add the same extension as for the main MIME type. The alias is introduced to simplify the usage in SCRIPT transformation profiles. Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Florian Hotze <[email protected]>
In some cases during testing, a NPE occured, this should solve it. Signed-off-by: Florian Hotze <[email protected]>
J-N-K
reviewed
Dec 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
florian-h05
added a commit
to florian-h05/openhab-js
that referenced
this pull request
Dec 5, 2022
Reference openhab/openhab-core#2883. The "graaljs" MIME type is introduced in openhab/openhab-addons#13851. Please note that the transformation docs link might not work now, as the doc updates aren't published yet. Signed-off-by: Florian Hotze <[email protected]>
wborn
approved these changes
Dec 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
florian-h05
added a commit
to openhab/openhab-js
that referenced
this pull request
Dec 5, 2022
* README: Add `SCRIPT` transformation Reference openhab/openhab-core#2883. The "graaljs" MIME type is introduced in openhab/openhab-addons#13851. Please note that the transformation docs link might not work now, as the doc updates aren't published yet. * README: Use var instead of const and let in examples Usage of const and let lead to problems in UI scripts and therefore the examples should not use them. Signed-off-by: Florian Hotze <[email protected]>
morph166955
pushed a commit
to morph166955/openhab-addons
that referenced
this pull request
Dec 18, 2022
The alternative MIME type text/javascript is also used by Nashorn, therefore we add the same extension as for the main MIME type. The alias is introduced to simplify the usage in SCRIPT transformation profiles. * Fix syntax problems in the bndtools file * Add null check to avoid potential NPE In some cases during testing, a NPE occured, this should solve it. Signed-off-by: Florian Hotze <[email protected]> Signed-off-by: Ben Rosenblum <[email protected]>
andrasU
pushed a commit
to andrasU/openhab-addons
that referenced
this pull request
Dec 24, 2022
The alternative MIME type text/javascript is also used by Nashorn, therefore we add the same extension as for the main MIME type. The alias is introduced to simplify the usage in SCRIPT transformation profiles. * Fix syntax problems in the bndtools file * Add null check to avoid potential NPE In some cases during testing, a NPE occured, this should solve it. Signed-off-by: Florian Hotze <[email protected]> Signed-off-by: Andras Uhrin <[email protected]>
borazslo
pushed a commit
to borazslo/openhab-mideaac-addon
that referenced
this pull request
Jan 8, 2023
The alternative MIME type text/javascript is also used by Nashorn, therefore we add the same extension as for the main MIME type. The alias is introduced to simplify the usage in SCRIPT transformation profiles. * Fix syntax problems in the bndtools file * Add null check to avoid potential NPE In some cases during testing, a NPE occured, this should solve it. Signed-off-by: Florian Hotze <[email protected]>
psmedley
pushed a commit
to psmedley/openhab-addons
that referenced
this pull request
Feb 23, 2023
The alternative MIME type text/javascript is also used by Nashorn, therefore we add the same extension as for the main MIME type. The alias is introduced to simplify the usage in SCRIPT transformation profiles. * Fix syntax problems in the bndtools file * Add null check to avoid potential NPE In some cases during testing, a NPE occured, this should solve it. Signed-off-by: Florian Hotze <[email protected]>
nemerdaud
pushed a commit
to nemerdaud/openhab-addons
that referenced
this pull request
Feb 28, 2023
The alternative MIME type text/javascript is also used by Nashorn, therefore we add the same extension as for the main MIME type. The alias is introduced to simplify the usage in SCRIPT transformation profiles. * Fix syntax problems in the bndtools file * Add null check to avoid potential NPE In some cases during testing, a NPE occured, this should solve it. Signed-off-by: Florian Hotze <[email protected]>
andrasU
pushed a commit
to andrasU/openhab-addons
that referenced
this pull request
Jan 6, 2024
The alternative MIME type text/javascript is also used by Nashorn, therefore we add the same extension as for the main MIME type. The alias is introduced to simplify the usage in SCRIPT transformation profiles. * Fix syntax problems in the bndtools file * Add null check to avoid potential NPE In some cases during testing, a NPE occured, this should solve it. Signed-off-by: Florian Hotze <[email protected]> Signed-off-by: Andras Uhrin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See openhab/openhab-core#2883 (comment) for discussion.
The new MIME types (especially the
graaljs
alias) are introduced to enhance working with JS Scripting in theSCRIPT
transformation profile (openhab/openhab-core#2883, docs openhab/openhab-docs#1940).Furthermore, this catches a potential NPE (it occured sometimes during testing due to reloading bundles I think) which I never experienced in production.
Also, I fiexed the syntax problems in the bndtools file.
I will provide the JS Scripting add-on docs for usage of the
SCRIPT
transformation soon, they will come with the openhab-js version bump to the add-on (for the docs, see openhab/openhab-js#190).@J-N-K FYI
@wborn FYI, can you review and merge?
And can one of you both please have a look at my changes to
bnd.bnd
to verify that they are fine.