string-array 2.1.1 → 2.1.3

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 CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2018 Joel Chen
189
+ Copyright 2022-2026 Joel Chen
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/dist/index.js CHANGED
@@ -40,9 +40,6 @@ export function parse(str, noPrefix, noExtra) {
40
40
  // end of an array
41
41
  if (m[0] === "]") {
42
42
  const popped = nest.pop();
43
- if (!popped) {
44
- throw new Error("array has extra ]");
45
- }
46
43
  arr = popped;
47
44
  if (s.startsWith(",")) {
48
45
  s = s.substring(1).trimStart();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-array",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Parse string into array of string elements",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "scripts": {
19
19
  "build": "rm -rf dist && tsc -p tsconfig.json",
20
20
  "test": "vitest run",
21
- "ci:check": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.test.json && npm test",
21
+ "ci:check": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.test.json && vitest run --coverage",
22
22
  "coverage": "vitest run --coverage",
23
23
  "prepublishOnly": "xrun build",
24
24
  "postpack": "publish-util-postpack"
@@ -41,14 +41,14 @@
41
41
  "files": [
42
42
  "dist"
43
43
  ],
44
- "author": "Joel Chen <joel123@gmail.com>",
44
+ "author": "Joel Chen",
45
45
  "license": "Apache-2.0",
46
46
  "dependencies": {},
47
47
  "devDependencies": {
48
48
  "@types/node": "^26.4.1",
49
49
  "@vitest/coverage-v8": "^5.0.0",
50
50
  "prettier": "^3.5.3",
51
- "publish-util": "^3.1.1",
51
+ "publish-util": "^3.1.3",
52
52
  "typescript": "^7.0.2",
53
53
  "vite": "^8.2.2",
54
54
  "vitest": "^5.0.0"