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

Changes for new release #468

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
a112e25
Create cn.yml
SierraIm Aug 7, 2021
470a13d
change cn.yaml
SierraIm Aug 8, 2021
9ae4f68
Update cn.yaml
SierraIm Aug 9, 2021
1f55eb9
Merge branch 'master' into master
SierraIm Aug 18, 2021
46d0b21
Create na.yaml
habi Nov 1, 2023
0bd7e0e
Add holy friday and Carnival days of Argentina.
jmdocile Dec 31, 2023
d309ae0
I add the missing holidays in Argentina for 2024
jmdocile Jan 7, 2024
b4ae3de
Add SH for be for 2024-2026
pietervdvn Jan 16, 2024
abc5753
Add Luxembourg holidays
LukeVader-IV Mar 21, 2024
92b85e6
add Ascension Day for Sweden and Finland
0x9fff00 Jul 15, 2024
6671599
fix Swedish name of Midsummer Day for Finland
0x9fff00 Jul 15, 2024
fcb2848
Update Hungarian school holidays
urbalazs Aug 9, 2024
2d28f1c
Fix 'yamlToJson.mjs'
KristjanESPERANTO Dec 30, 2024
54b7bc6
Fix link to test/test.en.log
KristjanESPERANTO Dec 31, 2024
ed4855f
Add missing contributors field
KristjanESPERANTO Jan 1, 2025
82d534a
Update husky
KristjanESPERANTO Jan 1, 2025
91da3f5
Update actions and use new node versions
KristjanESPERANTO Jan 1, 2025
5d28b90
Update changelog
KristjanESPERANTO Jan 1, 2025
3431c46
Update year
KristjanESPERANTO Jan 1, 2025
fbf22db
Upgrade ESLint
KristjanESPERANTO Jan 1, 2025
3f95794
Update URLs
KristjanESPERANTO Dec 30, 2024
44149ce
Merge branch '#466' into develop
KristjanESPERANTO Jan 1, 2025
c265706
Merge branch '#465' into develop
KristjanESPERANTO Jan 1, 2025
370a2d9
Update CHANGELOG
KristjanESPERANTO Jan 1, 2025
261f86b
Fix name
KristjanESPERANTO Jan 1, 2025
f33f800
Update German school holidays
KristjanESPERANTO Jan 2, 2025
e211cf5
Merge branch '#406' into develop
KristjanESPERANTO Jan 2, 2025
71b46ef
Fix braces and format
KristjanESPERANTO Jan 2, 2025
5f6a20b
Merge branch '#452' into develop
KristjanESPERANTO Jan 2, 2025
d121f96
Merge branch '#456' into develop
KristjanESPERANTO Jan 2, 2025
47bc556
Fix format
KristjanESPERANTO Jan 2, 2025
5e1849f
Merge branch '#457' into develop
KristjanESPERANTO Jan 2, 2025
a5814c8
Merge branch '#460' into develop
KristjanESPERANTO Jan 3, 2025
bf53dca
Fix format
KristjanESPERANTO Jan 2, 2025
7368dc3
Update CHANGELOG
KristjanESPERANTO Jan 2, 2025
fa80bed
Upgrade colors
KristjanESPERANTO Jan 3, 2025
c501c39
Update dependencies
KristjanESPERANTO Jan 3, 2025
5ea11a2
[Evaluation tool] Fix timebar wrap on certain zoom levels in Firefox
KristjanESPERANTO Jan 3, 2025
2b93ce5
Replace js-yaml with yaml
KristjanESPERANTO Jan 5, 2025
04c1fe7
Move minification into rollup
KristjanESPERANTO Jan 7, 2025
d76ea19
Add code-style-check
KristjanESPERANTO Jan 7, 2025
2c13144
Fix "make list"
KristjanESPERANTO Jan 7, 2025
93ba575
Add sourcemap
KristjanESPERANTO Jan 7, 2025
228b664
Remove old jshint globals
KristjanESPERANTO Jan 7, 2025
e81cb0f
Change benchmark script to esm
KristjanESPERANTO Jan 7, 2025
8730905
Add moment, Remove built-in dependencies
KristjanESPERANTO Jan 7, 2025
0aa81af
Use Node.js built-in module syntax for imports
KristjanESPERANTO Jan 7, 2025
88ef3f0
Add cn, lu and na
KristjanESPERANTO Jan 7, 2025
0193d13
Update i18next resources to v4
KristjanESPERANTO Jan 9, 2025
b7efe80
Review (no functional changes)
KristjanESPERANTO Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .eslintrc.js

This file was deleted.

75 changes: 37 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,59 @@
---
# SPDX-FileCopyrightText: 2021 Robin Schneider <[email protected]>
# SPDX-FileCopyrightText: 2021-2025 Robin Schneider <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0

name: Continuous Integration

"on":
- "push"
- "pull_request"

env:
npm_config_cache: /tmp/npm-cache

jobs:
build:
runs-on: "ubuntu-latest"
code-style-check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Use Node.js"
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- name: "Install dependencies"
run: npm install
- name: "Run linter tests"
run: npm run lint

build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
# Support policy: We support every Node.js version that is still "maintained".
# Testing unmaintained versions serves no purpose.
- "10.x"

# 12 is in Debian stable but not supported by upstream anymore. Keep it for now.
- "12.x"

- "14.x"
- "15.x"

# TODO: Does not work without updating integration tests? Needs work.
# - "16.x"
# - "17.x"
# - "18.x"

# See: https://nodejs.org/en/about/releases/
- "18.x"
- "20.x"
- "22.x"
- "23.x"
steps:
- uses: actions/checkout@v3

- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Add ~/.local/bin to $PATH
run: 'printf "%s/.local/bin\n" "${HOME}" >> ${GITHUB_PATH}'

- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
# use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
id: npm-cache
- id: npm-cache
name: Restore npm cache
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-

key: npm-cache-${{ github.ref_name }}
path: ${{ env.npm_config_cache }}
- name: Install dependencies
run: make dependencies-get

- run: make check-full
- name: Run full test suite
run: make check-full
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2013-2017 Robin Schneider <[email protected]>
# SPDX-FileCopyrightText: 2013-2025 Robin Schneider <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
2 changes: 0 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

git stash -q --keep-index

# # Redirect output to stderr.
Expand Down
2 changes: 1 addition & 1 deletion .mailmap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021 Robin Schneider <[email protected]>
# SPDX-FileCopyrightText: 2021-2025 Robin Schneider <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0

Expand Down
39 changes: 32 additions & 7 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. SPDX-FileCopyrightText: 2016-2021 Robin Schneider <[email protected]>
.. SPDX-FileCopyrightText: 2016-2025 Robin Schneider <[email protected]>
..
.. SPDX-License-Identifier: LGPL-3.0-only

Expand All @@ -7,8 +7,8 @@ Changelog

All notable changes to opening_hours.js will be documented in this file.

This project adheres to `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`__
and `human-readable changelog <http://keepachangelog.com/en/0.3.0/>`__.
This project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`__
and `human-readable changelog <https://keepachangelog.com/en/0.3.0/>`__.

Note that most of the v2.X.Z releases have not been added to the changelog yet.

Expand Down Expand Up @@ -173,25 +173,50 @@ Added

* Public holiday definitions added:

* Chinese (#406)
* Croatian
* Luxembourg (#460)
* Namibian (#452)

* School holiday definitions added:

* Croatian
* France
* Luxembourg (#460)

Changed
~~~~~~~

* Public holiday definitions updated:

* Argentina (#456)
* Swedish and Finnish (#465)

* School holiday definitions updated:

* Hungarian
* Belgium (#457)
* German (#468)
* Hungarian (#466)

* [chore] Update CI in `ci.yml` (#468)
* Replace deprecated `set-output`
* Test with maintained node versions
* Update actions
* [chore] Upgrade `colors`, `husky` and `eslint` (#468)
* [chore] Update dependencies (#468)
* [chore] Update year in copyright notices (#468)
* [chore] Move minification into rollup and remove `esbuild` (#468)
* [chore] Also build sourcemap to minified files (#468)
* [chore] Add code-style-check to CI (#468)
* [chore] Change benchmark script to esm (#468)

Fixed
~~~~~

* JOSM remote control was not working because it was trying to be accessed as https://localhost:8111/. Switch to HTTP.

* [Evaluation tool] Fix timebar wrap on certain zoom levels in Firefox (issue #419)
* [chore] Fix `yamlToJson.mjs` (#468)
* [chore] Fix `make list` (#468)

v3.8.0_ - 2022-05-18
--------------------
Expand Down Expand Up @@ -338,8 +363,8 @@ Changed
* Change directory layout of the project. [napei_, ypid_]
* Switch from i18next-client to i18next dependency (no longer as peer dependency). [fodor0205_, ypid_]

.. _ES2015 modules: http://exploringjs.com/es6/ch_modules.html
.. _rollup: http://rollupjs.org/
.. _ES2015 modules: https://exploringjs.com/es6/ch_modules.html
.. _rollup: https://rollupjs.org/

Fixed
~~~~~
Expand Down
6 changes: 3 additions & 3 deletions LICENSES/AGPL-3.0-only.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://www.fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Expand Down Expand Up @@ -587,7 +587,7 @@ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.

You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

Expand All @@ -600,4 +600,4 @@ programs; see section 13 for the specific requirements.

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. For
more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.
more information on this, and how to apply and follow the GNU AGPL, see <https://www.gnu.org/licenses/>.
2 changes: 1 addition & 1 deletion LICENSES/LGPL-3.0-or-later.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://www.fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Expand Down
34 changes: 17 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,25 @@ default: list

## help {{{
.PHONY: list
# https://stackoverflow.com/a/26339924/2239985
# List all available targets in the Makefile by:
# 1. Using grep to find lines that start with non-comment, non-whitespace chars and contain ':'
# 2. Extracting the target names before the ':' using cut
# 3. Sorting the target names alphabetically
# 4. Adding 4 spaces indentation at the start of each line for pretty printing
# 5. Removing duplicate lines using uniq
list:
@echo "This Makefile has the following targets:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | sed 's/^/ /'
@grep '^[^#[:space:]].*:' Makefile \
| cut -d: -f1 \
| sort \
| sed 's/^/ /' \
| uniq
## }}}

## defaults {{{
.PHONY: build
build: build/opening_hours.min.js \
build/opening_hours+deps.min.js
build: build/opening_hours.js \
build/opening_hours+deps.js

.PHONY: check
check: qa-quick check-fast check-package.json
Expand Down Expand Up @@ -95,7 +104,6 @@ dependencies-get: package.json
npm install
pip3 install --user yamllint yq

# colors above v0.6.1 broke the 'bold' option. For what we need this package, v0.6.1 is more than sufficient.
.PHONY: update-dependency-versions
update-dependency-versions: package.json
npm run check-updates
Expand Down Expand Up @@ -154,7 +162,7 @@ check-test: check-opening_hours.js
check-fast: check-diff-opening_hours.js

.PHONY: check-all-diff
check-all-diff: check-all-lang-diff check-diff-opening_hours.min.js
check-all-diff: check-all-lang-diff check-diff-opening_hours.js

.PHONY: check-all-lang-diff
check-all-lang-diff:
Expand All @@ -168,7 +176,7 @@ check-opening_hours.min.js:
check-diff-%: build/% test/test.js
@rm -rf "test/test.$(CHECK_LANG).log"
@echo "Testing to reproduce test/test.$(CHECK_LANG).log using $<."
@NODE_ICU_DATA=$(NODE_ICU_DATA) $(NODEJS) test/test.js --library-file "$<" --locale $(CHECK_LANG) 1> test/test.$(CHECK_LANG).log 2>&1 || true; \
@NODE_ICU_DATA=$(NODE_ICU_DATA) FORCE_COLOR=true $(NODEJS) test/test.js --library-file "$<" --locale $(CHECK_LANG) 1> test/test.$(CHECK_LANG).log 2>&1 || true; \
if git diff --quiet --exit-code HEAD -- "test/test.$(CHECK_LANG).log"; then \
echo "Test results for $< ($(CHECK_LANG)) are exactly the same as on development system. So far, so good ;)"; \
else \
Expand All @@ -195,8 +203,8 @@ benchmark-opening_hours.js:
benchmark-opening_hours.min.js:

# .PHONY: benchmark
benchmark-%.js: build/%.js scripts/benchmark.js
$(NODEJS) scripts/benchmark.js "../$<"
benchmark-%.js: build/%.js scripts/benchmark.mjs
$(NODEJS) scripts/benchmark.mjs "../$<"

.PHONY: check-package.json
check-package.json: package.json
Expand Down Expand Up @@ -488,14 +496,6 @@ build/opening_hours.js:
build/opening_hours+deps.js:
DEPS=YES node_modules/.bin/rollup -c

build/opening_hours.min.js:
build/opening_hours+deps.min.js:

# TODO: Figure out why this generates a broken minified version: TypeError: opening_hours is not a constructor
# ./node_modules/.bin/esbuild --bundle "$<" --outfile="$@"
build/%.min.js: build/%.js
./node_modules/.bin/terser --output "$@" --comments '/github.com/' "$<"

README.html:

%.html: %.md
Expand Down
Loading
Loading