uti 7.1.3 → 7.2.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/README.md CHANGED
@@ -174,7 +174,7 @@ Lookup a UTI for a file name and check conformance.
174
174
  #### Parameters
175
175
 
176
176
  * `fileName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** file to detect UTI for
177
- * `uti` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** to check conformance egainst
177
+ * `uti` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** to check conformance against
178
178
 
179
179
  Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** ture if utils for file name are conformant
180
180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uti",
3
- "version": "7.1.3",
3
+ "version": "7.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -26,15 +26,17 @@
26
26
  "test:browser-ava": "browser-ava --headless --no-keep-open tests/*-ava.mjs tests/*-ava-browser.mjs",
27
27
  "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
28
28
  "docs": "documentation readme --section=API ./src/**/*.mjs",
29
- "lint": "npm run lint:docs",
30
- "lint:docs": "documentation lint ./src/**/*.mjs"
29
+ "lint": "npm run lint:tsc && npm run lint:docs",
30
+ "lint:docs": "documentation lint ./src/**/*.mjs",
31
+ "lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext --moduleResolution nodenext ./src/*.mjs"
31
32
  },
32
33
  "devDependencies": {
33
- "ava": "^5.2.0",
34
- "browser-ava": "^1.3.38",
35
- "c8": "^7.13.0",
36
- "documentation": "^14.0.1",
37
- "semantic-release": "^21.0.2"
34
+ "ava": "^5.3.1",
35
+ "browser-ava": "^1.3.54",
36
+ "c8": "^8.0.0",
37
+ "documentation": "^14.0.2",
38
+ "semantic-release": "^21.0.7",
39
+ "typescript": "^5.1.6"
38
40
  },
39
41
  "engines": {
40
42
  "node": ">=14.18.3"
@@ -51,7 +53,8 @@
51
53
  "inheritFrom": [
52
54
  "arlac77/template-arlac77-github",
53
55
  "arlac77/template-browser-ava",
54
- "arlac77/template-esm-only"
56
+ "arlac77/template-esm-only",
57
+ "arlac77/template-typescript"
55
58
  ]
56
59
  }
57
60
  }
package/src/uti.mjs CHANGED
@@ -158,7 +158,7 @@ export class UTIController {
158
158
  /**
159
159
  * Lookup a UTI for a file name and check conformance.
160
160
  * @param {string} fileName file to detect UTI for
161
- * @param {string} uti to check conformance egainst
161
+ * @param {string} uti to check conformance against
162
162
  * @return {boolean} ture if utils for file name are conformant
163
163
  */
164
164
  fileNameConformsTo(fileName, uti) {
@@ -187,6 +187,11 @@ export default [
187
187
  fileNameExtension: ".ini",
188
188
  mimeType: "zz-application/zz-winassoc-ini"
189
189
  },
190
+ {
191
+ name: "public.conf",
192
+ conformsTo: ["public.text", "public.configuration"],
193
+ fileNameExtension: ".conf"
194
+ },
190
195
  {
191
196
  name: "public.source-code",
192
197
  conformsTo: "public.plain-text"
@@ -222,10 +227,15 @@ export default [
222
227
  conformsTo: "public.source-code",
223
228
  fileNameExtension: ".s"
224
229
  },
230
+ {
231
+ name: "public.sourcemap",
232
+ conformsTo: "public.json",
233
+ fileNameExtension: ".js.map"
234
+ },
225
235
  {
226
236
  name: "com.netscape.javascript-source",
227
237
  conformsTo: ["public.source-code", "public.executable"],
228
- fileNameExtension: [".mjs",".cjs", ".js", ".jscript", ".javascript"],
238
+ fileNameExtension: [".mjs", ".cjs", ".js", ".jscript", ".javascript"],
229
239
  mimeType: [
230
240
  "application/ecmascript",
231
241
  "application/javascript",
@@ -419,8 +429,15 @@ export default [
419
429
  {
420
430
  name: "public.jpeg",
421
431
  conformsTo: "public.image",
432
+ mimeType: ["image/jpeg"],
422
433
  fileNameExtension: [".jpg", ".jpeg"]
423
434
  },
435
+ {
436
+ name: "public.jpeg2000",
437
+ conformsTo: "public.image",
438
+ mimeType: ["image/jp2", "image/jpx", "image/jpm"],
439
+ fileNameExtension: [".jk2"]
440
+ },
424
441
  {
425
442
  name: "com.adobe.postscript",
426
443
  conformsTo: "public.image",
@@ -439,20 +456,21 @@ export default [
439
456
  fileNameExtension: [".dmg", ".smi", ".img"],
440
457
  mimeType: "application/x-apple-diskimage"
441
458
  },
442
- { name: "public.oci.image.layer.v1",
443
- conformsTo: ["public.data"],
444
- },
445
- { name: "public.oci.image.layer.v1.tar",
459
+ { name: "public.oci.image.layer.v1", conformsTo: ["public.data"] },
460
+ {
461
+ name: "public.oci.image.layer.v1.tar",
446
462
  conformsTo: ["public.oci.image.layer.v1"],
447
463
  filNameExtension: [".tar"],
448
464
  mimeType: "application/vnd.oci.image.layer.v1.tar"
449
465
  },
450
- { name: "public.oci.image.layer.v1.tar.gzip",
466
+ {
467
+ name: "public.oci.image.layer.v1.tar.gzip",
451
468
  conformsTo: ["public.oci.image.layer.v1"],
452
469
  filNameExtension: [".tar.gz"],
453
470
  mimeType: "application/vnd.oci.image.layer.v1.tar+gzip"
454
471
  },
455
- { name: "public.oci.image.layer.v1.tar.zstd",
472
+ {
473
+ name: "public.oci.image.layer.v1.tar.zstd",
456
474
  conformsTo: ["public.oci.image.layer.v1"],
457
475
  filNameExtension: [".tar.zstd"],
458
476
  mimeType: "application/vnd.oci.image.layer.v1.tar+zstd"
@@ -605,5 +623,5 @@ export default [
605
623
  name: "public.polkit.rules",
606
624
  conformsTo: ["com.netscape.javascript-source", "public.configuration"],
607
625
  fileNameExtension: ".rules"
608
- },
626
+ }
609
627
  ];