Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "submodules/YoHours"]
path = submodules/YoHours
url = https://framagit.org/PanierAvide/YoHours.git
[submodule "submodules/openholidaysapi.data"]
path = submodules/openholidaysapi.data
url = https://github.com/openpotato/openholidaysapi.data.git
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ We use a branching model inspired by Gitflow:
When the `develop` branch is deemed ready for a new release:

1. A maintainer prepares the release in a `release/` branch based on `develop`.
2. The maintainer runs `make release-prepare` locally.
2. The maintainer decides if a release candidate should be released, if rc `npx commit-and-tag-version --prerelease=rc` should be run locally, if not `make release-local` should be run. In case a maintainer does not have a separate OpenSSH/OpenPGP key for releases, they can use their regular signing key. The maintainer pushes the signed git tag to their repo fork.
2. This pull request will be reviewed and then merged into `develop`
3. The maintainer creates a new pull request from `develop` to `main`.
5. ypid who is currently the only one who can release to npmjs.com gets assigned the pull requests, pulls the signed git tag and runs `make release-publish` on their machine and finally merges the pull request.
4. ypid creates a release on GitHub and marks it as latest.
2. The maintainer updates school holiday data: `node scripts/fetch-school-holidays.mjs` and commits any changes.
3. The maintainer runs `make release-prepare` locally.
4. The maintainer decides if a release candidate should be released, if rc `npx commit-and-tag-version --prerelease=rc` should be run locally, if not `make release-local` should be run. In case a maintainer does not have a separate OpenSSH/OpenPGP key for releases, they can use their regular signing key. The maintainer pushes the signed git tag to their repo fork.
5. This pull request will be reviewed and then merged into `develop`
6. The maintainer creates a new pull request from `develop` to `main`.
7. ypid who is currently the only one who can release to npmjs.com gets assigned the pull requests, pulls the signed git tag and runs `make release-publish` on their machine and finally merges the pull request.
8. ypid creates a release on GitHub and marks it as latest.

## Translation Contributions

Expand Down
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,17 +611,13 @@ Almost everything from opening_hours definition is supported, as well as some ex

- Support for school holidays (`SH 10:00-14:00`).

- Countries with SH definition:

- Austria (national until 2024, regional until 2021)
- Belgium (good until 2026)
- Croatia (good until 2022–2023)
- France (good until 2025)
- Germany, see [hc] and [scripts/update_german_sh.mjs](scripts/update_german_sh.mjs) (good until 2026)
- Greece (good until 2020)
- Hungary (good until 2024–2025)
- Luxembourg (good until 2025–2026)
- Romania (good until 2021)
School holidays are automatically sourced from the [OpenHolidays API](https://openholidaysapi.org) for 33 countries (from 2020 onwards). Update data by running:

```bash
node scripts/fetch-school-holidays.mjs
```

For details see [src/holidays/README.md](src/holidays/README.md).

- There can be two cases which need to be separated (this applies for PH and SH):

Expand Down Expand Up @@ -876,7 +872,6 @@ Edit: This does also work on npmjs in this short version … -->
[ohlib.library-api]: #library-api
[ohlib.npmjs]: https://www.npmjs.org/package/opening_hours
[ohlib.github]: https://github.com/opening-hours/opening_hours.js
[hc]: https://gitlab.com/ypid/hc
[evaluation tool]: https://openingh.openstreetmap.de/evaluation_tool/
[ph-ar]: https://en.wikipedia.org/wiki/Public_holidays_in_Argentina
[ph-at]: https://de.wikipedia.org/wiki/Feiertage_in_%C3%96sterreich
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import stylistic from '@stylistic/eslint-plugin'
import tseslint from 'typescript-eslint'

export default defineConfig([
globalIgnores(['build/*', 'submodules/*', '**/yohours_model.js']),
globalIgnores(['build/*', 'submodules/*', '**/yohours_model.js', 'src/holidays/generated-openholidays.js']),
{
files: ['**/*.js', '**/*.mjs'],
extends: [js.configs.recommended],
Expand Down
14 changes: 3 additions & 11 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ import nodeResolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import yaml from '@rollup/plugin-yaml';

function recursivelyDeleteNominatimUrl(data) {
if (typeof data === 'object') {
Object.values(data).forEach(recursivelyDeleteNominatimUrl);
}
delete data._nominatim_url;
return data;
}

// YAML plugin only for non-holiday files (e.g., word_error_correction.yaml)
// Holiday data now comes from generated-openholidays.js
const yamlPlugin = yaml({
transform(data) {
return recursivelyDeleteNominatimUrl(data);
}
include: ['**/*.yaml', '!**/holidays/*.yaml']
});

const terserConfig = {
Expand Down
Loading