xml-toolkit 1.0.56 → 1.0.57

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.
@@ -27,6 +27,8 @@ const XMLSchemata = class extends Map {
27
27
  new XMLSchemaXml (this)
28
28
  new XMLSchemaBuiltIn (this)
29
29
 
30
+ this.loadedFiles = new Set()
31
+
30
32
  this.addFile (fn)
31
33
 
32
34
  }
@@ -159,6 +161,10 @@ const XMLSchemata = class extends Map {
159
161
 
160
162
  addFile (fn, options = {}) {
161
163
 
164
+ if (this.loadedFiles.has (fn)) return
165
+
166
+ this.loadedFiles.add (fn)
167
+
162
168
  options.dirname = path.dirname (fn)
163
169
 
164
170
  const document = this.parser.process (fs.readFileSync (fn, 'utf-8'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xml-toolkit",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "description": "XML parser, marshaller, SOAP adapter",
5
5
  "main": "index.js",
6
6
  "files": [