uom-types 4.1.2 → 5.0.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file. Dates are displayed in UTC.
3
3
 
4
+ # [5.0.0](https://github.com/RebeccaStevens/uom-types/compare/v4.1.2...v5.0.0) (2024-11-27)
5
+
6
+
7
+ ### Features
8
+
9
+ * drop support for node 16 ([c701cf3](https://github.com/RebeccaStevens/uom-types/commit/c701cf37a8b433bf5daa3269a6c5c00a66f8361a))
10
+
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ * drop support for node 16
15
+
4
16
  ## [4.1.2](https://github.com/RebeccaStevens/uom-types/compare/v4.1.1...v4.1.2) (2024-10-18)
5
17
 
6
18
 
package/dist/index.d.cts CHANGED
@@ -201,7 +201,13 @@ export type UnknownUnitClass = UnknownUnitKeyValues & BrandUnitClassType;
201
201
  export type UnknownUnitMeta = UnknownUnitKeyValues & Readonly<{
202
202
  __uno_types__unit_meta_type: true;
203
203
  }>;
204
+ /**
205
+ * @internal
206
+ */
204
207
  export type UnitKeyValues<T extends UnitSubvalues> = BrandUnitKeyValues<keyof ExcludeUnitZeroSubvalues<T> extends string ? keyof ExcludeUnitZeroSubvalues<T> : never, RemoveNeverValues<T>>;
208
+ /**
209
+ * @internal
210
+ */
205
211
  export type UnknownUnitKeyValues = BrandUnitKeyValues<string, {}>;
206
212
  /**
207
213
  * A mapping of subvalue of a unit its magnitude.
@@ -303,9 +309,7 @@ export type SiUnitKeys = "Second" | "Meter" | "Kilogram" | "Mole" | "Ampere" | "
303
309
  * @group Unit Classes
304
310
  */
305
311
  export type BaseUnitClass<T extends Exactify<SiUnitConfig, T>> = UnitClass<T>;
306
- export type SiUnitConfig = {
307
- [K in SiUnitKeys]?: Exponent;
308
- };
312
+ export type SiUnitConfig = Partial<Record<SiUnitKeys, Exponent>>;
309
313
  /**
310
314
  * @group Unit Classes
311
315
  * @category Angle (Plane)
package/dist/index.d.mts CHANGED
@@ -201,7 +201,13 @@ export type UnknownUnitClass = UnknownUnitKeyValues & BrandUnitClassType;
201
201
  export type UnknownUnitMeta = UnknownUnitKeyValues & Readonly<{
202
202
  __uno_types__unit_meta_type: true;
203
203
  }>;
204
+ /**
205
+ * @internal
206
+ */
204
207
  export type UnitKeyValues<T extends UnitSubvalues> = BrandUnitKeyValues<keyof ExcludeUnitZeroSubvalues<T> extends string ? keyof ExcludeUnitZeroSubvalues<T> : never, RemoveNeverValues<T>>;
208
+ /**
209
+ * @internal
210
+ */
205
211
  export type UnknownUnitKeyValues = BrandUnitKeyValues<string, {}>;
206
212
  /**
207
213
  * A mapping of subvalue of a unit its magnitude.
@@ -303,9 +309,7 @@ export type SiUnitKeys = "Second" | "Meter" | "Kilogram" | "Mole" | "Ampere" | "
303
309
  * @group Unit Classes
304
310
  */
305
311
  export type BaseUnitClass<T extends Exactify<SiUnitConfig, T>> = UnitClass<T>;
306
- export type SiUnitConfig = {
307
- [K in SiUnitKeys]?: Exponent;
308
- };
312
+ export type SiUnitConfig = Partial<Record<SiUnitKeys, Exponent>>;
309
313
  /**
310
314
  * @group Unit Classes
311
315
  * @category Angle (Plane)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uom-types",
3
- "version": "4.1.2",
3
+ "version": "5.0.0",
4
4
  "description": "Typesafe units with no runtime overhead.",
5
5
  "keywords": [
6
6
  "uom",
@@ -77,83 +77,79 @@
77
77
  "test": "pnpm run test:js-run && pnpm run test:types",
78
78
  "test:js": "vitest --coverage",
79
79
  "test:js-run": "vitest run --coverage",
80
- "test:types": "pnpm run test:types-pre && tsd -t './dist/index.d.mts' -f 'tests/**/*.test-d.ts'",
80
+ "test:types": "pnpm run test:types-pre && tsd -t './dist/index.d.mts' -f 'src/**/*.test-d.ts'",
81
81
  "test:types-pre": "pnpm run build",
82
82
  "typecheck": "tsc -p tsconfig.build.json --noEmit"
83
83
  },
84
- "resolutions": {
85
- "dts-bundle-generator": "9.5.1"
86
- },
87
84
  "devDependencies": {
88
- "@commitlint/cli": "19.5.0",
89
- "@commitlint/config-conventional": "19.5.0",
85
+ "@commitlint/cli": "19.6.0",
86
+ "@commitlint/config-conventional": "19.6.0",
90
87
  "@cspell/dict-cryptocurrencies": "5.0.3",
91
- "@eslint/compat": "1.2.0",
92
- "@rebeccastevens/eslint-config": "3.3.2",
93
- "@rollup/plugin-replace": "6.0.1",
94
- "@rollup/plugin-typescript": "12.1.0",
95
- "@sebbo2002/semantic-release-jsr": "2.0.1",
88
+ "@eslint/compat": "1.2.3",
89
+ "@rebeccastevens/eslint-config": "3.3.3",
90
+ "@rollup/plugin-typescript": "12.1.1",
91
+ "@sebbo2002/semantic-release-jsr": "2.0.2",
96
92
  "@semantic-release/changelog": "6.0.3",
97
93
  "@semantic-release/commit-analyzer": "13.0.0",
98
94
  "@semantic-release/git": "10.0.1",
99
- "@semantic-release/github": "11.0.0",
95
+ "@semantic-release/github": "11.0.1",
100
96
  "@semantic-release/npm": "12.0.1",
101
97
  "@semantic-release/release-notes-generator": "14.0.1",
102
- "@stylistic/eslint-plugin": "2.9.0",
103
- "@types/node": "16.18.113",
104
- "@typescript-eslint/eslint-plugin": "8.9.0",
105
- "@typescript-eslint/parser": "8.9.0",
106
- "@vitest/coverage-v8": "2.1.2",
107
- "@vitest/eslint-plugin": "1.1.7",
98
+ "@stylistic/eslint-plugin": "2.11.0",
99
+ "@types/node": "18.19.66",
100
+ "@typescript-eslint/eslint-plugin": "8.16.0",
101
+ "@typescript-eslint/parser": "8.16.0",
102
+ "@vitest/coverage-v8": "2.1.6",
103
+ "@vitest/eslint-plugin": "1.1.11",
108
104
  "commitizen": "4.3.1",
109
- "cspell": "8.15.3",
105
+ "cspell": "8.16.1",
110
106
  "cz-conventional-changelog": "3.3.0",
111
- "eslint": "9.12.0",
107
+ "eslint": "9.15.0",
112
108
  "eslint-config-prettier": "9.1.0",
113
109
  "eslint-flat-config-utils": "0.4.0",
114
110
  "eslint-import-resolver-typescript": "3.6.3",
115
111
  "eslint-merge-processors": "0.1.0",
116
112
  "eslint-plugin-eslint-comments": "3.2.0",
117
113
  "eslint-plugin-format": "0.1.2",
118
- "eslint-plugin-functional": "7.0.2",
119
- "eslint-plugin-import-x": "4.3.1",
120
- "eslint-plugin-jsdoc": "50.4.1",
121
- "eslint-plugin-jsonc": "2.16.0",
114
+ "eslint-plugin-functional": "7.1.0",
115
+ "eslint-plugin-import-x": "4.4.3",
116
+ "eslint-plugin-jsdoc": "50.6.0",
117
+ "eslint-plugin-jsonc": "2.18.2",
122
118
  "eslint-plugin-markdown": "5.1.0",
123
- "eslint-plugin-n": "17.11.1",
119
+ "eslint-plugin-n": "17.14.0",
124
120
  "eslint-plugin-no-only-tests": "3.3.0",
125
121
  "eslint-plugin-optimize-regex": "1.2.1",
126
122
  "eslint-plugin-prettier": "5.2.1",
127
- "eslint-plugin-promise": "7.1.0",
128
- "eslint-plugin-regexp": "2.6.0",
129
- "eslint-plugin-sonarjs": "2.0.3",
130
- "eslint-plugin-unicorn": "56.0.0",
131
- "eslint-plugin-yml": "1.14.0",
123
+ "eslint-plugin-promise": "7.2.1",
124
+ "eslint-plugin-regexp": "2.7.0",
125
+ "eslint-plugin-sonarjs": "2.0.4",
126
+ "eslint-plugin-unicorn": "56.0.1",
127
+ "eslint-plugin-yml": "1.15.0",
132
128
  "http-serve": "1.0.1",
133
- "husky": "9.1.6",
129
+ "husky": "9.1.7",
134
130
  "jsonc-eslint-parser": "2.4.0",
135
- "knip": "5.33.3",
131
+ "knip": "5.38.1",
136
132
  "lint-staged": "15.2.10",
137
- "markdownlint-cli2": "0.14.0",
138
- "prettier": "3.3.3",
133
+ "markdownlint-cli2": "0.15.0",
134
+ "prettier": "3.4.1",
139
135
  "rimraf": "6.0.1",
140
- "rollup": "4.24.0",
136
+ "rollup": "4.27.4",
141
137
  "rollup-plugin-deassert": "1.3.0",
142
- "rollup-plugin-dts-bundle-generator": "1.4.0",
143
- "semantic-release": "24.1.2",
144
- "tsafe": "1.7.5",
138
+ "rollup-plugin-dts-bundle-generator-2": "1.0.2",
139
+ "semantic-release": "24.2.0",
140
+ "tsafe": "1.8.5",
145
141
  "tsc-files": "1.1.4",
146
142
  "tsd": "0.31.2",
147
- "tsx": "4.19.1",
148
- "typedoc": "0.26.9",
149
- "typedoc-plugin-coverage": "3.3.0",
150
- "typescript": "5.6.3",
151
- "vite-tsconfig-paths": "5.0.1",
152
- "vitest": "2.1.2",
143
+ "tsx": "4.19.2",
144
+ "typedoc": "0.26.11",
145
+ "typedoc-plugin-coverage": "3.4.0",
146
+ "typescript": "5.7.2",
147
+ "vite-tsconfig-paths": "5.1.3",
148
+ "vitest": "2.1.6",
153
149
  "yaml-eslint-parser": "1.2.3"
154
150
  },
155
- "packageManager": "pnpm@9.12.1",
151
+ "packageManager": "pnpm@9.14.2",
156
152
  "engines": {
157
- "node": ">=16.0.0"
153
+ "node": ">=18.0.0"
158
154
  }
159
155
  }