@equisoft/tax-us 1.0.0 → 1.0.1-snapshot.20251118191820

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/.tool-versions CHANGED
@@ -1 +1 @@
1
- nodejs 22.17.0
1
+ nodejs 24.11.1
package/RELEASE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Upgrade Steps
2
2
 
3
- -
4
- -
3
+ - [ACTION REQUIRED]
4
+ - You must now use `import { } from @equisoft/tax-us` instead of `import * from @equisopft/tax-us`
5
5
 
6
6
  # Breaking Changes
7
7
 
@@ -1,4 +1,5 @@
1
1
  export * from './life-income-fund';
2
+ export * from './locked-in-retirement-account';
2
3
  export * from './registered-retirement-income-fund';
3
4
  export * from './registered-retirement-savings-plan';
4
5
  export * from './tax-free-savings-account';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./life-income-fund"), exports);
18
+ __exportStar(require("./locked-in-retirement-account"), exports);
18
19
  __exportStar(require("./registered-retirement-income-fund"), exports);
19
20
  __exportStar(require("./registered-retirement-savings-plan"), exports);
20
21
  __exportStar(require("./tax-free-savings-account"), exports);
@@ -0,0 +1,10 @@
1
+ import { FederalCode, ProvinceCode } from '../misc';
2
+ export interface ConversionRule {
3
+ minimumAge: number;
4
+ maximumAge: number;
5
+ }
6
+ export declare const MAX_CONVERSION_AGE = 71;
7
+ export declare const getUnlockingPct: (jurisdiction: ProvinceCode | FederalCode) => number | null;
8
+ export declare const getConversionRules: (jurisdiction: ProvinceCode | FederalCode) => ConversionRule | null;
9
+ export declare const canUnlock: (jurisdiction: ProvinceCode | FederalCode) => boolean;
10
+ export declare const canConvert: (jurisdiction: ProvinceCode | FederalCode, age: number) => boolean;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /*
3
+ Revised
4
+ 2025-08-12
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.canConvert = exports.canUnlock = exports.getConversionRules = exports.getUnlockingPct = exports.MAX_CONVERSION_AGE = void 0;
8
+ exports.MAX_CONVERSION_AGE = 71;
9
+ const federalConversionRule = {
10
+ minimumAge: 55,
11
+ maximumAge: exports.MAX_CONVERSION_AGE,
12
+ };
13
+ const conversionRules = {
14
+ CA: federalConversionRule,
15
+ AB: { minimumAge: 50, maximumAge: exports.MAX_CONVERSION_AGE },
16
+ BC: { minimumAge: 50, maximumAge: exports.MAX_CONVERSION_AGE },
17
+ MB: { minimumAge: 0, maximumAge: exports.MAX_CONVERSION_AGE },
18
+ NB: { minimumAge: 0, maximumAge: exports.MAX_CONVERSION_AGE },
19
+ NL: { minimumAge: 55, maximumAge: exports.MAX_CONVERSION_AGE },
20
+ NS: { minimumAge: 55, maximumAge: exports.MAX_CONVERSION_AGE },
21
+ NT: federalConversionRule,
22
+ NU: federalConversionRule,
23
+ ON: { minimumAge: 55, maximumAge: exports.MAX_CONVERSION_AGE },
24
+ PE: null,
25
+ QC: { minimumAge: 55, maximumAge: exports.MAX_CONVERSION_AGE },
26
+ SK: { minimumAge: 55, maximumAge: exports.MAX_CONVERSION_AGE },
27
+ YT: federalConversionRule,
28
+ };
29
+ const federalUnlockingPct = 0.50;
30
+ const unlockingPct = {
31
+ CA: federalUnlockingPct,
32
+ AB: 0.50,
33
+ BC: null,
34
+ MB: 1.00,
35
+ NB: 0.50,
36
+ NL: 0.50,
37
+ NS: 0.50,
38
+ NT: federalUnlockingPct,
39
+ NU: federalUnlockingPct,
40
+ ON: 0.50,
41
+ PE: null,
42
+ QC: null,
43
+ SK: 1.00,
44
+ YT: federalUnlockingPct,
45
+ };
46
+ const getUnlockingPct = (jurisdiction) => unlockingPct[jurisdiction];
47
+ exports.getUnlockingPct = getUnlockingPct;
48
+ const getConversionRules = (jurisdiction) => conversionRules[jurisdiction];
49
+ exports.getConversionRules = getConversionRules;
50
+ const canUnlock = (jurisdiction) => {
51
+ const pct = (0, exports.getUnlockingPct)(jurisdiction);
52
+ if (!pct)
53
+ return false;
54
+ return pct > 0;
55
+ };
56
+ exports.canUnlock = canUnlock;
57
+ const canConvert = (jurisdiction, age) => {
58
+ const rule = (0, exports.getConversionRules)(jurisdiction);
59
+ if (!rule)
60
+ return false;
61
+ return age >= rule.minimumAge && age <= rule.maximumAge;
62
+ };
63
+ exports.canConvert = canConvert;
@@ -5,3 +5,6 @@ export * from './british-columbia-training-and-education-savings-grant';
5
5
  export * from './tuition-fees';
6
6
  export * from './income-level';
7
7
  export * from './beneficiary';
8
+ export declare const RESP: {
9
+ MAX_CONTRIBUTION: number;
10
+ };
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.RESP = void 0;
17
18
  __exportStar(require("./canada-education-savings-grant"), exports);
18
19
  __exportStar(require("./canada-learning-bond"), exports);
19
20
  __exportStar(require("./quebec-education-savings-incentive"), exports);
@@ -21,3 +22,6 @@ __exportStar(require("./british-columbia-training-and-education-savings-grant"),
21
22
  __exportStar(require("./tuition-fees"), exports);
22
23
  __exportStar(require("./income-level"), exports);
23
24
  __exportStar(require("./beneficiary"), exports);
25
+ exports.RESP = {
26
+ MAX_CONTRIBUTION: 50000,
27
+ };
@@ -0,0 +1,5 @@
1
+ import { ByJurisdiction, FederalCode, ProvinceCode } from '../../../misc';
2
+ import { ConversionRule } from '../../locked-in-retirement-account';
3
+ export declare const mockedUnlockingPct: ByJurisdiction<number | null>;
4
+ export declare const mockedConversionRules: ByJurisdiction<ConversionRule | null>;
5
+ export declare const jurisdictions: (ProvinceCode | FederalCode)[];
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.jurisdictions = exports.mockedConversionRules = exports.mockedUnlockingPct = void 0;
4
+ const MOCKED_MAX_CONVERSION_AGE = 71;
5
+ exports.mockedUnlockingPct = {
6
+ CA: 0.50,
7
+ AB: 0.50,
8
+ BC: 0,
9
+ MB: 1.00,
10
+ NB: 0.50,
11
+ NL: 0.50,
12
+ NS: 0.50,
13
+ NT: null,
14
+ NU: null,
15
+ ON: 0.50,
16
+ PE: null,
17
+ QC: null,
18
+ SK: 1.00,
19
+ YT: null,
20
+ };
21
+ exports.mockedConversionRules = {
22
+ CA: { minimumAge: 55, maximumAge: MOCKED_MAX_CONVERSION_AGE },
23
+ AB: { minimumAge: 50, maximumAge: MOCKED_MAX_CONVERSION_AGE },
24
+ BC: { minimumAge: 50, maximumAge: MOCKED_MAX_CONVERSION_AGE },
25
+ MB: { minimumAge: 0, maximumAge: MOCKED_MAX_CONVERSION_AGE },
26
+ NB: { minimumAge: 0, maximumAge: MOCKED_MAX_CONVERSION_AGE },
27
+ NL: { minimumAge: 55, maximumAge: MOCKED_MAX_CONVERSION_AGE },
28
+ NS: { minimumAge: 55, maximumAge: MOCKED_MAX_CONVERSION_AGE },
29
+ NT: null,
30
+ NU: null,
31
+ ON: { minimumAge: 55, maximumAge: MOCKED_MAX_CONVERSION_AGE },
32
+ PE: null,
33
+ QC: { minimumAge: 55, maximumAge: MOCKED_MAX_CONVERSION_AGE },
34
+ SK: { minimumAge: 55, maximumAge: MOCKED_MAX_CONVERSION_AGE },
35
+ YT: null,
36
+ };
37
+ exports.jurisdictions = [
38
+ 'CA',
39
+ 'AB',
40
+ 'BC',
41
+ 'MB',
42
+ 'NB',
43
+ 'NL',
44
+ 'NS',
45
+ 'NT',
46
+ 'NU',
47
+ 'ON',
48
+ 'PE',
49
+ 'QC',
50
+ 'SK',
51
+ 'YT',
52
+ ];
@@ -9,3 +9,6 @@ export declare const FEDERAL_CODE: FederalCode;
9
9
  export type ByProvince<T> = {
10
10
  [key in ProvinceCode]: T;
11
11
  };
12
+ export type ByJurisdiction<T> = {
13
+ [key in ProvinceCode | FederalCode]: T;
14
+ };
@@ -6,7 +6,7 @@ Sources
6
6
  https://www.canada.ca/en/services/benefits/publicpensions/cpp/old-age-security/benefit-amount.html (delay bonus)
7
7
 
8
8
  Revised
9
- 2025-01-02
9
+ 2025-10-06
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.OAS = void 0;
@@ -58,12 +58,12 @@ exports.OAS = {
58
58
  INCREASE: {
59
59
  AGE: 75,
60
60
  RATE: 0.1,
61
- REPAYMENT_MAX: 154196,
61
+ REPAYMENT_MAX: 157490,
62
62
  },
63
- MONTHLY_PAYMENT_MAX: 734.95,
63
+ MONTHLY_PAYMENT_MAX: 740.09,
64
64
  MONTHLY_DELAY_BONUS: 0.006,
65
65
  REPAYMENT: {
66
- MAX: 148541,
66
+ MAX: 151668,
67
67
  MIN: 93454,
68
68
  RATIO: 0.15,
69
69
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/tax-us",
3
- "version": "1.0.0",
3
+ "version": "1.0.1-snapshot.20251118191820",
4
4
  "description": "US tax data and calculation functions.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,38 +31,39 @@
31
31
  "prepublishOnly": "rm -rf dist/ && yarn build",
32
32
  "test": "NODE_ENV=test jest --config=tests/jest.config.js",
33
33
  "test:ci": "NODE_ENV=test yarn test --runInBand --ci",
34
- "dev:watch": "tsc --watch"
34
+ "watch": "tsc --watch"
35
35
  },
36
36
  "devDependencies": {
37
- "@babel/core": "7.28.0",
38
- "@babel/preset-env": "7.28.0",
39
- "@babel/preset-typescript": "7.27.1",
40
- "@equisoft/eslint-config": "4.0.2",
41
- "@equisoft/eslint-config-typescript": "4.0.2",
42
- "@equisoft/jest-utils": "1.7.0",
37
+ "@babel/core": "7.28.5",
38
+ "@babel/preset-env": "7.28.5",
39
+ "@babel/preset-typescript": "7.28.5",
40
+ "@equisoft/eslint-config": "6.0.2",
41
+ "@equisoft/eslint-config-typescript": "6.0.2",
42
+ "@equisoft/jest-utils": "1.8.0",
43
43
  "@equisoft/typescript-config": "2.0.0",
44
44
  "@microsoft/eslint-formatter-sarif": "3.1.0",
45
+ "@stylistic/eslint-plugin": "5.5.0",
45
46
  "@types/babel__core": "^7",
46
47
  "@types/babel__preset-env": "^7",
47
48
  "@types/jest": "30.0.0",
48
- "@types/node": "22.16.3",
49
- "@typescript-eslint/eslint-plugin": "7.18.0",
50
- "@typescript-eslint/parser": "7.18.0",
51
- "babel-jest": "30.0.4",
49
+ "@types/node": "24.10.1",
50
+ "@typescript-eslint/eslint-plugin": "8.46.4",
51
+ "@typescript-eslint/parser": "8.46.4",
52
+ "babel-jest": "30.2.0",
52
53
  "eslint": "8.57.1",
53
54
  "eslint-import-resolver-node": "0.3.9",
54
55
  "eslint-import-resolver-typescript": "4.4.4",
55
56
  "eslint-plugin-import": "2.32.0",
56
- "jest": "30.0.4",
57
+ "jest": "30.2.0",
57
58
  "jest-junit": "16.0.0",
58
- "jest-util": "30.0.2",
59
- "ts-jest": "29.4.0",
60
- "typescript": "5.8.3",
59
+ "jest-util": "30.2.0",
60
+ "ts-jest": "29.4.5",
61
+ "typescript": "5.9.3",
61
62
  "yargs": "18.0.0"
62
63
  },
63
64
  "resolutions": {
64
65
  "@babel/core/json5": "^2.2.2",
65
66
  "ts-jest/json5": "^2.2.2"
66
67
  },
67
- "packageManager": "yarn@4.9.2"
68
+ "packageManager": "yarn@4.11.0"
68
69
  }
package/tsconfig.json CHANGED
@@ -12,8 +12,7 @@
12
12
  "declarationDir": "dist"
13
13
  },
14
14
  "include": [
15
- "src",
16
- "*.ts"
15
+ "src/**/*"
17
16
  ],
18
17
  "exclude": [
19
18
  "src/**/*.spec.ts"