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

stronger types #49

Merged
merged 2 commits into from
Dec 13, 2022
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
9 changes: 1 addition & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
]
},
"plugins": ["@typescript-eslint"],
"ignorePatterns": [
"*.min.*",
"Gruntfile.js",
"zonesdb.js",
"generator.js",
"set-release.js",
"dist/"
],
"ignorePatterns": ["*.min.*", "Gruntfile.js", "zonesdb.js", "generator.js", "set-release.js", "dist/"],
"rules": {}
}
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy GitHub Pages

on:
push:
branches: ["main"]
branches: ['main']

workflow_dispatch:

Expand All @@ -12,7 +12,7 @@ permissions:
id-token: write

concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion api/zones.json
Original file line number Diff line number Diff line change
Expand Up @@ -594,4 +594,4 @@
"W-SU",
"WET",
"Zulu"
]
]
24 changes: 12 additions & 12 deletions generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Add to Calendar TimeZones iCal Library
* ++++++++++++++++++++++++++++++++++++++
*
* Version: 1.5.0
* Version: 1.5.1
* Creator: Jens Kuerschner (https://jenskuerschner.de)
* Project: https://github.com/add2cal/timezones-ical-library
* License: Apache-2.0
Expand Down Expand Up @@ -43,17 +43,17 @@ const overviewJson = [];
const tzNamesSecDb = [];
const tzFinal = {};
const shortenerMap = {
"<br>":"<n>",
"TZNAME:":"<tz>",
"TZOFFSETFROM:":"<of>",
"TZOFFSETTO:":"<ot>",
"DTSTART:":"<s>",
"RRULE:":"<r>",
"BEGIN:DAYLIGHT":"<bd>",
"END:DAYLIGHT":"<ed>",
"BEGIN:STANDARD":"<bs>",
"END:STANDARD":"<es>"
}
'<br>': '<n>',
'TZNAME:': '<tz>',
'TZOFFSETFROM:': '<of>',
'TZOFFSETTO:': '<ot>',
'DTSTART:': '<s>',
'RRULE:': '<r>',
'BEGIN:DAYLIGHT': '<bd>',
'END:DAYLIGHT': '<ed>',
'BEGIN:STANDARD': '<bs>',
'END:STANDARD': '<es>',
};
for (const index in tz) {
overviewJson.push(index);
const contentParts = tz[`${index}`].split('<br>LAST-MODIFIED:');
Expand Down
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module 'timezones-ical-library' {
export function tzlib_get_ical_block(tzName: string, jsonType?: boolean): void;
export function tzlib_get_offset(tzName: string, isoDate: string, isoTime: string): void;
export function tzlib_get_timezones(jsonType?: boolean): void;
export function tzlib_get_ical_block(tzName: string, jsonType?: boolean): string[] | string;
export function tzlib_get_offset(tzName: string, isoDate: string, isoTime: string): string;
export function tzlib_get_timezones(jsonType?: boolean): string[] | string;
}
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<script async defer data-website-id="f221953d-158e-46c9-88d1-3b05df00997a" src="./demo_assets/js/a.min.js" data-host-url="https://a.add-to-calendar-button.com" data-domains="tz.add-to-calendar-technology.com"></script>

<!-- load some basic css just for this demo page here -->
<link rel="stylesheet" href="./demo_assets/css/demopage.min.css?v=1.5.0">
<link rel="stylesheet" href="./demo_assets/css/demopage.min.css?v=1.5.1">

</head>
<body>
Expand Down Expand Up @@ -263,15 +263,15 @@ <h3>Background story</h3>
This page is hosted via "GitHub Pages". It includes some very basic analytics, that still preserves your anonymity and does not use any cookies. However, mind that the GitHub privacy policy applies additionally (<a target="_blank" rel="noopener" href="https://docs.github.com/en/github/site-policy/github-privacy-statement">click here for details</a>).
</p>
</div>
<div id="tiny-version">v1.5.0</div>
<div id="tiny-version">v1.5.1</div>

</div>


<!-- js stuff -->
<script type="application/javascript" src="./dist/tzlib.js?v=1.5.0"></script>
<script type="application/javascript" src="./dist/tzlib.js?v=1.5.1"></script>
<script type="application/javascript" src="./demo_assets/js/autocomplete.min.js"></script>
<script type="application/javascript" src="./demo_assets/js/demopage.min.js?v=1.5.0"></script>
<script type="application/javascript" src="./demo_assets/js/demopage.min.js?v=1.5.1"></script>

</body>
</html>
Loading