sdf-parser 7.0.4 → 7.0.5

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/lib/index.js CHANGED
@@ -43,8 +43,7 @@ function getEntriesBoundaries(string, substring, eol) {
43
43
  function getMolecule$1(sdfPart, labels, currentLabels, options) {
44
44
  let parts = sdfPart.split(`${options.eol}>`);
45
45
  if (parts.length === 0 || parts[0].length <= 5) return;
46
- let molecule = {};
47
- molecule.molfile = parts[0] + options.eol;
46
+ let molecule = { molfile: parts[0] + options.eol };
48
47
  for (let j = 1; j < parts.length; j++) {
49
48
  let lines = parts[j].split(options.eol);
50
49
  let from = lines[0].indexOf('<');
@@ -278,8 +277,7 @@ function getMolecule(sdfPart, options) {
278
277
  const { eol, dynamicTyping: dynamicTyping$1 } = options;
279
278
  let parts = sdfPart.split(`${eol}>`);
280
279
  if (parts.length === 0 || parts[0].length <= 5) return;
281
- let molecule = {};
282
- molecule.molfile = parts[0] + eol;
280
+ let molecule = { molfile: parts[0] + eol };
283
281
  for (let j = 1; j < parts.length; j++) {
284
282
  let lines = parts[j].split(eol);
285
283
  let from = lines[0].indexOf('<');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdf-parser",
3
- "version": "7.0.4",
3
+ "version": "7.0.5",
4
4
  "description": "SDF parser",
5
5
  "main": "lib/index.js",
6
6
  "module": "src/index.js",
@@ -39,21 +39,19 @@
39
39
  },
40
40
  "homepage": "https://github.com/cheminfo/sdf-parser",
41
41
  "devDependencies": {
42
- "@babel/plugin-transform-modules-commonjs": "^7.26.3",
43
- "@types/node": "^22.13.5",
44
- "@vitest/coverage-v8": "^3.0.7",
45
- "babel-eslint": "^10.1.0",
42
+ "@types/node": "^25.2.3",
43
+ "@vitest/coverage-v8": "^4.0.18",
46
44
  "callback-stream": "^1.1.0",
47
- "cheminfo-build": "^1.2.1",
45
+ "cheminfo-build": "^1.3.2",
48
46
  "eslint": "^9.21.0",
49
- "eslint-config-cheminfo": "^13.0.0",
50
- "file-collection": "^1.0.0",
51
- "openchemlib": "^8.18.1",
52
- "prettier": "^3.5.2",
53
- "vitest": "^3.0.7"
47
+ "eslint-config-cheminfo": "^17.1.0",
48
+ "file-collection": "^6.6.0",
49
+ "openchemlib": "^9.20.0",
50
+ "prettier": "^3.8.1",
51
+ "vitest": "^4.0.18"
54
52
  },
55
53
  "dependencies": {
56
54
  "dynamic-typing": "^1.0.1",
57
- "ensure-string": "^1.2.0"
55
+ "ensure-string": "^2.0.0"
58
56
  }
59
57
  }
package/src/iterator.js CHANGED
@@ -38,8 +38,7 @@ function getMolecule(sdfPart, options) {
38
38
  const { eol, dynamicTyping } = options;
39
39
  let parts = sdfPart.split(`${eol}>`);
40
40
  if (parts.length === 0 || parts[0].length <= 5) return;
41
- let molecule = {};
42
- molecule.molfile = parts[0] + eol;
41
+ let molecule = { molfile: parts[0] + eol };
43
42
  for (let j = 1; j < parts.length; j++) {
44
43
  let lines = parts[j].split(eol);
45
44
  let from = lines[0].indexOf('<');
@@ -9,8 +9,7 @@
9
9
  export function getMolecule(sdfPart, labels, currentLabels, options) {
10
10
  let parts = sdfPart.split(`${options.eol}>`);
11
11
  if (parts.length === 0 || parts[0].length <= 5) return;
12
- let molecule = {};
13
- molecule.molfile = parts[0] + options.eol;
12
+ let molecule = { molfile: parts[0] + options.eol };
14
13
  for (let j = 1; j < parts.length; j++) {
15
14
  let lines = parts[j].split(options.eol);
16
15
  let from = lines[0].indexOf('<');