@file-type/xml 0.4.3 → 0.5.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/LICENSE.txt ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2025 Borewit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -16,7 +16,7 @@ npm install @file-type/xml
16
16
 
17
17
  The following example shows how add the XML detector to [file-type](https://github.com/sindresorhus/file-type).
18
18
  ```js
19
- import {NodeFileTypeParser} from 'file-type';
19
+ import {FileTypeParser} from 'file-type';
20
20
  import {detectXml} from '@file-type/xml';
21
21
 
22
22
  const parser = new FileTypeParser({customDetectors: [detectXml]});
@@ -43,3 +43,7 @@ console.log(JSON.stringify(fileType)); // Outputs: {"ext":"svg","mime":"image/sv
43
43
  - [RSS (RDF Site Summary or Really Simple Syndication)](https://en.wikipedia.org/wiki/RSS)
44
44
  - [SVG: (Scalable Vector Graphics)](https://en.wikipedia.org/wiki/SVG)
45
45
  - [XHTML](https://en.wikipedia.org/wiki/XHTML)
46
+
47
+ ## Licence
48
+
49
+ This project is licensed under the [MIT License](LICENSE.txt). Feel free to use, modify, and distribute as needed.
package/lib/index.js CHANGED
@@ -75,9 +75,12 @@ const namespaceMapping = {
75
75
  /**
76
76
  * Maps the root element name to corresponding file-type.
77
77
  * Used for Non-namespaced XML
78
- * @type {{rss: {ext: string, mime: string}}}
79
78
  */
80
79
  const rootNameMapping = {
80
+ plist: {
81
+ ext: 'plist',
82
+ mime: 'application/x-plist'
83
+ },
81
84
  rss: {
82
85
  ext: 'rss',
83
86
  mime: 'application/rss+xml'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@file-type/xml",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "description": "XML detection plugin for file-type",
5
5
  "type": "module",
6
6
  "types": "./lib/index.d.ts",
@@ -9,10 +9,11 @@
9
9
  "clean": "del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'src/**/*.d.ts'",
10
10
  "compile-src": "tsc -p lib",
11
11
  "compile": "yarn run compile-src",
12
- "lint-ts": "biome check",
12
+ "lint:ts": "biome check",
13
13
  "build": "yarn run clean && yarn compile",
14
14
  "test": "mocha",
15
- "prepublishOnly": "yarn run build"
15
+ "prepublishOnly": "yarn run build",
16
+ "update-biome": "yarn add -D --exact @biomejs/biome && npx @biomejs/biome migrate --write"
16
17
  },
17
18
  "keywords": [
18
19
  "file-type",
@@ -30,17 +31,17 @@
30
31
  "MusicXML"
31
32
  ],
32
33
  "dependencies": {
33
- "sax": "^1.4.1",
34
- "strtok3": "^10.2.2"
34
+ "sax": "^1.4.4",
35
+ "strtok3": "^10.3.4"
35
36
  },
36
37
  "devDependencies": {
37
- "@biomejs/biome": "^1.9.4",
38
+ "@biomejs/biome": "2.3.15",
38
39
  "@types/sax": "^1.2.7",
39
- "chai": "^5.2.0",
40
+ "chai": "^6.2.2",
40
41
  "del-cli": "^6.0.0",
41
- "file-type": "^20.4.1",
42
- "mocha": "^11.1.0",
43
- "typescript": "^5.8.3"
42
+ "file-type": "^21.3.0",
43
+ "mocha": "^11.7.1",
44
+ "typescript": "^5.9.3"
44
45
  },
45
46
  "files": [
46
47
  "lib/**/*.js",