Modify

#14381 closed enhancement (fixed)

Update to opening_hours v3.5.0

Reported by: ypid23 Owned by: ypid23
Priority: normal Milestone: 17.02
Component: Core validator Version: latest
Keywords: opening_hours Cc: simon04

Description (last modified by ypid23)

Hey

Please update to opening_hours v3.5.0 which fixes one issue with the legacy 12-hour clock format. 12:xxAM and 12:xxPM was handled incorrectly. This could lead to wrong data in OSM when users do an automatic fix of opening_hours. The other changes should not effect JOSM usage of the library.

Release: https://github.com/opening-hours/opening_hours.js/releases/tag/v3.5.0

Attachments (0)

Change History (14)

comment:1 Changed 10 months ago by ypid23

Description: modified (diff)

comment:2 Changed 10 months ago by Klumbumbus

Milestone: 17.02

comment:3 Changed 10 months ago by Don-vip

Cc: simon04 added
Owner: changed from team to ypid23
Status: newneedinfo

What's the command line to generate the .js file we include in JOSM, I don't remember?

comment:4 Changed 10 months ago by Don-vip

Type: defectenhancement

comment:5 Changed 10 months ago by stoecker

See also #14392.

comment:6 Changed 10 months ago by simon04

Resolution: fixed
Status: needinfoclosed

In 11592/josm:

fix #14381 - Update version of opening_hours.js to 3.5.0

Generated using make opening_hours.min.js.

comment:7 Changed 10 months ago by Klumbumbus

Resolution: fixed
Status: closedreopened

comment:8 Changed 10 months ago by Don-vip

In 11594/josm:

see #14381 - don't try to display message dialog on headless environment if a test can't be initialized

comment:9 Changed 10 months ago by Don-vip

javax.script.ScriptException: ReferenceError: "require" is not defined in <eval> at line number 1
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.openstreetmap.josm.data.validation.tests.OpeningHourTest.initialize(OpeningHourTest.java:55)
	at org.openstreetmap.josm.data.validation.tests.ConditionalKeys.initialize(ConditionalKeys.java:50)
	at org.openstreetmap.josm.data.validation.tests.ConditionalKeysTest.setUp(ConditionalKeysTest.java:27)
Caused by: <eval>:1 ReferenceError: "require" is not defined
	at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:319)
	at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:291)
	at jdk.nashorn.internal.objects.Global.__noSuchProperty__(Global.java:1441)
	at jdk.nashorn.internal.scripts.Script$21$\^eval\_.:program(<eval>:1)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)

What's wrong?

comment:10 Changed 10 months ago by Don-vip

A lot of stuff seems to be missing, are you sure make opening_hours.min.js was the only command we had to run?

comment:11 Changed 10 months ago by Don-vip

I think the correct one is make opening_hours+deps.min.js

comment:12 Changed 10 months ago by Don-vip

In 11595/josm:

see #11755, see #14381 - Update version of opening_hours.js to 3.5.0

Generated using npm install browserify moment i18next-client country-language suncalc && make opening_hours+deps.min.js

comment:13 Changed 10 months ago by simon04

Damn, my hacky IntelliJ config fooled me (again). After updating the JS file, I ran the test. But since I obtain the data/… resources from a built JAR file and I did not build an updated JAR file, I basically tested the old JS code. Sorry.

comment:14 Changed 10 months ago by Don-vip

Resolution: fixed
Status: reopenedclosed

In 11597/josm:

fix #14381 - Update presets to last version of opening_hours.js

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain ypid23.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.