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

[jsscripting] Use application/javascript as MIME type #14096

Merged
merged 4 commits into from
Dec 29, 2022

Conversation

florian-h05
Copy link
Contributor

With openHAB on the horizon and the NashornJS engine available as an addon with MIME type application/javascript;version=ECMAScript-5.1, GraalJS should take over the application/javascript MIME type.

@florian-h05 florian-h05 added the work in progress A PR that is not yet ready to be merged label Dec 28, 2022
@florian-h05 florian-h05 changed the title [jsscripting] Switch to the main MIME type [jsscripting] Use application/javascript as MIME type Dec 28, 2022
@florian-h05
Copy link
Contributor Author

florian-h05 commented Dec 28, 2022

@jlaur I've added a unit test that calls the GraalJSScriptEngineFactory, but the test is failing before it even starts and I don't understand why. Can you please help me?
See https://github.com/openhab/openhab-addons/actions/runs/3796816521/jobs/6457249631.

@J-N-K
Copy link
Member

J-N-K commented Dec 28, 2022

Please make sure that application/javascript;version=ECMAScript-2021 still works. Otherwise user would have to re-create all UI based rules.

@florian-h05
Copy link
Contributor Author

@J-N-K

I was not sure if we want to keep that backward compatiblity (FYI: #14093 upgrades to ECMA2022), I had it in but removed it then. I'll just revert the removal. FYI, I have a UI PR that will add a menu to change the script type: openhab/openhab-webui#1601.

@florian-h05
Copy link
Contributor Author

@J-N-K Can you help me with the failing unit test? It's failing before it even starts ...

@J-N-K
Copy link
Member

J-N-K commented Dec 29, 2022

I guess it's the same as here, but I have no idea why it failes in automation.jsscripting but not in binding.dmx.

@florian-h05
Copy link
Contributor Author

The test is nearly the same as for JS Scripting (Nashorn) and there it works. As no one has an idea why it fails, I’ll remove it.

@J-N-K
Copy link
Member

J-N-K commented Dec 29, 2022

It‘s probably related to something on the classpath.

@florian-h05 florian-h05 force-pushed the jsscripting-mimetypes branch from 4e459ad to c9adf57 Compare December 29, 2022 13:40
@florian-h05 florian-h05 removed help wanted work in progress A PR that is not yet ready to be merged labels Dec 29, 2022
@florian-h05 florian-h05 requested a review from a team December 29, 2022 17:40
Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

Thanks!

@wborn wborn merged commit 895defd into openhab:main Dec 29, 2022
@wborn wborn added this to the 4.0 milestone Dec 29, 2022
@florian-h05 florian-h05 deleted the jsscripting-mimetypes branch December 29, 2022 20:02
@wborn wborn added the enhancement An enhancement or new feature for an existing add-on label Dec 30, 2022
florian-h05 added a commit to florian-h05/openhab-webui that referenced this pull request Jan 1, 2023
florian-h05 added a commit to florian-h05/openhab-webui that referenced this pull request Jan 1, 2023
ghys pushed a commit to openhab/openhab-webui that referenced this pull request Jan 3, 2023
borazslo pushed a commit to borazslo/openhab-mideaac-addon that referenced this pull request Jan 8, 2023
crnjan pushed a commit to crnjan/openhab-webui that referenced this pull request Jan 17, 2023
Reference openhab/openhab-addons#14013.
Reference openhab/openhab-addons#14096.

Signed-off-by: Florian Hotze <[email protected]>

Signed-off-by: Florian Hotze <[email protected]>
Signed-off-by: Boris Krivonog <[email protected]>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
renescherer pushed a commit to renescherer/openhab-addons that referenced this pull request Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants