easter-date.js 0.1.9 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![NPM Type Definitions](https://img.shields.io/npm/types/easter-date.js)](https://www.npmjs.com/package/easter-date.js)
4
4
  [![CodeQL](https://github.com/42proger/easter-date.js/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/42proger/easter-date.js/actions/workflows/github-code-scanning/codeql)
5
- [![npm bundle size](https://img.shields.io/bundlephobia/minzip/easter-date.js)](https://www.npmjs.com/package/easter-date.js)
5
+ [![install size](https://packagephobia.com/badge?p=easter-date.js)](https://packagephobia.com/result?p=easter-date.js)
6
6
 
7
7
  This project provides two algorithms for calculating the date of Easter in the Western (Catholic and Protestant) and Orthodox calendars.
8
8
 
@@ -1 +1 @@
1
- "use strict";function u(t){const c=t%19,f=t%4,h=t%7,e=(19*c+15)%30,d=(2*f+4*h+6*e+6)%7,o=e+d,n=o<=26?4:5;return{day:o<=26?o+4:o-26,month:n,year:t}}function g(t){const c=t%19,f=t%4,h=t%7,e=Math.floor(t/100),d=Math.floor((13+8*e)/25),o=Math.floor(e/4),n=(15-d+e-o)%30,M=(4+e-o)%7,s=(19*c+n)%30,r=(2*f+4*h+6*s+M)%7,l=s+r+22,i=l<=31?3:4;let a;return s===29&&r===6?a=19:s===28&&r===6&&(11*n+11)%30<19?a=18:a=l<=31?l:s+r-9,{day:a,month:i,year:t}}exports.getOrthodoxEaster=u,exports.getWesternEaster=g;
1
+ "use strict";function d(t){if(!Number.isInteger(t))throw new TypeError("year must be an integer");const f=t%19,h=t%4,i=t%7,e=(19*f+15)%30,c=(2*h+4*i+6*e+6)%7,r=e+c,o=r<=26?4:5;return{day:r<=26?r+4:r-26,month:o,year:t}}function l(t){if(!Number.isInteger(t))throw new TypeError("year must be an integer");const f=t%19,h=t%4,i=t%7,e=Math.floor(t/100),c=Math.floor((13+8*e)/25),r=Math.floor(e/4),o=(15-c+e-r)%30,g=(4+e-r)%7,n=(19*f+o)%30,s=(2*h+4*i+6*n+g)%7,u=n+s+22,b=u<=31?3:4;let a;return n===29&&s===6?a=19:n===28&&s===6&&(11*o+11)%30<19?a=18:a=u<=31?u:n+s-9,{day:a,month:b,year:t}}exports.getOrthodoxEaster=d,exports.getWesternEaster=l;
@@ -1 +1 @@
1
- function u(t){const c=t%19,f=t%4,h=t%7,o=(19*c+15)%30,l=(2*f+4*h+6*o+6)%7,e=o+l,s=e<=26?4:5;return{day:e<=26?e+4:e-26,month:s,year:t}}function D(t){const c=t%19,f=t%4,h=t%7,o=Math.floor(t/100),l=Math.floor((13+8*o)/25),e=Math.floor(o/4),s=(15-l+o-e)%30,d=(4+o-e)%7,n=(19*c+s)%30,a=(2*f+4*h+6*n+d)%7,M=n+a+22,i=M<=31?3:4;let r;return n===29&&a===6?r=19:n===28&&a===6&&(11*s+11)%30<19?r=18:r=M<=31?M:n+a-9,{day:r,month:i,year:t}}export{u as getOrthodoxEaster,D as getWesternEaster};
1
+ function l(t){if(!Number.isInteger(t))throw new TypeError("year must be an integer");const f=t%19,h=t%4,i=t%7,e=(19*f+15)%30,c=(2*h+4*i+6*e+6)%7,n=e+c,r=n<=26?4:5;return{day:n<=26?n+4:n-26,month:r,year:t}}function m(t){if(!Number.isInteger(t))throw new TypeError("year must be an integer");const f=t%19,h=t%4,i=t%7,e=Math.floor(t/100),c=Math.floor((13+8*e)/25),n=Math.floor(e/4),r=(15-c+e-n)%30,b=(4+e-n)%7,o=(19*f+r)%30,s=(2*h+4*i+6*o+b)%7,u=o+s+22,g=u<=31?3:4;let a;return o===29&&s===6?a=19:o===28&&s===6&&(11*r+11)%30<19?a=18:a=u<=31?u:o+s-9,{day:a,month:g,year:t}}export{l as getOrthodoxEaster,m as getWesternEaster};
package/lib/main.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import getOrthodoxEaster from "./utils/orthodox_easter";
2
+ import getWesternEaster from "./utils/western_easter";
3
+ export { getOrthodoxEaster, getWesternEaster };
@@ -0,0 +1,3 @@
1
+ import { EasterDate } from "../types/types";
2
+ declare function getOrthodoxEaster(year: number): EasterDate;
3
+ export default getOrthodoxEaster;
@@ -0,0 +1,3 @@
1
+ import { EasterDate } from "../types/types";
2
+ declare function getWesternEaster(year: number): EasterDate;
3
+ export default getWesternEaster;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easter-date.js",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "description": "Calculating the date of Easter based on the Gauss algorithm.",
5
5
  "author": "42proger",
6
6
  "license": "MIT",
@@ -18,26 +18,31 @@
18
18
  "type": "module",
19
19
  "main": "./lib/easter-date.cjs",
20
20
  "module": "./lib/easter-date.js",
21
- "types": "./src/types/types.d.ts",
21
+ "types": "./lib/main.d.ts",
22
22
  "exports": {
23
23
  ".": {
24
24
  "require": "./lib/easter-date.cjs",
25
25
  "import": "./lib/easter-date.js",
26
- "types": "./src/types/types.d.ts"
26
+ "types": "./lib/main.d.ts"
27
27
  }
28
28
  },
29
29
  "scripts": {
30
- "build": "rollup -c",
30
+ "build": "rollup -c && npm run build:types",
31
+ "build:types": "tsc --declaration --emitDeclarationOnly --declarationDir lib src/main.ts",
31
32
  "test": "jest"
32
33
  },
33
34
  "devDependencies": {
34
- "@rollup/plugin-typescript": "^12.1.4",
35
+ "@rollup/plugin-typescript": "^12.3.0",
35
36
  "@types/jest": "^30.0.0",
36
- "jest": "^30.1.0",
37
- "rollup": "^4.49.0",
37
+ "jest": "^30.2.0",
38
+ "rollup": "^4.59.0",
38
39
  "rollup-plugin-esbuild": "^6.2.1",
39
- "ts-jest": "^29.4.1",
40
+ "ts-jest": "^29.4.6",
40
41
  "tslib": "^2.8.1",
41
- "typescript": "^5.9.2"
42
+ "typescript": "^5.9.3"
43
+ },
44
+ "overrides": {
45
+ "minimatch": "^10",
46
+ "glob": "^13.0.0"
42
47
  }
43
- }
48
+ }